/* La Gran Feria Navideña — tienda pública */

:root {
  --red: #d50f1a;
  --red-dark: #a3000e;
  --green: #167a37;
  --green-deep: #0f3d26;
  --gold: #f5b82e;
  --gold-soft: #fff1cc;
  --cream: #fff8ee;
  --paper: #ffffff;
  --ink: #1b1b1f;
  --ink-soft: #4a4a52;
  --muted: #6e6e78;
  --line: rgba(27, 27, 31, 0.1);
  --wa: #1fa855;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(27, 27, 31, 0.08);
  --shadow-lg: 0 24px 60px rgba(27, 27, 31, 0.16);
  --display: 'Fredoka', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.1; margin: 0 0 .4em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.kicker {
  font-family: var(--display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .8rem;
  color: var(--red);
  margin-bottom: .6em;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  border: 0; border-radius: 999px;
  padding: .8em 1.4em;
  font-family: var(--display); font-weight: 600; font-size: 1rem;
  text-decoration: none; line-height: 1.1;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-lg { padding: 1em 1.8em; font-size: 1.08rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 8px 20px rgba(213, 15, 26, .3); }
.btn-primary:hover { background: var(--red-dark); }
.btn-light { background: rgba(255,255,255,.14); color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.6); }
.btn-light:hover { background: rgba(255,255,255,.24); }
.btn-ghost { background: transparent; color: var(--red); box-shadow: inset 0 0 0 2px var(--red); }
.btn-wa { background: var(--wa); color: #fff; box-shadow: 0 8px 20px rgba(31, 168, 85, .3); margin-top: 10px; }
.btn-wa:hover { background: #178a45; }
.btn-link { background: none; border: 0; color: var(--muted); text-decoration: underline; padding: .6em; }
.btn-add { background: var(--green); color: #fff; padding: .6em 1em; font-size: .92rem; }
.btn-add:hover { background: var(--green-deep); }
.is-pop { animation: pop .35s ease; }
@keyframes pop { 50% { transform: scale(1.12); } }

/* ---------- Anuncio + header ---------- */
.announce {
  background: var(--green-deep); color: #fff;
  text-align: center; font-size: .88rem; font-weight: 500;
  padding: 8px 16px;
}
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 6px 20px rgba(0,0,0,.05); }
.header-inner { display: flex; align-items: center; gap: 20px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand img { width: 44px; height: 44px; }
.brand-name { font-family: var(--display); font-size: 1.25rem; line-height: 1; color: var(--green); font-weight: 600; }
.brand-name strong { color: var(--red); font-weight: 700; }
.main-nav { display: flex; gap: 22px; margin-left: auto; }
.main-nav a { text-decoration: none; font-weight: 500; font-size: .95rem; color: var(--ink-soft); position: relative; }
.main-nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--red); transform: scaleX(0); transition: transform .2s; }
.main-nav a:hover { color: var(--ink); }
.main-nav a:hover::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.cart-btn {
  position: relative; display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%;
  border: 0; background: var(--cream); color: var(--ink);
}
.cart-btn:hover { background: var(--gold-soft); }
.cart-count {
  position: absolute; top: -2px; right: -2px;
  min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--red); color: #fff;
  font-size: .72rem; font-weight: 700; display: grid; place-items: center;
  transform: scale(0); transition: transform .2s;
}
.cart-count.is-visible { transform: scale(1); }
.menu-btn { display: none; width: 46px; height: 46px; border: 0; background: none; padding: 12px; flex-direction: column; justify-content: space-between; }
.menu-btn span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(1200px 500px at 85% 10%, rgba(245,184,46,.22), transparent 60%),
    radial-gradient(900px 600px at 0% 100%, rgba(213,15,26,.45), transparent 60%),
    linear-gradient(160deg, #134d30 0%, var(--green-deep) 60%, #0a2a1a 100%);
}
.snow { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-inner {
  position: relative; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 40px;
  padding-top: clamp(48px, 8vw, 96px); padding-bottom: clamp(56px, 9vw, 110px);
}
.hero .kicker { color: var(--gold); }
.hero h1 { color: #fff; text-wrap: balance; }
.hero-sub { font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: rgba(255,255,255,.86); max-width: 34em; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-art { display: grid; place-items: center; }
.hero-art img {
  width: min(100%, 440px);
  filter: drop-shadow(0 30px 50px rgba(0,0,0,.35));
  animation: float 6s ease-in-out infinite;
  background: rgba(255,255,255,.97); border-radius: 32px; padding: 5%;
}
@keyframes float { 50% { transform: translateY(-14px) rotate(-1.5deg); } }

/* ---------- Confianza ---------- */
.trust { background: var(--cream); border-bottom: 1px solid var(--line); }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding-top: 22px; padding-bottom: 22px; }
.trust-grid div { display: flex; align-items: center; gap: 12px; }
.trust-grid span { font-size: 1.7rem; }
.trust-grid p { margin: 0; font-size: .86rem; color: var(--muted); line-height: 1.35; }
.trust-grid strong { display: block; color: var(--ink); font-size: .95rem; }

/* ---------- Secciones ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-cream { background: var(--cream); }
.section-green { background: var(--green-deep); color: #fff; }
.section-green .kicker { color: var(--gold); }
.section-head { margin-bottom: 32px; max-width: 640px; }

/* ---------- Categorías ---------- */
.cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.cat {
  display: flex; flex-direction: column; gap: 4px;
  padding: 22px; border-radius: var(--radius);
  background: var(--cream); text-decoration: none;
  border: 1px solid var(--line);
  transition: transform .2s, box-shadow .2s, background .2s;
}
.cat:hover { transform: translateY(-4px); box-shadow: var(--shadow); background: var(--gold-soft); }
.cat-icon { font-size: 2rem; }
.cat-name { font-family: var(--display); font-weight: 600; font-size: 1.15rem; }
.cat-count { color: var(--muted); font-size: .85rem; }

/* ---------- Grid de productos ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }
.card {
  display: flex; flex-direction: column;
  background: var(--paper); border-radius: var(--radius);
  border: 1px solid var(--line); overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card-media { position: relative; display: block; aspect-ratio: 1; background: var(--cream); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-media img { transform: scale(1.06); }
.badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--red); color: #fff;
  font-family: var(--display); font-weight: 600; font-size: .8rem;
  padding: 5px 10px; border-radius: 999px;
}
.badge-gold { background: var(--gold); color: var(--ink); }
.badge-dark { background: var(--ink); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }
.card-cat { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--green); font-weight: 600; margin-bottom: 4px; }
.card-title { font-size: 1.08rem; font-weight: 600; margin-bottom: 14px; }
.card-title a { text-decoration: none; }
.card-title a:hover { color: var(--red); }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price { font-family: var(--display); font-weight: 700; font-size: 1.25rem; margin: 0; color: var(--ink); }
.price s { font-size: .8em; color: var(--muted); font-weight: 500; margin-left: 6px; }

/* ---------- Filtros ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.chip {
  padding: .5em 1.05em; border-radius: 999px;
  background: var(--cream); border: 1px solid var(--line);
  text-decoration: none; font-weight: 500; font-size: .92rem;
  transition: background .15s, color .15s;
}
.chip:hover { background: var(--gold-soft); }
.chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Regalos ---------- */
.gift-split { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.gift-col { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius); padding: 28px; }
.gift-col h3 { font-size: 1.6rem; color: var(--gold); }
.gift-col > p { color: rgba(255,255,255,.8); }
.mini-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mini-list a {
  display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 12px;
  padding: 8px; border-radius: var(--radius-sm); text-decoration: none;
  background: rgba(255,255,255,.06); transition: background .2s;
}
.mini-list a:hover { background: rgba(255,255,255,.14); }
.mini-list img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: #fff; }
.mini-list strong { font-family: var(--display); color: var(--gold); }

/* ---------- Cómo comprar ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: s; }
.steps li { padding: 26px; border-radius: var(--radius); background: var(--cream); border: 1px solid var(--line); }
.steps span {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--red); color: #fff; font-family: var(--display); font-weight: 700; font-size: 1.2rem; margin-bottom: 14px;
}
.steps p { color: var(--muted); margin: 0; }

/* ---------- FAQ / acordeón ---------- */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 20px; }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 28px 18px 0; position: relative;
  font-family: var(--display); font-weight: 600; font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--red); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--ink-soft); padding-bottom: 18px; margin: 0; }

