/*
 * BPC 3.2.7 — Catalogue archive mobile safety
 * Scope: Shop + WooCommerce product taxonomy archives.
 * Keeps all 24 products and pagination in normal document flow.
 */

html body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active:not(.bpc-menu-open):not(.bpc-search-open),
html body.post-type-archive-product.bpc-ivory-active:not(.bpc-menu-open):not(.bpc-search-open) {
  overflow-y: auto !important;
  height: auto !important;
  max-height: none !important;
}

body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active #page,
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active #content,
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .site-content,
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .ast-container,
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active #primary,
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .site-main,
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .ast-woocommerce-container,
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .woocommerce,
body.post-type-archive-product.bpc-ivory-active #page,
body.post-type-archive-product.bpc-ivory-active #content,
body.post-type-archive-product.bpc-ivory-active .site-content,
body.post-type-archive-product.bpc-ivory-active .ast-container,
body.post-type-archive-product.bpc-ivory-active #primary,
body.post-type-archive-product.bpc-ivory-active .site-main,
body.post-type-archive-product.bpc-ivory-active .ast-woocommerce-container,
body.post-type-archive-product.bpc-ivory-active .woocommerce {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: visible !important;
  contain: none !important;
  content-visibility: visible !important;
}

body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .woocommerce ul.products,
body.post-type-archive-product.bpc-ivory-active .woocommerce ul.products {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  contain: none !important;
  content-visibility: visible !important;
  grid-auto-flow: row !important;
  grid-auto-rows: auto !important;
  align-items: start !important;
}

body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .woocommerce ul.products li.product,
body.post-type-archive-product.bpc-ivory-active .woocommerce ul.products li.product {
  height: auto !important;
  max-height: none !important;
  contain: none !important;
  content-visibility: visible !important;
  visibility: visible !important;
}

/* Keep the media crop isolated; do not clip the whole card. */
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .woocommerce ul.products li.product .astra-shop-thumbnail-wrap,
body.post-type-archive-product.bpc-ivory-active .woocommerce ul.products li.product .astra-shop-thumbnail-wrap {
  overflow: hidden !important;
}

body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .woocommerce-pagination,
body.post-type-archive-product.bpc-ivory-active .woocommerce-pagination {
  position: relative !important;
  clear: both !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  contain: none !important;
  content-visibility: visible !important;
  margin-top: 42px !important;
}

/* Third-party filters/widgets must not establish a clipping ancestor around the catalogue. */
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .woof_shortcode_output,
body.post-type-archive-product.bpc-ivory-active .woof_shortcode_output {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  contain: none !important;
}

