/* Nutrivibe — Ebook detail & thank-you pages
   Apple × Headspace × Calm conversion layout */

.nv-ed {
  padding-top: 5.5rem;
  padding-bottom: 5rem;
}

.nv-ed-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--nv-brand);
  transition: color 0.2s;
}

.nv-ed-back:hover {
  color: var(--nv-brand-hover);
}

/* ── HERO ── */
.nv-ed-hero {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  padding-bottom: clamp(3rem, 8vw, 5rem);
}

@media (min-width: 900px) {
  .nv-ed-hero {
    grid-template-columns: minmax(260px, 320px) 1fr;
    gap: 4rem;
  }
}

.nv-ed-hero-cover {
  position: relative;
  max-width: 320px;
  margin-inline: auto;
}

.nv-ed-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--nv-radius-xl);
  box-shadow: var(--nv-shadow-lg);
  overflow: hidden;
  transform: perspective(800px) rotateY(-4deg);
  transition: transform 0.5s var(--nv-ease-out);
}

.nv-ed-hero-cover:hover .nv-ed-cover {
  transform: perspective(800px) rotateY(0deg);
}

.nv-ed-cover--1 {
  background: linear-gradient(165deg, #fde68a 0%, #f59e0b 50%, #d97706 100%);
}

.nv-ed-cover--2 {
  background: linear-gradient(165deg, #86efac 0%, #22c55e 50%, #15803d 100%);
}

.nv-ed-cover--3 {
  background: linear-gradient(165deg, #93c5fd 0%, #3b82f6 50%, #1d4ed8 100%);
}

.nv-ed-cover--4 {
  background: linear-gradient(165deg, #c4b5fd 0%, #7c3aed 50%, #5b21b6 100%);
}

.nv-ed-cover--5 {
  background: linear-gradient(165deg, #67e8f9 0%, #06b6d4 50%, #0e7490 100%);
}

.nv-ed-cover--6 {
  background: linear-gradient(165deg, #fda4af 0%, #e11d48 50%, #be123c 100%);
}

.nv-ed-cover-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  color: #fff;
  background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.45) 100%);
}

.nv-ed-cover-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.9;
}

.nv-ed-cover-title {
  margin: 0.5rem 0 0;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.nv-ed-hero-copy h1 {
  margin: 0;
  font-size: clamp(2.25rem, 6vw, 3.25rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.nv-ed-hero-price {
  margin: 1rem 0 0;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--nv-brand);
}

.nv-ed-hero-desc {
  margin: 1rem 0 0;
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--nv-ink-secondary);
  max-width: 32rem;
}

.nv-ed-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-top: 1.5rem;
}

.nv-ed-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--nv-ink-secondary);
  background: var(--nv-surface-soft);
  border: 1px solid var(--nv-separator);
  border-radius: var(--nv-radius-pill);
}

.nv-ed-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.nv-ed-hero-actions .nv-btn {
  min-width: 160px;
}

/* ── SECTIONS ── */
.nv-ed-section {
  padding-block: clamp(3rem, 8vw, 5rem);
  border-top: 1px solid var(--nv-separator);
}

