:root {
  --navy: #12263a;
  --navy-2: #1b3a57;
  --sky: #e7f3fb;
  --sky-2: #f4fafd;
  --orange: #e8872c;
  --orange-2: #f4a261;
  --mp: #00bcff;
  --mp-navy: #0a0080;
  --amazon: #ff9900;
  --play: #188038;
  --ink: #1c2833;
  --muted: #5c6b7a;
  --line: #d5e3ee;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(18, 38, 58, 0.12);
  --radius: 22px;
  --font: "Outfit", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #fff6eb 0%, transparent 55%),
    radial-gradient(900px 400px at 100% 0%, var(--sky) 0%, transparent 50%),
    var(--sky-2);
  line-height: 1.55;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }

.skip {
  position: absolute; left: -999px;
}
.skip:focus { left: 16px; top: 8px; background: #fff; padding: 8px 12px; z-index: 20; }

header {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(14px);
  background: rgba(244, 250, 253, 0.86);
  border-bottom: 1px solid rgba(213, 227, 238, 0.8);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img {
  width: 52px; height: 52px; object-fit: cover; border-radius: 12px;
  box-shadow: 0 6px 16px rgba(232, 135, 44, 0.35);
}
.brand-name { font-weight: 700; letter-spacing: 0.04em; color: var(--navy); }
.nav-links { display: flex; gap: 18px; align-items: center; }
.nav-links a { text-decoration: none; color: var(--navy-2); font-size: 0.95rem; font-weight: 600; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; padding: 11px 16px; font-weight: 600; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; font-family: inherit; font-size: 0.92rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-orange { background: var(--orange); color: #fff; box-shadow: 0 8px 20px rgba(232, 135, 44, 0.28); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--navy); }
.btn-mp {
  background: #fff;
  color: #0a0080;
  border: 2px solid #00bcff;
  box-shadow: none;
  gap: 10px;
  padding: 8px 12px;
}
.btn-mp:hover { background: #f4fbff; }
.mp-logo {
  height: 28px;
  width: auto;
  display: block;
}
.mp-pack-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0a0080;
  white-space: nowrap;
}
.btn-mp-pack {
  flex-direction: column;
  padding: 10px 14px;
  background: #fff;
}
.btn-amazon { background: #fff; border-color: #f3d199; color: #9a5b00; }
.btn-play { background: #fff; border-color: #b7e0c2; color: var(--play); }
.btn-apple { background: #fff; border-color: #d1d1d6; color: #1c1c1e; }
.btn-full { width: 100%; }
.btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; box-shadow: none; transform: none; }

.hero { padding: 42px 0 20px; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.kicker {
  display: inline-flex; gap: 8px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 12px; font-size: 0.82rem; color: var(--navy-2); font-weight: 600;
}
h1 {
  font-family: var(--serif); font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.12; color: var(--navy); margin: 14px 0 12px; font-weight: 700;
}
.lead { font-size: 1.12rem; color: var(--muted); max-width: 54ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero-art {
  background: linear-gradient(180deg, #fff, var(--sky));
  border: 1px solid var(--line); border-radius: 32px; padding: 22px;
  box-shadow: var(--shadow); display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.hero-cover {
  display: block;
  text-decoration: none;
  color: inherit;
}
.hero-art img {
  border-radius: 12px; aspect-ratio: 2/3; object-fit: cover;
  box-shadow: 0 10px 24px rgba(18, 38, 58, 0.18);
  width: 100%;
  display: block;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hero-cover:hover img { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(18, 38, 58, 0.24); }

.other-editions {
  margin-top: 22px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.editions-kicker {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.edition-thumb {
  display: flex;
  gap: 14px;
  align-items: center;
}
.edition-thumb + .edition-thumb {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.edition-thumb img {
  width: 56px;
  height: 84px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(18, 38, 58, 0.12);
}
.edition-body p {
  margin: 6px 0 10px;
  font-size: 0.92rem;
  color: var(--navy);
  font-weight: 650;
}
.edition-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.edition-actions .btn {
  font-size: 0.78rem;
  padding: 6px 10px;
}
.edition-actions .mp-logo { height: 20px; }

section { padding: 56px 0; }
.section-head { max-width: 62ch; margin-bottom: 28px; }
h2 { font-family: var(--serif); color: var(--navy); font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 8px; }
.muted { color: var(--muted); }

.grid-books { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 10px 30px rgba(18, 38, 58, 0.06);
  display: flex; flex-direction: column;
}
.card .cover { background: #d9eef8; padding: 18px 18px 0; }
.card .cover img { margin: 0 auto; width: min(100%, 220px); border-radius: 8px 8px 0 0; box-shadow: 0 12px 24px rgba(18,38,58,.16); }
.card .body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.badge { align-self: flex-start; background: var(--sky); color: var(--navy-2); font-size: 0.75rem; font-weight: 700; padding: 4px 8px; border-radius: 999px; }
.card h3 { margin: 0; font-size: 1.15rem; color: var(--navy); line-height: 1.3; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.formats { font-size: 0.8rem; font-weight: 600; color: var(--navy-2); }
.price { font-weight: 700; color: var(--navy); }
.actions { display: grid; gap: 8px; margin-top: auto; padding-top: 12px; }

.pack {
  margin-top: 22px; background: var(--navy); color: #fff; border-radius: 28px;
  padding: 28px; display: flex; justify-content: space-between; gap: 20px; align-items: center;
}
.pack h3 { font-family: var(--serif); font-size: 1.6rem; margin: 0 0 6px; color: #fff; }
.pack p { margin: 0; color: #c9d9e7; }

.howto { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 20px; }
.num { width: 36px; height: 36px; border-radius: 50%; background: var(--orange); color: #fff; display: grid; place-items: center; font-weight: 800; margin-bottom: 10px; }
.step h3 { margin: 0 0 6px; color: var(--navy); font-size: 1.05rem; }
.note { font-size: 0.9rem; color: #8a4b12; background: #fff4e8; border: 1px solid #f3d7b3; padding: 10px 12px; border-radius: 12px; margin-top: 10px; }

.about { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 28px; align-items: center; }
.about-logo { background: #fff; border-radius: 28px; padding: 18px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.about-logo img { width: 100%; border-radius: 18px; }

.faq details {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; margin-bottom: 10px;
}
.faq summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.faq p { margin: 8px 0 4px; color: var(--muted); }

footer { padding: 28px 0 80px; color: var(--muted); font-size: 0.9rem; }
.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 18px; }
footer a { color: var(--navy-2); }

.wa {
  position: fixed; right: 16px; bottom: 16px; z-index: 11;
  background: #25d366; color: #fff; border-radius: 999px; padding: 12px 16px;
  font-weight: 700; text-decoration: none; box-shadow: 0 10px 24px rgba(37, 211, 102, 0.35);
}
.wa.hidden { display: none; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 12px;
  max-width: min(92vw, 420px); display: none; z-index: 30;
}
.toast.show { display: block; }

.legal { max-width: 70ch; padding: 48px 0 80px; }
.legal h1 { font-size: 2rem; }

.mp-legend {
  font-size: 0.73rem;
  color: var(--muted);
  line-height: 1.25;
  margin-top: 2px;
  margin-bottom: 4px;
  text-align: center;
}

/* Contenedor de formatos en cada tarjeta */
.formats-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.format-block {
  background: #f7fbfe;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.format-block h4 {
  margin: 0;
  font-size: 0.85rem;
  color: var(--navy);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--orange-2);
  align-self: flex-start;
  padding-bottom: 1px;
}

.format-price {
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--muted);
}

.format-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.format-actions .btn {
  font-size: 0.84rem;
  padding: 8px 12px;
}

.pack-actions {
  display: flex;
  gap: 10px;
}

@media (max-width: 900px) {
  .hero, .about, .grid-books, .howto, .pack, .featured-book.has-review, .grid-categories { grid-template-columns: 1fr; }
  .hero-art { max-width: 360px; }
  .nav-links { display: none; }
  .pack { display: block; }
  .pack-actions {
    flex-direction: column;
    margin-top: 14px;
    width: 100%;
  }
  .pack-actions .btn {
    width: 100%;
    margin-top: 0 !important; /* Resetea margen anterior */
  }
  footer { padding-bottom: 110px; } /* Evita que el botón de WA tape Privacidad/Gracias */
}

@media (min-width: 1024px) {
  .formats-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}

.serie-section:nth-of-type(even) {
  background: rgba(213, 227, 238, 0.25);
  border-top: 1px solid rgba(213, 227, 238, 0.8);
  border-bottom: 1px solid rgba(213, 227, 238, 0.8);
}

.featured-book.has-review {
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: 28px;
  align-items: start;
}
.featured-book.has-review .grid-books {
  grid-template-columns: 1fr;
}
.book-review {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 32px;
  box-shadow: 0 10px 30px rgba(18, 38, 58, 0.06);
}
.book-review p {
  font-family: var(--serif);
  color: var(--navy);
  font-size: 1.06rem;
  line-height: 1.55;
  margin: 0 0 0.95em;
}
.book-review p:last-child {
  margin-bottom: 0;
}

/* Mostrador de categorías / series (#catalogo) */
.catalogo-section {
  background: var(--white);
  padding: 56px 0;
  border-bottom: 1px solid var(--line);
}
.grid-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}
.category-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(18, 38, 58, 0.06);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(18, 38, 58, 0.09);
}
.category-covers {
  background: #d9eef8;
  padding: 24px 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  height: 200px;
  border-bottom: 1px solid var(--line);
}
.category-covers img {
  border-radius: 6px;
  box-shadow: 0 8px 18px rgba(18, 38, 58, 0.15);
  object-fit: cover;
  aspect-ratio: 2/3;
  transition: transform 0.15s ease;
}
.category-covers.single img {
  height: 152px;
  width: auto;
}
.category-covers.multiple img {
  height: 110px;
  width: auto;
}
.category-covers.multiple img:hover {
  transform: scale(1.05);
  z-index: 2;
}
.category-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.category-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.category-meta .badge {
  background: var(--sky);
  color: var(--navy-2);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
}
.books-count {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}
.category-card h3 {
  margin: 0;
  font-size: 1.3rem;
  color: var(--navy);
  line-height: 1.25;
}
.category-card .pitch {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}
.category-actions {
  margin-top: auto;
  padding-top: 8px;
}
.future-note {
  text-align: center;
  font-size: 0.88rem;
  margin-top: 28px;
}
