/* =========================================================
   Nitora · prototipo de landing
   Concepto: "La ventana encendida" (umbral + nitidez)
   ========================================================= */

/* ---------- 0. Fuentes alojadas en el sitio (licencia OFL; ver assets/fonts/OFL-*.txt) ---------- */
/* Fuentes variables, subconjunto latino (cubre espanol: acentos, n con tilde, signos). */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal; font-weight: 500 800; font-stretch: 100%; font-display: swap;
  src: url("assets/fonts/bricolage-grotesque-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Figtree";
  font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("assets/fonts/figtree-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- 1. Tokens ---------- */
:root {
  /* Marca (tono B) */
  --espresso: #2B211D;
  --crema: #FBF5EC;
  --luz: #50CEC6;          /* solo sobre oscuro */
  --luz-media: #169188;    /* graficos/iconos sobre claro, nunca texto normal */
  --luz-tinta: #0C6A64;    /* enlaces, texto de acento y boton sobre claro */

  /* Derivados */
  --espresso-2: #3A2E29;   /* superficie oscura elevada */
  --espresso-0: #211915;   /* fondo oscuro profundo */
  --crema-2: #F3EADD;      /* fondo de la ventana del producto */
  --papel: #FFFBF5;        /* superficie de tarjeta */
  --linea: #E5D9C9;
  --linea-fuerte: #CDBDA9;
  --suave: #66574F;        /* texto secundario sobre claro (AA) */
  --suave-oscuro: #D8CCBF; /* texto secundario sobre espresso (AA) */

  /* Roles (modo claro) */
  --fondo: var(--crema);
  --texto: var(--espresso);
  --texto-suave: var(--suave);
  --acento-texto: var(--luz-tinta);
  --borde: var(--linea);
  --fondo-alterno: #F6EEE2;

  /* Tipografia */
  --f-display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --f-texto: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --t-xs: 0.8125rem;
  --t-sm: 0.9375rem;
  --t-base: 1.0625rem;
  --t-lg: 1.25rem;
  --t-xl: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem);
  --t-hero: clamp(2.6rem, 1.6rem + 5vw, 5rem);

  /* Espaciado (base 4) */
  --e-1: 4px; --e-2: 8px; --e-3: 12px; --e-4: 16px; --e-5: 24px;
  --e-6: 32px; --e-7: 48px; --e-8: 64px; --e-9: 96px;

  /* Forma */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-arco: 999px 999px var(--r-md) var(--r-md);
  --sombra: 0 1px 0 rgba(43,33,29,.04), 0 10px 30px -18px rgba(43,33,29,.35);

  --toque: 48px;            /* objetivo tactil minimo (>=44) */
  --ease: cubic-bezier(.2,.7,.2,1);
}

/* Modo oscuro opcional: las tarjetas siguen claras ("ventanas encendidas")
   para que los precios queden siempre en espresso. */
@media (prefers-color-scheme: dark) {
  :root {
    --fondo: var(--espresso-0);
    --texto: var(--crema);
    --texto-suave: var(--suave-oscuro);
    --acento-texto: var(--luz);
    --borde: #4A3C35;
    --fondo-alterno: var(--espresso);
  }
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font-family: var(--f-texto);
  font-size: var(--t-base);
  line-height: 1.55;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.08; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: var(--acento-texto); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--luz-media); outline-offset: 3px; border-radius: 6px; }
@media (prefers-color-scheme: dark) { :focus-visible { outline-color: var(--luz); } }

.contenedor { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: var(--e-4); }
.contenedor--angosto { max-width: 780px; }
@media (min-width: 768px) { .contenedor { padding-inline: var(--e-6); } }

.saltar {
  position: absolute; left: var(--e-4); top: -60px; z-index: 100;
  background: var(--espresso); color: var(--crema); padding: var(--e-3) var(--e-4);
  border-radius: var(--r-sm); font-weight: 600;
}
.saltar:focus { top: var(--e-4); }

.aviso-prototipo {
  background: var(--luz-tinta); color: var(--crema);
  font-size: var(--t-xs); font-weight: 600; text-align: center;
  padding: 6px var(--e-4);
}