/* v3.2.3 — second, immediately visible pager for Boutique / Nouveautés. */
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .bpc-shop-top-pagination {
  display: block !important;
  clear: both !important;
  width: 100% !important;
  margin: 18px 0 28px !important;
  padding: 0 !important;
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .bpc-shop-top-pagination .woocommerce-pagination {
  display: block !important;
  margin: 0 !important;
}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .bpc-shop-top-pagination ul.page-numbers,
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .woocommerce-pagination ul.page-numbers {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  border: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .bpc-shop-top-pagination ul.page-numbers li,
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .woocommerce-pagination ul.page-numbers li {
  display: block !important;
  border: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .bpc-shop-top-pagination .page-numbers,
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .woocommerce-pagination .page-numbers {
  min-width: 42px !important;
  min-height: 42px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 8px 12px !important;
  border: 1px solid rgba(43,33,26,.20) !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #2b211a !important;
  -webkit-text-fill-color: #2b211a !important;
  line-height: 1 !important;
  opacity: 1 !important;
  visibility: visible !important;
}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .bpc-shop-top-pagination .page-numbers.current,
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .woocommerce-pagination .page-numbers.current {
  background: #2b211a !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
@media (max-width: 767px) {
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .bpc-shop-top-pagination {
    margin: 14px 0 20px !important;
  }
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .bpc-shop-top-pagination .page-numbers,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .woocommerce-pagination .page-numbers {
    min-width: 38px !important;
    min-height: 38px !important;
    padding: 7px 10px !important;
    font-size: 14px !important;
  }
}

/* v3.2.4 — Mobile archive width + pagination safety. */
.bpc-shop-mobile-pager { display:none; }

@media (max-width: 767px) {
  html,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active:not(.bpc-menu-open):not(.bpc-search-open) {
    width:100% !important;
    max-width:100% !important;
    overflow-x:hidden !important;
  }

  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active #page,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active #content,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .site-content,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .site-content > .ast-container,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .ast-container,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active #primary,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .site-main,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .ast-woocommerce-container,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .woocommerce,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .woocommerce-products-header,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .woof_shortcode_output {
    float:none !important;
    clear:both !important;
    display:block !important;
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    margin-left:0 !important;
    margin-right:0 !important;
    box-sizing:border-box !important;
  }

  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .site-content {
    padding-left:12px !important;
    padding-right:12px !important;
  }

  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .woocommerce-products-header__title,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .entry-title {
    max-width:100% !important;
    overflow-wrap:anywhere !important;
  }

  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .woocommerce-result-count,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .woocommerce-ordering {
    float:none !important;
    clear:both !important;
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    box-sizing:border-box !important;
  }

  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .woocommerce-ordering select,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active select.orderby {
    width:100% !important;
    max-width:100% !important;
    box-sizing:border-box !important;
  }

  /* Never inject the hundreds-page desktop pager into the mobile layout. */
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .bpc-shop-top-pagination--desktop {
    display:none !important;
  }

  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .bpc-shop-mobile-pager {
    clear:both !important;
    float:none !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    margin:16px 0 20px !important;
    padding:8px !important;
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) !important;
    gap:6px !important;
    align-items:center !important;
    border:1px solid rgba(43,33,26,.14) !important;
    background:#fbf9f5 !important;
    box-sizing:border-box !important;
    overflow:hidden !important;
  }

  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .bpc-shop-mobile-pager a,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .bpc-shop-mobile-pager span {
    min-width:0 !important;
    margin:0 !important;
    box-sizing:border-box !important;
    font:650 11px/1.15 Inter,system-ui,-apple-system,"Segoe UI",sans-serif !important;
  }

  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .bpc-shop-mobile-pager a {
    min-height:38px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    padding:8px !important;
    border:1px solid rgba(43,33,26,.18) !important;
    border-radius:7px !important;
    background:#fff !important;
    color:#2b211a !important;
    -webkit-text-fill-color:#2b211a !important;
    text-decoration:none !important;
    white-space:nowrap !important;
  }

  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .bpc-shop-mobile-pager__status {
    padding:0 2px !important;
    color:#5a3b2e !important;
    -webkit-text-fill-color:#5a3b2e !important;
    text-align:center !important;
    white-space:nowrap !important;
  }

  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .woocommerce ul.products {
    clear:both !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:24px 10px !important;
    box-sizing:border-box !important;
  }

  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .woocommerce ul.products li.product {
    min-width:0 !important;
    max-width:100% !important;
    overflow:visible !important;
  }

  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .woocommerce ul.products li.product img,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .woocommerce ul.products li.product a {
    max-width:100% !important;
  }

  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .woocommerce-pagination {
    clear:both !important;
    float:none !important;
    width:100% !important;
    max-width:100% !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    -webkit-overflow-scrolling:touch !important;
  }

  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .woocommerce-pagination ul.page-numbers {
    width:max-content !important;
    max-width:none !important;
    min-width:100% !important;
    flex-wrap:nowrap !important;
    justify-content:flex-start !important;
    padding:4px 1px 8px !important;
  }

  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .bpc-ivory-footer {
    clear:both !important;
    float:none !important;
    width:100% !important;
    max-width:100% !important;
  }
}

/* ==========================================================
   v3.2.5 — MOBILE SHOP STRUCTURAL FLOW RESET
   The mobile shop must be one vertical document flow. This layer
   explicitly neutralises any grid/flex/float layout applied by Astra,
   stale CSS, or third-party catalogue rules to page-level wrappers.
   ========================================================== */
@media (max-width: 767px) {
  html {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  html body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    overflow-x: hidden !important;
  }

  /* These are direct body children on this theme. They must never share columns. */
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active > .bpc-ref-topbar,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active > .bpc-scroll-hook,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active > .bpc-ref-header,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active > #page,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active > .bpc-ivory-footer {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    float: none !important;
    clear: both !important;
    position: relative !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }

  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active #page,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active #content,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .site-content,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .site-content > .ast-container,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .ast-container,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active #primary,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .content-area,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .site-main,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .ast-woocommerce-container,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .woocommerce {
    grid-column: 1 / -1 !important;
    float: none !important;
    clear: both !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }

  /* The desktop Astra sidebar must not reserve a second column on phones. */
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active #secondary,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .widget-area.secondary {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .site-content {
    padding: 24px 12px 64px !important;
  }

  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .woocommerce-products-header {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 24px !important;
    padding: 0 0 20px !important;
    overflow: hidden !important;
  }

  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .woocommerce-products-header__title,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .woocommerce-products-header .page-title,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active h1.page-title,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .entry-title {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    font-size: clamp(38px, 12vw, 52px) !important;
    line-height: 1 !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .woocommerce-result-count,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .woocommerce-ordering,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .bpc-shop-mobile-pager,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .woocommerce ul.products,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .woocommerce-pagination {
    grid-column: 1 / -1 !important;
    float: none !important;
    clear: both !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .woocommerce ul.products:not(.elementor-grid) {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 24px 10px !important;
  }

  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .woocommerce ul.products li.product {
    min-width: 0 !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 !important;
    float: none !important;
  }

  /* Footer only starts after the catalogue/pagination, never beside it. */
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .bpc-ivory-footer {
    clear: both !important;
    margin-top: 0 !important;
  }
}

/* ==========================================================
   v3.2.6 — MOBILE SHOP FOOTER + BOTTOM PAGER FINAL FIX
   Keep the custom footer after the complete catalogue and make it truly
   mobile-first. The large native WooCommerce pager is replaced visually by
   compact previous/current/next controls on phones.
   ========================================================== */
@media (max-width: 767px) {
  /* The custom footer must never participate in catalogue/grid geometry. */
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .bpc-ivory-footer {
    position: relative !important;
    inset: auto !important;
    z-index: 1 !important;
    display: block !important;
    clear: both !important;
    float: none !important;
    order: 9999 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    overflow: hidden !important;
    content-visibility: visible !important;
    contain: none !important;
  }

  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .bpc-footer-main {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 28px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 42px 24px 34px !important;
    box-sizing: border-box !important;
  }

  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .bpc-footer-brand,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .bpc-footer-column,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .bpc-footer-socials {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .bpc-footer-brand p {
    max-width: 100% !important;
    margin-top: 16px !important;
  }

  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .bpc-footer-bottom {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 18px 24px 26px !important;
    box-sizing: border-box !important;
  }

  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .bpc-footer-bottom > div {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 14px !important;
  }

  /* Never show the huge native page-number row on phones. */
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active nav.woocommerce-pagination {
    display: none !important;
  }

  /* Compact top and bottom pagers. */
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .bpc-shop-mobile-pager {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) auto minmax(0,1fr) !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .bpc-shop-mobile-pager--bottom {
    margin: 30px 0 8px !important;
  }

  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .bpc-shop-mobile-pager__prev,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .bpc-shop-mobile-pager__next {
    white-space: normal !important;
    text-align: center !important;
  }
}

/* ==========================================================
   v3.2.9 — MOBILE CATEGORY VISUAL ORDER
   Footer is structurally after #page; controls stay together under title.
   ========================================================== */
@media (max-width: 767px) {
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .bpc-ivory-footer {
    order: initial !important;
    margin-top: 36px !important;
  }

  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .woocommerce-products-header {
    margin-bottom: 18px !important;
    padding-bottom: 16px !important;
  }

  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .woocommerce-result-count {
    margin: 0 0 12px !important;
    padding: 0 !important;
  }

  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .woocommerce-ordering {
    margin: 0 0 18px !important;
    padding: 0 !important;
  }

  /* GTranslate must not cover the archive title. */
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .gt_switcher_wrapper,
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .gt_float_switcher {
    position: fixed !important;
    left: 12px !important;
    right: auto !important;
    top: auto !important;
    bottom: 14px !important;
    z-index: 9998 !important;
    margin: 0 !important;
  }
}

/* ==========================================================
   v3.2.10 — MOBILE FOOTER MUST NEVER FLOAT OR BE REORDERED
   The footer is rendered by wp_footer in its natural document position.
   No fixed/sticky/absolute/order behavior is allowed on catalogue archives.
   ========================================================== */
@media (max-width: 767px) {
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .bpc-ivory-footer,
  body.post-type-archive-product.bpc-ivory-active .bpc-ivory-footer {
    position: static !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    z-index: auto !important;
    float: none !important;
    clear: both !important;
    order: initial !important;
    transform: none !important;
    translate: none !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 36px 0 0 !important;
    overflow: visible !important;
    contain: none !important;
    content-visibility: visible !important;
  }
}


/* v3.2.11 — footer now lives inside Astra's footer hook; never overlay catalogue. */
@media (max-width: 767px) {
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .bpc-ivory-footer {
    position: static !important;
    inset: auto !important;
    z-index: auto !important;
    transform: none !important;
    margin-top: 36px !important;
    clear: both !important;
  }
}


/* ==========================================================
   v3.2.16 — DIRECT PAGE CHOOSER + CLEAN SCROLL RETURN
   ========================================================== */
.bpc-shop-desktop-page-jump{
  display:flex;align-items:center;justify-content:center;gap:8px;
  margin:0 auto 12px;color:#4c3a2e;font:650 12px/1.2 Inter,system-ui,-apple-system,"Segoe UI",sans-serif;
}
.bpc-shop-desktop-page-jump select,
.bpc-shop-page-jump{
  min-height:40px;padding:7px 34px 7px 12px;border:1px solid rgba(43,33,26,.22);
  border-radius:8px;background:#fff;color:#2b211a!important;-webkit-text-fill-color:#2b211a!important;
  font:700 12px/1.1 Inter,system-ui,-apple-system,"Segoe UI",sans-serif;cursor:pointer;
}
.bpc-shop-desktop-page-jump small{font-size:11px;color:#6b5c50}
.bpc-shop-page-jump-wrap{display:block;min-width:0;margin:0}

@media(max-width:767px){
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .bpc-shop-mobile-pager{
    grid-template-columns:minmax(0,1fr) minmax(118px,auto) minmax(0,1fr)!important;
  }
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .bpc-shop-page-jump-wrap{
    min-width:118px!important;max-width:152px!important;width:100%!important;
  }
  body:is(.woocommerce-shop,.tax-product_cat,.tax-product_tag,.tax-product_brand).bpc-ivory-active .bpc-shop-page-jump{
    width:100%!important;min-width:0!important;max-width:100%!important;height:40px!important;padding:6px 26px 6px 8px!important;
    font-size:10.5px!important;text-align:center!important;
  }
}
