/* BB Catalogue Regulator — critical (first-paint / layout stability only).
   Archive/runtime: bb-catalogue-regulator-archive.css (non-blocking). */
/* Auto-generated by BB Catalogue Regulator */

/* =========================================================
   First-paint prehide
   - Hides only the active-filter chip strip until JS settles (prevents chip snap).
   - Do NOT hide .woocommerce-ordering: it made the sort row invisible on first paint while
     pagination stayed visible, so the paginator sat “too high” then dropped when prehide released.
   - JS removes html.bbcr-prehide once initialized
   ========================================================= */
html.bbcr-prehide body.post-type-archive-product .bb-active-filters-row,
html.bbcr-prehide body.tax-product_cat .bb-active-filters-row,
html.bbcr-prehide body.tax-product_tag .bb-active-filters-row{
  visibility: hidden !important;
}
html.bbcr-ready body.post-type-archive-product .bb-active-filters-row,
html.bbcr-ready body.tax-product_cat .bb-active-filters-row,
html.bbcr-ready body.tax-product_tag .bb-active-filters-row{
  visibility: visible !important;
}

/* Custom orderby: clip sync <select> here so layout is stable before archive.css parses
   (mirrors bb-catalogue-regulator-archive.css ORDERBY CUSTOM block). */
body.post-type-archive-product .woocommerce-ordering.bb-orderby-custom select.orderby.bb-orderby__sync-select,
body.tax-product_cat .woocommerce-ordering.bb-orderby-custom select.orderby.bb-orderby__sync-select,
body.tax-product_tag .woocommerce-ordering.bb-orderby-custom select.orderby.bb-orderby__sync-select{
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Phone (<768): Woo/theme markup may place top pagination before the sort form in the DOM.
   ensureLayout() fixes sibling order later; grid placement matches final order on first paint. */
@media (max-width: 767px){
  body.post-type-archive-product .bb-archive-products .woocommerce,
  body.post-type-archive-product #catalogue .woocommerce,
  body.tax-product_cat .bb-archive-products .woocommerce,
  body.tax-product_cat #catalogue .woocommerce,
  body.tax-product_tag .bb-archive-products .woocommerce,
  body.tax-product_tag #catalogue .woocommerce{
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.post-type-archive-product .bb-archive-products .woocommerce > form.woocommerce-ordering,
  body.post-type-archive-product #catalogue .woocommerce > form.woocommerce-ordering,
  body.tax-product_cat .bb-archive-products .woocommerce > form.woocommerce-ordering,
  body.tax-product_cat #catalogue .woocommerce > form.woocommerce-ordering,
  body.tax-product_tag .bb-archive-products .woocommerce > form.woocommerce-ordering,
  body.tax-product_tag #catalogue .woocommerce > form.woocommerce-ordering{
    grid-row: 1 !important;
  }

  body.post-type-archive-product .bb-archive-products .woocommerce > .bb-active-filters-row,
  body.post-type-archive-product #catalogue .woocommerce > .bb-active-filters-row,
  body.tax-product_cat .bb-archive-products .woocommerce > .bb-active-filters-row,
  body.tax-product_cat #catalogue .woocommerce > .bb-active-filters-row,
  body.tax-product_tag .bb-archive-products .woocommerce > .bb-active-filters-row,
  body.tax-product_tag #catalogue .woocommerce > .bb-active-filters-row{
    grid-row: 2 !important;
  }

  body.post-type-archive-product .bb-archive-products .woocommerce > nav.woocommerce-pagination.bbcr-pagination--top,
  body.post-type-archive-product #catalogue .woocommerce > nav.woocommerce-pagination.bbcr-pagination--top,
  body.tax-product_cat .bb-archive-products .woocommerce > nav.woocommerce-pagination.bbcr-pagination--top,
  body.tax-product_cat #catalogue .woocommerce > nav.woocommerce-pagination.bbcr-pagination--top,
  body.tax-product_tag .bb-archive-products .woocommerce > nav.woocommerce-pagination.bbcr-pagination--top,
  body.tax-product_tag #catalogue .woocommerce > nav.woocommerce-pagination.bbcr-pagination--top{
    grid-row: 3 !important;
  }

  body.post-type-archive-product .bb-archive-products .woocommerce > ul.products,
  body.post-type-archive-product #catalogue .woocommerce > ul.products,
  body.tax-product_cat .bb-archive-products .woocommerce > ul.products,
  body.tax-product_cat #catalogue .woocommerce > ul.products,
  body.tax-product_tag .bb-archive-products .woocommerce > ul.products,
  body.tax-product_tag #catalogue .woocommerce > ul.products{
    grid-row: 4 !important;
  }

  body.post-type-archive-product .bb-archive-products .woocommerce > nav.woocommerce-pagination.bbcr-pagination--bottom,
  body.post-type-archive-product #catalogue .woocommerce > nav.woocommerce-pagination.bbcr-pagination--bottom,
  body.tax-product_cat .bb-archive-products .woocommerce > nav.woocommerce-pagination.bbcr-pagination--bottom,
  body.tax-product_cat #catalogue .woocommerce > nav.woocommerce-pagination.bbcr-pagination--bottom,
  body.tax-product_tag .bb-archive-products .woocommerce > nav.woocommerce-pagination.bbcr-pagination--bottom,
  body.tax-product_tag #catalogue .woocommerce > nav.woocommerce-pagination.bbcr-pagination--bottom{
    grid-row: 5 !important;
  }
}