.eyebrow {
  font-size: var(--t-xs); font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--acento-texto); margin-bottom: var(--e-3);
  display: flex; align-items: center; gap: var(--e-2);
}
.eyebrow::before { content: ""; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.eyebrow--luz { color: var(--luz); }

.titulo-seccion { font-size: var(--t-xl); font-weight: 800; margin-bottom: var(--e-6); max-width: 18ch; }
.titulo-seccion--claro { color: var(--crema); }
.texto-suave { color: var(--texto-suave); }

.marcador-mini {
  display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; padding: 2px 7px; border-radius: 99px;
  border: 1px dashed currentColor; vertical-align: middle; white-space: nowrap;
}

/* ---------- 3. Botones ---------- */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--e-2);
  min-height: var(--toque); padding: 0 var(--e-5);
  border-radius: 99px; border: 2px solid transparent;
  font: 700 var(--t-sm)/1.1 var(--f-texto); text-decoration: none; cursor: pointer;
  transition: transform .15s var(--ease), background-color .2s, box-shadow .2s;
  -webkit-tap-highlight-color: transparent;
}
.boton:active { transform: scale(.97); }
.boton { white-space: normal; text-align: center; }
.tarjeta__botones .boton { padding-block: 10px; line-height: 1.15; }
.boton--primario { background: var(--luz-tinta); color: var(--crema); }
.boton--primario:hover { background: #0A5A55; }
.boton--secundario { background: transparent; color: var(--espresso); border-color: var(--espresso); }
.boton--secundario:hover { background: rgba(43,33,29,.06); }
.boton--luz { background: var(--luz); color: var(--espresso); }
.boton--luz:hover { box-shadow: 0 0 0 6px rgba(80,206,198,.18); }
.boton--fantasma-oscuro { background: transparent; color: var(--crema); border-color: rgba(251,245,236,.5); }
.boton--fantasma-oscuro:hover { border-color: var(--crema); }
.boton--ancho { width: 100%; }
.boton-icono {
  width: var(--toque); height: var(--toque); display: grid; place-items: center;
  border-radius: 99px; border: 0; background: transparent; color: inherit; cursor: pointer;
}
.boton-icono:hover { background: rgba(43,33,29,.07); }

/* ---------- 4. Cabecera ---------- */
.cabecera {
  position: sticky; top: 0; z-index: 40;
  background: rgba(43,33,29,.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: var(--crema); border-bottom: 1px solid rgba(251,245,236,.08);
}
.cabecera__fila { display: flex; align-items: center; justify-content: space-between; gap: var(--e-4); min-height: 64px; }
.cabecera__logo { display: flex; align-items: center; min-height: var(--toque); }
.cabecera__logo img { width: 124px; height: auto; }
.cabecera__nav { display: none; gap: var(--e-5); }
.cabecera__nav a { color: var(--suave-oscuro); text-decoration: none; font-weight: 600; font-size: var(--t-sm); padding: var(--e-3) 0; }
.cabecera__nav a:hover { color: var(--crema); }
@media (min-width: 768px) { .cabecera__nav { display: flex; } .cabecera__logo img { width: 140px; } }

.boton-carrito {
  display: inline-flex; align-items: center; gap: var(--e-2);
  min-height: var(--toque); padding: 0 var(--e-4) 0 var(--e-3);
  border-radius: 99px; border: 1.5px solid rgba(251,245,236,.35);
  background: transparent; color: var(--crema); font: 700 var(--t-sm) var(--f-texto); cursor: pointer;
}
.boton-carrito:hover { border-color: var(--crema); }
.boton-carrito__texto { display: none; }
@media (min-width: 420px) { .boton-carrito__texto { display: inline; } }
.boton-carrito__conteo {
  min-width: 24px; height: 24px; padding: 0 6px; border-radius: 99px;
  background: var(--luz); color: var(--espresso); font-size: var(--t-xs);
  display: grid; place-items: center;
}
.boton-carrito__conteo.encendido { animation: encender .7s var(--ease); }
@keyframes encender {
  0% { box-shadow: 0 0 0 0 rgba(80,206,198,.75); transform: scale(1); }
  40% { transform: scale(1.25); }
  100% { box-shadow: 0 0 0 14px rgba(80,206,198,0); transform: scale(1); }
}

/* ---------- 5. Hero: el umbral ---------- */
.hero {
  background:
    radial-gradient(120% 70% at 85% 10%, rgba(80,206,198,.10), transparent 60%),
    var(--espresso);
  color: var(--crema);
  padding: var(--e-7) 0 var(--e-8);
  overflow: hidden;
}
.hero__grilla {
  display: grid; gap: var(--e-5);
  grid-template-areas: "texto" "vitrina" "sellos" "umbral";
}
.hero__texto { grid-area: texto; }
.hero__vitrina { grid-area: vitrina; }
.hero__sellos { grid-area: sellos; }
.hero__umbral { grid-area: umbral; margin-top: var(--e-5); }
@media (min-width: 760px) {
  .hero { padding: var(--e-7) 0; }
  .hero__grilla {
    grid-template-columns: 1.25fr .75fr; column-gap: var(--e-7); align-items: center;
    grid-template-areas: "texto umbral" "vitrina vitrina" "sellos sellos";
  }
  .hero__umbral { margin-top: 0; }
}
.hero__titulo { font-size: var(--t-hero); font-weight: 800; letter-spacing: -0.035em; max-width: 15ch; text-wrap: balance; }
.subrayado-luz { color: var(--luz); }
.hero__bajada { color: var(--suave-oscuro); font-size: var(--t-base); margin-top: var(--e-4); max-width: 46ch; line-height: 1.45; }
@media (min-width: 760px) { .hero__bajada { font-size: var(--t-lg); margin-top: var(--e-5); } }
.hero__acciones { display: flex; flex-wrap: wrap; gap: var(--e-3); margin-top: var(--e-5); }
.hero__sellos {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: var(--e-2); color: var(--suave-oscuro); font-size: var(--t-sm);
}
@media (min-width: 760px) { .hero__sellos { grid-auto-flow: column; justify-content: start; column-gap: var(--e-6); } }
.hero__sellos li { display: flex; align-items: center; gap: var(--e-2); flex-wrap: wrap; }
.hero__sellos li::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--luz); flex: none; }

