/* =========================================================
   Biblioteca Luna · hoja de estilos pública
   Estilo editorial moderno: fondo blanco, Inter para la interfaz
   y el texto, Newsreader solo en titulares, portadas grandes y
   un único color de acento (azul noche del logo).
   ========================================================= */

@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader-latin-wght-italic.woff2") format("woff2"); font-weight: 200 800; font-style: italic; font-display: swap; }

:root {
  --fondo: #ffffff;
  --fondo-2: #f6f5f2;
  --fondo-3: #eceae4;
  --texto: #15171c;
  --texto-2: #474c55;
  --texto-3: #7d828b;
  --linea: #e7e5df;
  --acento: #1c2c4c;
  --acento-2: #34508a;
  --acento-suave: #eef1f7;
  --oro: #b8893c;
  --radio: 12px;
  --radio-s: 8px;
  --ancho: 1240px;
  --sombra: 0 1px 2px rgba(20,23,28,.06), 0 8px 24px -12px rgba(20,23,28,.18);
  --sombra-libro: 0 2px 4px rgba(20,23,28,.08), 0 14px 28px -14px rgba(20,23,28,.35);
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--fondo); color: var(--texto); font: 400 1.0625rem/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--acento-2); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--acento); }
:focus-visible { outline: 2px solid var(--acento-2); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.12; letter-spacing: -.015em; margin: 0 0 .5em; color: var(--texto); }
h1 { font-size: clamp(2.3rem, 4.8vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--linea); margin: 2.5rem 0; }

.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.saltar { position: absolute; left: -999px; top: 0; background: var(--acento); color: #fff; padding: .6rem 1rem; z-index: 100; }
.saltar:focus { left: 1rem; }
.contenedor { width: min(100% - 2.5rem, var(--ancho)); margin-inline: auto; }
.estrecho { width: min(100% - 2.5rem, 740px); margin-inline: auto; }

/* ---------- Etiquetas y textos auxiliares ---------- */
.rotulo { display: inline-block; font: 600 .8rem/1.2 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--acento-2); margin: 0 0 .8rem; }
.ornamento { display: none; }
.cursiva { font-family: var(--serif); font-style: italic; }
.entradilla { font-size: 1.2rem; color: var(--texto-2); line-height: 1.55; }
.mute { color: var(--texto-3); }

/* ---------- Botones ---------- */
.boton { display: inline-flex; align-items: center; justify-content: center; gap: .5em; font: 600 .95rem/1 var(--sans);
  background: var(--acento); color: #fff; border: 1px solid var(--acento); padding: .9em 1.4em; border-radius: 999px; cursor: pointer; text-decoration: none;
  transition: background .2s, color .2s, border-color .2s, transform .15s; }
