/* ===== Casa Andina · Tienda ===== */
:root {
  --red: #b3122a; --red-d: #7a0f1c; --green: #0f4d34; --green-d: #0a2e20; --gold: #d8a93b; --gold-l: #f3d27a;
  --ink: #1d1a17; --muted: #6b645c; --bg: #fbf7f0; --card: #fff; --line: #ebe3d6; --radius: 14px;
  --shadow: 0 6px 24px rgba(40, 20, 10, .08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: Georgia, "Times New Roman", serif;
}
.theme-clasico { --red: #a3222a; --red-d: #5e1418; --green: #1c1c1c; --green-d: #111; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.5; }
.theme-navidad { background: var(--bg) url("/img/patron-navidad.svg") repeat; background-size: 220px; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5em; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); } .small { font-size: .875rem; }
.skip { position: absolute; left: -9999px; } .skip:focus { left: 16px; top: 16px; z-index: 99; background: #fff; padding: 8px 12px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 999px; border: 2px solid transparent;
  font: 600 1rem var(--font); text-decoration: none; cursor: pointer; transition: transform .15s, background .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn--red { background: var(--red); color: #fff; } .btn--red:hover { background: var(--red-d); }
.btn--gold { background: linear-gradient(180deg, var(--gold-l), var(--gold)); color: #3a2400; box-shadow: 0 4px 14px rgba(216, 169, 59, .4); }
.btn--ghost { border-color: currentColor; color: #fff; background: transparent; }
.btn--wa { background: #1faa53; color: #fff; } .btn--wa svg { fill: #fff; stroke: none; }
.btn--block { width: 100%; } .btn--small { padding: 6px 14px; font-size: .9rem; }

/* Verificación de edad */
.agegate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(circle at 50% 30%, rgba(122, 15, 28, .96), rgba(10, 46, 32, .98)); }
.agegate[hidden] { display: none; }
.agegate__box { background: var(--green-d); color: #fff; border: 2px solid var(--gold); border-radius: 20px; padding: 32px 24px; max-width: 440px; text-align: center; }
.agegate__box img { margin: 0 auto 12px; }
.agegate__actions { display: grid; gap: 10px; margin: 20px 0 14px; }
.agegate small { letter-spacing: .12em; font-size: .7rem; color: var(--gold-l); }

/* Encabezado */
.announce { background: var(--red); color: #fff; text-align: center; font-size: .9rem; font-weight: 600; padding: 7px 12px; }
.header { background: var(--green-d); color: #fff; position: sticky; top: 0; z-index: 30; box-shadow: 0 2px 12px rgba(0, 0, 0, .25); }
.header__in { display: flex; align-items: center; gap: 20px; min-height: 76px; }
.logo img { width: 118px; height: auto; }
.nav { display: flex; gap: 4px; }
.nav a { color: #fff; text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: .95rem; white-space: nowrap; }
.nav a:hover, .nav a.is-active { background: rgba(255, 255, 255, .12); color: var(--gold-l); }
.search { flex: 1; display: flex; background: #fff; border-radius: 999px; overflow: hidden; min-width: 0; max-width: 380px; margin-left: auto; }
.search input { flex: 1; border: 0; padding: 10px 16px; font: inherit; min-width: 0; outline: none; }
.search button { border: 0; background: var(--gold); padding: 0 14px; cursor: pointer; color: #3a2400; }
.cartlink { position: relative; color: #fff; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.cartlink svg { width: 24px; height: 24px; }
.cartlink__n { position: absolute; top: -4px; right: -4px; background: var(--red); color: #fff; border: 2px solid var(--green-d); min-width: 22px; height: 22px; border-radius: 11px; font-size: .75rem; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
.cartlink__n[hidden] { display: none; }
.header__menu { display: none; background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; }

/* Luces navideñas */
.lights { display: flex; justify-content: space-between; height: 18px; overflow: hidden; padding: 0 8px;
  background: linear-gradient(var(--green-d), var(--green-d)) top / 100% 2px no-repeat; }
.lights i { width: 9px; height: 13px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; margin-top: 2px; background: var(--gold-l); box-shadow: 0 0 10px 2px var(--gold-l); animation: blink 1.6s infinite ease-in-out; }
.lights i:nth-child(3n+1) { background: #ff4d5e; box-shadow: 0 0 10px 2px #ff4d5e; animation-delay: .4s; }
.lights i:nth-child(3n+2) { background: #43d17a; box-shadow: 0 0 10px 2px #43d17a; animation-delay: .8s; }
@keyframes blink { 50% { opacity: .35; box-shadow: none; } }

/* Nieve */
.snow { position: fixed; inset: 0; pointer-events: none; z-index: 20; overflow: hidden; }
.snow span { position: absolute; top: -12px; color: #fff; text-shadow: 0 0 4px rgba(0, 0, 0, .25); animation: fall linear infinite; opacity: .85; user-select: none; }
@keyframes fall { to { transform: translate3d(var(--drift, 30px), 105vh, 0) rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .snow, .lights i { animation: none !important; } .snow { display: none; } }

/* Hero */
.hero { color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(circle at 80% 20%, rgba(243, 210, 122, .28), transparent 40%), linear-gradient(135deg, var(--red-d) 0%, var(--red) 45%, var(--green) 100%); }
.theme-navidad .hero::after { content: ""; position: absolute; inset: auto 0 0; height: 46px; background: url("/img/nieve-borde.svg") repeat-x bottom / auto 46px; }
.hero__in { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; padding: 56px 0 72px; }
.kicker { display: inline-block; background: rgba(0, 0, 0, .25); border: 1px solid var(--gold); color: var(--gold-l); border-radius: 999px; padding: 4px 14px; font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); margin: 16px 0 12px; text-shadow: 0 3px 18px rgba(0, 0, 0, .3); }
.hero p { font-size: 1.15rem; max-width: 34em; opacity: .95; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero__cta .btn--ghost svg { fill: #fff; stroke: none; }
.hero__art { position: relative; min-height: 360px; }
.hero__bottle { position: absolute; width: 58%; border-radius: 18px; border: 4px solid var(--gold); box-shadow: 0 18px 40px rgba(0, 0, 0, .4); }
.hero__bottle--0 { left: 0; top: 20px; transform: rotate(-6deg); }
.hero__bottle--1 { right: 0; top: 0; transform: rotate(5deg); }
.hero__bottle--2 { left: 22%; top: 120px; z-index: 2; }
.hero__single { border-radius: 18px; border: 4px solid var(--gold); margin-left: auto; max-width: 460px; }

.perks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: -30px; position: relative; z-index: 2; }
.perks div { background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); border-top: 4px solid var(--gold); }
.perks strong, .perks span { display: block; } .perks span { color: var(--muted); font-size: .9rem; }

.cats { display: flex; gap: 10px; overflow-x: auto; padding: 28px 0 4px; scrollbar-width: thin; }
.cat { flex: 0 0 auto; background: var(--green); color: #fff; text-decoration: none; border-radius: 999px; padding: 10px 18px; display: flex; gap: 8px; align-items: baseline; font-weight: 700; }
.cat:nth-child(odd) { background: var(--red); }
.cat small { font-weight: 400; opacity: .8; }

.section { padding: 32px 0; }
.section__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.section__head h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin: 0; }
.section__head a { font-weight: 700; white-space: nowrap; }

/* Tarjetas */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; border: 1px solid var(--line); transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(40, 20, 10, .14); }
.card.is-out { opacity: .7; }
.card__img { position: relative; display: block; aspect-ratio: 1; background: #120e1e; }
.card__img img { width: 100%; height: 100%; object-fit: cover; }
.card__badges { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.badge { font-size: .75rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; color: #fff; }
.badge--off { background: var(--red); } .badge--low { background: #e07b00; } .badge--out { background: #444; }
.ribbon { position: absolute; right: 10px; bottom: 10px; display: inline-flex; gap: 6px; align-items: center; background: var(--gold); color: #3a2400; font-weight: 800; font-size: .8rem; padding: 5px 10px; border-radius: 999px; }
.ribbon svg { width: 16px; height: 16px; }
.ribbon--big { font-size: 1rem; padding: 8px 14px; }
.card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card__cat { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--green); font-weight: 800; }
.card__name { font-family: var(--font); font-size: 1.02rem; font-weight: 700; margin: 0; }
.card__name a { color: var(--ink); text-decoration: none; } .card__name a:hover { color: var(--red); }
.card__meta { margin: 0; color: var(--muted); font-size: .85rem; }
.card__price { margin-top: auto; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding-bottom: 6px; }
.card__price strong { font-size: 1.4rem; color: var(--red); }
.card__price s { color: var(--muted); } .card__price small { width: 100%; color: var(--green); font-weight: 600; }

.mayorista { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 28px; border-radius: 20px; color: #fff;
  background: linear-gradient(120deg, var(--green-d), var(--green)); border: 2px solid var(--gold); }
.mayorista p { margin: 0; max-width: 40em; opacity: .9; }

/* Catálogo */
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 16px; } .crumbs a { color: var(--muted); }
.catalog { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: start; }
.filters { background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); position: sticky; top: 110px; }
.filters h2 { font-family: var(--font); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; background: var(--green-d); color: #fff; margin: -16px -16px 10px; padding: 12px 16px; border-radius: var(--radius) var(--radius) 0 0; }
.filters a { display: flex; justify-content: space-between; padding: 8px 6px; color: var(--ink); text-decoration: none; border-radius: 8px; font-weight: 600; }
.filters a:hover { background: var(--bg); } .filters a.is-active { color: var(--red); background: #fdeef0; }
.filters small { color: var(--muted); font-weight: 400; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar h1 { font-size: 1.6rem; margin: 0; } .toolbar h1 small { font-family: var(--font); font-size: 1rem; color: var(--muted); }
.sort select { font: inherit; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); margin-left: 6px; background: #fff; }
.empty { text-align: center; padding: 40px 16px; }

/* Ficha */
.pdp { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; }
.pdp__img { position: relative; border-radius: 20px; overflow: hidden; background: #120e1e; box-shadow: var(--shadow); }
.pdp__img img { width: 100%; }
.pdp__info h1 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin-top: 6px; }
.pdp__badges { display: flex; gap: 8px; margin-bottom: 10px; }
.pdp__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: 10px 0 16px; }
.pdp__price strong { font-size: 2.4rem; color: var(--red); font-family: var(--display); }
.pdp__price s { color: var(--muted); font-size: 1.2rem; }
.pdp__price span { width: 100%; color: var(--green); font-weight: 700; }
.pdp__desc { font-size: 1.05rem; }
.pdp__facts { padding: 16px 16px 16px 34px; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); }
.pdp__facts li { margin: 4px 0; }
.pdp__buy { display: flex; gap: 12px; margin: 18px 0 12px; flex-wrap: wrap; }
.pdp__buy .btn { flex: 1; min-width: 180px; }
.qty { display: inline-flex; border: 2px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.qty button { width: 42px; border: 0; background: none; font-size: 1.3rem; cursor: pointer; }
.qty input { width: 54px; text-align: center; border: 0; font: 700 1.05rem var(--font); -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Carrito y checkout */
.cartpage { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: start; }
.cartline { display: grid; grid-template-columns: 80px 1fr auto; gap: 14px; align-items: center; background: #fff; padding: 12px; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 10px; }
.cartline img { width: 80px; height: 80px; object-fit: cover; border-radius: 10px; }
.cartline h3 { font-family: var(--font); font-size: 1rem; margin: 0 0 4px; } .cartline h3 a { color: var(--ink); text-decoration: none; }
.cartline .price { font-weight: 800; color: var(--red); text-align: right; }
.cartline .remove { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: .85rem; padding: 0; margin-left: 8px; }
.cartline .qty button { width: 34px; } .cartline .qty input { width: 40px; font-size: .95rem; }
.checkout, .form { background: #fff; border-radius: 20px; padding: 22px; box-shadow: var(--shadow); display: grid; gap: 12px; border-top: 5px solid var(--red); }
.checkout[hidden] { display: none; }
.checkout h2 { font-size: 1.4rem; margin: 0; }
label { display: grid; gap: 4px; font-weight: 600; font-size: .92rem; }
input, select, textarea { font: inherit; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px rgba(15, 77, 52, .15); }
.radios { border: 0; padding: 0; margin: 0; display: flex; gap: 16px; flex-wrap: wrap; }
.radios legend { font-weight: 600; font-size: .92rem; margin-bottom: 4px; }
.radios label, .check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.radios input, .check input { width: auto; }
.totals { border-top: 2px dashed var(--line); padding-top: 10px; }
.totals div { display: flex; justify-content: space-between; }
.totals .total { font-size: 1.3rem; font-weight: 800; color: var(--red); }
.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-weight: 600; }
.alert--error { background: #fdecee; color: #8a0f20; border: 1px solid #f3b9c0; }
.alert--ok { background: #e9f7ef; color: #135c35; border: 1px solid #b6e2c7; }
.done { text-align: center; background: #fff; border-radius: 20px; padding: 32px 22px; box-shadow: var(--shadow); border-top: 6px solid var(--gold); }
.done__icon { font-size: 3rem; }
.code { font-size: 1.3rem; color: var(--red); letter-spacing: .05em; }
.summary { width: 100%; border-collapse: collapse; margin: 20px 0; text-align: left; }
.summary td { padding: 8px 4px; border-bottom: 1px solid var(--line); } .summary td:last-child { text-align: right; white-space: nowrap; }
.summary__total td { font-weight: 800; font-size: 1.15rem; border-bottom: 0; }
.prose ul { padding-left: 20px; }

/* Pie */
.footer { margin-top: 48px; background: var(--green-d); color: #e8e2d6; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; padding: 40px 0; }
.footer h3 { color: var(--gold-l); font-family: var(--font); font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; }
.footer a { color: #fff; } .footer p { margin: 6px 0; }
.footer__legal { background: #000; color: #fff; text-align: center; padding: 14px 16px; display: grid; gap: 4px; font-size: .85rem; }
.footer__legal strong { letter-spacing: .25em; font-size: .8rem; }
.wafloat { position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 58px; height: 58px; border-radius: 50%; background: #1faa53; display: grid; place-items: center; box-shadow: 0 8px 22px rgba(0, 0, 0, .3); }
.wafloat svg { width: 32px; height: 32px; fill: #fff; stroke: none; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 220%); visibility: hidden; background: var(--green-d); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 700; z-index: 60; transition: transform .25s; border: 2px solid var(--gold); max-width: calc(100% - 32px); }
.toast.is-on { transform: translate(-50%, 0); visibility: visible; }

/* Responsive */
@media (max-width: 960px) {
  .header__menu { display: block; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--green-d); padding: 8px 16px 16px; display: none; border-top: 1px solid rgba(255, 255, 255, .1); }
  .nav.is-open { display: flex; }
  .header__in { flex-wrap: wrap; gap: 10px 14px; padding: 8px 0; }
  .search { order: 5; flex-basis: 100%; max-width: none; }
  .cartlink { margin-left: auto; }
  .hero__in, .pdp, .cartpage, .catalog { grid-template-columns: 1fr; }
  .hero__art { min-height: 280px; max-width: 420px; width: 100%; margin: 0 auto; }
  .perks { grid-template-columns: repeat(2, 1fr); }
  .filters { position: static; display: flex; flex-wrap: wrap; gap: 6px; padding: 12px; }
  .filters h2 { display: none; }
  .filters a { background: var(--bg); padding: 6px 12px; border-radius: 999px; gap: 6px; }
  .footer__grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .logo img { width: 96px; }
  .hero__in { padding: 36px 0 60px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card__body { padding: 10px; } .card__name { font-size: .9rem; } .card__price strong { font-size: 1.1rem; }
  .card .btn { padding: 10px 8px; font-size: .85rem; }
  .perks { grid-template-columns: 1fr 1fr; gap: 8px; } .perks div { padding: 10px; font-size: .85rem; }
  .cartline { grid-template-columns: 64px 1fr; } .cartline img { width: 64px; height: 64px; } .cartline .price { grid-column: 2; text-align: left; }
}
