/* css/books.css — Premium book store with image galleries */

/* ── Page shell ──────────────────────────────────────────────────────────── */
.bp-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--bg, #0f1117);
  color: var(--text, #f0f4ff);
  font-family: inherit;
  position: relative;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.bp-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}

.bp-back {
  background: rgba(255,255,255,0.07);
  border: none;
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
  color: var(--text, #f0f4ff);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}
.bp-back:hover { background: rgba(255,255,255,0.13); }

.bp-header-text { flex: 1; }
.bp-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}
.bp-subtitle {
  font-size: 11px;
  color: rgba(240,244,255,0.4);
  margin: 2px 0 0;
}

.bp-cart-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(251,191,36,0.12);
  border: 1px solid rgba(251,191,36,0.3);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #fbbf24;
  cursor: pointer;
}

/* ── Language selector ───────────────────────────────────────────────────── */
.bp-lang-row {
  display: flex;
  gap: 8px;
  padding: 12px 16px 8px;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}
.bp-lang-row::-webkit-scrollbar { display: none; }

.bp-lang-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.09);
  border-radius: 14px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(240,244,255,0.55);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.bp-lang-btn:hover {
  background: rgba(255,255,255,0.09);
  color: var(--text, #f0f4ff);
}
.bp-lang-btn.active {
  background: color-mix(in srgb, var(--lang-accent) 15%, transparent);
  border-color: color-mix(in srgb, var(--lang-accent) 50%, transparent);
  color: var(--lang-accent);
  font-weight: 700;
}

.bp-lang-flag { font-size: 17px; }
.bp-lang-label { font-size: 13px; }

/* ── Tab bar ─────────────────────────────────────────────────────────────── */
.bp-tab-bar {
  display: flex;
  gap: 6px;
  padding: 0 16px 10px;
  flex-shrink: 0;
}

.bp-tab {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 9px 0;
  font-size: 13px;
  font-weight: 600;
  color: rgba(240,244,255,0.45);
  cursor: pointer;
  transition: all 0.2s;
}
.bp-tab:hover { background: rgba(255,255,255,0.09); color: rgba(240,244,255,0.75); }
.bp-tab.active {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  color: var(--text, #f0f4ff);
}

/* ── Scrollable content ──────────────────────────────────────────────────── */
.bp-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 32px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

/* ── Progress bar ────────────────────────────────────────────────────────── */
.bp-progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.bp-progress-label {
  font-size: 11px;
  color: rgba(240,244,255,0.4);
  white-space: nowrap;
}
.bp-progress-track {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  overflow: hidden;
}
.bp-progress-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Books grid ────────────────────────────────────────────────────────── */
.bp-books-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 8px;
}

/* ── Modern book card ────────────────────────────────────────────────────── */
.bp-book-card {
  background: linear-gradient(160deg, rgba(255,255,255,0.055) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), border-color 0.2s, box-shadow 0.25s;
  position: relative;
  cursor: pointer;
  animation: bpCardIn 0.4s ease both;
  animation-delay: var(--animation-delay, 0s);
}

@keyframes bpCardIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.bp-book-card::before {
  content: '';
  position: absolute;
  top: 0; left: 16px; right: 16px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  pointer-events: none;
}

.bp-book-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255,255,255,0.2);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.1) inset;
}

.bp-book-card:active {
  transform: translateY(-4px) scale(0.98);
  transition: transform 0.1s ease;
}

.bp-book-card.owned {
  opacity: 0.6;
}

.bp-book-card.owned:hover {
  transform: none;
  box-shadow: none;
  border-color: rgba(255,255,255,0.08);
}

/* Click hint */
.bp-book-card::after {
  content: '';
  position: absolute;
  top: 14px;
  right: 14px;
  width: 6px;
  height: 6px;
  background: radial-gradient(circle, rgba(79,143,255,0.6), transparent);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  z-index: 2;
}

.bp-book-card:hover::after {
  opacity: 1;
}

/* ── Book cover ──────────────────────────────────────────────────────────── */
.bp-book-cover {
  position: relative;
  width: 100%;
  height: 140px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
}

.bp-book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.bp-book-card:hover .bp-book-cover img {
  transform: scale(1.05);
}