.nv-ed-section-head {
  text-align: center;
  max-width: 36rem;
  margin-inline: auto;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.nv-ed-section-head h2 {
  margin: 0;
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.nv-ed-section-head p {
  margin: 0.75rem 0 0;
  font-size: 1.0625rem;
  color: var(--nv-ink-secondary);
  line-height: 1.5;
}

/* Benefit cards */
.nv-ed-benefits {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 540px) {
  .nv-ed-benefits {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .nv-ed-benefits {
    grid-template-columns: repeat(3, 1fr);
  }
}

.nv-ed-benefit {
  padding: 1.35rem 1.5rem;
  border-radius: var(--nv-radius-lg);
  background: #fff;
  border: 1px solid var(--nv-separator);
  box-shadow: var(--nv-shadow-sm);
  transition: box-shadow 0.3s var(--nv-ease-out), transform 0.3s var(--nv-ease-out);
}

.nv-ed-benefit:hover {
  box-shadow: var(--nv-shadow-md);
  transform: translateY(-3px);
}

.nv-ed-benefit-icon {
  font-size: 1.25rem;
  line-height: 1;
  margin-bottom: 0.625rem;
}

.nv-ed-benefit h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.nv-ed-benefit p {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--nv-ink-tertiary);
}

/* Preview carousel */
.nv-ed-preview-wrap {
  max-width: 480px;
  margin-inline: auto;
}

.nv-ed-preview-stage {
  padding: 1.75rem;
  border-radius: var(--nv-radius-xl);
  background: linear-gradient(180deg, var(--nv-surface-soft) 0%, #fff 100%);
  border: 1px solid var(--nv-separator);
  box-shadow: var(--nv-shadow-md);
}

.nv-ed-preview-viewport {
  overflow: hidden;
  border-radius: var(--nv-radius-md);
}

.nv-ed-preview-track {
  display: flex;
  transition: transform 0.5s var(--nv-ease-out);
}

.nv-ed-preview-slide {
  flex: 0 0 100%;
}

.nv-ed-page {
  aspect-ratio: 3 / 4;
  max-width: 400px;
  margin-inline: auto;
  border-radius: var(--nv-radius-sm);
  overflow: hidden;
  box-shadow: var(--nv-shadow-lg);
  background: #fff;
}

.nv-ed-page--cover {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  color: #fff;
  background: linear-gradient(165deg, #fde68a, #f59e0b 55%, #d97706);
}

.nv-ed-page--cover h3 {
  margin: 0.5rem 0 0;
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.nv-ed-page--cover p {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  opacity: 0.92;
}

.nv-ed-page--inner {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nv-ed-page--inner img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 8px;
}

.nv-ed-page--inner h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nv-ed-page--inner p {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--nv-ink-secondary);
}

.nv-ed-page--fade::after {
  content: "Continúa en el ebook completo";
  position: absolute;
  inset: auto 0 0;
  padding: 3rem 1rem 1.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: center;
  color: var(--nv-brand);
  background: linear-gradient(transparent, #fff 60%);
}

.nv-ed-page--fade {
  position: relative;
}

.nv-ed-preview-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.25rem;
}

.nv-ed-preview-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--nv-separator);
  border-radius: 50%;
  background: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.nv-ed-preview-btn:hover:not(:disabled) {
  background: var(--nv-surface-muted);
  border-color: rgba(124, 58, 237, 0.3);
}

.nv-ed-preview-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.nv-ed-preview-counter {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--nv-ink-tertiary);
  min-width: 3.5rem;
  text-align: center;
}

.nv-ed-preview-dots {
  display: flex;
  gap: 0.4rem;
}

.nv-ed-preview-dot,
.nv-preview-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #d4d4d8;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.nv-ed-preview-dot.is-active,
.nv-preview-dot.is-active {
  background: var(--nv-brand);
  transform: scale(1.2);
}

/* Timeline TOC */
.nv-ed-toc {
  max-width: 520px;
  margin-inline: auto;
  position: relative;
  padding-left: 2rem;
}

.nv-ed-toc::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: linear-gradient(180deg, var(--nv-brand-light), var(--nv-brand-soft));
  border-radius: 1px;
}

.nv-ed-toc-item {
  position: relative;
  padding-bottom: 1.75rem;
}

.nv-ed-toc-item:last-child {
  padding-bottom: 0;
}

.nv-ed-toc-item::before {
  content: "";
  position: absolute;
  left: -2rem;
  top: 0.35rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--nv-brand);
  box-shadow: 0 0 0 4px var(--nv-brand-soft);
}

.nv-ed-toc-num {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nv-brand);
  margin-bottom: 0.25rem;
}

.nv-ed-toc-item h3 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.nv-ed-toc-item p {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--nv-ink-tertiary);
  line-height: 1.45;
}

/* Audience cards */
.nv-ed-audience {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .nv-ed-audience {
    grid-template-columns: repeat(2, 1fr);
  }
}

.nv-ed-audience-card {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--nv-radius-lg);
  background: var(--nv-surface-soft);
  border: 1px solid var(--nv-separator);
  transition: background 0.25s, box-shadow 0.25s;
}

.nv-ed-audience-card:hover {
  background: #fff;
  box-shadow: var(--nv-shadow-sm);
}

.nv-ed-audience-check {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--nv-brand);
  background: var(--nv-brand-soft);
  border-radius: 50%;
}

.nv-ed-audience-card h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.nv-ed-audience-card p {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--nv-ink-tertiary);
  line-height: 1.45;
}

/* Pillars */
.nv-ed-pillars {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
  .nv-ed-pillars {
    grid-template-columns: repeat(4, 1fr);
  }
}

.nv-ed-pillar {
  padding: 1.5rem 1.25rem;
  text-align: center;
  border-radius: var(--nv-radius-lg);
  background: #fff;
  border: 1px solid var(--nv-separator);
  transition: box-shadow 0.3s, transform 0.3s;
}

.nv-ed-pillar:hover {
  box-shadow: var(--nv-shadow-md);
  transform: translateY(-4px);
}

