/* ═══════════════════════════════════════════════════════
   CUENTOS DE MI LONCHERA — Estilos Principales
   Paleta: Cálida, premium + infantil mágico
═══════════════════════════════════════════════════════ */

/* ── Variables ────────────────────────────────────────── */
:root {
  --primary:    #F4A828;
  --primary-d:  #d4881a;
  --secondary:  #E84040;
  --purple:     #7B5EA7;
  --teal:       #3ABFBF;
  --cream:      #FFF8EE;
  --dark:       #1A1228;
  --dark-2:     #2A1E3F;
  --text:       #3D2C5E;
  --text-light: #7A6890;
  --white:      #FFFFFF;

  --radius-sm:  10px;
  --radius-md:  20px;
  --radius-lg:  32px;
  --radius-xl:  48px;

  --shadow-sm:  0 4px 20px rgba(26,18,40,.08);
  --shadow-md:  0 8px 40px rgba(26,18,40,.14);
  --shadow-lg:  0 20px 60px rgba(26,18,40,.20);

  --font-display: 'Baloo 2', cursive;
  --font-body:    'Nunito', sans-serif;

  --transition: .3s cubic-bezier(.4,0,.2,1);
  --spring:     .5s cubic-bezier(.34,1.56,.64,1);
}

/* ── Reset ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--text);
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Promociones ───────────────────────────────────── */
.promos-section {
  padding: 100px 0;
  background: linear-gradient(180deg, #fff0d6 0%, var(--cream) 100%);
  position: relative;
  z-index: 1;
}
.promos-stage { display:grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap:18px; margin-top:18px }
.promo-card { background: linear-gradient(180deg,#fff,#fff); border-radius:12px; padding:14px; box-shadow:var(--shadow-sm); }
.promo-head { font-weight:700; margin-bottom:6px }
.promo-items { display:flex; flex-direction:column; gap:8px; margin:8px 0 }
.promo-item{ display:flex; gap:10px; align-items:center }
.promo-item-cover{ width:56px; height:56px; object-fit:cover; border-radius:8px }
.promo-item-meta{ display:flex; flex-direction:column }
.promo-item-title{ font-weight:700 }
.promo-item-format{ font-size:0.85rem; color:var(--text-light) }
.promo-actions{ margin-top:8px }
.btn-buy{ background:var(--primary); color:white; padding:8px 12px; border-radius:10px }

/* Admin promos page styles */
.admin-promo-form { background: #fff; padding: 14px; border-radius: 12px; box-shadow: var(--shadow-sm); }
.admin-promo-form .form-row { margin-bottom: 10px }
.books-checklist { max-height: 420px; overflow: auto; padding-right: 6px }
.book-item { padding:6px 6px; border-bottom:1px solid #f5f5f8 }
.book-item-row{ display:flex; align-items:center; gap:12px }
.book-thumb{ width:44px; height:58px; object-fit:cover; border-radius:6px }
.book-title{ font-weight:700; flex:1 }
.book-format{ font-size:0.9rem; color:var(--text-light); padding-left:8px }
.book-item-row input[type=checkbox]{ width:18px; height:18px }

.promo-list{ display:flex; flex-direction:column; gap:12px }
.promo-card{ background:#fff;padding:12px;border-radius:10px; box-shadow:0 6px 18px rgba(12,12,20,0.04); border:1px solid #f0f0f3 }
.promo-top{ display:flex; justify-content:space-between; align-items:center }
.promo-price{ color:var(--text-light); font-size:0.9rem }
.muted{ color:#6b6b7a; font-size:0.92rem; margin:6px 0 }
.promo-items-grid{ display:grid; grid-template-columns: 1fr; gap:8px }
.promo-item-mini{ display:flex; gap:10px; align-items:center }
.mini-cover{ width:48px; height:64px; object-fit:cover; border-radius:6px }
.mini-cover.placeholder{ background:linear-gradient(135deg,#f3f3f6,#fafafa); display:inline-block }
.mini-meta .mini-title{ font-weight:700 }
.mini-format{ font-size:0.85rem; color:var(--text-light) }

/* ── Custom Cursor ────────────────────────────────────── */
.cursor-dot {
  display: none;
  width: 8px; height: 8px;
  background: var(--primary);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%,-50%);
  transition: transform .1s;
}
.cursor-ring {
  display: none;
  width: 36px; height: 36px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%,-50%);
  transition: transform .15s, width .3s, height .3s, border-color .3s;
  opacity: .6;
}
body.cursor-hover .cursor-ring {
  width: 56px; height: 56px;
  border-color: var(--secondary);
  opacity: .4;
}

/* ── Partículas flotantes ─────────────────────────────── */
.particles-container {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat linear infinite;
}
@keyframes particleFloat {
  0%   { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10%  { opacity: .6; }
  90%  { opacity: .6; }
  100% { transform: translateY(-20vh) rotate(720deg); opacity: 0; }
}

/* ── Navbar ───────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
}
.navbar.scrolled {
  background: rgba(255,248,238,.95);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
  padding: 10px 0;
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
}
.logo-img { height: 48px; width: auto; object-fit: contain; }
.logo-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
}
.nav-links {
  display: flex; align-items: center; gap: 8px;
}
.nav-link {
  font-weight: 600;
  font-size: .95rem;
  color: var(--text);
  padding: 8px 14px;
  border-radius: 50px;
  transition: background var(--transition), color var(--transition);
}
.nav-link:hover {
  background: rgba(244,168,40,.12);
  color: var(--primary-d);
}
.nav-cta {
  background: var(--primary);
  color: var(--dark);
  font-weight: 700;
  font-size: .95rem;
  padding: 10px 22px;
  border-radius: 50px;
  transition: background var(--transition), transform var(--spring);
}
.nav-cta:hover {
  background: var(--primary-d);
  transform: scale(1.05);
}
.hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  width: 30px; cursor: pointer;
}
.hamburger span {
  display: block;
  height: 3px; border-radius: 2px;
  background: var(--dark);
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px,6px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-6px); }

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 16px 24px;
  background: rgba(255,248,238,.98);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(244,168,40,.2);
}
.mobile-menu.open { display: flex; }
.mobile-link {
  font-weight: 600; padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: background var(--transition);
}
.mobile-link:hover { background: rgba(244,168,40,.1); }
.mobile-cta {
  background: var(--primary);
  color: var(--dark);
  font-weight: 700;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  text-align: center;
  margin-top: 8px;
}

/* ── Hero Bio (Contexto + Biografía) ──────────────────── */
.hero-bio {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 140px 24px 80px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fff8ee 0%, #fff0d6 40%, #fde8ff 100%);
}
.hero-bg-shapes { position: absolute; inset: 0; pointer-events: none; }
.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .25;
  animation: shapeFloat 8s ease-in-out infinite;
}
.shape-1 { width:500px;height:500px;background:var(--primary);top:-100px;right:-100px;animation-delay:0s; }
.shape-2 { width:350px;height:350px;background:var(--secondary);bottom:-50px;left:-80px;animation-delay:2s; }
.shape-3 { width:250px;height:250px;background:var(--purple);top:40%;left:30%;animation-delay:4s; }
.shape-4 { width:180px;height:180px;background:var(--teal);bottom:20%;right:20%;animation-delay:1s; }
@keyframes shapeFloat {
  0%,100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-30px) scale(1.05); }
}

.hero-bio .container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-bio-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(244,168,40,.15);
  border: 1.5px solid rgba(244,168,40,.3);
  border-radius: 50px;
  padding: 8px 18px;
  font-size: .85rem;
  font-weight: 700;
  color: var(--primary-d);
  margin-bottom: 24px;
  animation: badgePop .6s var(--spring) both;
}
@keyframes badgePop { from { opacity:0; transform:scale(.8) translateY(10px); } to { opacity:1; transform:none; } }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--dark);
  margin-bottom: 20px;
  animation: slideUp .7s ease both .1s;
}
.hero-highlight { color: var(--primary); position: relative; }

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 30px;
  animation: slideUp .7s ease both .2s;
}
@keyframes slideUp { from { opacity:0; transform:translateY(30px); } to { opacity:1; transform:none; } }

.bio-intro {
  background: rgba(255,255,255,.6);
  padding: 24px;
  border-radius: var(--radius-md);
  margin-bottom: 30px;
  border-left: 4px solid var(--primary);
  animation: slideUp .7s ease both .3s;
}

.bio-subtitle {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--dark);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.bio-label {
  font-size: 0.75rem;
  background: rgba(123, 94, 167, 0.15);
  color: var(--purple);
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bio-intro p {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 10px;
}
.bio-intro p:last-child { margin-bottom: 0; }

.hero-actions {
  display: flex; gap: 16px; flex-wrap: wrap;
  margin-bottom: 48px;
  animation: slideUp .7s ease both .4s;
}

.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--primary);
  color: var(--dark);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  padding: 16px 32px;
  border-radius: 50px;
  box-shadow: 0 8px 30px rgba(244,168,40,.4);
  transition: transform var(--spring), box-shadow var(--transition);
}
.btn-primary:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 14px 40px rgba(244,168,40,.5); }

