/* BMG 0.4: reading, discovery and product decision layouts. */
.bmg-editorial #page { width: min(calc(100% - 40px), 1200px); max-width: 1200px; }
.bmg-editorial .site-content { padding: 0; }
.bmg-editorial .content-area { width: 100%; min-width: 0; }
.bmg-reading-page, .bmg-library-page { padding: 26px 0 72px; }
.bmg-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 30px; font-size: .86rem; line-height: 1.5; color: #59616b; }
.bmg-breadcrumb a { color: #4a5662; }
.bmg-topic-label { color: #9b252a; text-decoration: none; font-size: .82rem; font-weight: 750; line-height: 1.5; }
.bmg-reading-header { max-width: 980px; padding: 0 0 30px; }
.bmg-reading-header h1 { margin: 14px 0 20px; font-size: clamp(2rem, 3.8vw, 3.35rem); line-height: 1.17; text-wrap: balance; overflow-wrap: anywhere; }
.bmg-reading-meta { margin: 0; color: #65707a; font-size: .9rem; }
.bmg-reading-deck { max-width: 800px; margin: 24px 0 0; font-size: clamp(1.12rem, 1.5vw, 1.3rem); line-height: 1.7; color: #465462; }
.bmg-reading-layout { display: grid; grid-template-columns: minmax(0, 790px) minmax(220px, 290px); justify-content: space-between; gap: 56px; padding-top: 26px; border-top: 1px solid var(--bmg-border); }
.bmg-reading-main { min-width: 0; }
.bmg-prose { margin-top: 0; overflow-wrap: anywhere; }
.bmg-prose > :first-child { margin-top: 0; }
body.bmg-editorial .bmg-prose h2 { font-size: clamp(1.5rem, 2.3vw, 2rem) !important; margin: 2em 0 .8em; line-height: 1.3; }
body.bmg-editorial .bmg-prose h3 { font-size: clamp(1.22rem, 1.8vw, 1.55rem) !important; line-height: 1.4; }
.bmg-prose p { margin: 0 0 1.4em; }
.bmg-prose :where(ul, ol) { margin-left: 1.35em; }
.bmg-prose li { margin-bottom: .65em; }
.bmg-prose a:not(.button, .bmg-contact-button) { color: #9a242a; text-decoration-thickness: 1px; }
.bmg-prose :where(figure, .wp-caption) { max-width: 100%; margin: 28px auto; }
.bmg-prose :where(figcaption, .wp-caption-text) { margin-top: 10px; font-size: .87rem; color: #596570; line-height: 1.6; text-align: center; }
.bmg-prose .alignleft, .bmg-prose .alignright { max-width: 48%; }
.bmg-prose pre { max-width: 100%; overflow-x: auto; padding: 20px; background: #f5f7f9; border-radius: 12px; }
.bmg-prose iframe { max-width: 100%; }
.bmg-prose .bmg-table-scroll { margin: 24px 0; border-radius: 10px; border: 1px solid var(--bmg-border); }
.bmg-prose .bmg-table-scroll table { margin-bottom: 0; min-width: 520px; }
.bmg-prose th { background: #eef2f5; color: #18212b; }
.bmg-prose blockquote p:last-child { margin-bottom: 0; }
.bmg-reading-aside__inner { position: sticky; top: 155px; }
.bmg-generated-toc { padding: 22px; margin-bottom: 22px; background: #f5f7f8; border: 1px solid var(--bmg-border); border-radius: 14px; }
.bmg-generated-toc[hidden] { display: none; }
.bmg-generated-toc h2, .bmg-reading-help h2, .bmg-product-help h2 { font-size: 1.12rem; line-height: 1.4; margin: 0 0 15px; }
.bmg-generated-toc ol { list-style: none; margin: 0; max-height: 42vh; overflow-y: auto; padding: 0; }
.bmg-generated-toc li + li { margin-top: 10px; }
.bmg-generated-toc a { display: block; padding: 4px 0; color: #43515e; font-size: .88rem; line-height: 1.5; text-decoration: none; }
.bmg-generated-toc a:hover { color: #a72027; text-decoration: underline; }
.bmg-generated-toc .bmg-toc-sub { padding-left: 12px; border-left: 2px solid #d9e0e6; }
.bmg-reading-help { padding: 22px; border: 1px solid #e6d8bb; border-radius: 14px; background: #fffaf1; }
.bmg-reading-help p { font-size: .91rem; line-height: 1.65; }
.bmg-reading-help .bmg-eyebrow { font-size: .7rem; }
.bmg-reading-help .bmg-contact-button { width: 100%; }
.bmg-reading-help__link { display: block; margin-top: 16px; text-align: center; font-size: .88rem; color: #303944; }
.bmg-reading-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--bmg-border); font-size: .83rem; }
.bmg-reading-tags a { display: inline-block; padding: 7px 11px; border: 1px solid var(--bmg-border); border-radius: 30px; color: #43515e; background: #fafbfc; text-decoration: none; overflow-wrap: anywhere; }
.bmg-reading-tags a:hover { border-color: #b4bec8; color: #a72027; }
.bmg-reading-tags details { width: 100%; margin-top: 8px; }
.bmg-reading-tags summary { cursor: pointer; padding: 8px 0; }
.bmg-reading-tags details a { margin: 4px; }
.bmg-inline-enquiry { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; margin: 54px 0; padding: clamp(24px, 4vw, 44px); border: 1px solid #e6d8bb; border-radius: 20px; background: #fcf9f3; }
.bmg-inline-enquiry h2 { font-size: clamp(1.65rem, 2.5vw, 2.35rem); line-height: 1.25; }
.bmg-inline-enquiry > div { min-width: 0; }
.bmg-inline-enquiry .bmg-lead-form { background: #fff; border-radius: 12px; }
.bmg-inline-enquiry p { color: #46535f; }
.bmg-reading-next { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding: 26px 0; border-top: 1px solid var(--bmg-border); border-bottom: 1px solid var(--bmg-border); }
.bmg-reading-next a { color: #18212b; text-decoration: none; padding: 12px; border-radius: 10px; }
.bmg-reading-next a:hover { background: #f4f6f8; }
.bmg-reading-next small { display: block; margin-bottom: 9px; color: #68747f; }
.bmg-reading-next strong { font-size: 1.07rem; line-height: 1.55; }
.bmg-related-reading { margin-top: 54px; }
.bmg-related-reading > h2 { font-size: clamp(1.7rem, 2.7vw, 2.5rem); margin-bottom: 25px; }
.bmg-story-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.bmg-story-card { min-width: 0; overflow: hidden; border: 1px solid var(--bmg-border); border-radius: 16px; background: #fff; box-shadow: 0 7px 20px rgb(16 20 24 / 4%); }
.bmg-story-card__image { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #edf1f4; }
.bmg-story-card__image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bmg-story-card__placeholder { height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; background: #18232d; color: #ddbc79; font: 700 2.6rem Georgia, serif; }
.bmg-story-card__placeholder span { padding: 0 16px; text-align: center; color: #e3e9ec; font: 650 .68rem system-ui, sans-serif; letter-spacing: .08em; }
.bmg-story-card__body { padding: 22px; }
.bmg-story-card h2 { margin: 12px 0; font-size: 1.19rem; line-height: 1.45; letter-spacing: -.015em; overflow-wrap: anywhere; }
.bmg-story-card h2 a { color: #18212b; text-decoration: none; }
.bmg-story-card h2 a:hover { color: #a72027; text-decoration: underline; }
.bmg-story-card__body p { margin: 0 0 20px; font-size: .92rem; line-height: 1.65; color: #596570; }
.bmg-story-card time { font-size: .8rem; color: #68747f; }
.bmg-library-header { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(240px, 1fr); align-items: end; gap: 42px; margin-bottom: 30px; }
.bmg-library-header h1 { font-size: clamp(2rem, 4vw, 3.4rem); margin-bottom: 18px; line-height: 1.15; }
.bmg-library-description { font-size: 1rem; line-height: 1.7; color: #596570; }
.bmg-library-header p:last-child { margin-bottom: 0; }
.bmg-search-form { display: flex; align-items: stretch; gap: 8px; min-width: 0; }
.bmg-search-form input { min-width: 0; width: 100%; flex: 1; border: 1px solid #bcc6cf; border-radius: 8px; padding: 12px; }
.bmg-search-form button { white-space: nowrap; padding: 12px 16px; background: #18232d; color: #fff; }
.bmg-topic-directory { margin: 0 0 30px; border: 1px solid var(--bmg-border); border-radius: 12px; background: #f8fafb; }
.bmg-topic-directory summary { cursor: pointer; padding: 17px 20px; font-weight: 700; }
.bmg-topic-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0 20px 20px; }
.bmg-topic-links a { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 12px; font-size: .87rem; line-height: 1.45; color: #3c4b58; text-decoration: none; background: #fff; border: 1px solid #e4e9ed; border-radius: 8px; }
.bmg-topic-links small { white-space: nowrap; color: #68747f; }
.bmg-topic-links [aria-current="page"] { color: #a72027; border-color: #ce8589; }
.bmg-editorial .pagination { margin: 40px 0 0; padding: 0; }
.bmg-editorial .nav-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bmg-editorial .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 8px 13px; border: 1px solid var(--bmg-border); border-radius: 8px; color: #18212b; text-decoration: none; }
.bmg-editorial .page-numbers.current { background: #18232d; color: #fff; border-color: #18232d; }
.bmg-empty-state { padding: 44px 24px; border: 1px solid var(--bmg-border); border-radius: 16px; background: #f8fafb; text-align: center; }
.bmg-empty-state h2 { font-size: 1.6rem; }
.bmg-content-pages { display: flex; flex-wrap: wrap; gap: 12px; padding: 20px 0; }
.bmg-input-focused .bmg-mobile-contact { display: none; }

/* Product content remains WooCommerce-native. */
.bmg-pccc-site.woocommerce #primary { width: 100%; min-width: 0; }
.bmg-catalog-search { clear: both; margin-bottom: 20px; }
.bmg-catalog-search .woocommerce-product-search { display: flex; gap: 10px; max-width: 650px; }
.bmg-catalog-search .search-field { flex: 1; min-width: 0; border-radius: 8px; }
.bmg-catalog-search button { background: #18232d; color: #fff; }
.bmg-shop-intro { max-width: 870px; padding-bottom: 16px; }
.bmg-shop-intro .bmg-contact-button { margin: 0 5px 8px 0; }
.bmg-pccc-site.woocommerce .woocommerce-ordering select { max-width: 100%; padding: 12px 32px 12px 12px; border-radius: 8px; }
.bmg-pccc-site.woocommerce .woocommerce-loop-category__title { padding: 0 16px; font-size: 1.03rem; line-height: 1.4; }
.bmg-pccc-site.single-product .summary { min-width: 0; margin-bottom: 0; }
.bmg-pccc-site.single-product .product_title { font-size: clamp(1.85rem, 2.9vw, 2.75rem); line-height: 1.22; }
.bmg-pccc-site.single-product div.product { gap: 38px; }
.bmg-pccc-site.single-product div.product > :where(.woocommerce-tabs, .related, .up-sells, .bmg-inline-enquiry) { grid-column: 1 / -1; }
.bmg-pccc-site.single-product .quantity .qty { min-height: 48px; width: 80px; border-radius: 8px; }
.bmg-pccc-site.single-product .single_add_to_cart_button { min-height: 48px; padding: 12px 22px; background: #bd252d; color: #fff; }
.bmg-pccc-site.single-product .product_meta { display: grid; gap: 8px; padding-top: 20px; border-top: 1px solid var(--bmg-border); font-size: .86rem; color: #596570; }
.bmg-pccc-site.single-product .product_meta a { color: #43515e; }
.bmg-product-help { margin: 24px 0; padding: 22px; border: 1px solid #e6d8bb; border-radius: 12px; background: #fcf9f3; }
.bmg-product-help p { font-size: .93rem; color: #52606d; }
.bmg-product-help > a { margin: 0 12px 10px 0; }
.bmg-product-help > a:last-child { display: inline-block; font-size: .9rem; color: #9a242a; }
.bmg-pccc-site.single-product .woocommerce-tabs ul.tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; border-bottom: 1px solid var(--bmg-border); }
.bmg-pccc-site.single-product .woocommerce-tabs ul.tabs::before,
.bmg-pccc-site.single-product .woocommerce-tabs ul.tabs li::before,
.bmg-pccc-site.single-product .woocommerce-tabs ul.tabs li::after { display: none; }
.bmg-pccc-site.single-product .woocommerce-tabs ul.tabs li { margin: 0; border: 0; border-radius: 8px 8px 0 0; background: #eef2f5; }
.bmg-pccc-site.single-product .woocommerce-tabs ul.tabs li.active { background: #18232d; color: #fff; }
.bmg-pccc-site.single-product .woocommerce-tabs ul.tabs li a { display: block; padding: 14px; line-height: 1.4; }
.bmg-pccc-site.single-product .woocommerce-Tabs-panel { max-width: 950px; }
.bmg-pccc-site.single-product .bmg-inline-enquiry { margin: 0; }

@media (min-width: 1101px) {
  .bmg-primary-menu a { white-space: nowrap; }
  .bmg-header-main__inner { gap: .8rem; }
}
@media (min-width: 1101px) and (max-width: 1360px) {
  .bmg-header-phone { display: none; }
  .bmg-primary-menu a { padding-inline: .55rem; }
  .bmg-brand__text strong { font-size: .95rem; }
}
@media (max-width: 1024px) {
  .bmg-reading-layout { grid-template-columns: minmax(0, 1fr) 250px; gap: 30px; }
  .bmg-story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bmg-topic-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bmg-library-header { grid-template-columns: 1fr; gap: 25px; }
}
@media (max-width: 768px) {
  .bmg-editorial #page { width: calc(100% - 32px); }
  .bmg-reading-page, .bmg-library-page { padding-top: 22px; }
  .bmg-breadcrumb { margin-bottom: 22px; font-size: .8rem; }
  .bmg-reading-header { padding-bottom: 24px; }
  .bmg-reading-layout { display: flex; flex-direction: column; gap: 28px; padding-top: 0; border-top: 0; }
  .bmg-reading-aside { order: -1; }
  .bmg-reading-aside__inner { position: static; }
  .bmg-reading-aside .bmg-reading-help { display: none; }
  .bmg-generated-toc { margin-bottom: 0; padding: 18px; }
  .bmg-generated-toc ol { max-height: 220px; }
  .bmg-reading-layout:has(.bmg-generated-toc[hidden]) .bmg-reading-aside { display: none; }
  .bmg-inline-enquiry { grid-template-columns: 1fr; gap: 20px; margin: 38px 0; padding: 22px; border-radius: 14px; }
  .bmg-reading-next { grid-template-columns: 1fr; gap: 12px; }
  .bmg-reading-next a { padding-inline: 0; }
  .bmg-pccc-site.single-product div.product { grid-template-columns: 1fr; gap: 24px; }
  .bmg-catalog-search .woocommerce-product-search { flex-wrap: wrap; }
  .bmg-catalog-search button { padding-inline: 16px; }
  .bmg-pccc-site.woocommerce .woocommerce-result-count { float: none; margin: 0 0 12px; }
  .bmg-pccc-site.woocommerce .woocommerce-ordering { float: none; margin: 0 0 20px; }
  .bmg-pccc-site.woocommerce .woocommerce-ordering select { width: 100%; }
  .bmg-product-help { padding: 18px; }
}
@media (max-width: 560px) {
  .bmg-story-grid, .bmg-topic-links { grid-template-columns: 1fr; }
  .bmg-story-card__body { padding: 20px; }
  .bmg-story-grid { gap: 22px; }
  .bmg-prose .alignleft, .bmg-prose .alignright { float: none; max-width: 100%; margin-inline: auto; }
  .bmg-topic-directory summary { font-size: .92rem; }
  .bmg-pccc-site.single-product .woocommerce-tabs ul.tabs { gap: 5px; }
  .bmg-pccc-site.single-product .woocommerce-tabs ul.tabs li a { padding: 12px 9px; font-size: .9rem; }
  .bmg-inline-enquiry { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bmg-pccc-site *, .bmg-pccc-site *::before, .bmg-pccc-site *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
