/* Phoenix Multimedia — Book detail page (Phoenix × Write On! system) */

/* ---- hero ---- */
.book-hero{ position:relative; background:var(--cream); border-bottom:var(--bw) solid var(--ink); overflow:hidden; }
.book-hero::before{ content:""; position:absolute; inset:0; opacity:.5; pointer-events:none;
  background-image:
    radial-gradient(circle at 10% 16%,transparent 7px,var(--coral) 8px,transparent 9px),
    radial-gradient(circle at 88% 14%,transparent 6px,var(--teal-soft) 7px,transparent 8px),
    radial-gradient(circle at 92% 78%,transparent 9px,var(--peach) 10px,transparent 11px),
    radial-gradient(circle at 6% 80%,transparent 7px,var(--sky) 8px,transparent 9px);
  background-size:240px 240px,300px 300px,260px 260px,280px 280px; }
.book-hero .wrap{ position:relative; z-index:1; padding-bottom:44px; }
.book-hero-content{ display:grid; grid-template-columns:300px 1fr; gap:44px; align-items:center; padding-top:26px; }
.book-hero-cover-wrapper{ position:relative; }
.book-hero-cover{ width:100%; border:var(--bw-bold) solid var(--ink); border-radius:10px;
  box-shadow:var(--sh-pop); transform:rotate(-3deg); background:var(--paper); }
.book-hero-info{ min-width:0; }
.book-hero-title{ font-family:var(--f-display); text-transform:uppercase; line-height:.92;
  font-size:clamp(34px,4.6vw,60px); margin:14px 0 8px; color:var(--ink); }
.book-hero-subtitle{ font-size:19px; font-weight:700; color:var(--ink-soft); margin-bottom:18px; }
.book-hero-meta{ display:flex; flex-wrap:wrap; gap:10px; margin-bottom:18px; }
.book-meta-item{ display:inline-flex; align-items:center; gap:.5em; font-weight:800; font-size:14px;
  border:var(--bw-hair) solid var(--ink); border-radius:var(--r-pill); background:var(--paper); box-shadow:var(--sh-chip);
  padding:.4em .9em; }
.meta-icon{ font-size:15px; }
.book-hero-categories{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:22px; }
.category-tag{ font-family:var(--f-comic); text-transform:uppercase; letter-spacing:.04em; font-size:12px;
  color:var(--ink); background:var(--cream-deep); border:var(--bw-hair) solid var(--ink); border-radius:var(--r-pill);
  padding:.34em .8em .2em; }
.category-tag-primary{ background:var(--gold); }
.book-hero-actions{ display:flex; flex-wrap:wrap; align-items:center; gap:14px; }
.btn-hero-primary,.btn-hero-secondary{ display:inline-flex; align-items:center; gap:.5em; cursor:pointer;
  font-family:var(--f-body); font-weight:800; font-size:16px; padding:.78em 1.5em;
  border:var(--bw) solid var(--ink); border-radius:var(--r-pill); box-shadow:var(--sh-card);
  transition:transform var(--dur) var(--ease),box-shadow var(--dur) var(--ease); }
.btn-hero-primary{ background:var(--ember); color:var(--on-ember); }
.btn-hero-secondary{ background:var(--paper); color:var(--ink); }
.btn-hero-primary:hover,.btn-hero-secondary:hover{ transform:translate(-2px,-3px); box-shadow:var(--sh-hover); }
.hero-more-stores{ display:flex; align-items:center; gap:8px; }
.more-stores-label{ font-family:var(--f-comic); text-transform:uppercase; font-size:11px; letter-spacing:.05em; color:var(--ink-soft); }
.hero-store-links{ display:flex; gap:8px; }
.store-link{ display:inline-flex; width:40px; height:40px; align-items:center; justify-content:center;
  border:var(--bw-hair) solid var(--ink); border-radius:var(--r-sm); background:var(--paper); box-shadow:var(--sh-chip); color:var(--ink); }