.hero-bio-visual {
  position: relative;
  display: flex;
  justify-content: center;
  animation: slideUp .8s ease both .2s;
}

.bio-img-frame-hero {
  position: relative;
  width: 100%;
  max-width: 440px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 10px solid white;
  transform: rotate(2deg);
  transition: transform var(--spring);
}
.bio-img-frame-hero:hover {
  transform: rotate(0deg) scale(1.02);
}

.hero-biografia-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 10px;
}

.bunny-float {
  position: absolute;
  bottom: -30px;
  right: -30px;
  width: 100px;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,.15));
  animation: bunnyHop 3s ease-in-out infinite;
}

@keyframes bunnyHop {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

@media (max-width: 968px) {
  .hero-bio .container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-bio-content {
    align-items: center;
  }
  .bio-intro {
    text-align: left;
  }
  .bio-subtitle { justify-content: center; }
  .bio-intro p { text-align: left; }
}

/* ── Section commons ──────────────────────────────────── */
.section-label {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--primary-d);
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--dark);
  margin-bottom: 16px;
}
.highlight-text { color: var(--primary); }
.section-desc {
  font-size: 1.05rem;
  color: var(--text-light);
  line-height: 1.7;
  max-width: 600px;
  margin-bottom: 48px;
}

/* ── Por qué elegirnos ────────────────────────────────── */
.porque {
  padding: 100px 0;
  background: var(--dark);
  position: relative;
  overflow: hidden;
}
.porque::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(244,168,40,.1), transparent 70%);
  pointer-events: none;
}
.porque .section-label { color: var(--primary); }
.porque .section-title { color: var(--white); }
.porque .section-desc  { color: rgba(255,255,255,.6); }

