/* ==========================================================================
   Cosmeliq — hoja de estilos v74 (imagen aprobada por Belén el 26/11/2026).
   Sustituye por completo a la hoja v73 (capas «Frutas», gel, burbujas y botones con !important).
   v80: base con la paleta «Arena y negro» (marfil, arena, tabaco, casi negro); v80.css afina el estilo editorial.
   Títulos: Cormorant Garamond. Cuerpo y UI: Nunito. Mobile-first.
   ========================================================================== */

:root {
  /* v80: paleta «Arena y negro» en la base (marfil, arena, tabaco y casi negro).
     Los nombres antiguos (crema, ciruela, berry, miel, óxido) se conservan como alias. */
  --marfil: #F5F0E8;
  --arena: #D8C3A5;
  --tabaco: #8A6A4F;
  --tabaco-osc: #6E543E;
  --tinta: #1C1A17;
  --crema: #F5F0E8;
  --crema-2: #F5F0E8;
  --papel: #FBF8F3;
  --miel-banda: #ECE3D6;
  --ciruela: #1C1A17;
  --ciruela-osc: #000000;
  --berry: #8A6A4F;
  --berry-osc: #6E543E;
  --miel: #D8C3A5;
  --miel-2: #D8C3A5;
  --oxido: #8A6A4F;
  --texto-suave: rgba(28, 26, 23, 0.72);
  --linea: rgba(28, 26, 23, 0.12);
  --linea-2: rgba(28, 26, 23, 0.22);
  --sombra: none;
  --f-tit: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --f-txt: Nunito, system-ui, -apple-system, "Segoe UI", sans-serif;
  --radio: 2px;
  --ancho: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--crema);
  color: var(--ciruela);
  font-family: var(--f-txt);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: var(--oxido); text-underline-offset: 0.18em; }
a:hover { color: var(--berry); }
:focus-visible { outline: 3px solid var(--miel); outline-offset: 2px; border-radius: 6px; }
p { margin: 0 0 0.9rem; }

h1, h2, h3 {
  font-family: var(--f-tit);
  font-weight: 600;
  line-height: 1.08;
  color: var(--ciruela);
  letter-spacing: -0.005em;
  margin: 0 0 0.6rem;
}
h1 { font-size: clamp(2.3rem, 4.2vw + 1rem, 4rem); }
h2 { font-size: clamp(1.75rem, 2vw + 1rem, 2.4rem); }
h3 { font-size: 1.3rem; }

.kicker, .eyebrow {
  font-family: var(--f-txt);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--berry);
  margin: 0 0 0.55rem;
}
.seccion-intro, .lead { color: var(--texto-suave); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.saltar { position: absolute; left: -9999px; top: 0; }
.saltar:focus { left: 1rem; top: 0.75rem; z-index: 100; background: var(--papel); padding: 0.5rem 0.9rem; border-radius: 10px; }

.inner { max-width: var(--ancho); margin: 0 auto; padding: 0 1.25rem; }

/* —— Botones: un solo sistema ——
   Principal: berry con texto crema. Amazon y cesta: ciruela, hermano del principal. */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0.8rem 1.6rem;
  border: 0; border-radius: 999px;
  font-family: var(--f-txt); font-weight: 700; font-size: 1rem; line-height: 1.2;
  text-decoration: none; text-align: center; cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-prima { background: var(--berry); color: var(--crema-2); }
.btn-prima:hover { background: var(--berry-osc); color: var(--crema-2); }
.btn-amazon, .btn-carrito { background: var(--ciruela); color: var(--crema-2); }
.btn-amazon:hover, .btn-carrito:hover { background: var(--ciruela-osc); color: var(--crema-2); }
.btn-sec { background: transparent; color: var(--ciruela); border: 1.5px solid var(--linea-2); }
.btn-sec:hover { border-color: var(--ciruela); color: var(--ciruela); }
.btn[disabled], .btn.is-off { opacity: 0.45; cursor: default; }
.btn-compacto { min-height: 38px; padding: 0.5rem 1.1rem; font-size: 0.9rem; }
.btn-hero { padding: 0.95rem 2.2rem; font-size: 1.05rem; }
.linkish { background: none; border: 0; padding: 0; color: var(--oxido); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }

/* —— Cabecera: crema liso, franja fina arriba, logo con aire —— */
.site-header { position: relative; background: var(--crema); z-index: 20; }
.cabecera-franja { height: 4px; background: linear-gradient(90deg, var(--berry) 0%, var(--miel-2) 70%, var(--miel) 100%); }
.cabecera-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0.9rem 1.25rem;
}
/* área de respeto del logo: al menos el alto de la «C» alrededor (aprox. 0.5 × alto del logo) */
.logo { display: inline-flex; padding: 0.35rem 0.4rem 0.35rem 0; margin-right: auto; }
.logo img { display: block; height: 36px; width: auto; }
.nav-escritorio { display: none; }
.cabecera-inner > .btn-compacto { display: none; }
.btn-menu {
  width: 44px; height: 44px; border: 0; background: transparent; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ciruela);
}
.icono-menu { display: inline-flex; flex-direction: column; gap: 5px; }
.icono-menu span { display: block; width: 22px; height: 2px; border-radius: 2px; background: currentColor; }
/* guías (sin JS de menú): el CTA compacto sí se ve en móvil */
.guia-top .cabecera-inner > .btn-compacto { display: inline-flex; }