/* Primeros productos a la vista (la ventana encendida, en pequeno) */
.hero__vitrina { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--e-3); }
@media (min-width: 760px) { .hero__vitrina { grid-template-columns: repeat(3, minmax(0, 220px)); gap: var(--e-4); } }
.mini {
  display: grid; gap: 4px; align-content: start; height: 100%; min-height: 44px; padding: var(--e-2);
  color: var(--crema); text-decoration: none;
  background: rgba(251,245,236,.06); border: 1px solid rgba(251,245,236,.16); border-radius: var(--r-md);
}
.mini:hover { background: rgba(251,245,236,.12); }
.mini__img { display: grid; place-items: center; aspect-ratio: 1 / 1; background: var(--crema-2); border-radius: 999px 999px 10px 10px; overflow: hidden; }
.mini__img img { width: 55%; height: auto; }
.mini__nombre { font-size: var(--t-xs); font-weight: 600; line-height: 1.2; min-height: 2.4em; }
.mini__precio { font-family: var(--f-display); font-weight: 800; font-size: 1.1rem; color: var(--luz); line-height: 1.1; }
@media (min-width: 760px) {
  .mini__img { aspect-ratio: 16 / 10; }
  .mini__img img { width: 30%; }
  .mini__nombre { font-size: var(--t-sm); min-height: 0; }
}

/* El umbral: arco (el de la N) con una cuña de luz que entra */
.umbral {
  position: relative; width: min(64vw, 360px); aspect-ratio: 3 / 4; margin-inline: auto;
  border-radius: var(--r-arco); background: var(--espresso-2);
  border: 2px solid rgba(251,245,236,.12); overflow: hidden;
  display: grid; place-items: end center;
}
.umbral__luz {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(80,206,198,.95), rgba(80,206,198,.35) 70%, rgba(80,206,198,.05));
  clip-path: polygon(30% 0, 62% 0, 100% 100%, 22% 100%);
  transform-origin: 46% 0; transform: rotate(var(--angulo-luz, 0deg));
  transition: transform .4s var(--ease);
}
.umbral__objeto {
  position: relative; width: 70%; margin-bottom: 12%;
  background: var(--crema); border-radius: 50%; padding: 12%;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.6);
}

@media (min-width: 760px) { .umbral { width: min(100%, 250px); } }

/* ---------- 6. Secciones ---------- */
.seccion { padding: var(--e-8) 0; border-top: 1px solid var(--borde); }
@media (min-width: 768px) { .seccion { padding: var(--e-9) 0; } }
.seccion--vitrina { background: var(--fondo-alterno); }

.pilares { display: grid; gap: var(--e-4); }
@media (min-width: 768px) { .pilares { grid-template-columns: repeat(3, 1fr); gap: var(--e-5); } }
.pilar { padding: var(--e-5); border-radius: var(--r-lg); border: 1px solid var(--borde); position: relative; overflow: hidden; }
.pilar::after { /* rendija de luz */
  content: ""; position: absolute; left: var(--e-5); top: 0; width: 36px; height: 4px;
  background: var(--luz-media); border-radius: 0 0 4px 4px;
}
@media (prefers-color-scheme: dark) { .pilar::after { background: var(--luz); } }
.pilar__num { font-family: var(--f-display); font-weight: 700; color: var(--acento-texto); font-size: var(--t-sm); }
.pilar h3 { font-size: var(--t-lg); margin: var(--e-2) 0 var(--e-2); }
.pilar p { color: var(--texto-suave); }