/* Ticker */
.features-ticker-wrap {
  overflow: hidden;
  padding: 24px 0;
  margin: 0 0 60px;
  border-top: 1px solid rgba(255,255,255,.08);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.features-ticker {
  display: flex; gap: 16px;
  width: max-content;
  animation: ticker 20s linear infinite;
}
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.feature-pill {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50px;
  padding: 10px 22px;
  font-weight: 700;
  font-size: .9rem;
  color: rgba(255,255,255,.8);
  white-space: nowrap;
}

.porque-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.porque-card {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-md);
  padding: 36px 28px;
  position: relative;
  overflow: hidden;
  transition: background var(--transition), border-color var(--transition), transform var(--spring);
}
.porque-card:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(244,168,40,.4);
  transform: translateY(-6px);
}
.porque-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  color: rgba(244,168,40,.15);
  position: absolute;
  top: 16px; right: 20px;
  line-height: 1;
}
.porque-icon { font-size: 2.2rem; margin-bottom: 16px; }
.porque-card h3 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: var(--white); margin-bottom: 10px; }
.porque-card p  { color: rgba(255,255,255,.55); font-size: .9rem; line-height: 1.6; }

/* ── Catálogo / Estante ───────────────────────────────── */
.catalogo {
  padding: 100px 0 140px;
  background: linear-gradient(180deg, var(--cream) 0%, #fff0d6 100%);
  position: relative;
  overflow: hidden;
}
.catalogo .container { text-align: center; }
.catalogo .section-desc { margin: 0 auto 60px; }

.bookshelf-scene {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 60px 60px;
}
.shelf-wall {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #f5e8d0, #ecdbb8);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.bookshelf {
  position: relative;
  z-index: 1;
}
.shelf-top-shadow {
  position: absolute;
  top: -12px; left: 10px; right: 10px;
  height: 20px;
  background: rgba(0,0,0,.08);
  border-radius: 50%;
  filter: blur(8px);
}
.shelf-books {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 32px;
  padding: 0 40px 20px;
  min-height: 250px;
}
.main-shelf {
  position: relative;
  height: 22px;
  background: linear-gradient(180deg, #c4a35a 0%, #8B6914 60%, #6b500f 100%);
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.3);
}
.shelf-left-side,
.shelf-right-side {
  position: absolute;
  bottom: -60px;
  width: 22px; height: 80px;
  background: linear-gradient(90deg, #8B6914, #6b500f);
}
.shelf-left-side  { left: 0; border-radius: 0 0 4px 4px; }
.shelf-right-side { right: 0; border-radius: 0 0 4px 4px; }

/* Decoraciones del estante */
.shelf-decor {
  position: absolute;
  inset: 0; pointer-events: none;
}
.decor-item {
  position: absolute;
  font-size: 1.8rem;
  animation: decorFloat 4s ease-in-out infinite;
}
.decor-star   { top: 20px; right: 80px; animation-delay: 0s; }
.decor-heart  { top: 30px; left: 80px; animation-delay: 1.5s; }
.decor-rainbow{ bottom: 100px; right: 40px; animation-delay: .8s; }
.decor-plant  { position: absolute; bottom: 20px; left: 30px; font-size: 2.5rem; animation: decorFloat 5s ease-in-out infinite 2s; }
@keyframes decorFloat {
  0%,100% { transform: translateY(0) rotate(-5deg); }
  50%      { transform: translateY(-10px) rotate(5deg); }
}

/* ── Libro en el estante ──────────────────────────────── */
.shelf-book {
  display: flex;
  cursor: pointer;
  transform-origin: bottom center;
  transition: transform var(--spring);
  position: relative;
}
.shelf-book:hover { transform: translateY(-20px) scale(1.04); }
.shelf-book:hover .book-title-tooltip { opacity: 1; transform: translateY(-8px); }

.book-spine-shelf {
  width: 28px;
  height: 200px;
  border-radius: 5px 0 0 5px;
  box-shadow: inset -4px 0 10px rgba(0,0,0,.25);
  display: flex; align-items: center; justify-content: center;
  writing-mode: vertical-lr;
  transform: rotate(180deg);
  font-family: var(--font-display);
  font-size: .65rem;
  font-weight: 700;
  color: rgba(255,255,255,.7);
  letter-spacing: .05em;
}
.book-front-shelf {
  width: 150px;
  height: 200px;
  border-radius: 0 8px 8px 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 16px;
  box-shadow: 6px 6px 20px rgba(0,0,0,.2);
  position: relative;
  overflow: hidden;
  gap: 10px;
}
.book-front-shelf::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 8px;
  background: rgba(0,0,0,.15);
}
.book-cover-shelf-img {
  width: 100%; height: 100%;
  object-fit: cover;
  position: absolute; inset: 0;
  border-radius: 0 8px 8px 0;
}
.book-cover-shelf-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; width: 100%; height: 100%;
  position: absolute; inset: 0;
}
.book-cover-shelf-emoji { font-size: 2.5rem; }
.book-cover-shelf-title {
  font-family: var(--font-display);
  font-size: .85rem;
  font-weight: 800;
  color: white;
  text-align: center;
  line-height: 1.3;
  text-shadow: 0 2px 8px rgba(0,0,0,.3);
  z-index: 1;
}
.book-price-tag {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(4px);
  color: white;
  font-size: .65rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 20px;
  z-index: 2;
}
.book-title-tooltip {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: var(--dark);
  color: white;
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 20px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity var(--transition), transform var(--transition);
  pointer-events: none;
  z-index: 10;
}
.book-title-tooltip::after {
  content: '';
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--dark);
}

