/* ═══════════════════════════════════════════════════════════
   Kairunova — dirección "Build Plate" (taller 3D)
   La tienda se siente como la placa de impresión de una máquina 3D:
   retícula sutil, datos en monoespaciada, botones en tinta y el lima
   como color de "máquina encendida". Temas claro/oscuro vía [data-theme].
   Display/Cuerpo: Geist (igual que el ERP) · Datos: Space Mono
   ═══════════════════════════════════════════════════════════ */

:root {
  --lime:      #C4FF0E;
  --lime-dim:  #a8dd00;
  --on-lime:   #14140d;
  --ka-color:  #14140e;   /* color del "ka" 3D en modo claro (negro/tinta) */

  /* Tema claro — blanco con grises neutros */
  --bg:        #ffffff;
  --bg-2:      #f4f4f5;
  --surface:   #ffffff;
  --media:     #ededf0;
  --line:      #e7e7ea;
  --line-2:    #d5d5da;
  --grid:      rgba(15,15,20,.05);
  --text:      #101014;
  --text-soft: #3a3a40;
  --text-mut:  #63636b;
  --solid-bg:  #101014;   /* botón de acción en negro en modo claro */
  --solid-fg:  #ffffff;
  --shadow:    0 1px 2px rgba(0,0,0,.05), 0 18px 40px rgba(15,15,20,.10);
  --scrim:     rgba(15,15,18,.45);

  --r:    10px;
  --r-sm: 7px;
  --r-lg: 16px;
  --r-full: 999px;
  --maxw: 1180px;
  --nav-h: 64px;
  --mono: "Space Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --display: "Geist", "Space Grotesk", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;   /* cuerpo/labels = ERP (Inter) */
}

[data-theme="dark"] {
  --ka-color:  var(--lime);   /* en oscuro el "ka" vuelve a lima (brilla sobre fondo oscuro) */
  --bg:        #0e0f0b;
  --bg-2:      #16170f;
  --surface:   #17180f;
  --media:     #1e1f16;
  --line:      #26271c;
  --line-2:    #34352a;
  --grid:      rgba(240,240,210,.05);
  --text:      #f2f2e8;
  --text-soft: #adad9d;
  --text-mut:  #74746a;
  --solid-bg:  #f2f2e8;   /* en oscuro el botón sólido es claro */
  --solid-fg:  #0e0f0b;
  --shadow:    0 1px 2px rgba(0,0,0,.5), 0 20px 46px rgba(0,0,0,.5);
  --scrim:     rgba(0,0,0,.62);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* asegura ocultar aunque haya display: flex/grid */
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background .3s ease, color .3s ease;
}
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 700; letter-spacing: -.02em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Iconos SVG minimalistas (trazo, heredan color del texto) */
.ico { width: 19px; height: 19px; display: block; flex: none; }

/* Etiqueta de datos en monoespaciada (SKU, medidas, coordenadas) */
.mono {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .02em;
  text-transform: uppercase; color: var(--text-mut);
}

/* ── Botones ──────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.5rem; border-radius: var(--r-full);
  font: 600 .92rem var(--body); cursor: pointer;
  border: 1px solid transparent;
  transition: transform .14s ease, background .16s ease, border-color .16s, color .16s, box-shadow .16s;
}
.btn:active { transform: scale(.98); }
.btn--solid { background: var(--solid-bg); color: var(--solid-fg); }
.btn--solid:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(20,20,12,.18); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--text); background: color-mix(in srgb, var(--text) 5%, transparent); }

/* ── Header / nav ─────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 40;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
/* Contenido del header alineado al mismo contenedor centrado que el catálogo. */
.nav__inner {
  max-width: var(--maxw); margin: 0 auto; height: 100%; width: 100%;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0 clamp(1.2rem, 4vw, 2.5rem);
}
.nav__brand { display: flex; align-items: center; }
.nav__logo { height: 19px; width: auto; }
.nav__logo--light { filter: brightness(0); }   /* wordmark totalmente negro en claro */
.nav__logo--dark { display: none; }
[data-theme="dark"] .nav__logo--light { display: none; }
[data-theme="dark"] .nav__logo--dark { display: block; }
.nav__links { display: flex; gap: 1.4rem; margin-left: 1.2rem; }
.nav__links a { font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-mut); transition: color .15s; }
.nav__links a:hover { color: var(--text); }
.nav__actions { display: flex; align-items: center; gap: .55rem; margin-left: auto; }

.theme-toggle {
  width: 40px; height: 40px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: transparent; color: var(--text);
  cursor: pointer; display: grid; place-items: center;
  transition: border-color .15s, background .15s;
}
.theme-toggle:hover { border-color: var(--text); }
.theme-toggle__moon { display: none; }
[data-theme="dark"] .theme-toggle__sun { display: none; }
[data-theme="dark"] .theme-toggle__moon { display: block; }

.cart-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .55rem .9rem .55rem .85rem; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: transparent; color: var(--text);
  font: 600 .82rem var(--body); text-transform: uppercase; letter-spacing: .03em; cursor: pointer;
  transition: border-color .15s, transform .14s;
}
.cart-btn:hover { border-color: var(--text); }
.cart-btn__icon { width: 18px; height: 18px; }
.cart-btn__count {
  min-width: 1.35rem; height: 1.35rem; padding: 0 .35rem;
  display: inline-grid; place-items: center; border-radius: var(--r-sm);
  background: var(--lime); color: var(--on-lime); font-size: .74rem; font-weight: 700;
}

/* ── Hero — placa de impresión ────────────────────────── */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); user-select: none; -webkit-user-select: none; }
.ka3d { -webkit-touch-callout: none; }
.hero__plate {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 34px 34px; background-position: center top;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 55%, transparent 100%);
          mask-image: radial-gradient(120% 90% at 50% 0%, #000 55%, transparent 100%);
}
/* Objeto 3D en movimiento — el "Ka" del logo, extruido por capas
   (verde translúcido) como una pieza impresa capa por capa. */