.nv-ed-pillar-icon {
  font-size: 1.75rem;
  line-height: 1;
  margin-bottom: 0.625rem;
}

.nv-ed-pillar h3 {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
}

.nv-ed-manifesto {
  max-width: 36rem;
  margin-inline: auto;
  text-align: center;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--nv-ink-secondary);
}

.nv-ed-manifesto strong {
  color: var(--nv-ink);
  font-weight: 600;
}

/* Purchase block */
.nv-ed-purchase {
  padding: clamp(2.5rem, 6vw, 3.5rem);
  border-radius: var(--nv-radius-xl);
  background: linear-gradient(145deg, #faf5ff 0%, #fff 50%, var(--nv-surface-soft) 100%);
  border: 1px solid rgba(124, 58, 237, 0.12);
  box-shadow: var(--nv-shadow-md);
  text-align: center;
}

.nv-ed-purchase h2 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.035em;
}

.nv-ed-purchase-price {
  margin: 0.75rem 0 0;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--nv-brand);
}

.nv-ed-purchase .nv-btn--primary {
  margin-top: 1.75rem;
  padding: 1rem 2.5rem;
  font-size: 1.0625rem;
}

.nv-ed-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.25rem;
  margin-top: 1.75rem;
}

.nv-ed-trust span {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--nv-ink-secondary);
}

/* Upsell */
.nv-ed-upsell-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.nv-ed-upsell-card {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: var(--nv-radius-lg);
  background: #fff;
  border: 1px solid var(--nv-separator);
  box-shadow: var(--nv-shadow-sm);
  transition: box-shadow 0.3s, transform 0.3s;
}

.nv-ed-upsell-card:hover {
  box-shadow: var(--nv-shadow-md);
  transform: translateY(-3px);
}

.nv-ed-upsell-cover {
  flex-shrink: 0;
  width: 72px;
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.nv-ed-upsell-cover--2 {
  background: linear-gradient(160deg, #86efac, #22c55e);
}
.nv-ed-upsell-cover--3 {
  background: linear-gradient(160deg, #93c5fd, #3b82f6);
}
.nv-ed-upsell-cover--5 {
  background: linear-gradient(160deg, #67e8f9, #06b6d4);
}

.nv-ed-upsell-card h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.nv-ed-upsell-card p {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  color: var(--nv-ink-tertiary);
  line-height: 1.45;
}

.nv-ed-upsell-price {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--nv-brand);
}

/* Sticky mobile CTA */
.nv-ed-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  padding-bottom: max(0.875rem, env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--nv-separator);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.06);
}

@media (min-width: 900px) {
  .nv-ed-sticky {
    display: none;
  }

  .nv-ed {
    padding-bottom: 4rem;
  }
}

.nv-ed-sticky-price {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--nv-brand);
}

.nv-ed-sticky .nv-btn {
  padding: 0.75rem 1.25rem;
  font-size: 0.9375rem;
}

/* ── THANK YOU PAGE ── */
.nv-ed-thanks {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding-top: 6rem;
  padding-bottom: 3rem;
}

.nv-ed-thanks-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 480px;
  margin-inline: auto;
}

.nv-ed-thanks-icon {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  border-radius: 50%;
  background: var(--nv-brand-soft);
  margin-bottom: 1.5rem;
  animation: nv-ed-pop 0.6s var(--nv-ease-out);
}

@keyframes nv-ed-pop {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.nv-ed-thanks h1 {
  margin: 0;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.nv-ed-thanks-lead {
  margin: 1rem 0 0;
  font-size: 1.0625rem;
  color: var(--nv-ink-secondary);
  line-height: 1.55;
}

.nv-ed-thanks-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 320px;
  margin-top: 2rem;
}

.nv-ed-thanks-waitlist {
  width: 100%;
  max-width: 420px;
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--nv-separator);
}

.nv-ed-thanks-waitlist h2 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
}

.nv-ed-thanks-waitlist p {
  margin: 0.5rem 0 0;
  font-size: 0.9375rem;
  color: var(--nv-ink-tertiary);
}

.nv-ed-thanks-form {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-top: 1.25rem;
}

@media (min-width: 480px) {
  .nv-ed-thanks-form {
    flex-direction: row;
  }
}

.nv-ed-thanks-form input {
  flex: 1;
  padding: 0.875rem 1.125rem;
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid var(--nv-separator);
  border-radius: var(--nv-radius-pill);
  outline: none;
}

.nv-ed-thanks-form input:focus {
  border-color: var(--nv-brand-light);
  box-shadow: 0 0 0 4px var(--nv-brand-soft);
}
