/* /books/ and /books/<slug>/ (v6 layout, all-blue palette). Loaded after site-pages.css. */

/* ── Hero: the book stack on a dark band (white text only on the dark scrim) ── */
main.page > section.bk-hero {
  position: relative;
  padding: 0;
  background: #1c1c1b;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.bk-hero img {
  display: block;
  width: 100%;
  max-width: 1600px;
  height: auto;
  margin: 24px auto 0;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}
.bk-hero-text { order: -1; padding: 72px max(80px, calc((100% - 1120px) / 2)) 0; position: relative; z-index: 2; }
.bk-hero-text .section-eyebrow, .bk-hero-text .section-title, .bk-hero-text .section-body { color: #fff; }
.bk-hero-text .section-eyebrow::before { background: #fff; }
.bk-hero-text .section-body { opacity: 0.88; max-width: 640px; }
@media (min-width: 1340px) {
  .bk-hero-text { position: absolute; left: 0; top: 64px; padding-top: 0; }
  .bk-hero img { margin: 0 auto; }
  main.page > section.bk-hero::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(90deg, rgba(14,18,26,.72) 0%, rgba(14,18,26,.38) 34%, rgba(14,18,26,0) 55%);
  }
}

/* ── Filters + grid ── */
.bk-block { padding-block: 48px 96px; }
.bk-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.bk-chips { display: flex; flex-wrap: wrap; gap: 12px; }
.bk-chip {
  font-size: 12.5px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 9px 18px; border: 0.5px solid var(--border-strong); color: var(--text-mid); text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.bk-chip:hover { color: var(--text); background: rgba(30,42,58,0.04); }
.bk-chip.is-on { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; }
.bk-count {
  margin-left: auto; font-family: 'EB Garamond', Georgia, serif; font-variant-numeric: lining-nums;
  font-size: 15px; letter-spacing: 0.08em; color: var(--text-mid);
}
.bk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 48px 32px; margin-top: 44px; }
.bk-card { display: flex; flex-direction: column; text-decoration: none; color: var(--text); }
.bk-cover {
  aspect-ratio: 3 / 4; background: var(--brand-tint); display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px; overflow: hidden; transition: transform 0.25s, box-shadow 0.25s;
}
.bk-cover img { width: 100%; height: 100%; object-fit: contain; display: block; }
.bk-cover:not(.bk-nocover) { background: none; }
.bk-nocover { border: 0.5px solid var(--border-strong); }
.bk-fb { font-family: 'EB Garamond', Georgia, serif; font-size: 24px; line-height: 1.15; text-align: center; padding: 24px; }
.bk-card:hover .bk-cover, .bk-card:focus-visible .bk-cover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(30,42,58,0.14); }
.bk-t { font-family: 'EB Garamond', Georgia, serif; font-size: 23px; line-height: 1.15; }
.bk-s { font-size: 15px; color: var(--text-mid); margin-top: 4px; }
.bk-a { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brand-deep); margin-top: 10px; }
.bk-p { font-size: 15px; color: var(--text-mid); margin-top: 6px; }
.bk-empty { margin-top: 32px; }

/* ── Detail ── */
.bk-detail-section { padding-block: 56px 96px; }
.bk-crumb { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-mid); margin-bottom: 32px; }
.bk-crumb a { color: inherit; }
.bk-detail { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 56px; align-items: start; }
.bk-detail .bk-cover { margin: 0; }
.bk-title {
  font-family: 'EB Garamond', Georgia, serif; font-weight: 400; font-size: clamp(34px, 4vw, 52px); line-height: 1.1;
  color: var(--text); margin: 8px 0 8px;
}
.bk-ds { font-family: 'EB Garamond', Georgia, serif; font-style: italic; font-size: 20px; color: var(--text-mid); }
.bk-da { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-mid); margin: 12px 0 24px; }
.bk-desc p { margin-bottom: 14px; font-size: 17px; line-height: 1.8; color: var(--text); max-width: 680px; }
.bk-price {
  margin: 24px 0; padding: 18px 0; border-top: 0.5px solid var(--border); border-bottom: 0.5px solid var(--border);
  font-family: 'EB Garamond', Georgia, serif; font-variant-numeric: lining-nums; font-size: 22px;
}
/* No MYR price yet: a visible placeholder (staging shows gaps, never hides them). */
.bk-p.is-unset, .bk-price.is-unset { color: var(--text-mid); font-style: italic; }
.bk-p.is-unset { display: inline-block; padding: 2px 8px; border: 1px dashed var(--border-strong); border-radius: 4px; font-size: 13px; }
.bk-buy { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 24px; }
.bk-buy form { margin: 0; }
.bk-note { margin-top: 16px; font-size: 14px; color: var(--text-mid); }
.bk-back { margin-top: 56px; }

@media (max-width: 800px) {
  .bk-hero-text { padding: 48px 24px 0; }
  .bk-count { margin-left: 0; width: 100%; }
  .bk-detail { grid-template-columns: 1fr; gap: 32px; }
  .bk-detail .bk-cover { max-width: 260px; }
  .bk-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 36px 20px; }
}