/* El "ka" 3D va arriba, como título en flujo (el texto queda debajo). */
.hero__stage {
  position: relative; z-index: 1;
  display: grid; place-items: center;
  min-height: clamp(7rem, 15vw, 12rem);
  margin: clamp(2.2rem, 5vh, 3.6rem) auto clamp(.4rem, 1.2vh, 1rem);
  pointer-events: none; perspective: 1100px;
}
.ka3d {
  position: relative; transform-style: preserve-3d;
  font-family: "Syncopate", var(--display); font-weight: 700; line-height: 1;
  font-size: clamp(4.5rem, 13vw, 10rem);   /* Syncopate es ancha: tamaño menor */
  width: 2.5em; height: .82em;             /* área para interactuar (girar/tocar) */
  pointer-events: auto; cursor: grab;
  /* El giro continuo lo maneja el JS (requestAnimationFrame). */
}
.ka3d:active { cursor: grabbing; }
.ka3d__layer {
  position: absolute; top: 50%; left: 50%; translate: -50% -50%; white-space: nowrap;
  /* Fallbacks (Android/WebView sin color-mix o sin text-stroke): el relleno usa
     var(--ka-color) atenuado por la opacidad por capa que pone el JS, así el "Ka"
     siempre es visible. Los navegadores modernos usan el color-mix de abajo. */
  color: var(--ka-color);
  -webkit-text-stroke: 1px var(--ka-color);
  color: color-mix(in srgb, var(--ka-color) 6%, transparent);    /* relleno muy translúcido */
  -webkit-text-stroke: 1px color-mix(in srgb, var(--ka-color) 60%, transparent);
}
/* Capa frontal: relleno vidrioso + borde definido (como el "ka" del logo) */
.ka3d__layer--face {
  color: var(--ka-color);
  -webkit-text-stroke: 1.6px var(--ka-color);
  color: color-mix(in srgb, var(--ka-color) 16%, transparent);
  -webkit-text-stroke: 1.6px color-mix(in srgb, var(--ka-color) 82%, transparent);
}
@keyframes ka-sway {
  from { transform: rotateX(-14deg) rotateY(-32deg); }
  to   { transform: rotateX(-8deg)  rotateY(32deg); }
}
/* ── Animación de "impresión 3D" del "Ka" (build al entrar) ─────────
   El recorte lo maneja el JS sobre .hero__stage (clip-path bottom→top);
   aquí van el cabezal de impresión y el flash de la placa. */
.hero__stage.is-printing { will-change: clip-path; }
.ka-printline {
  position: absolute; left: 50%; top: 100%;
  transform: translate(-50%, -50%);
  width: 68%; max-width: 460px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg,
    transparent, var(--lime) 18%, #f4ffd2 50%, var(--lime) 82%, transparent);
  box-shadow: 0 0 10px 1px var(--lime),
              0 0 26px 6px color-mix(in srgb, var(--lime) 55%, transparent);
  opacity: 0; pointer-events: none; z-index: 3;
  will-change: top, opacity;
}
.hero__plate.is-flash { animation: ka-plate-flash .56s ease-out; }
@keyframes ka-plate-flash {
  0%   { box-shadow: inset 0 60px 70px -40px transparent; }
  28%  { box-shadow: inset 0 60px 90px -30px color-mix(in srgb, var(--lime) 55%, transparent); }
  100% { box-shadow: inset 0 60px 70px -40px transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .ka-printline { display: none; }
  .hero__plate.is-flash { animation: none; }
}
/* ── Efectos láser random al tocar el "ka" ────────────────────── */
.fxlayer { position: fixed; inset: 0; z-index: 85; pointer-events: none; overflow: hidden; }

/* Estrella fugaz / cometa láser */
.fx-comet-wrap { position: absolute; height: 0; transform-origin: left center; }
.fx-comet {
  position: absolute; top: -2px; left: 0; height: 4px; width: 150px; border-radius: 4px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--lime) 55%, transparent), var(--lime) 82%, #f4ffd2);
  box-shadow: 0 0 12px 2px var(--lime), 0 0 30px 7px color-mix(in srgb, var(--lime) 55%, transparent);
}
/* Barrido láser vertical */
.fx-sweep {
  position: absolute; width: 4px; border-radius: 4px;
  background: linear-gradient(var(--lime), #f4ffd2, var(--lime));
  box-shadow: 0 0 14px 3px var(--lime), 0 0 34px 9px color-mix(in srgb, var(--lime) 50%, transparent);
}
/* Cubitos (corazón voxel) */
.fx-vox {
  position: absolute; width: 12px; height: 12px; border-radius: 2px; background: var(--lime);
  box-shadow: 0 0 8px color-mix(in srgb, var(--lime) 70%, transparent);
}
/* Fragmentos que se rompen */
.fx-shard {
  position: absolute; background: var(--lime);
  clip-path: polygon(0 0, 100% 28%, 62% 100%);
  box-shadow: 0 0 8px color-mix(in srgb, var(--lime) 60%, transparent);
}
/* Boquilla 3D + filamento extruido */
.fx-nozzle {
  position: absolute; width: 32px; height: 40px;
  background: linear-gradient(#d6d6d6, #9a9a9a 55%, #5c5c5c);
  clip-path: polygon(16% 0, 84% 0, 84% 52%, 60% 100%, 40% 100%, 16% 52%);
  filter: drop-shadow(0 3px 4px rgba(0,0,0,.45));
}
.fx-fil {
  position: absolute; width: 5px; border-radius: 3px; transform: translateX(-50%);
  background: var(--lime); box-shadow: 0 0 9px 1px var(--lime);
}
/* Línea de escaneo por capas */
.fx-scanline {
  position: absolute; height: 3px;
  background: linear-gradient(90deg, transparent, var(--lime), transparent);
  box-shadow: 0 0 12px 2px var(--lime);
}
/* Onda de choque */
.fx-ring {
  position: absolute; width: 64px; height: 64px; border-radius: 50%;
  border: 3px solid var(--lime);
  box-shadow: 0 0 16px 3px color-mix(in srgb, var(--lime) 50%, transparent), inset 0 0 12px color-mix(in srgb, var(--lime) 40%, transparent);
}

/* marcas de registro en las esquinas del área útil */
.hero__inner {
  position: relative; z-index: 1;
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(1.2rem, 2.5vw, 2rem) clamp(1.2rem, 4vw, 2.5rem) clamp(2.6rem, 5vw, 4rem);
  text-align: center;
}
.hero__inner::before, .hero__inner::after {
  content: ""; position: absolute; width: 16px; height: 16px; opacity: .5;
  border-color: var(--text-mut); border-style: solid; border-width: 0;
}
.hero__inner::before { top: clamp(1.6rem, 4vw, 2.4rem); left: clamp(1.2rem, 4vw, 2.5rem); border-top-width: 1.5px; border-left-width: 1.5px; }
.hero__inner::after  { top: clamp(1.6rem, 4vw, 2.4rem); right: clamp(1.2rem, 4vw, 2.5rem); border-top-width: 1.5px; border-right-width: 1.5px; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--mono); text-transform: uppercase;
  letter-spacing: .12em; font-size: .68rem; font-weight: 400;
  color: var(--text-soft); margin: 0 0 1.4rem;
  padding: .4rem .8rem; border: 1px solid var(--line-2); border-radius: var(--r-full);
}
.dotpulse { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 0 var(--lime); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--lime) 60%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hero__title { font-size: clamp(2.5rem, 7.5vw, 4.6rem); line-height: 1.0; font-weight: 700; letter-spacing: -.035em; }
.hero__tag { color: var(--text-soft); max-width: 44ch; margin: 1.3rem auto 2rem; font-size: 1.06rem; }
.hero__cta { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; }

/* CTA estilo Linktree: iconos de contacto con hover de marca */
.hero__links { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }
.cta-ico {
  width: 56px; height: 56px; border-radius: var(--r-full);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text);
  display: grid; place-items: center; cursor: pointer;
  transition: transform .16s ease, background .16s, border-color .16s, color .16s, box-shadow .16s;
}
.cta-ico svg { width: 25px; height: 25px; }
/* Hover con el color de la marca (lima) para todos los iconos */
.cta-ico:hover, .cta-ico:focus-visible {
  transform: translateY(-3px);
  background: var(--lime); border-color: var(--lime); color: var(--on-lime);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--lime) 45%, transparent);
}
/* Parpadeo de un icono (efecto al tocar el "ka") en el color de la marca (lima) */
.cta-ico.is-flash { animation: flash-ka .5s ease 3; }
@keyframes flash-ka {
  0%, 49%, 100% { background: var(--surface); border-color: var(--line-2); color: var(--text); box-shadow: none; }
  50%, 99% { background: var(--lime); border-color: var(--lime); color: var(--on-lime); box-shadow: 0 0 20px 3px var(--lime); }
}
.hero__coord { font-family: var(--mono); font-size: .7rem; color: var(--text-mut); letter-spacing: .05em; margin: 2rem 0 0; }

