/* Cositas con Alma — estética artesanal cálida */
:root {
  --bg: #faf6f0;
  --card: #fffdf9;
  --ink: #4a4038;
  --muted: #9a8a7c;
  --accent: #b06a6e;        /* rosa empolvado oscuro */
  --accent-soft: #e8b4b8;   /* rosa empolvado claro */
  --sage: #8aa189;
  --line: #eadfd2;
  --radius: 14px;
  --shadow: 0 4px 18px rgba(90, 70, 50, .08);
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.6;
}
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 500; color: #5c4033; }
h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); line-height: 1.2; margin: 0 0 .6em; }
h2 { font-size: clamp(1.3rem, 3vw, 1.9rem); margin: 0 0 .6em; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* Barra de anuncio + header */
.announce {
  background: var(--accent-soft); color: #5c4033; text-align: center;
  font-size: .85rem; padding: 7px 12px; letter-spacing: .3px;
}
header.site {
  background: var(--card); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.header-in { display: flex; align-items: center; gap: 26px; padding: 14px 20px; max-width: 1160px; margin: 0 auto; }
.logo { font-family: var(--serif); font-size: 1.5rem; color: #5c4033; letter-spacing: .5px; }
.logo small { display: block; font-size: .6rem; letter-spacing: 3px; color: var(--muted); text-transform: uppercase; }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.5rem; line-height: 1; color: var(--ink); cursor: pointer; padding: 4px 6px; }
.nav-collapse { display: flex; align-items: center; gap: 22px; flex: 1; min-width: 0; }
nav.main { display: flex; gap: 20px; flex: 1; flex-wrap: wrap; }
nav.main a { color: var(--ink); font-size: .95rem; white-space: nowrap; }
nav.main a:hover { color: var(--accent); text-decoration: none; }
.account-link { font-size: .9rem; white-space: nowrap; }
.search-btn {
  border: 1.5px solid var(--line); background: #fff; flex-shrink: 0;
  border-radius: 999px; padding: 7px 12px; cursor: pointer; font-size: 1rem;
  transition: background .15s;
}
.search-btn:hover { background: var(--accent-soft); }

/* Modal de búsqueda */
.search-modal { position: fixed; inset: 0; z-index: 1100; }
.search-modal-backdrop { position: absolute; inset: 0; background: rgba(74,64,56,.45); }
.search-modal-panel {
  position: relative; max-width: 560px; margin: 8vh auto 0; background: var(--card);
  border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,.3); overflow: hidden;
  max-height: 84vh; display: flex; flex-direction: column;
}
.search-modal-form { display: flex; align-items: center; gap: 8px; padding: 16px 18px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.search-modal-form input {
  flex: 1; border: none; font-size: 1.1rem; padding: 6px 0; background: transparent; color: var(--ink);
}
.search-modal-form input:focus { outline: none; box-shadow: none; }
.search-modal-close { border: none; background: none; font-size: 1.2rem; cursor: pointer; color: var(--muted); padding: 4px 8px; }
.search-modal-close:hover { color: var(--ink); }
.search-modal-results { overflow-y: auto; padding: 8px; }
.search-result {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: var(--ink); text-decoration: none;
}
.search-result:hover { background: #f3ece3; text-decoration: none; }
.search-result img, .search-result-noimg { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; background: #f0e8dd; flex-shrink: 0; }
.search-result .sr-name { display: block; font-size: .95rem; }
.search-result .sr-price { display: block; font-size: .82rem; color: var(--accent); font-weight: 600; }
.search-empty { padding: 20px 12px; color: var(--muted); font-size: .9rem; text-align: center; }
.search-viewall { display: block; text-align: center; padding: 12px; font-size: .88rem; font-weight: 600; border-top: 1px solid var(--line); margin-top: 6px; }
@media (max-width: 600px) {
  .search-modal-panel { margin: 0; max-width: 100%; height: 100%; max-height: 100%; border-radius: 0; }
}
.cart-link {
  background: var(--accent); color: #fff !important; padding: 8px 18px;
  border-radius: 999px; font-size: .9rem; white-space: nowrap; flex-shrink: 0;
}
.cart-link:hover { background: #9c585c; text-decoration: none; }

/* Botones */
.btn {
  display: inline-block; background: var(--accent); color: #fff !important;
  border: 0; padding: 12px 28px; border-radius: 999px; font-size: 1rem;
  cursor: pointer; font-family: var(--sans); transition: background .15s;
}
.btn:hover { background: #9c585c; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--accent) !important; border: 1.5px solid var(--accent); }
.btn.ghost:hover { background: var(--accent); color: #fff !important; }
.btn.ghost.active { background: var(--accent); color: #fff !important; border-color: var(--accent); }
.btn.small { padding: 8px 18px; font-size: .88rem; }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center;
  padding: 60px 0 50px;
}
.hero .kicker { color: var(--accent); letter-spacing: 3px; text-transform: uppercase; font-size: .78rem; margin-bottom: 12px; }
.hero p.lead { font-size: 1.12rem; color: #6b5d51; max-width: 46ch; }
.hero-img { border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.hero-badges { display: flex; gap: 22px; margin-top: 26px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }

/* Grids de tarjetas */
.grid { display: grid; gap: 22px; }
.grid.cats { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.grid.products { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .15s, box-shadow .15s; position: relative;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card a { color: inherit; text-decoration: none; }
.card .thumb { aspect-ratio: 1; object-fit: cover; width: 100%; background: #f0e8dd; }
.card .body { padding: 14px 16px 18px; }
.card h3 { font-size: 1.02rem; margin: 0 0 4px; }
.card .price { color: var(--accent); font-weight: 600; }
.card .short { font-size: .85rem; color: var(--muted); margin: 4px 0 0; }
.badge {
  position: absolute; top: 12px; left: 12px; background: var(--sage); color: #fff;
  font-size: .72rem; padding: 4px 10px; border-radius: 999px; letter-spacing: .5px;
}
.badge.stock { left: auto; right: 12px; background: #c65a5a; }

/* Secciones */
section { padding: 44px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-head a { font-size: .9rem; }
.soft { background: #f3ece3; border-radius: var(--radius); }

/* Ficha de producto */
.product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; padding: 40px 0; }
.gallery img { border-radius: var(--radius); box-shadow: var(--shadow); }
.crumbs { font-size: .82rem; color: var(--muted); padding-top: 18px; }
.crumbs a { color: var(--muted); }
.price-big { font-size: 1.7rem; color: var(--accent); font-weight: 600; margin: 10px 0; }
.price-big small { font-size: .9rem; color: var(--muted); font-weight: 400; }
.field { margin: 16px 0; }
.field label { display: block; font-size: .88rem; margin-bottom: 6px; color: #6b5d51; }
input[type=text], input[type=email], input[type=tel], input[type=number],
input[type=password], input[type=date], select, textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 10px;
  font-size: 1rem; font-family: var(--sans); background: #fff; color: var(--ink);
  box-sizing: border-box; appearance: none;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-soft); box-shadow: 0 0 0 3px rgba(232,180,184,.35); }
.qty-row { display: flex; gap: 12px; align-items: center; }
.qty-row input { width: 84px; }
.desc { color: #6b5d51; }
.trust { display: flex; flex-direction: column; gap: 8px; margin-top: 22px; font-size: .87rem; color: var(--muted); }

/* Carrito y checkout */
table.cart { width: 100%; border-collapse: collapse; }
table.cart td, table.cart th { padding: 14px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.cart img { width: 70px; border-radius: 10px; }
.totals { margin-top: 20px; margin-left: auto; max-width: 340px; }
.totals div { display: flex; justify-content: space-between; padding: 5px 0; }
.totals .grand { font-size: 1.2rem; font-weight: 600; border-top: 1.5px solid var(--line); padding-top: 10px; color: var(--accent); }
.checkout-layout { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; padding: 30px 0 60px; align-items: start; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ship-option, .pay-option {
  display: flex; gap: 10px; align-items: center; border: 1.5px solid var(--line);
  border-radius: 10px; padding: 12px 14px; margin: 8px 0; cursor: pointer; background: #fff;
}
.ship-option:has(input:checked), .pay-option:has(input:checked) { border-color: var(--accent); background: #fdf6f4; }
.ship-option .p, .pay-option .p { margin-left: auto; font-weight: 600; color: var(--accent); }

/* Blog / prosa */
.prose { max-width: 720px; margin: 0 auto; padding: 30px 0 60px; }
.prose img.cover { border-radius: var(--radius); margin-bottom: 24px; }
.prose h2 { margin-top: 1.4em; }
.prose ul { color: #6b5d51; }
.post-meta { color: var(--muted); font-size: .85rem; }

/* Newsletter + footer */
.newsletter { text-align: center; padding: 50px 20px; }
.newsletter form { display: flex; gap: 10px; max-width: 440px; margin: 18px auto 0; }
footer.site { background: #efe7dc; margin-top: 40px; padding: 44px 0 26px; font-size: .9rem; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; }
footer.site h4 { font-family: var(--serif); color: #5c4033; margin: 0 0 10px; }
footer.site a { color: #6b5d51; display: block; padding: 3px 0; }
.copyright { text-align: center; color: var(--muted); font-size: .8rem; margin-top: 30px; }

/* WhatsApp flotante */
.whatsapp-float {
  position: fixed; bottom: 24px; right: 24px; width: 56px; height: 56px;
  background: #25D366; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.25); z-index: 900; transition: transform .15s;
}
.whatsapp-float:hover { transform: scale(1.08); }
@media (max-width: 600px) {
  .whatsapp-float { bottom: 90px; right: 16px; width: 50px; height: 50px; }
}

/* Cookies */
.cookie-banner {
  position: fixed; bottom: 28px; left: 24px; right: 24px; max-width: 480px; margin: 0 auto;
  background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--accent);
  border-radius: var(--radius); box-shadow: 0 10px 40px rgba(90,70,50,.18);
  padding: 20px 22px; z-index: 1000; font-size: .9rem;
}
.cookie-banner .title { display: flex; align-items: center; gap: 8px; font-family: var(--serif); font-size: 1.05rem; color: #5c4033; }
.cookie-banner .title .icon { font-size: 1.3rem; }
.cookie-banner p { color: #6b5d51; }
.cookie-banner .actions { display: flex; gap: 10px; margin-top: 14px; }
@media (max-width: 600px) {
  .cookie-banner { left: 12px; right: 12px; bottom: 12px; padding: 16px 18px; }
}

/* Cuenta: login / registro / recuperar / restablecer */
.auth-wrap { max-width: 420px; margin: 0 auto; padding: 56px 20px 70px; }
.auth-wrap .auth-icon { text-align: center; font-size: 2.1rem; margin-bottom: 8px; }
.auth-wrap h1 { text-align: center; margin-bottom: 6px; }
.auth-wrap .auth-sub { text-align: center; color: var(--muted); font-size: .92rem; margin-bottom: 28px; }
.auth-wrap .panel { box-shadow: var(--shadow); }
.auth-wrap .auth-links { text-align: center; margin-top: 20px; font-size: .9rem; color: var(--muted); }
.auth-wrap .auth-links a { display: block; margin-top: 8px; }
.auth-wrap .notice { margin-bottom: 18px; }

/* Avisos */
.notice { background: #eef4ec; border: 1px solid #cfdccb; color: #4a5d47; border-radius: 10px; padding: 12px 16px; margin: 14px 0; }
.notice.error { background: #f8ecec; border-color: #e5c8c8; color: #8c4a4a; }

@media (max-width: 860px) {
  .hero, .product-layout, .checkout-layout { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }

  .header-in { flex-wrap: wrap; gap: 10px 14px; padding: 12px 16px; }
  .nav-toggle { display: block; order: 1; }
  .logo { order: 0; flex: 1; min-width: 0; }
  .logo small { font-size: .55rem; }
  .search-btn { order: 2; margin-left: auto; }
  .cart-link { order: 3; padding: 8px 14px; }
  .nav-collapse {
    order: 4; flex-basis: 100%; display: none;
    flex-direction: column; align-items: stretch; gap: 14px;
    padding-top: 12px; margin-top: 4px; border-top: 1px solid var(--line);
  }
  .nav-collapse.open { display: flex; }
  nav.main { flex-direction: column; gap: 2px; }
  nav.main a { padding: 10px 4px; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .account-link { padding: 4px; }
}

@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  h1 { font-size: 1.55rem; }
  .price-big { font-size: 1.4rem; }
  .hero { padding: 30px 0; }
  .hero-badges { gap: 10px 16px; font-size: .82rem; }
  section { padding: 30px 0; }
  .grid.products { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
  .grid.cats { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  table.cart, table.cart tbody, table.cart tr, table.cart td { display: block; width: 100%; }
  table.cart thead { display: none; }
  table.cart tr { border-bottom: 1px solid var(--line); padding: 12px 0; }
  table.cart td { border: 0; padding: 4px 0; }
  .totals { max-width: 100%; }
  .newsletter form { flex-direction: column; }
  .row2 { grid-template-columns: 1fr; }
}
