@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,700;12..96,800&family=Figtree:wght@400;500;600;700&display=swap');

/* =========================================================
   Mi Persa Maipú — sistema visual v3
   Violeta suave (marca) + rosa empolvado (ofertas / acento) sobre
   neutros casi blancos teñidos hacia el verde. Mobile-first.
   ========================================================= */
:root {
  /* Marca */
  --marca: oklch(0.50 0.10 295);
  --marca-oscura: oklch(0.40 0.085 295);
  --marca-suave: oklch(0.955 0.028 295);
  --marca-linea: oklch(0.87 0.05 295);
  --coral: oklch(0.66 0.12 352);
  --coral-oscuro: oklch(0.50 0.12 352);
  --coral-suave: oklch(0.955 0.03 352);
  /* Neutros */
  --tinta: oklch(0.21 0.015 290);
  --texto: oklch(0.31 0.012 290);
  --gris: oklch(0.47 0.012 290);
  --borde: oklch(0.915 0.006 290);
  --borde-fuerte: oklch(0.82 0.01 290);
  --fondo: oklch(0.968 0.012 295);
  --hundido: oklch(0.955 0.018 295);
  --blanco: #fff;
  /* Pastel (cabecera y bandas) */
  --pastel-lila: oklch(0.90 0.05 295);
  --pastel-rosa: oklch(0.92 0.045 345);
  --pastel-azul: oklch(0.92 0.04 262);
  --cab-fondo: linear-gradient(100deg, var(--pastel-azul), var(--pastel-lila) 55%, var(--pastel-rosa));
  /* Estados */
  --verde: oklch(0.47 0.12 152);
  --verde-suave: oklch(0.95 0.04 152);
  --rojo: oklch(0.52 0.19 27);
  --rojo-suave: oklch(0.955 0.03 27);
  --ambar-suave: oklch(0.96 0.05 88);
  --ambar-texto: oklch(0.44 0.09 70);
  --azul: oklch(0.50 0.11 270);
  --azul-oscuro: oklch(0.40 0.12 270);
  --azul-suave: oklch(0.955 0.025 270);
  /* Alias heredados (usados en estilos en línea de los .js) */
  --vino: var(--marca); --vino-oscuro: var(--marca-oscura); --vino-suave: var(--marca-suave); --vino-linea: var(--marca-linea);
  --oro: var(--coral); --amarillo: var(--coral); --amarillo-oscuro: var(--coral-oscuro);
  /* Forma */
  --radio: 14px;
  --radio-s: 10px;
  --sombra: 0 1px 2px oklch(0.2 0.02 290 / .06);
  --sombra-alta: 0 4px 8px -2px oklch(0.2 0.02 290 / .12), 0 1px 2px oklch(0.2 0.02 290 / .06);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --z-sticky: 20; --z-nav: 25; --z-desplegable: 30; --z-modal-fondo: 50; --z-toast: 60;
  --fuente: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --alto-nav: 64px;
  --cab-alto: 112px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--cab-alto) + 12px); }
