/* G2.2 Width & Typography Refinement */

/* Remove residual Storefront top spacing and keep content flush to the custom shell. */
.home .site-content,
.post-type-archive-product .site-content,
.tax-product_cat .site-content,
.single-product .site-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.home .storefront-breadcrumb,
.post-type-archive-product .storefront-breadcrumb,
.tax-product_cat .storefront-breadcrumb {
  display: none !important;
}

.single-product .storefront-breadcrumb {
  box-sizing: border-box;
  margin: 0 auto !important;
  max-width: var(--bb-product-max);
  padding: 12px var(--bb-page-pad) 4px !important;
}

body {
  font-size: 15px;
}

.bb-container {
  max-width: var(--bb-content-max);
}

/* Header refinement */
.bb-header-main {
  grid-template-columns: 1fr minmax(250px, 330px) 1fr;
  min-height: 94px;
}

.bb-brand-logo {
  max-height: 82px;
  max-width: 310px;
}

.bb-primary-nav {
  min-height: 45px;
}

.bb-primary-nav a {
  font-size: 0.72rem;
  letter-spacing: 0.085em;
}

.bb-category-strip {
  min-height: 39px;
}

.bb-category-strip a {
  font-size: 0.66rem;
  letter-spacing: 0.085em;
}

.bb-header-utility,
.bb-language-static,
.bb-language-switcher,
.bb-cart-link {
  font-size: 0.73rem;
}

/* Home */
.bb-home-hero {
  gap: clamp(48px, 6vw, 92px);
  grid-template-columns: minmax(0, 1.12fr) minmax(400px, .88fr);
  max-width: 1400px;
  min-height: 530px;
  padding-bottom: clamp(64px, 6vw, 88px);
  padding-top: clamp(56px, 6vw, 82px);
}

.bb-home-hero-copy h1 {
  font-size: clamp(52px, 5.1vw, 72px);
  letter-spacing: -0.042em;
  line-height: .97;
  max-width: 14.5ch;
}

.bb-home-lead {
  font-size: 1.03rem;
  line-height: 1.6;
  max-width: 60ch;
}

.bb-home-hero-media img {
  min-height: 315px;
}

.bb-home-categories,
.bb-home-featured {
  padding-left: var(--bb-page-pad);
  padding-right: var(--bb-page-pad);
}

.bb-home-categories .bb-section-heading,
.bb-home-featured .bb-section-heading,
.bb-category-grid,
.bb-home-featured .bb-product-grid {
  max-width: 1360px;
}

.bb-section-heading h2 {
  font-size: clamp(34px, 3.5vw, 50px);
}

.bb-category-tile span {
  font-size: 1.2rem;
}

.bb-home-featured .bb-product-grid {
  gap: 34px 28px;
}

.bb-home-custom-inner {
  max-width: 1280px;
}

.bb-home-custom h2 {
  font-size: clamp(40px, 4.2vw, 58px);
  max-width: 16ch;
}

.bb-home-maker {
  gap: clamp(50px, 7vw, 96px);
  max-width: 1160px;
}

.bb-home-maker-copy h2 {
  font-size: clamp(40px, 4vw, 56px);
  max-width: 15ch;
}

/* Shop */
.bb-shop-hero-visual {
  gap: clamp(54px, 7vw, 104px);
  grid-template-columns: minmax(0, 1.16fr) minmax(420px, .84fr);
  max-width: 1480px;
  padding-bottom: 42px;
  padding-top: 54px;
}

.bb-shop-hero-visual h1 {
  font-size: clamp(50px, 5.2vw, 72px);
  line-height: .98;
}

.bb-shop-hero-visual p:not(.bb-eyebrow) {
  font-size: 1rem;
  line-height: 1.62;
  max-width: 68ch;
}

.bb-shop-filter-panel {
  max-width: 1480px;
  padding-left: var(--bb-page-pad);
  padding-right: var(--bb-page-pad);
}

.bb-filter-title {
  font-size: .66rem;
}

.bb-filter-options a {
  font-size: .65rem;
  padding: 7px 9px;
}

.bb-shop-results {
  max-width: 1320px;
}

.bb-shop-product-grid {
  gap: 38px 32px;
}

.bb-shop-product-grid .bb-product-info h3 {
  font-size: clamp(1.1rem, 1.35vw, 1.4rem);
}

.bb-shop-product-grid .bb-product-type {
  font-size: .66rem;
}

.bb-shop-product-grid .bb-product-price {
  font-size: .86rem;
}

/* Product cards */
.bb-product-info h3 {
  line-height: 1.24;
}

.bb-product-type {
  font-size: .65rem;
}

.bb-product-price {
  font-size: .84rem;
}

.bb-product-cta {
  font-size: .66rem;
}

