/* ==========================================================
   MATDISCOL · Estilos base y componentes compartidos
   ========================================================== */
:root {
  /* Estilo: lienzo blanco, tinta casi negra y un solo acento (rojo Matdiscol).
     Referencia completa en docs/DESIGN-referencia.md */
  --ink: #080808;          /* texto principal */
  --ink-2: #222222;        /* superficie oscura */
  --ink-3: #171717;        /* pie de página */
  --charcoal: #292929;
  --paper: #ffffff;        /* lienzo */
  --paper-2: #f0f0f0;      /* bandas y fondos sutiles */
  --card: #ffffff;
  --muted: #5a5a5a;
  --line: #d8d8d8;
  --line-2: #bdbdbd;
  --red: #e2001a;          /* único color de acento */
  --red-2: #ff4d61;        /* acento sobre fondos oscuros */
  --red-deep: #c10016;     /* hover del acento */
  --red-soft: #fdeef0;
  --brown: #7d6b62;        /* solo para el logotipo */
  --brown-dark: #53463d;
  --brown-light: #a89890;
  --wa: #1fa855;
  --ok: #1f8a4c;

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-brand: "Nunito", system-ui, sans-serif;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.7, 0, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);

  --r-sm: 4px;             /* botones, campos, etiquetas */
  --r: 8px;                /* tarjetas, imágenes */
  --r-lg: 8px;
  --gutter: clamp(16px, 4vw, 40px);
  --shadow: rgba(0, 0, 0, .01) 0 54px 22px, rgba(0, 0, 0, .04) 0 30px 18px, rgba(0, 0, 0, .08) 0 13px 13px, rgba(0, 0, 0, .09) 0 3px 7px;
  --shadow-lg: rgba(0, 0, 0, .02) 0 67px 27px, rgba(0, 0, 0, .06) 0 38px 23px, rgba(0, 0, 0, .1) 0 17px 17px, rgba(0, 0, 0, .12) 0 4px 9px;
  --shadow-float: rgba(0, 0, 0, .01) 0 148px 42px, rgba(0, 0, 0, .04) 0 95px 38px, rgba(0, 0, 0, .15) 0 53px 32px, rgba(0, 0, 0, .26) 0 24px 24px, rgba(0, 0, 0, .29) 0 6px 13px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 150px; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper); line-height: 1.6; font-size: 16px; font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; overflow-x: clip; }
body.locked { overflow: hidden; }
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.12; margin: 0; letter-spacing: -.015em; font-weight: 600; }
p { margin: 0; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i-wa { fill: currentColor; stroke: none; }
.i-wa path { fill-rule: evenodd; }
:focus-visible { outline: 2.5px solid var(--red); outline-offset: 2px; }
.wrap { width: 100%; max-width: 1248px; margin: 0 auto; padding: 0 var(--gutter); }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 1px; background: var(--red); }
.link { color: var(--ink); font-weight: 500; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; display: inline-flex; align-items: center; gap: 6px; }
.link svg { width: 16px; height: 16px; transition: transform .35s var(--ease-out); }
.link:hover { text-decoration-color: var(--red); }
.link:hover svg { transform: translateX(4px); }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: var(--r-sm); font-weight: 500; font-size: 14px; line-height: 1.2; white-space: nowrap; border: 1.5px solid transparent; transition: background .25s, color .25s, border-color .25s, transform .3s var(--ease-out), box-shadow .3s; }
.btn svg { width: 18px; height: 18px; flex: none; transition: transform .35s var(--ease-out); }
.btn:hover svg:last-child:not(:first-child) { transform: translateX(3px); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-deep); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-3); }
.btn-ghost { border-color: var(--line); background: var(--card); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--paper-2); }
.btn-outline-light { border-color: rgba(255, 255, 255, .4); color: #fff; }
.btn-outline-light:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: #178a45; }
.btn-sm { padding: 8px 12px; font-size: 13px; }
.btn-sm svg { width: 16px; height: 16px; }
.btn-lg { padding: 15px 24px; font-size: 15px; }
.btn-block { width: 100%; }
.icon-btn { width: 40px; height: 40px; border-radius: var(--r-sm); display: grid; place-items: center; transition: background .2s; flex: none; }
.icon-btn:hover { background: var(--paper-2); }
.icon-btn svg { width: 20px; height: 20px; }

/* ---------- Revelado ---------- */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease-out), transform 1s var(--ease-out); transition-delay: var(--d, 0s); }
[data-reveal].in { opacity: 1; transform: none; }

/* ---------- Secciones ---------- */
.section { padding: 80px 0; }
.section-sm { padding: 56px 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(32px, 3.4vw, 40px); line-height: 1.04; letter-spacing: -.01em; max-width: 22ch; }
.section-head p { color: var(--muted); max-width: 58ch; margin-top: 14px; font-size: 18px; line-height: 1.5; }
.bg-white { background: var(--paper-2); }