/* ---- layout ---- */
main{ background:var(--cream); }
.book-detail-wrapper{ display:grid; grid-template-columns:320px 1fr; gap:40px; padding:48px 0 72px; align-items:start; }

/* ---- sticky purchase card ---- */
.sticky-sidebar{ position:sticky; top:96px; }
.sticky-purchase-card{ border:var(--bw) solid var(--ink); border-radius:var(--r-lg); background:var(--paper);
  box-shadow:var(--sh-pop); padding:22px; }
.sidebar-cover{ width:100%; border:var(--bw) solid var(--ink); border-radius:8px; box-shadow:var(--sh-card); margin-bottom:16px; }
.sidebar-price{ font-family:var(--f-display); font-size:38px; color:var(--flame); line-height:1; margin-bottom:14px; }
.sidebar-buy-buttons{ display:flex; flex-direction:column; gap:10px; }
.btn-block{ display:flex; align-items:center; justify-content:center; gap:.5em; width:100%; cursor:pointer;
  font-family:var(--f-body); font-weight:800; font-size:15px; padding:.8em 1.1em; text-align:center;
  border:var(--bw) solid var(--ink); border-radius:var(--r-pill); box-shadow:var(--sh-card);
  transition:transform var(--dur) var(--ease),box-shadow var(--dur) var(--ease); }
.btn-block.btn-primary{ background:var(--gold); color:var(--ink); }
.btn-block.btn-secondary{ background:var(--paper); color:var(--ink); }
.btn-block:hover{ transform:translate(-2px,-3px); box-shadow:var(--sh-hover); }
.platform-icon{ width:18px; height:18px; }
.sidebar-divider{ height:var(--bw-hair); background:var(--cream-shade); margin:18px 0; border-radius:2px; }
.sidebar-quick-info{ display:flex; flex-direction:column; gap:10px; }
.quick-info-item{ display:flex; justify-content:space-between; align-items:center; font-size:14px; }
.quick-info-label{ font-family:var(--f-comic); text-transform:uppercase; letter-spacing:.04em; font-size:11px; color:var(--ink-soft); }
.quick-info-value{ font-weight:800; }

/* ---- tabs ---- */
.book-tabs{ display:flex; gap:8px; margin-bottom:24px; flex-wrap:wrap; }
.book-tab{ font-family:var(--f-body); font-weight:800; font-size:15px; cursor:pointer; padding:.6em 1.2em;
  border:var(--bw) solid var(--ink); border-radius:var(--r-pill); background:var(--paper); box-shadow:var(--sh-chip);
  transition:transform var(--dur) var(--ease),box-shadow var(--dur) var(--ease); }
.book-tab:hover{ transform:translate(-1px,-2px); box-shadow:var(--sh-card); }
.book-tab.active{ background:var(--ink); color:var(--cream); }
.book-tab-content{ display:none; }
.book-tab-content.active{ display:block; }
.content-section{ border:var(--bw) solid var(--ink); border-radius:var(--r-lg); background:var(--paper);
  box-shadow:var(--sh-card); padding:30px 32px; margin-bottom:24px; }
.content-section > h2{ font-family:var(--f-display); text-transform:uppercase; font-size:28px; margin-bottom:16px; }
.content-section > h2 a{ color:var(--flame); }
.book-description-text{ font-size:17px; line-height:1.7; color:var(--ink); }
.book-description-text p{ margin-bottom:1em; }