.bp-book-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    rgba(0,0,0,0.1) 0%,
    rgba(0,0,0,0.4) 60%,
    rgba(8,11,18,0.9) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px;
}

.bp-book-level-badge,
.bp-exam-badge {
  font-family: var(--shop-font-display, 'Syne', sans-serif);
  font-size: 10px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(255,255,255,0.9);
  color: #000;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
}

.bp-book-icon {
  font-size: 24px;
  color: rgba(255,255,255,0.8);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* ── Book info ───────────────────────────────────────────────────────────── */
.bp-book-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.bp-book-name {
  font-family: var(--shop-font-display, 'Syne', sans-serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--text, #f0f4ff);
  line-height: 1.3;
  letter-spacing: -0.2px;
}

.bp-book-desc {
  font-size: 12px;
  color: rgba(240,244,255,0.6);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bp-book-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  color: rgba(240,244,255,0.5);
}

.bp-book-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #fbbf24;
}

.bp-book-reviews {
  color: rgba(240,244,255,0.4) !important;
  font-size: 11px;
}

/* ── Book actions ────────────────────────────────────────────────────────── */
.bp-book-actions {
  margin-top: 8px;
}

.bp-owned-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: 12px;
  color: #22c55e;
  font-size: 13px;
  font-weight: 600;
}

.bp-book-price {
  font-family: var(--shop-font-display, 'Syne', sans-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--shop-accent-gold, #fbbf24);
  text-align: center;
  margin-bottom: 8px;
}

.bp-book-buttons {
  display: flex;
  gap: 8px;
}

.bp-preview-btn,
.bp-buy-btn {
  flex: 1;
  border: none;
  border-radius: 10px;
  padding: 10px 12px;
  font-family: var(--shop-font-display, 'Syne', sans-serif);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.01em;
}

.bp-preview-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(240,244,255,0.7);
}

.bp-preview-btn:hover {
  background: rgba(255,255,255,0.12);
  color: var(--text, #f0f4ff);
}

.bp-buy-btn {
  background: linear-gradient(135deg, var(--book-accent, #3d7fff), color-mix(in srgb, var(--book-accent, #3d7fff) 80%, black));
  color: #fff;
  position: relative;
  overflow: hidden;
}

.bp-buy-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 60%);
  pointer-events: none;
}

.bp-buy-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
}

.bp-level-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text, #f0f4ff);
  line-height: 1.2;
}
.bp-level-meta {
  font-size: 11px;
  color: rgba(240,244,255,0.4);
  margin-top: 2px;
}
.bp-level-stars {
  font-size: 11px;
  color: #fbbf24;
  margin-top: 3px;
}
.bp-level-reviews {
  color: rgba(240,244,255,0.35);
  font-size: 10px;
}

.bp-level-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.bp-level-price {
  font-size: 16px;
  font-weight: 800;
  color: var(--text, #f0f4ff);
}
.bp-level-actions {
  display: flex;
  gap: 6px;
}

/* ── Exam intro ────────────────────────────────────────────────────────── */
.bp-exam-intro {
  margin-bottom: 16px;
  padding: 16px;
  background: rgba(155,123,255,0.08);
  border: 1px solid rgba(155,123,255,0.15);
  border-radius: 16px;
}

.bp-exam-intro p {
  margin: 0;
  font-size: 13px;
  color: rgba(240,244,255,0.7);
  line-height: 1.5;
}

.bp-owned-tag {
  font-size: 12px;
  font-weight: 700;
  color: #22c55e;
  background: rgba(34,197,94,0.12);
  border-radius: 8px;
  padding: 6px 12px;
}

/* ── Loading ─────────────────────────────────────────────────────────────── */
.bp-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 0;
  color: rgba(240,244,255,0.4);
  font-size: 14px;
}
.bp-spinner {
  width: 28px; height: 28px;
  border: 3px solid rgba(255,255,255,0.08);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: bpSpin 0.7s linear infinite;
}
@keyframes bpSpin { to { transform: rotate(360deg); } }