/* Filtros */
.filtros { display: flex; gap: var(--e-2); flex-wrap: wrap; margin-bottom: var(--e-3); }
.filtro {
  min-height: 44px; padding: 0 var(--e-4); border-radius: 99px;
  border: 1.5px solid var(--linea-fuerte); background: transparent; color: var(--texto);
  font: 600 var(--t-sm) var(--f-texto); cursor: pointer;
}
.filtro[aria-pressed="true"] { background: var(--espresso); border-color: var(--espresso); color: var(--crema); }
@media (prefers-color-scheme: dark) {
  .filtro { border-color: #6A5A51; }
  .filtro[aria-pressed="true"] { background: var(--crema); border-color: var(--crema); color: var(--espresso); }
}
.nota-datos { font-size: var(--t-xs); color: var(--texto-suave); margin-bottom: var(--e-5); }

/* ---------- 7. Tarjeta de producto ---------- */
.grilla-productos { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--e-4); }
@media (min-width: 640px) { .grilla-productos { grid-template-columns: repeat(2, 1fr); gap: var(--e-5); } }
@media (min-width: 1024px) { .grilla-productos { grid-template-columns: repeat(3, 1fr); } }

.tarjeta {
  /* Siempre clara, tambien en modo oscuro: precio en espresso */
  --texto: var(--espresso); --texto-suave: var(--suave); --acento-texto: var(--luz-tinta);
  background: var(--papel); color: var(--espresso);
  border: 1px solid var(--linea); border-radius: var(--r-lg);
  padding: var(--e-3) var(--e-3) var(--e-4);
  display: flex; flex-direction: column; gap: var(--e-3); height: 100%;
  box-shadow: var(--sombra);
}
.tarjeta[hidden] { display: none; }

.ventana {
  position: relative; aspect-ratio: 16 / 11; border-radius: var(--r-arco);
  background: var(--crema-2); overflow: hidden; display: grid; place-items: center;
}
.ventana::before { /* cuna de luz */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(22,145,136,.22), rgba(22,145,136,.04));
  clip-path: polygon(36% 0, 58% 0, 86% 100%, 30% 100%);
  transition: clip-path .5s var(--ease);
}
.tarjeta:hover .ventana::before,
.tarjeta:focus-within .ventana::before { clip-path: polygon(22% 0, 72% 0, 100% 100%, 12% 100%); }
.ventana img { position: relative; width: 38%; max-width: 150px; height: auto; transition: filter .7s var(--ease), opacity .7s var(--ease), transform .7s var(--ease); }
.ventana__rotulo {
  position: absolute; bottom: var(--e-2); right: var(--e-3);
  font-size: 0.7rem; font-weight: 600; color: var(--suave);
}

/* Microinteraccion 1: enfoque (de borroso a nitido) */
.js .enfocar img { filter: blur(8px); opacity: .35; transform: scale(.94); }
.js .enfocar.nitido img { filter: none; opacity: 1; transform: none; }