/* ── Shop ─────────────────────────────────────────────── */
.shop { max-width: var(--maxw); margin: 0 auto; padding: clamp(2rem,5vw,3rem) clamp(1.2rem, 4vw, 2.5rem) 3.5rem; }
.shop__head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-bottom: 1.8rem; flex-wrap: wrap;
}
.shop__title { font-size: clamp(1.5rem, 4vw, 2rem); display: flex; align-items: baseline; gap: .6rem; }

.searchbar {
  display: flex; align-items: center; gap: .55rem;
  min-width: 220px; max-width: 300px; flex: 1;
  padding: .1rem .9rem; background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
}
.searchbar:focus-within { border-color: var(--text); }
.searchbar__ic { color: var(--text-mut); width: 17px; height: 17px; }
.searchbar input { flex: 1; border: none; background: none; outline: none; padding: .62rem 0; font: 400 .9rem var(--mono); color: var(--text); }
.searchbar input::placeholder { color: var(--text-mut); text-transform: uppercase; letter-spacing: .04em; font-size: .84rem; }

/* Barra de herramientas: chips de categoría + toggle de densidad */
.shop__tools {
  display: flex; align-items: center; gap: 1rem;
  margin: 0 0 1.6rem; flex-wrap: wrap;
}
/* Filtro a la izquierda (crece) · orden/columnas a la derecha. */
.shop__filter { flex: 1 1 auto; min-width: 0; }
.shop__toolsend { display: inline-flex; align-items: center; gap: .6rem; margin-left: auto; }
.chips { display: flex; gap: .5rem; flex-wrap: wrap; }
.chip {
  padding: .5rem .9rem; border-radius: var(--r-full);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text-soft);
  font: 600 .8rem var(--mono); text-transform: uppercase; letter-spacing: .03em; cursor: pointer;
  transition: border-color .14s, color .14s, background .14s;
}
.chip:hover { border-color: var(--text); color: var(--text); }
.chip.is-active { background: var(--solid-bg); color: var(--solid-fg); border-color: var(--solid-bg); }

.viewtoggle { display: inline-flex; gap: .25rem; padding: .25rem; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); }
.viewtoggle__btn {
  width: 34px; height: 30px; display: grid; place-items: center; cursor: pointer;
  border: none; border-radius: 5px; background: transparent; color: var(--text-mut);
  transition: background .14s, color .14s;
}
.viewtoggle__btn svg { width: 17px; height: 17px; }
.viewtoggle__btn:hover { color: var(--text); }
.viewtoggle__btn.is-active { background: var(--solid-bg); color: var(--solid-fg); }

/* Toggle de columnas: solo en móvil (en tablet/escritorio manda el breakpoint). */
@media (min-width: 681px) { #cols { display: none !important; } }

/* Orden: pill con ícono + texto (tipografía del cuerpo). */
.sortfield {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .35rem .6rem .35rem .7rem; border: 1px solid var(--line-2);
  border-radius: var(--r-full); background: var(--surface);
  transition: border-color .14s;
}
.sortfield:hover, .sortfield:focus-within { border-color: var(--text); }
.sortfield__ico { width: 16px; height: 16px; color: var(--text-mut); flex: none; }
.sortfield select {
  font: 600 .85rem var(--body); color: var(--text); background: transparent;
  border: none; padding: .18rem 1.2rem .18rem 0; cursor: pointer; outline: none;
  -webkit-appearance: none; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-mut) 50%), linear-gradient(135deg, var(--text-mut) 50%, transparent 50%);
  background-position: right .35rem center, right .1rem center;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}

