/* =========================================================
   HOME — secciones exclusivas del inicio (se carga en "/")
   Estilo sereno (28/10): portada en mosaico de fotos, filas «Comprá por categoría», «Lo más elegido» y «Lo nuevo» con
   flechas y puntos (las filas están en components.css porque también las usan la tienda y la ficha), carteles a sangre con el texto abajo a la izquierda, dos accesos con foto, el
   producto destacado en un bloque oscuro, reels, «Comprá tranquilo» (16/11, en lugar de «Recorré la casa»), reseñas y
   «Cómo elegimos» en dos mitades. En el celular todo va en una columna y los carteles ponen el texto debajo de la foto.
   ========================================================= */
@layer sections {
  /* Títulos grandes de los bloques: la tipografía de títulos, finita y apretada. */
  .mosaic__title, .band__title, .stage__title, .offers__title {
    font-family: var(--font-display); font-weight: 500; line-height: 1.08; letter-spacing: -0.022em; text-wrap: balance; }

  /* ---------- 1. Portada en mosaico ----------
     Celular (01/11): primero el título, el texto y el botón (se ven sin bajar, aun con el aviso de privacidad abierto) y
     debajo una fila de tres fotos. Compu: tres columnas y dos filas; el texto ocupa la celda de abajo a la izquierda y la
     sexta foto no se muestra. */
  .mosaic { background: var(--sand); }
  .mosaic__grid { display: grid; grid-template-columns: 30fr 40fr 30fr; }
  .mosaic__cell { position: relative; display: block; height: clamp(150px, 49vw, 300px); overflow: hidden; background: var(--tile); }
  /* La foto no estira la celda (la fila la mide el texto de la portada, no el tamaño de la imagen). */
  .mosaic__cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
  .mosaic__cell.photo--recorte img { padding: 10%; object-fit: contain; mix-blend-mode: multiply; }
  /* El nombre de cada foto: lo leen los lectores de pantalla; con mouse aparece al pasar por encima. */
  .mosaic__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  @media (hover: hover) and (pointer: fine) {
    .mosaic__cell:hover img { transform: scale(1.03); }
    .mosaic__cell:hover .mosaic__label, .mosaic__cell:focus-visible .mosaic__label { left: 16px; bottom: 16px; width: auto; height: auto; padding: 7px 14px; clip-path: none;
      border-radius: var(--pill); background: rgb(255 255 255 / 94%); color: var(--ink); font-size: var(--fs-sm); font-weight: 500; }
  }
  /* En el celular y la tablet se ven solo las tres primeras fotos (una fila pareja y baja, debajo del texto). Las otras
     tienen carga diferida, así que ocultas no se descargan. */
  @media (max-width: 899px) {
    .mosaic__cell { height: clamp(120px, 34vw, 240px); }
    .mosaic__cell:nth-of-type(n + 4) { display: none; }
  }
  .mosaic__copy { grid-column: 1 / -1; display: grid; align-content: center; justify-items: start; gap: 10px; padding: 18px var(--gutter) 20px; }
  .mosaic__title { max-width: 17ch; font-size: clamp(1.95rem, 1.5rem + 2.2vw, 3.25rem); }
  .mosaic__lead { max-width: 46ch; color: var(--ink-2); font-size: 0.95rem; line-height: 1.45; }
  .mosaic__ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 4px; }
  /* Un solo botón principal; el segundo acceso (combos, ofertas o lo nuevo) es un enlace subrayado al lado. */
  .mosaic__more { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--ink); font-size: var(--fs-sm); font-weight: 500;
    text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
  .mosaic__more:hover { text-decoration-thickness: 2px; }
  @media (min-width: 600px) and (max-width: 899px) { .mosaic__copy { gap: 14px; padding-block: 28px 30px; } .mosaic__lead { font-size: var(--fs-base); } }
  @media (min-width: 900px) {
    /* Las filas crecen si el texto no entra (así el título y los botones nunca quedan cortados en pantallas bajas). */
    /* Filas algo más bajas (01/11): en 1366 × 768 el botón queda por encima del aviso de privacidad. */
    .mosaic__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(clamp(240px, 19vw, 380px), auto)); }
    .mosaic__cell { height: auto; }
    .mosaic__cell--1 { grid-area: 1 / 1; } .mosaic__cell--2 { grid-area: 1 / 2; } .mosaic__cell--3 { grid-area: 1 / 3; }
    .mosaic__cell--4 { grid-area: 2 / 2; } .mosaic__cell--5 { grid-area: 2 / 3; } .mosaic__cell--6 { display: none; }
    .mosaic__copy { grid-area: 2 / 1; gap: 14px; padding: 32px clamp(28px, 3.4vw, 56px); }
    .mosaic__title { max-width: 13ch; font-size: clamp(2rem, 1.2rem + 1.6vw, 2.75rem); }
    .mosaic__lead { font-size: var(--fs-sm); }
    /* Pocas fotos: el texto a la izquierda y una foto grande a la derecha. */
    .mosaic--few .mosaic__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); grid-template-rows: clamp(420px, 40vw, 620px); }
    .mosaic--few .mosaic__copy { grid-area: 1 / 1; }
    .mosaic--few .mosaic__cell--1 { grid-area: 1 / 2; }
    .mosaic--few .mosaic__cell:not(.mosaic__cell--1) { display: none; }
  }

  /* ---------- 4. Cartel «Ofertas» (con el reloj solo si hay fecha de fin) ---------- */
  .offers { padding-top: clamp(40px, 5vw, 64px); }
  .offers__box { display: grid; align-items: center; gap: 22px; padding: clamp(24px, 3.6vw, 52px); background: var(--rust-soft); color: var(--ink); }
  @media (min-width: 900px) { .offers__box { grid-template-columns: minmax(0, 1fr) auto auto; gap: 44px; } }
  .offers__copy { display: grid; justify-items: start; gap: 8px; }
  .offers__eyebrow { font-size: var(--fs-sm); font-weight: 600; color: var(--rust); }
  .offers__title { font-size: clamp(1.875rem, 1.3rem + 1.9vw, 3rem); }
  .offers__title span { display: inline-flex; align-items: center; gap: 8px; color: var(--rust); }
  .offers__title .icon { width: 0.7em; height: 0.7em; }
  .offers__chip { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--ink-2); }
  .offers__chip .icon { width: 16px; height: 16px; color: var(--rust); }
  .offers__clock { display: grid; justify-items: center; gap: 8px; }
  .offers__clock-title { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--ink-2); }
  .offers__clock-title .icon { width: 14px; height: 14px; color: var(--rust); }
  .offers__units { display: flex; gap: 8px; }
  .offers__units li { display: grid; justify-items: center; gap: 2px; min-width: 64px; padding: 9px 6px 8px; background: var(--paper); }
  .offers__units b { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }
  .offers__units li:last-child b { color: var(--rust); }
  .offers__units span { font-size: 0.6875rem; color: var(--ink-2); }
  .offers__cta { justify-self: start; gap: 10px; }
  .offers__cta .icon { width: 18px; height: 18px; }
  @media (max-width: 380px) { .offers__units li { min-width: 54px; } }

  /* ---------- 6. «Los imprescindibles de la casa» (02/11): los productos estrella ----------
     Una fila por producto, alternando lados. La foto del producto flota sobre un panel del color suave de su categoría; la foto
     real queda apoyada encima, corrida hacia abajo y hacia afuera (collage con profundidad). En el celular, una columna:
     el render arriba y el texto debajo. Las entradas son de motion.css; acá solo el parallax del render (compu). */
  .room--cocina { --stage-bg: var(--pastel-arcilla); }
  .room--hogar { --stage-bg: var(--pastel-crema); }
  .room--cuidado-personal { --stage-bg: var(--pastel-cielo); }
  .room--descanso { --stage-bg: var(--pastel-malva); }
  .room--tecnologia { --stage-bg: var(--pastel-maiz); }
  .room--mascotas { --stage-bg: var(--pastel-salvia); }
  /* Las secciones con entradas desde los costados (motion.js) nunca generan desplazamiento horizontal. */
  .rail, .band, .reels, .solutions-row { overflow-x: clip; }
  /* Un degradé muy tenue bordó (paleta Volf) en el borde izquierdo. */
  .stage { margin-top: clamp(56px, 7vw, 104px); padding-block: 8px; overflow-x: clip;
    background: linear-gradient(90deg, rgb(96 32 24 / 6%) 0, rgb(96 32 24 / 0%) clamp(60px, 9vw, 160px)); }
  .stage__head { display: grid; justify-items: center; gap: 14px; max-width: 760px; margin: 0 auto clamp(36px, 5vw, 72px); text-align: center; }
  .stage__title { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem); line-height: 1.08; letter-spacing: -0.022em; }
  .stage__lead { max-width: 56ch; color: var(--ink-2); }
  .stage__rows { display: grid; gap: clamp(48px, 6vw, 96px); } /* 16/11: filas más juntas (antes 64–128 px) */
  .stage-row { --stage-bg: var(--sand); display: grid; gap: 28px; align-items: center; }
  .stage-row__media { position: relative; order: -1; padding-bottom: 10%; }
  .stage-row__panel { display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: var(--radius-xl); background: var(--stage-bg); }
  .stage-row__float { width: 62%; }
  .stage-row__float picture { display: block; }
  .stage-row__render { width: 100%; height: auto; }
  .stage-row__render.is-photo { border-radius: var(--radius-xl); mix-blend-mode: multiply; }
  .stage-row__photo { position: absolute; right: 4%; bottom: 0; width: 36%; aspect-ratio: 4 / 5; margin: 0; overflow: hidden;
    border: 5px solid var(--paper); border-radius: var(--radius-xl); background: var(--tile); box-shadow: 0 26px 48px -26px rgb(29 29 27 / 55%); }
  .stage-row__photo img, .stage-row__photo .vslot, .stage-row__photo video { width: 100%; height: 100%; object-fit: cover; }
  .stage-row--right .stage-row__photo { right: auto; left: 4%; }
  .stage-row__text { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; min-width: 0; }
  .stage-row__eyebrow { order: -1; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
  .stage-row__num { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: var(--fs-sm); font-weight: 500;
    letter-spacing: 0.08em; color: var(--rust); font-variant-numeric: tabular-nums; }
  .stage-row__num::after { content: ""; width: 28px; height: 1px; background: currentColor; }
  .stage-row__name { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); line-height: 1.1; letter-spacing: -0.02em; text-wrap: balance; }
  .stage-row__name a { text-decoration: none; }
  .stage-row__name a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
  .stage-row__tag { max-width: 44ch; font-size: var(--fs-lg); color: var(--ink-2); }
  .stage-row__feats { display: grid; gap: 8px; }
  .stage-row__feats li { display: flex; align-items: flex-start; gap: 10px; color: var(--ink-2); }
  .stage-row__feats .icon { width: 18px; height: 18px; margin-top: 3px; color: var(--rust); }
  .stage-row__price { display: grid; gap: 4px; margin-top: 4px; }
  .stage-row__amount { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 1.625rem; font-weight: 500; font-variant-numeric: tabular-nums; }
  .stage-row__amount.is-sale > span[aria-hidden] { color: var(--rust); }
  .stage-row__amount s { font-size: var(--fs-sm); font-weight: 400; color: var(--muted); }
  .stage-row__off { font-size: var(--fs-sm); font-weight: 600; color: var(--rust); }
  .stage-row__notax { font-size: 0.75rem; color: var(--muted); }
  .stage-row__stock { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--muted); }
  .stage-row__stock::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
  .stage-row__stock.is-available { color: var(--off); }
  .stage-row__stock.is-available::before { background: var(--off); }
  .stage-row__ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 6px; }
  .stage-row__notify { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 18px; border: 1px solid var(--field);
    border-radius: var(--btn-radius); font-size: var(--fs-sm); font-weight: 500; text-decoration: none; transition: background var(--fast) var(--ease), color var(--fast) var(--ease); }
  .stage-row__notify:hover { background: var(--ink); color: #fff; }
  .stage-row__notify .icon { width: 17px; height: 17px; }
  /* Celular: una columna, el panel con su alto reservado (aspect-ratio) y botones de 44 px separados. Acostado, el panel
     más chico para que el precio y el botón queden cerca. */
  @media (max-width: 899px) {
    .stage-row__media { width: min(100%, 520px); justify-self: center; }
    .stage-row__ctas { gap: 12px; }
    .stage-row__ctas .play-chip { min-height: var(--tap); padding: 0 18px; }
  }
  @media (max-width: 599px) {
    .stage-row__ctas .btn--primary { flex: 1 1 100%; }
  }
  /* Compu, y también el celular acostado (como «Recorré la casa»): dos columnas, así el precio y el botón quedan al lado
     del render y no hay que buscarlos. */
  @media (min-width: 900px), (min-width: 640px) and (max-height: 500px) {
    .stage-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 104px); }
    .stage-row__media { grid-area: 1 / 1; order: 0; width: min(100%, 540px); justify-self: end; padding-bottom: 12%; }
    .stage-row__text { grid-area: 1 / 2; max-width: 520px; }
    .stage-row--right .stage-row__media { grid-area: 1 / 2; justify-self: start; }
    .stage-row--right .stage-row__text { grid-area: 1 / 1; justify-self: end; }
    .stage-row__float { width: 66%; }
    .stage-row__photo { right: -5%; width: 38%; border-width: 6px; }
    .stage-row--right .stage-row__photo { left: -5%; }
  }
  /* Parallax suave del render (solo compu, con el motor prendido y si el navegador lo soporta): sube un poco más lento que
     la página. Sin soporte queda quieto (no hay parallax con JavaScript). */
  @supports (animation-timeline: view()) {
    @media (min-width: 900px) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
      html.has-motion .stage-row__float { animation: stage-drift linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
    }
  }
  @keyframes stage-drift { from { transform: translateY(-26px); } to { transform: translateY(26px); } }

  /* ---------- 13. Reels (bloque de video 2) ---------- */
  .reels { background: transparent; }
  .reels__head > div:not(.reels__nav) { display: grid; justify-items: start; gap: 8px; }
  .reels .h2 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.02em; }
  .reels .h2::before { content: none; }
  .reels__head { align-items: end; }
  /* Flechas lado a lado, del mismo tamaño y borde que las de las otras filas (16/11: antes quedaban apiladas y chicas). */
  .reels__nav { display: flex; gap: 10px; }
  .reels__nav[hidden] { display: none; }
  .reels__arrow { display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid currentColor; border-radius: var(--btn-radius); background: transparent; color: var(--ink); }
  .reels__arrow .icon { width: 20px; height: 20px; }
  .reels__arrow:hover:not(:disabled) { background: var(--ink); color: var(--cream); }
  .reels__arrow:disabled { opacity: 0.35; cursor: default; }
  .reels__row { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 2px 2px 8px; -webkit-overflow-scrolling: touch; }
  .reels__row::-webkit-scrollbar { display: none; }
  /* El link al producto siempre abajo: si un título ocupa dos renglones, los links de la fila igual quedan parejos (22/10). */
  .reel { flex: 0 0 clamp(200px, 60vw, 260px); scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; }
  .reel__media { position: relative; aspect-ratio: 9 / 16; overflow: hidden; background: var(--tile); }
  .reel__title { margin-top: 6px; font-weight: 500; line-height: 1.3; }
  .reel__product { align-self: flex-start; margin-top: auto; display: inline-flex; align-items: center; min-height: var(--tap); font-size: var(--fs-sm); color: var(--ink-2);
    text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
  .reel__product:hover { color: var(--ink); }
  /* En pantallas anchas los reels entran todos en una fila (4 o menos): sin flechas ni desplazamiento. */
  @media (min-width: 900px) {
    .reels__row--n4, .reels__row--n3, .reels__row--n2 { display: grid; overflow: visible; scroll-snap-type: none; gap: 24px; }
    .reels__row--n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .reels__row--n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 900px; }
    .reels__row--n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 620px; }
    .reels__row--n4 .reel, .reels__row--n3 .reel, .reels__row--n2 .reel { flex: none; }
    /* Más de 4 (16/11): una sola fila con 4 a la vista que se desliza con las flechas (antes quedaban 4 + 2 en dos filas). */
    .reels__row--many { gap: 24px; }
    .reels__row--many .reel { flex: 0 0 calc((100% - 3 * 24px) / 4); }
  }
  .reel.is-placeholder { position: relative; display: grid; place-items: center; aspect-ratio: 9 / 16; padding: 10px; border: 2px dashed var(--line-strong);
    background: repeating-linear-gradient(135deg, rgb(0 0 0 / 5%) 0 12px, transparent 12px 24px), var(--sand); }
  .reel.is-placeholder .vbox { padding: 12px; }

  /* ---------- 10. Comprá tranquilo (16/11, Hommy) ----------
     Reemplaza a «Recorré la casa»: los 4 beneficios en una franja clara, sin muro que romper. Celular: dos por fila;
     compu: título a la izquierda y los cuatro en fila. Cada uno con su ícono en un círculo café claro. */
  .trust { margin-top: clamp(56px, 7vw, 104px); }
  .trust__inner { display: grid; gap: clamp(20px, 3vw, 32px); padding-block: clamp(28px, 4vw, 48px);
    border-block: 1px solid var(--line); }
  .trust__title { font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.75rem); line-height: 1; letter-spacing: -0.02em; }
  .trust__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
  .trust__list li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; row-gap: 2px; align-items: start; }
  .trust__list .icon { grid-row: 1 / 3; width: 44px; height: 44px; padding: 12px; border-radius: 50%; background: var(--sand); color: var(--brand); }
  .trust__list strong { align-self: end; font-size: var(--fs-sm); line-height: 1.3; }
  .trust__list strong a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1px; }
  .trust__list span { font-size: var(--fs-xs); line-height: 1.4; color: var(--ink-2); }
  @media (min-width: 900px) {
    .trust__inner { grid-template-columns: minmax(0, 0.8fr) minmax(0, 3fr); align-items: center; }
    .trust__list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
  }

  /* ---------- 15. Reseñas ---------- */
  .section__head--center { justify-items: center; text-align: center; }
  .section--reviews .h2 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.02em; }
  .review-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }

  /* ---------- 16. «Cómo elegimos» (bloque de video 4): foto grande a un lado y el texto al otro ---------- */
  .band { display: grid; margin-top: clamp(48px, 6vw, 88px); }
  .band__media { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--tile); }
  .band__media .vslot.is-placeholder { --room: var(--tile); }
  .band__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .band__copy { display: grid; justify-items: start; gap: 24px; max-width: 640px; padding: clamp(36px, 5vw, 80px) var(--gutter); }
  .band__title { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); }
  .band__points { display: grid; gap: 18px; }
  .band__points li { display: flex; align-items: flex-start; gap: 14px; }
  .band__points .icon { flex: none; width: 22px; height: 22px; margin-top: 2px; color: var(--rust); }
  .band__points div { display: grid; gap: 2px; }
  .band__points strong { font-weight: 600; }
  .band__points span { color: var(--ink-2); }
  @media (min-width: 900px) {
    .band { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; }
    .band__media { aspect-ratio: auto; align-self: stretch; min-height: clamp(520px, 48vw, 720px); }
    .band__copy { padding-inline: clamp(32px, 4vw, 64px) clamp(40px, 8vw, 120px); }
  }

  /* ---------- Soluciones en el inicio ---------- */
  .solutions-row { padding-top: clamp(40px, 5vw, 64px); }
  .solutions-row .h2 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.02em; }
}