/* ── Modal del libro ──────────────────────────────────── */
.book-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(26,18,40,.85);
  backdrop-filter: blur(12px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity .3s;
}
.book-modal-overlay.active {
  display: flex;
  animation: overlayIn .3s ease forwards;
}
@keyframes overlayIn { to { opacity: 1; } }

.book-modal {
  background: var(--cream);
  border-radius: var(--radius-xl);
  padding: 48px;
  max-width: 840px;
  width: 100%;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
  transform: scale(.8) translateY(40px);
  animation: modalIn .5s var(--spring) forwards;
  overflow: hidden;
}
@keyframes modalIn { to { transform: scale(1) translateY(0); } }

.modal-close {
  position: absolute;
  top: 20px; right: 24px;
  width: 40px; height: 40px;
  background: rgba(61,44,94,.1);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  color: var(--text);
  transition: background var(--transition), transform var(--spring);
  cursor: pointer;
}
.modal-close:hover { background: var(--secondary); color: white; transform: scale(1.1) rotate(90deg); }

/* Animación del libro en el modal */
.modal-book-animation {
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1000px;
}
.modal-book {
  position: relative;
  width: 200px;
  height: 270px;
  transform-style: preserve-3d;
  animation: bookOpenClose 1.2s var(--spring) forwards;
}
@keyframes bookOpenClose {
  0%   { transform: rotateY(0deg) rotateX(-10deg) scale(.6); }
  40%  { transform: rotateY(-30deg) rotateX(-5deg) scale(1.05); }
  70%  { transform: rotateY(-20deg) rotateX(0deg) scale(1); }
  100% { transform: rotateY(-25deg) rotateX(0deg) scale(1); }
}

