/* Bauthne Book Template — loaded on Books product pages only (body.bbt-book). */
body.bbt-book {
  --bbt-primary: #3b3b2c;
  --bbt-primary-hover: #4d4d3b;
  --bbt-text: #1a1a1a;
  --bbt-muted: #6b6b6b;
  --bbt-border: #e5e5e0;
  --bbt-card: #f7f7f5;
  --bbt-radius: 10px;
  --bbt-font: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.bbt { font-family: var(--bbt-font); color: var(--bbt-text); max-width: 1200px; margin: 0 auto; padding: 32px 16px 0; }
.bbt *, .bbt *::before, .bbt *::after { box-sizing: border-box; }

/* Layout: 55 / 45, stacked on mobile */
.bbt-main { display: grid; grid-template-columns: minmax(0, 55fr) minmax(0, 45fr); gap: 48px; align-items: start; }
.bbt-media, .bbt-info { min-width: 0; }

/* Gallery card */
.bbt-gallery { background: var(--bbt-card); border-radius: 16px; padding: 24px; }
.bbt-gallery .woocommerce-product-gallery { width: 100% !important; float: none !important; margin: 0 !important; opacity: 1 !important; }
.bbt-gallery .woocommerce-product-gallery__image,
.bbt-gallery .woocommerce-product-gallery__image a { aspect-ratio: auto !important; height: auto !important; overflow: visible !important; }
.bbt-gallery .woocommerce-product-gallery__image img { width: 100% !important; height: auto !important; max-height: none !important; aspect-ratio: auto !important; object-fit: contain !important; border-radius: 8px; }
.bbt-gallery .flex-control-thumbs { display: flex; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.bbt-gallery .flex-control-thumbs li { width: 64px !important; margin: 0 !important; }
.bbt-gallery .flex-control-thumbs img { border-radius: 6px; border: 1px solid var(--bbt-border); opacity: .7; cursor: pointer; }
.bbt-gallery .flex-control-thumbs img.flex-active, .bbt-gallery .flex-control-thumbs img:hover { opacity: 1; border-color: var(--bbt-primary); }

/* Feature boxes */
.bbt-features { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.bbt-feature { display: flex; align-items: center; gap: 12px; padding: 16px; background: var(--bbt-card); border: 1px solid var(--bbt-primary); border-radius: 8px; font-weight: 500; font-size: 15px; }
.bbt-ico { width: 22px; height: 22px; flex: 0 0 22px; color: var(--bbt-primary); }

/* Info column */
.bbt-eyebrow { margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: 2.4px; text-transform: uppercase; color: var(--bbt-muted); }
.bbt-title { margin: 0 0 16px; font-family: var(--bbt-font) !important; font-size: clamp(26px, 3vw, 36px) !important; font-weight: 600 !important; line-height: 1.15 !important; letter-spacing: -.2px !important; text-transform: none !important; color: var(--bbt-text); }
.bbt-rating { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; font-size: 14px; color: var(--bbt-muted); }
.bbt-rating .star-rating { margin: 0; color: var(--bbt-primary); }

.bbt-price { margin: 0 0 24px; }
.bbt-price__was { color: var(--bbt-muted); font-size: 18px; margin-right: 8px; }
.bbt-price__now { font-size: 32px; font-weight: 600; color: var(--bbt-text); }
.bbt-price .woocommerce-Price-amount { font-family: var(--bbt-font); }
.bbt-price__save { margin: 4px 0 0; font-size: 15px; font-weight: 500; color: var(--bbt-primary); }

/* Buttons */
.bbt-buy { margin: 0 0 12px; }
.bbt-btn, .bbt .bbt-btn.button {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; padding: 0 24px;
  border-radius: var(--bbt-radius); font-family: var(--bbt-font); font-size: 16px; font-weight: 600; line-height: 1.2;
  letter-spacing: .2px; text-align: center; text-decoration: none; text-transform: none; cursor: pointer;
  transition: background-color .2s, transform .15s, box-shadow .2s, color .2s;
}
.bbt-btn--primary, .bbt-btn--primary:visited { background: var(--bbt-primary); color: #fff !important; border: 0; }
.bbt-btn--primary:hover { background: var(--bbt-primary-hover); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(59, 59, 44, .18); }
.bbt .bbt-btn--secondary, .bbt .bbt-btn--secondary:visited { background: #fff !important; color: var(--bbt-text) !important; border: 2px solid var(--bbt-primary) !important; }
.bbt .bbt-btn--secondary:hover { background: var(--bbt-card) !important; transform: translateY(-1px); }
.bbt-btn:focus-visible, .bbt-acc__btn:focus-visible { outline: 3px solid var(--bbt-primary); outline-offset: 3px; }
.bbt .bbt-btn.loading { opacity: .65; pointer-events: none; }
.bbt .added_to_cart { display: block; margin-top: 8px; text-align: center; font-weight: 500; color: var(--bbt-primary); }
.bbt-unavailable { padding: 16px; background: var(--bbt-card); border-radius: 8px; color: var(--bbt-muted); }

/* Trust + payment */
.bbt-divider { margin: 24px 0 16px; border: 0; border-top: 1px solid var(--bbt-border); }
.bbt-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 0; margin: 0 0 16px; padding: 0; list-style: none; font-size: 13px; color: var(--bbt-muted); }
.bbt-trust li { display: inline-flex; align-items: center; gap: 6px; }
.bbt-trust li + li::before { content: "·"; margin: 0 10px; }
.bbt-trust .bbt-ico { width: 16px; height: 16px; flex-basis: 16px; color: var(--bbt-muted); }
.bbt-pay { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0 0 24px; }
.bbt-pay svg { height: 26px; width: auto; }

/* Accordions */
.bbt-acc { border-top: 1px solid var(--bbt-border); }
.bbt-acc__item { border-bottom: 1px solid var(--bbt-border); }
.bbt-acc__h { margin: 0; font-size: inherit; }
.bbt-acc__btn {
  display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 56px; padding: 12px 0;
  background: none; border: 0; font-family: var(--bbt-font); font-size: 16px; font-weight: 500; color: var(--bbt-text); text-align: left; cursor: pointer;
}
.bbt-acc__btn:hover { background: none; color: var(--bbt-primary); }
.bbt-acc__sign { position: relative; width: 14px; height: 14px; flex: 0 0 14px; margin-left: 16px; }
.bbt-acc__sign::before, .bbt-acc__sign::after { content: ""; position: absolute; top: 6px; left: 0; width: 14px; height: 2px; background: currentColor; transition: transform .25s; }
.bbt-acc__sign::after { transform: rotate(90deg); }
.bbt-acc__btn[aria-expanded="true"] .bbt-acc__sign::after { transform: rotate(0deg); }
.bbt-acc__panel { padding: 0 0 16px; font-size: 15px; line-height: 1.7; color: #3d3d3d; }
.bbt-acc__panel p { margin: 0 0 12px; }
.bbt-acc__panel h1, .bbt-acc__panel h2, .bbt-acc__panel h3, .bbt-acc__panel h4 { margin: 20px 0 8px; font-family: var(--bbt-font) !important; font-size: 16px !important; font-weight: 600 !important; line-height: 1.4 !important; letter-spacing: 0 !important; text-transform: none !important; color: var(--bbt-text); }
.bbt-acc__panel ul, .bbt-acc__panel ol { margin: 0 0 12px 20px; }
.bbt-acc__panel table { width: 100%; margin: 0 0 12px; font-size: 14px; border-collapse: collapse; }
.bbt-acc__panel th, .bbt-acc__panel td { padding: 6px 8px; border: 1px solid var(--bbt-border); text-align: left; }

/* Below the fold */

.bbt-also { margin-top: 72px; }
.bbt .bv2-also-sale.bbt-badge { background: var(--bbt-primary); color: #fff; }
.bbt-trust a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Mobile sticky buy bar */
.bbt-sticky { display: none; }
@media (max-width: 921px) {
  .bbt { padding-top: 16px; }
  .bbt-main { grid-template-columns: 1fr; gap: 24px; }
  .bbt .bx-sec { padding-left: 0; padding-right: 0; } /* align with the book content edges */
  .bbt-gallery { padding: 16px; }
  .bbt-sticky {
    display: flex; align-items: center; gap: 12px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 999;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--bbt-border);
    box-shadow: 0 -6px 20px rgba(0, 0, 0, .06); transform: translateY(110%); transition: transform .25s;
  }
  .bbt-sticky.is-visible { transform: translateY(0); }
  .bbt-sticky__price { font-weight: 600; font-size: 18px; white-space: nowrap; }
  .bbt-sticky__btn { min-height: 48px; font-size: 15px; }
  body.bbt-sticky-on { padding-bottom: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  .bbt *, .bbt *::before, .bbt *::after { transition: none !important; }
}