/* =========================================================
   BB Full-Bleed (Crysto + Elementor Pro + Woo Archives)
   Restores the working “archive clamp removal + full-bleed background”
   behavior from v1.1.34.22.

   Scope:
   - Woo archives only (shop/cat/tag)
   - Only containers explicitly marked with class: bb-bleed-section
   ========================================================= */

/* 1) CRYSTO archive clamp removal (ONLY on Woo archives)
   Notes:
   - Crysto clamps the content via various wrappers depending on template.
   - Elementor archive templates commonly render inside #content-inner / .site-content-inner.
   - We remove max-width + side paddings on the common clamp nodes and ensure overflow
     does not clip the full-bleed pseudo background.
*/

body.post-type-archive-product #content,
body.tax-product_cat #content,
body.tax-product_tag #content,
body.post-type-archive-product #content.site-content,
body.tax-product_cat #content.site-content,
body.tax-product_tag #content.site-content,
body.post-type-archive-product #content.site-content.container,
body.tax-product_cat #content.site-content.container,
body.tax-product_tag #content.site-content.container,
body.post-type-archive-product #content-inner,
body.tax-product_cat #content-inner,
body.tax-product_tag #content-inner,
body.post-type-archive-product .site-content-inner,
body.tax-product_cat .site-content-inner,
body.tax-product_tag .site-content-inner{
  max-width: none !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  overflow: visible !important;
}

body.post-type-archive-product #page,
body.tax-product_cat #page,
body.tax-product_tag #page,
body.post-type-archive-product #main,
body.tax-product_cat #main,
body.tax-product_tag #main,
body.post-type-archive-product #content-wrapper,
body.tax-product_cat #content-wrapper,
body.tax-product_tag #content-wrapper,
body.post-type-archive-product #content-inner,
body.tax-product_cat #content-inner,
body.tax-product_tag #content-inner{
  overflow: visible !important;
}

/* Some Crysto builds wrap inner areas with an extra .container; un-clamp it too */
body.post-type-archive-product #content-inner .container,
body.tax-product_cat #content-inner .container,
body.tax-product_tag #content-inner .container,
body.post-type-archive-product .site-content-inner .container,
body.tax-product_cat .site-content-inner .container,
body.tax-product_tag .site-content-inner .container{
  max-width: none !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* 2) Full-bleed background + overlay (ONLY for marked containers) */
body.post-type-archive-product .bb-bleed-section,
body.tax-product_cat .bb-bleed-section,
body.tax-product_tag .bb-bleed-section{
  position: relative !important;
  isolation: isolate !important;
  z-index: 0 !important;
  overflow: visible !important;
}

/* Full-bleed BACKGROUND (inherits image/gradient/color) */
body.post-type-archive-product .bb-bleed-section::before,
body.tax-product_cat .bb-bleed-section::before,
body.tax-product_tag .bb-bleed-section::before{
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  bottom: 0 !important;
  left: 50% !important;
  width: 100vw !important;
  transform: translateX(-50%) !important;

  background: inherit !important;
  background-color: inherit !important;
  background-image: inherit !important;
  background-position: inherit !important;
  background-size: inherit !important;
  background-repeat: inherit !important;
  background-attachment: inherit !important;
  background-origin: inherit !important;
  background-clip: inherit !important;

  z-index: -2 !important;
  pointer-events: none !important;
}

/* Prevent theme pseudo-elements from stacking above our bleed layer */
body.post-type-archive-product .bb-bleed-section::after,
body.tax-product_cat .bb-bleed-section::after,
body.tax-product_tag .bb-bleed-section::after{
  content: none !important;
}

/* Full-bleed OVERLAY: Stretch Elementor overlay element (if present) */
body.post-type-archive-product .bb-bleed-section > .elementor-background-overlay,
body.tax-product_cat .bb-bleed-section > .elementor-background-overlay,
body.tax-product_tag .bb-bleed-section > .elementor-background-overlay{
  position: absolute !important;
  top: 0 !important;
  bottom: 0 !important;
  left: 50% !important;
  width: 100vw !important;
  transform: translateX(-50%) !important;

  z-index: -1 !important;
  pointer-events: none !important;
}

/* Prevent internal clipping for this marked container only */
body.post-type-archive-product .bb-bleed-section > .e-con-inner,
body.tax-product_cat .bb-bleed-section > .e-con-inner,
body.tax-product_tag .bb-bleed-section > .e-con-inner{
  overflow: visible !important;
}

