/* ── Variables ───────────────────────────────────────────── */
:root {
  --negro:  #121212;
  --negro2: #1c1c1c;
  --negro3: #252525;
  --rojo:   #cc1111;
  --rojo2:  #e01a1a;
  --blanco: #f0ece0;
  --gris:   #666;
  /* Paleta clara — páginas de contenido */
  --fondo:  #f0ebe1;
  --fondo2: #e8e2d6;
  --fondo3: #d8d2c6;
  --texto:  #111111;
  --font-serif:    'Cormorant Garamond', Georgia, serif;
  --font-display:  'Calistoga', Georgia, serif;
  --font-sans:     'Oswald', 'Helvetica Neue', Arial, sans-serif;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 18px; scroll-behavior: smooth; }
body {
  background: var(--fondo);
  color: var(--texto);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── Splash ──────────────────────────────────────────────── */
#splash {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}
#splash.splash-oculto {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.splash-columna {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(220px, 48vw);
  gap: 0;
}
.splash-cabeza-wrap {
  position: relative;
  width: 100%;
  margin-top: -1.2rem;
}
.splash-cabeza {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0;
  transform: scale(0.94);
  animation: splashCabeza 0.9s cubic-bezier(.4,0,.2,1) 0.3s forwards;
}
/* rayo bbox original: top=0 left=299 bottom=381 right=660 en imagen 786x1200
   → left=38.1% top=0% width=46.1% height=31.75% del contenedor */