/* Single product */
.single-product div.product {
  column-gap: var(--bb-product-gap);
  grid-template-columns: minmax(0, 1.06fr) minmax(420px, .94fr);
  max-width: var(--bb-product-max);
  padding-bottom: 36px;
  padding-top: 34px;
}

.single-product div.product .woocommerce-product-gallery {
  max-width: none !important;
  width: 100% !important;
}

/* FlexSlider sets the track and slide widths inline; preserve those widths. */
.single-product .woocommerce-product-gallery__image a {
  width: 100%;
}

.single-product .woocommerce-product-gallery__image img {
  background: var(--bb-surface);
  height: auto !important;
  max-height: 720px;
  object-fit: contain;
  width: 100% !important;
}

.single-product .flex-control-thumbs {
  display: grid !important;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 72px));
  margin-top: 12px !important;
}

.single-product .flex-control-thumbs li {
  float: none !important;
  margin: 0 !important;
  width: auto !important;
}

.single-product div.product .summary {
  padding-top: 2px;
}

.single-product div.product .product_title {
  font-size: clamp(42px, 4vw, 56px);
  line-height: 1.01;
  max-width: 15ch;
}

.single-product .woocommerce-product-details__short-description {
  font-size: .97rem;
  line-height: 1.68;
  max-width: 62ch;
}

.bb-product-status {
  padding-bottom: 19px;
}

.bb-at-a-glance {
  background: var(--bb-soft);
  border-color: var(--bb-line);
  margin-top: 28px;
  padding: 22px 24px 18px;
}

.bb-at-a-glance h2 {
  font-size: 1.12rem;
  margin-bottom: 12px;
}

.bb-at-a-glance dl > div {
  grid-template-columns: 112px 1fr;
  padding: 11px 0;
}

.bb-at-a-glance dt {
  font-size: .62rem;
}

.bb-at-a-glance dd {
  color: var(--bb-ink);
  font-size: .8rem;
  line-height: 1.55;
}

.bb-product-personal {
  margin-top: 26px;
  padding-top: 24px;
}

.bb-product-personal h2 {
  font-size: 1.22rem;
}

.bb-product-personal p {
  font-size: .82rem;
  max-width: 58ch;
}

.bb-product-detail-accordions {
  margin-top: 70px;
  max-width: var(--bb-product-max);
}

.bb-product-detail-accordions summary {
  font-size: 1.14rem;
  padding: 20px 8px;
}

.bb-product-detail-accordions details > div {
  font-size: .92rem;
  line-height: 1.7;
  max-width: 82ch;
  padding-bottom: 26px;
}

/* Custom related-products layout replaces Storefront/Woo default sizing. */
.bb-related-products {
  border-top: 1px solid var(--bb-line);
  grid-column: 1 / -1;
  margin-top: 76px;
  padding-top: 58px;
  width: 100%;
}

.bb-related-products > h2 {
  font-size: clamp(34px, 3.7vw, 48px);
  margin: 0 0 34px;
  text-align: center;
}

.bb-related-grid {
  display: grid;
  gap: 36px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 auto;
  max-width: 1180px;
}

.bb-related-grid .bb-product-image {
  aspect-ratio: 4 / 5;
}

.bb-related-grid .bb-product-info h3 {
  font-size: 1.18rem;
}

.single-product .related.products {
  display: none !important;
}

/* Footer typography and width */
.bb-footer {
  max-width: 1320px;
  padding-top: 60px;
}

.bb-footer-grid {
  gap: clamp(54px, 8vw, 120px);
  max-width: 920px;
}

.bb-footer-group h2 {
  font-size: .72rem;
}

.bb-footer-group a,
.bb-footer-meta a {
  font-size: .88rem;
  line-height: 1.55;
}

.bb-footer-bottom {
  margin-top: 52px;
  padding-top: 30px;
}

.bb-footer-brand img {
  max-height: 82px;
  max-width: 290px;
}

/* General page typography */
.bb-page-hero {
  max-width: var(--bb-content-max);
  padding-top: 64px;
}

.bb-page-hero h1 {
  font-size: clamp(44px, 4.6vw, 66px);
}

.bb-page-content {
  max-width: var(--bb-content-max);
}

@media (max-width: 1100px) {
  .bb-home-hero,
  .bb-shop-hero-visual {
    grid-template-columns: 1fr 1fr;
  }

  .single-product div.product {
    grid-template-columns: minmax(0, 1fr) minmax(360px, .95fr);
  }
}