/* Paginado */
.pager { display: flex; gap: .4rem; justify-content: center; align-items: center; margin-top: 2.6rem; flex-wrap: wrap; }
.pager__btn {
  min-width: 40px; height: 40px; padding: 0 .6rem; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text);
  font: 700 .85rem var(--mono); cursor: pointer; transition: border-color .14s, background .14s, color .14s;
}
.pager__btn:hover:not(:disabled):not(.is-active) { border-color: var(--text); }
.pager__btn.is-active { background: var(--solid-bg); color: var(--solid-fg); border-color: var(--solid-bg); cursor: default; }
.pager__btn:disabled { opacity: .35; cursor: not-allowed; }
.pager__gap { color: var(--text-mut); font-family: var(--mono); padding: 0 .2rem; }

.banner {
  margin: 0 0 1.6rem; padding: .85rem 1.1rem; border-radius: var(--r);
  background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text-soft);
  font: 400 .9rem var(--body);
}
.banner code, .banner b { font-family: var(--mono); background: color-mix(in srgb, var(--text) 8%, transparent); padding: .05rem .35rem; border-radius: 5px; }

/* grid de productos — responsive por breakpoints:
   móvil (≤680) = 2 columnas (toggle 1/2 via data-cols), tablet = 3, escritorio = 4. */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1rem, 2.4vw, 1.6rem); }