/* ── Full-screen layer ───────────────────────────────────────────────────── */
.bp-screen-layer {
  position: absolute;
  inset: 0;
  background: var(--bg, #0f1117);
  z-index: 100;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* ── Detail screen with sticky nav ───────────────────────────────────────── */
.bp-detail-screen {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.bp-detail-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: rgba(15,17,23,0.97);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
  flex-shrink: 0;
}
.bp-detail-back {
  background: rgba(255,255,255,0.07);
  border: none;
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
  color: var(--text, #f0f4ff);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}
.bp-detail-back:hover { background: rgba(255,255,255,0.13); }

.bp-detail-nav-title {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bp-detail-nav-buy {
  border: none;
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.2s;
}
.bp-detail-nav-buy:hover { filter: brightness(1.1); }

/* ── Image gallery ───────────────────────────────────────────────────────── */
.bp-gallery {
  flex-shrink: 0;
}
.bp-gallery-main {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: rgba(255,255,255,0.03);
}
.bp-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s;
}
.bp-gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(15,17,23,0.85) 100%);
  display: flex;
  align-items: flex-end;
  padding: 14px 16px;
}
.bp-gallery-badge {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  padding: 5px 14px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
}
.bp-gallery-thumbs {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.bp-gallery-thumbs::-webkit-scrollbar { display: none; }
.bp-thumb {
  width: 56px;
  height: 42px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.1);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.2s;
  background: none;
  padding: 0;
}
.bp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.bp-thumb.active { border-color: rgba(255,255,255,0.6); }

/* ── Title block ─────────────────────────────────────────────────────────── */
.bp-detail-title-block {
  padding: 16px 16px 0;
}
.bp-detail-lang-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  border-radius: 20px;
  padding: 4px 12px;
  margin-bottom: 8px;
}
.bp-detail-title {
  font-size: 22px;
  font-weight: 900;
  margin: 0 0 4px;
  line-height: 1.2;
  color: var(--text, #f0f4ff);
}
.bp-detail-subtitle {
  font-size: 13px;
  color: rgba(240,244,255,0.5);
  margin-bottom: 6px;
}
.bp-detail-byline {
  font-size: 12px;
  color: rgba(240,244,255,0.4);
  margin-bottom: 12px;
}
.bp-detail-byline strong { color: rgba(240,244,255,0.65); }

/* rating summary */
.bp-rating-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.bp-rating-big {
  font-size: 40px;
  font-weight: 900;
  color: var(--text, #f0f4ff);
  line-height: 1;
}
.bp-rating-stars-big {
  font-size: 18px;
  color: #fbbf24;
  line-height: 1.2;
}
.bp-rating-count {
  font-size: 11px;
  color: rgba(240,244,255,0.4);
  margin-top: 2px;
}

/* ── Buy block ───────────────────────────────────────────────────────────── */
.bp-buy-block {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  border-top: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.02);
}
.bp-buy-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}
.bp-buy-price {
  font-size: 28px;
  font-weight: 900;
  color: var(--text, #f0f4ff);
  line-height: 1;
}
.bp-buy-note {
  font-size: 11px;
  color: rgba(240,244,255,0.4);
  line-height: 1.4;
}
.bp-buy-cta {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 15px;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}
.bp-buy-cta:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* ── Body sections ───────────────────────────────────────────────────────── */
.bp-detail-body {
  flex: 1;
  padding: 20px 16px 0;
  overflow-y: auto;
}

.bp-detail-section { margin-bottom: 20px; }
.bp-detail-section-title {
  font-size: 13px;
  font-weight: 700;
  color: rgba(240,244,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 10px;
}
.bp-detail-description {
  font-size: 14px;
  color: rgba(240,244,255,0.65);
  line-height: 1.6;
  margin: 0;
}

.bp-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 16px;
}
.bp-detail-tag {
  font-size: 11px;
  font-weight: 600;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 4px 12px;
  color: rgba(240,244,255,0.6);
}

/* ── What's included perks grid ──────────────────────────────────────────── */
.bp-perks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.bp-perk-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 12px;
}
.bp-perk-emoji {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}
.bp-perk-item strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text, #f0f4ff);
  margin-bottom: 2px;
}
.bp-perk-item p {
  font-size: 11px;
  color: rgba(240,244,255,0.4);
  margin: 0;
  line-height: 1.4;
}