@media (max-width: 768px) {
  body {
    font-size: 15px;
  }

  .bb-header-main {
    grid-template-columns: 1fr 185px 1fr;
    min-height: 74px;
  }

  .bb-brand-logo {
    max-height: 60px;
    max-width: 190px;
  }

  .bb-home-hero,
  .bb-shop-hero-visual {
    grid-template-columns: 1fr;
    padding-top: 36px;
  }

  .bb-home-hero-copy h1 {
    font-size: clamp(42px, 11vw, 58px);
    max-width: 13ch;
  }

  .bb-shop-hero-visual h1 {
    font-size: clamp(42px, 11vw, 58px);
  }

  .single-product div.product {
    display: block;
    padding-top: 24px;
  }

  .single-product div.product .product_title {
    max-width: none;
  }

  .bb-at-a-glance {
    margin-bottom: 34px;
  }

  .bb-related-products {
    margin-top: 56px;
    padding-top: 44px;
  }

  .bb-related-grid {
    gap: 20px 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bb-related-grid .bb-product-info h3 {
    font-size: 1rem;
  }

  .bb-footer-grid {
    max-width: none;
  }
}

@media (max-width: 420px) {
  .bb-header-main {
    grid-template-columns: 1fr 160px 1fr;
  }

  .bb-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* G2.3 product-detail proportion refinement */
.single-product div.product {
  grid-template-columns: minmax(410px, .82fr) minmax(0, 1.18fr);
  column-gap: clamp(58px, 6.5vw, 96px);
  max-width: 1360px;
}

.single-product div.product .woocommerce-product-gallery {
  max-width: 540px !important;
  justify-self: start;
}

.single-product div.product .summary {
  max-width: 690px;
  width: 100%;
}

.single-product div.product .product_title {
  max-width: 21ch;
}

.single-product .woocommerce-product-details__short-description {
  max-width: 68ch;
}

.bb-at-a-glance {
  background: var(--bb-surface);
  border: 1px solid var(--bb-line);
  max-width: 540px;
}

.bb-product-detail-accordions {
  background: transparent;
  max-width: 1360px;
}

.bb-product-detail-accordions details {
  background: var(--bb-surface);
  border-left: 1px solid var(--bb-line);
  border-right: 1px solid var(--bb-line);
}

.bb-product-detail-accordions details:first-child {
  border-top: 1px solid var(--bb-line);
}

.bb-product-detail-accordions details:last-child {
  border-bottom: 1px solid var(--bb-line);
}

.bb-product-detail-accordions details + details {
  border-top: 1px solid var(--bb-line);
}

.bb-product-detail-accordions summary {
  padding-left: 18px;
  padding-right: 18px;
}

.bb-product-detail-accordions summary::after {
  right: 18px;
}

.bb-product-detail-accordions details > div {
  padding-left: 18px;
  padding-right: 18px;
}

@media (max-width: 1100px) {
  .single-product div.product {
    grid-template-columns: minmax(360px, .9fr) minmax(0, 1.1fr);
    column-gap: 48px;
  }

  .single-product div.product .woocommerce-product-gallery,
  .bb-at-a-glance {
    max-width: none !important;
  }
}

@media (max-width: 768px) {
  .single-product div.product {
    display: block;
  }

  .single-product div.product .summary {
    max-width: none;
  }

  .single-product div.product .product_title {
    max-width: none;
  }
}

/* G2.4 compact product-information composition */
.single-product div.product {
  column-gap: clamp(52px, 5.8vw, 86px);
}

/* Keep every product-gallery thumbnail in one horizontal row on desktop. */
.single-product .flex-control-thumbs {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 9px;
  overflow-x: auto;
  padding-bottom: 3px;
  scrollbar-width: thin;
}

.single-product .flex-control-thumbs li {
  flex: 0 0 62px !important;
  margin: 0 !important;
  width: 62px !important;
}

.single-product .flex-control-thumbs img {
  aspect-ratio: 1;
  height: 62px !important;
  object-fit: cover;
  width: 62px !important;
}

/* Secondary information becomes a compact two-column row beneath the hero. */
.bb-at-a-glance {
  align-self: start;
  grid-column: 1;
  grid-row: 2;
  margin: 24px 0 0;
  max-width: 540px;
  width: 100%;
}

.bb-product-detail-accordions {
  align-self: start;
  grid-column: 2;
  grid-row: 2;
  margin: 24px 0 0;
  max-width: 690px;
  width: 100%;
}

.bb-product-detail-accordions details > div {
  max-width: none;
}

.bb-product-detail-accordions summary {
  padding-bottom: 16px;
  padding-top: 16px;
}

.bb-product-detail-accordions details > div {
  padding-bottom: 20px;
}

/* Tighten the primary information stack without making it cramped. */
.single-product div.product .summary {
  align-self: start;
}

.single-product .woocommerce-product-details__short-description {
  line-height: 1.58;
  margin-bottom: 16px;
}

.bb-product-status {
  margin-top: 2px;
  padding-bottom: 15px;
}

.single-product div.product form.cart {
  margin-top: 18px;
}

.bb-gift-option {
  margin-top: 18px;
}

.bb-product-personal {
  margin-top: 18px;
  padding-top: 18px;
}

/* Related products start sooner once the information row is complete. */
.bb-related-products {
  grid-column: 1 / -1;
  grid-row: 3;
  margin-top: 52px;
  padding-top: 48px;
}

@media (max-width: 1100px) {
  .single-product .flex-control-thumbs li {
    flex-basis: 58px !important;
    width: 58px !important;
  }

  .single-product .flex-control-thumbs img {
    height: 58px !important;
    width: 58px !important;
  }

  .bb-at-a-glance,
  .bb-product-detail-accordions {
    max-width: none;
  }
}

@media (max-width: 768px) {
  .single-product .flex-control-thumbs {
    overflow-x: auto;
  }

  .bb-at-a-glance,
  .bb-product-detail-accordions,
  .bb-related-products {
    display: block;
    margin-top: 30px;
    max-width: none;
    width: 100%;
  }

  .bb-related-products {
    padding-top: 40px;
  }
}

/* G2.5 exact shared-grid alignment for product detail */
.single-product div.product {
  --bb-product-left-col: 500px;
  --bb-product-col-gap: 48px;
  box-sizing: border-box;
  column-gap: var(--bb-product-col-gap);
  grid-template-columns: minmax(0, var(--bb-product-left-col)) minmax(0, 1fr);
  max-width: 1180px;
  row-gap: 26px;
}

/* Row 1 and row 2 use exactly the same column boundaries. */
.single-product div.product .woocommerce-product-gallery,
.single-product .bb-at-a-glance {
  box-sizing: border-box;
  grid-column: 1;
  justify-self: stretch;
  max-width: none !important;
  width: 100% !important;
}

.single-product div.product .summary,
.single-product .bb-product-detail-accordions {
  box-sizing: border-box;
  grid-column: 2;
  justify-self: stretch;
  max-width: none !important;
  width: 100% !important;
}

.single-product div.product .woocommerce-product-gallery,
.single-product div.product .summary {
  grid-row: 1;
}

.single-product .bb-at-a-glance,
.single-product .bb-product-detail-accordions {
  grid-row: 2;
  margin-top: 0;
}

/* Make the right-hand summary visually occupy the whole shared column. */
.single-product div.product .summary > *,
.single-product .woocommerce-product-details__short-description,
.single-product div.product form.cart,
.single-product .bb-product-status,
.single-product .bb-gift-option,
.single-product .bb-product-personal {
  box-sizing: border-box;
  max-width: none;
  width: 100%;
}

.single-product .woocommerce-product-details__short-description {
  max-width: none;
}

.single-product div.product .product_title {
  max-width: 21ch;
}

/* Thumbnails remain a single row inside the same 500px gallery column. */
.single-product .flex-control-thumbs {
  box-sizing: border-box;
  max-width: 100%;
  width: 100%;
}

.single-product .flex-control-thumbs li {
  flex: 0 0 62px !important;
  width: 62px !important;
}

/* Related products use the exact same outside edges as the two product rows. */
.single-product .bb-related-products {
  box-sizing: border-box;
  grid-column: 1 / -1;
  grid-row: 3;
  margin-top: 26px;
  max-width: none;
  padding-top: 42px;
  width: 100%;
}

.single-product .bb-related-grid {
  max-width: none;
  width: 100%;
}

@media (max-width: 1100px) {
  .single-product div.product {
    --bb-product-left-col: minmax(340px, .9fr);
    --bb-product-col-gap: 40px;
    grid-template-columns: minmax(340px, .9fr) minmax(0, 1.1fr);
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .single-product div.product {
    display: block;
    max-width: none;
  }

  .single-product .bb-at-a-glance,
  .single-product .bb-product-detail-accordions,
  .single-product .bb-related-products {
    margin-top: 30px;
    width: 100%;
  }
}

/* G2.6 shell polish */

/* In logged-in previews WordPress already reserves toolbar height above the document.
   Disable sticky positioning only for admin previews to avoid a doubled blank offset.
   Public visitors keep the sticky header with the announcement at the viewport top. */
.admin-bar .site-header {
  position: relative;
  top: 0;
}

/* Centre the footer navigation block as a composition, but keep each column left-aligned
   for fast scanning, which is the standard premium-commerce pattern. */
.bb-footer-grid {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  margin-left: auto;
  margin-right: auto;
  max-width: 900px;
  width: 100%;
}

.bb-footer-group {
  align-items: flex-start;
  text-align: left;
}

@media (max-width: 768px) {
  .bb-footer-grid {
    margin-left: 0;
    margin-right: 0;
  }
}