.boton:hover { background: var(--acento-2); border-color: var(--acento-2); color: #fff; }
.boton:active { transform: translateY(1px); }
.boton--sec { background: #fff; color: var(--texto); border-color: var(--linea); }
.boton--sec:hover { background: var(--fondo-2); color: var(--texto); border-color: var(--fondo-3); }
.boton--oro { background: var(--acento); border-color: var(--acento); color: #fff; }
.boton--oro:hover { background: var(--acento-2); border-color: var(--acento-2); }
.boton--claro { background: #fff; color: var(--texto); border-color: var(--linea); }
.boton--claro:hover { background: var(--fondo-2); color: var(--texto); }
.enlace { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: .2em; }
.enlace-flecha { font: 600 .92rem/1 var(--sans); text-decoration: none; color: var(--acento-2); white-space: nowrap; }
.enlace-flecha::after { content: " →"; transition: margin .2s; }
.enlace-flecha:hover::after { margin-left: .2em; }

/* ---------- Cabecera ---------- */
.cabecera { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.9); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--linea); }
.cabecera__fila { display: flex; align-items: center; gap: 1.5rem; min-height: 72px; }
.marca { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--texto); flex-shrink: 0; }
.marca img { width: 44px; height: 44px; }
.marca__texto { display: flex; flex-direction: column; }
.marca__nombre { font: 600 1.32rem/1 var(--serif); letter-spacing: -.01em; }
.marca__lema { font: 400 .78rem/1.3 var(--sans); color: var(--texto-3); margin-top: .15rem; }
.menu { display: flex; align-items: center; gap: .7rem; margin-left: auto; }
.menu ul { display: flex; gap: .15rem; list-style: none; margin: 0; padding: 0; }
.menu a { display: block; white-space: nowrap; padding: .5rem .6rem; border-radius: 999px; font: 500 .94rem/1 var(--sans); color: var(--texto-2); text-decoration: none; transition: background .15s, color .15s; }
.menu a:hover { background: var(--fondo-2); color: var(--texto); }
.menu a[aria-current] { color: var(--texto); background: var(--fondo-2); }
.buscador { display: flex; align-items: center; border: 1px solid var(--linea); border-radius: 999px; background: var(--fondo-2); padding-left: 1rem; transition: border-color .15s, background .15s; }
.buscador input { border: 0; background: transparent; font: inherit; font-size: .94rem; width: 10.5rem; padding: .55rem 0; color: var(--texto); }
.buscador input:focus { outline: none; }
.buscador:focus-within { border-color: var(--acento-2); background: #fff; }
.buscador button { border: 0; background: none; padding: .5rem .85rem; color: var(--texto-2); cursor: pointer; }
.menu-boton { display: none; margin-left: auto; background: none; border: 0; padding: .8rem; cursor: pointer; }
.menu-boton__barras, .menu-boton__barras::before, .menu-boton__barras::after { display: block; width: 22px; height: 2px; border-radius: 2px; background: var(--texto); position: relative; transition: transform .25s; }
.menu-boton__barras::before, .menu-boton__barras::after { content: ""; position: absolute; left: 0; }
.menu-boton__barras::before { top: -7px; } .menu-boton__barras::after { top: 7px; }
.menu-boton[aria-expanded="true"] .menu-boton__barras { background: transparent; }
.menu-boton[aria-expanded="true"] .menu-boton__barras::before { transform: translateY(7px) rotate(45deg); }
.menu-boton[aria-expanded="true"] .menu-boton__barras::after { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 1120px) {
  .menu-boton { display: block; }
  .menu { position: absolute; inset: 100% 0 auto; background: #fff; border-bottom: 1px solid var(--linea); flex-direction: column; align-items: stretch; padding: .5rem 1.25rem 1.4rem; gap: .8rem; display: none; box-shadow: 0 24px 40px -24px rgba(0,0,0,.25); }
  .menu.abierto { display: flex; }
  .menu ul { flex-direction: column; }
  .menu a { padding: .9rem .4rem; font-size: 1.05rem; border-radius: 0; border-bottom: 1px solid var(--linea); }
  .menu a:hover, .menu a[aria-current] { background: none; }
  .buscador input { width: 100%; }
}
@media (max-width: 420px) { .marca__lema { display: none; } }

/* ---------- Portada (hero) ---------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--fondo-2) 0%, #fff 100%); border-bottom: 1px solid var(--linea); }
.hero::before, .hero__luna { display: none; }
.hero__fila { display: grid; grid-template-columns: 1.15fr .85fr; gap: 2.5rem; align-items: center; padding: clamp(1rem, 1.8vw, 1.5rem) 0 clamp(.9rem, 1.4vw, 1.15rem); }
.hero h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); font-weight: 450; line-height: 1.05; letter-spacing: -.03em; margin-bottom: .35em; }
.hero h1 em { font-style: italic; color: var(--acento-2); }
.hero .rotulo { margin-bottom: .6rem; }
.hero__texto { font-size: 1.08rem; color: var(--texto-2); max-width: 34em; margin-bottom: 0; }
.hero__acciones { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.4rem; }
.hero__cifras { display: flex; flex-wrap: wrap; gap: .6rem 2rem; margin-top: 1.6rem; }
.hero__cifras > div { white-space: nowrap; }
.hero__cifras b { display: inline; font: 500 1.6rem/1 var(--serif); color: var(--texto); margin-right: .35rem; }
.hero__cifras span { font-size: .85rem; color: var(--texto-3); }
.estante { position: relative; height: 290px; width: 100%; max-width: 420px; margin-left: auto; }
.estante a { position: absolute; display: block; transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.estante img { border-radius: 4px; box-shadow: 0 24px 44px -20px rgba(20,23,28,.45), 0 2px 6px rgba(20,23,28,.12); }
.estante a:nth-child(1) { width: 172px; left: calc(50% - 86px); top: 0; z-index: 3; }
.estante a:nth-child(2) { width: 140px; left: 0; top: 34px; z-index: 2; transform: rotate(-4deg); }
.estante a:nth-child(3) { width: 140px; right: 0; top: 34px; z-index: 2; transform: rotate(4deg); }
.estante a:hover { transform: translateY(-8px) rotate(0); z-index: 4; }
@media (max-width: 900px) { .hero__fila { grid-template-columns: 1fr; } .estante { height: 250px; max-width: 360px; margin: 0 auto; } .estante a:nth-child(1) { width: 150px; left: calc(50% - 75px); } .estante a:nth-child(2), .estante a:nth-child(3) { width: 120px; } }

/* ---------- Secciones ---------- */
.seccion { padding: clamp(3.2rem, 6vw, 5.5rem) 0; }
.cabecera-pagina + .seccion, .hero + .seccion { padding-top: clamp(1.6rem, 3vw, 2.4rem); }
.hero + .seccion { padding-top: .9rem; }
.hero + .seccion .seccion__cab { margin-bottom: 1.2rem; }
.seccion--papel2 { background: var(--fondo-2); }
.seccion--noche { background: var(--acento); color: #d9deea; }
.seccion--noche h2, .seccion--noche h3 { color: #fff; }
.seccion--noche .rotulo { color: #9fb3dc; }
.seccion__cab { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 2.2rem; flex-wrap: wrap; }
.seccion__cab h2 { margin: 0; }
.seccion__cab .rotulo { margin-bottom: .5rem; }
.cabecera-pagina { padding: clamp(.8rem, 1.4vw, 1.1rem) 0 clamp(1rem, 1.8vw, 1.3rem); background: var(--fondo-2); border-bottom: 1px solid var(--linea); }
.cabecera-pagina p { max-width: 52em; }
.cabecera-pagina .rotulo { margin-bottom: .35rem; font-size: .74rem; }
.cabecera-pagina .migas { margin-bottom: .5rem; }
.cabecera-pagina h1 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); margin-bottom: .2em; }
.cabecera-pagina .entradilla { font-size: 1rem; margin-bottom: 0; }
.cabecera-pagina .prosa { font-size: 1rem; margin-top: .6rem; }
.cabecera-pagina .prosa p { margin-bottom: 0; }
.migas { font-size: .86rem; color: var(--texto-3); margin-bottom: 1rem; }
.migas a { color: inherit; text-decoration: none; }
.migas a:hover { color: var(--texto); }
.migas span[aria-hidden] { margin: 0 .45em; color: var(--fondo-3); }

/* ---------- Rejilla de libros ---------- */
.rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 2.4rem 1.6rem; }
.rejilla--grande { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.carrusel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(165px, 1fr); gap: 1.6rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: .4rem .2rem 1.2rem; scrollbar-width: thin; }
.carrusel > * { scroll-snap-align: start; }
@media (min-width: 900px) { .carrusel { grid-auto-columns: calc((100% - 5 * 1.6rem) / 6); } }
.tarjeta { min-width: 0; }
.tarjeta__enlace { text-decoration: none; color: inherit; display: block; }
.tarjeta__portada { position: relative; aspect-ratio: 2 / 3; background: var(--fondo-3); border-radius: 4px; box-shadow: var(--sombra-libro); transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s; overflow: hidden; }
.tarjeta__portada img { width: 100%; height: 100%; object-fit: cover; }
.tarjeta__enlace:hover .tarjeta__portada { transform: translateY(-6px); box-shadow: 0 4px 8px rgba(20,23,28,.08), 0 24px 40px -18px rgba(20,23,28,.45); }
.tarjeta__titulo { font: 600 1rem/1.3 var(--sans); margin: 1rem 0 .2rem; letter-spacing: -.005em; }
.tarjeta__enlace:hover .tarjeta__titulo { color: var(--acento-2); }
.tarjeta__autor { font-size: .9rem; color: var(--texto-3); margin: 0; }
.sello { position: absolute; top: .6rem; left: .6rem; background: var(--acento); color: #fff; font: 600 .68rem/1 var(--sans); padding: .4em .7em; border-radius: 999px; z-index: 1; }
.sello--idioma { background: #fff; color: var(--texto); box-shadow: 0 1px 3px rgba(0,0,0,.2); }

/* ---------- Colecciones ---------- */
.colecciones { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.coleccion { display: grid; grid-template-columns: 72px 1fr; gap: 1.1rem; align-items: center; padding: 1.1rem; border: 1px solid var(--linea); background: #fff; text-decoration: none; color: inherit; border-radius: var(--radio); transition: border-color .2s, transform .2s, box-shadow .2s; }
.coleccion:hover { border-color: transparent; transform: translateY(-2px); box-shadow: var(--sombra); color: inherit; }
.coleccion img { width: 72px; aspect-ratio: 2/3; object-fit: cover; border-radius: 3px; box-shadow: var(--sombra-libro); }
.coleccion h3 { margin: 0 0 .2rem; font: 600 1.05rem/1.25 var(--sans); }
.coleccion p { margin: 0; font-size: .92rem; color: var(--texto-3); line-height: 1.4; }
.coleccion .cuenta { display: inline-block; margin-top: .55rem; font: 600 .75rem/1 var(--sans); color: var(--acento-2); background: var(--acento-suave); padding: .35em .65em; border-radius: 999px; }

/* ---------- Ficha de libro ---------- */
.ficha { display: grid; grid-template-columns: minmax(200px, 320px) 1fr; gap: clamp(2rem, 4.5vw, 4.5rem); padding: clamp(1.4rem, 3vw, 2.4rem) 0 clamp(2rem, 5vw, 4rem); align-items: start; }
.ficha__portada { position: sticky; top: 92px; }
.ficha__portada img { width: auto; max-width: 100%; max-height: calc(100vh - 220px); min-height: 260px; object-fit: contain; margin-inline: auto; border-radius: 6px; box-shadow: 0 2px 6px rgba(20,23,28,.1), 0 30px 60px -28px rgba(20,23,28,.5); }
.ficha h1 { margin-bottom: .15rem; }
.ficha__sub { font: italic 400 1.4rem/1.3 var(--serif); color: var(--texto-2); margin-bottom: .8rem; }
.ficha__autores { font-size: 1.05rem; margin-bottom: 1rem; color: var(--texto-2); }
.ficha__autores a { color: var(--texto); font-weight: 600; text-decoration: none; }
.ficha__autores a:hover { color: var(--acento-2); }
.ficha__autores .rol { color: var(--texto-3); }
.estrellas { display: inline-flex; align-items: center; gap: .5rem; font-size: .92rem; color: var(--texto-3); margin-bottom: 1.2rem; }
.estrellas__i { color: var(--oro); letter-spacing: .08em; }
.datos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1.2rem 1.6rem; margin: 2.2rem 0; padding: 1.4rem 0; border-block: 1px solid var(--linea); }
.datos dt { font-size: .8rem; color: var(--texto-3); }
.datos dd { margin: .2rem 0 0; font-weight: 500; }
.prosa { font: 400 1.18rem/1.7 var(--serif); color: #23262c; }
.prosa h2 { margin-top: 1.6em; font-size: 1.7rem; }
.prosa h3 { margin-top: 1.4em; }
.prosa li { margin: .3em 0; }
.prosa blockquote { margin: 1.6em 0; padding: .4em 0 .4em 1.3em; border-left: 3px solid var(--acento-2); font-style: italic; color: var(--texto-2); font-size: 1.25rem; }
.etiquetas { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.2rem 0 0; padding: 0; list-style: none; }
.etiquetas a { display: inline-block; font: 500 .86rem/1 var(--sans); padding: .55em .9em; border: 1px solid var(--linea); border-radius: 999px; text-decoration: none; color: var(--texto-2); background: #fff; }
.etiquetas a:hover { border-color: var(--acento-2); color: var(--acento-2); }
.fragmento { background: var(--fondo-2); border-radius: var(--radio); padding: clamp(1.4rem, 4vw, 2.8rem); position: relative; }
.fragmento.plegado { max-height: 420px; overflow: hidden; }
.fragmento.plegado::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 160px; background: linear-gradient(transparent, var(--fondo-2)); }
.pestanas { display: flex; gap: .4rem; margin: 2.2rem 0 1.4rem; overflow-x: auto; padding: .3rem; background: var(--fondo-2); border-radius: 999px; width: fit-content; max-width: 100%; }
.pestanas button { background: none; border: 0; padding: .6rem 1.1rem; border-radius: 999px; font: 600 .92rem/1 var(--sans); color: var(--texto-3); cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.pestanas button[aria-selected="true"] { background: #fff; color: var(--texto); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
@media (max-width: 760px) { .ficha { grid-template-columns: 1fr; } .ficha__portada { position: static; max-width: 280px; margin: 0 auto; } }

/* ---------- Autores ---------- */
.lista-autores { columns: 3 240px; column-gap: 2.5rem; list-style: none; padding: 0; margin: 0; }
.lista-autores li { break-inside: avoid; padding: .6rem 0; border-bottom: 1px solid var(--linea); display: flex; justify-content: space-between; gap: 1rem; }
.lista-autores a { text-decoration: none; color: var(--texto); font-weight: 500; }
.lista-autores a:hover { color: var(--acento-2); }
.lista-autores .n { font-size: .82rem; color: var(--texto-3); background: var(--fondo-2); border-radius: 999px; padding: .1em .6em; height: fit-content; }
.letra { font: 500 1.9rem/1 var(--serif) !important; color: var(--acento-2); margin: 1.6rem 0 .3rem; break-after: avoid; border: 0 !important; display: block !important; }

/* ---------- Filtros del catálogo ---------- */
.filtros { display: flex; flex-wrap: wrap; gap: .8rem 1rem; align-items: end; padding: 1.6rem 0 1.4rem; }
.campo { display: flex; flex-direction: column; gap: .35rem; }
.campo label, .etq { font: 500 .82rem/1.2 var(--sans); color: var(--texto-3); }
.campo input, .campo select, .campo textarea, .form input[type=text], .form input[type=email], .form textarea {
  font: inherit; font-size: 1rem; color: var(--texto); background: #fff; border: 1px solid var(--linea); border-radius: var(--radio-s); padding: .65rem .85rem; min-height: 46px; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: var(--acento-2); box-shadow: 0 0 0 3px rgba(52,80,138,.15); }
.resultado-info { color: var(--texto-3); margin-bottom: 1.6rem; font-size: .95rem; }
.paginacion { display: flex; justify-content: center; gap: .4rem; margin-top: 3rem; flex-wrap: wrap; }
.paginacion a, .paginacion span { min-width: 42px; height: 42px; display: inline-grid; place-items: center; border: 1px solid var(--linea); border-radius: 999px; text-decoration: none; color: var(--texto-2); font-weight: 500; padding: 0 .7rem; }
.paginacion a:hover { background: var(--fondo-2); }
.paginacion [aria-current] { background: var(--acento); color: #fff; border-color: var(--acento); }

/* ---------- Blog ---------- */
.articulos { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.6rem; }
.art-tarjeta { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); overflow: hidden; text-decoration: none; color: inherit; transition: transform .2s, box-shadow .2s, border-color .2s; }
.art-tarjeta:hover { transform: translateY(-3px); box-shadow: var(--sombra); border-color: transparent; color: inherit; }
.art-tarjeta__img { aspect-ratio: 16/9; background: var(--fondo-3); position: relative; overflow: hidden; }
.art-tarjeta__img img { width: 100%; height: 100%; object-fit: cover; }
.art-tarjeta__img--libro { display: grid; place-items: center; background: linear-gradient(135deg, var(--fondo-2), var(--fondo-3)); }
.art-tarjeta__img--libro img { width: auto; height: 80%; object-fit: contain; border-radius: 3px; box-shadow: 0 18px 34px -14px rgba(20,23,28,.5); }
.art-tarjeta__cuerpo { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.art-tarjeta h3 { font-size: 1.35rem; margin-bottom: .5rem; }
.art-tarjeta p { color: var(--texto-2); font-size: .97rem; flex: 1; }
.art-tarjeta time { font-size: .82rem; color: var(--texto-3); margin-bottom: .6rem; }
.articulo-cab { text-align: center; padding: clamp(1.8rem, 4vw, 3rem) 0 1.4rem; }
.articulo-cab .entradilla { max-width: 34em; margin-inline: auto; }
.articulo-cab .migas { margin-bottom: 1.4rem; }
.articulo-libro { display: grid; grid-template-columns: 100px 1fr; gap: 1.4rem; align-items: center; padding: 1.4rem; border-radius: var(--radio); background: var(--fondo-2); margin: 3rem 0; }
.articulo-libro img { border-radius: 3px; box-shadow: var(--sombra-libro); }

/* ---------- Cita destacada ---------- */
.cita { text-align: center; max-width: 860px; margin: 0 auto; }
.cita blockquote { margin: 0; font: italic 400 clamp(1.7rem, 3.4vw, 2.6rem)/1.3 var(--serif); color: #fff; letter-spacing: -.01em; }
.cita figcaption { margin-top: 1.2rem; font-size: .95rem; color: #9fb3dc; }

/* ---------- Pilares ---------- */
.pilares { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.pilar { background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); padding: 1.5rem; }
.seccion--papel2 .pilar { border-color: transparent; }
.pilar h3 { font: 600 1.08rem/1.3 var(--sans); margin-bottom: .45rem; }
.pilar p { color: var(--texto-2); font-size: .97rem; margin: 0; }
.pilar__num { display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 999px; background: var(--acento-suave); color: var(--acento-2); font: 600 .85rem/1 var(--sans); margin-bottom: 1rem; }

/* ---------- Newsletter ---------- */
.news-bloque { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 760px) { .news-bloque { grid-template-columns: 1fr; } }
.form-news { display: grid; gap: .6rem; }
.form-news input[type=text], .form-news input[type=email] { font: inherit; font-size: 1rem; padding: .75rem 1rem; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08); color: inherit; border-radius: var(--radio-s); min-height: 48px; }
.form-news input::placeholder { color: rgba(217,222,234,.6); }
.form-news .boton { background: #fff; color: var(--acento); border-color: #fff; }
.form-news .boton:hover { background: #e6ebf5; border-color: #e6ebf5; color: var(--acento); }
.casilla { display: flex; gap: .55rem; align-items: flex-start; font-size: .88rem; line-height: 1.45; }
.casilla input { margin-top: .2em; accent-color: var(--acento-2); }
.casilla a { color: inherit; }
.trampa { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Formularios ---------- */
.form { display: grid; gap: 1.1rem; }
.form .fila2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form .fila2 { grid-template-columns: 1fr; } }
.form textarea { min-height: 180px; resize: vertical; }
.aviso { padding: 1rem 1.2rem; border-radius: var(--radio-s); margin-bottom: 1.5rem; border: 1px solid; }
.aviso--ok { background: #edf7ef; border-color: #bfdcc5; color: #22502c; }
.aviso--error { background: #fbeeec; border-color: #ecc4bd; color: #7a2419; }
.contacto { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(2rem, 5vw, 4rem); }
@media (max-width: 800px) { .contacto { grid-template-columns: 1fr; } }
.tarjeta-dato { padding: 1.2rem 0; border-bottom: 1px solid var(--linea); }
.tarjeta-dato .etq { display: block; margin-bottom: .3rem; }
.tarjeta-dato a { font-size: 1.1rem; font-weight: 500; }

/* ---------- Pie ---------- */
.pie { background: #10172a; color: #a9b0bf; padding: 4rem 0 0; font-size: .95rem; }
.pie a { color: #e3e7ef; text-decoration: none; }
.pie a:hover { color: #fff; text-decoration: underline; }
.pie__rejilla { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.5fr; gap: 2.5rem; padding-bottom: 3rem; }
.pie__marca img { width: 72px; height: 72px; margin-bottom: 1rem; }
.pie__titulo { font: 600 .82rem/1 var(--sans); letter-spacing: .05em; text-transform: uppercase; color: #fff; margin-bottom: 1.1rem; }
.pie__lista { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.pie__redes { display: flex; gap: 1rem; margin-top: .4rem; }
.pie .form-news input { border-color: rgba(255,255,255,.14); }
.pie__afiliados { font-size: .8rem; color: #8a92a3; margin-top: 0; margin-bottom: 0; padding: 0 0 1.2rem; }
.pie__legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding: 1.4rem 0; border-top: 1px solid rgba(255,255,255,.08); font-size: .85rem; }
.pie__legal nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.pie__legal .enlace { color: #e3e7ef; text-decoration: none; font-size: .85rem; }
@media (max-width: 900px) { .pie__rejilla { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .pie__rejilla { grid-template-columns: 1fr; } }

/* ---------- Cookies ---------- */
.cookies { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 90; max-width: 520px; background: #fff; border: 1px solid var(--linea); box-shadow: 0 24px 60px -20px rgba(0,0,0,.35); padding: 1.2rem 1.3rem; border-radius: var(--radio); font-size: .93rem; }
.cookies p { margin-bottom: 1rem; }
.cookies__botones { display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; }
.cookies .boton { padding: .75em 1.2em; font-size: .9rem; }

/* ---------- Varios ---------- */
.vacio { text-align: center; padding: 3rem 1rem; color: var(--texto-3); }
.centro { text-align: center; }
.mt0 { margin-top: 0; }
.legal { padding: 3rem 0 4rem; }
.legal h2 { font-size: 1.5rem; margin-top: 2rem; }
.legal table td, .legal table th { padding: .5rem .4rem; vertical-align: top; }
.error-404 { text-align: center; padding: 5rem 0; }
.error-404 .num { font: 500 7rem/1 var(--serif); color: var(--fondo-3); }
.hero__cifras b, .datos dd, .paginacion, .lista-autores .n, .estrellas { font-variant-numeric: lining-nums tabular-nums; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
@media print { .cabecera, .pie, .cookies, .comprar { display: none; } }

/* ---------- Botón Newsletter del menú ---------- */
.menu a.boton--nav { padding: .62em 1.15em; font: 600 .9rem/1 var(--sans); color: #fff; background: var(--acento); border: 1px solid var(--acento); border-radius: 999px; }
.menu a.boton--nav:hover { color: #fff; background: var(--acento-2); border-color: var(--acento-2); }
@media (max-width: 1120px) { .menu a.boton--nav { align-self: flex-start; padding: .8em 1.4em; font-size: 1rem; border-bottom: 1px solid var(--acento); border-radius: 999px; } }
.pie__news.resaltar { animation: resaltar 1.6s ease-out; border-radius: var(--radio); }
@keyframes resaltar { 0% { box-shadow: 0 0 0 0 rgba(159,179,220,.9); } 100% { box-shadow: 0 0 0 18px rgba(159,179,220,0); } }

/* ---------- Muestra de lectura (visor de Amazon) ---------- */
.boton--muestra { width: 100%; margin-top: 1rem; }
.muestra { width: min(100% - 2rem, 980px); height: min(100% - 2rem, 860px); max-width: none; max-height: none; padding: 0; border: 0; border-radius: var(--radio); box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); background: #fff; overflow: hidden; }
.muestra[open] { display: flex; flex-direction: column; }
.muestra::backdrop { background: rgba(16,23,42,.6); backdrop-filter: blur(2px); }
.muestra__cab { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1rem .8rem 1.3rem; border-bottom: 1px solid var(--linea); }
.muestra__cab h2 { font: 600 1rem/1.3 var(--sans); margin: 0; }
.muestra__cerrar { border: 0; background: var(--fondo-2); width: 38px; height: 38px; border-radius: 999px; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--texto-2); flex-shrink: 0; }
.muestra__cerrar:hover { background: var(--fondo-3); color: var(--texto); }
.muestra__marco { flex: 1; position: relative; background: var(--fondo-2); }
.muestra__marco iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.muestra__cargando { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--texto-3); }
.muestra__nota { margin: 0; padding: .6rem 1.3rem; font-size: .78rem; color: var(--texto-3); border-top: 1px solid var(--linea); }
@media (max-width: 600px) { .muestra { width: 100%; height: 100%; border-radius: 0; } }

/* ---------- Dónde comprarlo ---------- */
.comprar { margin: 1.4rem 0 2rem; border: 1px solid var(--linea); border-radius: var(--radio); background: #fff; overflow: hidden; }
.comprar h2 { font: 600 .78rem/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--texto-3); margin: 0; padding: 1rem 1.2rem .2rem; }
.comprar__tiendas { list-style: none; margin: 0; padding: .3rem 0; }
.comprar__tienda-fila { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: .9rem; padding: .8rem 1.2rem; }
.comprar__tienda-fila + .comprar__tienda-fila { border-top: 1px solid var(--linea); }
.comprar__marca { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; overflow: hidden; font: 700 1rem/1 var(--sans); color: #fff; background: var(--texto-3); text-decoration: none; transition: transform .15s; }
.comprar__marca:hover { transform: scale(1.06); }
.comprar__marca img { width: 100%; height: 100%; object-fit: contain; display: block; }
.comprar__marca--amazon { background: #fff; border: 1px solid var(--linea); padding: 7px; }
.comprar__marca--apple, .comprar__marca--casadellibro { background: none; }
.comprar__marca--casadellibro { border-radius: 50%; }
.comprar__marca--googleplay { background: #1a73e8; }
.comprar__marca--kobo { background: #bf0000; }
.comprar__info { display: flex; flex-direction: column; min-width: 0; }
.comprar__nombre { font-weight: 600; line-height: 1.25; color: var(--texto); text-decoration: none; width: fit-content; }
.comprar__nombre:hover { color: var(--acento-2); text-decoration: underline; }
.comprar__formatos { font-size: .84rem; color: var(--texto-3); }
.comprar__botones { display: flex; flex-wrap: wrap; gap: .45rem; justify-content: flex-end; }
.comprar__boton { display: inline-flex; align-items: center; gap: .4em; padding: .58em 1em; border-radius: 999px; font: 600 .88rem/1 var(--sans); text-decoration: none; white-space: nowrap;
  color: var(--texto); background: #fff; border: 1px solid var(--linea); transition: background .15s, border-color .15s, color .15s, transform .15s; }
.comprar__boton:hover { border-color: var(--acento-2); color: var(--acento-2); transform: translateY(-1px); }
.comprar__boton--principal { background: var(--acento); border-color: var(--acento); color: #fff; }
.comprar__boton--principal:hover { background: var(--acento-2); border-color: var(--acento-2); color: #fff; }
.comprar__boton svg { opacity: .75; }
@media (max-width: 560px) {
  .comprar__tienda-fila { grid-template-columns: 40px 1fr; row-gap: .7rem; }
  .comprar__botones { grid-column: 1 / -1; justify-content: flex-start; }
  .comprar__boton { flex: 1; justify-content: center; }
}

/* ---------- Catálogo en móvil: filtros plegables ---------- */
.filtros__abrir { display: none; }
.filtros__mas { display: contents; }
.filtros__n { display: inline-grid; place-items: center; min-width: 1.35em; height: 1.35em; padding: 0 .35em; border-radius: 999px; background: var(--acento); color: #fff; font-size: .75rem; }
@media (max-width: 700px) {
  .filtros { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem; align-items: end; padding: 1rem 0 .6rem; }
  .filtros .campo { min-width: 0; }
  .filtros .campo input, .filtros .campo select { width: 100%; min-width: 0; }
  .filtros .campo--q label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .filtros__abrir { display: inline-flex; align-items: center; gap: .45rem; height: 46px; padding: 0 1rem; border: 1px solid var(--linea); border-radius: var(--radio-s); background: #fff; font: 600 .92rem/1 var(--sans); color: var(--texto); cursor: pointer; }
  .filtros__abrir[aria-expanded="true"] { border-color: var(--acento-2); color: var(--acento-2); }
  .filtros__mas { display: none; grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; padding: .8rem; background: var(--fondo-2); border-radius: var(--radio-s); }
  .filtros.abierto .filtros__mas { display: grid; }
  .filtros__mas .campo select { width: 100%; }
  .filtros__enviar { display: none; }
  .filtros > .enlace-flecha { grid-column: 1 / -1; font-size: .85rem; }
  .resultado-info { margin-bottom: 1rem; font-size: .85rem; }
}

/* ---------- Rejillas de libros en móvil: tres por fila ---------- */
@media (max-width: 600px) {
  .rejilla, .rejilla--grande { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.3rem .75rem; }
  .carrusel { grid-auto-columns: 128px; gap: .9rem; }
  .tarjeta__titulo { font-size: .8rem; line-height: 1.25; margin-top: .55rem; }
  .tarjeta__autor { font-size: .72rem; line-height: 1.3; }
  .tarjeta__portada { border-radius: 3px; }
  .sello { font-size: .55rem; top: .35rem; left: .35rem; padding: .35em .55em; }
}
