/* Coquimar: hoja de estilos del sitio (v2: limpia, colores planos, ilustración protagonista) */
:root {
  /* Colores planos de la serie */
  --rojo: #e8452c;        /* heliconia */
  --rojo-osc: #c4321b;
  --azul: #2b7fd4;        /* cielo del Caribe */
  --azul-osc: #1f63a8;
  --amarillo: #ffc21a;    /* Coquimar */
  --verde: #3a9b4a;       /* selva */
  --verde-osc: #1f6b33;
  --lila: #8a6bd1;        /* Luna */
  --rosa: #ef5d93;        /* hibisco */

  --fondo: #ffffff;
  --fondo-azul: #e8f4fd;
  --fondo-crema: #fff8e6;
  --texto: #2a2f45;
  --suave: #616a85;
  --linea: #dde6f1;

  /* Alias que usan las páginas internas */
  --selva: var(--azul-osc);
  --selva-2: var(--azul);
  --heliconia: var(--rojo);
  --heliconia-osc: var(--rojo-osc);
  --dorado: var(--amarillo);
  --hibisco: var(--rosa);
  --cielo: #bfe3fb;
  --cielo-claro: var(--fondo-azul);
  --crema: var(--fondo-crema);
  --madera-osc: #8a5a1f;
  --hoja: var(--verde);
  --papel: #fff;
  --tinta: var(--texto);

  --display: "marvin", "urbane-rounded", "Arial Rounded MT Bold", sans-serif;
  --cuerpo: "urbane-rounded", "Nunito", "Segoe UI", system-ui, sans-serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --radio: 22px;
  --ancho: 1180px;
  --sombra: 0 10px 30px rgba(31, 60, 110, 0.12);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--fondo); color: var(--texto);
  font-family: var(--cuerpo); font-size: 17px; line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--azul); }
h1, h2, h3 { margin: 0; line-height: 1.08; text-wrap: balance; }
p { margin: 0; }
input, textarea, select { font: inherit; font-size: 16px; }
button, a, [role="button"] { touch-action: manipulation; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--azul); outline-offset: 3px; border-radius: 8px; }

.envoltura { width: min(100% - 32px, var(--ancho)); margin-inline: auto; }

/* Títulos: Marvin en color plano, sin contorno */
.letra-letrero, .seccion-titulo {
  font-family: var(--display); font-weight: 400; color: var(--azul-osc);
  letter-spacing: 0.01em; -webkit-text-stroke: 0; text-shadow: none;
}

