/* ==========================================================================
   Book Detail Page - Editorial Redesign (Precise Stitch Alignment)
   Alignment: mirrors .nb-container — width: var(--tf-container-w),
   margin: 0 auto, padding-inline: var(--tf-container-pad).
   ========================================================================== */

:root {
  --sb-bg: var(--tf-bg);
  --sb-ink: #1b1c15;
  --sb-ink-soft: #4a4c44;
  --sb-accent: #173124;
  --sb-stone: #727973;
  --sb-bone: var(--tf-bg-mid);
  --sb-border: rgba(27, 28, 21, 0.1);
  --manrope: "Manrope", sans-serif;
  --newsreader: "Newsreader", serif;
}

/* ── Page wrapper: flush padding, allow inner container to control width ── */
.tf-page--book-detail {
  background: var(--sb-bg);
  min-height: 100vh;
  color: var(--sb-ink);
  padding-top: 10px;
  padding-bottom: 80px;
}

/* ── Inner container: exactly mirrors .nb-container alignment ── */
.detail-inner {
  width: var(--tf-public-w);
  max-width: var(--tf-public-max-w);
  margin: 0 auto;
  padding-inline: 0;
}

/* ------------------------------
   Breadcrumb Nav
   ------------------------------ */
.detail-nav {
  font-family: var(--manrope);
  font-weight: 800;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sb-stone);
  margin-bottom: 32px;
  padding-top: 16px;
}

.detail-nav a {
  color: var(--sb-ink);
  text-decoration: none;
  transition: color 180ms;
}

.detail-nav a:hover {
  color: var(--sb-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ------------------------------
   Hero Section (Dual Column Immersive)
   ------------------------------ */
.detail-hero-section {
  display: grid;
  grid-template-columns: clamp(280px, 36%, 440px) 1fr;
  gap: clamp(40px, 6vw, 80px);
  margin-bottom: 60px;
  align-items: start;
}

.hero-left {
  position: sticky;
  top: calc(var(--navbar-h) + 24px);
}

.hero-cover-frame {
  background: transparent;
  overflow: visible;
  box-shadow: none;
  padding: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.hero-cover-frame img {
  width: 100%;
  max-width: 360px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(22px 34px 40px rgba(27, 28, 21, 0.18));
  transition: filter 400ms var(--tf-ease);
}

.hero-cover-frame img:hover {
  filter: drop-shadow(28px 42px 52px rgba(27, 28, 21, 0.24));
}

.hero-right {
  display: flex;
  flex-direction: column;
  padding-top: 4px;
}

.hero-label {
  font-family: var(--manrope);
  font-weight: 800;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--sb-stone);
  display: block;
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--newsreader);
  font-size: clamp(32px, 4.5vw, 54px);
  font-weight: 500;
  line-height: 1.0;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
  color: var(--sb-ink);
}

.hero-subtitle {
  font-family: var(--newsreader);
  font-size: 1.5rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.35;
  color: var(--sb-ink-soft);
  margin-bottom: 32px;
  max-width: 680px;
}

.hero-description {
  margin-bottom: 32px;
}

.hero-description .hero-label {
  margin-bottom: 12px;
}

.description-text {
  font-family: var(--newsreader);
  font-size: 1.12rem;
  line-height: 1.65;
  color: var(--sb-ink-soft);
}

/* ── 3-Column Metadata Row ── */
.hero-metadata-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 4vw, 40px);
  margin-bottom: 40px;
  padding: 24px 0;
  border-top: 1px solid var(--sb-border);
  border-bottom: 1px solid var(--sb-border);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.meta-label {
  font-family: var(--manrope);
  font-weight: 800;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--sb-stone);
}

.meta-value {
  font-family: var(--newsreader);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--sb-ink);
  line-height: 1.2;
}

/* ── Hero Actions ── */
.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.hero-reactions-box {
  display: flex;
  align-items: center;
}

/* ── Divider between hero and body ── */
.detail-divider {
  border: none;
  border-top: 1.5px solid var(--sb-ink);
  margin: 0 0 52px;
}

/* ------------------------------
   CTA Buttons (Spring Easing + Archival Stamp)
   ------------------------------ */
.btn-primary {
  background: var(--sb-ink);
  color: white;
  padding: 16px 34px;
  font-family: var(--manrope);
  font-weight: 800;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 220ms var(--tf-ease-spring);
}

.btn-primary:hover {
  background: var(--sb-accent);
  transform: translateY(-2px);
  box-shadow:
    0 6px 16px rgba(23, 49, 36, 0.22),
    0 2px 4px  rgba(23, 49, 36, 0.12);
}

.btn-primary:active {
  transform: scale(0.96);
  transition-duration: 80ms;
  box-shadow: none;
}

.btn-secondary {
  background: transparent;
  color: var(--sb-ink);
  padding: 14px 28px;
  font-family: var(--manrope);
  font-weight: 800;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border: 1.5px solid var(--sb-border);
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
  transition: all 220ms var(--tf-ease-spring);
}