/* ---------- Isotipo CM ---------- */
.cm { width: 100%; height: 100%; overflow: visible; }
.cm-c, .cm-o { fill: none; stroke-width: 52; stroke-dasharray: 268 360; }
.cm-c { stroke: var(--cm-c, var(--red)); }
.cm-o { stroke: var(--cm-o, #4f4239); }
.cm-m { fill: var(--cm-m, url(#cmGrad)); stroke: none; }
.cm.draw .cm-c, .cm.draw .cm-o { animation: cmDraw 1.8s var(--ease-in-out) both; animation-delay: var(--cm-delay, .3s); }
.cm.draw .cm-m { transform-box: fill-box; transform-origin: 50% 100%; animation: cmRise 1.1s var(--ease-out) both; animation-delay: var(--cm-delay, .3s); }
@keyframes cmDraw { from { stroke-dashoffset: 268; } to { stroke-dashoffset: 0; } }
@keyframes cmRise { from { transform: translateY(18%) scaleY(.7); opacity: 0; } }

.logo { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.logo-mark { width: 34px; height: 43px; display: block; transition: transform .7s var(--spring); }
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.06); }
.wordmark { display: grid; line-height: 1; }
.wordmark b { font-family: var(--font-brand); font-weight: 900; font-size: 1.5rem; letter-spacing: -.02em; background: linear-gradient(90deg, var(--brown) 0%, var(--brown-dark) 30%, var(--brown-light) 62%, var(--brown-dark) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wordmark small { font-size: .56rem; font-weight: 700; letter-spacing: .52em; text-transform: uppercase; color: var(--red); margin-top: 4px; padding-left: 2px; }
.logo-light { --cm-m: #d8cec7; --cm-o: #8a7a70; }
.logo-light .wordmark b { background: linear-gradient(90deg, #efe9e5, #b9aba2 60%, #efe9e5); -webkit-background-clip: text; background-clip: text; }

/* ==========================================================
   ENCABEZADO
   ========================================================== */
.topbar { background: var(--red); color: rgba(255, 255, 255, .9); font-size: 13px; font-weight: 500; }
.topbar-in { display: flex; align-items: center; gap: 22px; height: 38px; }
.topbar svg { width: 15px; height: 15px; color: #fff; }
.tb-sede { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 600; padding: 4px 0; }
.tb-sede u { text-decoration: none; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: var(--r-sm); background: rgba(255, 255, 255, .18); transition: background .2s, color .2s; }
.tb-sede:hover u { background: #fff; color: var(--red); }
.tb-item { display: inline-flex; align-items: center; gap: 7px; }
a.tb-item:hover { color: #fff; }
.tb-links { margin-left: auto; display: flex; gap: 20px; }
.tb-links a:hover { color: #fff; }

.header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .97); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.header.scrolled { border-bottom-color: var(--line); }
.header-in { display: flex; align-items: center; gap: 28px; height: 68px; }
.hd-menu { display: none; width: 42px; height: 42px; border-radius: var(--r-sm); flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.hd-menu span { width: 20px; height: 2px; background: currentColor; border-radius: 2px; }

.hsearch { position: relative; flex: 1; max-width: 560px; display: flex; height: 44px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper-2); transition: border-color .25s, box-shadow .3s, background .25s; }
.hsearch:focus-within { border-color: var(--ink); background: #fff; }
.hsearch input { flex: 1; border: 0; outline: 0; background: transparent; padding: 0 14px; font-size: 14px; min-width: 0; }
.hsearch input::-webkit-search-cancel-button { display: none; }
.hsearch > button { width: 44px; margin: 3px; border-radius: 3px; background: var(--ink); color: #fff; display: grid; place-items: center; transition: background .2s; }
.hsearch > button:hover { background: var(--red); }
.hsearch > button svg { width: 19px; height: 19px; }
.hsearch-drop { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: #fff; border-radius: var(--r); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; z-index: 5; animation: dropIn .3s var(--ease-out); }
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } }
.sg-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; transition: background .15s; }
.sg-item:hover { background: var(--paper); }
.sg-item b { display: block; font-size: .9rem; }
.sg-item small { color: var(--muted); font-size: .78rem; }
.sg-ico { width: 38px; height: 38px; border-radius: var(--r-sm); display: grid; place-items: center; flex: none; }
.sg-ico svg { width: 20px; height: 20px; }
.sg-all { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; font-weight: 500; font-size: 13px; color: var(--ink); border-top: 1px solid var(--line); }
.sg-all svg { width: 16px; height: 16px; }
.sg-empty { padding: 16px; color: var(--muted); font-size: .9rem; }

.hd-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.hd-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--r-sm); transition: background .2s; text-align: left; }
.hd-item:hover { background: var(--paper); }
.hd-item > svg { width: 26px; height: 26px; }
.hd-item small { display: block; font-size: .72rem; color: var(--muted); line-height: 1.2; }
.hd-item b { display: block; font-size: 14px; font-weight: 500; line-height: 1.3; white-space: nowrap; }
/* Cuenta del usuario en la cabecera */
.hd-login > svg { width: 24px; height: 24px; }
.hd-user { position: relative; }
.hd-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 16px; flex: none; }
.hd-uname { letter-spacing: .04em; }
.hd-umenu { position: absolute; right: 0; top: calc(100% + 8px); width: 260px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 6px; z-index: 60; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .2s, transform .3s var(--ease-out), visibility .2s; }
.hd-user.open .hd-umenu { opacity: 1; visibility: visible; transform: none; }
.hu-head { padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.hu-head b { display: block; font-size: 14px; }
.hu-head small { color: var(--muted); font-size: 12px; }
.hd-umenu a, .hd-umenu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border-radius: var(--r-sm); font-size: 14px; text-align: left; }
.hd-umenu a:hover, .hd-umenu button:hover { background: var(--paper-2); }
.hd-umenu svg { width: 17px; height: 17px; color: var(--muted); }
/* Precios */
.pprice { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.pprice b { font-size: 18px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.pprice s { font-size: 13px; color: var(--muted); }
.pprice small { flex-basis: 100%; font-size: 12px; color: var(--muted); }
.pdesc, .pfer { font-style: normal; font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 2px 6px; border-radius: var(--r-sm); background: var(--red); color: #fff; }
.pfer { background: var(--ink); }
.pprice.lg b { font-size: 32px; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; }
.cart-total:empty { display: none; }
.cart-total b { font-size: 20px; font-weight: 600; }
.hd-cart-ico { position: relative; width: 42px; height: 42px; border-radius: var(--r-sm); background: var(--ink); color: #fff; display: grid; place-items: center; flex: none; }
.hd-cart-ico > svg { width: 21px; height: 21px; }
.hd-cart-ico.bump { animation: bump .6s var(--spring); }
@keyframes bump { 40% { transform: scale(1.2) rotate(-6deg); } 70% { transform: scale(.94); } }
.cart-count { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: var(--r-sm); background: var(--red); color: #fff; font-style: normal; font-size: 10px; font-weight: 600; display: grid; place-items: center; border: 2px solid #fff; transform: scale(0); transition: transform .45s var(--spring); }
.cart-count.show { transform: scale(1); }

.mainnav { border-top: 1px solid var(--paper-2); }
.mainnav-in { display: flex; align-items: center; gap: 4px; height: 46px; }
.mn-link { position: relative; display: inline-flex; align-items: center; gap: 4px; height: 46px; padding: 0 12px; font-weight: 400; font-size: 14px; color: var(--ink); transition: color .2s; white-space: nowrap; }
.mn-link svg { width: 15px; height: 15px; transition: transform .3s; }
.mn-link::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 12px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease-out); }
.mn-link:hover::after { transform: scaleX(1); }
.mn-link.active { color: var(--red); font-weight: 500; }
.mn-cta { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: var(--r-sm); background: var(--red); color: #fff; font-weight: 500; font-size: 14px; transition: background .2s, color .2s; white-space: nowrap; }
.mn-cta:hover, .mn-cta.active { background: var(--red-deep); color: #fff; }
.mn-cta svg { width: 16px; height: 16px; }
.mn-drop { position: relative; }
.mn-drop:hover .mn-link svg, .mn-drop:focus-within .mn-link svg { transform: rotate(180deg); }
.mega { position: absolute; top: calc(100% - 4px); left: 0; width: min(720px, 90vw); background: #fff; border-radius: var(--r); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 12px; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .25s, transform .35s var(--ease-out), visibility .25s; }
.mn-drop:hover .mega, .mn-drop:focus-within .mega { opacity: 1; visibility: visible; transform: none; }
.mega-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.mega-item { display: flex; gap: 12px; padding: 12px; border-radius: var(--r-sm); transition: background .2s; }
.mega-item:hover { background: var(--paper); }
.mega-item b { display: block; font-size: 14px; font-weight: 600; }
.mega-item small { color: var(--muted); font-size: .8rem; line-height: 1.4; display: block; }
.mega-ico { width: 42px; height: 42px; border-radius: var(--r-sm); display: grid; place-items: center; flex: none; transition: transform .4s var(--spring); }
.mega-item:hover .mega-ico { transform: rotate(-6deg) scale(1.06); }
.mega-ico svg { width: 22px; height: 22px; }
.mega-all { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding: 14px 12px 6px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 500; }
.mega-all:hover { color: var(--red); }
.mega-all svg { width: 18px; height: 18px; }

/* Miniaturas de categoría: acromáticas, el acento solo aparece en la interacción */
[data-cat] { --cat: #f0f0f0; --cat-i: #080808; }
.mega-ico[data-cat], .sg-ico[data-cat], .ci-ico[data-cat], .bp-ico[data-cat] { background: var(--cat); color: var(--cat-i); }

/* ---------- Menú móvil ---------- */
.drawer, .cart-drawer { position: fixed; inset: 0; z-index: 80; }
.drawer[hidden], .cart-drawer[hidden] { display: none; }
.drawer-bg { position: absolute; inset: 0; background: rgba(29, 24, 21, .5); opacity: 0; transition: opacity .35s; }
.drawer.open .drawer-bg, .cart-drawer.open .drawer-bg { opacity: 1; }
.drawer-panel { position: absolute; top: 0; bottom: 0; left: 0; width: min(360px, 88vw); background: #fff; padding: 18px; overflow-y: auto; transform: translateX(-100%); transition: transform .45s var(--ease-out); display: flex; flex-direction: column; gap: 14px; }
.drawer.open .drawer-panel { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; }
.drawer-sede { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r); background: var(--red); color: #fff; font-size: .9rem; text-align: left; }
.drawer-sede svg { width: 18px; height: 18px; color: #fff; }
.drawer-sede u { margin-left: auto; text-decoration: none; font-size: .75rem; font-weight: 700; background: rgba(255, 255, 255, .14); padding: 3px 9px; border-radius: 99px; }
.drawer nav { display: grid; }
.drawer nav a { display: flex; justify-content: space-between; align-items: center; padding: 14px 6px; border-bottom: 1px solid var(--line); font-weight: 500; }
.drawer nav a svg { width: 16px; height: 16px; color: var(--muted); }
.drawer nav a.active { color: var(--red); }
.drawer nav .drawer-cta { margin-top: 14px; justify-content: center; gap: 8px; border: 0; border-radius: var(--r-sm); background: var(--red); color: #fff; }
.drawer nav .drawer-cta svg { color: #fff; }
.drawer-cats-t { font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.drawer-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.drawer-cats a { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: var(--r-sm); background: var(--paper); font-size: .85rem; font-weight: 600; }
.drawer-cats svg { width: 18px; height: 18px; }

/* ==========================================================
   PIE DE PÁGINA
   ========================================================== */
.footer { background: var(--ink-3); color: rgba(255, 255, 255, .6); font-size: 14px; }
.footer-cta { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding: 48px 0; margin-bottom: 48px; border-bottom: 1px solid rgba(255, 255, 255, .12); color: #fff; position: relative; }
.footer-cta h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.04; letter-spacing: -.01em; }
.footer-cta p { color: rgba(255, 255, 255, .6); margin-top: 10px; font-size: 18px; }
.footer-cta-btns { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 44px; }
.footer-brand p { margin-top: 16px; max-width: 34ch; }
.footer h3 { color: #fff; font-size: 13px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 16px; }
.footer-grid > div > a { display: block; padding: 4px 0; transition: color .2s; }
.footer-grid a:hover { color: #fff; }
.footer-sede { margin-bottom: 14px; }
.footer-sede b { color: #fff; display: block; }
.footer-sede span, .footer-sede a { display: block; font-size: .84rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 0; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .8rem; color: rgba(255, 255, 255, .5); }

/* ==========================================================
   PANTALLA DE ENTRADA (elegir sede)
   ========================================================== */
.gating body > :not(.gate) { visibility: hidden; }
.gating, .gating body { background: #0b0b0c; }
.gate { position: fixed; inset: 0; z-index: 90; background: #fff; overflow-y: auto; overscroll-behavior: contain; }
.gate[hidden] { display: none; }
.gate:focus { outline: none; }
.gate.closing { animation: gateOut .38s var(--ease-in-out) forwards; }
@keyframes gateOut { to { opacity: 0; transform: scale(1.01); } }
@keyframes up { from { opacity: 0; transform: translateY(16px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
.gate-in { min-height: 100%; }
/* Pantalla de inicio: fondo oscuro con curvas de nivel y tres tarjetas, una por sede */
.gate { background: #0b0b0c; color: #fff; }
.gx { position: relative; isolation: isolate; display: flex; flex-direction: column; min-height: 100vh; padding: 0 clamp(20px, 4vw, 64px); overflow: hidden; }
.gx-topo { position: absolute; inset: -4%; z-index: -2; width: 108%; height: 108%; fill: none; stroke: rgba(255, 255, 255, .055); stroke-width: 1; animation: topoIn 2.4s ease both, topoDrift 38s ease-in-out 2.4s infinite alternate; will-change: transform; }
@keyframes topoIn { from { opacity: 0; transform: scale(1.04); } }
@keyframes topoDrift { to { transform: translate3d(-1.6%, 1.2%, 0) scale(1.03); } }
/* Resplandor rojo que se ubica detrás de la tarjeta activa */
.gx-glow { position: absolute; z-index: -1; left: 50%; bottom: -38vh; width: 70vw; height: 70vh; margin-left: -35vw; border-radius: 50%; background: radial-gradient(closest-side, rgba(226, 0, 26, .30), rgba(226, 0, 26, .08) 55%, transparent); opacity: .35; transition: transform 1.1s var(--ease-out), opacity .8s; pointer-events: none; }
.gx:has(.gx-cards li:nth-child(1) .gx-card:hover) .gx-glow { transform: translateX(-30vw); opacity: 1; }
.gx:has(.gx-cards li:nth-child(2) .gx-card:hover) .gx-glow { transform: translateX(0); opacity: 1; }
.gx:has(.gx-cards li:nth-child(3) .gx-card:hover) .gx-glow { transform: translateX(30vw); opacity: 1; }

.gx-top { display: flex; justify-content: space-between; align-items: center; height: 84px; flex: none; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.gx-top .logo-mark { --cm-delay: .15s; }
.gx-since { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: rgba(255, 255, 255, .55); animation: fade .8s ease .5s both; }
.gx-since i { width: 6px; height: 6px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(226, 0, 26, .2); }
.gx-close { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .18); color: #fff; font-size: 14px; transition: background .25s, border-color .25s; }
.gx-close:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .35); }
.gx-close svg { width: 16px; height: 16px; }

.gx-head { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: clamp(28px, 6vh, 72px) 0 clamp(24px, 4vh, 48px); }
.gx-eyebrow { font-size: 13px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: rgba(255, 255, 255, .5); animation: up .8s var(--ease-out) .1s both; }
.gx-title { margin-top: 14px; font-size: clamp(56px, 9vw, 140px); line-height: .92; letter-spacing: -.055em; font-weight: 600; }
/* El recorte deja espacio para las letras que bajan de la línea (la "g" de Elige) */
.gx-title .w { display: inline-block; overflow: hidden; padding: .04em .02em .22em; margin: -.04em -.02em -.22em; vertical-align: top; }
.gx-title .w > span { display: inline-block; animation: wordRise 1.1s var(--ease-out) both; }
.gx-title .w:nth-child(2) > span { animation-delay: .07s; }
.gx-title .w:nth-child(3) > span { animation-delay: .14s; }
@keyframes wordRise { from { transform: translateY(120%); } }
.gx-red { color: var(--red); }
.gx-sub { margin-top: 22px; max-width: 560px; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.5; color: rgba(255, 255, 255, .6); animation: up .9s var(--ease-out) .35s both; }

/* Tarjetas */
.gx-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; list-style: none; margin: 0; padding: 0; flex: none; }
.gx-cards li { display: flex; animation: cardIn 1s var(--ease-out) both; animation-delay: calc(.45s + var(--i) * .09s); }
@keyframes cardIn { from { opacity: 0; transform: translateY(36px); } }
.gx-card { --mx: 50%; --my: 50%; position: relative; isolation: isolate; overflow: hidden; flex: 1; display: flex; flex-direction: column; text-align: left; min-height: 280px; padding: 24px 26px 22px; color: #fff; border-radius: 10px; background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .1); transition: border-color .4s, background .4s, transform .6s var(--ease-out), opacity .4s; }
.gx-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(420px circle at var(--mx) var(--my), rgba(226, 0, 26, .22), transparent 60%); opacity: 0; transition: opacity .5s; }
.gx-card::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease-out); }
.gx-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.gx-n { display: grid; gap: 8px; font: 500 12px/1 ui-monospace, "JetBrains Mono", Menlo, monospace; color: rgba(255, 255, 255, .45); }
.gx-n em { font: 500 12px/1 var(--font); font-style: normal; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.current .gx-n em { color: var(--red-2); }
.gx-city { margin-top: auto; padding-top: 28px; font-size: clamp(40px, 4.4vw, 68px); font-weight: 600; letter-spacing: -.045em; line-height: 1; white-space: nowrap; transition: transform .6s var(--ease-out); }
.gx-city .ch { display: inline-block; }
@keyframes chWave { 0% { transform: translateY(0); } 35% { transform: translateY(-12%); color: var(--red-2); } 100% { transform: translateY(0); } }
/* Los productos aparecen en el lugar del nombre (que sube): la tarjeta no cambia de tamaño */
.gx-more { position: absolute; left: 26px; right: 26px; bottom: 84px; pointer-events: none; }
.gx-more-in { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
.gx-prods { display: flex; flex-wrap: nowrap; gap: 6px; opacity: 0; transform: translateY(10px); transition: opacity .35s, transform .5s var(--ease-out); }
.gx-prods i { font-style: normal; font-size: 12.5px; color: rgba(255, 255, 255, .8); padding: 5px 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .04); white-space: nowrap; }
.gx-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .1); }
.gx-meta { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 13px; color: rgba(255, 255, 255, .5); }
.gx-meta b { color: #fff; font-weight: 600; }
.gx-dot { width: 3px; height: 3px; margin: 0 6px; border-radius: 50%; background: rgba(255, 255, 255, .35); }
.gx-go { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .2); transition: background .35s, border-color .35s, box-shadow .35s; }
.gx-go svg { width: 18px; height: 18px; transition: transform .5s var(--ease-out); }

/* Activa: cursor encima o foco con teclado */
.gx-card:is(:hover, :focus-visible) { border-color: rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .055); transform: translateY(-6px); }
.gx-card:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--red); }
.gx-card:is(:hover, :focus-visible)::before { opacity: 1; }
.gx-card:is(:hover, :focus-visible)::after { transform: scaleX(1); }
.gx-card:is(:hover, :focus-visible) .gx-city .ch { animation: chWave .7s var(--ease-out) both; animation-delay: calc(var(--c) * 28ms); }
.gx-card:is(:hover, :focus-visible) .gx-city { transform: translateY(-46px); }
.gx-card:is(:hover, :focus-visible) .gx-prods { opacity: 1; transform: none; transition-delay: .12s; }
.gx-card:is(:hover, :focus-visible) .gx-go { background: var(--red); border-color: var(--red); box-shadow: 0 0 0 6px rgba(226, 0, 26, .2); }
.gx-card:is(:hover, :focus-visible) .gx-go svg { transform: translateX(2px) rotate(-45deg); }
@media (hover: hover) { .gx-cards:hover .gx-card:not(:hover) { opacity: .55; } }
.gx-card.picked { transform: scale(.98); }

.gx-foot { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 36px; padding: 26px 0 30px; flex: none; font-size: 13px; color: rgba(255, 255, 255, .5); animation: fade 1s ease .9s both; }
.gx-foot span { display: inline-flex; align-items: center; gap: 8px; }
.gx-foot svg { width: 16px; height: 16px; color: rgba(255, 255, 255, .75); }
.gx-foot .i-wa { fill: currentColor; stroke: none; }
@keyframes radar { 0% { opacity: .9; transform: scale(.4); } 100% { opacity: 0; transform: scale(2.6); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes drawLand { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { to { opacity: 1; } }

/* Tableta y celular */
@media (max-width: 900px) {
  .gx-cards { grid-template-columns: 1fr; gap: 10px; }
  .gx-card { min-height: 0; padding: 18px 20px; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "top top" "city city" "line line"; }
  .gx-card-top { display: contents; }
  .gx-n { grid-area: top; }
  .gx-city { grid-area: city; padding-top: 10px; font-size: 42px; }
  .gx-more { display: none; }
  .gx-line { grid-area: line; margin-top: 12px; padding-top: 12px; }
  .gx-head { flex: none; padding: 36px 0 28px; }
  .gx-foot { justify-content: flex-start; gap: 10px 22px; }
  .gx-glow { display: none; }
}
@media (max-width: 600px) {
  .gx-top { height: 68px; }
  .gx-since { display: none; }
  .gx-title { font-size: 56px; }
  .gx-dot, .gx-hor { display: none; }
  .gx-city { font-size: 38px; }
  .gx-sub { font-size: 15px; margin-top: 14px; }
}

/* ---------- Transición de sede ---------- */
.ink { position: fixed; inset: 0; z-index: 95; display: none; place-items: center; background: linear-gradient(135deg, var(--red), var(--red-deep)); clip-path: circle(0 at 50% 50%); }
.ink-label { color: #fff; font-weight: 800; font-size: clamp(2.4rem, 8vw, 5.5rem); letter-spacing: -.03em; text-align: center; line-height: 1; animation: up .6s var(--ease-out) .25s both; }
.ink-label small { display: block; font-size: .8rem; letter-spacing: .4em; text-transform: uppercase; font-weight: 700; opacity: .8; margin-bottom: 10px; }

/* ==========================================================
   CARRITO LATERAL
   ========================================================== */
.cart-panel { position: absolute; top: 0; bottom: 0; right: 0; width: min(440px, 100vw); background: #fff; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .45s var(--ease-out); }
.cart-drawer.open .cart-panel { transform: none; }
.cart-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.cart-head h2 { font-size: 24px; }
.cart-head small { color: var(--muted); }
.cart-list { list-style: none; margin: 0; padding: 6px 22px; overflow-y: auto; flex: 1; }
.ci { display: grid; grid-template-columns: 46px 1fr auto auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); animation: up .4s var(--ease-out); }
.ci.out, .ped-item.out { animation: out .3s var(--ease-in-out) forwards; }
@keyframes out { to { opacity: 0; transform: translateX(20px); } }
.ci-ico { width: 46px; height: 46px; border-radius: var(--r-sm); display: grid; place-items: center; }
.ci-ico svg { width: 22px; height: 22px; }
.ci-name { font-weight: 500; font-size: 14px; line-height: 1.3; }
.ci-name small { display: block; color: var(--muted); font-weight: 500; }
.ci-rm { width: 32px; height: 32px; border-radius: var(--r-sm); display: grid; place-items: center; color: var(--muted); transition: background .2s, color .2s; }
.ci-rm:hover { background: var(--red-soft); color: var(--red); }
.ci-rm svg { width: 16px; height: 16px; }
.cart-empty { flex: 1; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--muted); text-align: center; padding: 30px; }
.cart-empty[hidden] { display: none; }
.cart-empty svg { width: 46px; height: 46px; opacity: .35; }
.cart-foot { padding: 18px 22px 22px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.cart-foot[hidden] { display: none; }
.cart-note { display: flex; gap: 8px; font-size: .8rem; color: var(--muted); }
.cart-note svg { width: 18px; height: 18px; flex: none; color: var(--ok); }

/* ---------- Stepper ---------- */
.stepper { display: flex; align-items: center; justify-content: space-between; height: 40px; border-radius: var(--r-sm); background: var(--ink); color: #fff; padding: 0 4px; animation: stepIn .35s var(--spring); }
@keyframes stepIn { from { transform: scaleX(.7); opacity: 0; } }
.stepper button { width: 32px; height: 32px; border-radius: 3px; display: grid; place-items: center; font-size: 1.15rem; font-weight: 700; transition: background .2s; }
.stepper button:hover { background: rgba(255, 255, 255, .16); }
.stepper output { font-weight: 600; min-width: 3ch; text-align: center; font-size: .92rem; }
.stepper-sm { height: 34px; background: var(--paper-2); color: var(--ink); animation: none; }
.stepper-sm button { width: 28px; height: 28px; }
.stepper-sm button:hover { background: rgba(43, 36, 32, .08); }
.stepper-lg { height: 52px; }
.na { display: block; font-size: .8rem; color: var(--muted); text-align: center; padding: 9px 0; }

/* ==========================================================
   TARJETA DE PRODUCTO
   ========================================================== */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.pcard { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: box-shadow .45s var(--ease-out), border-color .3s; animation: up .6s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 40ms); }
.pcard:hover { box-shadow: var(--shadow); border-color: var(--line-2); }
.pcard-media { position: relative; height: 180px; display: grid; place-items: center; background: radial-gradient(ellipse 70% 60% at 50% 42%, #fff 0%, #f3f3f1 70%, #ececea 100%); color: var(--ink); border-bottom: 1px solid var(--line); overflow: hidden; }
/* Ilustración del producto (mientras llega la foto) */
.ilu { display: block; width: 100%; height: 100%; overflow: visible; stroke: none; stroke-width: 1; stroke-linecap: butt; stroke-linejoin: miter; }
.pcard-media .ilu { width: auto; height: 156px; max-width: 94%; transition: transform .8s var(--ease-out); transform-origin: 50% 85%; }
.pcard:hover .pcard-media .ilu { transform: translateY(-4px) scale(1.05); }
.pico { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: #fff; box-shadow: 0 1px 0 var(--line), 0 10px 24px -14px rgba(0, 0, 0, .35); }
.pico svg { width: 34px; height: 34px; stroke-width: 1.3; transition: transform .7s var(--spring), color .3s; }
.pcard:hover .pico svg, .hp:hover .pico svg { transform: scale(1.12); color: var(--red); }
.sg-ico .ilu, .ci-ico .ilu, .bp-ico .ilu { width: 130%; height: 130%; }
.sg-ico:has(.ilu), .ci-ico:has(.ilu), .bp-ico:has(.ilu) { background: #f4f4f2; overflow: hidden; }
.pcard-badge { position: absolute; top: 12px; left: 12px; font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; background: var(--red); color: #fff; padding: 2px 6px; border-radius: var(--r-sm); }
.pcard-body { padding: 14px 16px 0; flex: 1; }
/* Fotos de producto: si existen cubren el ícono */
.pimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 12px; background: #fff; }
.pcard-badge { z-index: 1; }
.pcard-badge.propio { background: var(--red); }
.pcard-cat b { color: var(--ink); font-weight: 600; }
.pvar { display: grid; gap: 4px; margin-top: 8px; }
.pvar span { font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pvar select { width: 100%; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 10px; background: #fff; font-size: 14px; color: var(--ink); cursor: pointer; }
.pvar select:focus { outline: 0; border-color: var(--ink); }
.pcard-cat { font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pcard h3 { font-size: 16px; font-weight: 600; letter-spacing: -.005em; line-height: 1.3; margin: 6px 0 4px; }
.pcard h3 a:hover { color: var(--red); }
.pcard-unit { font-size: 14px; color: var(--muted); }
.pcard-foot { padding: 14px 16px 16px; display: grid; gap: 10px; }
.pcard-price { font-size: 13px; font-weight: 500; color: var(--muted); }
.pcard-action { min-height: 40px; }

/* ==========================================================
   ASISTENTE VIRTUAL
   ========================================================== */
.bot { position: fixed; right: 20px; bottom: 20px; z-index: 70; }
.bot-fab { height: 54px; min-width: 54px; padding: 0 20px 0 16px; border-radius: var(--r); background: var(--ink); color: #fff; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-float); position: relative; transition: transform .4s var(--spring), background .3s; }
.bot-fab:hover { transform: translateY(-2px); }
.bot-fab svg { width: 24px; height: 24px; flex: none; transition: transform .45s var(--spring), opacity .25s; }
.bot-fab .i-close { position: absolute; left: 15px; opacity: 0; transform: rotate(-90deg) scale(.5); }
.bot-label { font-weight: 500; font-size: 14px; white-space: nowrap; }
.bot-fab .i-chat { color: var(--red-2); }
.bot.open .bot-fab { background: var(--ink); padding: 0 15px; }
.bot.open .bot-fab .i-chat { opacity: 0; transform: rotate(90deg) scale(.5); }
.bot.open .bot-fab .i-close { opacity: 1; transform: none; }
.bot.open .bot-label { display: none; }
.bot-fab::after { content: ""; position: absolute; top: 10px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--red-2); animation: pulse 2.4s var(--ease-out) infinite; pointer-events: none; }
.bot.open .bot-fab::after { display: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 77, 97, .6); } 80%, 100% { box-shadow: 0 0 0 8px rgba(255, 77, 97, 0); } }
.bot-nudge { position: absolute; right: 0; bottom: 70px; width: 280px; padding: 14px 36px 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); cursor: pointer; font-size: 14px; line-height: 1.4; animation: nudgeIn .6s var(--spring) both; }
.bot-nudge::after { content: ""; position: absolute; right: 22px; bottom: -6px; width: 10px; height: 10px; background: #fff; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: rotate(45deg); }
.bot-nudge b { display: block; font-weight: 600; margin-bottom: 2px; }
.bot-nudge span { color: var(--muted); }
.bot-nudge.out { animation: nudgeOut .3s var(--ease-in-out) forwards; }
.bn-x { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: var(--r-sm); display: grid; place-items: center; color: var(--muted); }
.bn-x:hover { background: var(--paper-2); }
.bn-x svg { width: 14px; height: 14px; }
@keyframes nudgeIn { from { opacity: 0; transform: translateY(10px) scale(.92); transform-origin: bottom right; } }
@keyframes nudgeOut { to { opacity: 0; transform: translateY(6px); } }
.bot-panel { position: absolute; right: 0; bottom: 74px; width: min(410px, calc(100vw - 32px)); height: min(640px, calc(100svh - 110px)); background: var(--paper-2); border-radius: var(--r); border: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-float); transform-origin: bottom right; transform: scale(.5) translateY(30px); opacity: 0; pointer-events: none; transition: transform .55s var(--ease-out), opacity .3s; }
.bot.open .bot-panel { transform: none; opacity: 1; pointer-events: auto; }
.bot-head { display: flex; gap: 12px; align-items: center; padding: 14px 12px 14px 16px; background: var(--ink-3); color: #fff; }
.bot-head > div { flex: 1; }
.bot-head small { display: flex; align-items: center; gap: 6px; color: rgba(255, 255, 255, .7); font-size: .76rem; }
.bot-head .icon-btn { color: #fff; }
.bot-head .icon-btn:hover { background: rgba(255, 255, 255, .12); }
.bot-avatar { width: 40px; height: 40px; border-radius: var(--r-sm); background: #fff; display: block; padding: 5px 8px; flex: none; }
.online { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; display: inline-block; }
.bot-body { flex: 1; overflow-y: auto; padding: 16px 14px 6px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.msg { max-width: 88%; padding: 11px 14px; border-radius: var(--r); font-size: 14px; line-height: 1.5; animation: msgIn .45s var(--ease-out) both; }
.msg.bot { position: static; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 2px; align-self: flex-start; transform-origin: bottom left; }
.msg.user { background: var(--ink); color: #fff; border-bottom-right-radius: 2px; align-self: flex-end; transform-origin: bottom right; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px) scale(.94); } }
.msg a:not(.btn) { color: var(--red); font-weight: 500; text-decoration: underline; }
.msg ul, .msg ol { margin: 6px 0 0; padding-left: 18px; }
.msg li { margin: 2px 0; }
.msg.typing { display: flex; gap: 4px; padding: 14px 16px; }
.msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: dot 1.2s infinite ease-in-out; }
.msg.typing i:nth-child(2) { animation-delay: .15s; }
.msg.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-5px); opacity: 1; } }
.bot-sub { margin-top: 8px; font-size: .82rem; color: var(--muted); }
.bot-note { margin-top: 8px; font-size: 12px; color: var(--muted); padding: 8px 10px; background: var(--paper-2); border-radius: var(--r-sm); }
.bot-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.bot-products { display: grid; gap: 6px; margin-top: 8px; }
.bp { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-sm); background: var(--paper-2); }
.bp-ico { width: 36px; height: 36px; border-radius: var(--r-sm); border: 1px solid var(--line); display: grid; place-items: center; flex: none; }
.bp-ico svg { width: 18px; height: 18px; }
.bp-info { flex: 1; min-width: 0; line-height: 1.3; }
.msg .bp-info a { text-decoration: none; color: var(--ink); font-weight: 600; }
.bp-info b { font-size: .84rem; }
.bp-info small { display: block; font-size: .74rem; }
.bp-info .ok { color: var(--ok); }
.bp-info .no { color: var(--muted); }
.bp-add { flex: none; font-size: 12px; font-weight: 500; color: #fff; background: var(--red); padding: 7px 10px; border-radius: var(--r-sm); transition: background .2s; }
.bp-add:hover { background: var(--red-deep); }
.bot-calc { margin-top: 10px; border-radius: var(--r-sm); background: var(--paper-2); padding: 4px 10px 8px; }
.bc-g { font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 10px 0 4px; }
.bc-row { display: grid; grid-template-columns: 52px 1fr 22px; gap: 8px; align-items: start; padding: 6px 0; border-top: 1px solid var(--line); font-size: .82rem; }
.bc-q { font-weight: 800; text-align: right; }
.bc-n { line-height: 1.3; font-weight: 600; }
.bc-n small { display: block; color: var(--muted); font-weight: 400; font-size: .72rem; }
.bc-s { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; font-weight: 800; }
.bc-s.ok { background: #dcf3e5; color: var(--ok); }
.bc-s.no { background: var(--paper-2); color: var(--muted); }
.wz-step { display: block; font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.wz-bar { display: block; height: 2px; border-radius: 2px; background: var(--paper-2); margin: 2px 0 10px; overflow: hidden; }
.bc-total { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 10px; margin-top: 10px; padding: 12px 12px 10px; border-radius: var(--r-sm); background: var(--ink); color: #fff; }
.bc-total span { font-size: .78rem; color: rgba(255, 255, 255, .65); }
.bc-total b { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }
.bc-total small { grid-column: 1 / -1; font-size: .72rem; color: rgba(255, 255, 255, .6); }
.wz-bar i { display: block; height: 100%; background: var(--red); border-radius: 2px; transition: width .5s var(--ease-out); animation: wzIn .8s var(--ease-out) both; }
@keyframes wzIn { from { transform: scaleX(.6); transform-origin: left; } }
.bc-detail { margin-top: 8px; }
.bc-detail summary { cursor: pointer; font-size: 13px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }
.bc-detail[open] summary { margin-bottom: 4px; }
.bot-quick { display: flex; gap: 6px; padding: 6px 14px 10px; overflow-x: auto; scrollbar-width: none; flex: none; }
.bot-quick::-webkit-scrollbar { display: none; }
.bot-quick button { flex: none; padding: 8px 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 500; white-space: nowrap; animation: up .45s var(--ease-out) both; animation-delay: calc(var(--i) * 45ms); transition: border-color .2s, color .2s; }
.bot-quick button:hover { border-color: var(--red); color: var(--red); }
.bot-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: #fff; }
.bot-input input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 14px; height: 44px; background: #fff; outline: 0; font-size: 16px; }
.bot-input input:focus { border-color: var(--ink); }
.bot-input button { width: 44px; height: 44px; border-radius: var(--r-sm); background: var(--red); color: #fff; display: grid; place-items: center; transition: background .2s; }
.bot-input button:hover { background: var(--red-deep); }
.bot-input button svg { width: 19px; height: 19px; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 99; max-width: calc(100vw - 32px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--r-sm); font-weight: 500; font-size: 14px; box-shadow: var(--shadow-float); transform: translate(-50%, 160%); transition: transform .55s var(--spring); pointer-events: none; }
.toast.show { transform: translate(-50%, 0); }
.fly { position: fixed; z-index: 85; pointer-events: none; left: 0; top: 0; }
.fly > i { display: block; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--red); box-shadow: 0 6px 16px rgba(226, 0, 26, .5); }

/* ---------- Formularios ---------- */
.field { display: grid; gap: 6px; }
.field > span { font-weight: 500; font-size: 14px; }
.field small { color: var(--muted); font-weight: 500; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; padding: 11px 12px; outline: 0; transition: border-color .25s, box-shadow .3s; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px var(--paper-2); }
.field.invalid input, .field.invalid select { border-color: var(--red); animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-4px); } 50% { transform: translateX(3px); } 75% { transform: translateX(-2px); } }

/* ==========================================================
   RESPONSIVE (componentes compartidos)
   ========================================================== */
.mn-short { display: none; }
@media (max-width: 1240px) {
  .mn-long { display: none; }
  .mn-short { display: inline; }
}
@media (max-width: 1180px) {
  .hd-help { display: none; }
  .mn-link { padding: 0 10px; font-size: .86rem; }
  .mn-link::after { left: 10px; right: 10px; }
}
@media (max-width: 980px) {
  html { scroll-padding-top: 130px; }
  .tb-hide { display: none; }
  .mainnav-in { gap: 0; }
  .mn-link { padding: 0 9px; font-size: 13.5px; }
  .mn-cta { padding: 0 12px; }
  .header-in { gap: 12px; height: auto; padding-top: 10px; flex-wrap: wrap; }
  .hsearch { order: 5; flex-basis: 100%; max-width: none; height: 44px; margin-bottom: 12px; }
  .hd-cart > span:last-child { display: none; }
  .hd-login > span, .hd-user .hd-item small { display: none; }
  .hd-item { padding: 4px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
/* Menú siempre visible: en pantallas angostas se desliza horizontalmente */
@media (max-width: 820px) {
  .mainnav-in { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .mainnav-in::-webkit-scrollbar { display: none; }
  .mn-link, .mn-cta, .mn-drop { flex: none; }
  .mega, .mn-link svg { display: none; }
  .mn-link { padding: 0 7px; font-size: 13px; }
  .mn-link::after { left: 7px; right: 7px; }
  .mn-cta { margin-left: 6px; margin-right: 2px; padding: 0 10px; font-size: 13px; }
  .mn-cta svg { display: none; }
}
@media (max-width: 600px) {
  .tb-links { display: none; }
  body { font-size: 15px; }
  .section { padding: 60px 0; }
  .wordmark b { font-size: 1.25rem; }
  .logo-mark { width: 28px; height: 36px; }
  .topbar-in { height: 36px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-cta { padding: 26px 22px; }
  .footer-cta-btns .btn { flex: 1; }
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pcard { min-width: 0; }
  .pvar select { min-width: 0; width: 100%; }
  .pcard-media { height: 128px; }
  .pcard-media .ilu { height: 112px; }
  .pico { width: 58px; height: 58px; }
  .pico svg { width: 28px; height: 28px; }
  .pcard-body { padding: 10px 12px 0; }
  .pcard h3 { font-size: .9rem; }
  .pcard-foot { padding: 10px 12px 12px; }
  .bot { right: 14px; bottom: 14px; }
  .bot-fab { height: 54px; padding: 0 15px; }
  .bot-label { display: none; }
  .bot-fab .i-close { left: 15px; }
  .field input, .field select, .field textarea, .hsearch input { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* Números de las sedes: cada uno abre su chat de WhatsApp */
.tel-wa { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; white-space: nowrap; transition: color .2s; }
.tel-wa svg { width: 16px; height: 16px; flex: none; color: #1faa53; }
.tel-wa .i-wa, .tb-item .i-wa { fill: currentColor; stroke: none; }
.tel-wa:hover { color: #1a8f46; }
.tel-wa:hover span { text-decoration: underline; text-underline-offset: 3px; }
.footer-sede .tel-wa { display: flex; color: rgba(255, 255, 255, .85); }
.footer-sede .tel-wa:hover { color: #fff; }
.sc-tels, .sb-tels { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.channel .tel-wa { display: flex; }
.bot-actions .tel-wa.btn svg { color: #1faa53; }

/* ==========================================================
   MODO ADMINISTRADOR (solo con sesión de administrador o vendedor)
   ========================================================== */
.adm-bar { position: relative; z-index: 60; background: #111; color: #fff; font-size: 13px; }
.adm-in { display: flex; align-items: center; gap: 18px; min-height: 44px; }
.adm-who { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.adm-who i { width: 8px; height: 8px; border-radius: 50%; background: #2ecc71; box-shadow: 0 0 0 3px rgba(46, 204, 113, .25); }
.adm-who span { color: rgba(255, 255, 255, .55); }
.adm-links { display: flex; align-items: center; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.adm-links::-webkit-scrollbar { display: none; }
.adm-links a, .adm-switch, .adm-out { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px; border-radius: 999px; color: rgba(255, 255, 255, .82); white-space: nowrap; transition: background .2s, color .2s; }
.adm-links a:hover, .adm-switch:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.adm-links svg, .adm-out svg { width: 15px; height: 15px; }
.adm-links em { font-style: normal; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; display: grid; place-items: center; }
.adm-switch .sw { position: relative; width: 28px; height: 16px; border-radius: 8px; background: rgba(255, 255, 255, .25); transition: background .25s; }
.adm-switch .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease-out); }
.adm-switch.on .sw { background: #2ecc71; }
.adm-switch.on .sw::after { transform: translateX(12px); }
.adm-out { border: 1px solid rgba(255, 255, 255, .25); color: #fff; }
.adm-out:hover { background: var(--red); border-color: var(--red); }

.pcard, .hp { position: relative; }
.adm-edit { position: absolute; z-index: 3; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 999px; background: #111; color: #fff; font-size: 12.5px; font-weight: 600; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .45); opacity: .92; transition: transform .25s var(--ease-out), background .2s, opacity .2s; }
.adm-edit svg { width: 14px; height: 14px; }
.adm-edit:hover { background: var(--red); opacity: 1; transform: translateY(-1px); }
.adm-edit.adm-edit-pd { position: static; margin-bottom: 14px; height: 36px; padding: 0 16px; font-size: 14px; }
.adm-gone { animation: admGone .45s var(--ease-in-out) forwards; }
@keyframes admGone { to { opacity: 0; transform: scale(.94); } }

.adm-modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: rgba(10, 10, 10, 0); transition: background .25s; }
.adm-modal.in { background: rgba(10, 10, 10, .55); }
.adm-dialog { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #fff; border-radius: 12px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5); transform: translateY(16px) scale(.98); opacity: 0; transition: transform .35s var(--ease-out), opacity .25s; }
.adm-modal.in .adm-dialog { transform: none; opacity: 1; }
.adm-dh { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 18px 18px 16px; border-bottom: 1px solid var(--line); }
.adm-thumb { width: 64px; height: 64px; border-radius: 8px; background: #f4f4f2; display: grid; place-items: center; overflow: hidden; }
.adm-thumb .ilu { width: 120%; height: 120%; }
.adm-thumb > svg:not(.ilu) { width: 28px; height: 28px; }
.adm-dh small { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
.adm-dh h3 { font-size: 18px; line-height: 1.25; margin: 2px 0; }
.adm-dh span { font-size: 13px; color: var(--muted); }
.adm-form { display: grid; gap: 16px; padding: 18px; }
.adm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.adm-money { display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; transition: border-color .2s; }
.adm-money:focus-within { border-color: var(--ink); }
.adm-money i { font-style: normal; color: var(--muted); padding: 0 10px; font-size: 14px; }
.adm-money input { border: 0 !important; outline: 0; box-shadow: none !important; padding-left: 0; min-width: 0; width: 100%; }
.adm-money input:first-child { padding-left: 12px; }
.adm-sedes { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.adm-sedes legend { font-size: 13px; font-weight: 500; margin-bottom: 8px; }
.adm-chk { position: relative; cursor: pointer; }
.adm-chk input { position: absolute; opacity: 0; }
.adm-chk span { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; transition: background .2s, border-color .2s, color .2s; }
.adm-chk span::before { content: ""; width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid var(--line-2); transition: background .2s, border-color .2s; }
.adm-chk input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.adm-chk input:checked + span::before { background: #2ecc71; border-color: #2ecc71; }
.adm-chk input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.adm-chk.off { opacity: .45; cursor: not-allowed; }
.adm-hint { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.adm-hint a { text-decoration: underline; }
.adm-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 4px; }
.adm-actions > div { display: flex; gap: 8px; }
.adm-del { color: var(--red); }
.adm-del svg { width: 16px; height: 16px; }
@media (max-width: 760px) {
  .adm-who span { display: none; }
  .adm-in { gap: 10px; }
  .adm-links a span, .adm-out span { display: none; }
  .adm-switch { font-size: 12px; }
  .adm-grid { grid-template-columns: 1fr 1fr; }
}
.pmayor { display: block; flex-basis: 100%; font-style: normal; font-size: 12px; color: #1a7f43; margin-top: 2px; }
.pmayor b { font-weight: 700; }
.adm-mayor { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px; border-radius: var(--r-sm); background: var(--paper-2); font-size: 14px; }
.adm-mayor > span { font-weight: 500; width: 100%; font-size: 13px; }
.adm-mayor label { display: inline-flex; align-items: center; gap: 8px; }
.adm-mayor > label > input { width: 64px; height: 36px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 8px; font: inherit; }
.adm-mayor .adm-money { width: 130px; height: 36px; }
.adm-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.adm-foto { display: grid; grid-template-columns: 88px 1fr; gap: 14px; align-items: center; padding: 12px; border: 1px dashed var(--line-2); border-radius: var(--r-sm); }
.adm-foto-prev { width: 88px; height: 88px; border-radius: 8px; background: #f4f4f2; display: grid; place-items: center; overflow: hidden; }
.adm-foto-prev img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.adm-foto-prev .ilu { width: 120%; height: 120%; }
.adm-foto-prev > svg:not(.ilu) { width: 30px; height: 30px; }
.adm-foto b { display: block; font-size: 14px; }
.adm-foto small { display: block; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.adm-foto-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.adm-foto-btns label { cursor: pointer; }
.adm-actions > div:first-child { display: flex; gap: 6px; flex-wrap: wrap; }
.sg-ico img, .ci-ico img, .bp-ico img, .adm-thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
@media (max-width: 600px) { .adm-grid2 { grid-template-columns: 1fr; } }

/* ---------- Seguridad: aviso de cookies, campo trampa y textos legales ---------- */
.cookies { position: fixed; left: 16px; bottom: 16px; z-index: 80; max-width: 440px; display: flex; gap: 14px; align-items: center;
  padding: 14px 16px; background: #fff; color: var(--ink, #111); border: 1px solid rgba(0,0,0,.08); border-radius: 14px;
  box-shadow: 0 18px 40px -18px rgba(0,0,0,.35); animation: up .45s var(--ease-out, ease) both; transition: opacity .25s, transform .25s; }
.cookies p { margin: 0; font-size: 13px; line-height: 1.45; color: #444; }
.cookies p b { color: #111; }
.cookies a { color: var(--red, #E2001A); text-decoration: underline; }
.cookies .btn { flex: none; }
.cookies.out { opacity: 0; transform: translateY(10px); }
@media (max-width: 560px) { .cookies { left: 12px; right: 12px; bottom: 12px; max-width: none; flex-direction: column; align-items: stretch; } }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.legal { max-width: 760px; }
.legal h2 { font-size: 20px; margin: 32px 0 10px; }
.legal p, .legal li { color: #444; line-height: 1.65; }
.legal ul { padding-left: 20px; }
.legal a { color: var(--red, #E2001A); }
.footer-bottom a { color: inherit; text-decoration: underline; margin-left: 8px; }

/* ---------- Cantidad editable + botón Comprar ---------- */
.stepper, .stepper button, .buy-go { -webkit-tap-highlight-color: transparent; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.stepper button:focus { outline: none; }
.stepper button:focus-visible { outline: 2px solid var(--red, #E2001A); outline-offset: 1px; }
.stepper button:active { transform: scale(.9); }
.stepper .qty { width: 4.2ch; min-width: 0; flex: 1 1 auto; max-width: 64px; height: 30px; border: 0; border-radius: 4px; background: rgba(255,255,255,.12); color: inherit;
  font: inherit; font-weight: 700; font-size: 16px; text-align: center; padding: 0; -webkit-user-select: text; user-select: text; }
.stepper .qty:focus { outline: none; background: #fff; color: var(--ink); }
.stepper-sm .qty { background: #fff; height: 26px; font-size: 15px; }
.stepper-lg .qty { height: 40px; max-width: 80px; font-size: 18px; }
.buy-row { display: flex; gap: 6px; align-items: stretch; }
.buy-row .stepper { flex: 1 1 auto; min-width: 0; }
.buy-go { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 12px; font-size: .86rem; white-space: nowrap; }
.buy-go svg { width: 16px; height: 16px; }
.buy-row-lg .buy-go { height: 52px; padding: 0 22px; font-size: 1rem; }
/* Tarjetas angostas (celular, 2 columnas): la cantidad arriba y Comprar debajo, a lo ancho */
.pcard .buy-row, .hp-act .buy-row { container-type: inline-size; }
@container (max-width: 230px) { .buy-row .stepper, .buy-row .buy-go { width: 100%; } }
@media (max-width: 640px) { .pcard .buy-row, .hp-act .buy-row { flex-direction: column; } .pcard .buy-go, .hp-act .buy-go { height: 38px; } }

/* ---------- Pantalla de inicio en celulares y pantallas táctiles ----------
   En el celular no hay "pasar el mouse": al tocar, el efecto de hover se quedaba pegado
   (la ciudad saltaba hacia arriba). Aquí el toque solo hunde la tarjeta, el fondo queda
   quieto (moverlo sin parar se veía a saltos) y todo aparece más rápido. */
.gx { min-height: 100vh; min-height: 100svh; }
@media (hover: none), (max-width: 900px) {
  .gx-topo { animation: fade 1.2s ease both; will-change: auto; }
  .gx-card { transition: transform .18s ease, background .2s, border-color .2s; -webkit-tap-highlight-color: transparent; }
  .gx-card:is(:hover, :focus-visible) { transform: none; background: rgba(255, 255, 255, .035); border-color: rgba(255, 255, 255, .1); }
  .gx-card:is(:hover, :focus-visible) .gx-city { transform: none; }
  .gx-card:is(:hover, :focus-visible) .gx-city .ch { animation: none; }
  .gx-card:is(:hover, :focus-visible)::before { opacity: 0; }
  .gx-card:is(:hover, :focus-visible)::after { transform: scaleX(0); }
  .gx-card:is(:hover, :focus-visible) .gx-go { background: transparent; border-color: rgba(255, 255, 255, .2); box-shadow: none; }
  .gx-card:is(:hover, :focus-visible) .gx-go svg { transform: none; }
  .gx-card:active, .gx-card.picked { transform: scale(.98); background: rgba(255, 255, 255, .07); border-color: rgba(226, 0, 26, .6); }
  .gx-card:active .gx-go, .gx-card.picked .gx-go { background: var(--red); border-color: var(--red); }
  .gx-card:focus-visible { box-shadow: 0 0 0 2px var(--red); }
  .gx-title .w > span { animation-duration: .7s; }
  .gx-sub { animation-duration: .6s; animation-delay: .15s; }
  .gx-cards li { animation-duration: .55s; animation-delay: calc(.2s + var(--i) * .06s); }
  .gx-foot { animation-delay: .4s; }
}
@media (prefers-reduced-motion: reduce) {
  .gx-topo, .gx-title .w > span, .gx-sub, .gx-cards li, .gx-foot, .gx-eyebrow, .gx-since { animation: none !important; }
}
/* Horario: punto verde si está abierto, gris si está cerrado */
.tb-abierto > span::before, .tb-cerrado > span::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.tb-abierto > span::before { background: #3ddc84; box-shadow: 0 0 0 3px rgba(61, 220, 132, .25); }
.tb-cerrado > span::before { background: rgba(255,255,255,.55); }
.hora-sede { margin: 8px 0 0; font-size: 13px; color: var(--muted, #6b6b6b); }
