/* ============================================================
   BOOK DETAIL — LTR (English)
   Figma: vmTA4IVgGrXqZYp0eeWe2h  nodes 140-29478 · 432-1672 · 432-3604
   ============================================================ */

/* ── Page shell ── */
.bd-page { background: #f9fafb; }

/* ── Breadcrumb bar ── */
/* FIX 1: bar is flex just for vertical centering;
   section-inner stretches to full width so content stays at page-start */
.bd-breadcrumb-bar {
  background: #fff;
  border-bottom: 1px solid #f3f4f6;
  height: 53px;
  display: flex;
  align-items: center;
}
.bd-breadcrumb-bar .section-inner {
  width: 100%;
  display: flex;
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
}

.bd-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
}

.bd-breadcrumb__item { display: flex; align-items: center; gap: 6px; }

.bd-breadcrumb__link {
  color: #6a7282;
  font-weight: 400;
  transition: color .2s;
}
.bd-breadcrumb__link:hover { color: #8a1538; }

.bd-breadcrumb__sep {
  display: block;
  width: 16px;
  height: 16px;
  color: #99a1af;
  flex-shrink: 0;
}

.bd-breadcrumb__current {
  color: #101828;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

/* ── Product section ── */
.bd-product { padding: 48px 0 80px; }

.bd-product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

/* ── Image column ── */
.bd-image-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* Gallery main swiper wrapper — card style */
.bd-gallery-main-wrap {
  position: relative;
  background: #fff;
  border: 1px solid #f3f4f6;
  border-radius: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  /* New stacking context so badge z-index is scoped here and always wins */
  isolation: isolate;
}

/* Keep swiper at the bottom of the local stacking context */
.bd-gallery-main { width: 100%; height: 100%; position: relative; z-index: 0; }

.bd-gallery-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}
.bd-gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Extra top padding so the image content starts well below the badge */
  padding: 52px 32px 32px;
  display: block;
}
.bd-gallery-slide--empty {
  background: #f3f4f6;
}

.bd-badge-new {
  position: absolute;
  top: 16px;
  left: 16px;
  /* Above the swiper layer */
  z-index: 10;
  /* Own compositing layer — stays sharp during GPU-accelerated swipe */
  transform: translateZ(0);
  background: rgba(21,93,252,.14);
  color: #155dfc;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 9999px;
  pointer-events: none;
}

/* Thumbs swiper */
.bd-gallery-thumbs {
  width: 100%;
  overflow: hidden;
}
.bd-gallery-thumbs .swiper-wrapper { align-items: center; }

