/* ============================================================
   MARYAM RAFIEE — BOOKS PAGE (books.html) STYLES
   Loaded together with base.css.
   ============================================================ */

.books-page-header {
  background: var(--cream); padding: 4rem 2rem 3.5rem;
  border-bottom: 1px solid var(--border);
}
.books-page-header-inner { max-width: 1100px; margin: 0 auto; }

.books-container { max-width: 1100px; margin: 0 auto; padding: 0 2rem 5rem; }

.book-entry {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 5rem; align-items: start;
  padding: 5rem 0; border-bottom: 1px solid var(--border);
}
.book-entry:last-child { border-bottom: none; }
.book-cover-col { display: flex; align-items: center; justify-content: center; }
.book-entry-cover {
  width: 100%; max-width: 300px; border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18); display: block;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.book-entry-cover:hover {
  transform: translateY(-6px) rotate(-1deg);
  box-shadow: 0 30px 70px rgba(0,0,0,0.22);
}
.book-entry-body { display: flex; flex-direction: column; }
.book-entry.reverse .book-cover-col { order: 2; }
.book-entry.reverse .book-entry-body { order: 1; }

.book-status {
  display: inline-block; font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.3rem 0.85rem; border-radius: 999px;
  margin-bottom: 1.1rem; width: fit-content;
}
.book-status.published { background: rgba(42,171,232,0.12); color: var(--accent-dark); }
.book-status.upcoming  { background: rgba(232,228,219,0.9); color: var(--text-mid); }

.book-entry-title {
  font-family: var(--serif); font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700; letter-spacing: -0.02em; color: var(--text-dark);
  line-height: 1.1; margin-bottom: 0.4rem;
}
.book-entry-subtitle { font-size: 1rem; color: var(--text-light); font-style: italic; margin-bottom: 1.5rem; }
.book-entry-desc { font-size: 0.975rem; line-height: 1.85; color: var(--text-mid); margin-bottom: 0.9rem; }
.book-entry-quote {
  border-left: 3px solid var(--accent); padding-left: 1.1rem;
  font-style: italic; color: var(--text-mid); margin: 1.5rem 0;
  font-size: 0.95rem; line-height: 1.7;
}
.book-entry-quote cite {
  display: block; margin-top: 0.4rem; font-size: 0.72rem; font-style: normal;
  font-weight: 700; color: var(--accent-text); text-transform: uppercase; letter-spacing: 0.1em;
}

/* Purchase buttons — equal width, centered as a group. With 2 buttons
   (Dear Baba: UNO Press + Amazon) they split 50/50. With 3 buttons
   (Was It Worth It: Indigo + Amazon + Les libraires) two sit side by
   side and the third wraps to fill the full row beneath them — same
   pattern as the homepage's featured book card. */
.book-entry-actions {
  display: flex; flex-wrap: wrap; gap: 0.65rem; margin-top: 1.75rem;
  justify-content: center;
}
.book-entry-actions > .btn-retailer,
.book-entry-actions > .btn-dropdown-wrap {
  flex: 1 1 140px;
}
.book-entry-actions .btn-dropdown-wrap .btn-retailer {
  width: 100%; justify-content: center;
}

/* Amazon dropdown */
.btn-dropdown-wrap { position: relative; display: inline-block; }
.btn-dropdown-wrap .btn-retailer { display: flex; align-items: center; gap: 0.4rem; }
.btn-dropdown-wrap .btn-retailer::after {
  content: ''; display: inline-block; width: 0; height: 0;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid currentColor; margin-top: 1px; flex-shrink: 0;
}
.amazon-dropdown {
  display: none; position: absolute; bottom: calc(100% + 6px); left: 0;
  background: var(--warm-white); border: 1px solid var(--border);
  border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,0.10);
  min-width: 160px; z-index: 20; overflow: hidden;
}
.btn-dropdown-wrap:hover .amazon-dropdown,
.btn-dropdown-wrap:focus-within .amazon-dropdown,
.btn-dropdown-wrap.open .amazon-dropdown { display: block; }
.amazon-dropdown a {
  display: block; padding: 0.65rem 1rem; font-family: var(--sans);
  font-size: 0.82rem; font-weight: 600; color: var(--text-dark);
  transition: background 0.15s, color 0.15s; border-bottom: 1px solid var(--border);
}
.amazon-dropdown a:last-child { border-bottom: none; }
.amazon-dropdown a:hover { background: var(--accent); color: #fff; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .book-entry { grid-template-columns: 1fr; gap: 2.5rem; padding: 3.5rem 0; }
  .book-entry.reverse .book-cover-col { order: 0; }
  .book-entry.reverse .book-entry-body { order: 1; }
  .book-entry-cover { max-width: 200px; margin: 0 auto; }
}
@media (max-width: 600px) {
  .books-page-header { padding: 2.5rem 1.25rem 2rem; }
  .books-container { padding: 0 1.25rem 3.5rem; }
}