/* ── Table of contents ───────────────────────────────────────────────────── */
.bp-toc {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  overflow: hidden;
}
.bp-toc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 13px;
  color: rgba(240,244,255,0.7);
}
.bp-toc-item:last-child { border-bottom: none; }
.bp-toc-num {
  font-size: 11px;
  font-weight: 700;
  color: rgba(240,244,255,0.25);
  width: 22px;
  flex-shrink: 0;
}

/* ── Sample pages ────────────────────────────────────────────────────────── */
.bp-sample-tabs {
  display: flex;
  gap: 7px;
  margin-bottom: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.bp-sample-tabs::-webkit-scrollbar { display: none; }
.bp-sample-tab {
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.09);
  border-radius: 10px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(240,244,255,0.5);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.bp-sample-tab.active {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  color: var(--text, #f0f4ff);
}

.bp-sample-page {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 18px 16px;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(240,244,255,0.75);
  max-height: 340px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
  position: relative;
}

.bp-sample-page::after {
  content: "";
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, transparent, rgba(15,17,23,0.95));
  display: block;
  pointer-events: none;
}

/* ── Ratings breakdown ───────────────────────────────────────────────────── */
.bp-ratings-breakdown {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.bp-ratings-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.bp-ratings-big-num {
  font-size: 42px;
  font-weight: 900;
  color: var(--text, #f0f4ff);
  line-height: 1;
}
.bp-ratings-stars { font-size: 14px; color: #fbbf24; }
.bp-ratings-total { font-size: 10px; color: rgba(240,244,255,0.35); margin-top: 2px; }
.bp-ratings-bars {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.bp-rating-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}
.bp-rating-bar-label {
  width: 24px;
  color: rgba(240,244,255,0.5);
  flex-shrink: 0;
}
.bp-rating-bar-track {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  overflow: hidden;
}
.bp-rating-bar-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.8s cubic-bezier(0.34,1.56,0.64,1);
}
.bp-rating-bar-pct {
  width: 28px;
  text-align: right;
  color: rgba(240,244,255,0.35);
  flex-shrink: 0;
}

/* ── Reviews ─────────────────────────────────────────────────────────────── */
.bp-reviews {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.bp-review {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 14px;
}
.bp-review-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.bp-review-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.bp-review-meta { flex: 1; }
.bp-review-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #f0f4ff);
}
.bp-review-date {
  font-size: 11px;
  color: rgba(240,244,255,0.35);
  margin-top: 1px;
}
.bp-review-stars {
  font-size: 13px;
  color: #fbbf24;
  flex-shrink: 0;
}
.bp-review-text {
  font-size: 13px;
  color: rgba(240,244,255,0.65);
  line-height: 1.6;
  margin: 0;
}

/* ── Purchase screen ─────────────────────────────────────────────────────── */
.bp-purchase-screen {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding-bottom: 32px;
}

.bp-purchase-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.bp-purchase-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0;
}

.bp-purchase-book-card {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 16px 16px 0;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid;
  border-radius: 16px;
  padding: 14px;
}
.bp-purchase-book-img {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}
.bp-purchase-book-details {
  flex: 1;
  min-width: 0;
}
.bp-purchase-book-icon { font-size: 36px; line-height: 1; flex-shrink: 0; }
.bp-purchase-book-name { font-size: 14px; font-weight: 700; }
.bp-purchase-book-meta { font-size: 11px; color: rgba(240,244,255,0.4); margin-top: 2px; }
.bp-purchase-book-price { font-size: 18px; font-weight: 900; flex-shrink: 0; }

/* ── Success screen ──────────────────────────────────────────────────────── */
.bp-success-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 40px 24px;
  text-align: center;
  gap: 16px;
}
.bp-success-icon {
  font-size: 72px;
  line-height: 1;
  animation: bpSuccessPop 0.5s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes bpSuccessPop {
  from { transform: scale(0.4); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.bp-success-title {
  font-size: 24px;
  font-weight: 900;
  margin: 0;
  color: var(--text, #f0f4ff);
}
.bp-success-btn {
  border: none;
  border-radius: 16px;
  padding: 15px 40px;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.02em;
  margin-top: 8px;
}
.bp-success-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }