/* ==========================================================================
   DGREAT.AI — Tienda de ebooks (/ebooks)
   Se apoya en styles.css (barra de navegacion y pie del sitio) y cambia la
   paleta SOLO dentro de estas paginas: azul marino #070b14, lima #c6ff3d,
   texto blanco, tipografia Montserrat. Primero celular (Instagram).
   ========================================================================== */

body.eb {
  --bg: #070b14;
  --bg-alt: #0a1020;
  --surface: #0d1424;
  --surface-2: #111a2e;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(198, 255, 61, 0.25);
  --text: #ffffff;
  --text-muted: #aab3c5;
  --text-dim: #6c768c;
  --eb-lime: #c6ff3d;
  --eb-lime-soft: rgba(198, 255, 61, 0.12);
  --eb-glow: 0 0 0 1px rgba(198, 255, 61, 0.16), 0 18px 50px -22px rgba(198, 255, 61, 0.45);
  --font-heading: "Montserrat", "Inter", sans-serif;
  --font-body: "Montserrat", "Inter", sans-serif;

  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  padding-bottom: 0;
}
body.eb ::selection { background: var(--eb-lime); color: #070b14; }
body.eb .navbar.is-scrolled { background: rgba(7, 11, 20, 0.92); }
body.eb .navbar__links { background: rgba(7, 11, 20, 0.98); }
body.eb .nav-link::after { background: var(--eb-lime); }
body.eb .nav-link.is-current { color: var(--text); }
body.eb .nav-link.is-current::after { width: 100%; }
body.eb .lang-switch { display: none; }
body.eb .footer { background: #050810; }
body.eb .footer__legal a:hover { color: var(--eb-lime); }

/* ---------- botones ---------- */
.eb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 14px 26px; border-radius: 14px; border: 1.5px solid transparent;
  font: 700 1rem/1.1 var(--font-body); text-decoration: none; cursor: pointer; text-align: center;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s, border-color 0.2s;
}
.eb-btn:active { transform: scale(0.98); }
.eb-btn--lime { background: var(--eb-lime); color: #070b14; box-shadow: 0 10px 30px -12px rgba(198, 255, 61, 0.7); }
.eb-btn--lime:hover { transform: translateY(-2px); box-shadow: 0 14px 36px -10px rgba(198, 255, 61, 0.85); }
.eb-btn--ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.eb-btn--ghost:hover { border-color: var(--eb-lime); color: var(--eb-lime); transform: translateY(-2px); }
.eb-btn[disabled] { opacity: 0.7; pointer-events: none; }
.eb-btn--block { width: 100%; }

/* ---------- estructura ---------- */
.eb-main { padding-top: 76px; }
.eb-wrap { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: 20px; }
.eb-section { padding: 56px 0; }
.eb-section--alt { background: linear-gradient(180deg, transparent, rgba(198, 255, 61, 0.03), transparent); }
.eb-eyebrow { display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--eb-lime); margin-bottom: 10px; }
.eb-h2 { font-size: clamp(1.6rem, 6vw, 2.4rem); line-height: 1.12; letter-spacing: -0.02em; font-weight: 800; margin-bottom: 14px; }
.eb-lead { color: var(--text-muted); font-size: 1.02rem; line-height: 1.65; max-width: 62ch; }

.eb-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 22px;
}
.eb-card--glow { border-color: var(--border-strong); box-shadow: var(--eb-glow); }

/* ---------- hero ---------- */
.eb-hero { padding: 36px 0 52px; position: relative; overflow: hidden; }
.eb-hero::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 70%;
  background: radial-gradient(ellipse at 50% 0%, rgba(198, 255, 61, 0.14), transparent 60%); pointer-events: none;
}
.eb-hero__grid { display: grid; gap: 30px; position: relative; }
.eb-hero__cover { order: -1; justify-self: center; width: min(52%, 230px); }
.eb-cover {
  display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--eb-glow);
}
.eb-hero h1 { font-size: clamp(2.2rem, 10vw, 3.6rem); line-height: 1.02; letter-spacing: -0.03em; font-weight: 800; margin-bottom: 14px; }
.eb-hero h1 span { color: var(--eb-lime); }
.eb-hero__sub { color: var(--text-muted); font-size: clamp(1.02rem, 4vw, 1.2rem); line-height: 1.55; margin-bottom: 24px; max-width: 46ch; }
.eb-buy { display: grid; gap: 12px; margin-bottom: 14px; }
.eb-buy small { display: block; font-weight: 500; font-size: 0.78rem; opacity: 0.8; margin-top: 3px; }
.eb-buy .eb-btn { flex-direction: column; gap: 0; }
.eb-trust { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--text-dim); font-size: 0.82rem; }
.eb-trust span::before { content: "✓ "; color: var(--eb-lime); font-weight: 800; }
.eb-error { margin-top: 12px; color: #ff8a8a; font-size: 0.9rem; min-height: 1.2em; }

/* ---------- flujo de 5 pasos ---------- */
.eb-steps { display: grid; gap: 12px; margin-top: 26px; counter-reset: step; }
.eb-step { display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: center; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); position: relative; }
.eb-step__icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--eb-lime-soft); color: var(--eb-lime); border: 1px solid var(--border-strong); }
.eb-step__icon svg { width: 28px; height: 28px; }
.eb-step h3 { font-size: 1.05rem; font-weight: 800; margin-bottom: 3px; }
.eb-step h3::before { counter-increment: step; content: counter(step) ". "; color: var(--eb-lime); }
.eb-step p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; }