.modal-book-cover {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
}
.modal-book-front {
  position: absolute; inset: 0;
  border-radius: 0 12px 12px 0;
  overflow: hidden;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 20px;
  gap: 12px;
  box-shadow: 12px 12px 40px rgba(0,0,0,.3);
}
.modal-book-spine {
  position: absolute;
  left: -32px; top: 0; bottom: 0;
  width: 32px;
  border-radius: 4px 0 0 4px;
  box-shadow: inset -4px 0 12px rgba(0,0,0,.25);
}
.modal-cover-img-wrap {
  width: 100%; flex: 1;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}
.modal-cover-img { width: 100%; height: 100%; object-fit: cover; }
.modal-cover-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem;
  background: rgba(255,255,255,.1);
}
.modal-cover-title {
  font-family: var(--font-display);
  font-size: .9rem;
  font-weight: 800;
  color: white;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0,0,0,.3);
}

/* Páginas del libro */
.modal-book-pages {
  position: absolute;
  right: -20px; top: 4px; bottom: 4px;
  width: 20px;
  display: flex; flex-direction: column-reverse;
}
.page {
  flex: 1;
  background: linear-gradient(90deg, #f5f0e8, #ece6d8);
  border-radius: 0 2px 2px 0;
  box-shadow: 1px 0 2px rgba(0,0,0,.1);
}

/* Info del modal */
.modal-info {}
.modal-badge {
  display: inline-block;
  background: rgba(244,168,40,.15);
  color: var(--primary-d);
  font-size: .8rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 12px;
}
.modal-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 12px;
  line-height: 1.2;
}
.modal-desc {
  color: var(--text-light);
  font-size: .95rem;
  line-height: 1.7;
  margin-bottom: 16px;
}
.modal-themes {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 20px;
}
.theme-tag {
  background: rgba(123,94,167,.1);
  color: var(--purple);
  font-size: .78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
}
.modal-price {
  display: flex; align-items: baseline; gap: 6px;
  margin-bottom: 28px;
}
.price-label { font-size: .85rem; color: var(--text-light); font-weight: 600; }
.price-amount { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; color: var(--dark); }
.price-currency { font-size: .85rem; color: var(--text-light); font-weight: 600; }

.modal-actions { display: flex; flex-direction: column; gap: 12px; }
.btn-whatsapp {
  display: flex; align-items: center; gap: 12px;
  background: #25D366;
  color: white;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  padding: 16px 24px;
  border-radius: var(--radius-md);
  transition: background var(--transition), transform var(--spring);
  box-shadow: 0 6px 24px rgba(37,211,102,.35);
}
.btn-whatsapp:hover { background: #1da852; transform: translateY(-3px); }
.btn-hotmart {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, var(--primary), #f77f00);
  color: white;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  padding: 16px 24px;
  border-radius: var(--radius-md);
  transition: opacity var(--transition), transform var(--spring);
  box-shadow: 0 6px 24px rgba(244,168,40,.4);
}
.btn-hotmart:hover { opacity: .9; transform: translateY(-3px); }

/* ── FAQ ──────────────────────────────────────────────── */
.faq {
  padding: 100px 0;
  background: var(--white);
}
.faq .container { text-align: center; }
.faq .section-desc { margin: 0 auto 48px; }
.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex; flex-direction: column; gap: 12px;
  text-align: left;
}
.faq-item {
  background: var(--cream);
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  overflow: hidden;
  transition: border-color var(--transition);
}
.faq-item.open { border-color: var(--primary); }
.faq-question {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
  cursor: pointer;
  text-align: left;
  transition: color var(--transition);
}
.faq-question:hover { color: var(--primary-d); }
.faq-icon {
  width: 28px; height: 28px;
  background: rgba(244,168,40,.15);
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  transition: background var(--transition), transform var(--spring);
}
.faq-icon span {
  position: absolute;
  background: var(--primary-d);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.faq-icon span:nth-child(1) { width: 12px; height: 2px; top: 50%; left: 50%; transform: translate(-50%,-50%); }
.faq-icon span:nth-child(2) { width: 2px; height: 12px; top: 50%; left: 50%; transform: translate(-50%,-50%); }
.faq-item.open .faq-icon { background: var(--primary); transform: rotate(45deg); }
.faq-item.open .faq-icon span { background: white; }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s cubic-bezier(.4,0,.2,1), padding .3s;
}
.faq-answer p {
  padding: 0 24px 22px;
  color: var(--text-light);
  font-size: .95rem;
  line-height: 1.7;
}
.faq-item.open .faq-answer { max-height: 300px; }