/* tablet: hasta 3 */
@media (min-width: 681px) and (max-width: 1024px) { .grid { grid-template-columns: repeat(3, 1fr); } }
/* escritorio: hasta 4 */
@media (min-width: 1025px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.grid__skeleton { display: contents; }
.sk {
  aspect-ratio: 4/5; border-radius: var(--r);
  background: linear-gradient(100deg, var(--bg-2) 30%, var(--media) 50%, var(--bg-2) 70%);
  background-size: 200% 100%; animation: shimmer 1.3s infinite;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  background: var(--surface);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.card:hover { border-color: var(--line-2); transform: translateY(-3px); box-shadow: var(--shadow); }
.card__media {
  position: relative; width: 100%; aspect-ratio: 1/1;
  background: var(--media);
  overflow: hidden; cursor: pointer; padding: 0; border: none;
  border-bottom: 1px solid var(--line);
}
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s ease; }
.card:hover .card__media img { transform: scale(1.06); }
.card__media--empty { display: grid; place-items: center; color: var(--text-mut); font-size: 2rem; }

/* Badges de etiqueta sobre la foto (arriba-izquierda). Coloreadas primero. */
.card__badges {
  position: absolute; top: .5rem; left: .5rem; z-index: 2;
  display: flex; flex-wrap: wrap; gap: .3rem; max-width: calc(100% - 1rem);
  pointer-events: none;
}
.card__badge {
  font: 700 .6rem var(--mono); text-transform: uppercase; letter-spacing: .03em;
  padding: .22rem .45rem; border-radius: var(--r-full); line-height: 1; white-space: nowrap;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  color: var(--text-soft); border: 1px solid var(--line-2);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.card__badge--color { border: none; }

/* botón de agregar: siempre visible, al fondo de la tarjeta */
.card__add {
  margin-top: auto; width: 100%;
  padding: .68rem; border: none; border-radius: var(--r-sm);
  background: var(--solid-bg); color: var(--solid-fg);
  font: 600 .78rem var(--body); text-transform: uppercase; letter-spacing: .04em; cursor: pointer;
  transition: background .15s, color .15s, transform .12s;
}
.card__add:hover { background: var(--lime); color: var(--on-lime); }
.card__add:active { transform: scale(.98); }
.card__add.is-added { background: var(--lime); color: var(--on-lime); }

.card__body { padding: .85rem .9rem 1rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
/* Nombre: hasta 2 líneas (se recorta), altura natural para pegarse al monto. */
.card__name {
  font-family: var(--display); font-size: 1.35rem; font-weight: 600; line-height: 1.22;
  letter-spacing: -.01em; cursor: pointer;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden;
}
.card__name:hover { color: var(--text-soft); }
/* Chips de medidas/tallas (solo `size`) en UNA sola fila; hueco reservado
   aunque el producto no tenga medidas, para que todas las cards cuadren. */
.card__sizes {
  display: flex; flex-wrap: nowrap; gap: .3rem; overflow: hidden;
  min-height: 1.35rem; align-items: center;
}
.card__sizes--empty { min-height: 1.35rem; }
.card__size {
  font: 600 .64rem var(--mono); color: var(--text-soft); line-height: 1.2; white-space: nowrap;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: .15rem .4rem; background: var(--bg-2);
}
.card__desc { display: none; }
/* Precio pegado al título (poco margen arriba). El botón se ancla al fondo
   (margin-top:auto en .card__add), dejando un respiro entre monto y botón. */
.card__price { font-size: 1.4rem; margin-top: .1rem; }
/* Más aire entre el precio en $ y el precio en Bs. */
.card__price .price { gap: .5rem; }

/* Precio apilado: $ grande y oscuro arriba · Bs pequeño y tenue debajo */
.price { display: inline-flex; flex-direction: column; line-height: 1.05; gap: .1rem; font-variant-numeric: tabular-nums; }
.price--right { align-items: flex-end; text-align: right; }
.price__pre { font-family: var(--body); font-size: .56em; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; color: var(--text-mut); }
.price__usd { font-family: var(--body); font-size: 1.12em; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.price__bs { font-family: var(--body); font-size: .82em; font-weight: 500; color: var(--text-soft); letter-spacing: 0; }
/* Descuento (#87): precio anterior tachado + precio nuevo resaltado. Theme-aware
   (usa las variables de color, así funciona en claro y oscuro). */
.price__old { font-family: var(--body); font-size: .72em; font-weight: 500; color: var(--text-mut); text-decoration: line-through; text-decoration-thickness: 1.5px; letter-spacing: 0; }
.price__usd--sale { color: var(--lime-dim); }
:root[data-theme="dark"] .price__usd--sale { color: var(--lime); }

.empty { grid-column: 1/-1; text-align: center; color: var(--text-mut); padding: 3.5rem 1rem; font-family: var(--body); letter-spacing: .01em; font-size: .9rem; }

/* ── Contacto ─────────────────────────────────────────── */
.contact {
  position: relative;
  background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  text-align: center; padding: clamp(3rem, 7vw, 5rem) 1.2rem;
}
.contact__title { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 700; letter-spacing: -.025em; }
.contact__tag { color: var(--text-soft); margin: .8rem auto 1.8rem; max-width: 42ch; }
.contact__links { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; }

/* ── Footer ───────────────────────────────────────────── */
.foot {
  display: flex; flex-direction: column; gap: .9rem; justify-content: center; align-items: center;
  color: var(--text-mut); padding: 2.4rem 1rem 3rem; font: 400 .74rem var(--mono);
  text-transform: uppercase; letter-spacing: .06em; text-align: center;
}
.foot__row { display: flex; gap: .55rem; align-items: center; flex-wrap: wrap; justify-content: center; }
.foot__logo { height: 22px; width: auto; }
.foot__logo--dark { display: none; }
[data-theme="dark"] .foot__logo--light { display: none; }
[data-theme="dark"] .foot__logo--dark { display: block; }
.foot__by { display: inline-flex; align-items: center; gap: .45rem; flex-wrap: wrap; justify-content: center; color: var(--text-mut); font-size: .68rem; transition: color .15s; }
.foot__by:hover { color: var(--text); }
.foot__by strong { color: var(--text-soft); font-weight: 700; }
.foot__by:hover strong { color: var(--text); }
.foot__bto { width: 18px; height: 18px; border-radius: 5px; display: inline-block; vertical-align: middle; }
.foot__ext { width: 12px; height: 12px; }

/* ── Detalle de producto + carrusel ───────────────────── */
.detail { position: fixed; inset: 0; z-index: 70; visibility: hidden; }
.detail.is-open { visibility: visible; }
.detail__scrim { position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: opacity .3s; backdrop-filter: blur(2px); }
.detail.is-open .detail__scrim { opacity: 1; }
.detail__panel {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -48%) scale(.98);
  width: min(900px, 94vw); max-height: 92vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--r-lg); box-shadow: var(--shadow);
  opacity: 0; transition: opacity .25s ease, transform .25s ease;
}
.detail.is-open .detail__panel { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.detail__close {
  position: absolute; top: .8rem; right: .8rem; z-index: 3;
  width: 36px; height: 36px; border-radius: var(--r-sm); border: none;
  background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(6px);
  color: var(--text); cursor: pointer; display: grid; place-items: center;
  transition: background .15s, color .15s;
}
.detail__close:hover { background: var(--lime); color: var(--on-lime); }
.detail__grid { display: grid; grid-template-columns: 1fr 1fr; }

.carousel { position: relative; background: var(--media); overflow: hidden; border-radius: var(--r-lg) 0 0 var(--r-lg); }
.carousel__stage { display: flex; height: 100%; min-height: 360px; transition: transform .35s cubic-bezier(.3,.8,.2,1); }
.carousel__img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1/1; }
.carousel__empty { flex: 0 0 100%; display: grid; place-items: center; font-size: 3rem; color: var(--text-mut); }
.carousel__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: var(--r-sm); border: none;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(6px);
  color: var(--text); cursor: pointer; display: grid; place-items: center;
  transition: background .15s, color .15s;
}
.carousel__nav:hover { background: var(--lime); color: var(--on-lime); }
.carousel__nav--prev { left: .6rem; }
.carousel__nav--next { right: .6rem; }
.carousel__dots { position: absolute; bottom: .8rem; left: 0; right: 0; display: flex; gap: .35rem; justify-content: center; }
.dot { width: 7px; height: 7px; border-radius: var(--r-full); border: none; background: color-mix(in srgb, var(--text) 30%, transparent); cursor: pointer; padding: 0; transition: width .2s, background .2s; }
.dot.is-active { background: var(--lime); width: 20px; }

.detail__info { padding: 3rem 2.6rem 2.6rem; display: flex; flex-direction: column; gap: .85rem; }
.detail__name { font-size: 1.6rem; line-height: 1.12; font-weight: 700; }
.detail__price { font-size: 1.7rem; }
/* Más separación entre el precio en $ y el precio en Bs (detalle). */
.detail__price .price { gap: .5rem; }
.d-field span, .d-colors__lbl { font-family: var(--mono); font-size: .68rem; font-weight: 700; color: var(--text-mut); text-transform: uppercase; letter-spacing: .1em; }
.d-field span { display: block; margin-bottom: .35rem; }
.d-field select {
  width: 100%; padding: .68rem .7rem; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--bg); color: var(--text);
  font: 500 .92rem var(--body);
}
.d-colors { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.d-colors__lbl { margin-right: .2rem; }
.color-chip, .opt-chip {
  padding: .38rem .8rem; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--bg); color: var(--text);
  font: 600 .8rem var(--body); cursor: pointer; transition: all .14s;
}
.color-chip:hover, .opt-chip:hover { border-color: var(--text); }
.color-chip.is-active, .opt-chip.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* Variaciones como chips seleccionables (marcas una), igual que el color.
   Todas del mismo tamaño: min-width fijo + texto centrado. */
.d-opts { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin-top: .7rem; }
.d-variations { display: flex; flex-wrap: wrap; gap: .45rem; }
.opt-chip {
  min-width: 4.6rem; text-align: center;
  padding: .5rem 1rem; font-size: .92rem;
}

/* Etiquetas (tags) del producto en el detalle. */
.d-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: -.1rem 0 .1rem; }
.d-tag {
  font: 700 .64rem var(--mono); text-transform: uppercase; letter-spacing: .04em;
  padding: .25rem .55rem; border-radius: var(--r-full); line-height: 1;
  background: var(--bg-2); color: var(--text-soft); border: 1px solid var(--line-2);
}
.d-tag--color { border: none; }
.detail__desc { font-size: .93rem; color: var(--text-soft); line-height: 1.65; border-top: 1px solid var(--line); padding-top: .9rem; margin-top: .2rem; }
.detail__desc :where(img) { border-radius: var(--r-sm); margin: .5rem 0; }
.detail__desc :where(h3, h4) { color: var(--text); font-weight: 700; margin: .8rem 0 .3rem; }
.detail__desc :where(ul, ol) { padding-left: 1.2rem; margin: .4rem 0; }
.detail__desc :where(strong) { color: var(--text); }
.detail__desc :where(a) { color: var(--text); text-decoration: underline; text-decoration-color: var(--lime); }
.detail__desc .muted { color: var(--text-mut); }
.detail__actions { display: flex; gap: .7rem; align-items: center; margin-top: auto; padding-top: 1rem; }
.add {
  flex: 1; padding: .9rem 1rem; border-radius: var(--r-sm); border: none;
  background: var(--solid-bg); color: var(--solid-fg);
  font: 600 .86rem var(--mono); text-transform: uppercase; letter-spacing: .05em; cursor: pointer;
  transition: filter .15s, transform .12s, background .15s, color .15s;
}
.add:hover { background: var(--lime); color: var(--on-lime); }
.add:active { transform: scale(.98); }
.add.is-added { background: var(--lime); color: var(--on-lime); }

/* stepper */
.qty { display: inline-flex; align-items: center; gap: .15rem; }
.qty button {
  width: 36px; height: 36px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--bg); color: var(--text);
  cursor: pointer; font-size: 1.1rem; line-height: 1; display: grid; place-items: center; transition: border-color .14s;
}
.qty button:hover { border-color: var(--text); }
.qty span { min-width: 2.2ch; text-align: center; font-weight: 700; font-family: var(--mono); }
.qty--lg button { width: 42px; height: 42px; }

/* ── Drawer / carrito ─────────────────────────────────── */
.drawer { position: fixed; inset: 0; z-index: 60; visibility: hidden; }
.drawer.is-open { visibility: visible; }
.drawer__scrim { position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: opacity .3s ease; }
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100%);
  background: var(--bg); border-left: 1px solid var(--line-2);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .32s cubic-bezier(.3,.9,.3,1);
}
.drawer.is-open .drawer__panel { transform: translateX(0); }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.35rem; border-bottom: 1px solid var(--line); }
.drawer__head h3 { font-size: 1.35rem; font-weight: 700; }
.drawer__close {
  border: none; background: var(--bg-2); color: var(--text);
  width: 36px; height: 36px; border-radius: var(--r-sm); cursor: pointer; display: grid; place-items: center; transition: background .15s;
}
.drawer__close:hover { background: var(--line-2); }
.drawer__body { flex: 1; overflow-y: auto; padding: 1rem 1.25rem; }

.line { display: flex; gap: .8rem; align-items: flex-start; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.line__thumb { width: 56px; height: 56px; border-radius: var(--r-sm); background: var(--media); object-fit: cover; flex: none; display: grid; place-items: center; color: var(--text-mut); }
.line__info { flex: 1; min-width: 0; }
.line__top { display: flex; align-items: flex-start; gap: .6rem; }
.line__name { flex: 1; min-width: 0; font-family: var(--display); font-weight: 600; font-size: 1.35rem; line-height: 1.2; }
/* Precio de la línea al tamaño del monto del card de catálogo. */
.line__sub { flex: none; font-size: 1.4rem; font-weight: 700; }
.line__sub .price__bs { font-size: .6em; }
/* Menos distancia entre el nombre y la medida (cm). */
.line__meta { font-family: var(--body); font-size: 1rem; color: var(--text-soft); margin-top: .05rem; }
.line__price { font-family: var(--body); font-size: 1rem; color: var(--text-mut); margin: .25rem 0 .6rem; }
.line__rm { display: grid; place-items: center; width: 36px; height: 36px; margin-left: .35rem; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--bg); color: var(--text-mut); cursor: pointer; transition: border-color .14s, color .14s, background .14s; }
.line__rm .ico { width: 17px; height: 17px; }
.line__rm:hover { border-color: #d64545; color: #d64545; }

.cart-empty { text-align: center; color: var(--text-mut); padding: 3.5rem 1rem; font-family: var(--body); font-size: .92rem; line-height: 1.7; }
.cart-empty__big { width: 42px; height: 42px; margin: 0 auto .8rem; color: var(--text-mut); opacity: .7; }

.drawer__foot { border-top: 1px solid var(--line); padding: 1rem 1.25rem 1.25rem; }
.field { display: block; margin-bottom: .9rem; }
.field span { display: block; font-family: var(--body); font-size: .95rem; font-weight: 600; margin-bottom: .4rem; color: var(--text-soft); }
.field em { color: var(--text-mut); font-weight: 400; font-style: normal; text-transform: none; letter-spacing: 0; }
.field input, .field textarea {
  width: 100%; padding: .8rem .8rem; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--surface); color: var(--text); font: 400 1rem var(--body); resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--text); }

.total { display: flex; justify-content: space-between; align-items: flex-end; margin: .3rem 0 1rem; }
.total span { font-family: var(--body); font-size: 1.2rem; font-weight: 600; color: var(--text-soft); padding-bottom: .5rem; }
.total strong { font-size: 2.7rem; font-weight: 800; letter-spacing: -.015em; }
.total strong .price__bs { font-size: .42em; font-weight: 500; color: var(--text-soft); }

.wa-order {
  width: 100%; padding: 1rem; border: none; border-radius: var(--r-sm);
  background: var(--solid-bg); color: var(--solid-fg);
  font: 700 1.05rem var(--body); letter-spacing: .01em; cursor: pointer;
  transition: filter .15s, transform .12s, background .15s, color .15s;
}
.wa-order:hover:not(:disabled) { background: var(--lime); color: var(--on-lime); }
.wa-order:active:not(:disabled) { transform: scale(.99); }
.wa-order:disabled { opacity: .4; cursor: not-allowed; }
.drawer__note { text-align: center; font: 400 .88rem var(--body); color: var(--text-mut); margin: .8rem 0 0; }

