/* ===================================================
   BeRocket Filter Group 239 layout + tidy
   NOTE: This targets a generated Kadence column class.
   If that block is rebuilt, the class can change.
   Best long-term: add a custom class to the column and use that instead.
=================================================== */

/* Remove empty spacer paragraph Kadence sometimes outputs */
.kadence-column451_464d0f-63 > .kt-inside-inner-col > p:empty{
  display: none !important;
}
.kadence-column451_464d0f-63 > .kt-inside-inner-col > br{
  display: none !important;
}

/* Make the filter widgets lay out as a grid */
.kadence-column451_464d0f-63 > .kt-inside-inner-col{
  display: grid;
  gap: 18px;
  align-items: stretch;
}

/* Desktop: 4 across */
@media (min-width: 1025px){
  .kadence-column451_464d0f-63 > .kt-inside-inner-col{
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Tablet: 2 across */
@media (max-width: 1024px) and (min-width: 640px){
  .kadence-column451_464d0f-63 > .kt-inside-inner-col{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile: 1 column */
@media (max-width: 639px){
  .kadence-column451_464d0f-63 > .kt-inside-inner-col{
    grid-template-columns: 1fr;
  }
}

/* Each filter widget cell */
.kadence-column451_464d0f-63 .bapf_wid_239.berocket_inline_filters_rewidth{
  width: auto !important;
  min-width: 0 !important;
  margin: 0 !important;

  padding: 12px 14px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 16px;
  background: #fff;
  box-sizing: border-box;
}

/* Head */
.kadence-column451_464d0f-63 .bapf_wid_239 .bapf_head{
  margin: 0 0 15px !important;
}
.kadence-column451_464d0f-63 .bapf_wid_239 .bapf_head h3{
  margin: 0 !important;
  font-size: 17px;
  line-height: 1.2;
}

/* Slider layout: values above, slider below, aligned to the same inset */
.kadence-column451_464d0f-63 .bapf_wid_239 .bapf_slidr_all{
  display: grid;
  grid-template-columns: 1fr 1fr;
  row-gap: 10px;
  column-gap: 10px;
  padding: 0 10px; /* provides inset for values and track */
}

/* Slider track spans both columns and stays inside the same inset */
.kadence-column451_464d0f-63 .bapf_wid_239 .bapf_slidr_main{
  grid-column: 1 / -1;
  margin: 0 !important;
  max-width: none !important;
}

/* Reset plugin positioning so grid can align the values */
.kadence-column451_464d0f-63 .bapf_wid_239 .bapf_slidr_all .bapf_from,
.kadence-column451_464d0f-63 .bapf_wid_239 .bapf_slidr_all .bapf_to{
  position: static !important;
  float: none !important;
  margin: 0 !important;
  width: auto !important;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

.kadence-column451_464d0f-63 .bapf_wid_239 .bapf_slidr_all .bapf_from{
  justify-self: start;
  text-align: left;
}

.kadence-column451_464d0f-63 .bapf_wid_239 .bapf_slidr_all .bapf_to{
  justify-self: end;
  text-align: right;
}

/* If BeRocket "mobile/tablet hidden" classes are present, ensure visible on desktop */
@media (min-width: 1025px){
  .bapf_sngl_hd_mobile,
  .bapf_sngl_hd_tablet{
    opacity: 1 !important;
    visibility: visible !important;
    height: auto !important;
    overflow: visible !important;
    transform: none !important;
    filter: none !important;
  }

  .berocket_inline_filters,
  .berocket_inline_filters *{
    opacity: 1 !important;
    visibility: visible !important;
  }
}

select.orderby {    
	font-weight: 300;
}

.berocket_single_filter_widget .bapf-clean-rounded li label {
	color: var(--global-palette4);
}

.bapf_slidr_main.ui-widget-content .ui-slider-range, .berocket_filter_price_slider.ui-widget-content .ui-slider-range {
    background: none repeat scroll 0 0 var(--global-palette4);
}
.kadence-column451_464d0f-63 .bapf_wid_239 .bapf_slidr_main {
    grid-column: 1 / -1;
    margin: 0 !important;
    max-width: none !important;
    background: var(--global-palette1);
}

.berocket_single_filter_widget .bapf-clean-rounded li label:hover {
    border-color: var(--global-palette3) !important;
    color: var(--global-palette3);
	background: var(--global-palette7);
}


.berocket_single_filter_widget .bapf-clean-rounded li.checked label {
    border-color: var(--global-palette1);
    color: var(--global-palette3);
    padding-left: 26px;
}


.bapf_slidr_main.ui-widget-content .ui-slider-handle
 {
    background: var(--global-palette3);
}

/* BeRocket clean-rounded: make checked state use site colours (not blue) */
.berocket_single_filter_widget .bapf-clean-rounded li > label{
  position: relative; /* needed for :before absolute positioning */
}

/* Checked pill colours */
.berocket_single_filter_widget .bapf-clean-rounded li.checked label{
  border-color: var(--global-palette5) !important;
  color: var(--global-palette5) !important;
  /* keep their padding-left so the tick has room */
  padding-left: 26px !important;
}

/* Checked tick colours */
.berocket_single_filter_widget .bapf-clean-rounded li.checked label:before{
  border-color: var(--global-palette5) !important;
}

.berocket_single_filter_widget .bapf-clean-rounded li label {
	border-color: var(--global-palette7) !important;
}

/* Mobile + tablet: remove the extra Kadence row padding that creates the gap */
@media (max-width: 1040px) {
  .kb-row-layout-id451_e9e036-fb > .kt-row-column-wrap {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  /* Optional: if there is still a little gap from inner wrappers */
  .kb-row-layout-id451_e9e036-fb .kt-inside-inner-col {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
}


/* @media (max-width: 1040px) {
  .kb-row-layout-id451_376109-3d {
    display: none !important;
  }
}*/
@media (max-width: 1040px) {
  /* Mobile/Tablet: collapse the Kadence row that holds the (hidden) inline filters */
  .kb-row-layout-id451_376109-3d {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
  }

  .kb-row-layout-id451_376109-3d .kt-row-column-wrap,
  .kb-row-layout-id451_376109-3d .wp-block-kadence-column,
  .kb-row-layout-id451_376109-3d .kt-inside-inner-col {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
  }

  /* If the gap is coming from a spacer pseudo-element */
  .kb-row-layout-id451_376109-3d::before,
  .kb-row-layout-id451_376109-3d::after {
    content: none !important;
    display: none !important;
  }
}
@media (max-width: 1040px) {

  /* 1) Remove Kadence row padding for the hidden inline filters row */
  .kb-row-layout-id451_e9e036-fb > .kt-row-column-wrap {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
  .kb-row-layout-id451_e9e036-fb .kt-inside-inner-col {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  /* 2) Remove the huge BeRocket margins around the SHOW FILTERS button */
a.berocket_element_above_products_is_hide_toggle.berocket_ajax_filters_toggle {
  margin: 8px 0 10px !important;
  color: var(--global-palette4) !important;
}

  /* Optional: if the wrapper itself also has margins/padding */
  .berocket_element_above_products {
    margin: 0 !important;
    padding: 0 !important;
  }
}
/* BeRocket mobile/tablet: 2 across + smaller fonts (toggle-safe) */
@media (max-width: 1040px) {

  /* Only when open (do not force display when hidden) */
  .berocket_element_above_products_is_hide:not([style*="display:none"]):not([style*="display: none"]) {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px 14px !important;
    align-items: start;
  }

  /* Smaller headings */
  .berocket_element_above_products_is_hide .bapf_head h3 {
    font-size: 15px !important;
    line-height: 1.2 !important;
    margin: 0 0 6px !important;
    font-weight: 400 !important;
  }

  /* Smaller option/value text */
  .berocket_element_above_products_is_hide .bapf_body,
  .berocket_element_above_products_is_hide label,
  .berocket_element_above_products_is_hide .bapf_from,
  .berocket_element_above_products_is_hide .bapf_to {
    font-size: 13px !important;
    line-height: 1.3 !important;
  }

  .berocket_element_above_products_is_hide ul li {
    margin: 6px 0 !important;
  }
}

/* Very small phones: 1 column */
@media (max-width: 420px) {
  .berocket_element_above_products_is_hide:not([style*="display:none"]):not([style*="display: none"]) {
    grid-template-columns: 1fr !important;
  }
}
/* ===================================================
   MOBILE: Remove the gap ABOVE BeRocket toggle on product archives
   and set toggle text to global palette colour
=================================================== */


  @media (max-width: 1040px) {
  .woocommerce .kt-row-column-wrap,
  .woocommerce .kt-inside-inner-col {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
}

  /* 2) Give the BeRocket toggle some breathing room (and set to global palette colour) */
  .woocommerce .berocket_element_above_products {
    margin: 0 0 10px !important;
    padding: 0 !important;
  }

  .woocommerce a.berocket_element_above_products_is_hide_toggle.berocket_ajax_filters_toggle {
    margin: 6px 0 10px !important;
    color: var(--global-palette4) !important;
  }
  .woocommerce a.berocket_element_above_products_is_hide_toggle.berocket_ajax_filters_toggle * {
    color: var(--global-palette4) !important;
  }

  /* 3) Un-jam results count + sort: stack, with spacing */
  .woocommerce .woocommerce-result-count {
    margin: 8px 0 10px !important;
    font-size: 14px !important;
  }

  .woocommerce .woocommerce-ordering {
    margin: 0 0 12px !important;
  }
  .woocommerce .woocommerce-ordering select.orderby {
    font-size: 14px !important;
    padding: 8px 10px !important;
  }
  
  /* Make the sort select a stable positioning context */
  .woocommerce .woocommerce-ordering {
    position: relative;
    display: inline-block;
  }

  /* If Kadence adds an arrow via :after on the ordering wrapper */
  .woocommerce .woocommerce-ordering:after {
    top: 50% !important;
    transform: translateY(-50%) !important;
  }

  /* If the arrow is on the select itself (some themes/plugins) */
  .woocommerce .woocommerce-ordering select.orderby {
    padding-right: 14px !important; /* room for the arrow */
  }
  /* When open, add breathing room between the toggle and first filter */
  .berocket_element_above_products_is_hide:not([style*="display:none"]):not([style*="display: none"]) {
    margin-top: 14px !important; /* adjust to taste */
  }
}
/* Force override for the exact filter blocks */
.berocket_inline_filters div[id^="bapf_"].bapf_sfilter{
  margin-bottom: 1px !important;
}

@media (min-width: 1025px){
.kadence-column451_464d0f-63 > .kt-inside-inner-col{
  grid-template-columns: 1fr 1.2fr 1.1fr 1.2fr !important;
}

  .kadence-column451_464d0f-63 #bapf_6 .bapf_body ul{
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }

  .kadence-column451_464d0f-63 #bapf_6 .bapf_body ul li{
    flex: 0 0 auto !important;
    width: auto !important;
    margin: 0 !important;
  }

  .kadence-column451_464d0f-63 #bapf_6 .bapf_body ul li label{
    white-space: nowrap !important;
    width: auto !important;
  }
}

.kadence-column451_464d0f-63 .berocket_single_filter_widget .bapf-clean-rounded li label{
  padding-left: 12px !important;
  padding-right: 12px !important;
}

.kadence-column451_464d0f-63 .berocket_single_filter_widget .bapf-clean-rounded li.checked label{
  padding-left: 22px !important;
  padding-right: 12px !important;
}