/* ── Footer ───────────────────────────────────────────── */
.footer {
  background: var(--dark-2);
  color: rgba(255,255,255,.7);
}
.footer-top {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
}
.footer-logo { height: 56px; margin-bottom: 12px; }
.footer-tagline {
  font-size: .95rem;
  color: rgba(255,255,255,.55);
  margin-bottom: 20px;
  line-height: 1.6;
}
.footer-socials { display: flex; gap: 12px; }
.social-link {
  width: 40px; height: 40px;
  background: rgba(255,255,255,.08);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.7);
  transition: background var(--transition), color var(--transition), transform var(--spring);
}
.social-link:hover { background: var(--primary); color: var(--dark); transform: scale(1.15); }

.footer-links-col h4 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
  font-size: 1rem;
}
.footer-links-col a {
  display: block;
  font-size: .9rem;
  color: rgba(255,255,255,.55);
  padding: 5px 0;
  transition: color var(--transition);
}
.footer-links-col a:hover { color: var(--primary); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 20px 24px;
  text-align: center;
  font-size: .82rem;
  color: rgba(255,255,255,.35);
}

/* ── Loading state ────────────────────────────────────── */
.shelf-loading {
  display: flex; align-items: center; justify-content: center;
  height: 200px;
  color: var(--text-light);
  font-family: var(--font-display);
  font-weight: 600;
  gap: 12px;
  font-size: 1.1rem;
}
.loading-dot {
  width: 10px; height: 10px;
  background: var(--primary);
  border-radius: 50%;
  animation: loadingBounce .8s ease-in-out infinite;
}
.loading-dot:nth-child(2) { animation-delay: .15s; }
.loading-dot:nth-child(3) { animation-delay: .3s; }
@keyframes loadingBounce {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 100px 24px 60px;
  }
  .hero-visual { order: -1; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-desc br { display: none; }
  .nosotros-cards { grid-template-columns: 1fr; }
  .porque-grid { grid-template-columns: repeat(2, 1fr); }
  .book-modal { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1/-1; }
}
@media (max-width: 680px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .porque-grid { grid-template-columns: 1fr; }
  .bookshelf-scene { padding: 24px; }
  .shelf-books { gap: 16px; flex-wrap: wrap; }
  .book-modal { padding: 32px 24px; }
  .footer-top { grid-template-columns: 1fr; }
}

/* ── Biografía ────────────────────────────────────────── */
.biografia {
  padding: 100px 0;
  background: var(--white);
  position: relative;
}
.biografia-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: center;
}
.biografia-image-wrap {
  display: flex;
  justify-content: center;
  position: relative;
}
.bio-img-frame {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 12px;
  background: linear-gradient(135deg, #fff0d6, #fde8ff);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition), box-shadow var(--transition);
}
.bio-img-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 2px;
  background: linear-gradient(to bottom right, var(--primary), var(--purple));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.biografia-img {
  width: 100%;
  max-width: 320px;
  border-radius: calc(var(--radius-lg) - 8px);
  object-fit: cover;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.biografia-content {
  display: flex;
  flex-direction: column;
}
.biografia-text {
  font-size: 1.1rem;
  color: var(--text-light);
  line-height: 1.8;
}
.biografia-text p {
  margin-bottom: 20px;
}
.biografia-text p:last-child {
  margin-bottom: 0;
}

/* Biografía Responsive */
@media (max-width: 960px) {
  .biografia-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .biografia-img {
    max-width: 280px;
  }
}