/* Paso de datos del pedido (aparece al Finalizar). */
.checkout__back {
  width: 100%; margin-top: .6rem; padding: .6rem; border: none; background: none;
  color: var(--text-mut); font: 600 .85rem var(--body); cursor: pointer; text-decoration: underline;
}
.checkout__back:hover { color: var(--text); }
/* Segmentado Retiro / Delivery. */
.seg { display: flex; gap: .5rem; }
.seg__btn {
  flex: 1; padding: .85rem .6rem; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--surface); color: var(--text); font: 600 1rem var(--body); cursor: pointer;
  transition: border-color .14s, background .14s, color .14s;
}
.seg__btn:hover { border-color: var(--text); }
.seg__btn.is-active { background: var(--solid-bg); color: var(--solid-fg); border-color: var(--solid-bg); }

/* ── Modal (popup de datos del pedido) ─────────────────── */
.modal { position: fixed; inset: 0; z-index: 70; visibility: hidden; }
.modal.is-open { visibility: visible; }
.modal__scrim { position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: opacity .25s ease; }
.modal.is-open .modal__scrim { opacity: 1; }
.modal__card {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -46%);
  width: min(460px, calc(100% - 2rem)); max-height: calc(100% - 2rem); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg);
  box-shadow: var(--shadow); opacity: 0;
  transition: opacity .25s ease, transform .28s cubic-bezier(.3,.9,.3,1);
  font-family: var(--body);
}
.modal.is-open .modal__card { opacity: 1; transform: translate(-50%, -50%); }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.35rem; border-bottom: 1px solid var(--line); }
.modal__head h3 { font-size: 1.35rem; font-weight: 700; }
.modal__body { padding: 1.25rem 1.35rem 1.4rem; }

/* ── Barra inferior de carrito (resumen rápido) ───────── */
/* Barra fija tipo footer a TODO el ancho de la página. */
.cartbar {
  position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; width: 100%;
  transform: translateY(100%);
  display: block;
  padding: .95rem 0;
  padding-bottom: calc(.95rem + env(safe-area-inset-bottom));
  border: none; border-top: 1px solid var(--line-2); border-radius: 0;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: var(--text); box-shadow: 0 -8px 30px rgba(0,0,0,.22); cursor: pointer;
  font-family: var(--body);
  opacity: 0; transition: transform .32s cubic-bezier(.3,.9,.3,1), opacity .25s ease;
}
/* Contenido de la barra alineado al mismo contenedor centrado que el catálogo. */
.cartbar__inner {
  max-width: var(--maxw); margin: 0 auto; width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 0 clamp(1.2rem, 4vw, 2.5rem);
}
.cartbar.is-visible { transform: translateY(0); opacity: 1; }
/* Oculta la barra mientras el carrito (drawer) está abierto */
body.drawer-open .cartbar { opacity: 0; transform: translateY(100%); pointer-events: none; }
.cartbar:hover { background: var(--surface); }
.cartbar:active { transform: translateY(0) scale(.997); }
.cartbar__side { display: inline-flex; align-items: center; gap: .7rem; }
.cartbar__ico { width: 24px; height: 24px; color: var(--text); }
.cartbar__count {
  min-width: 1.6rem; height: 1.6rem; padding: 0 .45rem;
  display: inline-grid; place-items: center; border-radius: var(--r-sm);
  background: var(--lime); color: var(--on-lime); font: 700 .86rem var(--mono);
}
.cartbar__unit { font-family: var(--body); font-size: .95rem; font-weight: 600; color: var(--text-soft); }
/* Monto: $ grande y oscuro · Bs más claro (como en la card del catálogo). */
.cartbar__total { font-size: 1.4rem; }
.cartbar__total .price { flex-direction: row; align-items: baseline; gap: .55rem; }
.cartbar__total .price__usd { font-size: 1em; }
.cartbar__total .price__bs { font-size: .62em; font-weight: 500; color: var(--text-soft); }
.cartbar__cta {
  padding: .72rem 1.3rem; border-radius: var(--r-full);
  background: var(--solid-bg); color: var(--solid-fg);
  font: 700 .82rem var(--body); text-transform: uppercase; letter-spacing: .04em;
  transition: background .15s, color .15s;
}
.cartbar:hover .cartbar__cta { background: var(--lime); color: var(--on-lime); }

/* ── Página de detalle de producto (vista enrutada) ───── */
.pdp { max-width: var(--maxw); margin: 0 auto; padding: clamp(1.2rem, 3vw, 2rem) clamp(1.2rem, 4vw, 2.5rem) 4rem; }
.pdp__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.3rem; }
.pdp__back {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem .95rem .55rem .75rem; border: 1px solid var(--line-2); border-radius: var(--r-full);
  background: var(--surface); color: var(--text);
  font: 600 .8rem var(--mono); text-transform: uppercase; letter-spacing: .04em; cursor: pointer;
  transition: border-color .14s, background .14s;
}
.pdp__back:hover { border-color: var(--text); }
.pdp__back .ico { width: 16px; height: 16px; }
.pdp__crumb { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-mut); }
.pdp__inner { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.pdp .carousel { border-radius: 0; }
.pdp .carousel__stage { min-height: 460px; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 680px) {
  .detail__grid { grid-template-columns: 1fr; }
  .carousel { border-radius: var(--r-lg) var(--r-lg) 0 0; }
  .carousel__stage { min-height: 300px; }
  .detail__info { padding: 1.9rem 1.5rem 1.7rem; }
  .nav__links { display: none; }
  /* En móvil: 2 columnas por defecto; el toggle 1/2 fija data-cols en #grid. */
  .grid { grid-template-columns: repeat(2, 1fr); gap: .8rem; }
  .grid[data-cols="1"] { grid-template-columns: 1fr; }
  .cart-btn__label { display: none; }
  .cartbar { padding: .7rem 0; padding-bottom: calc(.7rem + env(safe-area-inset-bottom)); }
  .cartbar__inner { gap: .8rem; }
  .cartbar__unit { display: none; }
  .cartbar__total { font-size: 1.15rem; }
  .cartbar__ico { width: 20px; height: 20px; }
  .ka3d { font-size: clamp(7rem, 42vw, 12rem); }

  /* Tipografía más contenida en móvil (las columnas son angostas). Con la vista
     a 1 columna hay más ancho, así que se permite un poco más grande. */
  .card__name { font-size: 1rem; }
  .card__price { font-size: 1.15rem; }
  .card__price .price { gap: .3rem; }
  .card__add { padding: .6rem; font-size: .72rem; }
  .card__badge { font-size: .55rem; padding: .2rem .4rem; }
  .grid[data-cols="1"] .card__name { font-size: 1.2rem; }
  .grid[data-cols="1"] .card__price { font-size: 1.35rem; }

  /* Drawer / total del carrito en móvil. */
  .drawer__head h3 { font-size: 1.2rem; }
  .line__name { font-size: 1.02rem; }
  .line__sub { font-size: 1.08rem; }
  .line__meta, .line__price { font-size: .9rem; }
  .total span { font-size: 1rem; }
  .total strong { font-size: 2rem; }
  .field span { font-size: .9rem; }
  .field input { font-size: .95rem; }
  .wa-order { font-size: .95rem; }
  .seg__btn { font-size: .92rem; }
  .modal__head h3 { font-size: 1.2rem; }
}

:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto; } }

