/* ========================================================
   EBG PAGE — Earn Before You Graduate detail page
   ======================================================== */

/* ---------- BOOK HERO ---------- */
.book-hero {
  padding: 3rem 0 2rem;
  min-height: 75vh;
  display: flex;
  align-items: center;
}
.book-hero-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 4rem;
  align-items: center;
}

/* Cover stage */
.book-hero-visual {
  display: flex;
  justify-content: center;
}
.cover-stage {
  position: relative;
  display: inline-block;
}
.book-cover {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 18px;
  box-shadow:
    0 30px 60px rgba(44, 40, 34, 0.25),
    0 10px 20px rgba(44, 40, 34, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.08);
  transition: transform 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
.book-cover:hover {
  transform: translateY(-8px) rotate(-1.5deg);
}
.cover-badge {
  position: absolute;
  top: -14px;
  right: -14px;
  background: var(--accent-gradient);
  color: #fff;
  font-family: var(--ff-mono);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 40px;
  letter-spacing: 0.05em;
  box-shadow: 0 10px 25px rgba(201, 126, 90, 0.4);
  animation: pulse 2.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Hero content */
.book-title {
  font-family: var(--ff-serif);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0.5rem 0 1rem;
}
.book-title em {
  font-style: italic;
  color: var(--terracotta);
}
.book-subtitle {
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--deep-teal);
  margin-bottom: 1.2rem;
  line-height: 1.4;
}
.book-intro {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 1.8rem;
}

/* Price block */
.price-block {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding: 1.2rem 1.5rem;
  background: rgba(200, 135, 61, 0.08);
  border-left: 3px solid var(--soft-amber);
  border-radius: 12px;
  flex-wrap: wrap;
}
.price-main {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}
.price-from {
  font-family: var(--ff-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.price-amount {
  font-family: var(--ff-serif);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.price-format {
  font-family: var(--ff-mono);
  font-size: 0.8rem;
  color: var(--deep-teal);
  padding: 0.2rem 0.6rem;
  background: rgba(79, 139, 140, 0.15);
  border-radius: 20px;
  align-self: center;
}
.price-note {
  font-family: var(--ff-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* Buy actions */
.buy-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.btn-lg {
  padding: 16px 34px;
  font-size: 1.05rem;
}

/* ---------- METADATA GRID ---------- */
.metadata-section {
  padding-top: 2rem;
}
.section-heading {
  font-family: var(--ff-serif);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 600;
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}
.section-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin-bottom: 2.5rem;
}
.metadata-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
  margin-top: 1.5rem;
}
.meta-card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: 18px;
  padding: 1.4rem 1.2rem;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.meta-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 30px rgba(44, 40, 34, 0.08);
  border-color: rgba(79, 139, 140, 0.3);
}
.meta-icon {
  font-size: 1.8rem;
  margin-bottom: 0.6rem;
}
.meta-label {
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.meta-value {
  font-family: var(--ff-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.meta-sub {
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* ---------- CHAPTERS LIST ---------- */
.chapters-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1.5rem;
}
.chapter-item {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.chapter-item[open] {
  border-color: rgba(79, 139, 140, 0.35);
  box-shadow: 0 8px 20px rgba(44, 40, 34, 0.05);
}
.chapter-item summary {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.2rem;
  align-items: center;
  padding: 1.1rem 1.5rem;
  cursor: pointer;
  list-style: none;
  transition: background 0.2s;
}
.chapter-item summary::-webkit-details-marker { display: none; }
.chapter-item summary:hover {
  background: rgba(200, 135, 61, 0.05);
}
.chapter-num {
  font-family: var(--ff-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--terracotta);
  letter-spacing: 0.05em;
  min-width: 50px;
}
.chapter-title {
  font-family: var(--ff-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}
.chapter-meta {
  font-family: var(--ff-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}
.chapter-body {
  padding: 0 1.5rem 1.3rem 4.5rem;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--text-muted);
  border-top: 1px dashed var(--border-light);
  padding-top: 1rem;
  margin-top: -0.2rem;
}

/* ---------- AUDIENCE GRID ---------- */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
  margin-top: 1.5rem;
}
.audience-card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 1.6rem;
  transition: transform 0.25s ease;
}
.audience-card:hover {
  transform: translateY(-4px);
}
.audience-card.yes {
  border-left: 4px solid var(--deep-teal);
}
.audience-card.no {
  border-left: 4px solid var(--terracotta);
  opacity: 0.85;
}
.audience-icon {
  font-family: var(--ff-serif);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}
.audience-card.yes .audience-icon { color: var(--deep-teal); }
.audience-card.no .audience-icon { color: var(--terracotta); }
.audience-card h3 {
  font-family: var(--ff-serif);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.audience-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ---------- AUTHOR'S NOTE ---------- */
.authors-note-section {
  padding: 3rem 0;
}
.authors-note {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: 28px;
  padding: 3rem;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: flex-start;
}
.authors-note::before {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(200, 135, 61, 0.1), transparent 70%);
  pointer-events: none;
}
.note-quote {
  font-family: var(--ff-serif);
  font-size: 8rem;
  line-height: 0.8;
  color: var(--terracotta);
  opacity: 0.3;
  margin-top: -1rem;
}
.note-content h2 {
  font-family: var(--ff-serif);
  font-size: 1.8rem;
  margin: 0.5rem 0 1rem;
}
.note-content p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.note-signature {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.note-signature strong {
  font-family: var(--ff-serif);
  font-size: 1.1rem;
  color: var(--text-primary);
}
.note-signature span {
  font-family: var(--ff-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* ---------- PREVIEW CARD ---------- */
.preview-card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 2.5rem;
  margin-top: 1.5rem;
  position: relative;
  border-left: 4px solid var(--soft-amber);
}
.preview-chapter-label {
  font-family: var(--ff-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 0.6rem;
}
.preview-title {
  font-family: var(--ff-serif);
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.preview-text {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  font-family: var(--ff-serif);
  font-style: italic;
}

/* ---------- FORMAT GRID ---------- */
.buy-section {
  background: linear-gradient(180deg, transparent, rgba(200, 135, 61, 0.04));
  padding: 3rem 0;
}
.format-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.format-card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: 22px;
  padding: 2rem 1.8rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s;
  position: relative;
}
.format-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(44, 40, 34, 0.1);
}
.format-card.featured {
  border: 2px solid var(--deep-teal);
  box-shadow: 0 15px 40px rgba(45, 107, 108, 0.15);
}
.format-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--deep-teal);
  color: #fff;
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: 30px;
  white-space: nowrap;
}
.format-icon {
  font-size: 2.5rem;
  margin-bottom: 0.8rem;
}
.format-card h3 {
  font-family: var(--ff-serif);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.format-price {
  font-family: var(--ff-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.2rem;
  letter-spacing: -0.02em;
}
.format-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.format-features li {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.format-buy-btn {
  width: 100%;
  justify-content: center;
}

/* ---------- TESTIMONIALS ---------- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.testimonial-card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: 22px;
  padding: 2rem 1.8rem;
  position: relative;
  transition: transform 0.3s ease;
}
.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(44, 40, 34, 0.1);
}
.quote-mark {
  font-family: var(--ff-serif);
  font-size: 4rem;
  line-height: 0.8;
  color: var(--terracotta);
  opacity: 0.4;
  position: absolute;
  top: 1rem;
  right: 1.5rem;
}
.testimonial-text {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  font-style: italic;
}
.testimonial-author {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}
.testimonial-author strong {
  font-family: var(--ff-serif);
  font-size: 1rem;
}
.testimonial-author span {
  font-family: var(--ff-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ---------- FAQ ---------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1.5rem;
  max-width: 820px;
}
.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.faq-item[open] {
  border-color: rgba(200, 135, 61, 0.35);
}
.faq-item summary {
  padding: 1.1rem 1.5rem;
  cursor: pointer;
  list-style: none;
  font-family: var(--ff-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--ff-mono);
  font-size: 1.4rem;
  color: var(--terracotta);
  transition: transform 0.3s;
}
.faq-item[open] summary::after {
  transform: rotate(45deg);
}
.faq-item summary:hover {
  background: rgba(200, 135, 61, 0.05);
}
.faq-body {
  padding: 0 1.5rem 1.3rem;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--text-muted);
  border-top: 1px dashed var(--border-light);
  padding-top: 1rem;
}

/* ---------- RELATED BOOKS ---------- */
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.related-card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 1.5rem;
  text-align: center;
  text-decoration: none;
  color: var(--text-primary);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.related-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(44, 40, 34, 0.1);
  border-color: rgba(79, 139, 140, 0.3);
}
.related-card img {
  width: 100%;
  max-width: 160px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 12px 25px rgba(44, 40, 34, 0.15);
  margin-bottom: 1rem;
}
.related-card h3 {
  font-family: var(--ff-serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.related-price {
  font-family: var(--ff-mono);
  font-size: 0.8rem;
  color: var(--deep-teal);
  letter-spacing: 0.03em;
}
.related-all {
  justify-content: center;
  background: rgba(79, 139, 140, 0.06);
  border-color: rgba(79, 139, 140, 0.2);
}
.related-all-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* ---------- STICKY BUY BAR (MOBILE) ---------- */
.sticky-buy-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(250, 248, 245, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-light);
  padding: 0.8rem 1.2rem;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  z-index: 90;
  box-shadow: 0 -10px 30px rgba(44, 40, 34, 0.08);
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.sticky-buy-bar.show {
  transform: translateY(0);
}
.sticky-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.sticky-info strong {
  font-family: var(--ff-serif);
  font-size: 0.95rem;
}
.sticky-info span {
  font-family: var(--ff-mono);
  font-size: 0.75rem;
  color: var(--deep-teal);
}
.sticky-buy-bar .btn-sm {
  padding: 10px 20px;
  font-size: 0.85rem;
  width: auto;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .book-hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }
  .book-hero-visual { order: -1; }
  .price-block { justify-content: center; }
  .buy-actions { justify-content: center; }
  .trust-row { justify-content: center; }
  .metadata-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .audience-grid,
  .format-grid,
  .testimonials-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }
  .authors-note {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 2rem 1.5rem;
  }
  .note-quote {
    font-size: 5rem;
    margin: 0 auto;
  }
  .chapter-item summary {
    grid-template-columns: auto 1fr;
    gap: 0.8rem;
  }
  .chapter-meta {
    grid-column: 1 / -1;
    justify-self: start;
    margin-top: -0.3rem;
  }
  .chapter-body {
    padding-left: 1.5rem;
  }
  .sticky-buy-bar {
    display: flex;
  }
  body {
    padding-bottom: 80px;
  }
}

@media (max-width: 600px) {
  .book-hero {
    padding: 2rem 0 1rem;
    min-height: auto;
  }
  .book-cover {
    max-width: 260px;
  }
  .book-title {
    font-size: 2rem;
  }
  .price-amount {
    font-size: 2rem;
  }
  .metadata-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }
  .meta-card {
    padding: 1rem 0.8rem;
  }
  .meta-value {
    font-size: 1.2rem;
  }
  .preview-card,
  .format-card {
    padding: 1.5rem;
  }
  .authors-note {
    padding: 1.5rem;
  }
  .btn-lg {
    width: 100%;
    justify-content: center;
  }
}