.splash-rayo-img {
  position: absolute;
  top: 0;
  left: 38.1%;
  width: 46.1%;
  height: auto;
  opacity: 0;
  transform: translateY(-120%) rotate(-4deg);
  pointer-events: none;
}
.splash-rayo-img.rayo-cae {
  animation: rayoCae 0.28s cubic-bezier(0.1, 0, 0.5, 1) forwards;
}
.splash-palabra {
  font-family: 'Calistoga', serif;
  font-size: clamp(3rem, 13vw, 5rem);
  font-weight: 600;
  letter-spacing: 0.18em;
  color: #f0ece0;
  text-transform: uppercase;
  text-align: left;
  line-height: 1;
  opacity: 0;
  transform: translateY(-14px);
  animation: splashBaja 0.6s ease forwards;
}
.rayo-txt { animation-delay: 1.8s; }
.rojo-txt { animation-delay: 2.2s; }
.splash-editorial-txt {
  font-family: 'Calistoga', serif;
  font-size: clamp(3rem, 13vw, 5rem);
  font-weight: 400;
  color: #f0ece0;
  text-transform: uppercase;
  text-align: left;
  line-height: 1;
  margin-top: 0;
  opacity: 0;
  transform: translateY(12px);
  animation: splashSube 0.6s ease 2.6s forwards;
}
.word-scale,
.editorial-scale {
  display: block;
  white-space: nowrap;
  transform-origin: left center;
}
.splash-flash {
  position: absolute;
  inset: 0;
  background: #cc1111;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}
.splash-flash.flash-on {
  animation: splashFlash 0.55s ease forwards;
}
@keyframes splashCabeza {
  to { opacity: 1; transform: scale(1); }
}
@keyframes splashBaja {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes splashSube {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes rayoCae {
  0%   { opacity: 0;   transform: translateY(-160px) rotate(-8deg); }
  55%  { opacity: 1;   transform: translateY(6px)    rotate(2deg);  }
  75%  { transform: translateY(-3px) rotate(-1deg); }
  100% { opacity: 1;   transform: translateY(0)      rotate(0deg);  }
}
@keyframes splashFlash {
  0%   { opacity: 0;    }
  25%  { opacity: 0.92; }
  100% { opacity: 0;    }
}
#flash-rojo { display: none; }

/* ── Header ──────────────────────────────────────────────── */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(18,18,18,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #1e1e1e;
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo-link img {
  height: clamp(36px, 5vw, 52px);
  width: auto;
}
nav.nav-principal ul {
  list-style: none;
  display: flex;
  gap: 2.5rem;
}
nav.nav-principal a {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gris);
  transition: color 0.2s;
}
nav.nav-principal a:hover { color: var(--blanco); }
nav.nav-principal a.active { color: var(--rojo); }

/* ── Buscador nav ────────────────────────────────────────── */
.nav-search {
  display: flex;
  align-items: center;
  gap: 0;
  margin-left: 1.5rem;
}
.nav-search-input {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 3px 0 0 3px;
  color: var(--blanco);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.6rem;
  width: 160px;
  outline: none;
}
.nav-search-input::placeholder { color: rgba(255,255,255,0.45); }
.nav-search-input:focus { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.5); }
.nav-search-btn {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-left: none;
  border-radius: 0 3px 3px 0;
  color: var(--blanco);
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  display: flex;
  align-items: center;
}
.nav-search-btn:hover { background: var(--rojo); }
.nav-search--mobile {
  margin: 1rem 0 0;
  width: 100%;
}
.nav-search--mobile .nav-search-input { flex: 1; width: auto; border-radius: 3px 0 0 3px; }

/* ── Buscador home ───────────────────────────────────────── */
.home-search {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 1.5rem;
}
.home-search-input {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.35);
  border-right: none;
  border-radius: 3px 0 0 3px;
  color: var(--blanco);
  font-family: var(--font-sans);
  font-size: 1rem;
  height: 3rem;
  padding: 0 1rem;
  width: 320px;
  outline: none;
  box-sizing: border-box;
  vertical-align: middle;
}
.home-search-input::placeholder { color: rgba(255,255,255,0.65); }
.home-search-input:focus { background: rgba(255,255,255,0.18); }
.home-search-btn {
  background: var(--rojo);
  border: 1px solid var(--rojo);
  border-radius: 0 3px 3px 0;
  color: #fff;
  cursor: pointer;
  height: 3rem;
  width: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
}
.home-search-btn:hover { background: var(--rojo2); }

/* ── Página de búsqueda ──────────────────────────────────── */
.buscar-seccion { max-width: 800px; margin: 0 auto; }
.buscar-titulo {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--texto);
}
.buscar-form {
  display: flex;
  margin-bottom: 2rem;
}
.buscar-input {
  flex: 1;
  border: 2px solid var(--fondo3);
  border-radius: 3px 0 0 3px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  padding: 0.6rem 0.8rem;
  outline: none;
  background: #fff;
  color: var(--texto);
}
.buscar-input:focus { border-color: var(--rojo); }
.buscar-btn {
  background: var(--rojo);
  border: 2px solid var(--rojo);
  border-radius: 0 3px 3px 0;
  color: #fff;
  cursor: pointer;
  padding: 0.6rem 0.9rem;
  display: flex;
  align-items: center;
}
.buscar-btn:hover { background: var(--rojo2); }
.buscar-lista { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.buscar-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  background: #fff;
  border: 1px solid var(--fondo3);
  border-radius: 2px;
  transition: background 0.15s;
}
.buscar-item:hover { background: var(--fondo2); }
.buscar-item-titulo {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--texto);
}
.buscar-item-meta {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gris);
}
.buscar-sin-resultados {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--gris);
  padding: 2rem 0;
}

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--blanco);
  transition: all 0.3s;
}
#nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.97);
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}
#nav-mobile.open { display: flex; }
#nav-mobile a {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--blanco);
  letter-spacing: 0.05em;
  transition: color 0.2s;
}
#nav-mobile a:hover { color: var(--rojo); }
.nav-mobile-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  background: none;
  border: none;
  color: var(--gris);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

/* ── Home landing ────────────────────────────────────────── */
.home-landing {
  min-height: 100svh;
  background: var(--negro);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  padding: 4rem 2rem;
}
.home-logo {
  height: clamp(280px, 50vh, 480px);
  width: auto;
}
.home-links {
  display: flex;
  gap: 3rem;
  align-items: center;
}
.home-links a {
  font-family: var(--font-sans);
  font-size: clamp(0.75rem, 1.5vw, 0.9rem);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--blanco);
  transition: color 0.2s;
}
.home-links a:hover { color: var(--rojo); }

/* ── Sección genérica ────────────────────────────────────── */
.seccion {
  padding: 5rem 2rem;
  max-width: 1280px;
  margin: 0 auto;
}
.seccion-titulo {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}
.seccion-linea {
  width: 3rem;
  height: 2px;
  background: var(--rojo);
  margin-bottom: 3rem;
}

/* ── Colecciones — home grid ─────────────────────────────── */
.colecciones-grid {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--fondo3);
  border: 1px solid var(--fondo3);
  max-width: 860px;
  margin: 0 auto;
}
.coleccion-card {
  background: var(--fondo);
  display: flex;
  flex-direction: row;
  align-items: center;
  transition: background 0.2s;
  cursor: pointer;
  overflow: hidden;
  min-height: 120px;
}
.coleccion-card:hover { background: var(--fondo2); }
.coleccion-card-img {
  flex: 0 0 160px;
  height: 120px;
  overflow: hidden;
  background: var(--fondo);
  display: flex;
  align-items: center;
  justify-content: center;
}
.coleccion-card-img img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.4s ease;
}
.coleccion-card:hover .coleccion-card-img img { transform: scale(1.05); }
.coleccion-card-img--sn img { max-height: 70%; max-width: 70%; }
.coleccion-card-info {
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
}
.col-nombre {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  line-height: 1.2;
  font-weight: 700;
}
.col-count {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gris);
}

/* ── Tapas en home (strip horizontal) ───────────────────── */
.tapas-strip {
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 0 2rem;
  display: flex;
  gap: 1rem;
  margin: 0 -2rem;
}
.tapas-strip::-webkit-scrollbar { display: none; }
.tapa-mini {
  flex: 0 0 auto;
  width: clamp(80px, 10vw, 120px);
}
.tapa-mini img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  filter: brightness(0.8);
  transition: filter 0.25s, transform 0.25s;
}
.tapa-mini:hover img {
  filter: brightness(1);
  transform: scale(1.04);
}

/* ── Página de colección ─────────────────────────────────── */
.coleccion-header {
  padding: 5rem 2rem 3rem;
  max-width: 1280px;
  margin: 0 auto;
  border-bottom: 1px solid var(--fondo3);
}
.breadcrumb {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gris);
  margin-bottom: 1.5rem;
}
.breadcrumb a:hover { color: var(--blanco); }
.breadcrumb span { margin: 0 0.5rem; }
.coleccion-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.coleccion-header .col-meta {
  margin-top: 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rojo);
}

.libros-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 260px));
  justify-content: center;
  gap: 3.5rem 2.5rem;
}
.libro-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.libro-card-tapa {
  position: relative;
  overflow: hidden;
  background: var(--fondo3);
}
.libro-card-tapa img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease, filter 0.4s ease;
  filter: brightness(0.9);
}
.libro-card:hover .libro-card-tapa img {
  transform: scale(1.05);
  filter: brightness(1);
}
.libro-card-info {
  padding: 0 0.25rem;
}
.libro-card-titulo {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.3;
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.libro-card-orden {
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--rojo);
}
.libro-card-snippet {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--gris);
  margin-top: 0.4rem;
}

/* ── Intro de colección ──────────────────────────────────── */
.coleccion-intro {
  max-width: 800px;
  margin: 0 auto 3rem;
  padding: 0 2rem;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.8;
  color: #333;
}
.coleccion-intro p + p { margin-top: 1rem; }

/* ── Agente Rayo ─────────────────────────────────────────── */
.agente-rayo-section {
  background: var(--fondo2);
  padding: 4rem 2rem;
  margin-bottom: 1rem;
}
.agente-rayo-banner {
  display: flex;
  gap: 4px;
  max-width: 1280px;
  margin: 0 auto 3rem;
  overflow: hidden;
}
.agente-rayo-banner img {
  flex: 1;
  width: 0;
  height: 320px;
  object-fit: cover;
  display: block;
}
.agente-rayo-bio {
  max-width: 800px;
  margin: 0 auto;
}
.agente-rayo-bio p {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.8;
  color: #333;
}

/* ── Miniaturas de fotos interiores ──────────────────────── */
.libro-fotos-thumbs {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 6px;
  margin-top: 10px;
  overflow-x: auto;
}
.foto-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.75;
  border: 2px solid transparent;
  transition: opacity 0.2s, border-color 0.2s;
}
.foto-thumb:hover, .foto-thumb.active { opacity: 1; border-color: var(--rojo); }

/* ── Lightbox ────────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.93);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lb-img { max-height: 90vh; max-width: 90vw; object-fit: contain; }
.lb-close {
  position: absolute; top: 1rem; right: 1.5rem;
  font-size: 2.5rem; color: #fff; background: none; border: none; cursor: pointer; line-height: 1;
}
.lb-prev, .lb-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 3rem; color: #fff; background: none; border: none; cursor: pointer; padding: 1rem;
  user-select: none;
}
.lb-prev { left: 0.5rem; }
.lb-next { right: 0.5rem; }

/* ── Página de libro ─────────────────────────────────────── */
.libro-single {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
  display: grid;
  grid-template-columns: 38% 1fr;
  gap: 5rem;
  align-items: start;
}
.libro-tapa-wrap {
  position: sticky;
  top: 6rem;
}
.libro-tapa-wrap > img {
  width: 100%;
}
.libro-contenido {
  padding-top: 0.5rem;
}
.libro-contenido .breadcrumb {
  margin-bottom: 2rem;
}
.libro-titulo {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}
.libro-ficha {
  font-size: 0.8rem;
  line-height: 1.8;
  color: var(--gris);
  letter-spacing: 0.02em;
  border-left: 2px solid var(--rojo);
  padding-left: 1rem;
  margin-bottom: 2.5rem;
  white-space: pre-line;
}
.libro-descripcion {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.8;
  color: #333;
  margin-bottom: 3rem;
  position: relative;
}
.descripcion-colapsada {
  max-height: 6em;
  overflow: hidden;
}
.descripcion-colapsada::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3em;
  background: linear-gradient(transparent, var(--fondo));
}
.btn-leer-mas {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rojo);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-bottom: 2rem;
  display: block;
  transition: color 0.2s;
}
.btn-leer-mas:hover { color: var(--rojo2); }
.btn-comprar {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--rojo);
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 1rem 2rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}
.btn-comprar:hover { background: var(--rojo2); }
.btn-comprar svg { flex-shrink: 0; }

/* ── Navegación entre libros ─────────────────────────────── */
.libro-nav {
  max-width: 1100px;
  margin: 0 auto 5rem;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--fondo3);
  padding-top: 2rem;
}
.libro-nav a {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gris);
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.libro-nav a:hover { color: var(--blanco); }

/* ── Árbol SVG ───────────────────────────────────────────── */
.arbol-wrap {
  display: flex;
  justify-content: center;
  padding: 2rem;
}
.arbol-wrap svg {
  max-width: 100%;
  height: auto;
}
.arbol-branch { stroke: var(--fondo3); stroke-width: 2; fill: none; }
.arbol-nodo circle { fill: var(--fondo2); stroke: var(--fondo3); stroke-width: 1.5; transition: fill 0.2s, stroke 0.2s; }
.arbol-nodo:hover circle { fill: var(--rojo); stroke: var(--rojo); }
.arbol-nodo text { fill: var(--texto); font-family: var(--font-sans); font-size: 11px; letter-spacing: 0.05em; pointer-events: none; }
.arbol-nodo:hover text { fill: var(--texto); }
.arbol-nodo-main circle { fill: var(--fondo3); stroke: var(--gris); stroke-width: 2; }
.arbol-nodo-main text { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; fill: var(--gris); }

/* ── Logo en Quiénes Somos ───────────────────────────────── */
.qs-logo {
  text-align: center;
  margin-bottom: 2.5rem;
}
.qs-logo img {
  height: 160px;
  width: auto;
}

