/* ==========================================================================
   Editorial Océano Colombia — hoja de estilos
   Colores y medidas tomados del sitio original (oceano.com.co)
   ========================================================================== */

:root {
  --azul: #001C70;            /* azul marino corporativo (barra superior, subrayados, botones) */
  --azul-hover: #0a3399;
  --azul-suave: #e9edf7;
  --texto: #222;
  --texto-2: #444;
  --texto-3: #555;
  --gris: #666;
  --gris-claro: #8a8a8a;
  --precio: #495C33;          /* verde oliva de los precios */
  --fondo: #fff;
  --fondo-pie: #F2F2F2;       /* footer gris claro */
  --fondo-panel: #F8F8F8;     /* paneles laterales */
  --borde: #e5e5e5;
  --linea: #C6C6C6;
  --negro: #000;

  --contenedor: 1200px;
  --gutter: 20px;
  --alto-barra: 46px;
  --alto-cabecera: 116px;
  --fuente: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --transicion: .2s ease;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--alto-cabecera) + 16px); }
body {
  margin: 0; font-family: var(--fuente); font-size: 14px; line-height: 1.6;
  color: var(--texto); background: var(--fondo); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--transicion); }
a:hover { color: var(--azul); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.25; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
table { border-collapse: collapse; width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; }
main:focus { outline: none; }

.sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.saltar {
  position: absolute; left: 12px; top: -80px; z-index: 1000; background: var(--azul); color: #fff;
  padding: 10px 18px; font-weight: 500;
}
.saltar:focus { top: 12px; color: #fff; }
.contenedor { max-width: calc(var(--contenedor) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.centrado { text-align: center; }
.icono { width: 1em; height: 1em; display: inline-block; vertical-align: middle; flex: none; }
.logo-texto { font: 700 32px/1 Georgia, serif; color: var(--azul); }
.logo-texto small { display: block; font: 600 13px var(--fuente); color: #888; }

/* ---------- Botones y enlaces ---------- */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--azul); color: #fff; border: 2px solid var(--azul);
  font-size: 14px; font-weight: 600; letter-spacing: .02em; padding: 13px 36px;
  transition: background var(--transicion), color var(--transicion);
}
.boton:hover { background: #fff; color: var(--azul); }
.boton--contorno { background: #fff; color: var(--azul); }
.boton--contorno:hover { background: var(--azul); color: #fff; }
.enlace-mas { display: inline-flex; align-items: center; gap: 4px; color: var(--azul); font-weight: 500; }
.enlace-mas:hover { text-decoration: underline; }

/* ---------- Barra superior ---------- */
.barra-superior { background: var(--azul); color: #fff; font-size: 13px; font-weight: 500; letter-spacing: .04em; }
.barra-superior__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: var(--alto-barra); }
.barra-superior__enlaces { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.barra-superior a { color: #fff; }
.barra-superior a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.barra-superior__redes { display: flex; align-items: center; gap: 22px; }

.redes { display: flex; gap: 8px; }
.redes a { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; transition: background var(--transicion), color var(--transicion); }
.redes .icono { width: 18px; height: 18px; }
.redes--solidas a { background: #fff; color: var(--azul); }
.redes--solidas a:hover { background: #dbe2f4; color: var(--azul); text-decoration: none; }
.redes--contorno a { width: 37px; height: 37px; border: 1px solid var(--azul); color: var(--azul); }
.redes--contorno a:hover { background: var(--azul); color: #fff; }

/* ---------- Cabecera ---------- */
.cabecera { position: sticky; top: 0; z-index: 100; background: #fff; transition: box-shadow var(--transicion); }
.cabecera.con-sombra { box-shadow: 0 6px 16px rgba(0, 0, 0, .08); }
.cabecera__inner {
  position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch;
  height: var(--alto-cabecera);
}
.cabecera__logo { justify-self: start; align-self: center; display: block; }
.cabecera__logo img { width: 151px; }
.cabecera__acciones { justify-self: end; align-self: center; display: flex; align-items: center; gap: 4px; margin-right: -10px; }
.cabecera__boton { width: 44px; height: 44px; display: grid; place-items: center; font-size: 22px; color: #111; border-radius: 50%; }
.cabecera__boton:hover { color: var(--azul); background: var(--fondo-panel); }
.cabecera__hamburguesa { display: none; font-size: 26px; }

/* Menú principal */
.nav { align-self: stretch; }
.nav__lista { display: flex; height: 100%; }
.nav__item { display: flex; align-items: stretch; }
.nav__enlace {
  position: relative; z-index: 3; display: flex; align-items: center; padding: 0 25px;
  font-size: 14.5px; font-weight: 500; letter-spacing: .05em; color: #333;
  border: 2px solid transparent; border-bottom: 0; background: #fff;
}
.nav__enlace:hover, .nav__enlace[aria-current] { color: var(--azul); }
.nav__item.abierto .nav__enlace { border-color: var(--azul); margin-bottom: -2px; color: var(--azul); }
/* El botón que abre el submenú solo se ve al navegar con teclado */
.nav__toggle {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
}
.nav__toggle:focus-visible {
  position: relative; width: 22px; height: auto; clip: auto; overflow: visible; align-self: center;
  margin-left: -22px; z-index: 4; display: grid; place-items: center; color: var(--azul);
}

/* Submenús desplegables (mega menú) */
.mega {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%); z-index: 2;
  width: min(1000px, calc(100vw - 40px)); max-height: calc(100vh - var(--alto-cabecera) - 24px); overflow-y: auto;
  background: #fff; border: 2px solid var(--azul); padding: 26px 20px 30px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 34px 30px; align-content: start;
  visibility: hidden; opacity: 0; transition: opacity .15s ease, visibility .15s ease;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .08);
}
.nav__item.abierto .mega { visibility: visible; opacity: 1; }
.mega--editoriales { grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); }
.mega__titulo {
  display: inline-block; min-width: 60%; color: var(--azul); font-size: 13px; font-weight: 500;
  padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid #e1e1e1;
}
.mega__titulo:hover { text-decoration: underline; }
.mega__lista { display: flex; flex-wrap: wrap; }
.mega__lista li { padding-right: 6px; margin: 0 6px 6px 0; border-right: 1px solid #c9c9c9; line-height: 1.3; }
.mega__lista a { font-size: 12.5px; color: var(--texto-3); }
.mega__lista a:hover { color: var(--azul); }

/* Buscador desplegable */
.buscador {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 5; background: #fff;
  border-top: 1px solid var(--borde); box-shadow: 0 16px 30px rgba(0, 0, 0, .1); padding: 22px 0 26px;
}
.buscador__form { display: flex; align-items: center; gap: 10px; border-bottom: 2px solid var(--azul); }
.buscador__lupa { font-size: 20px; color: var(--gris); }
.buscador input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit;
  font-size: 18px; padding: 12px 4px; color: var(--texto);
}
.buscador input::-webkit-search-cancel-button { display: none; }
.buscador__enviar { background: var(--azul); color: #fff; font-weight: 600; padding: 9px 22px; margin-bottom: 6px; }
.buscador__enviar:hover { background: var(--azul-hover); }
.buscador__cerrar { width: 40px; height: 40px; display: grid; place-items: center; font-size: 20px; margin-bottom: 4px; }
.buscador__cerrar:hover { color: var(--azul); }
.sugerencias { margin-top: 8px; max-height: min(60vh, 460px); overflow-y: auto; }
.sugerencia {
  display: grid; grid-template-columns: 42px 1fr auto; gap: 14px; align-items: center;
  padding: 8px 10px; border-bottom: 1px solid #f0f0f0; color: var(--texto);
}
.sugerencia img { width: 42px; height: 58px; object-fit: contain; background: var(--fondo-panel); }
.sugerencia__titulo { display: block; font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sugerencia__autor { display: block; font-size: 12.5px; color: var(--gris); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sugerencia__texto { min-width: 0; }
.sugerencia__precio { font-weight: 600; color: var(--precio); font-size: 13.5px; }
.sugerencia:hover, .sugerencia[aria-selected="true"] { background: var(--azul-suave); color: var(--texto); }
.sugerencia mark { background: none; color: var(--azul); font-weight: 600; }
.sugerencias__estado { padding: 14px 10px; color: var(--gris); margin: 0; }
.sugerencias__todos { display: block; padding: 12px 10px; font-weight: 600; color: var(--azul); }
.sugerencias__todos:hover, .sugerencias__todos[aria-selected="true"] { background: var(--azul-suave); }

/* ---------- Menú móvil (se construye con JS a partir del menú principal) ---------- */
.menu-movil { position: fixed; inset: 0; z-index: 200; }
.menu-movil__fondo { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); opacity: 0; transition: opacity .25s; }
.menu-movil__panel {
  position: absolute; top: 0; bottom: 0; left: 0; width: min(380px, 88vw); background: #fff;
  display: flex; flex-direction: column; transform: translateX(-100%); transition: transform .28s ease;
  box-shadow: 4px 0 24px rgba(0, 0, 0, .15);
}
.menu-movil.abierto .menu-movil__fondo { opacity: 1; }
.menu-movil.abierto .menu-movil__panel { transform: none; }
.menu-movil__cabeza { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 14px 20px; border-bottom: 1px solid var(--borde); }
.menu-movil__cabeza img { width: 120px; }
.menu-movil__cerrar { width: 44px; height: 44px; display: grid; place-items: center; font-size: 22px; }
.menu-movil__nav { flex: 1; overflow-y: auto; padding: 6px 0 20px; }
.menu-movil__nav a, .menu-movil__nav summary {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 20px; font-size: 15px; font-weight: 500; color: #222; border-bottom: 1px solid #f0f0f0; cursor: pointer;
}
.menu-movil__nav summary { list-style: none; }
.menu-movil__nav summary::-webkit-details-marker { display: none; }
.menu-movil__nav summary .icono { transition: transform .2s; color: var(--gris); }
.menu-movil__nav details[open] > summary { color: var(--azul); }
.menu-movil__nav details[open] > summary .icono { transform: rotate(180deg); }
.menu-movil__nav details details summary, .menu-movil__nav details > a { padding-left: 34px; font-size: 14px; font-weight: 400; }
.menu-movil__nav details details a { padding-left: 48px; font-size: 13.5px; font-weight: 400; color: var(--texto-3); }
.menu-movil__nav .menu-movil__todo { color: var(--azul); font-weight: 500; }
.menu-movil__secundario { padding-top: 10px; }
.menu-movil__secundario a { font-size: 14px; font-weight: 400; color: var(--texto-3); border: 0; padding-top: 9px; padding-bottom: 9px; }
.menu-movil__redes { padding: 16px 20px 24px; border-top: 1px solid var(--borde); }
body.sin-scroll { overflow: hidden; }

/* ---------- Secciones ---------- */
.seccion { padding-top: 48px; padding-bottom: 40px; }
.titulo-seccion {
  text-align: center; text-transform: uppercase; font-size: 28px; font-weight: 600;
  color: #111; letter-spacing: .01em; margin-bottom: 50px;
}
.titulo-seccion::after { content: ""; display: block; width: 70px; height: 3px; background: var(--azul); margin: 14px auto 0; }
.pestana { text-align: center; color: var(--azul); font-weight: 500; margin: -22px 0 40px; }
.pestana a { color: var(--azul); }
.pestana a:hover { text-decoration: underline; }
.seccion .centrado { margin: 50px 0 0; }

/* ---------- Carrusel de banners ---------- */
.hero { position: relative; max-width: 1280px; margin: 0 auto; }
.hero__pista {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  aspect-ratio: 1600 / 500; overscroll-behavior-x: contain;
}
.hero__pista::-webkit-scrollbar { display: none; }
.hero__slide { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.hero__slide a, .hero__slide img { display: block; width: 100%; height: 100%; }
.hero__slide img { object-fit: cover; }
.hero__flecha {
  position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; font-size: 20px; background: rgba(255, 255, 255, .9); color: #111;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18); opacity: 0; transition: opacity var(--transicion), background var(--transicion);
}
.hero__flecha--prev { left: 18px; }
.hero__flecha--next { right: 18px; }
.hero:hover .hero__flecha, .hero__flecha:focus-visible { opacity: 1; }
.hero__flecha:hover { background: #fff; color: var(--azul); }
.hero__controles {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 4px;
  background: rgba(0, 0, 0, .25); border-radius: 20px; padding: 3px 6px;
}
.hero__punto { width: 24px; height: 24px; display: grid; place-items: center; }
.hero__punto::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .7); transition: background var(--transicion), transform var(--transicion); }
.hero__punto[aria-current="true"]::before { background: #fff; transform: scale(1.25); }
.hero__pausa { width: 24px; height: 24px; display: grid; place-items: center; color: #fff; font-size: 13px; }
.hero__pausa .icono-play, .hero__pausa.pausado .icono-pausa { display: none; }
.hero__pausa.pausado .icono-play { display: inline-block; }
.no-js .hero__controles, .no-js .hero__flecha { display: none; }

/* ---------- Tarjetas de libro ---------- */
.grilla-libros { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 45px 40px; }
.libro-card { position: relative; display: flex; flex-direction: column; min-width: 0; }
.libro-card__portada { aspect-ratio: 8 / 11; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.libro-card__portada img { width: 100%; height: 100%; object-fit: contain; transition: transform .35s ease; }
.libro-card:hover .libro-card__portada img { transform: scale(1.035); }
.libro-card__titulo {
  margin-top: 20px; font-size: 13px; font-weight: 400; line-height: 1.5; color: #222;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.libro-card__enlace::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* toda la tarjeta es clicable */
.libro-card__enlace:focus-visible { outline: none; }
.libro-card:has(.libro-card__enlace:focus-visible) { outline: 2px solid var(--azul); outline-offset: 6px; }
.libro-card:hover .libro-card__titulo a { color: var(--azul); }
.libro-card__precio { margin: 6px 0 0; font-size: 15px; font-weight: 600; color: var(--precio); }

/* ---------- Carrusel de tarjetas ---------- */
.carrusel { position: relative; container-type: inline-size; --por-vista: 4; --hueco: 40px; }
.carrusel__pista {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--por-vista) - 1) * var(--hueco)) / var(--por-vista));
  gap: var(--hueco); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  overscroll-behavior-x: contain; padding: 8px 0;
}
.carrusel__pista::-webkit-scrollbar { display: none; }
.carrusel__pista > * { scroll-snap-align: start; }
.carrusel__pista:focus-visible { outline-offset: 4px; }
.carrusel__flecha {
  position: absolute; z-index: 2; top: 36%;
  top: calc(8px + (100cqw - (var(--por-vista) - 1) * var(--hueco)) / var(--por-vista) * 11 / 16);
  transform: translateY(-50%); width: 32px; height: 32px; display: grid; place-items: center;
  font-size: 15px; background: #fff; border: 1px solid #d3d3d3; color: #111;
  transition: border-color var(--transicion), color var(--transicion);
}
.carrusel__flecha:hover { border-color: var(--azul); color: var(--azul); }
.carrusel__flecha--prev { left: -56px; }
.carrusel__flecha--next { right: -56px; }
.carrusel.sin-desborde .carrusel__flecha { display: none; }
.no-js .carrusel__flecha { display: none; }

/* Logos de editoriales */
.carrusel--logos { --por-vista: 6; --hueco: 20px; }
.carrusel--logos .carrusel__flecha { top: 50%; }
.logo-editorial {
  display: grid; place-items: center; aspect-ratio: 4 / 3; padding: 12px; background: #fff;
  border: 1px solid var(--borde); transition: border-color var(--transicion), box-shadow var(--transicion);
}
.logo-editorial img { width: 100%; max-width: 130px; height: 100%; object-fit: contain; }
.logo-editorial:hover { border-color: var(--azul); box-shadow: 0 6px 16px rgba(0, 28, 112, .1); }
.seccion--editoriales .centrado { margin-top: 28px; }

/* ---------- Migas de pan ---------- */
.migas { padding-top: 22px; padding-bottom: 6px; }
.migas ol { display: flex; flex-wrap: wrap; justify-content: center; font-size: 14px; color: var(--texto-3); }
.migas li { display: flex; min-width: 0; }
.migas li + li::before { content: "|"; margin: 0 10px; color: #333; }
.migas a:hover { color: var(--azul); }
.migas [aria-current] { color: var(--gris-claro); max-width: 64ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Ficha de libro ---------- */
.ficha { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 60px; align-items: start; padding-top: 30px; padding-bottom: 20px; }
.ficha__portada {
  position: sticky; top: calc(var(--alto-cabecera) + 24px); display: flex; justify-content: center;
  background: var(--fondo-panel); padding: 36px;
}
.ficha__portada img { max-height: 560px; width: auto; box-shadow: 0 12px 30px rgba(0, 0, 0, .14); }
.ficha__editorial { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--azul); }
.ficha__editorial:hover { text-decoration: underline; }
.ficha__titulo { font-size: 30px; font-weight: 600; color: #111; margin: 8px 0 8px; overflow-wrap: anywhere; }
.ficha__autor { font-size: 16px; color: var(--texto-3); margin: 0; }
.ficha__autor a { color: var(--texto-3); border-bottom: 1px solid var(--linea); }
.ficha__autor a:hover { color: var(--azul); border-color: var(--azul); }
.ficha__precio { font-size: 28px; font-weight: 600; color: var(--precio); margin: 18px 0 22px; }
.disponible { display: flex; gap: 16px; align-items: flex-start; background: var(--fondo-panel); border-left: 4px solid var(--azul); padding: 16px 20px; }
.disponible__icono { font-size: 30px; color: var(--azul); margin-top: 2px; }
.disponible__titulo { font-weight: 600; color: var(--azul); font-size: 16px; margin: 0 0 2px; }
.disponible__texto { margin: 0; color: var(--texto-3); font-size: 13.5px; }
.disponible__texto a { color: var(--azul); text-decoration: underline; }
.compartir { display: flex; align-items: center; gap: 14px; margin: 22px 0 6px; flex-wrap: wrap; }
.compartir__etiqueta { font-weight: 500; color: var(--texto-2); }
.compartir__lista { display: flex; gap: 8px; }
.compartir__lista a, .compartir__lista button {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--azul); color: var(--azul);
  display: grid; place-items: center; font-size: 17px; transition: background var(--transicion), color var(--transicion);
}
.compartir__lista a:hover, .compartir__lista button:hover { background: var(--azul); color: #fff; }
.compartir__lista .copiado { background: var(--precio); border-color: var(--precio); color: #fff; }
.ficha__bloque { margin-top: 36px; }
.ficha__subtitulo { font-size: 18px; font-weight: 600; color: #111; margin-bottom: 16px; }
.ficha__subtitulo::after { content: ""; display: block; width: 40px; height: 3px; background: var(--azul); margin-top: 8px; }
.resena { font-size: 14.5px; line-height: 1.8; color: var(--texto-2); }
.resena p:last-child { margin-bottom: 0; }
.resena.plegada { max-height: 300px; overflow: hidden; position: relative; }
.resena.plegada::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px; background: linear-gradient(rgba(255,255,255,0), #fff); }
.leer-mas { margin-top: 10px; color: var(--azul); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.leer-mas:hover { text-decoration: underline; }
.leer-mas .icono { transition: transform .2s; }
.leer-mas[aria-expanded="true"] .icono { transform: rotate(180deg); }
.tabla-datos th, .tabla-datos td { text-align: left; padding: 11px 16px; border-bottom: 1px solid #ececec; vertical-align: top; font-size: 14px; }
.tabla-datos tr:nth-child(odd) { background: var(--fondo-panel); }
.tabla-datos th { width: 38%; font-weight: 500; color: #333; }
.tabla-datos td { color: var(--texto-2); overflow-wrap: anywhere; }
.tabla-datos a { color: var(--azul); }
.tabla-datos a:hover { text-decoration: underline; }

/* ---------- Catálogo ---------- */
.catalogo { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 30px; align-items: start; padding-top: 34px; padding-bottom: 20px; }
.lateral__cabeza-movil, .lateral__pie-movil, .catalogo__boton-filtros, .catalogo__fondo-movil { display: none; }
.lateral__titulo { font-size: 19px; font-weight: 600; color: var(--azul); margin: 0 0 16px; }
.lateral__titulo--negro { color: #111; font-size: 16px; margin-top: 40px; }
.lateral__arbol, .lateral__caja { background: var(--fondo-panel); padding: 22px 20px; }
.lateral__arbol { padding: 18px 20px; }
.arbol__fila { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 32px; }
.arbol__fila a { font-size: 12.5px; color: #333; }
.arbol__fila a:hover, .arbol__temas a:hover { color: var(--azul); }
.arbol__fila a.activo, .arbol__temas a.activo { color: var(--azul); font-weight: 600; }
.arbol__toggle { position: relative; flex: none; width: 15px; height: 15px; border: 1px solid #222; }
.arbol__toggle::before, .arbol__toggle::after { content: ""; position: absolute; left: 50%; top: 50%; background: #222; transform: translate(-50%, -50%); }
.arbol__toggle::before { width: 8px; height: 1.5px; }
.arbol__toggle::after { width: 1.5px; height: 8px; }
.arbol__toggle[aria-expanded="true"]::after { display: none; }
.arbol__toggle:hover { border-color: var(--azul); }
.arbol__temas { margin: 2px 0 8px 2px; padding: 2px 0 4px 10px; border-left: 2px solid #e1e1e1; }
.arbol__temas a { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--texto-3); padding: 3px 0 3px 6px; }
.cuenta { color: #9a9a9a; font-size: 11.5px; font-weight: 400; }

.filtro + .filtro { margin-top: 18px; }
.filtro label, .filtro__etiqueta { display: block; font-size: 14px; font-weight: 500; color: #111; margin-bottom: 4px; }
.filtro select {
  width: 100%; appearance: none; -webkit-appearance: none; border: 0; border-bottom: 1px solid #e0e0e0; border-radius: 0;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M0 0h10L5 6z' fill='%23333'/%3E%3C/svg%3E") no-repeat right 8px center / 10px 6px;
  font: inherit; font-size: 12.5px; color: #444; padding: 7px 28px 7px 15px; cursor: pointer; text-overflow: ellipsis;
}
.filtro select:hover { border-bottom-color: #bbb; }
.filtro select.activo { color: var(--azul); font-weight: 600; border-bottom-color: var(--azul); }
.precio__rango { color: #777; font-size: 14px; margin: 2px 0 10px; }
.precio__deslizador { --desde: 0%; --hasta: 100%; position: relative; height: 24px; margin: 0 2px; }
.precio__deslizador::before {
  content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 4px; border-radius: 2px;
  background: linear-gradient(to right, #d0d0d0 var(--desde), #4a4a4a var(--desde), #4a4a4a var(--hasta), #d0d0d0 var(--hasta));
}
.precio__deslizador input { position: absolute; inset: 0; width: 100%; height: 24px; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.precio__deslizador input::-webkit-slider-runnable-track { background: none; height: 24px; }
.precio__deslizador input::-moz-range-track { background: none; }
.precio__deslizador input::-webkit-slider-thumb {
  -webkit-appearance: none; pointer-events: auto; width: 12px; height: 20px; margin-top: 2px; border-radius: 2px;
  background: #fff; border: 1px solid #333; cursor: grab; box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}
.precio__deslizador input::-moz-range-thumb { pointer-events: auto; width: 10px; height: 18px; border-radius: 2px; background: #fff; border: 1px solid #333; cursor: grab; }
.precio__deslizador input:focus-visible { outline: none; }
.precio__deslizador input:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--azul); outline-offset: 1px; }
.precio__deslizador input:focus-visible::-moz-range-thumb { outline: 2px solid var(--azul); outline-offset: 1px; }
.filtros__limpiar { margin-top: 22px; color: var(--azul); font-weight: 500; font-size: 13px; text-decoration: underline; }

.lateral__novedades { display: grid; gap: 18px; }
.mini-libro { display: grid; grid-template-columns: 80px 1fr; gap: 12px; align-items: start; color: #222; }
.mini-libro img { width: 80px; height: 110px; object-fit: contain; }
.mini-libro__titulo { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; margin-top: 10px; text-transform: none; }
.mini-libro__precio { display: block; font-weight: 600; color: var(--precio); font-size: 15px; margin-top: 6px; }
.mini-libro:hover .mini-libro__titulo { color: var(--azul); }
.lateral__ver-todas { justify-self: center; margin-top: 8px; color: var(--azul); font-size: 12.5px; font-weight: 500; letter-spacing: .03em; text-decoration: underline; }

.catalogo__titulo { font-size: 23px; font-weight: 600; color: #111; padding: 4px 0 18px; border-bottom: 1px solid var(--borde); margin-bottom: 24px; overflow-wrap: anywhere; }
.catalogo__buscar { display: flex; align-items: center; gap: 8px; border: 1px solid #d9d9d9; padding-left: 14px; margin-bottom: 22px; background: #fff; transition: border-color var(--transicion); }
.catalogo__buscar:focus-within { border-color: var(--azul); }
.catalogo__lupa { font-size: 18px; color: var(--gris); }
.catalogo__buscar input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 14.5px; padding: 12px 6px; background: transparent; }
.catalogo__buscar .boton { padding: 12px 26px; border-width: 0; }
.catalogo__barra { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 16px; padding-bottom: 20px; border-bottom: 1px solid var(--borde); }
.vistas { display: flex; gap: 6px; }
.vistas button { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #222; color: #222; font-size: 16px; }
.vistas button[aria-pressed="true"] { color: var(--azul); border-color: var(--azul); background: var(--azul-suave); }
.catalogo__total { margin: 0; font-size: 14px; color: #333; }
.catalogo__orden { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.catalogo__orden label { font-size: 14px; color: #333; white-space: nowrap; }
.catalogo__orden select {
  min-width: 260px; appearance: none; -webkit-appearance: none; border: 1px solid #e1e1e1; border-radius: 0; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M0 0h10L5 6z' fill='%23111'/%3E%3C/svg%3E") no-repeat right 14px center / 11px 7px;
  font: inherit; font-size: 13.5px; color: #333; padding: 9px 36px 9px 14px;
}
.catalogo__orden select:hover { border-color: #bbb; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 18px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--azul); color: var(--azul); background: #fff;
  border-radius: 20px; padding: 4px 10px 4px 13px; font-size: 12.5px; transition: background var(--transicion), color var(--transicion);
}
.chip .icono { font-size: 11px; }
.chip:hover { background: var(--azul); color: #fff; }
.chips__limpiar { font-size: 12.5px; color: var(--texto-3); text-decoration: underline; margin-left: 4px; }
.chips__limpiar:hover { color: var(--azul); }
.catalogo__resultados { margin-top: 34px; }
.grilla-libros--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cat-cargando .catalogo__resultados, .cat-cargando .catalogo__pie { visibility: hidden; }
.libro-card__extra { display: none; }
.libro-card__autor { margin: 4px 0 0; color: var(--texto-3); font-size: 13.5px; }
.libro-card__meta { margin: 4px 0 0; color: #888; font-size: 12.5px; }

/* Vista de lista */
.vista-lista .catalogo__resultados { grid-template-columns: 1fr; gap: 0; margin-top: 10px; }
.vista-lista .libro-card {
  display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; grid-template-areas: "portada titulo precio" "portada extra precio";
  grid-template-rows: auto 1fr; column-gap: 24px; padding: 20px 0; border-bottom: 1px solid #eee;
}
.vista-lista .libro-card__portada { grid-area: portada; }
.vista-lista .libro-card__titulo { grid-area: titulo; margin-top: 6px; white-space: normal; font-size: 15px; font-weight: 500; }
.vista-lista .libro-card__extra { grid-area: extra; display: block; }
.vista-lista .libro-card__precio { grid-area: precio; margin-top: 6px; font-size: 16px; white-space: nowrap; }
.vista-lista .libro-card:hover .libro-card__portada img { transform: none; }
.vista-lista .estado-vacio, .vista-lista .esqueleto { grid-column: 1 / -1; }

/* Pie de resultados y paginación */
.catalogo__pie { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; margin-top: 56px; padding: 30px 15px 0; border-top: 1px solid var(--borde); }
.catalogo__pie p { margin: 0; color: #555; font-size: 14px; }
.paginacion ul { display: flex; flex-wrap: wrap; gap: 3px; }
.paginacion a, .paginacion li > span { min-width: 35px; height: 35px; padding: 0 9px; display: grid; place-items: center; background: #000; color: #fff; font-weight: 600; font-size: 14px; transition: background var(--transicion); }
.paginacion a:hover { background: var(--azul); color: #fff; }
.paginacion [aria-current] { background: var(--azul); }
.paginacion .icono { font-size: 16px; }
.aviso-nojs { margin-top: 20px; padding: 14px; background: var(--fondo-panel); color: var(--texto-3); }

/* Estados: cargando y sin resultados */
.estado-vacio { grid-column: 1 / -1; text-align: center; padding: 50px 24px; background: var(--fondo-panel); }
.estado-vacio h3 { font-size: 18px; color: #111; margin-bottom: 10px; }
.estado-vacio p { color: var(--texto-3); max-width: 520px; margin-left: auto; margin-right: auto; }
.estado-vacio__acciones { margin-top: 22px; }
.estado-vacio__ayuda { font-size: 13px; margin-top: 18px; margin-bottom: 0; }
.estado-vacio__ayuda a { color: var(--azul); text-decoration: underline; }
.esqueleto .libro-card__portada, .esqueleto__linea {
  background: linear-gradient(90deg, #f0f0f0 25%, #e6e6e6 50%, #f0f0f0 75%); background-size: 200% 100%; animation: brillo 1.2s infinite linear;
}
.esqueleto__linea { height: 12px; margin-top: 18px; width: 85%; }
.esqueleto__linea.corta { width: 40%; margin-top: 10px; }
@keyframes brillo { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- Páginas de contenido ---------- */
.pagina { max-width: calc(860px + 2 * var(--gutter)); padding-top: 26px; padding-bottom: 30px; }
.pagina--ancha { max-width: calc(var(--contenedor) + 2 * var(--gutter)); }
.pagina__titulo { font-size: 30px; font-weight: 600; color: #111; margin-bottom: 18px; }
.pagina__titulo::after { content: ""; display: block; width: 70px; height: 3px; background: var(--azul); margin-top: 14px; }
.pagina__intro { font-size: 15.5px; color: var(--texto-3); max-width: 760px; margin-bottom: 30px; }
.pendiente {
  background: #fff8e1; border: 1px solid #f0c75e; border-left: 5px solid #e0a800; color: #5c4400;
  padding: 14px 18px; margin: 10px 0 28px; font-size: 14px;
}
.pendiente code { background: rgba(0, 0, 0, .06); padding: 1px 6px; font-size: 13px; }
.prosa { font-size: 15px; line-height: 1.8; color: var(--texto-2); }
.prosa h2 { font-size: 20px; color: #111; margin: 34px 0 12px; }
.prosa h3 { font-size: 17px; color: #111; margin: 26px 0 10px; }
.prosa ul, .prosa ol { margin: 0 0 1em; padding-left: 1.3em; }
.prosa ul { list-style: disc; }
.prosa ol { list-style: decimal; }
.prosa li { margin-bottom: 6px; }
.prosa a { color: var(--azul); text-decoration: underline; }
.prosa__destacado { font-size: 17px; color: #222; }
.llamado {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  background: var(--fondo-panel); border-left: 4px solid var(--azul); padding: 26px 30px; margin: 10px 0 20px;
}
.llamado p { margin: 0; font-size: 15.5px; color: #222; max-width: 720px; }

/* Páginas institucionales (Océano en el mundo, Política, Aviso): columna lateral + texto */
.lateral > .lateral__bloque-novedades:first-child .lateral__titulo--negro { margin-top: 0; }
.pagina-texto__titulo { font-size: 23px; font-weight: 600; color: #111; margin: 0 0 26px; overflow-wrap: anywhere; }
.prosa--institucional { font-size: 14.5px; line-height: 1.85; color: #666; text-align: justify; hyphens: auto; }
.prosa--institucional h2 { font-size: 19px; font-weight: 500; color: #666; margin: 26px 0 10px; text-align: left; }
.prosa--institucional h2:first-child { margin-top: 0; }
.prosa--institucional h3 { font-size: 15px; font-weight: 600; color: #333; margin: 24px 0 8px; text-align: left; }
.prosa--institucional strong { color: #222; font-weight: 600; }
.prosa--institucional .prosa__seccion { font-size: 14.5px; font-weight: 600; color: #222; text-transform: uppercase; letter-spacing: .02em; margin-top: 36px; }
.prosa--institucional .prosa__titulo-centrado { text-align: center; text-transform: uppercase; font-size: 15px; font-weight: 600; color: #222; line-height: 1.9; margin: 40px 0 18px; }
.prosa__literales { list-style: none !important; padding-left: 0 !important; }
.prosa__literales li { margin-bottom: 8px; }
.prosa__literales li p { margin: 8px 0 0; }
.prosa__numerada { list-style: decimal !important; }
.prosa__figura { margin: 4px 0 18px; }
.prosa__figura img { width: 127px; height: auto; }
.prosa__figura figcaption { margin-top: 14px; font-size: 14px; color: #666; text-align: left; }
.prosa__firma { margin-top: 44px; text-align: left; line-height: 1.6; }
.prosa__notas { margin-top: 34px; padding-top: 14px; border-top: 1px solid var(--borde); font-size: 13px; line-height: 1.7; }
.prosa__notas a, .prosa sup a { text-decoration: none; }

/* ---------- Editoriales ---------- */
.dos-columnas { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 30px; align-items: start; padding-top: 34px; padding-bottom: 20px; }
.filtro-editoriales { max-width: 460px; }
.filtro-editoriales__vacio { margin-bottom: 30px; }
.grupo-editorial { margin-bottom: 50px; scroll-margin-top: calc(var(--alto-cabecera) + 20px); }
.grupo-editorial__cabeza { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 18px; padding-bottom: 14px; margin-bottom: 24px; border-bottom: 1px solid var(--borde); }
.grupo-editorial__titulo { font-size: 20px; color: var(--azul); }
.grupo-editorial__resumen { margin: 0; color: var(--gris); font-size: 13.5px; }
.grupo-editorial__cabeza .enlace-mas { margin-left: auto; font-size: 13.5px; }
.grilla-editoriales { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.editorial-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; height: 100%;
  padding: 16px 14px 18px; background: #fff; border: 1px solid var(--borde); color: #222;
  transition: border-color var(--transicion), box-shadow var(--transicion);
}
.editorial-card:hover { border-color: var(--azul); box-shadow: 0 6px 16px rgba(0, 28, 112, .1); color: #222; }
.editorial-card__logo { width: 100%; aspect-ratio: 3 / 2; display: grid; place-items: center; margin-bottom: 12px; }
.editorial-card__logo img { max-width: 130px; width: 100%; height: 100%; object-fit: contain; }
.editorial-card__texto {
  display: grid; place-items: center; width: 100%; height: 100%; padding: 10px; background: var(--fondo-panel);
  font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--azul); letter-spacing: .02em; text-transform: uppercase;
}
.editorial-card__nombre { font-size: 13.5px; font-weight: 500; }
.editorial-card:hover .editorial-card__nombre { color: var(--azul); }
.editorial-card__total { font-size: 12.5px; color: var(--gris); margin-top: 2px; }

/* ---------- Contacto ---------- */
.contacto { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 60px; align-items: start; }
.campo { margin-bottom: 18px; }
.campos-dobles { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.campo label { display: block; font-size: 14px; font-weight: 500; color: #222; margin-bottom: 6px; }
.campo input[type="text"], .campo input[type="email"], .campo input[type="tel"], .campo select, .campo textarea {
  width: 100%; font: inherit; font-size: 14.5px; color: var(--texto); background: #fff;
  border: 1px solid #cfcfcf; border-radius: 0; padding: 11px 13px; transition: border-color var(--transicion), box-shadow var(--transicion);
}
.campo select {
  appearance: none; -webkit-appearance: none; padding-right: 36px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M0 0h10L5 6z' fill='%23111'/%3E%3C/svg%3E") no-repeat right 14px center / 11px 7px;
}
.campo textarea { resize: vertical; min-height: 140px; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px rgba(0, 28, 112, .12); }
.campo [aria-invalid="true"] { border-color: #b3261e; }
.campo__error { color: #b3261e; font-size: 13px; margin: 6px 0 0; }
.obligatorio { color: #b3261e; }
.opcional { color: var(--gris-claro); font-weight: 400; font-size: 13px; }
.campo--check { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: flex-start; }
.campo--check input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--azul); flex: none; }
.campo--check label { flex: 1; font-weight: 400; font-size: 13.5px; color: var(--texto-3); margin: 0; }
.campo--check label a { color: var(--azul); text-decoration: underline; }
.campo--check .campo__error { flex-basis: 100%; }
.campo__asterisco { flex-basis: 100%; line-height: 1; font-size: 14px; }
.campo--check + .campo--check { margin-top: -4px; }
.campo__etiqueta { display: block; font-size: 14px; font-weight: 500; color: #222; margin-bottom: 8px; }
.campo--captcha { margin-top: 22px; }
.campo--captcha .g-recaptcha { min-height: 78px; }
.campo__aviso { margin: 10px 0 0; padding: 12px 14px; background: #fdecea; border-left: 4px solid #b3261e; color: #7a1a14; font-size: 13.5px; line-height: 1.6; max-width: 520px; }
.campo__aviso a { color: #7a1a14; text-decoration: underline; font-weight: 500; }
.campo--trampa { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.campo__nota { font-size: 12.5px; color: var(--gris); margin: 0 0 18px; }
.contacto__estado { margin-top: 18px; padding: 14px 16px; font-size: 14px; border-left: 4px solid; }
.contacto__estado--ok { background: #eef5e8; border-color: var(--precio); color: #2f3d20; }
.contacto__estado--error { background: #fdecea; border-color: #b3261e; color: #7a1a14; }
.contacto__datos { background: var(--fondo-panel); padding: 28px; }
.contacto__lista li { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; font-size: 14px; color: var(--texto-2); line-height: 1.7; }
.contacto__lista .icono { color: var(--azul); font-size: 18px; margin-top: 4px; }
.contacto__lista a:hover { text-decoration: underline; }
.contacto__redes-titulo { font-weight: 500; margin: 22px 0 10px; color: #222; }
.contacto__mapa { margin: 24px 0 10px; aspect-ratio: 4 / 3; background: #e9e9e9; }
.contacto__mapa iframe { width: 100%; height: 100%; border: 0; display: block; }
.respuesta-formulario { max-width: 640px; text-align: center; padding: 60px 20px; }
.respuesta-formulario img { margin: 0 auto 30px; }
.respuesta-formulario h1 { font-size: 26px; margin-bottom: 14px; }

/* ---------- 404 ---------- */
.error-404 { text-align: center; padding-top: 50px; padding-bottom: 20px; max-width: calc(720px + 2 * var(--gutter)); }
.error-404__codigo { font-size: 110px; font-weight: 700; line-height: 1; color: var(--azul); margin: 0 0 10px; letter-spacing: .04em; }
.error-404__titulo { font-size: 28px; color: #111; margin-bottom: 12px; }
.error-404__texto { color: var(--texto-3); font-size: 15px; }
.error-404__buscar { margin: 24px auto; text-align: left; }
.error-404__acciones { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 10px; }

/* ---------- Pie de página ---------- */
.pie { background: var(--fondo-pie); color: #666; font-size: 13.5px; letter-spacing: .04em; margin-top: 40px; }
.pie__grid { display: grid; grid-template-columns: 30.6% 23% 23% 1fr; padding-top: 72px; padding-bottom: 46px; }
.pie__grid > * { padding-right: 20px; }
.pie__marca { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; align-items: flex-start; }
.pie__logo img { width: 151px; }
.pie__titulo { font-size: 14px; font-weight: 600; color: #000; letter-spacing: .04em; margin: 0 0 18px; }
.pie__columna li { line-height: 30px; }
.pie a:hover { color: var(--azul); }
.pie__contacto address { font-style: normal; line-height: 30px; }
.pie__contacto .icono { color: var(--azul); }
.pie__pin { font-size: 17px; margin: 0 0 8px -1px; }
.pie__contacto address > a { display: block; }
.pie__dato { display: flex !important; align-items: center; gap: 10px; }
.pie__dato .icono { font-size: 16px; }
.pie__copy { border-top: 1px solid var(--linea); text-align: center; padding: 28px 0 32px; margin: 0; color: #666; letter-spacing: 0; }

/* ---------- Volver arriba ---------- */
.subir {
  position: fixed; right: 20px; bottom: 20px; z-index: 90; width: 46px; height: 46px; border-radius: 50%;
  background: #000; color: #fff; display: grid; place-items: center; font-size: 22px;
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .25s, visibility .25s, transform .25s, background var(--transicion);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
}
.subir.visible { opacity: 1; visibility: visible; transform: none; }
.subir:hover { background: var(--azul); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1320px) {
  .carrusel__flecha--prev { left: -6px; }
  .carrusel__flecha--next { right: -6px; }
  .carrusel__flecha { box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
}

@media (max-width: 1199px) {
  .grilla-libros { gap: 40px 28px; }
  .carrusel { --hueco: 28px; }
  .nav__enlace { padding: 0 18px; }
}

@media (max-width: 991px) {
  :root { --alto-cabecera: 72px; }
  .barra-superior__enlaces { display: none; }
  .barra-superior__inner { justify-content: center; }
  .nav { display: none; }
  .cabecera__inner { grid-template-columns: 1fr auto; }
  .cabecera__logo img { width: 118px; }
  .cabecera__hamburguesa { display: grid; }
  .grilla-libros { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .carrusel { --por-vista: 3; }
  .carrusel--logos { --por-vista: 4; }
  .pie__grid { grid-template-columns: 1fr 1fr; gap: 40px 0; }
  .ficha { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 36px; }
  .ficha__portada { padding: 20px; }

  /* Catálogo: los filtros pasan a un panel lateral deslizable */
  .catalogo { grid-template-columns: minmax(0, 1fr); padding-top: 16px; }
  .catalogo__lateral {
    position: fixed; z-index: 210; top: 0; bottom: 0; left: 0; width: min(400px, 92vw); background: #fff;
    display: flex; flex-direction: column; transform: translateX(-105%); visibility: hidden;
    transition: transform .28s ease, visibility .28s; box-shadow: 4px 0 24px rgba(0, 0, 0, .15);
  }
  .catalogo__lateral.abierto { transform: none; visibility: visible; }
  .lateral__cabeza-movil { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 10px 20px; border-bottom: 1px solid var(--borde); }
  .lateral__titulo-movil { margin: 0; font-size: 17px; font-weight: 600; color: #111; }
  .lateral__cerrar { width: 44px; height: 44px; display: grid; place-items: center; font-size: 22px; }
  .lateral__cuerpo { flex: 1; overflow-y: auto; padding: 20px 18px 30px; }
  .lateral__pie-movil { display: block; padding: 12px 18px; border-top: 1px solid var(--borde); }
  .lateral__pie-movil .boton { width: 100%; }
  .catalogo__fondo-movil { display: block; position: fixed; inset: 0; z-index: 205; background: rgba(0, 0, 0, .45); }
  .catalogo__fondo-movil[hidden] { display: none; }
  .catalogo__boton-filtros {
    display: inline-flex; align-items: center; gap: 8px; border: 1px solid #222; padding: 6px 14px; font-weight: 500; font-size: 14px;
  }
  .catalogo__boton-filtros .contador { background: var(--azul); color: #fff; border-radius: 10px; min-width: 20px; height: 20px; display: inline-grid; place-items: center; font-size: 11.5px; padding: 0 6px; }
  .catalogo__orden { gap: 10px; }
  .lateral__bloque-novedades { display: none; }

  .dos-columnas { grid-template-columns: minmax(0, 1fr); padding-top: 16px; }
  .dos-columnas > .lateral { display: none; }
  .grilla-editoriales { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contacto { grid-template-columns: minmax(0, 1fr); gap: 36px; }
}

@media (max-width: 767px) {
  :root { --gutter: 16px; }
  body { font-size: 14px; }
  .barra-superior__lema { display: none; }
  .barra-superior__inner { min-height: 42px; }
  .redes--solidas a { width: 30px; height: 30px; }
  .redes--solidas .icono { width: 16px; height: 16px; }
  .seccion { padding-top: 34px; padding-bottom: 28px; }
  .titulo-seccion { font-size: 22px; margin-bottom: 32px; }
  .titulo-seccion::after { width: 56px; margin-top: 10px; }
  .pestana { margin: -12px 0 26px; }
  .grilla-libros { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 16px; }
  .libro-card__titulo { margin-top: 12px; }
  .libro-card__precio { font-size: 14px; }
  .carrusel { --por-vista: 2.2; --hueco: 16px; }
  .carrusel--logos { --por-vista: 3.3; --hueco: 12px; }
  .carrusel__flecha { display: none; }
  .hero__flecha { display: none; }
  .hero__controles { bottom: 6px; padding: 1px 4px; }
  .hero__punto { width: 20px; height: 20px; }
  .hero__punto::before { width: 7px; height: 7px; }
  .boton { padding: 12px 26px; }
  .ficha { grid-template-columns: 1fr; gap: 24px; padding-top: 16px; }
  .ficha__portada { position: static; padding: 18px; }
  .ficha__portada img { max-height: 300px; }
  .ficha__titulo { font-size: 23px; }
  .ficha__precio { font-size: 24px; margin: 12px 0 18px; }
  .tabla-datos th, .tabla-datos td { padding: 10px 12px; }
  .migas { padding-top: 14px; }
  .migas ol { font-size: 13px; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
  .migas ol::-webkit-scrollbar { display: none; }
  .migas li { flex: none; }
  .migas [aria-current] { max-width: 30ch; }
  .buscador { padding: 14px 0 18px; }
  .buscador input { font-size: 16px; }
  .buscador__enviar { display: none; }
  .grilla-libros--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalogo__titulo { font-size: 20px; padding-bottom: 12px; margin-bottom: 16px; }
  .catalogo__buscar { margin-bottom: 14px; }
  .catalogo__buscar .boton { padding: 12px 16px; }
  .catalogo__barra { gap: 10px; padding-bottom: 14px; }
  .vistas button { width: 34px; height: 34px; }
  .catalogo__total { order: 3; width: 100%; font-size: 13px; color: var(--gris); }
  .catalogo__orden label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .catalogo__orden select { min-width: 0; max-width: 58vw; padding: 8px 32px 8px 10px; }
  .catalogo__resultados { margin-top: 22px; }
  .catalogo__pie { justify-content: center; text-align: center; margin-top: 36px; padding: 22px 0 0; }
  .vista-lista .libro-card { grid-template-columns: 72px minmax(0, 1fr); grid-template-areas: "portada titulo" "portada extra" "portada precio"; column-gap: 14px; }
  .pagina__titulo { font-size: 24px; }
  .prosa { font-size: 14.5px; }
  .prosa--institucional { text-align: left; hyphens: manual; }
  .pagina-texto__titulo { font-size: 20px; margin-bottom: 18px; }
  .llamado { padding: 20px; }
  .grilla-editoriales { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .grupo-editorial__cabeza .enlace-mas { margin-left: 0; }
  .editorial-card__texto { font-size: 13px; }
  .campos-dobles { grid-template-columns: 1fr; }
  .contacto__datos { padding: 20px; }
  .error-404__codigo { font-size: 80px; }
  .error-404__titulo { font-size: 22px; }
  .pie__grid { grid-template-columns: 1fr; padding-top: 48px; gap: 34px 0; }
  .pie__marca { flex-direction: row; align-items: center; justify-content: space-between; }
  .pie__logo img { width: 130px; }
  .subir { right: 14px; bottom: 14px; width: 42px; height: 42px; }
}

@media (max-width: 480px) {
  /* En pantallas angostas el catálogo siempre se ve en cuadrícula de 2 columnas */
  .vistas { display: none; }
  .vista-lista .catalogo__resultados { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 16px; margin-top: 22px; }
  .vista-lista .libro-card { display: flex; padding: 0; border: 0; }
  .vista-lista .libro-card__extra { display: none; }
  .vista-lista .libro-card__titulo { white-space: nowrap; font-size: 13px; font-weight: 400; margin-top: 12px; }
  .vista-lista .libro-card__precio { font-size: 14px; }
  .catalogo__orden select { max-width: 52vw; }
}

@media (max-width: 380px) {
  .grilla-libros { gap: 26px 12px; }
  .redes { gap: 6px; }
}

@media (hover: none) {
  .hero__flecha { display: none; }
}

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

@media print {
  .barra-superior, .cabecera, .pie, .subir, .hero, .compartir, .carrusel__flecha { display: none !important; }
  .ficha { grid-template-columns: 1fr 2fr; }
  .ficha__portada { position: static; box-shadow: none; }
  .resena.plegada { max-height: none; }
  .resena.plegada::after, .leer-mas { display: none; }
}