/* Botones */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px; border-radius: 999px; border: 0;
  font-family: var(--cuerpo); font-weight: 700; font-size: 1.05rem;
  text-decoration: none; user-select: none; -webkit-user-select: none;
  transition: transform 140ms var(--ease-out), background-color 160ms ease, box-shadow 160ms ease;
}
.boton:active { transform: scale(0.97); }
.boton-compra { background: var(--rojo); color: #fff; box-shadow: 0 6px 16px rgba(232, 69, 44, 0.3); }
.boton-claro { background: #fff; color: var(--azul-osc); box-shadow: inset 0 0 0 2px var(--azul); }
.boton-blanco { background: #fff; color: var(--azul-osc); }
@media (hover: hover) and (pointer: fine) {
  .boton-compra:hover { background: #f05437; }
  .boton-claro:hover { background: var(--fondo-azul); }
  .boton-blanco:hover { background: var(--fondo-crema); }
}

/* Encabezado */
.encabezado {
  position: sticky; top: 0; z-index: 30; background: #fff;
  box-shadow: 0 2px 14px rgba(31, 60, 110, 0.08);
  padding-top: env(safe-area-inset-top, 0px);
}
.encabezado .envoltura { display: flex; align-items: center; gap: 20px; min-height: 76px; }
.marca { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.marca img { width: 58px; height: 58px; border-radius: 50%; }
.marca span { font-family: var(--display); font-size: 1.7rem; color: var(--verde-osc); }
.menu { display: flex; gap: 2px; margin-left: auto; }
.menu a {
  padding: 10px 14px; border-radius: 999px; text-decoration: none;
  color: var(--azul-osc); font-weight: 700; font-size: 0.98rem;
  transition: background-color 160ms ease;
}
.menu a[aria-current="page"] { background: var(--fondo-azul); }
@media (hover: hover) and (pointer: fine) { .menu a:hover { background: var(--fondo-azul); } }
.carrito-boton {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 999px;
  background: var(--rojo); color: #fff; text-decoration: none; font-weight: 700;
}
.carrito-boton svg { width: 22px; height: 22px; }
.carrito-cuenta {
  min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px;
  background: var(--amarillo); color: var(--texto); font-size: 0.85rem; display: inline-grid; place-items: center;
}
.carrito-cuenta[data-vacio="true"] { display: none; }
.menu-abrir { display: none; }
@media (max-width: 1080px) {
  .menu-abrir {
    display: inline-flex; align-items: center; margin-left: auto; min-height: 46px; padding: 0 18px;
    border-radius: 999px; border: 2px solid var(--azul); background: #fff; color: var(--azul-osc); font-weight: 700;
  }
  .menu {
    position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; margin: 0;
    padding: 8px 16px 18px; background: #fff; box-shadow: 0 14px 20px rgba(31, 60, 110, 0.1); display: none;
  }
  .menu.abierto { display: flex; }
  .menu a { padding: 14px 10px; border-radius: 12px; font-size: 1.1rem; }
  .marca span { display: none; }
  .carrito-boton .carrito-texto { display: none; }
}

/* Cambio de idioma ES / EN */
.idiomas { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--fondo-azul); }
.idiomas button {
  min-width: 42px; min-height: 38px; padding: 0 10px; border: 0; border-radius: 999px;
  background: transparent; color: var(--azul-osc); font-weight: 800; font-size: 0.9rem;
  transition: background-color 160ms ease, transform 140ms var(--ease-out);
}
.idiomas button:active { transform: scale(0.95); }
.idiomas button[aria-pressed="true"] { background: var(--azul); color: #fff; }
@media (max-width: 1080px) {
  .idiomas { margin-left: auto; }
  .encabezado .menu-abrir { margin-left: 0; }
  .encabezado .envoltura { gap: 10px; }
}
@media (max-width: 400px) {
  .idiomas button { min-width: 36px; padding: 0 6px; }
  .menu-abrir { padding: 0 12px !important; }
  .carrito-boton { padding: 0 12px; }
  .marca img { width: 48px; height: 48px; }
}

/* ============ PORTADA: UN MUNDO PARA APRENDER ============ */
.inicio-hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 85% 20%, #fff6cf 0, rgba(255, 246, 207, 0) 40%),
    linear-gradient(180deg, #d9effd 0%, #eef8ff 70%, #fff 100%);
}
.inicio-hero .envoltura {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40px;
  padding-block: 64px 96px; min-height: min(640px, 82svh);
}
.sobretitulo {
  display: inline-block; background: #fff; color: var(--verde-osc); font-weight: 800;
  padding: 7px 16px; border-radius: 999px; box-shadow: 0 4px 12px rgba(31, 60, 110, 0.08);
}
.inicio-texto h1 {
  font-family: var(--display); font-weight: 400; color: var(--azul-osc);
  font-size: clamp(2.8rem, 6.2vw, 5rem); line-height: 0.98; margin: 18px 0 20px;
}
.inicio-texto h1 span { display: block; color: var(--rojo); }
.inicio-bajada { font-size: 1.18rem; color: var(--texto); max-width: 34ch; }
.inicio-texto .acciones { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.abanico { position: relative; height: 460px; }
.carta {
  position: absolute; top: 50%; left: 50%; width: 52%; max-width: 300px; border-radius: 18px;
  box-shadow: 0 18px 40px rgba(31, 60, 110, 0.25); border: 5px solid #fff;
}
.carta.c1 { transform: translate(-108%, -46%) rotate(-9deg); }
.carta.c2 { transform: translate(-50%, -54%) rotate(0deg); z-index: 2; }
.carta.c3 { transform: translate(8%, -46%) rotate(9deg); }
@media (max-width: 880px) {
  .inicio-hero .envoltura { grid-template-columns: 1fr; text-align: center; padding-block: 36px 56px; gap: 20px; min-height: 0; }
  .inicio-bajada { margin-inline: auto; }
  .inicio-texto .acciones { justify-content: center; }
  .abanico { height: min(92vw, 420px); }
  .carta { width: 46%; }
}

.pilares-seccion { margin-top: -20px; position: relative; }

/* Cuentos */
.cuentos {
  list-style: none; margin: 0; padding: 4px 0 18px; display: grid;
  grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 20px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.cuentos li { scroll-snap-align: start; }
.cuento { display: grid; gap: 10px; text-decoration: none; color: var(--texto); }
.cuento img { width: 100%; border-radius: 18px; box-shadow: var(--sombra); transition: transform 220ms var(--ease-out); }
.cuento-tema { font-weight: 700; text-align: center; color: var(--suave); font-size: 0.98rem; }
@media (hover: hover) and (pointer: fine) { .cuento:hover img { transform: translateY(-4px); } }
@media (min-width: 1100px) { .cuentos { grid-auto-columns: calc((100% - 80px) / 5); } }
@media (max-width: 600px) { .cuentos { grid-auto-columns: 62%; margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; } }

/* ============ PORTADA ILUSTRADA ============ */
.escena {
  position: relative; overflow: hidden; isolation: isolate;
  aspect-ratio: 16 / 7; min-height: 360px; max-height: 720px; width: 100%;
  background: #8fd0f5 url("../img/fondos/portada.webp") center 60% / cover no-repeat;
}
.escena img { position: absolute; filter: drop-shadow(0 10px 12px rgba(20, 40, 30, 0.28)); }
.escena .s-coqui { right: 9%; top: 6%; width: min(30%, 440px); animation: flotar 5.5s ease-in-out infinite; z-index: 3; }
.escena .s-nico  { left: 6%;  bottom: 4%; height: 50%; z-index: 3; }
.escena .s-lola  { left: 18%; bottom: 3%; height: 40%; z-index: 4; }
.escena .s-rayo  { left: 28%; bottom: 4%; height: 46%; z-index: 3; }
.escena .s-tito  { left: 39%; bottom: 4%; height: 47%; z-index: 2; }
.escena .s-luna  { left: 30%; top: 8%; height: 26%; animation: flotar 4.6s ease-in-out infinite reverse; z-index: 2; }
@keyframes flotar {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-12px) rotate(-1deg); }
}
@media (prefers-reduced-motion: reduce) { .escena img { animation: none !important; } }
@media (max-width: 760px) {
  .escena { aspect-ratio: 4 / 3; min-height: 0; background-position: 30% 60%; }
  .escena .s-coqui { width: 46%; right: 2%; top: 8%; }
  .escena .s-nico { left: 2%; height: 40%; }
  .escena .s-lola { left: 17%; height: 32%; }
  .escena .s-rayo { left: 31%; height: 37%; }
  .escena .s-tito { display: none; }
  .escena .s-luna { left: 8%; top: 6%; height: 22%; }
}

.portada-grande { background: #8fd0f5; line-height: 0; }
.portada-grande img { width: 100%; max-height: 82svh; object-fit: cover; object-position: center 40%; }

/* Presentación centrada */
.presenta { padding-block: 72px 56px; text-align: center; }
.presenta h1 {
  font-family: var(--cuerpo); font-weight: 800; color: var(--texto);
  font-size: clamp(1.6rem, 3.2vw, 2.3rem); line-height: 1.25; max-width: 30ch; margin-inline: auto;
}
.presenta h1 .nombre { font-family: var(--display); font-weight: 400; color: var(--verde); font-size: 1.12em; }
.presenta > p { color: var(--suave); font-size: 1.12rem; max-width: 62ch; margin: 18px auto 0; }
.presenta .acciones { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 30px; }

@media (max-width: 760px) {
  .presenta { padding-block: 40px 32px; }
  .presenta h1 { font-size: 1.35rem; }
  .presenta > p { font-size: 1rem; }
}

/* Tres pilares de color */
.pilares { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; padding-top: 40px; }
.pilar {
  position: relative; border-radius: 26px; padding: 74px 28px 30px; color: #fff; text-align: center;
  text-decoration: none; display: grid; gap: 10px; align-content: start;
  box-shadow: var(--sombra); transition: transform 180ms var(--ease-out);
}
.pilar:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) { .pilar:hover { transform: translateY(-4px); } }
.pilar-icono {
  position: absolute; top: -46px; left: 50%; transform: translateX(-50%);
  width: 104px; height: 104px; border-radius: 50%; background: #fff; overflow: hidden;
  border: 6px solid currentColor; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}
.pilar-icono img { width: 100%; height: 100%; object-fit: cover; }
.pilar h2 { font-family: var(--display); font-weight: 400; font-size: 1.7rem; color: #fff; }
.presenta .pilar p { font-size: 1.02rem; color: inherit; margin: 0; max-width: none; }
.pilar-rojo { background: var(--rojo); }   .pilar-rojo .pilar-icono { color: var(--rojo); }
.pilar-azul { background: var(--azul); }   .pilar-azul .pilar-icono { color: var(--azul); }
.pilar-amarillo { background: var(--amarillo); color: #3b2c00; }
.pilar-amarillo h2 { color: #3b2c00; }    .pilar-amarillo .pilar-icono { color: var(--amarillo); }
@media (max-width: 880px) { .pilares { grid-template-columns: 1fr; gap: 64px; padding-top: 50px; } }

/* Secciones */
.seccion { padding-block: 88px; }
.seccion-titulo { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 14px; }
.seccion-intro { font-size: 1.12rem; color: var(--suave); max-width: 60ch; }
.cabeza-seccion { margin-bottom: 40px; }
.centrado { text-align: center; }
.centrado .seccion-intro { margin-inline: auto; }
.repisa-fondo, .fondo-suave { background: var(--fondo-azul); }

/* Banda del libro nuevo */
.banda-libro { background: var(--azul); color: #fff; overflow: hidden; }
.banda-libro .envoltura { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: center; padding-block: 72px; }
.banda-libro .portada-libro { position: relative; justify-self: center; width: min(100%, 400px); }
.banda-libro .portada-libro .tapa { transform: rotate(-4deg); filter: drop-shadow(0 22px 26px rgba(0, 0, 0, 0.35)); }
.banda-libro .portada-libro .coqui-mini {
  position: absolute; right: -18%; bottom: -6%; width: 52%;
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.3));
}
.banda-libro .etiqueta-nuevo { background: var(--amarillo); color: #3b2c00; }
.banda-libro h2 { font-family: var(--display); font-weight: 400; font-size: clamp(2.2rem, 4.4vw, 3.4rem); color: #fff; margin: 14px 0 16px; }
.banda-libro p { font-size: 1.12rem; color: #e6f1fc; max-width: 52ch; }
.banda-libro .acciones { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.banda-libro .boton-claro { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px #fff; }
@media (max-width: 880px) {
  .banda-libro .envoltura { grid-template-columns: 1fr; gap: 40px; padding-block: 56px; }
  .banda-libro .portada-libro { width: min(70%, 300px); }
}

/* Franja de cifras */
.cifras { background: var(--rojo); color: #fff; }
.cifras ul { list-style: none; margin: 0 auto; padding: 48px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.cifras b { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(2.6rem, 5vw, 3.6rem); line-height: 1; }
.cifras span { font-weight: 700; font-size: 1rem; opacity: 0.95; }
@media (max-width: 760px) { .cifras ul { grid-template-columns: 1fr 1fr; row-gap: 32px; } }

/* Libros (repisa) */
.libros { display: grid; grid-template-columns: 1fr 1fr; gap: 48px 40px; }
.libro { display: grid; grid-template-columns: 200px 1fr; gap: 26px; align-items: center; background: #fff; border-radius: var(--radio); padding: 24px; box-shadow: var(--sombra); }
.libro-tapa img { width: 100%; border-radius: 10px; }
.libro h3 { font-family: var(--display); font-size: 1.6rem; color: var(--azul-osc); font-weight: 400; }
.libro-info { display: grid; gap: 12px; }
.libro-info p { color: var(--suave); }
.etiqueta-nuevo {
  display: inline-block; justify-self: start; background: var(--rosa); color: #fff; font-weight: 800;
  font-size: 0.85rem; padding: 5px 14px; border-radius: 999px;
}
.formatos { display: flex; flex-wrap: wrap; gap: 8px; }
.formato {
  display: inline-flex; gap: 6px; align-items: baseline; padding: 7px 14px; border-radius: 999px;
  background: var(--fondo-azul); font-size: 0.95rem; color: var(--texto); text-decoration: none; font-weight: 700;
}
.formato b { color: var(--rojo); }
@media (hover: hover) and (pointer: fine) { a.formato:hover { background: #d6eafb; } }
@media (max-width: 880px) { .libros { grid-template-columns: 1fr; } .libro { grid-template-columns: 1fr; } .libro-tapa { width: 180px; } }

/* Productos */
.productos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px 22px; }
.producto { display: grid; gap: 10px; text-decoration: none; color: var(--texto); align-content: start; }
.producto-foto {
  position: relative; aspect-ratio: 1; border-radius: var(--radio); overflow: hidden;
  display: grid; place-items: center; background: var(--fondo-azul);
}
.producto-foto img { width: 100%; height: 100%; object-fit: cover; transition: transform 300ms var(--ease-out); }
.producto-foto.ilustrada img { width: 74%; height: auto; object-fit: contain; }
.producto h3 { font-size: 1.06rem; font-family: var(--cuerpo); font-weight: 700; line-height: 1.3; }
.precio { font-weight: 800; color: var(--rojo); font-size: 1.1rem; }
@media (hover: hover) and (pointer: fine) { .producto:hover .producto-foto img { transform: scale(1.04); } }
@media (max-width: 980px) { .productos { grid-template-columns: repeat(2, 1fr); } }
.ver-todo { margin-top: 36px; }
.fondo-hibisco { background: #ffe0ea; } .fondo-dorado { background: #fff0c2; }
.fondo-hoja { background: #dff2d9; }    .fondo-cielo { background: #d8edfb; }

/* Frase de marca */
.frase { font-family: var(--display); font-size: 1.7rem; color: var(--rojo); line-height: 1.2; }

/* Juego */
.juego {
  position: relative; border-radius: 32px; overflow: hidden; color: #fff;
  background: var(--verde-osc) url("../img/fondos/yunque.webp") center / cover;
  display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: end; min-height: 380px;
}
.juego::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14, 60, 30, 0.88) 0%, rgba(14, 60, 30, 0.55) 55%, rgba(14, 60, 30, 0) 100%); }
.juego-texto { position: relative; padding: 48px; display: grid; gap: 16px; justify-items: start; align-self: center; }
.juego-texto .seccion-titulo { margin: 0; color: #fff; }
.juego-texto p { font-size: 1.1rem; max-width: 44ch; }
.juego img { position: relative; width: 100%; max-width: 330px; justify-self: center; margin-bottom: 20px; filter: drop-shadow(0 12px 14px rgba(0, 0, 0, 0.3)); }
@media (max-width: 880px) {
  .juego { grid-template-columns: 1fr; }
  .juego::before { background: linear-gradient(180deg, rgba(14, 60, 30, 0.85) 0%, rgba(14, 60, 30, 0.5) 100%); }
  .juego-texto { padding: 32px 24px 0; }
  .juego img { max-width: 220px; }
}

.seccion-juego { padding-bottom: 0; }

/* Pie */
.pie { background: var(--lila); color: #f1ecff; padding-block: 64px 28px; padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); margin-top: 88px; }
.pie a { color: #fff; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .pie a:hover { text-decoration: underline; } }
.pie-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.pie h4 { margin: 0 0 12px; font-size: 1rem; color: #fff; }
.pie ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.boletin { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.boletin input { flex: 1 1 200px; min-height: 48px; padding: 0 18px; border-radius: 999px; border: 0; }
.redes { display: flex; gap: 10px; }
.redes a { width: 46px; height: 46px; border-radius: 50%; background: #fff; display: grid; place-items: center; transition: transform 160ms var(--ease-out); }
.redes a:active { transform: scale(0.94); }
.redes svg { width: 22px; height: 22px; fill: var(--lila); }
@media (hover: hover) and (pointer: fine) { .redes a:hover { transform: translateY(-2px); text-decoration: none; } }
.pie-coqui { width: 130px; margin-top: 18px; }
.pie-legal { margin-top: 48px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.25); font-size: 0.9rem; }
@media (max-width: 880px) { .pie-grid { grid-template-columns: 1fr 1fr; } .pie-grid > :first-child { grid-column: 1 / -1; } }

/* ============ HERO DE LA LANDING DEL LIBRO 2 ============ */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: #8fd0f5 url("../img/fondos/cocora.webp") center 70% / cover;
}
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.86) 42%, rgba(255, 255, 255, 0) 70%); }
.hero-sol, .hero-paisaje { display: none; }
.hero .envoltura { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 24px; padding-block: 64px 72px; min-height: min(680px, 88svh); }
.letrero { background: none; border: 0; box-shadow: none; padding: 0; transform: none; }
.hero h1 { font-family: var(--display); font-weight: 400; color: var(--azul-osc); font-size: clamp(2.6rem, 5.4vw, 4.4rem); margin-top: 14px; }
.hero h1 .linea-peq { display: block; font-size: 0.6em; color: var(--rojo); margin-block: 0.06em; }
.hero-texto { margin-top: 20px; display: grid; gap: 22px; max-width: 520px; }
.hero-texto p { font-size: 1.15rem; color: var(--texto); }
.hero-acciones { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-dato { font-size: 0.95rem; color: var(--verde-osc); font-weight: 700; }
.hero-escena { position: relative; justify-self: center; width: min(100%, 520px); aspect-ratio: 1 / 1; }
.hero-libro { position: absolute; right: 0; bottom: 2%; width: 60%; transform: rotate(4deg); filter: drop-shadow(0 18px 22px rgba(20, 50, 30, 0.35)); }
.hero-coqui { position: absolute; left: -10%; top: 4%; width: 64%; z-index: 1; filter: drop-shadow(0 12px 14px rgba(20, 50, 30, 0.25)); animation: flotar 5.5s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .hero-coqui { animation: none; } }
@media (max-width: 880px) {
  .hero::before { background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.92) 45%); }
  .hero .envoltura { grid-template-columns: 1fr; padding-block: 24px 48px; gap: 8px; min-height: 0; }
  .hero-escena { order: -1; width: min(100%, 380px); aspect-ratio: 1 / 0.86; }
  .hero-libro { width: 52%; right: 6%; }
  .hero-coqui { width: 62%; left: -2%; top: 0; }
}

/* Portadas de libros: se ven completas, como libro */
.producto-foto.portada img { width: auto; height: 82%; aspect-ratio: 800 / 1065; max-width: 80%; object-fit: contain; border-radius: 4px 10px 10px 4px; box-shadow: 0 12px 24px rgba(31, 60, 110, 0.28); }
.libro-tapa img, .venta-cruzada > img, .reservar-grid > img { border-radius: 4px 12px 12px 4px; box-shadow: 0 14px 28px rgba(31, 60, 110, 0.25); }

/* ============ ESCENA VIVA (portada) ============ */
.escena-viva {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: clamp(580px, 84svh, 800px);
  background: #8fd0f5 url("../img/fondos/portada.webp") center 70% / cover no-repeat;
  display: flex; align-items: center;
}
.escena-viva::before { /* luz suave detrás del texto */
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 55% 70% at 18% 42%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 70%);
}
.escena-contenido { position: relative; z-index: 4; padding-block: 48px 140px; }
.escena-viva .inicio-texto {
  max-width: 520px; padding: 34px 36px 36px; border-radius: 32px;
  background: rgba(255, 255, 255, 0.78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 20px 50px rgba(20, 60, 110, 0.22), inset 0 0 0 2px rgba(255, 255, 255, 0.7);
}
.escena-viva .inicio-texto h1 { margin-top: 14px; }
.escena-viva .inicio-bajada { max-width: none; }
.personajes-escena { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.pe { position: absolute; filter: drop-shadow(0 12px 14px rgba(20, 40, 30, 0.3)); }
.pe-coqui { right: 7%; top: 9%; width: min(29vw, 430px); animation: volar 6s ease-in-out infinite; z-index: 2; }
.pe-luna  { right: 37%; top: 11%; height: 17%; animation: volar 4.8s ease-in-out -1.5s infinite reverse; }
.pe-tito  { right: 41%; bottom: 9%; height: 31%; animation: saludo 3.8s ease-in-out infinite; transform-origin: 50% 100%; }
.pe-nico  { right: 28%; bottom: 7%; height: 30%; animation: saltito 3.2s ease-in-out -0.6s infinite; }
.pe-lola  { right: 19.5%; bottom: 6%; height: 21%; animation: saltito 3.6s ease-in-out -1.8s infinite; }
.pe-rayo  { right: 7%; bottom: 7%; height: 28%; animation: saltito 3.4s ease-in-out -2.4s infinite; }
@keyframes volar {
  0%, 100% { transform: translate(0, 0) rotate(-3deg); }
  25% { transform: translate(-8px, -16px) rotate(-1deg); }
  50% { transform: translate(0, -24px) rotate(2deg); }
  75% { transform: translate(8px, -12px) rotate(0deg); }
}
@keyframes saltito { 0%, 70%, 100% { transform: translateY(0); } 80% { transform: translateY(-14px); } 90% { transform: translateY(0); } }
@keyframes saludo { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(3deg); } }

/* nubes que pasan lento */
.nube {
  position: absolute; z-index: 1; width: 220px; height: 70px; border-radius: 999px; background: rgba(255, 255, 255, 0.85);
  filter: blur(1px); animation: nube 70s linear infinite; pointer-events: none;
}
.nube::before, .nube::after { content: ""; position: absolute; background: inherit; border-radius: 50%; }
.nube::before { width: 100px; height: 100px; left: 34px; top: -48px; }
.nube::after { width: 74px; height: 74px; left: 112px; top: -30px; }
.nube.n1 { top: 9%; left: -260px; }
.nube.n2 { top: 22%; left: -260px; transform: scale(0.7); animation-duration: 95s; animation-delay: -45s; opacity: 0.8; }
@keyframes nube { to { left: calc(100% + 260px); } }

/* destellos que titilan (los pone sitio.js) */
.destello {
  position: absolute; z-index: 2; width: var(--t, 22px); height: var(--t, 22px); pointer-events: none;
  background: var(--c, #fff6b0);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  filter: drop-shadow(0 0 6px rgba(255, 240, 150, 0.95));
  animation: titilar var(--d, 2.6s) ease-in-out var(--r, 0s) infinite; opacity: 0;
}
@keyframes titilar { 0%, 100% { opacity: 0; transform: scale(0.3) rotate(0deg); } 50% { opacity: 1; transform: scale(1) rotate(45deg); } }

/* bordes ondulados */
.ola { position: absolute; left: 0; width: 100%; height: clamp(40px, 6vw, 90px); z-index: 5; display: block; }
.ola-abajo { bottom: -1px; }
.ondas { position: relative; }
.ondas::before, .ondas::after {
  content: ""; position: absolute; left: 0; right: 0; height: clamp(28px, 4vw, 56px); z-index: 1; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60' preserveAspectRatio='none'%3E%3Cpath d='M0 0 H1440 V22 C1200 60 960 0 720 26 S240 56 0 18Z' fill='%23fff'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.ondas::before { top: -1px; }
.ondas::after { bottom: -1px; transform: scaleY(-1) scaleX(-1); }
.ondas > *:not(.destello) { position: relative; z-index: 2; }
.banda-libro.ondas .envoltura { padding-block: 110px; }
.cifras.ondas ul { padding-block: 88px; }

@media (prefers-reduced-motion: reduce) {
  .pe, .nube, .destello { animation: none !important; }
  .destello { opacity: 0.8; }
}

@media (max-width: 880px) {
  .escena-viva { display: block; min-height: 0; background-position: 30% 100%; }
  .escena-contenido { padding-block: 24px 0; }
  .escena-viva .inicio-texto { margin-inline: auto; padding: 24px 20px 26px; text-align: center; }
  .escena-viva .inicio-texto .acciones { justify-content: center; }
  .personajes-escena { position: relative; inset: auto; height: min(78vw, 380px); }
  .pe-coqui { width: 46%; right: 4%; top: 2%; }
  .pe-luna { right: auto; left: 6%; top: 4%; height: 20%; }
  .pe-tito { display: none; }
  .pe-nico { right: auto; left: 4%; bottom: 13%; height: 36%; }
  .pe-lola { right: auto; left: 30%; bottom: 12%; height: 25%; }
  .pe-rayo { right: 6%; bottom: 13%; height: 33%; }
  .nube.n2 { display: none; }
}

/* ============ ENCABEZADOS ILUSTRADOS DE LAS PÁGINAS ============ */
html, body { overflow-x: clip; }
main.pagina:has(.cabeza-pagina) { padding-top: 0; }
.cabeza-pagina {
  position: relative; isolation: isolate; display: flex; align-items: center; gap: 24px;
  padding: 44px 0 80px; margin-bottom: 32px; min-height: 300px;
}
.cabeza-pagina::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); z-index: -2;
  background: #8fd0f5 var(--fondo-cabeza, url("../img/fondos/yunque.webp")) center 65% / cover no-repeat;
}
.cabeza-pagina::after {
  content: ""; position: absolute; bottom: -1px; left: 50%; width: 100vw; transform: translateX(-50%); z-index: -1;
  height: clamp(30px, 4.5vw, 64px);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60' preserveAspectRatio='none'%3E%3Cpath d='M0 30 C240 60 480 0 720 28 S1200 58 1440 22 V60 H0Z' fill='%23fff'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.cabeza-panel {
  position: relative; z-index: 3; max-width: 760px; padding: 28px 32px 30px; border-radius: 28px;
  background: rgba(255, 255, 255, 0.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 18px 44px rgba(20, 60, 110, 0.2);
}
.cabeza-panel .seccion-titulo { margin-bottom: 8px; }
.cabeza-panel .chips { margin-top: 16px; }
.cabeza-amigo {
  position: relative; z-index: 3; margin-left: auto; height: 220px; width: auto; flex-shrink: 0;
  filter: drop-shadow(0 12px 14px rgba(20, 40, 30, 0.3)); animation: saltito 3.4s ease-in-out infinite;
}
.cabeza-pagina .destello { z-index: 2; }
body[data-pagina="canciones"] .cabeza-pagina { --fondo-cabeza: url("../img/fondos/loiza.webp"); }
body[data-pagina="tienda"] .cabeza-pagina { --fondo-cabeza: url("../img/fondos/yunque.webp"); }
body[data-pagina="carrito"] .cabeza-pagina,
body[data-pagina="pagar"] .cabeza-pagina { --fondo-cabeza: url("../img/fondos/cocora.webp"); }
body[data-pagina="ayuda"] .cabeza-pagina { --fondo-cabeza: url("../img/fondos/sumapaz.webp"); }
@media (max-width: 760px) {
  .cabeza-pagina { flex-direction: column; align-items: stretch; padding: 28px 0 64px; min-height: 0; gap: 0; }
  .cabeza-panel { padding: 22px 20px; }
  .cabeza-amigo { position: absolute; right: 4px; top: 6px; height: 92px; z-index: 4; }
}
@media (prefers-reduced-motion: reduce) { .cabeza-amigo { animation: none; } }
@media (max-width: 600px) {
  .escena-viva .inicio-texto { padding: 18px 16px 20px; border-radius: 24px; }
  .escena-viva .sobretitulo { font-size: 0.85rem; padding: 5px 12px; }
  .escena-viva .inicio-texto h1 { font-size: 2.35rem; margin: 10px 0 10px; }
  .escena-viva .inicio-bajada { font-size: 0.98rem; line-height: 1.45; }
  .escena-viva .inicio-texto .acciones { margin-top: 16px; gap: 8px; flex-wrap: nowrap; }
  .escena-viva .inicio-texto .boton { min-height: 46px; padding: 0 12px; font-size: 0.92rem; flex: 1; white-space: nowrap; }
  .personajes-escena { height: min(72vw, 300px); }
  .cabeza-panel .chips { gap: 6px; }
  .cabeza-panel .chip { padding: 6px 12px; font-size: 0.9rem; }
}

/* ============ LA AUTORA ============ */
.autora { position: relative; overflow: hidden; background: linear-gradient(180deg, #fff8e6 0%, #fff 100%); }
.autora-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; align-items: center; position: relative; z-index: 2; }
.autora-foto { position: relative; justify-self: center; width: min(100%, 340px); aspect-ratio: 1; }
.autora-foto > img:first-child {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  border: 10px solid #fff; box-shadow: 0 0 0 6px var(--amarillo), 0 24px 50px rgba(31, 60, 110, 0.25);
}
.autora-coqui { position: absolute; right: -22%; bottom: -8%; width: 52%; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.25)); animation: volar 6s ease-in-out infinite; }
.autora-texto .seccion-titulo { margin: 14px 0 12px; font-size: clamp(2.4rem, 5vw, 3.6rem); }
.autora-cita {
  margin: 22px 0 0; padding: 18px 22px; border-radius: 20px; background: #fff; border-left: 6px solid var(--rojo);
  font-family: var(--display); font-size: 1.35rem; line-height: 1.25; color: var(--rojo); box-shadow: var(--sombra);
}
.autora-texto .acciones { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.autora .destello { background: #ffc21a !important; filter: drop-shadow(0 0 4px rgba(255, 190, 30, 0.8)); }
@media (max-width: 880px) {
  .autora-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .autora-foto { width: min(70%, 260px); }
  .autora-texto .seccion-intro { margin-inline: auto; }
  .autora-texto .acciones { justify-content: center; }
  .autora-cita { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { .autora-coqui { animation: none; } }
/* foto de la autora: imagen completa, no en círculo */
.autora-grid { grid-template-columns: 1.1fr 0.9fr; }
.autora-foto { width: 100%; aspect-ratio: auto; }
.autora-foto > img:first-child { height: auto; aspect-ratio: 4 / 3; border-radius: 28px; border: 8px solid #fff; box-shadow: 0 0 0 5px var(--amarillo), 0 24px 50px rgba(31, 60, 110, 0.25); transform: rotate(-1.5deg); }
@media (max-width: 880px) { .autora-grid { grid-template-columns: 1fr; } .autora-foto { width: 100%; } .autora-foto > img:first-child { transform: none; } }
.pie-landings { margin-top: 36px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.25); font-size: 0.95rem; line-height: 2; }
.pie-landings a { color: #fff; font-weight: 700; }
.cinta-navidad { display: block; text-align: center; padding: 10px 16px; background: linear-gradient(90deg, #0f2a5c, #23488f); color: #fff; font-size: 0.98rem; text-decoration: none; }
.cinta-navidad b { color: #ffc21a; }
.cinta-navidad span { display: inline-block; margin-left: 10px; background: #d93a2b; padding: 2px 12px; border-radius: 999px; font-weight: 800; }
@media (hover: hover) and (pointer: fine) { .cinta-navidad:hover { text-decoration: none; filter: brightness(1.1); } }