.bd-gallery-thumb {
  width: 96px !important;
  height: 96px;
  border-radius: 14px;
  border: 2px solid #f3f4f6;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  transition: border-color .2s;
  box-sizing: border-box;
}
.bd-gallery-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.bd-gallery-thumb.swiper-slide-thumb-active,
.bd-gallery-thumb:hover { border-color: #8a1538; }

/* ── Info column ── */
.bd-info-col { display: flex; flex-direction: column; gap: 0; }

/* Meta row: rating + category pill */
.bd-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.bd-rating-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #101828;
}
.bd-rating-badge svg { flex-shrink: 0; }
.bd-rating-badge__value { font-weight: 700; }
.bd-rating-badge__count { color: #99a1af; font-weight: 400; }

.bd-category-pill {
  background: rgba(138,21,56,.1);
  color: #8a1538;
  font-size: 14px;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 9999px;
  white-space: nowrap;
}

/* Title */
.bd-title {
  font-size: 36px;
  font-weight: 700;
  color: #101828;
  line-height: 1.25;
  margin: 0 0 16px;
}

/* Author line */
.bd-author {
  font-size: 18px;
  font-weight: 400;
  color: #6a7282;
  margin: 0 0 20px;
}
.bd-author a { font-weight: 500; color: #101828; }
.bd-author a:hover { color: #8a1538; }

/* Price row — stacks the price line over the loyalty-earn line */
.bd-price-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 20px;
}
/* Line 1: price + "or N points" alternative */
.bd-price-main {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
/* Loyalty points earned — sits under the short description */
.bd-earn-row { display: flex; margin: -6px 0 24px; }
.bd-price--sale { font-size: 30px; font-weight: 700; color: #8a1538; }
.bd-price--orig { font-size: 20px; font-weight: 400; color: #99a1af; text-decoration: line-through; }

/* Loyalty points earn badge — "🪙 Earn 241 points" (labels light, number bold) */
.bd-points-badge {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  color: #B76E00;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  border-radius: 8px;
  border: 1px solid #FFE8A3;
  background: linear-gradient(135deg, #FFF9E6 0%, #FFF8E3 14.29%, #FFF8E0 28.57%, #FFF7DD 42.86%, #FFF6DA 57.14%, #FFF5D7 71.43%, #FFF5D4 85.71%, #FFF4D1 100%);
}
.bd-points-badge svg   { flex-shrink: 0; }
.bd-points-badge__label { font-weight: 500; }
.bd-points-badge__val   { font-weight: 700; }

/* "Buy with points" price — cost to redeem. "or" is a muted connector (not
   boxed); only the amount sits in a subtle maroon chip, so the QAR price stays
   dominant and the line reads: price › reward badge › or › points chip. */
.bd-points-price {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.bd-points-price__or {
  color: #99a1af;
  font-size: 15px;
  font-weight: 500;
}
.bd-points-price__chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  color: #8a1538;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  border-radius: 8px;
  border: 1px solid rgba(138, 21, 56, .18);
  background: rgba(138, 21, 56, .06);
}
.bd-points-price__chip svg { flex-shrink: 0; }

/* Points price shown inside the E-Book format button */
.bd-format-btn__points {
  font-size: 13px;
  font-weight: 600;
  color: #8a1538;
}

/* Short description */
.bd-short-desc {
  font-size: 16px;
  font-weight: 400;
  color: #6a7282;
  line-height: 1.625;
  margin: 0 0 24px;
}

/* Format selector */
.bd-format-label { font-size: 18px; font-weight: 700; color: #101828; margin-bottom: 12px; }
.bd-format-options { display: flex; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }

.bd-format-btn {
  width: 200px;
  min-height: 80px;
  border-radius: 14px;
  border: 2px solid #f3f4f6;
  background: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 16px;
  transition: border-color .2s, background .2s;
}
.bd-format-btn__name  { font-size: 14px; font-weight: 700; color: #101828; }
.bd-format-btn__price { font-size: 14px; font-weight: 500; color: #6a7282; }
.bd-format-btn--active,
.bd-format-btn:hover { border-color: #8a1538; background: rgba(138,21,56,.05); }
.bd-format-btn--active .bd-format-btn__name,
.bd-format-btn:hover .bd-format-btn__name { color: #8a1538; }

/* Owned state on format button */
.bd-format-btn__owned-tag { display: none; font-size: 11px; font-weight: 700; color: #16a34a; }
.bd-format-btn--owned { border-color: #16a34a; background: rgba(22,163,74,.06); }
.bd-format-btn--owned .bd-format-btn__name { color: #16a34a; }
.bd-format-btn--owned .bd-format-btn__owned-tag { display: block; }
/* Owned active/hover: keep green border dominant */
.bd-format-btn--owned.bd-format-btn--active,
.bd-format-btn--owned:hover { border-color: #16a34a; background: rgba(22,163,74,.10); }

/* Read Now button */
.bd-read-now-btn {
  flex: 1;
  height: 56px;
  border-radius: 14px;
  border: none;
  background: #16a34a;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  box-shadow: 0 10px 15px rgba(22,163,74,.2);
  transition: opacity .2s, box-shadow .2s;
}
.bd-read-now-btn:hover { opacity: .92; color: #fff; box-shadow: 0 14px 20px rgba(22,163,74,.28); }

/* In Cart button (ebook already in cart) */
.bd-in-cart-btn {
  flex: 1;
  height: 56px;
  border-radius: 14px;
  border: 2px solid #d1fae5;
  background: #f0fdf4;
  color: #16a34a;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: default;
}

/* Hardcopy owned note (under action bar) */
.bd-owned-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #16a34a;
  margin: -16px 0 20px;
}
.bd-owned-note svg { flex-shrink: 0; color: #16a34a; }

/* Action bar */
.bd-action-bar {
  display: flex;
  gap: 12px;
  align-items: stretch;
  margin-bottom: 24px;
}

.bd-wishlist-btn {
  width: 56px;
  min-width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #6a7282;
  transition: border-color .2s, color .2s;
}
.bd-wishlist-btn:hover { border-color: #8a1538; color: #8a1538; }
.bd-wishlist-btn.is-active { color: #8a1538; }
.bd-wishlist-btn.is-active svg { fill: #8a1538; }

/* ── Share button + popover ─────────────────────────────────────────────── */
.bd-share-wrap { position: relative; display: inline-flex; }

.bd-share-action-btn {
  width: 56px;
  min-width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #6a7282;
  transition: border-color .2s, color .2s;
}
.bd-share-action-btn:hover { border-color: #8a1538; color: #8a1538; }

.bd-share-pop {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-start: 0;
  z-index: 30;
  min-width: 180px;
  padding: 6px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(17, 24, 39, .14);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bd-share-pop__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  color: #374151;
  font-size: 15px;
  font-weight: 600;
  text-align: start;
  text-decoration: none;
  transition: background-color .15s, color .15s;
}
.bd-share-pop__item:hover { background: #f6f2f3; color: #8a1538; }
.bd-share-pop__item svg { flex-shrink: 0; }

.bd-share-pop__copied {
  display: none;
  color: #15803d;
  font-weight: 700;
}
.bd-share-pop__item.is-copied .bd-share-pop__label { display: none; }
.bd-share-pop__item.is-copied .bd-share-pop__copied { display: inline; }
.bd-share-pop__item.is-copied,
.bd-share-pop__item.is-copied:hover { background: #f0fdf4; color: #15803d; }

.bd-add-to-cart-btn {
  flex: 1;
  height: 56px;
  border-radius: 14px;
  border: none;
  background: #8a1538;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 10px 15px rgba(138,21,56,.2);
  transition: opacity .2s, box-shadow .2s;
}
.bd-add-to-cart-btn:hover { opacity: .92; box-shadow: 0 14px 20px rgba(138,21,56,.25); }

.bd-qty {
  display: flex;
  align-items: center;
  width: 146px;
  min-width: 146px;
  height: 56px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: #fff;
  overflow: hidden;
}
.bd-qty__btn {
  width: 44px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: #6a7282;
  transition: color .2s;
}
.bd-qty__btn:hover { color: #8a1538; }
.bd-qty__val {
  flex: 1;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: #101828;
  user-select: none;
}

/* Trust badges */
.bd-trust-badges { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
/* Odd number of visible badges: last one spans the full row instead of leaving a gap
   (the visible count is computed in JS, which toggles this class per selected format). */
.bd-trust-badge--full { grid-column: 1 / -1; }
.bd-trust-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8f9fa;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px 16px;
}
.bd-trust-badge svg { flex-shrink: 0; color: #8a1538; }
.bd-trust-badge__icon { width: 24px; height: 24px; flex-shrink: 0; }
.bd-trust-badge__title { font-size: 14px; font-weight: 700; color: #101828; line-height: 1.3; }
.bd-trust-badge__sub   { font-size: 12px; font-weight: 400; color: #6a7282;  line-height: 1.3; }

/* Reader actions — sits below the trust badges; owner reads online, non-owners get a free trial */
.bd-reader-actions {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #eef0f3;
}
.bd-reader-btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 22px;
  border-radius: 12px;
  border: 1.5px solid transparent;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, box-shadow .15s, opacity .15s;
}
.bd-reader-btn svg { flex-shrink: 0; }
.bd-reader-btn--trial {
  background: #fff;
  color: #8a1538;
  border-color: #8a1538;
}
.bd-reader-btn--trial:hover { background: #fdf2f5; }

/* ── Tabs section ── */
.bd-tabs-section { padding: 0 0 64px; }

/* FIX 5a: scrollable tabs — no page-level overflow from long tab labels */
.bd-tabs-nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 32px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.bd-tabs-nav::-webkit-scrollbar { display: none; }

.bd-tab {
  font-size: 18px;
  font-weight: 700;
  color: #6a7282;
  background: none;
  border: none;
  border-bottom: 4px solid transparent;
  padding: 0 24px 16px;
  cursor: pointer;
  transition: color .2s, border-color .2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.bd-tab:first-child { padding-left: 0; }
.bd-tab--active { color: #8a1538; border-bottom-color: #8a1538; }
.bd-tab:hover:not(.bd-tab--active) { color: #101828; }

.bd-tab-panel { display: none; }
.bd-tab-panel--active { display: block; }

.bd-tab-content {
  background: #fff;
  border: 1px solid #f3f4f6;
  border-radius: 20px;
  padding: 33px;
}
.bd-tab-content p {
  font-size: 16px;
  font-weight: 400;
  color: #6a7282;
  line-height: 1.625;
  margin: 0 0 16px;
}
.bd-tab-content p:last-child { margin-bottom: 0; }

/* Details table */
.bd-details-table { width: 100%; border-collapse: collapse; }
.bd-details-table tr { border-bottom: 1px solid #f3f4f6; }
.bd-details-table tr:last-child { border-bottom: none; }
.bd-details-table th,
.bd-details-table td { padding: 12px 0; font-size: 15px; text-align: left; }
.bd-details-table th { color: #6a7282; font-weight: 500; width: 40%; }
.bd-details-table td { color: #101828; font-weight: 600; }

/* ── Reviews panel ── */
.bd-reviews-panel { display: flex; flex-direction: column; gap: 32px; }

.bd-rating-summary {
  display: flex;
  gap: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid #e5e7eb;
  align-items: center;
}

.bd-rating-big {
  background: #f9fafb;
  border: 1px solid #f3f4f6;
  border-radius: 14px;
  padding: 24px 32px;
  text-align: center;
  flex-shrink: 0;
  min-width: 160px;
}
.bd-rating-big__score { font-size: 48px; font-weight: 700; color: #101828; line-height: 1; margin-bottom: 8px; }
.bd-rating-big__stars { display: flex; justify-content: center; gap: 4px; margin-bottom: 8px; }
.bd-rating-big__count { font-size: 14px; color: #6a7282; }

.bd-rating-bars { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.bd-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #6a7282;
}
.bd-bar-row__label { min-width: 18px; text-align: right; }
.bd-bar-bg { flex: 1; height: 8px; background: #f3f4f6; border-radius: 4px; overflow: hidden; }
.bd-bar-fill { height: 100%; background: #ffb900; border-radius: 4px; transition: width .4s; }
.bd-bar-row__icon { display: flex; align-items: center; gap: 3px; min-width: 28px; }

.bd-share-btn-wrap { display: flex; justify-content: center; }
.bd-share-btn {
  background: #8a1538;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 14px;
  padding: 12px 32px;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(138,21,56,.2);
  transition: opacity .2s;
}
.bd-share-btn:hover { opacity: .9; }
a.bd-share-btn { display: inline-block; text-decoration: none; }

/* Guest login prompt (shown instead of the review form) */
.bd-review-login-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.bd-review-login-prompt span { color: #6b7280; font-size: 15px; }

/* Individual reviews */
.bd-reviews-list { display: flex; flex-direction: column; gap: 0; }
.bd-review-item {
  display: flex;
  gap: 16px;
  padding: 24px 0;
  border-bottom: 1px solid #f3f4f6;
}
.bd-review-item:last-child { border-bottom: none; }

.bd-reviewer-avatar {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  background: #8a1538;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  overflow: hidden;
}
.bd-reviewer-avatar img { width: 100%; height: 100%; object-fit: cover; }

.bd-review-body { flex: 1; min-width: 0; }
.bd-review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.bd-reviewer-name { font-size: 16px; font-weight: 700; color: #101828; }
.bd-review-date   { font-size: 14px; color: #99a1af; }
.bd-review-stars  { display: flex; gap: 3px; margin-bottom: 8px; }
.bd-review-text   { font-size: 15px; color: #6a7282; line-height: 1.6; margin: 0; }
.bd-verified-badge {
  font-size: 12px; font-weight: 600; color: #16a34a;
  background: rgba(22,163,74,.1); padding: 2px 8px; border-radius: 9999px;
}
.bd-review-delete-btn {
  margin-left: auto; display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 6px; border: none;
  background: transparent; color: #9ca3af; cursor: pointer; flex-shrink: 0;
  transition: color .15s, background .15s;
}
.bd-review-delete-btn:hover { color: #ef4444; background: rgba(239,68,68,.08); }

/* Review form */
.bd-review-form {
  background: #f9fafb;
  border: 1px solid #f3f4f6;
  border-radius: 14px;
  padding: 25px;
  display: none;
}
.bd-review-form.is-visible { display: block; }
.bd-review-form__title { font-size: 18px; font-weight: 700; color: #101828; margin: 0 0 20px; }

.bd-form-group { margin-bottom: 16px; }
.bd-form-label { display: block; font-size: 14px; font-weight: 700; color: #101828; margin-bottom: 8px; }

.bd-star-input { display: flex; gap: 8px; }
.bd-star-input__btn {
  width: 32px; height: 32px;
  background: none; border: none; cursor: pointer; padding: 0;
  color: #e5e7eb;
  transition: color .15s, transform .15s;
}
.bd-star-input__btn:hover,
.bd-star-input__btn.is-active { color: #ffb900; transform: scale(1.1); }

.bd-form-input,
.bd-form-textarea {
  width: 100%;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0 16px;
  font-size: 16px;
  color: #101828;
  font-family: inherit;
  transition: border-color .2s;
  box-sizing: border-box;
}
.bd-form-input { height: 50px; }
.bd-form-textarea { height: 122px; padding-top: 12px; resize: vertical; }
.bd-form-input:focus,
.bd-form-textarea:focus { outline: none; border-color: #8a1538; }

.bd-form-actions { display: flex; justify-content: flex-end; gap: 16px; margin-top: 20px; }
.bd-form-cancel {
  height: 44px; padding: 0 24px; border-radius: 14px;
  border: 2px solid #f3f4f6; background: #fff;
  font-size: 14px; font-weight: 700; color: #6a7282;
  cursor: pointer; transition: border-color .2s;
}
.bd-form-cancel:hover { border-color: #d1d5db; }
.bd-form-submit {
  height: 44px; padding: 0 28px; border-radius: 14px;
  border: none; background: #8a1538;
  font-size: 14px; font-weight: 700; color: #fff;
  cursor: pointer; opacity: .5; transition: opacity .2s;
}
.bd-form-submit.is-ready { opacity: 1; }

/* ── Related books — Swiper carousel ── */
.bd-related { padding: 48px 0 56px; }

/* overflow:hidden is required to clip the carousel, but it also crops the
   card drop-shadow — vertical padding gives the shadow room to breathe.
   The right-edge mask softly fades only a thin sliver at the very edge to
   hint "scroll for more" without washing out a visible card (flipped to the
   left edge for RTL in ar/BookDetail.css). */
.bd-related-swiper {
  overflow: hidden;
  padding: 6px 4px 32px;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent 100%);
          mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent 100%);
}

.bd-related-slide {
  width: 290px !important; /* slidesPerView:'auto' uses explicit width */
  height: auto;
}
/* Cards are already equal height (title is 2-line clamped with reserved
   min-height in master.css), so no forced stretch — that only created an
   empty gap above the price by inflating the flex:1 body. */
.bd-related-swiper .swiper-wrapper { align-items: flex-start; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .bd-product-grid { gap: 32px; }
  .bd-related-slide { width: 260px !important; }
}

@media (max-width: 768px) {
  /* Contain the whole page — prevents any child from bleeding */
  .bd-page { overflow-x: hidden; }

  .bd-product-grid { grid-template-columns: 1fr; gap: 24px; }
  /* Image above info on mobile */
  .bd-image-col { order: -1; }

  .bd-title { font-size: 26px; }
  .bd-price--sale { font-size: 24px; }
  .bd-format-btn { width: 100%; }
  .bd-format-options { flex-direction: column; }
  .bd-action-bar { flex-wrap: wrap; }
  .bd-qty { width: 100%; min-width: unset; }
  .bd-trust-badges { grid-template-columns: 1fr; }
  .bd-rating-summary { flex-direction: column; gap: 24px; align-items: stretch; }
  .bd-rating-big { min-width: unset; }
  .bd-tab { font-size: 15px; padding: 0 16px 14px; }
  .bd-tab:first-child { padding-left: 0; }
  .bd-tabs-section { padding-bottom: 40px; }
  /* Tab content: reduce padding so content doesn't overflow */
  .bd-tab-content { padding: 20px; }
  .bd-related { padding: 32px 0 48px; }
  .bd-related-slide { width: 220px !important; }
  /* Related swiper: full-bleed past section-inner padding for that native carousel feel */
  .bd-related .section-inner { padding-inline-end: 0; overflow: hidden; }
  /* Info column: prevent flex children from escaping */
  .bd-info-col { min-width: 0; }
  .bd-format-options { min-width: 0; }
}

@media (max-width: 480px) {
  .bd-title { font-size: 22px; }
  .bd-meta-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .bd-product { padding: 24px 0 40px; }
  .bd-tab { font-size: 14px; padding: 0 14px 12px; }
  .bd-related-slide { width: 200px !important; }
  .bd-tab-content { padding: 16px; }
}

/* Hardcopy stock messaging — accent-bar callout */
.bd-stock-msg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 0;
  color: var(--bd-stock-fg, #b42318);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
}
.bd-stock-msg::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bd-stock-accent, #f04438);
}
.bd-stock-msg--low { --bd-stock-fg: #b42318; --bd-stock-bg: #fef3f2; --bd-stock-accent: #f04438; }
.bd-stock-msg--max { --bd-stock-fg: #b54708; --bd-stock-bg: #fffaeb; --bd-stock-accent: #f79009; }
.bd-stock-msg--out { --bd-stock-fg: #475467; --bd-stock-bg: #f2f4f7; --bd-stock-accent: #98a2b3; }
.bd-add-to-cart-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