/* ── Páginas estáticas (Quiénes / Contacto) ──────────────── */
.pagina-static {
  max-width: 720px;
  margin: 0 auto;
  padding: 5rem 2rem 6rem;
}
.pagina-static h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.pagina-static .linea { width: 3rem; height: 2px; background: var(--rojo); margin-bottom: 3rem; }
.pagina-static p { font-size: 1rem; line-height: 1.9; color: #333; margin-bottom: 1.5rem; }
.pagina-static h2 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  margin: 3rem 0 1rem;
  color: var(--blanco);
}
.contacto-dato {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.9rem;
  color: var(--gris);
  line-height: 1.7;
  margin-bottom: 2.5rem;
}
.contacto-dato strong { color: var(--texto); }
.contacto-dato a { color: var(--rojo); }
.contacto-dato a:hover { color: var(--rojo2); }

/* ── Footer ──────────────────────────────────────────────── */
footer {
  background: var(--fondo2);
  border-top: 1px solid var(--fondo3);
  padding: 3rem 4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}
.footer-logo img { height: 36px; width: auto; opacity: 0.6; }
.footer-copy {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--gris);
}
.footer-nav {
  display: flex;
  gap: 2rem;
}
.footer-nav a {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gris);
  transition: color 0.2s;
}
.footer-nav a:hover { color: var(--texto); }

/* ── Imagen de colección ─────────────────────────────────── */
.coleccion-imagen {
  max-width: 1280px;
  margin: 0 auto 4rem;
  padding: 0 2rem;
  text-align: center;
}
.coleccion-imagen img {
  max-width: 480px;
  max-height: 360px;
  width: auto;
  object-fit: contain;
  display: inline-block;
  margin: 0 auto;
}
.coleccion-imagen--sgsc img {
  max-width: 800px;
  max-height: none;
  width: 100%;
}
.coleccion-imagen--chica img {
  max-width: 260px;
  max-height: 220px;
}

/* ── Galería de tapas SGSC (acordeón) ────────────────────── */
.tapas-banner-sgsc {
  display: flex;
  gap: 0;
  max-width: 1280px;
  margin: 0 auto 4rem;
  overflow: hidden;
}
.tapas-banner-sgsc a {
  flex: 1;
  width: 0;
  display: block;
  overflow: hidden;
  transition: flex 0.35s ease;
}
.tapas-banner-sgsc a img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
  filter: brightness(0.8);
  transition: filter 0.35s ease;
}
.tapas-banner-sgsc a:hover {
  flex: 2.5;
}
.tapas-banner-sgsc a:hover img {
  filter: brightness(1);
}

/* ── Grilla SGSC: 4 columnas iguales ─────────────────────── */
.libros-grid--sgsc {
  grid-template-columns: repeat(12, 1fr);
  justify-content: unset;
  gap: 2rem 0.5rem;
}
.libros-grid--sgsc .libro-card:nth-child(-n+4) {
  grid-column: span 3;
}
.libros-grid--sgsc .libro-card:nth-child(n+5) {
  grid-column: span 4;
}
.libros-grid--sgsc .libro-card-tapa {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: transparent;
}
.libros-grid--sgsc .libro-card-tapa img {
  width: 220px;
  height: auto;
  max-width: 100%;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .libro-single {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .libro-tapa-wrap {
    position: static;
    max-width: 280px;
  }
}
@media (max-width: 640px) {
  nav.nav-principal { display: none; }
  .nav-toggle { display: flex; }
  .seccion { padding: 3rem 1.25rem; }
  .libros-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem 1rem; }
  .coleccion-card { flex-direction: column; min-height: auto; }
  .coleccion-card-img { flex: none; width: 100%; height: 160px; }
  .libro-single { padding: 2.5rem 1.25rem 4rem; }
  .coleccion-header { padding: 3rem 1.25rem 2rem; }
  .pagina-static { padding: 3rem 1.25rem 4rem; }
  footer { padding: 2rem 1.25rem; }
  .hero h1 { font-size: clamp(2.5rem, 10vw, 4rem); }
}
