:root {
  --bn-blue: #3f73e0;
  --bn-blue-dark: #2f5fc4;
  --bn-blue-light: #f7f8fa;
  --bn-text: #111827;
  --bn-line: #e5e7eb;
}

.bn-books-intro {
  max-width: 760px;
  margin: 0 auto 32px;
  color: var(--bn-text);
  font-size: 17px;
  line-height: 1.65;
  text-align: center;
}

.bn-books-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.bn-book-card {
  overflow: hidden;
  border: 1px solid var(--bn-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(36, 74, 150, .08);
}

.bn-book-card img {
  display: block;
  width: 100%;
  aspect-ratio: .707 / 1;
  object-fit: cover;
}

.bn-book-card-body { padding: 24px; }
.bn-book-card h2 { margin: 0 0 12px; font-size: 23px; line-height: 1.2; }
.bn-book-card h2 a { color: var(--bn-blue-dark); text-decoration: none; }
.bn-book-card p { color: var(--bn-text); line-height: 1.55; }

.bn-dual-price {
  display: grid;
  gap: 3px;
  margin: 16px 0;
  color: var(--bn-blue-dark);
  font-weight: 700;
}

.bn-free-label {
  display: inline-block;
  margin: 14px 0;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--bn-blue-light);
  color: var(--bn-blue-dark);
  font-weight: 700;
}

.bn-button-primary.button,
.bn-button-secondary.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin: 6px 8px 6px 0;
  padding: 11px 20px;
  border-radius: 999px;
  text-decoration: none;
}

.bn-button-primary.button { border-color: var(--bn-blue); background: var(--bn-blue); color: #fff; }
.bn-button-secondary.button { border-color: var(--bn-blue); background: #fff; color: var(--bn-blue-dark); }

.bn-purchase-box {
  margin: 24px 0;
  padding: 22px;
  border: 1px solid var(--bn-line);
  border-radius: 14px;
  background: var(--bn-blue-light);
}

.bn-purchase-box p { margin: 10px 0 0; font-size: 14px; }
.bn-purchase-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.bn-purchase-option { padding: 18px; border: 1px solid var(--bn-line); background: #fff; }
.bn-purchase-option p { display: grid; gap: 4px; }
.bn-button-free.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; background: #087f5b; color: #fff; }
.bn-loop-note { margin: 8px 0; color: #64748b; font-size: 13px; }
.bn-preview { clear: both; margin: 38px 0; }
.bn-preview summary { cursor: pointer; padding: 15px 18px; border-radius: 10px; background: var(--bn-blue-light); color: var(--bn-blue-dark); font-size: 18px; font-weight: 700; }
.bn-preview-pages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 22px; }
.bn-preview-pages figure { margin: 0; }
.bn-preview-pages img, .bn-preview-pages canvas { display: block; width: 100%; height: auto; border: 1px solid var(--bn-line); box-shadow: 0 5px 18px rgba(15, 23, 42, .08); }
.bn-preview-pages figcaption { padding: 6px; color: #64748b; font-size: 12px; text-align: center; }
.bn-preview-status { grid-column: 1 / -1; margin: 0; padding: 18px; color: #64748b; text-align: center; }
.bn-preview-pdfjs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 22px; }
.bn-preview-pdfjs figure { margin: 0; }
.bn-preview-pdfjs canvas { display: block; width: 100%; height: auto; border: 1px solid var(--bn-line); box-shadow: 0 5px 18px rgba(15, 23, 42, .08); }
.bn-preview-pdfjs figcaption { padding: 6px; color: #64748b; font-size: 12px; text-align: center; }
.bn-preview-native { margin-top: 22px; }
.bn-preview-native iframe { display: block; width: 100%; height: clamp(560px, 78vh, 900px); border: 1px solid var(--bn-line); border-radius: 8px; background: #fff; box-shadow: 0 5px 18px rgba(15, 23, 42, .08); }
.bn-preview-open-link { margin: 10px 0 0; font-size: 14px; text-align: right; }
.bn-preview-open-link a { color: var(--bn-blue-dark); }
.bn-account-intro { margin-bottom: 22px; padding: 18px; border-left: 4px solid var(--bn-blue); background: var(--bn-blue-light); }
.bn-newsletter { margin-top: 18px; padding: 14px; border-radius: 9px; background: var(--bn-blue-light); }
.bn-checkout-legal { color: #64748b; font-size: 13px; line-height: 1.45; }
.bn-checkout-legal a { color: var(--bn-blue-dark); }
.bn-account-creation-notice { margin: 0 0 20px; padding: 14px 16px; border-left: 4px solid var(--bn-blue); background: var(--bn-blue-light); color: #27364a; font-size: 14px; line-height: 1.5; }
.bn-free-total { color: #078447; font-weight: 800; }
.bn-thankyou-download { margin: 28px 0; }
.woocommerce-order-received h1.entry-title { font-size: 36px !important; line-height: 1.18 !important; }
.bn-thankyou-download h2 { font-size: 28px; line-height: 1.22; }
.bn-download-list { display: grid; gap: 14px; margin: 22px 0; }
.bn-download-item { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px; border: 1px solid var(--bn-line); background: #fff; }
.bn-delivery-note { padding: 16px 18px; border-left: 4px solid var(--bn-blue); background: var(--bn-blue-light); }
.bn-thankyou-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0; }
.bn-final-newsletter { margin: 34px 0 0; padding: 20px; border-top: 1px solid var(--bn-line); background: var(--bn-blue-light); }
.bn-final-newsletter h3 { font-size: 24px; line-height: 1.25; }
.bn-final-newsletter form { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.bn-retired-notice { margin: 24px 0; padding: 18px; border-left: 4px solid var(--bn-blue); background: var(--bn-blue-light); }
.bn-registered-email { margin-top: 28px; }
.woocommerce-account .order-again { display: none !important; }

@media (min-width: 1025px) {
  body.woocommerce-account h1.entry-title { font-size: 40px !important; line-height: 1.15 !important; }
  body.woocommerce-account .woocommerce-MyAccount-content h2 { font-size: 30px !important; line-height: 1.22 !important; }
}

@media (max-width: 900px) {
  .bn-books-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .woocommerce-order-received h1.entry-title { font-size: 30px !important; }
  .bn-thankyou-download h2 { font-size: 24px; }
  .bn-final-newsletter h3 { font-size: 22px; }
  .bn-books-grid, .bn-preview-pages, .bn-preview-pdfjs, .bn-purchase-options { grid-template-columns: 1fr; }
  .bn-book-card-body { padding: 20px; }
  .bn-button-primary.button, .bn-button-secondary.button { width: 100%; margin-right: 0; }
  .bn-preview-native iframe { height: 68vh; min-height: 460px; }
  .bn-download-item { display: grid; }
  .bn-download-item .button, .bn-thankyou-actions .button { width: 100%; text-align: center; }
  .bn-final-newsletter form { display: grid; }
}