/* ═══ Multi-tienda: catálogo de 3 plantillas por empresa (#100) ═════════
   Se activan por data-template en <body>. Catálogo:
     `kairunova` (=classic legacy) → layout de siempre (hero 3D).
     `generica`  (=minimal legacy) → hero sobrio: sin plancha 3D, con botón
                                     "ver catálogo" y tipografía contenida.
     `moderna`   → hero moderno: titular grande + acento de color.
   Backward-compatible: sin atributo (o kairunova/classic) todo queda EXACTO
   como hoy. Se conservan los selectores legacy (minimal) como alias. */

/* Botón CTA del hero: oculto por defecto (kairunova/classic no lo usan). */
.hero__catalog-btn { display: none; }

/* ── Plantilla genérica (alias legacy: minimal) ── */
[data-template="generica"] .hero__plate,
[data-template="generica"] .hero__stage,
[data-template="minimal"] .hero__plate,
[data-template="minimal"] .hero__stage { display: none; }
[data-template="generica"] .hero__inner,
[data-template="minimal"] .hero__inner { padding-top: clamp(2.4rem, 6vw, 4rem); padding-bottom: clamp(2rem, 5vw, 3.2rem); }
[data-template="generica"] .hero__inner::before,
[data-template="generica"] .hero__inner::after,
[data-template="minimal"] .hero__inner::before,
[data-template="minimal"] .hero__inner::after { display: none; }
[data-template="generica"] .hero__title,
[data-template="minimal"] .hero__title { font-size: clamp(2rem, 5.5vw, 3.4rem); }
[data-template="generica"] .hero__catalog-btn,
[data-template="minimal"] .hero__catalog-btn {
  display: inline-block; margin: .4rem auto 1.6rem;
  padding: .7rem 1.5rem; border-radius: 999px;
  background: var(--text); color: var(--bg);
  font-weight: 600; text-decoration: none; letter-spacing: .01em;
  transition: opacity .18s ease, transform .18s ease;
}
[data-template="generica"] .hero__catalog-btn:hover,
[data-template="minimal"] .hero__catalog-btn:hover { opacity: .88; transform: translateY(-1px); }

/* ── Plantilla moderna (#100) ── titular grande sobre un acento de color y
   botón sólido en lima. Sin la pieza 3D. */
[data-template="moderna"] .hero__plate,
[data-template="moderna"] .hero__stage { display: none; }
[data-template="moderna"] .hero__inner {
  padding-top: clamp(3rem, 9vw, 6.5rem);
  padding-bottom: clamp(2.4rem, 6vw, 4.2rem);
  background: radial-gradient(120% 130% at 50% -10%, color-mix(in srgb, var(--lime) 22%, transparent), transparent 62%);
  border-radius: var(--r-lg);
}
[data-template="moderna"] .hero__inner::before,
[data-template="moderna"] .hero__inner::after { display: none; }
[data-template="moderna"] .hero__title {
  font-size: clamp(2.6rem, 8vw, 5.2rem);
  font-weight: 800; letter-spacing: -.03em; line-height: 1;
}
[data-template="moderna"] .hero__tag { font-size: 1.05rem; }
[data-template="moderna"] .hero__catalog-btn {
  display: inline-block; margin: .8rem auto 1.8rem;
  padding: .82rem 1.8rem; border-radius: 999px;
  background: var(--lime); color: var(--on-lime);
  font-weight: 700; text-decoration: none; letter-spacing: .01em;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--lime) 35%, transparent);
  transition: opacity .18s ease, transform .18s ease;
}
[data-template="moderna"] .hero__catalog-btn:hover { opacity: .92; transform: translateY(-1px); }

/* Pie editable por empresa (#70). */
.foot__text { color: var(--text-soft); font-size: .92rem; margin: 0 0 .8rem; text-align: center; }

/* Aviso de precio al mayor en el detalle (#162). Neutro cuando falta para el
   umbral; acento lima cuando ya aplica. */
.d-wholesale {
  margin: 4px 0 12px;
  padding: 9px 12px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-sm);
  font: 500 13px/1.35 var(--body);
  color: var(--text-soft);
  background: var(--bg-2);
}
.d-wholesale.is-active {
  border-style: solid;
  border-color: var(--lime-dim);
  background: color-mix(in srgb, var(--lime) 16%, var(--surface));
  color: var(--text);
}
/* Etiqueta "al mayor" junto al unitario en el carrito. */
.line__wholesale {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: var(--r-full);
  font: 600 11px/1.5 var(--mono);
  background: var(--lime);
  color: var(--on-lime);
}
