/*
 * B2BPerfume unified storefront rhythm — v2.6.04
 *
 * This is the single owner of template-level spacing. Component internals live
 * with their components. No !important declarations are used in this layer.
 */

:root {
  --b2bp-site-section-space: calc(var(--b2bp-layout-section-gap) / 2);
  --b2bp-site-section-gap: var(--b2bp-layout-section-gap);
}

/* Shared page edge: header -> first content and last content -> footer. */
.b2bp-page-wrap,
.b2bp-growth-page,
.b2bp-search-page,
.b2bp-commerce-main,
.b2bp-brands-page {
  padding-block: var(--b2bp-layout-page-top) var(--b2bp-layout-page-bottom);
}

/* Homepage sections split the major gap equally so adjacent sections add up to
 * exactly one --b2bp-layout-section-gap. */
.b2bp-home > :first-child {
  padding-top: var(--b2bp-layout-page-top);
}
.b2bp-home > :last-child {
  padding-bottom: var(--b2bp-layout-page-bottom);
}
.b2bp-home-section,
.b2bp-section:not(.b2bp-section--tight),
.b2bp-product-section,
.b2bp-brands-directory-section {
  padding-block: var(--b2bp-site-section-space);
}

/* Major stacked content uses one predictable gap. */
.b2bp-growth-page > .b2bp-shell,
.b2bp-register-focus > .b2bp-shell {
  gap: var(--b2bp-layout-section-gap);
}

/* Breadcrumbs and contextual navigation sit one half-step from content. */
.b2bp-theme-breadcrumbs,
.woocommerce .woocommerce-breadcrumb,
body.single-product .woocommerce-breadcrumb {
  margin-bottom: var(--b2bp-site-section-space);
}

/* Catalogue hierarchy: title/search/notices -> filters -> results. */
.b2bp-commerce-main .b2bp-catalog-search,
.b2bp-commerce-main .woocommerce-products-header,
.b2bp-commerce-main .woocommerce-notices-wrapper:not(:empty),
.b2bp-page-wrap--commerce .woocommerce-notices-wrapper:not(:empty) {
  margin-bottom: var(--b2bp-site-section-space);
}

.tax-product_brand .b2bp-brand-profile-hero,
.b2bp-search-page .b2bp-search-page-head {
  margin-bottom: var(--b2bp-layout-section-gap);
}

.b2bp-search-page .navigation.pagination,
.b2bp-search-page .woocommerce-pagination,
.woocommerce-cart .cart-collaterals,
.woocommerce-cart .wp-block-woocommerce-cart-order-summary-block,
.woocommerce-checkout .woocommerce-checkout-review-order,
.woocommerce-checkout .wp-block-woocommerce-checkout-order-summary-block {
  margin-top: var(--b2bp-layout-section-gap);
}

/* Account navigation is part of the account card, not a separate page section. */
.woocommerce-account .woocommerce-MyAccount-navigation {
  margin-top: 0;
}

/* Footer padding is intentionally fixed at 18px on every screen size. */
.b2bp-site-footer {
  padding-top: 18px;
  padding-bottom: 18px;
}

@media (max-width: 680px) {
  :root {
    --b2bp-layout-page-top: var(--b2bp-layout-mobile-page-top);
    --b2bp-layout-page-bottom: var(--b2bp-layout-mobile-page-bottom);
    --b2bp-layout-section-gap: var(--b2bp-layout-mobile-section-gap);
    --b2bp-layout-column-gap: var(--b2bp-layout-mobile-column-gap);
  }

}

/* Continuous page canvas; never apply this background to component cards. */
html, body,
body .b2bp-main,
body .b2bp-site-footer {
  background-color: #f8f6f4 !important;
}
.b2bp-home .b2bp-home-section {
  background: transparent !important;
}
/* Business-rule actions must not inherit light brand/filter accent colours. */
body .b2bp-brand-rule-button,
body .woocommerce .b2bp-brand-rule-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: var(--b2bp-primary, #5b5142) !important;
  border-color: var(--b2bp-primary, #5b5142) !important;
  color: #fff !important;
  min-height: 34px !important;
  padding: 7px 12px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
  text-decoration: none !important;
}
body .b2bp-brand-rule-button:hover,
body .woocommerce .b2bp-brand-rule-button:hover,
body .b2bp-brand-rule-button:focus-visible,
body .woocommerce .b2bp-brand-rule-button:focus-visible {
  background: var(--b2bp-primary-hover, #40382e) !important;
  border-color: var(--b2bp-primary-hover, #40382e) !important;
  color: #fff !important;
}
body .b2bp-brand-rule-button:focus-visible { outline: 2px solid var(--b2bp-primary); outline-offset: 3px; }

/* Brand and search introductions share the information-page hero finish. */
.tax-product_brand .b2bp-brand-profile-hero,
.b2bp-search-page .b2bp-search-page-head {
  border: 1px solid #e8e0d5 !important;
  border-radius: 16px !important;
  background: linear-gradient(120deg, #efe6d8, #fbfaf8 85%) !important;
  color: var(--b2bp-text);
  box-shadow: 0 8px 24px rgb(70 53 32 / 5%) !important;
}
.tax-product_brand .b2bp-brand-profile-copy,
.b2bp-search-page .b2bp-search-page-head {
  padding: clamp(24px, 4vw, 48px) !important;
}
.tax-product_brand .b2bp-brand-profile-copy { background: transparent; }
.tax-product_brand .b2bp-brand-profile-logo-wrap {
  background: #f5f0e8 !important;
  border-left: 1px solid #e8e0d5;
}
.tax-product_brand .b2bp-brand-profile-logo img {
  background: #fff;
  border: 1px solid #e8e0d5;
  border-radius: 14px;
}
.b2bp-search-page .b2bp-search-page-head h1 {
  margin: 14px 0 16px;
  line-height: 1.15;
  letter-spacing: -.03em;
}
.b2bp-search-page .b2bp-search-page-head p { color: var(--b2bp-muted); line-height: 1.75; }
@media (max-width: 820px) {
  .tax-product_brand .b2bp-brand-profile-logo-wrap { border-left: 0; border-top: 1px solid #e8e0d5; }
}