.tarjeta__etiquetas { display: flex; flex-wrap: wrap; gap: var(--e-2); padding-inline: var(--e-2); }
.etiqueta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.75rem; font-weight: 600; line-height: 1;
  padding: 6px 9px; border-radius: 99px; background: var(--crema-2); color: var(--espresso);
}
.etiqueta::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--linea-fuerte); }
.etiqueta--stock-si::before { background: var(--luz-media); }
.etiqueta--stock-pocas::before { background: #B4690E; }
.etiqueta--pendiente::before { background: transparent; border: 1.5px dashed var(--suave); }

.tarjeta__cuerpo { padding-inline: var(--e-2); display: grid; gap: var(--e-2); }
.tarjeta__nombre { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.015em; }
.tarjeta__desc { color: var(--suave); font-size: var(--t-sm); }
.ficha { list-style: none; padding: 0; margin: var(--e-1) 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ficha li {
  font-size: var(--t-xs); font-weight: 600; padding: 4px 8px; border-radius: 6px;
  border: 1px solid var(--linea); color: var(--espresso);
}
.tarjeta__pie { margin-top: auto; padding-inline: var(--e-2); display: grid; gap: var(--e-3); }
.precio { font-family: var(--f-display); font-weight: 800; font-size: 1.75rem; letter-spacing: -0.02em; color: var(--espresso); line-height: 1; }
.precio small { display: block; font-family: var(--f-texto); font-size: var(--t-xs); font-weight: 500; color: var(--suave); letter-spacing: 0; margin-top: 4px; }
.tarjeta__botones { display: grid; grid-template-columns: 1fr 1fr; gap: var(--e-2); }
.tarjeta__botones .boton { padding: 0 var(--e-3); width: 100%; }
@media (max-width: 359px) { .tarjeta__botones { grid-template-columns: 1fr; } }
.boton .icono-check { width: 18px; height: 18px; }
.boton.agregado { background: var(--espresso); }

/* ---------- 8. Como comprar ---------- */
.caminos { display: grid; gap: var(--e-4); }
@media (min-width: 768px) { .caminos { grid-template-columns: 1fr 1fr; gap: var(--e-5); } }
.camino { border: 1px solid var(--borde); border-radius: var(--r-lg); padding: var(--e-5); }
.camino h3 { font-size: var(--t-lg); margin-bottom: var(--e-4); }
/* El numero va en ::before con posicion absoluta: asi el texto y los <strong> del paso
   fluyen juntos en una sola linea (antes eran items sueltos de la grilla y se solapaban). */
.pasos { margin: 0; padding: 0; list-style: none; counter-reset: paso; display: grid; gap: var(--e-3); }
.pasos li { counter-increment: paso; position: relative; min-height: 32px; padding-left: 44px; padding-top: 4px; overflow-wrap: break-word; }
.pasos li::before {
  content: counter(paso); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: var(--t-sm); line-height: 1;
  background: var(--espresso); color: var(--crema);
}
@media (prefers-color-scheme: dark) { .pasos li::before { background: var(--luz); color: var(--espresso); } }
.camino__nota { margin-top: var(--e-4); font-size: var(--t-sm); color: var(--texto-suave); }

/* ---------- 9. Garantia y cambios (resumen en simple + enlaces a legal/) ---------- */
.bloques-legales { display: grid; gap: var(--e-4); margin-top: var(--e-4); }
@media (min-width: 768px) { .bloques-legales { grid-template-columns: repeat(3, 1fr); } }
.bloque-legal { border: 1px solid var(--linea-fuerte); border-radius: var(--r-md); padding: var(--e-5); display: flex; flex-direction: column; align-items: flex-start; }
.bloque-legal h3 { font-size: var(--t-base); margin-bottom: var(--e-2); }
.bloque-legal p { color: var(--texto-suave); font-size: var(--t-sm); margin-bottom: auto; }
.bloque-legal .enlace-legal { margin-top: var(--e-3); }
.bajada-seccion { margin: calc(-1 * var(--e-4)) 0 var(--e-6); color: var(--texto-suave); max-width: 52ch; }
.marcador-mini--claro { color: var(--texto-suave); margin-bottom: var(--e-2); }

/* ---------- 10. FAQ ---------- */
.faq { border-top: 1px solid var(--borde); }
.faq details { border-bottom: 1px solid var(--borde); }
.faq summary {
  list-style: none; cursor: pointer; min-height: 56px; padding: var(--e-4) 40px var(--e-4) 0;
  font-weight: 700; position: relative; display: flex; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 12px; height: 12px;
  border-right: 2.5px solid var(--acento-texto); border-bottom: 2.5px solid var(--acento-texto);
  transform: translateY(-70%) rotate(45deg); transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { padding: 0 0 var(--e-5); color: var(--texto-suave); max-width: 62ch; }
.faq details .enlace-legal { margin: calc(-1 * var(--e-3)) 0 var(--e-4); }

/* ---------- 11. Contacto y pie ---------- */
.seccion--contacto { background: var(--espresso); color: var(--crema); border-top: 0; }
.contacto { display: grid; gap: var(--e-6); align-items: end; }
@media (min-width: 900px) { .contacto { grid-template-columns: 1.4fr 1fr; } }
.contacto .titulo-seccion { margin-bottom: var(--e-4); }
.contacto__bajada { color: var(--suave-oscuro); max-width: 46ch; }
.contacto__canales { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--e-3); }
.marcador-mini--oscuro { font-size: 0.65rem; }

.pie { background: var(--crema); color: var(--espresso); padding: var(--e-7) 0; border-top: 1px solid var(--linea); }
.pie__fila { display: grid; gap: var(--e-5); }
.pie__legal { display: flex; flex-wrap: wrap; gap: var(--e-1) var(--e-5); }
.pie__legal a { color: var(--luz-tinta); font-weight: 600; font-size: var(--t-sm); min-height: 44px; display: inline-flex; align-items: center; }
.pie__meta { font-size: var(--t-xs); color: var(--suave); }
@media (min-width: 900px) { .pie__fila { grid-template-columns: auto 1fr auto; align-items: center; } }

/* ---------- 12. Carrito (dialog) ---------- */
.carrito {
  border: 0; padding: 0; margin: 0; max-width: none; max-height: none;
  width: 100%; height: 100%; background: transparent; color: var(--espresso);
  /* El carrito es siempre claro: los enlaces usan la tinta oscura aunque el sistema este en modo oscuro */
  --acento-texto: var(--luz-tinta); --texto: var(--espresso); --texto-suave: var(--suave);
}
.carrito::backdrop { background: rgba(33,25,21,.55); backdrop-filter: blur(2px); }
.carrito__marco {
  position: fixed; left: 0; right: 0; bottom: 0; max-height: 88vh;
  background: var(--papel); border-radius: var(--r-lg) var(--r-lg) 0 0;
  display: flex; flex-direction: column; box-shadow: 0 -20px 60px -20px rgba(0,0,0,.45);
  animation: subir .35s var(--ease);
}
.carrito__marco::before { /* el umbral se abre: rendija de luz arriba */
  content: ""; display: block; height: 4px; width: 56px; margin: 10px auto 0;
  border-radius: 4px; background: var(--luz-media);
}
@media (min-width: 768px) {
  .carrito__marco { left: auto; top: 0; width: 420px; max-height: none; border-radius: var(--r-lg) 0 0 var(--r-lg); animation-name: entrar; }
  .carrito__marco::before { display: none; }
}
@keyframes subir { from { transform: translateY(100%); } to { transform: none; } }
@keyframes entrar { from { transform: translateX(100%); } to { transform: none; } }
.carrito__cabecera { display: flex; align-items: center; justify-content: space-between; padding: var(--e-3) var(--e-3) var(--e-3) var(--e-5); border-bottom: 1px solid var(--linea); }
.carrito__cabecera h2 { font-size: var(--t-lg); }
.carrito__cuerpo { overflow-y: auto; padding: var(--e-3) var(--e-5); flex: 1; }
.carrito__vacio { text-align: center; padding: var(--e-7) var(--e-3); color: var(--suave); display: grid; gap: var(--e-4); justify-items: center; }
.item { display: grid; grid-template-columns: 64px 1fr; gap: var(--e-3); padding: var(--e-3) 0; border-bottom: 1px solid var(--linea); }
.item__img { width: 64px; height: 64px; border-radius: 32px 32px 10px 10px; background: var(--crema-2); display: grid; place-items: center; }
.item__img img { width: 60%; }
.item__nombre { font-weight: 700; font-size: var(--t-sm); line-height: 1.3; }
.item__precio { font-family: var(--f-display); font-weight: 700; color: var(--espresso); }
.item__fila { display: flex; align-items: center; justify-content: space-between; gap: var(--e-2); margin-top: var(--e-2); flex-wrap: wrap; }
.cantidad { display: inline-flex; align-items: center; border: 1.5px solid var(--linea-fuerte); border-radius: 99px; }
.cantidad button { width: 44px; height: 44px; border: 0; background: transparent; font: 700 1.2rem var(--f-texto); color: var(--espresso); cursor: pointer; border-radius: 99px; }
.cantidad output { min-width: 28px; text-align: center; font-weight: 700; }
.item__quitar { background: none; border: 0; color: var(--luz-tinta); font: 600 var(--t-xs) var(--f-texto); text-decoration: underline; cursor: pointer; min-height: 44px; padding: 0 var(--e-2); }
.carrito__pie { border-top: 1px solid var(--linea); padding: var(--e-4) var(--e-5) calc(var(--e-5) + env(safe-area-inset-bottom)); display: grid; gap: var(--e-3); }
.carrito__pie[hidden] { display: none; }
.carrito__totales { margin: 0; display: grid; gap: var(--e-1); }
.carrito__totales div { display: flex; justify-content: space-between; }
.carrito__totales dt { color: var(--suave); }
.carrito__totales dd { margin: 0; font-weight: 700; color: var(--espresso); }
#carrito-subtotal { font-family: var(--f-display); font-size: 1.35rem; }
.carrito__totales .texto-suave { color: var(--suave); font-weight: 600; }
.carrito__nota { font-size: var(--t-xs); color: var(--suave); text-align: center; }
.simulacion { text-align: center; display: grid; gap: var(--e-4); justify-items: center; padding: var(--e-6) var(--e-2); }
.simulacion h3 { font-size: var(--t-lg); }
.simulacion p { color: var(--suave); font-size: var(--t-sm); }

/* ---------- 13. Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: var(--e-5); z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--espresso); color: var(--crema); padding: var(--e-3) var(--e-5);
  border-radius: 99px; font-weight: 600; font-size: var(--t-sm);
  width: max-content; max-width: calc(100vw - 32px); text-align: center;
  transition: opacity .25s, transform .25s var(--ease);
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 13b. Accesibilidad y utilidades ---------- */
.solo-lector { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
main:focus { outline: none; } /* el foco programatico del salto al contenido no necesita anillo */
.saltar:focus { min-height: 44px; display: inline-flex; align-items: center; }
.enlace-legal { display: inline-flex; align-items: center; min-height: 44px; margin-top: var(--e-2); font-weight: 600; font-size: var(--t-sm); }
/* El anillo de foco debe verse tambien sobre superficies oscuras y dentro del carrito (siempre claro) */
.carrito :focus-visible { outline-color: var(--luz-tinta); }
body.sin-scroll { overflow: hidden; }

/* Casilla de terminos del carrito: caja dibujada de 24 px dentro de un area tactil de 44 px */
.terminos { display: grid; grid-template-columns: 44px 1fr; gap: var(--e-1); align-items: start; font-size: var(--t-sm); color: var(--suave); min-height: 44px; }
.terminos input { -webkit-appearance: none; appearance: none; position: relative; width: 44px; height: 44px; margin: 0; background: transparent; cursor: pointer; border-radius: 10px; }
.terminos input::before { content: ""; position: absolute; inset: 10px; border: 2px solid var(--espresso); border-radius: 6px; background: var(--papel); }
.terminos input:checked::before {
  border-color: var(--luz-tinta);
  background: var(--luz-tinta) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23FBF5EC' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat;
}
.terminos label { cursor: pointer; padding-block: 10px; }
.terminos a { display: inline-block; min-height: 24px; }
.carrito__error { color: #8A1C1C; font-size: var(--t-sm); font-weight: 600; background: #FBEAEA; border: 1px solid #E8B9B9; border-radius: var(--r-sm); padding: var(--e-2) var(--e-3); }
.carrito__error[hidden] { display: none; }

/* ---------- 13b2. Carrito en dos pasos: datos de entrega ---------- */
.lista-items { list-style: none; margin: 0; padding: 0; }
.carrito__cuerpo { min-height: 140px; }
.carrito__pie { flex: none; max-height: 52vh; overflow-y: auto; }
.carrito__acciones { display: grid; gap: var(--e-3); }
.carrito__aviso-envio { font-size: var(--t-xs); color: var(--suave); }
.simulacion__icono { border-radius: 20px; }
.entrega { display: grid; gap: var(--e-3); }
.entrega h3 { font-size: 1.15rem; }
.entrega h3:focus { outline: none; }
.entrega__nota { font-size: var(--t-sm); color: var(--suave); }
.campo label { display: block; font-weight: 600; font-size: var(--t-sm); margin-bottom: 4px; }
.campo input, .campo select, .campo textarea {
  width: 100%; min-height: var(--toque); font: inherit; font-size: 1rem; color: var(--espresso);
  background: #fff; border: 1.5px solid var(--linea-fuerte); border-radius: var(--r-sm); padding: 10px 12px;
}
.campo textarea { min-height: 76px; resize: vertical; }
.campo [aria-invalid="true"] { border-color: #8A1C1C; }
.campo__error { color: #8A1C1C; font-size: var(--t-sm); font-weight: 600; margin-top: 4px; }
.tarjeta__retracto { font-size: var(--t-base); font-weight: 700; color: var(--espresso); }

/* ---------- 13c. Paginas de resultado de pago ---------- */
.resultado { padding: var(--e-8) 0 var(--e-9); min-height: 60vh; }
.resultado__tarjeta { max-width: 640px; margin-inline: auto; background: var(--papel); color: var(--espresso); border: 1px solid var(--linea); border-radius: var(--r-lg); padding: var(--e-6) var(--e-5); box-shadow: var(--sombra); display: grid; gap: var(--e-4); justify-items: start; }
.resultado__tarjeta h1 { font-size: var(--t-xl); font-weight: 800; }
.resultado__tarjeta p { color: var(--suave); max-width: 52ch; }
.resultado__tarjeta .eyebrow { color: var(--luz-tinta); margin-bottom: 0; }
.resultado__datos { margin: 0; display: grid; gap: var(--e-2); width: 100%; padding: var(--e-4); background: var(--crema-2); border-radius: var(--r-md); }
.resultado__datos div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--e-2); }
.resultado__datos dt { color: var(--suave); font-size: var(--t-sm); }
.resultado__datos dd { margin: 0; font-weight: 700; font-family: var(--f-display); overflow-wrap: anywhere; }
.resultado__acciones { display: flex; flex-wrap: wrap; gap: var(--e-3); margin-top: var(--e-2); }
.resultado__nota { font-size: var(--t-sm); }
@media (min-width: 768px) { .resultado__tarjeta { padding: var(--e-7); } }

/* ---------- 13d. Modos: prototipo/publicado y compra directa ---------- */
/* Los modos los fija app.js (MODO_PROTOTIPO, MP_ACTIVO) en <html data-modo data-directa>. */
[hidden] { display: none !important; }
html[data-modo="publicado"] [data-solo-prototipo] { display: none !important; }
html[data-modo="prototipo"] [data-solo-publicado] { display: none !important; }
html[data-directa="no"] [data-solo-directa] { display: none !important; }
html[data-directa="si"] [data-sin-directa] { display: none !important; }
html[data-checkout="no"] [data-solo-checkout] { display: none !important; }

/* Producto aun no publicable (falta QR SUBTEL o Sello SEC): solo se ve en modo prototipo */
.tarjeta--bloqueada { border-style: dashed; border-color: var(--linea-fuerte); box-shadow: none; }
.etiqueta--alerta { background: #FFF1D6; color: #5A3600; font-weight: 700; }
.etiqueta--alerta::before { background: #B4690E; }
.boton[disabled], .boton[aria-disabled="true"] { background: var(--crema-2); color: var(--suave); border-color: var(--linea-fuerte); cursor: not-allowed; transform: none; box-shadow: none; }
.boton--bloque { grid-column: 1 / -1; width: 100%; }
.tarjeta__botones .boton--bloque { width: 100%; }
.tarjeta__ojo { font-size: var(--t-sm); color: var(--espresso); background: var(--crema-2); border-radius: var(--r-sm); padding: var(--e-2) var(--e-3); }
.tarjeta__ojo strong { font-weight: 700; }
.mas-datos { font-size: var(--t-sm); }
.mas-datos summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 700; color: var(--luz-tinta); list-style: none; }
.mas-datos summary::-webkit-details-marker { display: none; }
.mas-datos summary::before { content: "+"; display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: var(--e-2); border: 1.5px solid currentColor; border-radius: 50%; font-weight: 800; line-height: 1; }
.mas-datos[open] summary::before { content: "−"; }
.mas-datos ul { margin: 0 0 var(--e-2); padding-left: 1.1rem; color: var(--suave); display: grid; gap: var(--e-1); }
.tarjeta__certificado { font-size: var(--t-xs); font-weight: 600; }
.tarjeta__certificado a { display: inline-flex; align-items: center; min-height: 44px; }
.enlace-boton { background: none; border: 0; color: var(--luz-tinta); font: 600 var(--t-sm) var(--f-texto); text-decoration: underline; cursor: pointer; min-height: 44px; }

/* ---------- 14. Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .enfocar img { filter: none; opacity: 1; transform: none; }
}

/* ---------- 13e. Tienda propia: un solo camino de compra ---------- */
html[data-directa="si"] .caminos { grid-template-columns: 1fr; max-width: 640px; }
.pie__legal a[hidden] { display: none !important; }
.pie__legal #pie-ml { font-weight: 500; opacity: .85; }

.campo__ayuda { font-size: var(--t-xs); color: var(--suave); margin-top: 4px; }

.envio-info { display: grid; gap: 4px; padding: var(--e-3); background: var(--crema-2); border-radius: var(--r-sm); font-size: var(--t-sm); color: var(--espresso); }
.envio-info p { margin: 0; }
.envio-info__proto { font-size: var(--t-xs); font-weight: 700; color: #5A3600; }

.campo--tipo { border: 1.5px solid var(--linea-fuerte); border-radius: var(--r-sm); padding: var(--e-3); margin: 0; }
.campo--tipo legend { font-weight: 600; font-size: var(--t-sm); padding-inline: var(--e-1); }
.opcion { display: flex; align-items: center; gap: var(--e-3); min-height: 44px; font-size: var(--t-sm); cursor: pointer; }
.opcion input { width: 24px; height: 24px; accent-color: var(--luz-tinta); flex: none; }