/* ---------- indice ---------- */
.eb-toc { list-style: none; counter-reset: ch; display: grid; gap: 8px; margin-top: 22px; }
.eb-toc li { counter-increment: ch; display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: baseline; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; }
.eb-toc li::before { content: counter(ch, decimal-leading-zero); color: var(--eb-lime); font-weight: 800; }
.eb-toc li small { display: block; color: var(--text-dim); font-weight: 500; font-size: 0.84rem; margin-top: 2px; }

/* ---------- tabla de inversion ---------- */
.eb-table-wrap { overflow-x: auto; margin-top: 22px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); }
.eb-table { width: 100%; border-collapse: collapse; min-width: 480px; font-size: 0.94rem; }
.eb-table th, .eb-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.eb-table th { font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); font-weight: 700; }
.eb-table td:last-child, .eb-table th:last-child { text-align: right; white-space: nowrap; }
.eb-table tfoot td { font-weight: 800; border-bottom: 0; color: var(--eb-lime); }
.eb-note { margin-top: 12px; color: var(--text-dim); font-size: 0.84rem; }

/* ---------- para quien es ---------- */
.eb-fit { display: grid; gap: 14px; margin-top: 24px; }
.eb-fit h3 { font-size: 1.05rem; font-weight: 800; margin-bottom: 12px; }
.eb-fit ul { list-style: none; display: grid; gap: 10px; }
.eb-fit li { position: relative; padding-left: 26px; color: var(--text-muted); line-height: 1.5; font-size: 0.95rem; }
.eb-fit--yes li::before { content: "✓"; position: absolute; left: 0; color: var(--eb-lime); font-weight: 800; }
.eb-fit--no li::before { content: "✕"; position: absolute; left: 0; color: #ff7a7a; font-weight: 800; }

/* ---------- FAQ ---------- */
.eb-faq { display: grid; gap: 10px; margin-top: 22px; }
.eb-faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 0 18px; }
.eb-faq summary { cursor: pointer; list-style: none; font-weight: 700; padding: 16px 0; display: flex; justify-content: space-between; gap: 14px; }
.eb-faq summary::-webkit-details-marker { display: none; }
.eb-faq summary::after { content: "+"; color: var(--eb-lime); font-size: 1.3rem; line-height: 1; }
.eb-faq details[open] summary::after { content: "−"; }
.eb-faq p { color: var(--text-muted); line-height: 1.65; padding-bottom: 16px; font-size: 0.95rem; }
.eb-faq a { color: var(--eb-lime); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- cierre y aviso ---------- */
.eb-final { text-align: center; padding: 44px 22px; border-radius: 24px; background: radial-gradient(ellipse at 50% 0%, rgba(198, 255, 61, 0.12), transparent 65%), var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--eb-glow); }
.eb-final .eb-buy { max-width: 420px; margin: 22px auto 0; }
.eb-disclosure { margin-top: 28px; padding: 14px 16px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); border: 1px dashed var(--border); color: var(--text-dim); font-size: 0.84rem; line-height: 1.55; }

/* ---------- barra de compra fija (solo celular) ---------- */
.eb-sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(7, 11, 20, 0.94); backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-strong); transform: translateY(110%); transition: transform 0.3s var(--ease);
}
.eb-sticky.is-on { transform: none; }
.eb-sticky .eb-btn { min-height: 46px; padding: 10px 12px; font-size: 0.92rem; }
body.eb--sales { padding-bottom: 76px; }