.btn-secondary:hover {
  background: color-mix(in oklab, var(--sb-ink) 6%, transparent);
  border-color: color-mix(in oklab, var(--sb-ink) 50%, transparent);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(27, 28, 21, 0.08);
}

/* ------------------------------
   Content Layout (Main + Sidebar)
   ------------------------------ */
.detail-content-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: clamp(40px, 5vw, 80px);
  align-items: start;
}

.content-main {
  min-width: 0;
}

.content-section {
  margin-bottom: 52px;
}

.section-heading {
  font-family: var(--newsreader);
  font-size: 1.55rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--sb-ink);
  padding-bottom: 8px;
  border-bottom: 1.5px solid var(--sb-ink);
  display: inline-block;
}

.content-body {
  font-family: var(--newsreader);
  font-size: 1.12rem;
  line-height: 1.65;
  color: var(--sb-ink-soft);
}

.scholarly-note {
  margin-top: 40px;
  padding: 28px 36px;
  background: var(--sb-bone);
  border-left: 4px solid var(--sb-ink);
  font-style: italic;
  font-family: var(--newsreader);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--sb-ink-soft);
}

/* ------------------------------
   Integrative Paths (Learning Paths + Series)
   ------------------------------ */
.integrative-paths-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 18px;
  margin-top: 8px;
}

.path-card-immersive {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: #ffffff;
  border: 1px solid var(--sb-border);
  overflow: hidden;
  transition: all 220ms var(--tf-ease-spring);
}

.path-card-immersive:hover {
  transform: translateY(-5px);
  border-color: rgba(27, 28, 21, 0.24);
  box-shadow:
    0 14px 32px rgba(27, 28, 21, 0.09),
    0 2px 6px rgba(27, 28, 21, 0.05);
}

.path-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--sb-bone);
}

.path-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 440ms var(--tf-ease);
}

.path-card-immersive:hover .path-media img {
  transform: scale(1.06);
}

.path-info {
  padding: 14px 16px;
  border-top: 1.5px solid var(--sb-ink);
}

.path-title {
  font-family: var(--newsreader);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--sb-ink);
  margin: 0;
}

/* ------------------------------
   Reviews Container
   ------------------------------ */
.reviews-container {
  /* inherits global comments.css */
}

/* ------------------------------
   Sidebar
   ------------------------------ */
.content-sidebar {
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: sticky;
  top: calc(var(--navbar-h) + 24px);
}

.sidebar-block {
  background: #ffffff;
  border: 1px solid var(--sb-border);
  padding: 24px;
  box-shadow: 0 4px 16px rgba(27, 28, 21, 0.03);
}

.sidebar-title {
  font-family: var(--manrope);
  font-weight: 800;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--sb-stone);
  margin-bottom: 20px;
  display: block;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--sb-border);
}

.metadata-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.metadata-list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid var(--sb-border);
}

.metadata-list li:first-child {
  padding-top: 0;
}

.metadata-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.metadata-list .lbl {
  font-family: var(--manrope);
  font-weight: 800;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--sb-stone);
}

.metadata-list .val {
  font-family: var(--newsreader);
  font-size: 1.08rem;
  font-weight: 500;
  color: var(--sb-ink);
  line-height: 1.2;
}

/* ------------------------------
   Endorsements (Notable Minds)
   ------------------------------ */
.endorsers {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.endorser {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  background: var(--sb-bone);
  border: 1px solid var(--sb-border);
  text-decoration: none;
  color: inherit;
  transition: all 200ms var(--tf-ease-spring);
}

.endorser:hover {
  background: #ffffff;
  border-color: rgba(27, 28, 21, 0.24);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(27, 28, 21, 0.06);
}

.endorser-name {
  font-family: var(--newsreader);
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--sb-ink);
  line-height: 1.2;
}

.endorser-status {
  font-family: var(--manrope);
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sb-stone);
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 1100px) {
  .detail-hero-section {
    grid-template-columns: clamp(220px, 32%, 340px) 1fr;
    gap: 48px;
  }

  .detail-content-layout {
    grid-template-columns: 1fr 260px;
  }
}

@media (max-width: 900px) {
  .detail-hero-section {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-left {
    position: static;
    display: flex;
    justify-content: center;
  }

  .hero-cover-frame img {
    max-width: min(280px, 70vw);
  }

  .detail-content-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .content-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .sidebar-block {
    flex: 1 1 240px;
  }
}

@media (max-width: 640px) {
  .hero-metadata-row {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    text-align: center;
    padding: 14px 20px;
  }

  .integrative-paths-grid {
    grid-template-columns: 1fr;
  }

  .content-sidebar {
    flex-direction: column;
  }

  .sidebar-block {
    flex: none;
  }
}

@media (max-width: 420px) {
  .hero-metadata-row {
    grid-template-columns: 1fr;
  }
}