@media (min-width: 840px) {
  .inner { padding: 0 2rem; }
  .resultado-sheet { padding-left: 2rem; padding-right: 2rem; }
  .logo img { height: 42px; }
  .cabecera-inner { padding: 1.1rem 2rem; gap: 2rem; }
  .nav-escritorio { display: flex; gap: 1.6rem; }
  .nav-escritorio a { color: var(--ciruela); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
  .nav-escritorio a:hover { color: var(--berry); }
  .cabecera-inner > .btn-compacto { display: inline-flex; }
  .btn-menu { display: none; }
}

/* —— Menú lateral (móvil) —— */
.menu-fondo { position: fixed; inset: 0; background: rgba(28, 26, 23, 0.35); opacity: 0; transition: opacity 0.25s; z-index: 60; }
.menu-fondo.is-open { opacity: 1; }
.menu-lateral {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(86vw, 340px);
  background: var(--crema); z-index: 61; padding: 1.1rem 1.4rem 2rem;
  transform: translateX(100%); transition: transform 0.28s ease; overflow-y: auto;
  box-shadow: -10px 0 40px rgba(28, 26, 23, 0.15);
}
.menu-lateral.is-open { transform: translateX(0); }
.menu-cabeza { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.menu-cabeza .logo-tipo { margin: 0; }
.menu-cabeza .logo-tipo img { height: 32px; width: auto; display: block; }
.btn-cerrar-menu { width: 44px; height: 44px; border: 0; background: transparent; font-size: 1.8rem; color: var(--ciruela); cursor: pointer; }
.menu-lateral nav { display: flex; flex-direction: column; gap: 0.2rem; }
.menu-lateral nav a { font-family: var(--f-tit); font-size: 1.5rem; font-weight: 600; color: var(--ciruela); text-decoration: none; padding: 0.45rem 0; border-bottom: 1px solid var(--linea); }
.menu-lateral nav .btn { margin-top: 1.4rem; }
body.menu-abierto { overflow: hidden; }

/* —— Portada: hero sencillo —— */
.hero {
  position: relative; overflow: hidden;
  min-height: min(600px, 76svh);
  display: flex; align-items: center;
  padding: 2.5rem 0 4.5rem;
}
.hero-inner { position: relative; z-index: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }
.hero-inner:focus { outline: none; }
.hero h1 { max-width: 15ch; margin-bottom: 0.9rem; }
.hero .lead { font-size: 1.05rem; max-width: 34ch; margin-bottom: 1.5rem; }
.hero .cta-wrap { margin: 0 0 0.6rem; }
.hero-nota { font-size: 0.9rem; color: var(--texto-suave); margin: 0; }
.hero-deco { position: absolute; inset: 0; pointer-events: none; }
.hero-burbuja { position: absolute; height: auto; opacity: 0.5; }
.hero-burbuja.hb1 { width: 30px; top: 9%; right: 9%; }
.hero-burbuja.hb2 { width: 18px; bottom: 30%; right: 36%; opacity: 0.4; }
.hero-swatch { position: absolute; width: 118px; height: auto; right: -14px; bottom: 6px; opacity: 0.95; }
@media (min-width: 840px) {
  .hero { min-height: 560px; padding: 3rem 0 4rem; }
  .hero-inner { padding: 0 2rem; }
  .hero h1 { max-width: 13ch; }
  .hero .lead { font-size: 1.2rem; max-width: 40ch; }
  .hero-burbuja.hb1 { width: 52px; top: 14%; right: 17%; }
  .hero-burbuja.hb2 { width: 26px; bottom: 26%; right: 33%; }
  .hero-swatch { width: 200px; right: 7%; bottom: 7%; }
}

/* —— Bandas lisas —— */
.banda { padding: 3rem 0 3.5rem; }
.banda-miel { background: var(--miel-banda); }
.banda h2 { margin-bottom: 0.4rem; }
.banda .seccion-intro { margin-bottom: 1.6rem; max-width: 60ch; }

.rejilla { display: grid; gap: 0.9rem; }
.rejilla-caminos { grid-template-columns: 1fr; }
.camino {
  background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio);
  padding: 1.1rem 1.1rem 1.2rem;
  display: grid; grid-template-columns: 84px 1fr; column-gap: 1rem; align-items: center;
}
.camino-media { grid-row: 1 / span 3; display: flex; align-items: flex-end; justify-content: center; gap: 4px; height: 92px; }
.camino-media img { height: 100%; width: auto; max-width: 48%; object-fit: contain; }
.camino-media img:nth-child(2) { height: 72%; }
.camino h3 { margin: 0 0 0.2rem; font-size: 1.5rem; }
.camino p { margin: 0 0 0.75rem; color: var(--texto-suave); font-size: 0.95rem; }
.camino .btn { justify-self: start; min-height: 40px; padding: 0.55rem 1.2rem; font-size: 0.92rem; }

.rejilla-fichas { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
@media (min-width: 700px) {
  .rejilla-fichas { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
}
@media (min-width: 840px) {
  .rejilla-caminos { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
  .camino { grid-template-columns: 1fr; text-align: left; padding: 1.4rem; }
  .camino-media { grid-row: auto; height: 130px; justify-content: flex-start; margin-bottom: 1rem; }
  .banda { padding: 4rem 0 4.5rem; }
}

/* —— Fichas (portada, resultado y guías): mostrador, no ficha interminable —— */
.ficha, .card-prod {
  background: var(--papel); border: 1px solid var(--linea); border-radius: 18px;
  padding: 1rem 0.9rem 1rem; display: flex; flex-direction: column; text-align: center;
  box-shadow: var(--sombra); min-width: 0;
}
.paso-kicker { font-weight: 800; font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--berry); margin: 0 0 0.5rem; }
.prod-media { height: 112px; display: flex; align-items: flex-end; justify-content: center; margin: 0 0 0.75rem; }
.prod-media img, .prod-media svg { height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.prod-silueta img { filter: drop-shadow(0 6px 8px rgba(28, 26, 23, 0.1)); }
.ficha-marca { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--texto-suave); margin: 0 0 0.2rem; }
.ficha-nombre, .card-prod h3 { font-size: 1.15rem; line-height: 1.15; margin: 0 0 0.5rem; }
.ficha-cta { margin-top: auto; padding-top: 0.6rem; }
.ficha-cta .btn { width: 100%; min-height: 42px; padding: 0.6rem 0.7rem; font-size: 0.86rem; }
.afiliado-mini { font-size: 0.72rem; color: var(--texto-suave); margin: 0.35rem 0 0; }
@media (min-width: 840px) {
  .ficha, .card-prod { padding: 1.2rem 1.1rem; }
  .prod-media { height: 132px; }
  .ficha-nombre, .card-prod h3 { font-size: 1.25rem; }
}

/* —— Test: chips, varias preguntas por paso —— */
.vista.test { padding-bottom: 1rem; }
.sheet.test-sheet {
  max-width: 780px; margin: 0.5rem auto 2rem; padding: 1.25rem 1.1rem 1.5rem;
  background: var(--papel); border: 1px solid var(--linea); border-radius: 22px; box-shadow: var(--sombra);
}
.sheet.test-sheet:focus { outline: none; }
.progreso { margin-bottom: 0.4rem; }
.progreso-txt { font-size: 0.85rem; font-weight: 600; color: var(--texto-suave); margin: 0 0 0.45rem; }
.progreso-linea { height: 4px; border-radius: 4px; background: #E6D8C4; overflow: hidden; }
.progreso-linea span { display: block; height: 100%; background: var(--berry); border-radius: 4px; transition: width 0.3s ease; }
.pregunta { margin-top: 1.6rem; scroll-margin-top: 1rem; }
.pregunta-tit { font-size: 1.55rem; line-height: 1.12; margin-bottom: 0.4rem; }
.pregunta.is-error .pregunta-tit { color: var(--berry); }
.pregunta .ayuda { font-size: 0.92rem; }
.opciones { border: 0; margin: 0.7rem 0 0; padding: 0; min-width: 0; }
.opciones + .opciones { margin-top: 1rem; }
.opciones legend { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--texto-suave); padding: 0; margin-bottom: 0.5rem; }
.opcion { position: relative; display: inline-flex; margin: 0 0.4rem 0.5rem 0; vertical-align: top; max-width: 100%; }
.opcion input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opcion span, .chip {
  display: inline-block; padding: 0.58rem 1rem; min-height: 42px;
  border: 1.5px solid var(--linea-2); border-radius: 1.3rem; background: #FBF8F3;
  font-family: var(--f-txt); font-weight: 600; font-size: 0.93rem; line-height: 1.35; color: var(--ciruela);
  cursor: pointer; transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}
.opcion span:hover, .chip:hover { border-color: var(--berry); }
.opcion input:checked + span, .chip.is-on { background: var(--berry); border-color: var(--berry); color: var(--crema-2); }
.opcion-multi input:checked + span::before { content: "✓ "; font-weight: 800; }
.opcion input:focus-visible + span { outline: 3px solid var(--miel); outline-offset: 2px; }
.presets { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.7rem 0 1rem; }
.rango-label, .campo-libre-label { display: block; font-weight: 700; font-size: 0.9rem; margin: 0.6rem 0 0.4rem; }
.rango-fila { display: flex; align-items: center; gap: 0.6rem; }
.rango-fila input[type="range"] { flex: 1; accent-color: var(--berry); }
.rango-fila input[type="number"], textarea {
  font: inherit; color: var(--ciruela); background: #FBF8F3;
  border: 1.5px solid var(--linea-2); border-radius: 12px; padding: 0.5rem 0.7rem;
}
.rango-fila input[type="number"] { width: 5.2rem; }
textarea { width: 100%; resize: vertical; }
.ayuda { color: var(--texto-suave); font-size: 0.92rem; }
.aviso-corto { background: #EDE4D7; border-left: 3px solid var(--miel); border-radius: 10px; padding: 0.65rem 0.9rem; font-size: 0.9rem; margin: 0.5rem 0 0.8rem; }
.error-form { margin: 1.2rem 0 0; background: #EADBC6; color: var(--berry-osc); border-radius: 12px; padding: 0.7rem 0.9rem; font-weight: 700; font-size: 0.92rem; }
.acciones { display: flex; justify-content: space-between; gap: 0.75rem; margin-top: 1.8rem; flex-wrap: wrap; }
@media (min-width: 840px) {
  .sheet.test-sheet { margin-top: 1.5rem; padding: 2rem 2.5rem 2.2rem; }
  .pregunta-tit { font-size: 1.85rem; }
}

/* —— Tira-neceser fija abajo: Mañana | Noche —— */
.neceser {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; align-items: center; gap: 0.9rem;
  background: var(--ciruela); color: var(--crema-2);
  padding: 0.5rem 0.9rem calc(0.5rem + env(safe-area-inset-bottom));
  box-shadow: 0 -6px 24px rgba(28, 26, 23, 0.18);
}
.neceser p { margin: 0; }
.neceser-tit { flex: none; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; line-height: 1.3; }
.neceser-filas { display: flex; gap: 0.9rem; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.neceser-fila { display: flex; flex-direction: column; gap: 0.2rem; flex: none; }
.neceser-fila + .neceser-fila { border-left: 1px solid rgba(245, 240, 232, 0.22); padding-left: 0.9rem; }
.neceser-et { font-size: 0.6rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--miel); }
.neceser-huecos { list-style: none; margin: 0; padding: 0; display: flex; align-items: flex-end; gap: 0.3rem; height: 40px; }
.hueco { flex: none; width: 22px; height: 36px; border: 1.5px dashed rgba(245, 240, 232, 0.35); border-radius: 6px; }
.hueco.is-lleno { border: 0; width: auto; min-width: 16px; height: 40px; display: flex; align-items: flex-end; justify-content: center; }
.hueco.is-lleno img, .hueco.is-lleno svg { height: 100%; width: auto; max-width: 34px; object-fit: contain; }
.hueco.is-nuevo { animation: hueco-entra 0.4s ease-out both; }
@keyframes hueco-entra { from { transform: translateY(8px) scale(0.85); opacity: 0; } to { transform: none; opacity: 1; } }
.cesta-txt { flex: none; display: flex; flex-direction: column; align-items: center; }
.cesta-txt .afiliado-mini { color: rgba(245, 240, 232, 0.75); margin-top: 0.15rem; font-size: 0.66rem; }
.neceser .btn-carrito { background: var(--crema-2); color: var(--ciruela); }
.neceser .btn-carrito:hover { background: #FBF8F3; color: var(--ciruela); }
/* v74b (Pedro): el neceser fijo no tapa contenido. --alto-neceser lo mide app.js (alto real + hueco hasta el borde);
   el valor de reserva cubre el caso sin JS. main reserva ese alto + margen; el body, el del pie. */
:root { --alto-neceser: 150px; }
body.con-neceser, body.con-barra-carrito { padding-bottom: var(--alto-neceser); }
body.con-neceser main, body.con-barra-carrito main { padding-bottom: calc(var(--alto-neceser) + 1.25rem); }
html:has(body.con-neceser), html:has(body.con-barra-carrito) { scroll-padding-bottom: calc(var(--alto-neceser) + 0.75rem); }
@media (max-width: 839px) {
  .neceser-resultado { flex-wrap: wrap; row-gap: 0.4rem; }
  .neceser-resultado .neceser-tit { display: none; }
  .neceser-resultado .neceser-filas { flex: 1 1 100%; }
  .neceser-resultado .cesta-txt { flex: 1 1 100%; flex-direction: row; justify-content: space-between; gap: 0.6rem; }
  .neceser-resultado .cesta-txt .btn { flex: 1; }
}
@media (min-width: 840px) {
  .neceser {
    left: 50%; right: auto; bottom: 1rem; transform: translateX(-50%);
    width: min(780px, calc(100% - 2rem)); border-radius: 18px; padding: 0.65rem 1.2rem;
  }
  .neceser-resultado { width: auto; min-width: 460px; max-width: calc(100% - 2rem); }
  .neceser-resultado .cesta-txt { margin-left: 1.5rem; }
  .neceser-tit { font-size: 0.64rem; }
  .neceser-huecos { height: 44px; }
  .hueco { height: 40px; width: 24px; }
  .hueco.is-lleno { height: 44px; }
}

/* —— Resultado: fichas primero —— */
.resultado-sheet { max-width: var(--ancho); margin: 0 auto; padding: 1rem 1.25rem 2rem; display: block; }
.resultado-sheet:focus { outline: none; }
.resultado-cabecera { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.5rem; }
.resultado-cabecera h1 { margin-bottom: 0.4rem; }
.aviso-dermatologo { font-size: 0.93rem; color: var(--texto-suave); margin: 0; max-width: 60ch; }
.aviso-dermatologo strong { color: var(--ciruela); }
.enlace-avisos { font-weight: 700; white-space: nowrap; }
.resultado-textura { margin: 0; flex: none; width: 84px; text-align: center; }
.resultado-textura img { width: 64px; height: auto; display: block; margin: 0 auto; }
.resultado-textura figcaption { font-size: 0.66rem; color: var(--texto-suave); line-height: 1.3; }
.amplitud-arriba { background: var(--papel); border: 1px solid var(--linea); border-radius: 16px; padding: 0.9rem 1rem; margin: 1rem 0; }
.titulo-fichas { margin: 1.4rem 0 0.3rem; }
.aviso-afiliado { font-size: 0.8rem; color: var(--texto-suave); margin: 0 0 1rem; }
.columnas-rutina { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
.bloque-tit {
  font-family: var(--f-txt); font-size: 0.74rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--berry); margin: 0 0 0.6rem; display: flex; align-items: center; gap: 0.6rem;
}
.bloque-tit::after { content: ""; flex: 1; height: 1px; background: var(--linea); }
.card-prod { text-align: center; }
.card-prod .meta { font-size: 0.8rem; color: var(--texto-suave); margin: 0 0 0.5rem; }
.card-prod .motivo { font-size: 0.85rem; text-align: left; margin: 0 0 0.45rem; line-height: 1.45; }
.card-prod .meta-tramo { font-size: 0.78rem; color: var(--texto-suave); margin: 0 0 0.35rem; }
.card-prod .inci-frase { font-size: 0.72rem; color: var(--texto-suave); margin: 0 0 0.3rem; text-align: left; }
.inci { text-align: left; font-size: 0.8rem; }
.inci summary { cursor: pointer; color: var(--oxido); font-weight: 700; }
.inci p { font-size: 0.74rem; color: var(--texto-suave); margin: 0.4rem 0 0; word-break: break-word; }
.inci p.inci-nota { font-style: italic; margin-top: 0.5rem; }

/* carrusel: en móvil, fila deslizable; en escritorio, rejilla con los CTA a la misma altura */
.carrusel { position: relative; }
.carrusel-pista {
  display: flex; gap: 0.75rem; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 0.2rem 0.1rem 0.8rem; scrollbar-width: thin;
}
.carrusel-pista > * { flex: 0 0 78%; scroll-snap-align: start; }
.carrusel-btn { display: none; }
.carrusel-puntos { display: flex; justify-content: center; gap: 0.4rem; }
.carrusel-punto { width: 8px; height: 8px; padding: 0; border-radius: 50%; border: 0; background: var(--linea-2); cursor: pointer; }
.carrusel-punto.is-on { background: var(--berry); }
@media (min-width: 840px) {
  .columnas-rutina { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; }
  .columnas-rutina.una-columna { grid-template-columns: minmax(0, 1fr); }
  .carrusel-pista { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; padding: 0; gap: 1rem; align-items: stretch; }
  .una-columna .carrusel-pista { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
  .carrusel-pista > * { flex: none; }
  .carrusel-puntos { display: none; }
  .resultado-textura { width: 150px; }
  .resultado-textura img { width: 110px; }
  .resultado-textura figcaption { font-size: 0.72rem; }
}

.resumen-3s, .alternativa, .resumen-plegable, .presupuesto-box {
  background: var(--papel); border: 1px solid var(--linea); border-radius: 18px; padding: 1.1rem 1.2rem; margin: 1.6rem 0;
}
.resumen-3s h2 { font-size: 1.6rem; }
.resumen-3s ul { margin: 0 0 1rem; padding-left: 1.1rem; }
.resumen-3s li { margin-bottom: 0.3rem; }
.avisos-rutina { margin: 2rem 0; scroll-margin-top: 1rem; }
.avisos { list-style: none; margin: 0; padding: 0; }
.aviso {
  background: var(--papel); border-left: 3px solid var(--miel); border-radius: 10px;
  padding: 0.7rem 0.95rem; margin: 0 0 0.6rem; font-size: 0.93rem;
}
.aviso-consulta { border-left-color: var(--berry); }
.presupuesto-frase { margin: 0 0 0.6rem; font-size: 0.93rem; }
.progreso-barra { height: 6px; border-radius: 6px; background: #E6D8C4; overflow: hidden; }
.progreso-barra span { display: block; height: 100%; background: var(--miel); }
.presupuesto-box.is-over .progreso-barra span { background: var(--berry); }

.carrito-rutina { background: var(--miel-banda); border-radius: 22px; padding: 1.3rem 1.2rem; margin: 1.8rem 0; display: grid; gap: 1rem; }
.carrito-visual { margin: 0; display: flex; align-items: flex-end; justify-content: center; }
.carrito-dibujos { display: flex; align-items: flex-end; justify-content: center; gap: 0.4rem; flex-wrap: wrap; }
.carrito-dibujo { height: 76px; display: inline-flex; align-items: flex-end; }
.carrito-dibujo img, .carrito-dibujo svg { height: 100%; width: auto; max-width: 56px; object-fit: contain; }
.carrito-lista { list-style: none; margin: 0.6rem 0; padding: 0; }
.carrito-lista li { display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0; border-bottom: 1px solid var(--linea); font-size: 0.92rem; flex-wrap: wrap; }
.carrito-lista label { display: flex; align-items: center; gap: 0.6rem; flex: 1; cursor: pointer; }
.carrito-lista input { accent-color: var(--berry); width: 18px; height: 18px; }
.carrito-mini { height: 34px; width: 26px; display: inline-flex; align-items: flex-end; justify-content: center; flex: none; }
.carrito-mini img, .carrito-mini svg { height: 100%; width: auto; max-width: 26px; object-fit: contain; }
.carrito-nombre { flex: 1; }
.carrito-momento { font-size: 0.78rem; color: var(--texto-suave); }
.carrito-accion { margin: 0.8rem 0 0.3rem; }
.btn-carrito { width: 100%; }
@media (min-width: 840px) {
  .carrito-rutina { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); padding: 1.8rem; align-items: center; }
  .btn-carrito { width: auto; }
  .carrito-dibujo { height: 110px; }
}

.resumen-plegable summary { cursor: pointer; font-weight: 700; }
.resumen-lista { list-style: none; margin: 0.8rem 0 0; padding: 0; }
.resumen-lista li { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 0.5rem 0; border-bottom: 1px solid var(--linea); }
.resumen-lista li div { display: flex; flex-direction: column; font-size: 0.9rem; }
.selector-amplitud { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; margin: 0.4rem 0 1rem; }
.selector-tit { font-weight: 700; font-size: 0.9rem; margin-right: 0.3rem; }
.alt-lista { list-style: none; margin: 0.6rem 0; padding: 0; }
.alt-lista li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.45rem 0; border-bottom: 1px solid var(--linea); font-size: 0.92rem; flex-wrap: wrap; }
.guias-relacionadas, .aviso-legal-box { margin: 2rem 0; }
.guias-relacionadas nav, .aviso-legal-box nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; }
.aviso-legal-box h2, .guias-relacionadas h2 { font-size: 1.5rem; }
.aviso-legal-box p { font-size: 0.9rem; color: var(--texto-suave); }

/* —— Pie —— */
.site-footer { background: var(--ciruela); color: var(--crema-2); padding: 2.4rem 0 2rem; margin-top: 2rem; }
.site-footer .inner { display: flex; flex-direction: column; gap: 0.8rem; }
.pie-logo img { height: 36px; width: auto; display: block; }
.pie-afiliado { font-size: 0.85rem; opacity: 0.88; max-width: 70ch; margin: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; }
.site-footer nav a { color: var(--crema-2); font-size: 0.9rem; }
.site-footer nav a:hover { color: var(--miel); }
.site-footer .copy { font-size: 0.8rem; opacity: 0.7; margin: 0; }

/* —— Páginas legales dentro de la app —— */
.sheet { max-width: 780px; margin: 1rem auto 2rem; padding: 0 1.25rem; }
.legal-sheet h1 { font-size: clamp(2rem, 3vw + 1rem, 3rem); }
.legal-sheet h2 { font-size: 1.5rem; margin-top: 1.6rem; }
.legal-volver { margin-top: 2rem; }

/* —— Guías: columna de lectura sobre crema liso —— */
.pagina-guia { background: var(--crema); }
.guia-main { max-width: 720px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.guia-main h1 { font-size: clamp(2.1rem, 3.4vw + 1rem, 3.4rem); margin-bottom: 1rem; }
.guia-main h2 { margin-top: 2.2rem; }
.guia-main p, .guia-main li { font-size: 1.05rem; line-height: 1.7; }
.guia-main ul { padding-left: 1.2rem; }
.guia-main li { margin-bottom: 0.6rem; }
.caja-test { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); padding: 1.4rem 1.4rem 1.2rem; margin: 2.5rem 0 1.5rem; box-shadow: var(--sombra); }
.caja-test h2 { margin-top: 0; font-size: 1.7rem; }
.guia-otras a { display: inline-block; margin: 0.3rem 1rem 0 0; }
.fichas-guia { margin: 1.4rem 0 0.6rem; }
.fichas-guia .rejilla-fichas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fichas-guia .prod-media { height: 96px; }
.fichas-guia .ficha-nombre { font-size: 1.05rem; }
@media (min-width: 700px) { .fichas-guia .rejilla-fichas { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.guia-indice { max-width: 980px; }
.rejilla-guias { list-style: none; padding: 0 !important; margin: 1.5rem 0; display: grid; grid-template-columns: 1fr; gap: 1rem; }
.rejilla-guias li { margin: 0; }
.portadilla a {
  display: grid; gap: 0.3rem; height: 100%; text-decoration: none; color: var(--ciruela);
  background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); padding: 1rem 1.1rem 1.2rem; box-shadow: var(--sombra);
}
.portadilla a:hover { border-color: var(--berry); color: var(--ciruela); }
.portadilla-media { height: 120px; background: var(--miel-banda); border-radius: 14px; display: flex; align-items: flex-end; justify-content: center; padding-top: 0.8rem; margin-bottom: 0.6rem; }
.portadilla-media img { height: 92%; width: auto; object-fit: contain; }
.portadilla .kicker { margin: 0; }
.portadilla-tit { font-family: var(--f-tit); font-weight: 600; font-size: 1.45rem; line-height: 1.12; }
.portadilla-txt { font-size: 0.93rem; color: var(--texto-suave); line-height: 1.5; }
@media (min-width: 700px) { .rejilla-guias { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .rejilla-guias { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.card-prod .aviso-producto { font-size: 0.8rem; text-align: left; background: #EDE4D7; border-left: 3px solid var(--berry); border-radius: 8px; padding: 0.45rem 0.6rem; margin: 0 0 0.5rem; }
/* tarros (crema, bálsamo): más bajos que los frascos, como en el mostrador */
.prod-media img.silueta-ancha { height: 66%; }
.camino-media img.silueta-ancha { height: 52%; max-width: 52%; }
.hueco.is-lleno img.silueta-ancha { height: 62%; }
.carrito-dibujo img.silueta-ancha, .carrito-mini img.silueta-ancha { height: 62%; }
.portadilla-media img.silueta-ancha { height: 60%; }
.portadilla a { align-content: start; }

/* v74b (Pedro): «Imagen ilustrativa» bajo la imagen de cada ficha */
.img-ilustrativa { margin: 0.15rem 0 0.35rem; font-size: 0.66rem; line-height: 1.2; color: var(--texto-suave); text-align: center; letter-spacing: 0.02em; }
/* v74b (Jusep): avisos de consulta, una frase por condición, antes de las fichas y de la cesta */
.avisos-previos { list-style: none; margin: 0.7rem 0 0; padding: 0.7rem 0.9rem; border-left: 3px solid var(--oxido); background: #EDE4D7; border-radius: 0 10px 10px 0; display: grid; gap: 0.35rem; }
.avisos-previos li { font-size: 0.9rem; line-height: 1.4; color: var(--ciruela); font-weight: 600; }
.prod-media + .img-ilustrativa { margin-top: -0.45rem; }
/* v74b: neceser del resultado oculto mientras se ve el bloque de arriba (no tapa el selector ni la cesta) */
.neceser { transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s; }
.neceser.is-oculto { transform: translateY(calc(100% + 1.5rem)); opacity: 0; visibility: hidden; pointer-events: none; }
@media (min-width: 840px) {
  .neceser.is-oculto { transform: translate(-50%, calc(100% + 1.5rem)); }
}
@media (prefers-reduced-motion: reduce) { .neceser { transition: none; } }

/* ===================== v77 · web limpia ===================== */
/* Banner de afiliado único: fijo abajo, en todas las páginas */
:root { --alto-banner: 46px; }
.banner-afiliado {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  background: var(--ciruela); color: var(--crema-2);
  border-top: 1px solid rgba(245, 240, 232, 0.18);
  padding: 0.45rem 1rem calc(0.45rem + env(safe-area-inset-bottom));
  min-height: var(--alto-banner); display: flex; align-items: center; justify-content: center;
}
.banner-afiliado p { margin: 0; font-size: 0.75rem; line-height: 1.35; text-align: center; max-width: 72ch; opacity: 0.92; }
body { padding-bottom: var(--alto-banner); }
.neceser { bottom: var(--alto-banner); }
body.con-neceser, body.con-barra-carrito { padding-bottom: var(--alto-neceser); }
.pie-afiliado { display: none; }
@media (min-width: 840px) {
  :root { --alto-banner: 36px; }
  .neceser { bottom: calc(var(--alto-banner) + 0.75rem); }
}

/* Portada */
.portada .hero { padding-bottom: 2.2rem; }
.portada .hero h1 { max-width: 13ch; }
.hero-nota { font-size: 0.82rem; color: var(--texto-suave); margin: 0.6rem 0 0; }
.banda-limpia { padding: 1.8rem 0; }
.banda-limpia h2 { margin: 0.2rem 0 0.8rem; }
.filas-caminos { display: grid; gap: 0.6rem; margin-top: 0.8rem; max-width: 560px; }
.fila-camino {
  display: flex; align-items: center; gap: 0.9rem; width: 100%; text-align: left;
  background: var(--crema-2); border: 1px solid var(--linea); border-radius: 14px;
  padding: 0.7rem 0.95rem; cursor: pointer; font: inherit; color: var(--ciruela);
}
.fila-camino:hover { border-color: var(--ciruela); }
.fila-media { flex: none; width: 40px; height: 48px; display: flex; align-items: center; justify-content: center; }
.fila-media img, .fila-media svg { max-height: 48px; width: auto; }
.fila-txt { flex: 1; display: flex; flex-direction: column; }
.fila-tit { font-family: var(--f-tit); font-weight: 600; font-size: 1.3rem; line-height: 1.1; }
.fila-det { font-size: 0.82rem; color: var(--texto-suave); }
.fila-chev { font-size: 1.6rem; line-height: 1; color: var(--berry); }
.pasos-metodo { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.4rem; max-width: 46ch; }
.pasos-metodo li { line-height: 1.45; }
@media (min-width: 840px) {
  .filas-caminos { grid-template-columns: repeat(3, 1fr); max-width: none; }
}

/* Resultado */
.resultado-cabecera { display: block; }
.nota-imagenes { font-size: 0.78rem; color: var(--texto-suave); margin: 0.6rem 0 0.4rem; }
.lista-prod { display: grid; gap: 0.6rem; }
.bloque-tit { font-family: var(--f-tit); font-size: 1.35rem; margin: 0.9rem 0 0.5rem; }
.card-prod.fila-prod { text-align: left; padding: 0.8rem 0.9rem; }
.fila-prod-cab { display: grid; grid-template-columns: 44px 1fr; gap: 0.3rem 0.75rem; align-items: center; }
.fila-prod-media { width: 44px; height: 56px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.fila-prod-media .prod-media { margin: 0; padding: 0; background: none; height: 56px; min-height: 0; }
.fila-prod-media img, .fila-prod-media svg { max-height: 56px; width: auto; }
.fila-prod-txt .paso-kicker { margin: 0; font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 800; color: var(--oxido); }
.card-prod.fila-prod h3 { font-size: 1.08rem; margin: 0.1rem 0 0; }
.fila-prod .ficha-cta { grid-column: 1 / -1; display: flex; align-items: center; gap: 0.7rem; margin-top: 0.45rem; }
.fila-prod .ficha-cta .btn { width: auto; min-height: 40px; padding: 0.45rem 1rem; font-size: 0.85rem; }
.fila-prod .ficha-cta .afiliado-mini { margin: 0; }
.btn-contorno { background: transparent; color: var(--ciruela); border: 1.5px solid var(--ciruela); }
.btn-contorno:hover { background: var(--ciruela); color: var(--crema-2); }
.fila-prod .aviso-producto { margin: 0.55rem 0 0; }
.mas-info { margin-top: 0.5rem; font-size: 0.85rem; }
.mas-info > summary, .plegable > summary { cursor: pointer; font-weight: 700; color: var(--ciruela); }
.mas-info[open] > summary { margin-bottom: 0.4rem; }
.mas-info .inci { margin-top: 0.3rem; font-size: 0.78rem; }
.plegable { border-top: 1px solid var(--linea); padding: 0.8rem 0; }
.plegable[open] > summary { margin-bottom: 0.6rem; }
.alternativa, .carrito-rutina { background: none; border: 0; box-shadow: none; padding: 0; margin: 0; }
.carrito-rutina .carrito-cuerpo { padding: 0; }
.avisos-rutina h2 { font-size: 1.35rem; }
.guias-relacionadas { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; align-items: baseline; margin: 1.4rem 0; padding: 0; background: none; border: 0; }
.guias-relacionadas a { font-size: 0.9rem; }
.barra-cesta { justify-content: center; gap: 0.8rem; padding-top: 0.55rem; padding-bottom: 0.55rem; }
.barra-cesta .btn-cesta { background: var(--berry); color: var(--crema-2); min-height: 44px; }
.barra-cesta .afiliado-mini { color: rgba(245, 240, 232, 0.8); margin: 0; }
@media (min-width: 840px) {
  .neceser-resultado.barra-cesta { min-width: 0; width: auto; }
}
.legal-volver a { font-weight: 700; }

/* v77 · guías y legales */
.entradilla { font-size: 1.12rem !important; color: var(--ciruela); }
.guia-main ol { padding-left: 1.3rem; }
.guia-main ol li { margin-bottom: 0.45rem; }
.nota-consulta { font-size: 0.95rem !important; border-left: 3px solid var(--oxido); background: #EDE4D7; padding: 0.6rem 0.9rem; border-radius: 0 10px 10px 0; margin: 1.2rem 0; }
.aviso-guia { border-left: 3px solid var(--oxido); background: #EDE4D7; padding: 0.7rem 0.95rem; border-radius: 0 10px 10px 0; margin: 0 0 1.2rem; }
.aviso-guia p { margin: 0; font-size: 0.98rem !important; }
.productos-guia { margin: 2rem 0 1rem; }
.productos-guia h2 { margin-top: 0; }
.productos-guia .meta-tramo { font-size: 0.78rem !important; color: var(--texto-suave); margin: 0.4rem 0 0; line-height: 1.4 !important; }
.guia-main .card-prod h3 { font-size: 1.08rem; }
.guia-main .card-prod p.paso-kicker { font-size: 0.68rem !important; line-height: 1.3 !important; }
.guia-main .afiliado-mini { font-size: 0.72rem !important; }
.guia-fuentes { font-size: 0.85rem !important; color: var(--texto-suave); }
.lista-guias { list-style: none; padding: 0 !important; margin: 1.2rem 0; display: grid; gap: 0.6rem; }
.lista-guias li { margin: 0 !important; }
.guia-item { display: flex; flex-direction: column; gap: 0.15rem; text-decoration: none; background: var(--crema-2); border: 1px solid var(--linea); border-radius: 14px; padding: 0.8rem 1rem; color: var(--ciruela); }
.guia-item:hover { border-color: var(--ciruela); }
.guia-item .kicker { margin: 0; }
.guia-item-tit { font-family: var(--f-tit); font-weight: 600; font-size: 1.3rem; line-height: 1.15; }
.guia-main .caja-test p { margin: 0.3rem 0; }
.pagina-legal .legal-texto h1 { font-size: clamp(2rem, 3vw + 1rem, 3rem); }
/* v77 · ajustes tras capturas */
.portada .hero { min-height: 0; padding: 2.2rem 0 1.6rem; }
.portada .hero-swatch { width: 92px; top: 1.4rem; bottom: auto; right: -12px; }
@media (min-width: 840px) {
  .portada .hero { min-height: 420px; padding: 3rem 0 2.5rem; }
  .portada .hero-swatch { width: 220px; top: auto; bottom: 12%; right: 9%; }
}
.neceser-resultado.barra-cesta { flex-wrap: nowrap; }
.barra-cesta .btn-cesta { flex: 0 1 auto; white-space: nowrap; padding: 0.55rem 1.1rem; font-size: 0.92rem; }
.barra-cesta .afiliado-mini { flex: none; font-size: 0.7rem; }
@media (min-width: 840px) { .banner-afiliado p { max-width: none; } }
.carrito-rutina { display: block; }
.fila-prod-media img { width: auto; height: auto; max-width: 100%; max-height: 56px; }