/* ---------- Página de producto ---------- */
.breadcrumb { padding-top: 20px; font-size: .88rem; color: var(--muted); }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--red); }
.pdp { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 4vw, 56px); padding-top: 22px; padding-bottom: 40px; align-items: start; }
.gallery { position: sticky; top: 96px; }
.gallery-main { border-radius: var(--radius); overflow: hidden; background: var(--cream); aspect-ratio: 1; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; }
.thumb { flex: 0 0 80px; height: 80px; padding: 0; border: 2px solid transparent; border-radius: 12px; overflow: hidden; background: var(--cream); }
.thumb.is-active { border-color: var(--red); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.pdp-info h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.pdp-hook { font-size: 1.12rem; color: var(--ink-soft); }
.price-lg { font-size: 2rem; margin: 10px 0 18px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.save { background: var(--gold-soft); color: var(--ink); font-size: .9rem; padding: 4px 10px; border-radius: 999px; font-weight: 600; }
.benefits { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 10px; }
.benefits li { background: var(--cream); border-radius: var(--radius-sm); padding: 12px 16px; }
.urgency { color: var(--red); font-weight: 600; }
.buy-row { display: flex; gap: 10px; align-items: stretch; }
.grow { flex: 1; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.qty button { width: 42px; height: 100%; min-height: 44px; border: 0; background: none; font-size: 1.2rem; }
.qty input { width: 44px; border: 0; text-align: center; font: inherit; font-weight: 600; -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.qty-sm button { width: 32px; min-height: 32px; font-size: 1rem; }
.qty-sm span { min-width: 22px; text-align: center; font-weight: 600; }
.sold-out { padding: 14px 18px; background: var(--cream); border-radius: var(--radius-sm); font-weight: 600; }
.pdp-trust { list-style: none; padding: 16px 0; margin: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; gap: 6px; color: var(--ink-soft); font-size: .95rem; }

/* ---------- Footer ---------- */
.site-footer { background: #111; color: rgba(255,255,255,.75); padding: 56px 0 22px; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr 1fr 1.3fr; gap: 28px; }
.footer-logo { background: #fff; border-radius: 16px; padding: 10px; width: 140px; }
.site-footer h3 { color: #fff; font-size: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; }
.pay-list { font-size: .85rem; margin-top: 12px; }
.copyright { margin-top: 36px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.1); font-size: .82rem; }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 30;
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--wa); color: #fff; box-shadow: 0 10px 26px rgba(31,168,85,.45);
  transition: transform .2s;
}
.wa-float:hover { transform: scale(1.08); }

/* ---------- Drawer del carrito ---------- */
.drawer-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(10,20,14,.45); opacity: 0; transition: opacity .25s; }
.drawer-backdrop.is-open { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 60;
  width: min(440px, 100%); background: #fff;
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1);
  box-shadow: var(--shadow-lg);
  visibility: hidden;
}
.drawer.is-open { transform: translateX(0); visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 1.35rem; margin: 0; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--cream); font-size: 1rem; }
.drawer-step { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow-y: auto; }
.cart-items { padding: 6px 22px; }
.cart-item { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-item img { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; background: var(--cream); }
.ci-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ci-info a { font-weight: 600; text-decoration: none; line-height: 1.25; }
.ci-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.cart-empty { padding: 48px 22px; text-align: center; }
.drawer-foot { margin-top: auto; padding: 18px 22px 22px; border-top: 1px solid var(--line); background: #fff; position: sticky; bottom: 0; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.05rem; margin-bottom: 4px; }
.total-row strong { font-family: var(--display); font-size: 1.5rem; }
.checkout { padding: 18px 22px 0; gap: 12px; }
.checkout label, .checkout legend { display: grid; gap: 6px; font-weight: 600; font-size: .9rem; }
.checkout input, .checkout textarea {
  width: 100%; font: inherit; font-weight: 400; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fbfbfb;
}
.checkout input:focus, .checkout textarea:focus { outline: none; border-color: var(--green); background: #fff; box-shadow: 0 0 0 3px rgba(22,122,55,.15); }
.checkout fieldset { border: 0; padding: 0; margin: 0; }
.checkout .drawer-foot { margin: 6px -22px 0; }
.pay-options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.pay-option { display: inline-flex !important; align-items: center; gap: 8px; font-weight: 500 !important; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.pay-option input { width: auto; margin: 0; accent-color: var(--green); }
.pay-option:has(input:checked) { border-color: var(--green); background: rgba(22,122,55,.07); }
.form-error { background: #fdecec; color: var(--red-dark); padding: 10px 14px; border-radius: var(--radius-sm); font-size: .92rem; margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.done { padding: 40px 26px; text-align: center; justify-content: center; }
.done-icon { font-size: 3.4rem; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 70;
  transform: translate(-50%, 120px);
  visibility: hidden;
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px;
  font-weight: 500; box-shadow: var(--shadow-lg);
  transition: transform .3s cubic-bezier(.2,.8,.2,1), visibility .3s;
}
.toast.is-visible { transform: translate(-50%, 0); visibility: visible; }

/* ---------- Aparición ---------- */
.js-reveal .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js-reveal .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; margin: 0;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    padding: 8px 20px 16px;
    display: none;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .main-nav a::after { display: none; }
  .header-actions { margin-left: auto; }
  .menu-btn { display: flex; }
  .trust-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .pdp { grid-template-columns: 1fr; }
  .gallery { position: static; }
}
@media (max-width: 720px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 10px; }
  .hero-art { order: -1; }
  .hero-art img { width: 200px; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-ctas { justify-content: center; }
  .hero-ctas .btn { flex: 1 1 100%; }
  .gift-split { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card-body { padding: 12px; }
  .card-title { font-size: .95rem; }
  .card-foot { flex-direction: column; align-items: stretch; }
  .price { font-size: 1.1rem; }
  .btn-add { width: 100%; }
  .brand-name { font-size: 1.05rem; }
  .brand img { width: 38px; height: 38px; }
}
@media (max-width: 480px) {
  .trust-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .buy-row { flex-direction: column; }
  .qty { align-self: flex-start; }
}