/* ---------- lista de ebooks ---------- */
.eb-grid { display: grid; gap: 22px; margin-top: 28px; }
.eb-prod { display: grid; gap: 16px; padding: 16px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s; }
.eb-prod:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--eb-glow); }
.eb-prod .eb-cover { aspect-ratio: 4 / 5; }
.eb-prod h2 { font-size: 1.25rem; font-weight: 800; line-height: 1.2; }
.eb-prod p { color: var(--text-muted); font-size: 0.93rem; line-height: 1.55; }
.eb-prod__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.eb-price { font-weight: 800; font-size: 1.25rem; color: var(--eb-lime); }
.eb-price small { color: var(--text-dim); font-weight: 600; font-size: 0.78rem; margin-right: 4px; }

/* ---------- gracias ---------- */
.eb-thanks { max-width: 640px; margin: 0 auto; text-align: center; padding: 56px 0 72px; }
.eb-thanks__icon { width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; background: var(--eb-lime-soft); border: 1px solid var(--border-strong); color: var(--eb-lime); box-shadow: var(--eb-glow); }
.eb-thanks__icon svg { width: 34px; height: 34px; }
.eb-thanks h1 { font-size: clamp(1.9rem, 8vw, 2.8rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 12px; }
.eb-dl { display: grid; gap: 12px; margin: 26px auto 0; max-width: 420px; }
.eb-thanks__state { color: var(--text-muted); line-height: 1.6; margin-top: 10px; }
.eb-thanks__small { margin-top: 18px; color: var(--text-dim); font-size: 0.86rem; line-height: 1.6; }
.eb-spinner { width: 26px; height: 26px; margin: 20px auto 0; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--eb-lime); animation: eb-spin 0.8s linear infinite; }
@keyframes eb-spin { to { transform: rotate(360deg); } }

/* ---------- paginas legales (para editar) ---------- */
.eb-legal { max-width: 760px; margin: 0 auto; padding: 44px 20px 80px; }
.eb-legal h1 { font-size: clamp(1.8rem, 7vw, 2.5rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px; }
.eb-legal h2 { font-size: 1.15rem; font-weight: 800; margin: 28px 0 8px; }
.eb-legal p, .eb-legal li { color: var(--text-muted); line-height: 1.7; font-size: 0.97rem; margin-bottom: 10px; }
.eb-legal ul { padding-left: 20px; }
.eb-legal a { color: var(--eb-lime); text-decoration: underline; text-underline-offset: 3px; }
.eb-draft { margin: 18px 0 24px; padding: 14px 16px; border-radius: 12px; background: rgba(255, 200, 60, 0.08); border: 1px solid rgba(255, 200, 60, 0.35); color: #ffd978; font-size: 0.9rem; line-height: 1.55; }

/* ---------- tablet y computadora ---------- */
@media (min-width: 720px) {
  .eb-wrap { padding-inline: 28px; }
  .eb-section { padding: 76px 0; }
  .eb-hero { padding: 56px 0 76px; }
  .eb-hero__grid { grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 48px; }
  .eb-hero__cover { order: 2; width: 100%; max-width: 380px; justify-self: end; }
  .eb-buy { grid-template-columns: 1fr 1fr; max-width: 520px; }
  .eb-steps { grid-template-columns: repeat(5, 1fr); gap: 14px; }
  .eb-step { grid-template-columns: 1fr; text-align: center; justify-items: center; padding: 22px 14px; }
  .eb-step:not(:last-child)::after { content: "→"; position: absolute; right: -13px; top: 50%; transform: translateY(-50%); color: var(--eb-lime); font-weight: 800; z-index: 2; }
  .eb-fit { grid-template-columns: 1fr 1fr; gap: 20px; }
  .eb-grid { grid-template-columns: repeat(2, 1fr); }
  .eb-sticky { display: none; }
  body.eb--sales { padding-bottom: 0; }
}
@media (min-width: 1000px) {
  .eb-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .eb-btn, .eb-prod, .eb-sticky { transition: none; }
  .eb-spinner { animation-duration: 2s; }
}

/* El fondo animado (rejilla, circuitos, brillos) viene de styles.css (.bg-fx), igual que la pagina principal */

/* Portadas ebook + Pack Pro juntas en la página de venta */
.eb-covers { position: relative; padding-right: 30%; }
.eb-hero__cover.eb-covers { width: min(78%, 320px); }
@media (min-width: 760px) { .eb-hero__cover.eb-covers { width: 100%; max-width: 440px; } }
.eb-covers .eb-cover:first-child { transform: rotate(-3deg); position: relative; z-index: 1; }
.eb-cover--pro { position: absolute; right: 0; bottom: -6%; width: 62%; transform: rotate(5deg); z-index: 2; }