body { font-family: var(--fuente); margin: 0; background: var(--fondo); color: var(--texto); line-height: 1.5; font-size: 16px; -webkit-font-smoothing: antialiased; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; padding-bottom: calc(var(--alto-nav) + env(safe-area-inset-bottom)); }
body > main { flex: 1; width: 100%; }a { color: var(--marca); text-decoration: none; }
a:hover { color: var(--marca-oscura); }
img { max-width: 100%; display: block; }
h1, h2, h3 { color: var(--tinta); text-wrap: balance; font-family: var(--display); letter-spacing: -0.015em; }
p { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--azul); outline-offset: 2px; }
::selection { background: var(--marca-suave); color: var(--marca-oscura); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.saltar { position: absolute; left: 12px; top: -60px; background: var(--tinta); color: #fff; padding: 10px 16px; border-radius: var(--radio-s); z-index: var(--z-toast); }
.saltar:focus { top: 12px; color: #fff; }
.ico-svg { width: 22px; height: 22px; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* =========================================================
   Cabecera (móvil primero)
   ========================================================= */
.cabecera { background: var(--cab-fondo); color: var(--tinta); position: sticky; top: 0; z-index: var(--z-sticky); border-bottom: 1px solid var(--borde); }
.cab-fila1 { max-width: 1240px; margin: 0 auto; padding: 10px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--tinta); white-space: nowrap; line-height: 1.05; min-height: 44px; }
.logo:hover { color: var(--tinta); }
.logo .marca-ico { width: 36px; height: 36px; border-radius: 10px; background: var(--marca); color: #fff; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 20px; flex: none; }
.logo .marca-txt { display: flex; flex-direction: column; }
.logo #cab-nombre { font-family: var(--display); font-weight: 800; font-size: 18px; letter-spacing: -0.02em; }
.logo small { display: none; font-size: 12px; font-weight: 500; color: var(--gris); margin-top: 2px; }
.buscador { order: 3; flex: 1 1 100%; display: flex; align-items: center; background: var(--hundido); border: 1px solid transparent; border-radius: 12px; min-height: 46px; padding: 3px 3px 3px 14px; transition: border-color .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease); }
.buscador:focus-within { background: #fff; border-color: var(--marca); box-shadow: 0 0 0 3px var(--marca-suave); }
.buscador input { flex: 1; border: 0; padding: 8px 4px; font-size: 16px; background: transparent; margin: 0; width: auto; border-radius: 0; color: var(--tinta); min-width: 0; box-shadow: none; }
.buscador input:focus, .buscador input:focus-visible { outline: none; box-shadow: none; }
.buscador input::placeholder { color: var(--gris); }
.buscador button { border: 0; background: var(--marca); color: #fff; width: 40px; height: 40px; min-height: 40px; padding: 0; display: grid; place-items: center; cursor: pointer; margin: 0; border-radius: 9px; flex: none; }
.buscador button:hover { background: var(--marca-oscura); }
.buscador button .ico-svg { width: 20px; height: 20px; }
.promo-cab { display: none; font-size: 13px; color: var(--gris); white-space: nowrap; align-items: center; gap: 6px; }
.promo-cab .ico-svg { width: 16px; height: 16px; color: var(--marca); }
.cab-ico { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--tinta); flex: none; }
.cab-ico:hover { background: var(--hundido); color: var(--tinta); }
.cab-movil { margin-left: auto; }

.cab-fila2 { max-width: 1240px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; font-size: 14px; }
.cab-fila2::-webkit-scrollbar { display: none; }
.cab-fila2 a, .cab-fila2 .menu-cat > button { color: var(--texto); font-size: 14px; background: none; border: 0; padding: 0 10px; min-height: 44px; display: inline-flex; align-items: center; cursor: pointer; margin: 0; font-weight: 500; border-radius: 8px; white-space: nowrap; }
.cab-fila2 a:hover, .cab-fila2 .menu-cat > button:hover { color: var(--marca-oscura); background: var(--marca-suave); }
.cab-fila2 .menu-cat > button { font-weight: 600; color: var(--tinta); padding-left: 0; }
.ubicacion { display: none; font-size: 12px; color: var(--gris); line-height: 1.15; align-items: center; gap: 6px; padding-right: 18px; margin-right: 18px; border-right: 1px solid var(--borde); }
.ubicacion b { display: block; font-weight: 600; font-size: 13px; color: var(--tinta); }
.ubicacion .ico-svg { width: 18px; height: 18px; color: var(--marca); }
.cab-der { margin-left: auto; display: flex; gap: 2px; align-items: center; }
.cab-der .cab-ico, .cab-der .carro { display: none; }
.menu-cat { position: static; }
.menu-cat .desplegable { display: none; position: fixed; top: var(--cab-alto); left: 12px; right: 12px; max-height: 60vh; overflow-y: auto; background: #fff; box-shadow: var(--sombra-alta); border: 1px solid var(--borde); border-radius: var(--radio); padding: 6px; z-index: var(--z-desplegable); }
.menu-cat:hover .desplegable, .menu-cat:focus-within .desplegable { display: block; }
.desplegable a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; min-height: 44px; color: var(--texto); font-size: 15px; border-radius: 8px; }
.desplegable a:hover { background: var(--marca-suave); color: var(--marca-oscura); }
.carro { position: relative; }
.badge { position: absolute; top: 3px; right: 2px; background: var(--coral); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 0 5px; min-width: 18px; text-align: center; line-height: 18px; font-variant-numeric: tabular-nums; }
.badge:empty { display: none; }

/* Navegación inferior (solo móvil) */
.nav-inferior { position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-nav); background: #fff; border-top: 1px solid var(--borde); display: grid; grid-template-columns: repeat(5, 1fr); padding-bottom: env(safe-area-inset-bottom); }
.nav-inferior a { position: relative; height: var(--alto-nav); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--gris); }
.nav-inferior a:hover { color: var(--tinta); }
.nav-inferior a[aria-current="page"] { color: var(--marca); }
.nav-inferior a[aria-current="page"]::before { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--marca); }
.nav-inferior .badge { top: 6px; right: calc(50% - 22px); }

/* =========================================================
   Pie
   ========================================================= */
.pie { background: var(--tinta); color: oklch(0.86 0.01 290); margin-top: 56px; font-size: 14px; }
.pie-in { max-width: 1240px; margin: 0 auto; padding: 40px 16px 24px; display: grid; gap: 28px 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pie-in > div:first-child { grid-column: 1 / -1; }
.pie h3 { color: #fff; font-size: 15px; margin: 0 0 8px; }
.pie a { color: oklch(0.86 0.01 290); display: flex; align-items: center; min-height: 36px; }
.pie a:hover { color: #fff; }
.pie p { margin: 0; max-width: 40ch; color: oklch(0.8 0.01 290); }
.pie-base { border-top: 1px solid oklch(1 0 0 / .1); max-width: 1240px; margin: 0 auto; padding: 16px; font-size: 13px; color: oklch(0.74 0.01 290); }

/* =========================================================
   Contenedores y tipografía base
   ========================================================= */
main { max-width: 1240px; margin: 0 auto; padding: 16px 16px 40px; }
.blanco { background: var(--blanco); border-radius: var(--radio); border: 1px solid var(--borde); }
.bloque { padding: 18px 16px; margin-bottom: 14px; }
h1 { font-size: 26px; margin: 0 0 14px; font-weight: 700; line-height: 1.15; }
h2 { font-size: 20px; margin: 0 0 14px; font-weight: 700; line-height: 1.2; }
h3 { font-weight: 700; }
.migas { font-size: 14px; color: var(--gris); margin: 2px 0 12px; }
.migas a { color: var(--gris); text-decoration: underline; text-decoration-color: var(--borde-fuerte); text-underline-offset: 3px; }
.sec-titulo { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.sec-titulo a { font-size: 14px; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; min-height: 44px; }
.sec-titulo a::after { content: '→'; margin-left: 6px; transition: transform .2s var(--ease); }
.sec-titulo a:hover::after { transform: translateX(3px); }

/* =========================================================
   Inicio
   ========================================================= */
/* Inicio v5: primer pantallazo con color de marca (cabecera verde + banda con carrusel
   promocional), accesos circulares, beneficios y rieles en paneles blancos sobre gris.
   Todo el contenido promocional sale de la API; si no hay dato, la pieza no aparece. */
body.pag-inicio { background: var(--hundido); overflow-x: clip; }
.inicio [hidden] { display: none !important; }

/* Cabecera pastel solo en la portada (distinta del cuerpo) */
.pag-inicio .cabecera { background: var(--cab-fondo); border-bottom-color: transparent; color: var(--tinta); }
.pag-inicio .buscador { background: #fff; }
.pag-inicio .cab-fila2 a:hover, .pag-inicio .cab-fila2 .menu-cat > button:hover { background: oklch(1 0 0 / .55); }
.pag-inicio .cab-fila2 .desplegable a { color: var(--texto); }
.pag-inicio .cab-fila2 .desplegable a:hover { color: var(--marca-oscura); background: var(--marca-suave); }

.inicio { padding-top: 0; }

/* Banda de marca: el verde de la cabecera continúa y el carrusel queda a caballo con el gris */
.cima { position: relative; padding: 6px 0 0; isolation: isolate; }
.cima::before { content: ''; position: absolute; z-index: -1; top: 0; left: 0; right: 0; height: 72%; background: var(--cab-fondo); box-shadow: 0 0 0 100vmax var(--cab-fondo); clip-path: inset(0 -100vmax); }
.cima.sin-carrusel { display: none; }

.carrusel { position: relative; border-radius: var(--radio); overflow: hidden; background: var(--marca-oscura); box-shadow: 0 6px 8px -6px oklch(0.2 0.03 295 / .35); }
.car-pista { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.car-pista::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; display: grid; grid-template-columns: minmax(0, 1fr) 38%; align-items: center; gap: 14px; min-height: 236px; padding: 20px 18px 46px; color: #fff; position: relative; overflow: hidden; }
.slide.marca { background: var(--marca-oscura); }
.slide.coral { background: var(--coral-oscuro); }
.slide.oscuro { background: oklch(0.29 0.055 295); }
.slide.tinta { background: var(--tinta); }
.slide::after { content: ''; position: absolute; z-index: 0; right: -18%; bottom: -46%; width: 70%; aspect-ratio: 1; border-radius: 50%; background: oklch(1 0 0 / .06); pointer-events: none; }
.s-txt, .s-vis { position: relative; z-index: 1; min-width: 0; }
.s-txt { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.s-kick { font-size: 13px; font-weight: 600; color: oklch(1 0 0 / .82); }
.s-chip { display: inline-block; background: #fff; color: var(--coral-oscuro); font-weight: 800; font-size: 14px; padding: 3px 10px; border-radius: 8px; font-variant-numeric: tabular-nums; }
.s-tit { color: #fff; margin: 0; font-size: clamp(20px, 5.4vw, 38px); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.s-tit.grande { font-size: clamp(23px, 6.4vw, 50px); font-weight: 800; line-height: 1.02; letter-spacing: -0.03em; }
.s-precio { margin: 2px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.s-precio b { font-family: var(--display); font-size: clamp(24px, 6.4vw, 44px); font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1; }
.s-precio s { font-size: 14px; color: oklch(1 0 0 / .74); }
.s-bajada { margin: 0; font-size: 14px; color: oklch(1 0 0 / .86); max-width: 36ch; }
.s-cta { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; margin-top: 8px; border-radius: var(--radio-s); background: #fff; color: var(--tinta); font-weight: 700; font-size: 15px; transition: background-color .2s var(--ease), transform .2s var(--ease); }
.s-cta:hover { color: var(--tinta); background: oklch(0.95 0.01 295); }
.s-cta:active { transform: scale(.98); }
.s-vis { justify-self: end; width: 100%; max-width: 300px; aspect-ratio: 1; border-radius: 12px; background: #fff; display: grid; place-items: center; overflow: hidden; }
.s-vis img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
a.s-vis:hover img { transform: scale(1.04); }
.s-inicial { font-family: var(--display); font-weight: 800; font-size: clamp(56px, 16vw, 150px); line-height: 1; color: var(--marca); }
.slide.coral .s-inicial { color: var(--coral-oscuro); }
/* Diapositivas con foto: la imagen cubre todo el banner y el texto va sobre un degradado. */
.slide.con-foto { display: flex; align-items: flex-end; min-height: clamp(300px, 78vw, 340px); background: var(--tinta); }
.slide.con-foto::after { display: none; }
.s-foto { position: absolute; inset: 0; z-index: 0; }
.s-foto img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; display: block; }
.s-foto::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, oklch(0.18 0.03 295 / .9) 0%, oklch(0.18 0.03 295 / .55) 48%, oklch(0.18 0.03 295 / 0) 100%); }
.slide.con-foto .s-txt { max-width: 100%; padding-bottom: 6px; }
.slide.con-foto .s-chip { background: var(--coral); color: #fff; }
@media (min-width: 720px) {
  .slide.con-foto { align-items: center; }
  .s-foto::after { background: linear-gradient(to right, oklch(0.18 0.03 295 / .88) 0%, oklch(0.18 0.03 295 / .6) 42%, oklch(0.18 0.03 295 / 0) 78%); }
  .slide.con-foto .s-txt { max-width: min(520px, 55%); }
}
.s-vis.s-ico { background: oklch(1 0 0 / .1); border-radius: 50%; color: #fff; }
.s-vis.s-ico .ico-svg { width: 46%; height: 46%; stroke-width: 1.3; }

.car-ctrl { position: absolute; z-index: 2; left: 0; right: 0; bottom: 6px; display: flex; justify-content: center; align-items: center; gap: 4px; pointer-events: none; }
.car-ctrl > * { pointer-events: auto; }
.carrusel .car-btn { margin: 0; width: 36px; height: 36px; min-height: 36px; padding: 0; border-radius: 50%; background: transparent; color: #fff; display: none; }
.carrusel .car-btn:hover { background: oklch(1 0 0 / .16); }
.carrusel .car-btn .ico-svg { width: 18px; height: 18px; }
.carrusel .car-btn.prev .ico-svg { transform: scaleX(-1); }
.car-puntos { display: flex; align-items: center; }
.carrusel .car-punto { margin: 0; width: 26px; height: 36px; min-height: 36px; padding: 0; background: transparent; display: grid; place-items: center; }
.carrusel .car-punto:hover { background: transparent; }
.car-punto::before { content: ''; width: 8px; height: 8px; border-radius: 99px; background: oklch(1 0 0 / .45); transition: width .3s var(--ease), background-color .3s var(--ease); }
.car-punto[aria-current="true"]::before { width: 20px; background: #fff; }
.slide.esqueleto { background: var(--marca-oscura); }
.slide.esqueleto .lin { display: block; width: 80%; height: 16px; border-radius: 6px; margin: 4px 0; background: oklch(1 0 0 / .14); animation: none; }
.slide.esqueleto .lin.c { width: 45%; height: 40px; border-radius: 10px; margin-top: 12px; }
.slide.esqueleto .s-vis.lin { width: 100%; height: auto; background: oklch(1 0 0 / .1); }

/* Paneles blancos sobre el gris */
.panel { background: #fff; border-radius: var(--radio); box-shadow: var(--sombra); }
.inicio .seccion { margin: 12px 0; padding: 16px 16px 12px; }
.inicio .sec-titulo { align-items: center; margin-bottom: 12px; }
.inicio .sec-titulo h2 { font-size: clamp(19px, 4.8vw, 24px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; margin: 0; flex: 1; min-width: 0; }
.inicio .sec-titulo > a { color: var(--marca); font-weight: 600; }
.inicio .sec-titulo > a:hover { color: var(--marca-oscura); }
.t-chip { display: inline-block; background: var(--coral-oscuro); color: #fff; padding: 0 8px; border-radius: 7px; }

/* Accesos circulares */
.accesos { margin-top: 12px; padding: 14px 0 10px; }
.acc-lista { display: flex; justify-content: space-evenly; gap: 2px; overflow-x: auto; padding: 0 8px; scrollbar-width: none; overscroll-behavior-x: contain; scroll-snap-type: x proximity; }
.acc-lista::-webkit-scrollbar { display: none; }
.acc { flex: 0 0 80px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px 2px; color: var(--texto); text-align: center; border-radius: var(--radio-s); }
.acc:hover { color: var(--tinta); }
.acc-ico { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--hundido); color: var(--tinta); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.acc-ico .ico-svg { width: 26px; height: 26px; }
.acc:hover .acc-ico { transform: translateY(-2px); box-shadow: 0 4px 8px -4px oklch(0.2 0.02 290 / .3); }
.acc-ico.t1 { background: var(--marca-suave); color: var(--marca-oscura); }
.acc-ico.t2 { background: var(--coral-suave); color: var(--coral-oscuro); }
.acc-ico.t3 { background: var(--ambar-suave); color: var(--ambar-texto); }
.acc-ico.t4 { background: var(--azul-suave); color: var(--azul-oscuro); }
.acc-n { font-size: 12.5px; font-weight: 500; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.acc.esqueleto .lin { display: block; width: 56px; height: 10px; border-radius: 6px; margin: 0; }
.acc.esqueleto .acc-ico.lin { height: 56px; border-radius: 50%; }

/* Beneficios: deslizables en móvil, cuatro columnas en escritorio */
.beneficios-ini { display: grid; grid-auto-flow: column; grid-auto-columns: 80%; gap: 10px; margin: 12px -16px 0; padding: 0 16px 2px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px; scrollbar-width: none; }
.beneficios-ini::-webkit-scrollbar { display: none; }
.benef-ini { scroll-snap-align: start; display: flex; gap: 12px; align-items: flex-start; padding: 16px; background: #fff; border-radius: var(--radio); box-shadow: var(--sombra); color: var(--texto); transition: box-shadow .2s var(--ease); }
.benef-ini:hover { color: var(--texto); box-shadow: var(--sombra-alta); }
.b-ico { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--marca-suave); color: var(--marca); }
.b-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.benef-ini b { color: var(--tinta); font-size: 15px; }
.benef-ini .d { font-size: 14px; color: var(--gris); line-height: 1.4; }
.b-cta { margin-top: 6px; font-size: 14px; font-weight: 600; color: var(--marca); }
.benef-ini:hover .b-cta { color: var(--marca-oscura); text-decoration: underline; text-underline-offset: 3px; }

/* Rieles de productos dentro de paneles */
.inicio .riel { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 42%; gap: 12px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 6px; scroll-padding: 0 16px; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.inicio .riel::-webkit-scrollbar { display: none; }
.inicio .riel > * { scroll-snap-align: start; min-width: 0; }
.inicio .card .foto { border-radius: var(--radio-s); }
.inicio .card .precio { font-size: 19px; }
.riel-nav { display: none; gap: 6px; flex: none; }
.riel-nav[hidden] { display: none !important; }
.inicio .riel-btn { margin: 0; width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 50%; background: #fff; color: var(--tinta); border: 1px solid var(--borde-fuerte); transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease); }
.inicio .riel-btn:hover { background: var(--marca); border-color: var(--marca); color: #fff; }
.inicio .riel-btn:disabled { background: transparent; color: var(--borde-fuerte); border-color: var(--borde); }
.inicio .riel-btn .ico-svg { width: 18px; height: 18px; }
.inicio .riel-btn.prev .ico-svg { transform: scaleX(-1); }
.rejilla { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }

/* Tiendas destacadas */
.inicio .tiendas-ini { grid-auto-columns: 132px; gap: 10px; }
.tienda-ini { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px; border: 1px solid var(--borde); border-radius: 12px; text-align: center; color: var(--texto); transition: border-color .2s var(--ease); }
.tienda-ini:hover { border-color: var(--marca); color: var(--texto); }
.tienda-ini .av { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: var(--hundido); color: var(--tinta); font-family: var(--display); font-weight: 800; font-size: 26px; }
.tienda-ini .av img { width: 100%; height: 100%; object-fit: cover; }
.tienda-ini .av.t1 { background: var(--marca-suave); color: var(--marca-oscura); }
.tienda-ini .av.t2 { background: var(--coral-suave); color: var(--coral-oscuro); }
.tienda-ini .av.t3 { background: var(--ambar-suave); color: var(--ambar-texto); }
.tienda-ini .av.t4 { background: var(--azul-suave); color: var(--azul-oscuro); }
.tienda-ini b { font-size: 14px; color: var(--tinta); line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tienda-ini.esqueleto .lin { display: block; width: 80%; height: 12px; border-radius: 6px; margin: 0; }
.tienda-ini.esqueleto .av.lin { width: 64px; height: 64px; border-radius: 50%; }

/* Invitación a vender */
.cta-vender { display: grid; gap: 22px; background: var(--marca); color: #fff; border-radius: var(--radio); padding: 28px 20px; margin: 12px 0; }
.cta-vender h2 { color: #fff; font-size: clamp(26px, 7vw, 42px); line-height: 1.04; letter-spacing: -0.03em; font-weight: 800; margin: 0 0 10px; max-width: 14ch; }
.cta-vender p { margin: 0; color: oklch(1 0 0 / .86); max-width: 44ch; }
.cta-vender ul { list-style: none; margin: 0; padding: 18px 0 0; display: grid; gap: 12px; font-size: 15px; border-top: 1px solid oklch(1 0 0 / .18); }
.cta-vender li { display: flex; gap: 10px; align-items: center; }
.cta-vender li::before { content: ''; width: 20px; height: 20px; border-radius: 50%; flex: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23266b5c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 12px no-repeat; }
.inicio .cta-vender .btn { background: var(--coral-oscuro); color: #fff; margin-top: 20px; min-height: 48px; padding: 0 22px; }
.inicio .cta-vender .btn:hover { background: #fff; color: var(--marca-oscura); }

/* Estados vacío / error */
.ini-estado { text-align: center; padding: 48px 20px; margin: 12px 0; background: #fff; border-radius: var(--radio); color: var(--texto); }
.ini-estado-ico { width: 56px; height: 56px; border-radius: 50%; background: var(--marca-suave); color: var(--marca); display: grid; place-items: center; margin: 0 auto 14px; }
.ini-estado-ico .ico-svg { width: 26px; height: 26px; }
.ini-estado h2 { font-size: 22px; margin: 0 0 6px; }
.ini-estado p { margin: 0 auto; max-width: 40ch; color: var(--gris); }

@media (min-width: 640px) {
  .inicio .riel { grid-auto-columns: calc((100% - 3 * 12px) / 3.5); }
  .rejilla { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .beneficios-ini { grid-auto-columns: minmax(280px, 1fr); }
  .cta-vender { grid-template-columns: 1.3fr 1fr; align-items: end; padding: 40px; }
  .cta-vender ul { border-top: 0; padding: 0 0 0 28px; border-left: 1px solid oklch(1 0 0 / .18); }
  .slide { padding: 28px 28px 48px; gap: 24px; min-height: 280px; }
}

@media (min-width: 960px) {
  .cima { padding-top: 14px; }
  .slide { grid-template-columns: minmax(0, 1fr) minmax(0, 320px); min-height: 360px; padding: 40px 64px 52px; gap: 40px; }
  .s-txt { gap: 10px; }
  .s-kick, .s-bajada { font-size: 16px; }
  .s-cta { min-height: 48px; padding: 0 24px; margin-top: 12px; }
  .carrusel .car-btn { display: grid; place-items: center; }
  .car-ctrl { bottom: 8px; }
  .accesos { margin-top: 16px; padding: 18px 8px 12px; }
  .acc-lista { justify-content: space-evenly; }
  .acc { flex: 0 1 112px; max-width: 120px; }
  .acc-ico { width: 64px; height: 64px; }
  .acc-ico .ico-svg { width: 28px; height: 28px; }
  .acc-n { font-size: 13.5px; }
  .beneficios-ini { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 16px 0 0; padding: 0; overflow: visible; gap: 16px; }
  .inicio .seccion { margin: 16px 0; padding: 22px 24px 16px; }
  .inicio .riel { grid-auto-columns: calc((100% - 5 * 16px) / 6); gap: 16px; margin: 0; padding: 0 0 6px; scroll-padding: 0; }
  .inicio .tiendas-ini { grid-auto-columns: calc((100% - 6 * 12px) / 7); gap: 12px; }
  .rejilla { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 24px 16px; }
  .cta-vender { padding: 56px; margin: 16px 0; }
}
@media (min-width: 960px) and (hover: hover) {
  .riel-nav { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
  .acc:hover .acc-ico, a.s-vis:hover img { transform: none; }
}


/* Hero antiguo (compatibilidad) */
.hero { position: relative; border-radius: var(--radio); overflow: hidden; height: 240px; }
.hero .slide { position: absolute; inset: 0; display: flex; align-items: center; padding: 0 24px; opacity: 0; transition: opacity .6s; color: #fff; background: var(--marca); }
.hero .slide.activo { opacity: 1; z-index: 1; }
.btn-hero { background: #fff; color: var(--tinta); padding: 12px 22px; border-radius: 10px; font-weight: 700; display: inline-block; }

/* Beneficios (compatibilidad) */
.beneficios { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin: 0 0 24px; }
.benef { background: #fff; border-radius: var(--radio); border: 1px solid var(--borde); padding: 16px; color: var(--texto); display: block; }
.benef .ico { font-size: 28px; display: block; margin-bottom: 6px; }
.benef b { display: block; font-size: 15px; margin-bottom: 4px; }
.benef span.d { font-size: 14px; color: var(--gris); }

/* Categorías / tiendas (iconos) */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.cat-item { text-align: center; padding: 14px 10px; border: 1px solid var(--borde); border-radius: var(--radio); color: var(--texto); background: #fff; transition: border-color .2s var(--ease); }
.cat-item:hover { border-color: var(--marca); color: var(--marca-oscura); }
.cat-item .ico { font-size: 28px; display: block; margin-bottom: 4px; }
.cat-item span { font-size: 14px; }

/* =========================================================
   Tarjeta de producto: foto protagonista, sin caja
   ========================================================= */
.fila-scroll, .grid, .grid4 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
.card { position: relative; background: transparent; display: flex; flex-direction: column; }
.card .foto { position: relative; aspect-ratio: 1 / 1; background: var(--hundido); border-radius: var(--radio); display: flex; align-items: center; justify-content: center; overflow: hidden; color: oklch(0.72 0.03 295); font-family: var(--display); font-size: 52px; font-weight: 800; }
.card .foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .foto img { transform: scale(1.04); }
.card .cuerpo { padding: 10px 2px 0; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.card .nombre { font-family: var(--fuente); font-size: 14px; color: var(--texto); font-weight: 500; margin: 0; line-height: 1.35; min-height: 2.7em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; letter-spacing: 0; }
.card a:hover .nombre { color: var(--marca); }
.card .marca { font-size: 12px; color: var(--gris); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; order: 5; }
.card .marca a { color: var(--gris); }
.card .marca b { color: var(--texto); font-weight: 600; }
.card .envio-linea { font-size: 13px; font-weight: 600; color: var(--verde); }
.precio { font-family: var(--display); font-size: 20px; font-weight: 700; color: var(--tinta); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.precio small { font-size: 13px; }
.por-tienda { font-size: 12px; color: var(--gris); }
.tag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 6px; width: fit-content; font-weight: 600; background: var(--hundido); color: var(--texto); }
.tag.destacado { background: var(--marca); color: #fff; }
.tag.agotado { background: var(--rojo-suave); color: var(--rojo); }
.tag.ok { background: var(--verde-suave); color: var(--verde); }
.tag.aviso { background: var(--ambar-suave); color: var(--ambar-texto); }
.tag.persona { background: var(--azul-suave); color: var(--azul-oscuro); }
.tag.empresa { background: var(--ambar-suave); color: var(--ambar-texto); }
.tag.shop { background: var(--verde-suave); color: oklch(0.40 0.11 152); }
.verde { color: var(--verde); }
.insignia { position: absolute; left: 8px; top: 8px; background: var(--tinta); color: #fff; font-family: var(--fuente); font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; letter-spacing: 0; }
.insignia.azul { background: var(--azul); }
.insignia.rojo { background: var(--rojo); }
.insignia.verde-i { background: var(--coral-oscuro); }
.insignia.gris { background: oklch(0.42 0.01 290); }
.fav { position: absolute; top: 6px; right: 6px; z-index: 2; width: 44px; height: 44px; min-height: 44px; padding: 0; margin: 0; border-radius: 50%; background: oklch(1 0 0 / .92); color: var(--tinta); font-size: 20px; line-height: 44px; border: 0; box-shadow: var(--sombra); transition: transform .2s var(--ease), color .2s; }
.fav:hover { background: #fff; color: var(--coral-oscuro); transform: scale(1.06); }
.fav.activo { color: var(--coral-oscuro); }
.patrocinado { font-size: 12px; color: var(--gris); }
.precio-antes { font-size: 13px; color: var(--gris); text-decoration: line-through; }
.dto { font-family: var(--fuente); font-size: 13px; color: var(--coral-oscuro); font-weight: 700; letter-spacing: 0; }
.rating, .vendidos { font-size: 12px; color: var(--gris); }
.envio-linea.gris { color: var(--gris); font-weight: 500; }
.estrellas { color: oklch(0.72 0.15 70); letter-spacing: 1px; font-size: 13px; }
.estrellas .vacias { color: var(--borde-fuerte); }
.punto-rep { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 3px; vertical-align: middle; }

/* Esqueletos de carga */
.esqueleto { pointer-events: none; }
.esqueleto .foto, .esqueleto .lin { background: linear-gradient(90deg, var(--hundido) 0%, oklch(0.93 0.006 295) 50%, var(--hundido) 100%); background-size: 200% 100%; animation: brillo 1.4s ease-in-out infinite; }
.esqueleto .lin { height: 12px; border-radius: 6px; margin: 4px 0; }
.esqueleto .lin.c { width: 55%; height: 18px; }
@keyframes brillo { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* =========================================================
   Listado / búsqueda
   ========================================================= */
.listado { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
.filtros { padding: 4px; }
.filtros h3 { font-family: var(--fuente); font-size: 14px; margin: 18px 0 6px; font-weight: 700; color: var(--tinta); }
.filtros h3:first-child { margin-top: 0; }
.filtros a.f { display: flex; align-items: center; min-height: 40px; color: var(--texto); font-size: 15px; padding: 4px 10px; margin: 0 -10px; border-radius: 8px; }
.filtros a.f:hover { color: var(--marca-oscura); background: var(--marca-suave); }
.filtros a.f.activo { font-weight: 700; color: var(--marca-oscura); background: var(--marca-suave); }
.filtros .rango { display: flex; gap: 6px; align-items: center; }
.filtros .rango input { width: 100px; margin: 0; padding: 10px; }
.cab-lista { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.cab-lista h1 { margin: 0; font-size: 22px; }
.cab-lista select { width: auto; margin: 0 0 0 6px; padding: 9px 12px; }
.item-lista { display: grid; grid-template-columns: 110px 1fr; gap: 14px; padding: 14px; border-bottom: 1px solid var(--borde); }
.item-lista:last-child { border-bottom: 0; }
.item-lista .foto { aspect-ratio: 1/1; background: var(--hundido); border-radius: var(--radio-s); display: flex; align-items: center; justify-content: center; overflow: hidden; font-size: 34px; font-weight: 700; color: oklch(0.72 0.03 295); }
.item-lista .foto img { width: 100%; height: 100%; object-fit: cover; }
.item-lista h3 { font-family: var(--fuente); font-size: 16px; font-weight: 500; margin: 0 0 4px; }
.item-lista h3 a { color: var(--texto); }
.item-lista h3 a:hover { color: var(--marca); }
.item-lista .precio { font-size: 20px; }
.item-lista .desc { font-size: 14px; color: var(--gris); margin: 4px 0; max-height: 2.8em; overflow: hidden; }
.chips-filtro { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chips-filtro a, .relacionadas a { background: #fff; border: 1px solid var(--borde); border-radius: 999px; padding: 0 14px; min-height: 38px; display: inline-flex; align-items: center; font-size: 14px; color: var(--texto); }
.chips-filtro a:hover, .relacionadas a:hover { border-color: var(--marca); color: var(--marca-oscura); }
.relacionadas { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.cat-detectada { font-size: 14px; color: var(--gris); margin-bottom: 8px; }
.paginacion { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 28px 0 6px; }
.pag { min-width: 44px; min-height: 44px; padding: 0 14px; border-radius: 10px; background: #fff; border: 1px solid var(--borde); color: var(--texto); font-size: 14px; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.pag:hover { border-color: var(--marca); color: var(--marca-oscura); }
.pag.activo { background: var(--tinta); border-color: var(--tinta); color: #fff; }
#det-filtros > summary { cursor: pointer; background: #fff; padding: 0 16px; min-height: 48px; display: flex; align-items: center; justify-content: space-between; border-radius: var(--radio); border: 1px solid var(--borde); font-weight: 600; list-style: none; color: var(--tinta); }
#det-filtros > summary::-webkit-details-marker { display: none; }
#det-filtros > summary::after { content: '+'; font-size: 22px; font-weight: 400; color: var(--gris); }
#det-filtros[open] > summary::after { content: '−'; }
#det-filtros[open] > summary { margin-bottom: 8px; }

/* =========================================================
   Ficha de producto
   ========================================================= */
.ficha { display: grid; grid-template-columns: 1fr; gap: 14px; align-items: start; }
.miniaturas { display: flex; flex-direction: row; order: 2; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.miniaturas button { width: 64px; height: 64px; min-height: 0; flex: none; padding: 0; margin: 0; border: 2px solid transparent; background: var(--hundido); border-radius: var(--radio-s); cursor: pointer; overflow: hidden; font-weight: 700; color: oklch(0.72 0.03 295); }
.miniaturas button.activo, .miniaturas button:hover { border-color: var(--marca); background: var(--hundido); }
.miniaturas img { width: 100%; height: 100%; object-fit: cover; }
.foto-principal { aspect-ratio: 1/1; max-height: 600px; background: var(--hundido); border-radius: var(--radio); display: flex; align-items: center; justify-content: center; overflow: hidden; font-family: var(--display); font-size: 120px; font-weight: 800; color: oklch(0.78 0.03 295); }
.foto-principal img { width: 100%; height: 100%; object-fit: contain; }
.buybox { padding: 18px 16px; }
.buybox .estado, .buybox .estado-linea { font-size: 14px; color: var(--gris); background: none; padding: 0; }
.buybox h1 { font-size: 24px; margin: 6px 0 10px; line-height: 1.2; }
.buybox .precio { font-size: 32px; margin: 6px 0; }
.opciones { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.opcion { border: 1px solid var(--borde-fuerte); background: #fff; border-radius: var(--radio-s); padding: 0 16px; min-height: 44px; cursor: pointer; font-size: 15px; margin: 0; font-weight: 500; color: var(--texto); }
.opcion:hover { border-color: var(--marca); background: #fff; color: var(--marca-oscura); }
.opcion.activo { box-shadow: inset 0 0 0 1px var(--marca); border-color: var(--marca); color: var(--marca-oscura); background: var(--marca-suave); }
.opcion:disabled { opacity: .45; text-decoration: line-through; cursor: not-allowed; background: #fff; }
.vendedor-caja { border: 1px solid var(--borde); border-radius: var(--radio-s); padding: 14px; margin-top: 16px; font-size: 15px; }
.garantias { font-size: 14px; color: var(--gris); margin: 12px 0 0; padding: 0; list-style: none; }
.garantias li { margin: 4px 0; }
.desc-larga { white-space: pre-wrap; font-size: 16px; line-height: 1.7; color: var(--texto); max-width: 70ch; }
.carac { width: 100%; border-collapse: collapse; font-size: 15px; border-radius: var(--radio-s); overflow: hidden; }
.carac th { text-align: left; background: var(--fondo); width: 40%; padding: 11px 14px; font-weight: 600; color: var(--tinta); }
.carac td { padding: 11px 14px; }
.carac tr { border-bottom: 1px solid var(--borde); }
.carac tr:last-child { border-bottom: 0; }
.banner-tienda { height: 120px; border-radius: var(--radio) var(--radio) 0 0; background: var(--marca); position: relative; overflow: visible; }
#banner .banner-tienda { border-radius: var(--radio); }
.banner-tienda .logo-t { position: absolute; left: 16px; bottom: -28px; width: 80px; height: 80px; border-radius: 16px; background: #fff; border: 3px solid #fff; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 32px; font-weight: 800; color: var(--marca); box-shadow: var(--sombra-alta); overflow: hidden; }
.banner-tienda .nombre-t { position: absolute; left: 112px; bottom: 12px; right: 12px; color: #fff; font-family: var(--display); font-weight: 700; font-size: 19px; line-height: 1.2; }
.fila-migas { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 14px; margin: 2px 0 12px; }
.fila-migas .izq a + a::before { content: '›'; margin: 0 8px; color: var(--gris); }
.progreso-envio { border: 1px solid var(--borde); border-radius: var(--radio-s); padding: 12px; margin: 12px 0; font-size: 14px; }
.ficha-garantias { margin-top: 14px; display: grid; gap: 10px; font-size: 14px; }
.ficha-garantias div { display: flex; gap: 8px; }
.rep-mini { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-top: 6px; }
.pista-rep { font-size: 13px; }
.preg { padding: 12px 0; border-bottom: 1px solid var(--borde); }
.preg:last-child { border-bottom: 0; }
.preg .r { margin: 4px 0 0 16px; color: var(--gris); font-size: 15px; }
.barra-envio { background: var(--verde-suave); color: oklch(0.36 0.1 152); border-radius: var(--radio-s); padding: 10px 14px; margin: 8px 0 4px; font-size: 14px; }
.barra-envio .pista { color: inherit; opacity: .85; }
.barra-envio.falta { background: var(--marca-suave); color: var(--marca-oscura); }
.barra-envio label { min-height: 40px; }

/* =========================================================
   Formularios y botones
   ========================================================= */
label { display: block; margin-top: 16px; font-size: 14px; font-weight: 600; color: var(--tinta); }
input, select, textarea { font: inherit; font-size: 16px; padding: 11px 13px; margin-top: 6px; width: 100%; min-height: 46px; border: 1px solid var(--borde-fuerte); border-radius: var(--radio-s); background: #fff; color: var(--tinta); transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 0; }
input::placeholder, textarea::placeholder { color: var(--gris); }
input:hover, select:hover, textarea:hover { border-color: oklch(0.68 0.02 290); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--marca); box-shadow: 0 0 0 3px var(--marca-suave); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; padding: 0; accent-color: var(--marca); vertical-align: middle; }
input[type=file] { min-height: 0; }
button, .btn { font: inherit; font-weight: 600; font-size: 15px; margin-top: 16px; background: var(--marca); color: #fff; border: 0; padding: 0 20px; border-radius: var(--radio-s); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-align: center; transition: background-color .15s, color .15s, transform .1s; min-height: 46px; line-height: 1.2; }
button:hover, .btn:hover { background: var(--marca-oscura); color: #fff; }
button:active, .btn:active { transform: translateY(1px); }
button:disabled { background: oklch(0.88 0.006 290); color: oklch(0.5 0.01 290); cursor: not-allowed; }
.btn-sec, button.secundario { background: var(--marca-suave); color: var(--marca-oscura); }
.btn-sec:hover, button.secundario:hover { background: var(--marca-linea); color: var(--marca-oscura); }
.btn-ancho { display: flex; width: 100%; }
button.peligro { background: var(--rojo); }
button.peligro:hover { background: oklch(0.45 0.18 27); }
button.chico { padding: 0 14px; font-size: 14px; margin: 0; min-height: 40px; }
button.chip { margin: 0; background: #fff; color: var(--texto); border: 1px solid var(--borde-fuerte); padding: 0 16px; border-radius: 999px; font-weight: 500; min-height: 40px; }
button.chip:hover { border-color: var(--marca); color: var(--marca-oscura); background: #fff; }
button.chip.activo { background: var(--tinta); color: #fff; border-color: var(--tinta); }
.pill { border: 1px solid var(--borde-fuerte); border-radius: 999px; padding: 0 16px; min-height: 44px; font-size: 14px; background: #fff; color: var(--texto); margin: 0; font-weight: 500; }
.pill:hover { background: var(--marca-suave); color: var(--marca-oscura); }
.fila { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.vacio { color: var(--gris); text-align: center; padding: 48px 16px; }
.vacio h2 { margin-top: 8px; }
.toast { position: fixed; bottom: calc(var(--alto-nav) + 16px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); background: var(--tinta); color: #fff; padding: 12px 20px; border-radius: 12px; z-index: var(--z-toast); box-shadow: var(--sombra-alta); max-width: calc(100vw - 32px); font-weight: 500; animation: entrar .35s var(--ease); }
.toast.error { background: var(--rojo); }
.toast.ok { background: var(--verde); }
@keyframes entrar { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabla th, .tabla td { padding: 10px 8px; border-bottom: 1px solid var(--borde); text-align: left; vertical-align: middle; }
.tabla input { margin: 0; padding: 6px; width: 100px; }
.pestanas { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.pestanas::-webkit-scrollbar { display: none; }
.pestanas > * { flex: none; }
.nota { font-size: 13px; color: var(--gris); font-weight: 400; display: block; margin-top: 2px; }
.pista { font-size: 14px; color: var(--gris); }
.aviso-caja { padding: 12px 16px; border-radius: var(--radio-s); background: var(--ambar-suave); color: var(--ambar-texto); margin-bottom: 14px; font-size: 14px; }
.aviso-caja.rojo { background: var(--rojo-suave); color: oklch(0.42 0.15 27); }
.aviso-caja.verde { background: var(--verde-suave); color: oklch(0.36 0.1 152); }
.aviso-caja.azul { background: var(--marca-suave); color: var(--marca-oscura); }

/* =========================================================
   Carrito / checkout
   ========================================================= */
.carrito-grid { display: grid; grid-template-columns: 1fr; gap: 14px; align-items: start; }
@media (max-width: 959px) {
  /* En móvil: productos, a quién se lo enviamos y, con esos datos, el envío y el total */
  #grid-carrito > section { display: contents; }
  #grid-carrito #caja-items { order: 1; margin-bottom: 0; }
  #grid-carrito #form-checkout { order: 2; margin-bottom: 0; }
  #grid-carrito #resumen { order: 3; }
}
.linea { display: grid; grid-template-columns: 72px 1fr; gap: 12px 14px; padding: 16px 0; border-bottom: 1px solid var(--borde); align-items: center; }
.linea:last-child { border-bottom: 0; }
.linea > :last-child { grid-column: 1 / -1; }
.linea .foto { width: 72px; height: 72px; background: var(--hundido); border-radius: var(--radio-s); overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 30px; color: oklch(0.72 0.03 295); font-weight: 700; }
.linea .foto img { width: 100%; height: 100%; object-fit: cover; }
.cantidad { display: inline-flex; align-items: center; border: 1px solid var(--borde-fuerte); border-radius: var(--radio-s); overflow: hidden; background: #fff; }
.cantidad button { margin: 0; background: #fff; color: var(--marca-oscura); padding: 0; width: 44px; border-radius: 0; font-size: 18px; min-height: 42px; }
.cantidad button:hover { background: var(--marca-suave); color: var(--marca-oscura); }
.cantidad span { min-width: 32px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.resumen { padding: 18px 16px; }
.resumen .fila-r { display: flex; justify-content: space-between; gap: 12px; margin: 8px 0; font-variant-numeric: tabular-nums; }
/* Opciones de envío dentro del resumen de compra */
.envio-bloque { margin: 14px 0; padding-top: 12px; border-top: 1px solid var(--borde); }
.envio-tit { font-size: 14px; margin-bottom: 8px; color: var(--tinta); }
.envio-op { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 12px; margin: 6px 0 0; border: 1.5px solid var(--borde-fuerte); border-radius: var(--radio-s); background: #fff; cursor: pointer; font-weight: 400; transition: border-color .15s var(--ease), background .15s var(--ease); }
.envio-op:hover { border-color: var(--marca-linea); }
.envio-op.sel { border-color: var(--marca); background: var(--marca-suave); }
.envio-op:has(input:focus-visible) { outline: 3px solid var(--marca-linea); outline-offset: 2px; }
.envio-op input { width: auto; margin: 0; accent-color: var(--marca); }
.envio-txt { flex: 1; display: flex; flex-direction: column; gap: 1px; line-height: 1.25; }
.envio-txt small { color: var(--gris); font-size: 13px; }
.envio-precio { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.envio-precio.gratis { color: var(--verde); }
.envio-error { margin: 0; padding: 10px 12px; border-radius: var(--radio-s); background: var(--rojo-suave); color: var(--rojo); font-size: 14px; }
.resumen .total { font-family: var(--display); font-size: 22px; font-weight: 700; color: var(--tinta); border-top: 1px solid var(--borde); padding-top: 12px; margin-top: 12px; }

/* =========================================================
   Registro / Vender
   ========================================================= */
.tipos { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.tipo { position: relative; border: 1px solid var(--borde-fuerte); border-radius: var(--radio); padding: 16px 16px 16px 48px; cursor: pointer; background: #fff; text-align: left; margin: 0; color: var(--texto); font-weight: 400; display: block; min-height: 0; line-height: 1.45; transition: border-color .15s var(--ease), background-color .15s var(--ease); }
.tipo::before { content: ''; position: absolute; left: 16px; top: 18px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--borde-fuerte); background: #fff; transition: border .15s var(--ease); }
.tipo:hover { border-color: var(--marca); background: #fff; color: var(--texto); }
.tipo.activo { border-color: var(--marca); background: var(--marca-suave); box-shadow: inset 0 0 0 1px var(--marca); }
.tipo.activo::before { border-color: var(--marca); background: var(--marca); box-shadow: inset 0 0 0 3px #fff; }
.tipo:disabled { background: #fff; }
.tipo .ico { font-size: 26px; display: block; margin-bottom: 2px; }
.tipo b { display: block; font-family: var(--display); font-size: 17px; margin: 0 0 4px; color: var(--tinta); }
.tipo span.d { font-size: 14px; color: var(--gris); display: block; }
.tipo span.d strong { color: var(--tinta); }
.tipo ul { padding-left: 18px; margin: 8px 0 0; font-size: 14px; color: var(--texto); }
.pasos { display: flex; gap: 6px; margin-bottom: 0; overflow-x: auto; scrollbar-width: none; }
.pasos::-webkit-scrollbar { display: none; }
.paso { flex: 1; min-width: 84px; text-align: center; font-size: 13px; color: var(--gris); padding: 10px 4px; border-bottom: 3px solid var(--borde); white-space: nowrap; }
.paso.activo { color: var(--marca-oscura); border-color: var(--marca); font-weight: 700; }
.paso.hecho { color: var(--verde); border-color: var(--verde); }
.zona-fotos { border: 2px dashed var(--marca-linea); border-radius: var(--radio); padding: 20px 16px; text-align: center; background: var(--fondo); margin-top: 6px; }
.fotos-prev { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; justify-content: center; }
.fotos-prev .fp { position: relative; width: 92px; height: 92px; border-radius: var(--radio-s); overflow: hidden; border: 1px solid var(--borde); }
.fotos-prev .fp:first-child { outline: 2px solid var(--marca); outline-offset: 2px; }
.fotos-prev img { width: 100%; height: 100%; object-fit: cover; }
.fotos-prev .fp button { position: absolute; top: 2px; right: 2px; width: 32px; height: 32px; padding: 0; margin: 0; min-height: 0; border-radius: 50%; background: oklch(0.2 0.01 290 / .72); font-size: 16px; }
.planes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.hero-vender { padding: 20px 0 4px; }
.hero-vender h1 { font-size: clamp(26px, 5vw, 38px); font-weight: 800; letter-spacing: -0.025em; }
.caja-publicar { background: #fff; border-radius: var(--radio); border: 1px solid var(--borde-fuerte); padding: 14px 16px; margin: 16px 0; text-align: left; transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.caja-publicar:focus-within { border-color: var(--marca); box-shadow: 0 0 0 3px var(--marca-suave); }
.caja-publicar input { border: 0; font-size: 18px; padding: 8px 0; box-shadow: none; margin: 0; }
.caja-publicar input:focus { box-shadow: none; }
.caja-publicar .fila-bot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--borde); }

/* Publicar: tipo + entrega con el resumen de cargos siempre a la vista */
.cols-cargos { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
.resumen-plegable { position: sticky; bottom: calc(var(--alto-nav) + env(safe-area-inset-bottom) + 8px); z-index: 5; background: #fff; border: 1px solid var(--marca-linea); border-radius: var(--radio); box-shadow: 0 -2px 8px oklch(0.2 0.02 290 / .1); }
.resumen-plegable > summary { list-style: none; cursor: pointer; min-height: 48px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; font-weight: 700; color: var(--marca-oscura); }
.resumen-plegable > summary::-webkit-details-marker { display: none; }
.resumen-plegable > summary::after { content: ''; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-135deg) translate(-2px, -2px); transition: transform .2s var(--ease); }
.resumen-plegable[open] > summary::after { transform: rotate(45deg); }
.resumen-plegable > aside { margin: 0; border-radius: 0 0 var(--radio) var(--radio); }
.resumen-plegable > aside > b:first-child { display: none; }
#resumen-lateral .tabla-datos td, #resumen-costos .tabla-datos td { background: transparent; border-color: var(--marca-linea); padding: 8px 4px; }
#resumen-lateral .tabla-datos tr:last-child td, #resumen-costos .tabla-datos tr:last-child td { border-bottom: 0; font-size: 16px; }

/* =========================================================
   Paneles (vendedor y administrador)
   ========================================================= */
.app { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.app > * { min-width: 0; }
.menu-lateral { position: static; display: flex; overflow-x: auto; padding: 6px; gap: 4px; scrollbar-width: none; }
.menu-lateral::-webkit-scrollbar { display: none; }
.menu-lateral button { display: flex; flex: none; width: auto; white-space: nowrap; justify-content: space-between; gap: 8px; align-items: center; margin: 0; padding: 0 12px; background: none; color: var(--texto); border-radius: 8px; text-align: left; font-weight: 500; min-height: 44px; }
.menu-lateral button:hover { background: var(--fondo); color: var(--tinta); }
.menu-lateral button.activo { background: var(--marca-suave); color: var(--marca-oscura); font-weight: 700; }
.menu-lateral .n { background: var(--coral); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; font-weight: 700; }
.menu-lateral .sep { display: none; height: 1px; background: var(--borde); margin: 6px 4px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { background: #fff; border-radius: var(--radio); border: 1px solid var(--borde); padding: 14px 16px; position: relative; }
.kpi .t { font-size: 13px; color: var(--gris); display: flex; align-items: center; gap: 6px; }
.kpi .v { font-family: var(--display); font-size: 26px; font-weight: 700; margin: 4px 0 2px; color: var(--tinta); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.kpi .s { font-size: 13px; color: var(--gris); }
.kpi.alerta { background: var(--rojo-suave); border-color: oklch(0.88 0.06 27); }
.kpi.ok { background: var(--verde-suave); border-color: oklch(0.88 0.06 152); }
.kpi.azul { background: var(--azul-suave); border-color: oklch(0.88 0.05 270); }
.tabla-datos { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabla-datos th { text-align: left; font-size: 12px; font-weight: 600; color: var(--gris); padding: 10px; border-bottom: 1px solid var(--borde); white-space: nowrap; background: var(--fondo); }
.tabla-datos td { padding: 10px; border-bottom: 1px solid var(--borde); vertical-align: middle; }
.tabla-datos tr:hover td { background: var(--fondo); }
.tabla-datos input, .tabla-datos select { margin: 0; padding: 6px 8px; font-size: 14px; width: 100%; min-width: 70px; min-height: 38px; }
.tabla-datos input[type=checkbox] { width: 20px; min-width: 0; min-height: 0; }
.tabla-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* en pantallas angostas, toda tabla sin envoltorio se desplaza dentro de su caja en vez de ensanchar la página */
@media (max-width: 760px) {
  :not(.tabla-scroll) > .tabla-datos { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.estado { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 6px; background: var(--hundido); color: var(--gris); white-space: nowrap; }
.estado.pendiente, .estado.abierto, .estado.solicitado, .estado.pausado, .estado.en_mediacion { background: var(--ambar-suave); color: var(--ambar-texto); }
.estado.pagado, .estado.activo, .estado.emitido, .estado.activa { background: var(--azul-suave); color: var(--azul-oscuro); }
.estado.enviado { background: oklch(0.95 0.03 300); color: oklch(0.42 0.14 300); }
.estado.entregado, .estado.resuelto_vendedor, .estado.resuelto_comprador { background: var(--verde-suave); color: oklch(0.40 0.11 152); }
.estado.cancelado, .estado.devuelto, .estado.suspendido, .estado.rechazado, .estado.bloqueado, .estado.vencido, .estado.anulado, .estado.pausada { background: var(--rojo-suave); color: oklch(0.45 0.16 27); }
.barra { height: 10px; background: var(--borde); border-radius: 999px; overflow: hidden; }
.barra > i { display: block; height: 100%; background: var(--verde); border-radius: 999px; }
.termometro { display: flex; gap: 4px; margin: 12px 0 6px; }
.termometro span { flex: 1; height: 12px; border-radius: 4px; opacity: .28; }
.termometro span.act { opacity: 1; outline: 2px solid var(--tinta); outline-offset: 2px; }
.pedido-card { padding: 16px; margin-bottom: 12px; }
.pedido-card .cab { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.pedido-card ul { margin: 8px 0; padding-left: 18px; font-size: 14px; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.modal-fondo { position: fixed; inset: 0; background: oklch(0.2 0.02 290 / .5); z-index: var(--z-modal-fondo); display: flex; align-items: flex-end; justify-content: center; padding: 24px 0 0; overflow-y: auto; animation: fundido .2s ease-out; }
.modal { background: #fff; border-radius: 18px 18px 0 0; padding: 22px 16px calc(22px + env(safe-area-inset-bottom)); width: 100%; max-width: 720px; box-shadow: var(--sombra-alta); animation: subir .3s var(--ease); }
.modal h2 { margin-top: 0; }
@keyframes fundido { from { opacity: 0; } to { opacity: 1; } }
@keyframes subir { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.chat { max-height: 260px; overflow-y: auto; border: 1px solid var(--borde); border-radius: var(--radio-s); padding: 10px; background: var(--fondo); margin: 10px 0; }
.chat .m { margin-bottom: 8px; font-size: 14px; }
.chat .m b { text-transform: capitalize; }
.chat .m small { color: var(--gris); }
.linea-tiempo { display: flex; gap: 4px; margin: 14px 0; overflow-x: auto; }
.linea-tiempo .p { flex: 1; min-width: 84px; text-align: center; font-size: 12px; color: var(--gris); padding-top: 12px; border-top: 4px solid var(--borde); border-radius: 2px; }
.linea-tiempo .p.hecho { border-color: var(--verde); color: var(--verde); font-weight: 600; }
.linea-tiempo .p.actual { border-color: var(--marca); color: var(--marca-oscura); font-weight: 700; }
.cupon-card { border: 2px dashed var(--coral); border-radius: var(--radio); padding: 18px; background: var(--coral-suave); }
.cupon-card .codigo { font-family: var(--display); font-size: 22px; font-weight: 800; letter-spacing: .05em; color: var(--coral-oscuro); }
.cupon-card .valor { font-family: var(--display); font-size: 28px; font-weight: 800; color: var(--tinta); }

/* Acceso interno (sin cabecera) */
.pagina-acceso { background: var(--tinta); padding-bottom: 0; }
.pagina-acceso main { display: flex; align-items: flex-start; justify-content: center; }

/* =========================================================
   Tablet (≥ 640px)
   ========================================================= */
@media (min-width: 640px) {
  main { padding: 20px 20px 48px; }
  .bloque { padding: 22px 24px; }
  h1 { font-size: 28px; }
  .fila-scroll, .grid, .grid4 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 28px 16px; }
  .logo small { display: block; }
  .item-lista { grid-template-columns: 180px 1fr; gap: 18px; padding: 16px; }
  .item-lista .precio { font-size: 24px; }
  .linea { grid-template-columns: 90px 1fr auto; }
  .linea > :last-child { grid-column: auto; }
  .linea .foto { width: 90px; height: 90px; }
  .pie-in { grid-template-columns: 1.4fr repeat(3, 1fr); }
  .pie-in > div:first-child { grid-column: auto; }
  .modal-fondo { align-items: flex-start; padding: 48px 16px; }
  .modal { border-radius: 18px; padding: 26px; }
  .banner-tienda .logo-t { left: 24px; }
  .banner-tienda .nombre-t { left: 124px; }
}

/* =========================================================
   Escritorio (≥ 960px): sin barra inferior, cabecera en una fila
   ========================================================= */
@media (min-width: 960px) {
  :root { --cab-alto: 118px; }
  body { padding-bottom: 0; }
  .nav-inferior { display: none; }
  .toast { bottom: 24px; }
  .cab-fila1 { flex-wrap: nowrap; gap: 44px; padding-top: 12px; padding-bottom: 12px; }
  .buscador { order: 0; flex: 1 1 auto; max-width: 640px; }
  .promo-cab { display: flex; }
  .cab-movil { display: none; }
  .cab-fila2 { overflow: visible; }
  .ubicacion { display: flex; }
  .cab-der .cab-ico, .cab-der .carro { display: grid; }
  .menu-cat { position: relative; }
  .menu-cat .desplegable { position: absolute; top: 100%; left: 0; right: auto; min-width: 260px; max-height: none; }
  .listado { grid-template-columns: 240px minmax(0, 1fr); gap: 28px; }
  #det-filtros > summary { display: none; }
  .ficha { grid-template-columns: 76px minmax(0, 1fr) 380px; gap: 24px; }
  .miniaturas { flex-direction: column; order: 0; overflow: visible; }
  .miniaturas button { width: 72px; height: 72px; }
  .buybox { padding: 24px; position: sticky; top: calc(var(--cab-alto) + 16px); }
  .carrito-grid { grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; }
  .resumen { padding: 22px; position: sticky; top: calc(var(--cab-alto) + 16px); }
  .app { grid-template-columns: 232px minmax(0, 1fr); gap: 20px; }
  .menu-lateral { position: sticky; top: calc(var(--cab-alto) + 16px); display: block; overflow: visible; padding: 8px; }
  .menu-lateral button { display: flex; width: 100%; }
  .menu-lateral .sep { display: block; }
  .cols-cargos { grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; }
  .resumen-plegable { position: sticky; top: calc(var(--cab-alto) + 16px); bottom: auto; box-shadow: none; }
  .resumen-plegable > summary { pointer-events: none; }
  .resumen-plegable > summary::after { display: none; }
  .fila-scroll, .grid, .grid4 { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
}

@media (hover: none) {
  .card:hover .foto img { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .card:hover .foto img { transform: none; }
}

/* Campo de dirección de Maipú con sugerencias */
.campo-dir { position: relative; }
.campo-dir input { padding-right: 76px; margin-bottom: 0; }
.campo-dir .comuna-fija { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); padding: 3px 10px; border-radius: 999px; background: var(--marca-suave); color: var(--marca-oscura); font-size: 13px; font-weight: 600; pointer-events: none; }
.dir-sug { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: var(--z-desplegable); margin: 0; padding: 4px; list-style: none; background: #fff; border: 1px solid var(--borde-fuerte); border-radius: var(--radio-s); box-shadow: var(--sombra-alta); max-height: 260px; overflow-y: auto; }
.dir-sug li { padding: 11px 12px; min-height: 44px; display: flex; align-items: center; border-radius: 8px; cursor: pointer; }
.dir-sug li:hover, .dir-sug li.activa { background: var(--marca-suave); }
.dir-estado { min-height: 20px; margin: 6px 0 4px; font-size: 13px; color: var(--gris); }
.dir-estado.ok { color: var(--verde); }
.dir-estado.error { color: var(--rojo); }
