/* Olora — rueda olfativa: el color es información (una familia, un color). */

:root {
  --bg: #ffffff;
  --surface: #f4f4f4;
  --ink: #141414;
  --ink-2: #3d3d3b;
  --muted: #62625e;
  --line: #e4e4e0;
  --line-2: #c9c9c4;
  /* Valores por defecto; cada perfume o familia los redefine en línea con fam(). */
  --fam: #c9c9c4; --fam-deep: #3d3d3b; --fam-soft: #f4f4f4;
  --display: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --sans: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 999px;
  --radius-caja: 14px;
  --ancho: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16.5px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3 { margin: 0; font-weight: 800; }
::selection { background: #141414; color: #fff; }
p { margin: 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
::placeholder { color: var(--muted); opacity: 1; }
main:focus { outline: none; }

.saltar { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100; }
.saltar:focus { left: 8px; }
.solo-lector { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.contenedor { max-width: var(--ancho); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }

/* ---------- tipografía ---------- */

.display { font: 900 clamp(44px, 6.4vw, 88px)/.95 var(--display); letter-spacing: -.035em; text-wrap: balance; }
.display em, .display-s em { font-style: normal; color: var(--muted); }
.display-s { font: 900 clamp(36px, 5vw, 60px)/1 var(--display); letter-spacing: -.03em; text-wrap: balance; }
.titulo { font: 800 clamp(26px, 3vw, 36px)/1.1 var(--display); letter-spacing: -.025em; }
.titulo-s { font: 800 21px/1.2 var(--display); letter-spacing: -.015em; }
.filtro-titulo { display: flex; justify-content: space-between; gap: 8px; font: 700 14px/1.4 var(--sans); color: var(--ink); margin-bottom: 12px; }
.filtro-titulo output { font-weight: 400; color: var(--muted); }
.nota-pie { font-size: 13px; color: var(--muted); margin-top: 18px; max-width: 70ch; }
/* Como nota suelta de página, alineada con el contenido y no centrada. */
.contenedor.nota-pie { max-width: var(--ancho); }
.enlace { font-size: 14px; font-weight: 500; border-bottom: 2px solid var(--line-2); padding-bottom: 1px; transition: border-color .3s; }
.enlace:hover { border-color: var(--ink); }

/* ---------- botones y campos ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 24px; border-radius: var(--radius);
  font: 700 14.5px/1 var(--sans);
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
  white-space: nowrap;
}
.btn-oscuro { background: var(--ink); color: var(--bg); border: 1px solid var(--ink); }
.btn-oscuro:hover { background: #3a3a38; }
.btn-linea { border: 1.5px solid var(--ink); background: transparent; }
.btn-linea:hover, .btn-linea.activo { background: var(--ink); color: #fff; }
.btn-bloque { width: 100%; }
.btn[aria-disabled="true"] { opacity: .35; pointer-events: none; }

.campo {
  width: 100%; height: 44px; padding: 0 14px; border: 1.5px solid var(--line-2); border-radius: 10px;
  background: var(--bg); transition: border-color .3s; font-size: 16px;
}
.campo:focus { outline: none; border-color: var(--ink); }
textarea.campo { height: auto; padding: 12px 14px; resize: vertical; line-height: 1.6; }
select.campo { appearance: none; padding-right: 36px; background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23141414'/%3E%3C/svg%3E") no-repeat right 14px center; }
.campo-s { height: 38px; width: auto; font-size: 13px; }

/* ---------- cabecera ---------- */

.cabecera { position: sticky; top: 0; z-index: 40; background: var(--bg); border-bottom: 1px solid var(--line); }
.cabecera-dentro { display: flex; align-items: center; gap: 32px; height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font: 900 24px/1 var(--display); letter-spacing: -.04em; }
.logo .rueda-mini { width: 26px; height: 26px; }
.nav { display: flex; gap: 24px; margin-right: auto; }
.nav a { font-size: 15px; font-weight: 500; color: var(--ink-2); position: relative; padding: 6px 0; white-space: nowrap; }
.nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
.nav a:hover::after, .nav a.actual::after { transform: scaleX(1); }
.nav a.actual { color: var(--ink); }

.busqueda-cab { position: relative; display: flex; align-items: center; gap: 10px; width: 260px; border: 1.5px solid var(--line-2); border-radius: var(--radius); padding: 6px 14px; transition: border-color .3s; }
.busqueda-cab:focus-within { border-color: var(--ink); }
.busqueda-cab svg { width: 16px; color: var(--muted); flex: none; }
.busqueda-cab input { border: 0; background: transparent; width: 100%; height: 30px; font-size: 16px; outline: none; }
.sugerencias { position: absolute; top: calc(100% + 10px); right: 0; width: 340px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-caja); box-shadow: 0 18px 40px -16px rgba(20, 20, 20, .22); padding: 8px; z-index: 50; }
.sug { display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: 10px; font-size: 14px; }
a.sug:hover, a.sug.activo { background: var(--surface); }
.sug-frasco { width: 44px; height: 52px; display: grid; place-items: center; flex: none; background: var(--fam-soft); border-radius: 10px; }
.sug-frasco svg { height: 40px; }
.sug-nombre { display: block; font: 700 16px/1.25 var(--display); }
.sug-todo { justify-content: center; font-weight: 700; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 14px; }

/* ---------- hero ---------- */

.hero { padding: clamp(36px, 6vw, 72px) 0 clamp(40px, 6vw, 72px); border-bottom: 1px solid var(--line); }
.hero-dentro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-rueda { margin: 0; justify-self: center; width: min(100%, 520px); }

.hero-sub { max-width: 46ch; margin: 24px 0 32px; color: var(--ink-2); font-size: 18px; }
.hero-busqueda { display: flex; align-items: center; gap: 12px; width: min(520px, 100%); background: var(--bg); border: 1.5px solid var(--ink); padding: 5px 5px 5px 20px; border-radius: var(--radius); }
.hero-busqueda:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.hero-busqueda svg { width: 18px; color: var(--muted); flex: none; }
.hero-busqueda input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 16px; height: 44px; }
/* Índice tipográfico de notas: la entrada de enciclopedia en la primera pantalla. */
.hero-notas { margin-top: clamp(40px, 5vw, 64px); padding-top: 28px; border-top: 1px solid var(--line); text-align: left; }
.hero-notas .filtro-titulo { margin-bottom: 14px; }
.hero-notas ul { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; }
.hero-notas li { font: 800 clamp(22px, 2.8vw, 34px)/1.25 var(--display); letter-spacing: -.025em; }
.hero-notas li:not(:last-child)::after { content: '/'; margin: 0 .35em; color: var(--line-2); font-weight: 400; }
.hero-notas a { transition: color .3s; }
.hero-notas a:hover { color: var(--muted); }
.hero-notas-n { font: 500 13px/1 var(--sans); color: var(--muted); vertical-align: super; margin-left: 3px; letter-spacing: 0; }

/* Páginas de entrada: nota y perfumista. */
.entrada { padding-top: clamp(28px, 4vw, 48px); padding-bottom: 8px; }
.entrada-texto { max-width: 62ch; margin: 28px 0 22px; }
.entrada-dato { font-size: 15px; color: var(--ink-2); }
.entrada-datos { max-width: 720px; margin-top: 32px; }
.subrayado { border-bottom: 2px solid var(--line-2); transition: border-color .3s; }
.subrayado:hover { border-color: var(--ink); }
.seccion-s { padding-top: clamp(48px, 6vw, 80px); }
.titulo-det { display: block; margin-top: 6px; font: 400 15px/1.4 var(--sans); letter-spacing: 0; color: var(--muted); }
.notas-grandes { gap: 10px; }
.notas-grandes .nota { font-size: 15px; padding: 8px 18px; }
.cronologia { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.cronologia li { display: grid; grid-template-columns: 110px 72px 1fr; gap: 24px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line); }
.cronologia-año { font: 900 40px/1 var(--display); letter-spacing: -.04em; color: var(--fam-deep); }
.cronologia-frasco { display: grid; place-items: center; width: 72px; height: 84px; background: var(--fam-soft); border-radius: var(--radius-caja); }
.cronologia-frasco svg { height: 64px; }
.cronologia-det { font-size: 14px; color: var(--ink-2); }
.letras { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 28px; }
.letras a { display: grid; place-items: center; min-width: 40px; height: 40px; font: 800 17px/1 var(--display); border: 1.5px solid var(--line-2); border-radius: 50%; transition: background .2s, color .2s, border-color .2s; }
.letras a:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.indice-grupo, #precios, #resenas { scroll-margin-top: calc(var(--alto-cab, 72px) + 16px); }
.sug-entrada { align-items: baseline; }

/* ---------- rueda olfativa ---------- */

.rueda { width: 100%; height: auto; overflow: visible; }
.rueda-familia path { transition: transform .35s var(--ease); transform-origin: 200px 200px; }
.rueda-familia a:hover path, .rueda-familia a:focus-visible path { transform: scale(1.035); }
.rueda-familia a:focus-visible { outline: none; }
.rueda-familia a:focus-visible path { stroke: var(--ink); stroke-width: 3; }
.rueda-familia text { font: 700 13.5px/1 var(--sans); fill: var(--ink); pointer-events: none; }
/* Cada punto lleva una zona invisible de 30px para que sea fácil de tocar. */
.rueda-punto { stroke-width: 3.5; transition: r .2s; }
.rueda-perfume:hover .rueda-punto, .rueda-perfume:focus-visible .rueda-punto { r: 11; stroke: var(--ink); }
.rueda-perfume:focus-visible { outline: none; }
.rueda.leyendo .rueda-lectura { visibility: hidden; }
.rueda-nombre { font: 800 17px/1 var(--sans); fill: var(--ink); letter-spacing: -.02em; }
.rueda-marca { font: 500 13px/1 var(--sans); fill: var(--muted); }
.rueda-lista { display: none; }
.fam-puntos { display: inline-flex; gap: 2px; margin-right: .35em; vertical-align: .08em; }
.fam-puntos .fam-punto { margin-right: 0; }
/* En el índice de notas, los puntos van detrás de la palabra para que las líneas empiecen alineadas. */
.hero-notas .fam-puntos { margin: 0 0 0 .3em; gap: 1px; vertical-align: .12em; }
.hero-notas .fam-punto { width: .3em; height: .3em; }
.rueda-centro { font: 900 52px/1 var(--sans); fill: var(--ink); letter-spacing: -.04em; }
.rueda-centro-s { font: 500 15px/1 var(--sans); fill: var(--muted); }
.fam-punto { display: inline-block; width: .7em; height: .7em; border-radius: 50%; background: var(--fam); margin-right: .45em; vertical-align: .02em; flex: none; }

/* ---------- secciones ---------- */

.seccion { padding-top: clamp(72px, 9vw, 120px); }
.seccion-cab { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 40px; }
.cab-pagina { padding-top: clamp(48px, 7vw, 88px); padding-bottom: 40px; }

.cab-pagina .muted { margin-top: 14px; }

.familias { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.familia { position: relative; padding: 28px 24px 30px; min-height: 190px; background: var(--fam); border-radius: var(--radius-caja); transition: transform .3s var(--ease); }
.familia:hover { transform: translateY(-3px); }
.familia h3 { font: 900 26px/1.05 var(--display); letter-spacing: -.03em; margin-bottom: 10px; color: var(--ink); }
.familia p { font-size: 14.5px; color: var(--ink); }
.tarjeta-marca { font-size: 14px; font-weight: 500; color: var(--ink-2); margin-bottom: 2px; }
.sug-tipo { display: block; font-size: 13px; color: var(--muted); }
.icono { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; }
.icono-estrella { width: 1em; height: 1em; display: block; }
.estrellas-svg { display: inline-flex; gap: 2px; vertical-align: -2px; }
.familia-n { position: absolute; top: 20px; right: 22px; font: 900 22px/1 var(--sans); color: var(--ink); }

.banda { margin-top: clamp(72px, 9vw, 120px); padding-bottom: clamp(72px, 9vw, 120px); background: var(--surface); }
.banda-dentro { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }

.banda-dentro .muted { margin: 22px 0 34px; max-width: 46ch; }
.banda-frascos { display: flex; align-items: center; justify-content: center; gap: 20px; }
.banda-frascos div { width: min(42%, 220px); aspect-ratio: 3/4; display: grid; place-items: center; background: var(--fam-soft); border-radius: var(--radius-caja); }
.banda-frascos svg { width: 55%; }
.vs { font: 900 26px var(--display); color: var(--ink); letter-spacing: -.03em; }

/* ---------- tarjetas ---------- */

.rejilla { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px 28px; }
.tarjeta-imagen { display: grid; place-items: center; aspect-ratio: 4/5; overflow: hidden; background: var(--fam-soft); border-radius: var(--radius-caja); }
.tarjeta-imagen .frasco { width: 42%; transition: transform .8s var(--ease); }
.tarjeta:hover .frasco { transform: translateY(-6px) scale(1.03); }
.tarjeta-cuerpo { padding-top: 14px; }
.tarjeta-titulo { font: 800 21px/1.15 var(--display); letter-spacing: -.02em; margin: 2px 0 4px; }
.tarjeta-titulo a:hover { color: var(--fam-deep); }
.tarjeta-meta { font-size: 14px; color: var(--ink-2); }
.afinidad { color: var(--ink); font-weight: 700; }
.tarjeta-pie { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.precio-desde { font-size: 14px; color: var(--muted); }
.precio-desde strong { color: var(--ink); font-weight: 700; font-size: 15px; }
.btn-comparar { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; font-size: 14px; font-weight: 700; color: var(--ink-2); transition: color .3s; }
.btn-comparar svg { width: 13px; transition: transform .3s var(--ease); }
.btn-comparar:hover, .btn-comparar.activo { color: var(--ink); }
.btn-comparar.activo svg { transform: rotate(45deg); }

/* ---------- explorar ---------- */

.explorar { display: grid; grid-template-columns: 240px 1fr; gap: 56px; align-items: start; padding-bottom: 40px; }
.filtros { position: sticky; top: 100px; max-height: calc(100vh - 120px); overflow-y: auto; padding-right: 6px; scrollbar-width: thin; }
.filtro { margin-bottom: 34px; }
.check { display: flex; align-items: center; gap: 12px; font-size: 15px; padding: 4px 0; cursor: pointer; color: var(--ink-2); }
.check input { appearance: none; width: 18px; height: 18px; border: 1.5px solid var(--line-2); border-radius: 5px; margin: 0; flex: none; display: grid; place-items: center; transition: border-color .2s, background .2s; cursor: pointer; }
.check input:checked { background: var(--ink); border-color: var(--ink); }
.check input:checked::after { content: ''; width: 7px; height: 4px; border: 1px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.check:hover { color: var(--ink); }
.check[hidden] { display: none; }
/* Filtros largos (marcas): buscador propio y «Ver todas / Ver menos». */
.filtro-buscar { width: 100%; margin-bottom: 8px; }
.filtro-mas { margin-top: 8px; }
.filtro-mas[hidden], .filtro-nada[hidden] { display: none; }
.filtro-nada { font-size: 14px; padding: 4px 0; }
input[type=range] { width: 100%; accent-color: var(--ink); }

.resultados-barra { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.orden { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.chips:empty { margin-bottom: 8px; }
.chip { font-size: 14px; font-weight: 500; padding: 6px 14px; border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--bg); transition: background .2s, color .2s; }
.chip:hover { background: var(--ink); color: #fff; }

.chip .icono { margin-left: 4px; width: 12px; height: 12px; }
.explorar .rejilla { grid-template-columns: repeat(3, 1fr); }
.solo-movil { display: none; }

.vacio-estado { text-align: center; padding: 80px 20px; }
.vacio-estado .muted { margin: 10px 0 26px; }
.vacio-estado.izq { text-align: left; padding: 10px 0; }
.vacio-estado.alto { padding: 140px 20px; }

/* ---------- ficha ---------- */

.migas { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 28px; font-size: 14px; color: var(--muted); }
.migas a:hover { color: var(--ink); }
.ficha { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(36px, 6vw, 88px); padding-top: 28px; align-items: start; }
.ficha-imagen { aspect-ratio: 4/5; display: grid; place-items: center; position: sticky; top: 100px; background: var(--fam); border-radius: var(--radius-caja); }
.frasco.grande { width: 38%; }
/* Fotos reales (backend/imagenes.py): sin deformar, y su fondo blanco se funde con el color de la familia. */
.frasco.foto { width: 88%; height: 88%; object-fit: contain; mix-blend-mode: multiply; }
.tarjeta-imagen .frasco.foto, .ficha-imagen .frasco.foto { width: 82%; height: 82%; }
.ficha-imagen:has(.foto) { background: var(--fam-soft); }
.ficha-info { padding-top: clamp(0px, 4vw, 48px); }
.ficha-sub { margin-top: 12px; color: var(--muted); font-size: 16px; }
.ficha-desc { font: 400 20px/1.55 var(--display); color: var(--ink-2); margin: 26px 0 32px; max-width: 60ch; }
.datos { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border-top: 1px solid var(--line); }
.datos div { padding: 18px 0; border-bottom: 1px solid var(--line); }
.datos div:nth-child(odd) { padding-right: 16px; }
.datos dt { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.datos dd { margin: 0; font-size: 16px; font-weight: 500; }
.dato-familia { display: flex; align-items: center; gap: 10px; }
.dato-familia .rueda-mini { width: 30px; height: 30px; flex: none; }
.datos a { border-bottom: 2px solid var(--line-2); }
.dato-det { display: block; font-size: 14px; font-weight: 400; color: var(--ink-2); }
.datos a:hover { border-color: var(--ink); }
.ficha-acciones { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.ficha-bloques { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: clamp(28px, 4vw, 56px); padding-top: clamp(72px, 9vw, 120px); }
.bloque .titulo-s { margin-bottom: 22px; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.acordes { display: grid; gap: 14px; }
.acorde { display: grid; grid-template-columns: 1fr; gap: 6px; font-size: 15px; }
.acorde-barra { height: 10px; background: var(--fam-soft); border-radius: var(--radius); overflow: hidden; }
.acorde-barra i { display: block; height: 100%; background: var(--fam-deep); border-radius: var(--radius); transform-origin: left; animation: crecer 1s var(--ease) both; }
@keyframes crecer { from { transform: scaleX(0); } }
.acordes.compacto { gap: 8px; }
.acordes.compacto .acorde { font-size: 13.5px; gap: 3px; }
.acordes.compacto .acorde-barra { height: 6px; }

.piramide-fila { padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.piramide-fila:last-child { border-bottom: 0; margin-bottom: 0; }
.piramide-cab { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.piramide-cab h3 { font: 800 18px var(--display); letter-spacing: -.015em; }
.piramide-cab .muted { font-size: 14px; }
.notas { display: flex; flex-wrap: wrap; gap: 6px; }
.nota { font-size: 14px; padding: 5px 13px; border: 1.5px solid var(--line-2); background: var(--bg); border-radius: var(--radius); transition: background .2s, border-color .2s, color .2s; }
a.nota:hover { border-color: var(--ink); background: var(--ink); color: #fff; }
.nota.compartida { border-color: var(--ink); font-weight: 700; }

.medidor { margin-bottom: 22px; }
.medidor-cab { display: flex; justify-content: space-between; font-size: 15px; margin-bottom: 8px; }
.medidor-barra { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.medidor-barra i { height: 10px; background: var(--fam-soft); border-radius: var(--radius); }
.medidor-barra i.on { background: var(--fam-deep); }
.uso { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.uso .filtro-titulo { margin-bottom: 6px; }
.uso p { font-size: 15px; }

.segmentado { display: inline-flex; border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 3px; }
.segmentado button { padding: 7px 16px; font-size: 14px; font-weight: 700; color: var(--ink-2); border-radius: var(--radius); transition: background .3s, color .3s; }
.segmentado button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

.tabla-precios { border-top: 1px solid var(--line); }
.fila-precio { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr auto; align-items: center; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.fila-precio.mejor { background: var(--surface); border-radius: var(--radius-caja); border-bottom-color: transparent; padding-left: 18px; padding-right: 18px; margin-left: -18px; margin-right: -18px; }
.tienda strong { display: block; font: 800 19px/1.2 var(--display); letter-spacing: -.015em; }
.tienda .muted { font-size: 14px; }
.aviso-demo { margin: 0 0 20px; padding: 12px 18px; background: var(--surface); color: var(--ink-2); font-size: 14.5px; border-radius: var(--radius-caja); max-width: 70ch; }
.sello { font-size: 13px; font-weight: 700; color: #fff; background: var(--ink); padding: 4px 12px; border-radius: var(--radius); white-space: nowrap; }
.precio { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; justify-content: flex-end; }
.precio strong { font: 900 24px/1 var(--display); letter-spacing: -.03em; }
.precio s { font-size: 13px; }
.precio > span { font-size: 13px; width: 100%; text-align: right; }

/* ---------- reseñas ---------- */

.resenas { padding-bottom: 40px; }
.resenas-cuerpo { display: grid; grid-template-columns: 380px 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.form-resena { display: grid; gap: 14px; background: var(--surface); border-radius: var(--radius-caja); padding: 28px; }
.form-resena .titulo-s { margin-bottom: 4px; }
.etiqueta { font: 700 14px/1.4 var(--sans); color: var(--ink); margin-bottom: -8px; padding: 0; }
.puntuar-grupo .etiqueta { margin-bottom: 8px; }
/* El radio oculto se ancla junto a las estrellas para que el aviso de «obligatorio» salga ahí. */
.puntuar { position: relative; display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.puntuar input { position: absolute; left: 0; bottom: 0; opacity: 0; width: 1px; height: 1px; }
.puntuar label { font-size: 26px; line-height: 1; color: #82827c; cursor: pointer; display: inline-flex; transition: color .2s; padding: 4px 2px; }
.puntuar label:hover, .puntuar label:hover ~ label, .puntuar input:checked ~ label { color: var(--ink); }
.puntuar input:focus-visible + label { outline: 2px solid var(--ink); outline-offset: 2px; }
.media { display: flex; align-items: baseline; gap: 12px; }
.media-n { font: 900 44px/1 var(--display); letter-spacing: -.04em; }
.estrellas { color: var(--ink); letter-spacing: .1em; font-size: 15px; }
.resena { padding: 0 0 26px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.resena-cab { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.resena-cab strong { font-weight: 700; font-size: 15px; }
.resena p { color: var(--ink-2); white-space: pre-line; }
.resena time { display: block; font-size: 13px; margin-top: 10px; }

/* ---------- comparar ---------- */

.comparar-vacio { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 40px; align-items: start; padding-bottom: 40px; }
.comp-elegido { max-width: 300px; }
.comp-elegir { padding-top: 6px; }
.comp-populares { min-width: 0; }
.sugerencia { display: block; font: 800 20px/1.3 var(--display); letter-spacing: -.02em; padding: 14px 0; border-bottom: 1px solid var(--line); transition: padding .4s var(--ease); }
.sugerencia:hover { padding-left: 8px; }

.afinidades { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 56px; }
.afinidad-par { position: relative; overflow: hidden; flex: 1 1 220px; background: var(--surface); border-radius: var(--radius-caja); padding: 24px 26px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.afinidad-circulos { display: block; margin-bottom: 10px; }
.afinidad-par.ancho { flex-basis: 100%; }
.afinidad-n { font: 900 30px/1.1 var(--display); letter-spacing: -.03em; color: var(--ink); }
.afinidad-det { color: var(--ink-2); }

.comparativa { --cols: 2; }
.comp-fila { display: grid; grid-template-columns: 180px repeat(var(--cols), minmax(0, 1fr)); gap: 0 32px; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; align-items: start; }
.comp-etq { font-size: 14px; font-weight: 700; color: var(--ink); padding-top: 2px; }
.comp-imagenes { border-bottom: 0; padding-bottom: 0; align-items: end; }
.comp-imagenes .comp-celda { position: relative; }
.comp-imagen { display: grid; place-items: center; aspect-ratio: 1; background: var(--fam-soft); border-radius: var(--radius-caja); }
/* Los nombres se quedan pegados bajo la cabecera: cada columna sigue identificada al bajar. */
.comp-nombres { position: sticky; top: var(--alto-cab, 72px); z-index: 30; background: var(--bg); border-bottom: 2px solid var(--ink); padding: 14px 0 16px; }
.comp-nombres .comp-celda { border-top: 6px solid var(--fam); padding-top: 10px; }
.comp-nombres .tarjeta-titulo { margin-bottom: 0; }
.comp-copiar { margin-top: 20px; }
.comp-precio { display: block; font: 900 21px/1.2 var(--display); letter-spacing: -.03em; }
.comp-precio-det { display: block; font-size: 14px; margin-top: 2px; }
.comp-precio-det a { color: var(--ink-2); border-bottom: 2px solid var(--line-2); }
.comp-precio-det a:hover { border-color: var(--ink); }
.comp-imagen svg { width: 34%; }
.comp-quitar { position: absolute; top: 8px; right: 10px; color: var(--ink-2); z-index: 1; width: 32px; height: 32px; display: grid; place-items: center; }
.comp-quitar .icono { width: 16px; height: 16px; }
.comp-quitar:hover { color: var(--ink); }
.comp-celda .medidor { margin: 0; }
.comp-celda .medidor-cab { font-size: 14px; }
.comp-celda .medidor-cab span:first-child:empty { display: none; }
.gana { color: #fff; background: var(--ink); font-weight: 700; padding: 1px 8px; border-radius: var(--radius); }

/* ---------- índices ---------- */

.indice { columns: 3 260px; column-gap: 56px; padding-bottom: 40px; }
.indice-grupo { break-inside: avoid; margin-bottom: 40px; }
.indice-letra { font: 900 40px/1 var(--display); letter-spacing: -.04em; color: var(--ink); margin-bottom: 12px; }
.indice ul { list-style: none; margin: 0; padding: 0; }
.indice li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.indice li a:hover { text-decoration: underline; text-underline-offset: 3px; }
.indice li .muted { font-size: 14px; }

/* ---------- bandeja de comparación ---------- */

.bandeja {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 45;
  display: flex; align-items: center; gap: 22px; padding: 10px 10px 10px 14px;
  background: var(--bg); border: 1.5px solid var(--ink); border-radius: 20px; box-shadow: 0 20px 44px -20px rgba(20, 20, 20, .35);
  max-width: calc(100vw - 32px); animation: subir .5s var(--ease);
}
@keyframes subir { from { transform: translate(-50%, 20px); opacity: 0; } }
.bandeja[hidden] { display: none; }
.bandeja-items { display: flex; gap: 8px; }
.bandeja-item { position: relative; width: 48px; height: 56px; display: grid; place-items: center; background: var(--fam-soft); border-radius: 10px; }
.bandeja-item svg { height: 40px; }
.bandeja-item.vacio { border: 1.5px dashed var(--line-2); background: transparent; }
.bandeja-quitar { position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; }
.bandeja-quitar .icono { width: 11px; height: 11px; }
.bandeja-quitar::before { content: ''; position: absolute; inset: -13px; }
.bandeja.con-aviso { flex-wrap: wrap; }
body.con-bandeja .pie { padding-bottom: 120px; }
.bandeja-aviso { flex-basis: 100%; margin: 0; padding: 2px 0 8px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink); animation: aparecer .4s var(--ease); }
@keyframes aparecer { from { opacity: 0; transform: translateY(4px); } }
.bandeja-texto { font-size: 14px; color: var(--muted); white-space: nowrap; }
.bandeja .btn { height: 42px; }

/* ---------- alertas de precio ---------- */

.btn-alertas { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--radius); background: var(--ink); color: #fff; font-weight: 700; font-size: 14.5px; white-space: nowrap; }
.btn-alertas:hover { background: #3a3a38; }
.btn-alertas svg { width: 17px; height: 17px; }
.precios-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.btn-alerta .icono { width: 16px; height: 16px; margin-right: 2px; }
.precio-pendiente { font-size: 14px; color: var(--muted); text-align: right; }
.dialogo { width: min(92vw, 460px); border: 0; border-radius: var(--radius-caja); padding: 0; color: var(--ink); box-shadow: 0 24px 60px -20px rgba(20, 20, 20, .4); }
.dialogo::backdrop { background: rgba(20, 20, 20, .45); }
.alerta-form { display: grid; gap: 14px; padding: 28px; }
.alerta-form .muted { margin-top: -4px; }
.alerta-consent { align-items: flex-start; font-size: 14px; }
.alerta-consent input { margin-top: 2px; }
.alerta-error { font-size: 14px; font-weight: 700; color: var(--ink); }
.alerta-botones { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.alerta-lista { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.alerta-lista li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.alerta-lista li a { font-weight: 700; }
.alerta-lista li .enlace { margin-left: auto; }

/* ---------- reseña editorial y vídeos ---------- */

.resena-texto { max-width: 68ch; font-size: 18px; line-height: 1.65; color: var(--ink-2); }
.resena-texto p + p { margin-top: 14px; }
.videos-rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 20px; }
.video { margin: 0; }
.video figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }
.video-fachada, .video-iframe { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius-caja); overflow: hidden; background: var(--ink); }
.video-fachada img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .2s; }
.video-fachada:hover img { opacity: 1; }
.video-play { position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--ink); }
.video-play svg { width: 26px; height: 26px; }

/* ---------- voces del nicho ---------- */

.voces { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.voz { display: flex; flex-direction: column; gap: 16px; padding: 24px; background: var(--surface); border-radius: var(--radius-caja); }
.voz-cab { display: flex; align-items: center; gap: 16px; }
.voz-foto { flex: none; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--fam); font: 900 24px/1 var(--display); letter-spacing: -.03em; object-fit: cover; }
.voz-nombre { font: 800 21px/1.15 var(--display); letter-spacing: -.02em; }
.voz-esp { font-size: 14px; color: var(--muted); margin-top: 2px; }
.voz-redes { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.voz-redes a { width: 44px; height: 44px; display: grid; place-items: center; border: 1.5px solid var(--line-2); border-radius: 50%; background: var(--bg); transition: border-color .2s, background .2s, color .2s; }
.voz-redes a:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.voz-redes .icono { width: 18px; height: 18px; }
.voz-top-titulo { font: 700 14px/1.4 var(--sans); }
.voz-top { list-style: none; margin: -8px 0 0; padding: 0; }
.voz-top li { border-top: 1px solid var(--line-2); }
.voz-top a { display: flex; align-items: center; gap: 14px; padding: 12px 0; }
.voz-top a:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.voz-n { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--fam); font-weight: 900; font-size: 14px; }
.voz-top strong { display: block; font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.voz-marca { display: block; font-size: 14px; color: var(--muted); }

/* ---------- páginas legales ---------- */

.legal { padding-top: clamp(48px, 7vw, 88px); }
.texto-legal { max-width: 68ch; margin-top: 32px; color: var(--ink-2); }
.texto-legal h2 { font: 800 21px/1.25 var(--display); color: var(--ink); margin: 40px 0 12px; }
.texto-legal p, .texto-legal ul { margin: 0 0 14px; }
.texto-legal ul { padding-left: 1.2em; }
.texto-legal li { margin-bottom: 6px; }
.tabla-legal { width: 100%; border-collapse: collapse; margin: 8px 0 18px; font-size: 15px; }
.tabla-legal th, .tabla-legal td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.tabla-legal th { color: var(--ink); }
/* Datos del titular que faltan por rellenar: bien visibles para no publicarlos así. */
mark.pendiente { background: #fff1b8; color: var(--ink); padding: 0 4px; }

/* ---------- pie ---------- */

.pie { margin-top: clamp(80px, 10vw, 140px); padding: 64px 0 30px; background: var(--surface); }
.pie-dentro { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.pie-dentro .muted { margin-top: 14px; font-size: 15px; }
.pie-cols { display: flex; gap: 72px; }
.pie-cols div { display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.pie-cols a { color: var(--ink-2); }
.pie-cols a:hover { color: var(--ink); }
.pie-legal { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.pie-legal p:first-child { max-width: 72ch; }

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .rejilla { grid-template-columns: repeat(3, 1fr); }
  .explorar .rejilla { grid-template-columns: repeat(2, 1fr); }
  .ficha-bloques { grid-template-columns: 1fr 1fr; }
  .ficha-bloques .bloque:nth-child(2) { grid-column: 1 / -1; grid-row: 1; }
  .familias { grid-template-columns: repeat(2, 1fr); }
  /* Desde aquí la cabecera pasa a dos filas: logo, buscador y alertas arriba; secciones debajo. */
  .cabecera-dentro { flex-wrap: wrap; height: auto; padding-top: 14px; padding-bottom: 0; gap: 10px 20px; }
  .busqueda-cab { width: auto; flex: 1; min-width: 140px; }
  .nav { order: 3; width: 100%; gap: 12px; justify-content: space-between; overflow-x: auto; padding-bottom: 10px; margin-right: 0; scrollbar-width: none; }
  .nav a { flex: none; }
}

@media (max-width: 820px) {
  .logo { font-size: 24px; }
  /* Las cinco secciones caben a lo ancho de un móvil sin esconder «Comparar». */
  .nav a { font-size: 14px; letter-spacing: 0; }
  .nav-largo { display: none; }
  /* «Mis alertas» se queda en la campana, junto al buscador. */
  .btn-alertas { width: 44px; height: 44px; padding: 0; justify-content: center; }
  .btn-alertas-texto { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .precios-acciones { width: 100%; }
  .btn-alerta { flex: 1 1 auto; }
  .fila-precio .precio-pendiente { grid-column: 1 / -1; text-align: left; }
  .sugerencias { width: min(340px, calc(100vw - 32px)); }

  .rejilla, .explorar .rejilla { grid-template-columns: repeat(2, 1fr); gap: 32px 16px; }
  .tarjeta-titulo { font-size: 18px; }
  .hero-dentro { grid-template-columns: 1fr; }
  .hero-rueda { width: min(100%, 420px); }
  .rueda-lista { display: grid; gap: 8px; margin-top: 20px; font-size: 15px; color: var(--ink-2); }
  .rueda-lista strong { color: var(--ink); margin-right: 4px; }
  .rueda-lista a { border-bottom: 2px solid var(--line-2); }
  .familias { grid-template-columns: repeat(2, 1fr); }
  .familia { min-height: 0; }
  .tarjeta-pie { flex-direction: column; align-items: flex-start; }

  .banda-dentro { grid-template-columns: 1fr; gap: 40px; }
  .banda-frascos { order: -1; }

  .explorar { grid-template-columns: 1fr; gap: 0; }
  .filtros { display: none; position: static; max-height: none; padding: 24px 0 8px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
  .filtros.abierto { display: block; }
  .filtros .filtro { margin-bottom: 26px; }
  .solo-movil { display: inline-flex; height: 38px; padding: 0 18px; }
  .resultados-barra { flex-wrap: wrap; }
  .orden span, .orden { font-size: 0; gap: 0; }
  .orden select { font-size: 13px; }

  .ficha { grid-template-columns: 1fr; }
  .ficha-imagen { position: static; aspect-ratio: 1; }
  .frasco.grande { width: 30%; }
  .ficha-bloques { grid-template-columns: 1fr; }
  .ficha-bloques .bloque:nth-child(2) { grid-row: auto; }

  .fila-precio { grid-template-columns: 1fr auto; gap: 12px 16px; }
  .fila-precio-etiqueta { grid-column: 1; grid-row: 2; }
  .fila-precio-etiqueta:empty { display: none; }
  .fila-precio .precio { grid-column: 2; grid-row: 1; }
  .fila-precio .btn { grid-column: 1 / -1; }
  .fila-precio.mejor { padding-left: 14px; padding-right: 14px; margin-left: -14px; margin-right: -14px; }

  .resenas-cuerpo { grid-template-columns: 1fr; }
  .form-resena { padding: 22px; }

  .entrada-datos.datos { grid-template-columns: 1fr 1fr; }
  .entrada-datos.datos div:nth-child(odd) { padding-right: 16px; }
  .cronologia li { grid-template-columns: 56px 52px 1fr; gap: 14px; padding: 16px 0; }
  .cronologia-año { font-size: 26px; }
  .cronologia-frasco { width: 52px; height: 62px; }
  .cronologia-frasco svg { height: 48px; }
  .letras a { min-width: 44px; height: 44px; }

  /* Sin scroll horizontal: la etiqueta pasa encima de la fila y las columnas comparten el ancho. */
  .comp-fila { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 0 12px; font-size: 13.5px; padding: 14px 0; }
  .comp-etq { grid-column: 1 / -1; font-size: 14px; padding: 0 0 8px; }
  .comp-etq:empty { display: none; }
  .comp-nombres { padding: 10px 0 12px; }
  .comp-nombres .tarjeta-titulo { font-size: 18px; }
  .comp-celda { min-width: 0; overflow-wrap: anywhere; }
  .comp-celda .nota { padding: 4px 9px; font-size: 13px; }
  .comp-precio { font-size: 19px; }
  .comp-celda .btn { height: auto; min-height: 44px; padding: 10px 6px; white-space: normal; text-align: center; line-height: 1.3; font-size: 13.5px; border-radius: 12px; }

  .bandeja { gap: 12px; bottom: 12px; width: calc(100vw - 32px); justify-content: space-between; }
  .bandeja-texto { display: none; }
  .pie-cols { gap: 40px; }
}

@media (max-width: 480px) {
  .familias { grid-template-columns: 1fr; }
  .hero-busqueda { flex-wrap: wrap; padding: 6px 6px 6px 16px; border-radius: 24px; }
  .hero-busqueda .btn { width: 100%; }
  .hero-busqueda input { width: calc(100% - 40px); flex: none; }
  .datos { grid-template-columns: 1fr; }
  .datos div:nth-child(odd) { padding-right: 0; }
  .tarjeta-meta { font-size: 13px; }
  .uso { grid-template-columns: 1fr; }
  .pie-cols { flex-wrap: wrap; gap: 32px 48px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