/* ---- features ---- */
.features-showcase{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.feature-card{ display:flex; align-items:flex-start; gap:12px; border:var(--bw-hair) solid var(--ink); border-radius:var(--r-md);
  background:var(--cream); box-shadow:var(--sh-chip); padding:16px 18px; }
.feature-icon{ font-size:24px; line-height:1; flex-shrink:0; }
.feature-text{ font-size:15px; font-weight:700; color:var(--ink); line-height:1.45; }

/* ---- details ---- */
.details-grid{ display:flex; flex-direction:column; gap:0; }
.detail-item{ display:grid; grid-template-columns:180px 1fr; gap:16px; padding:14px 0; border-bottom:var(--bw-hair) dashed var(--cream-shade); }
.detail-item:last-child{ border-bottom:0; }
.detail-label{ font-family:var(--f-comic); text-transform:uppercase; letter-spacing:.04em; font-size:12px; color:var(--ink-soft); }
.detail-value{ font-weight:700; font-size:15px; }
.detail-value a{ color:var(--crimson); }

/* override inline link colors injected by book-detail.js */
.content-section h2 a,.book-description-text a,.detail-value a,.carousel-book-info a{ color:var(--crimson) !important; text-decoration:underline; text-decoration-color:var(--ember) !important; text-underline-offset:2px; }

/* ---- carousels (more in series / related) ---- */
.series-carousel,.related-books-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:16px; }
.carousel-book-card{ display:flex; flex-direction:column; border:var(--bw) solid var(--ink); border-radius:var(--r-md);
  background:var(--paper); box-shadow:var(--sh-card); overflow:hidden;
  transition:transform var(--dur) var(--ease),box-shadow var(--dur) var(--ease); text-decoration:none; }
.carousel-book-card:hover{ transform:translate(-2px,-3px); box-shadow:var(--sh-hover); }
.carousel-book-cover{ width:100%; aspect-ratio:1/1.32; object-fit:cover; border-bottom:var(--bw) solid var(--ink); background:var(--cream-shade); }
.carousel-book-info{ padding:12px 14px; }
.carousel-book-title{ font-family:var(--f-body); font-weight:900; font-size:14px; line-height:1.2; color:var(--ink); }

/* ---- responsive ---- */
@media (max-width:960px){
  .book-hero-content{ grid-template-columns:200px 1fr; gap:28px; }
  .book-detail-wrapper{ grid-template-columns:1fr; }
  .sticky-sidebar{ position:static; }
  .sticky-purchase-card{ max-width:420px; }
  .series-carousel,.related-books-grid{ grid-template-columns:repeat(3,1fr); }
}
@media (max-width:560px){
  .book-hero-content{ grid-template-columns:1fr; text-align:center; }
  .book-hero-cover{ max-width:220px; margin:0 auto; }
  .book-hero-meta,.book-hero-categories,.book-hero-actions{ justify-content:center; }
  .features-showcase{ grid-template-columns:1fr; }
  .series-carousel,.related-books-grid{ grid-template-columns:1fr 1fr; }
  .detail-item{ grid-template-columns:1fr; gap:2px; }
}

/* ---- rail extras + format buttons (markup from js/book-detail.js) ---- */
.carousel-see-all{ align-items:center; justify-content:center; min-height:250px; text-align:center; padding:1.5rem;
  border-style:dashed; background:var(--cream); }
.carousel-see-all .see-all-ico{ font-size:3rem; margin-bottom:.5rem; }
.carousel-see-all .see-all-title{ font-weight:900; color:var(--ink); margin-bottom:.25rem; }
.carousel-see-all .see-all-count{ font-size:.875rem; color:var(--ink-soft); }
.format-list-label{ font-weight:800; font-size:.875rem; color:var(--ink-soft); }
.btn-block.format-btn{ justify-content:space-between; gap:.75rem; }
.format-btn-main{ display:flex; align-items:center; gap:.5rem; }
.format-btn-ico{ font-size:1.25rem; }
.format-btn-label{ display:block; font-weight:800; }
.format-btn-asin{ display:block; font-size:.75rem; opacity:.8; }
.format-btn-price{ font-weight:900; font-size:1.125rem; }
.btn-block[aria-disabled="true"]{ cursor:default; opacity:.75; }
.btn-block[aria-disabled="true"]:hover{ transform:none; box-shadow:var(--sh-card); }
a.category-tag:hover{ background:var(--gold); }
.book-tab-content[hidden]{ display:none; }
.detail-value a.category-tag{ color:var(--ink) !important; text-decoration:none; display:inline-block; margin:.2rem .3rem .2rem 0; }
