/* ============================================================
   SERIES PAGE STYLES
   ============================================================ */

.page-header--series {
  background: linear-gradient(135deg, var(--plum) 0%, var(--bg-deep) 50%, var(--teal) 100%);
  min-height: 280px;
}

.series-header__sub {
  color: var(--body-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-top: 0.75rem;
  max-width: 680px;
}

.series-intro {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  padding-bottom: 1rem;
}

.series-intro__text {
  font-size: 1.2rem;
  color: var(--body-muted);
  line-height: 1.8;
}

/* ---- Book Entry ------------------------------------------- */
.book-entry {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 4rem;
  align-items: start;
  margin-bottom: 1rem;
}

.book-entry:nth-child(even) {
  direction: rtl;
}
.book-entry:nth-child(even) > * {
  direction: ltr;
}

.book-entry__cover {
  position: relative;
  width: 280px;
  flex-shrink: 0;
}

.book-entry__cover-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(ellipse at center, rgba(214,149,214,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.book-entry__img {
  width: 100%;
  max-width: 250px;
  display: block;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 30px rgba(240,182,255,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-entry__img:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 70px rgba(0,0,0,0.6), 0 0 50px rgba(240,182,255,0.12);
}

.book-entry__number {
  position: absolute;
  top: -1rem;
  right: -1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--sky);
  border: 1px solid rgba(102,154,202,0.3);
  padding: 0.25rem 0.5rem;
  background: var(--bg-deep);
  letter-spacing: 0.1em;
}

/* Cover placeholder for upcoming books */
.book-entry__cover-placeholder {
  width: 100%;
  aspect-ratio: 2/3;
  background: linear-gradient(135deg, rgba(56,33,89,0.5) 0%, rgba(2,56,92,0.3) 100%);
  border: 1px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.book-entry__cover-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 20px,
    rgba(102,154,202,0.03) 20px,
    rgba(102,154,202,0.03) 21px
  );
}

.book-entry__placeholder-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.book-entry__title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  margin-bottom: 0.5rem;
}

.book-entry__blurb {
  margin: 1.25rem 0;
  font-size: 1.05rem;
  line-height: 1.8;
}

.book-entry__meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.book-entry__links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Upcoming book opacity */
.book-entry--upcoming {
  opacity: 0.75;
}

.book-entry--upcoming:hover {
  opacity: 1;
  transition: opacity 0.3s;
}

/* ---- Responsive ------------------------------------------- */
@media (max-width: 900px) {
  .book-entry {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .book-entry:nth-child(even) {
    direction: ltr;
  }

  .book-entry__cover {
    max-width: 80%;
    margin: 0 auto;
  }

  .book-entry__links,
  .book-entry__meta {
    justify-content: center;
  }

  .buy-grid {
    margin-left: auto;
    margin-right: auto;
  }
}

/* ---- Buy buttons ------------------------------------------ */
.buy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin-top: 1.5rem;
  max-width: 480px;
}

.btn--buy {
  display: block;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  padding: 0.6rem 0.5rem;
  border-radius: 2px;
  border: 1px solid var(--border-glow);
  color: var(--lilac);
  background: rgba(240,182,255,0.05);
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn--buy:hover {
  background: rgba(240,182,255,0.12);
  border-color: var(--lilac);
  color: var(--lilac);
  transform: translateY(-1px);
}

.btn--buy-other {
  border-color: rgba(102,154,202,0.4);
  color: var(--sky);
  background: rgba(102,154,202,0.05);
}

.btn--buy-other:hover {
  background: rgba(102,154,202,0.12);
  border-color: var(--sky);
  color: var(--sky);
}

@media (max-width: 500px) {
  .buy-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
