
/* The theme wraps result count + native sort in .woo-listing-top.
   The pilot is printed INSIDE that wrapper. On desktop give it its own
   full-width row; on mobile prevent the global sort-relocation CSS from
   hiding the wrapper when it still contains this filter panel. */
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .woo-listing-top:has(>.bqf-shop){
 display:grid!important;
 grid-template-columns:minmax(0,1fr) auto!important;
 gap:12px 16px!important;align-items:center!important;
 width:100%!important;max-width:100%!important;
}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .woo-listing-top:has(>.bqf-shop)>.bqf-shop{
 grid-column:1/-1!important;
 grid-row:1!important;
 min-width:0!important;
 margin:0 0 4px!important;
}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .woo-listing-top:has(>.bqf-shop)>.woocommerce-result-count{
 grid-column:1!important;grid-row:2!important;margin:0!important;
}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .woo-listing-top:has(>.bqf-shop)>.woocommerce-ordering{
 grid-column:2!important;grid-row:2!important;margin:0!important;
}
@media(max-width:740px){
 body.bq-palette-global-v010:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .bq-cerca.bq-mobile-sort-inline+.woo-listing-top:has(>.bqf-shop){
  display:block!important;max-width:100%!important;
  width:100%!important;margin:0 0 18px!important;
 }
 body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .woo-listing-top:has(>.bqf-shop)>.bqf-shop{
  display:block!important;margin:0!important;
 }
 body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .woo-listing-top:has(>.bqf-shop)>.woocommerce-result-count{
  display:none!important;
 }
}
/* BIOTONIQ — SHOP + CATEGORY + BRAND FILTERS v003 / permanent Woo archive release.
   Intentionally no product card, sorting, search or sticky button styling.
   Uses native HTML details + GET form, no custom query AJAX.
*/
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .bqf-shop{
 --bqf-line:rgba(36,41,44,.18);
 --bqf-ink:var(--bq-ui-text-primary,#24292C);
 --bqf-muted:var(--bq-ui-text-secondary,#566166);
 --bqf-accent:var(--bq-ui-action-primary-bg,#00C9D2);
 --bqf-focus:var(--bq-ui-interactive,#007981);
 box-sizing:border-box;
 width:100%;margin:12px 0 22px;padding:0;clear:both;
 color:var(--bqf-ink);
 font-family:var(--theme-font-family,"Manrope",system-ui,sans-serif);
}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .bqf-shop *{box-sizing:border-box}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .bqf-panel{
 margin:0;border:1px solid var(--bqf-line);
 background:var(--bq-ui-surface-page,#F4F5F2);border-radius:8px;
 overflow:clip;
}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .bqf-trigger{
 display:flex;align-items:center;justify-content:space-between;gap:16px;
 min-height:48px;padding:11px 17px;cursor:pointer;
 background:var(--bq-ui-surface-card,#FFF);list-style:none;
 font-size:14px;line-height:1.4;color:var(--bqf-ink);
}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .bqf-trigger::-webkit-details-marker{display:none}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .bqf-trigger-left{display:inline-flex;align-items:center;gap:10px}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .bqf-filter-icon{font-size:21px;line-height:1;color:var(--bqf-focus)}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .bqf-count{color:var(--bqf-muted);font-size:12px}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .bqf-chevron{
 width:8px;height:8px;border-right:1.6px solid currentColor;
 border-bottom:1.6px solid currentColor;transform:rotate(45deg);transition:transform .16s;
}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) details[open]>.bqf-trigger .bqf-chevron{transform:rotate(225deg)}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .bqf-form{margin:0;padding:20px;border-top:1px solid var(--bqf-line)}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .bqf-groups{
 display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:22px;
}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .bqf-fieldset{margin:0;padding:0;border:0;min-width:0}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .bqf-fieldset legend{
 padding:0 0 12px;margin:0;color:var(--bqf-ink);
 font-size:15px;font-weight:700;line-height:1.4;
}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .bqf-checklist{display:flex;flex-direction:column;gap:8px;max-height:215px;overflow-y:auto;padding:0 7px 0 0}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .bqf-checklist label,
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .bqf-toggle{
 display:flex;gap:10px;align-items:flex-start;min-height:24px;
 font-size:13px;line-height:1.5;color:var(--bqf-ink);cursor:pointer;
}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .bqf-checklist input,
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .bqf-toggle input{
 margin:3px 0 0;flex:0 0 16px;width:16px;height:16px;accent-color:var(--bqf-focus);
}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .bqf-price{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .bqf-price label{display:flex;flex-direction:column;gap:6px;font-size:12px;color:var(--bqf-muted)}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .bqf-price input{
 display:block;width:100%;min-width:0;height:42px;min-height:42px;
 border:1px solid var(--bqf-line);border-radius:5px;
 padding:8px 10px;background:#fff;color:var(--bqf-ink);
 font:500 15px/1.3 var(--theme-font-family,"Manrope",system-ui,sans-serif);
}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .bqf-help{margin:9px 0 0;font-size:11px;line-height:1.45;color:var(--bqf-muted)}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .bqf-actions{
 display:flex;align-items:center;justify-content:flex-end;gap:22px;
 border-top:1px solid var(--bqf-line);margin-top:20px;padding-top:16px;
}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .bqf-reset{font-size:13px;font-weight:600;color:var(--bqf-muted);text-underline-offset:3px}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .bqf-apply{
 display:inline-flex!important;align-items:center;justify-content:center;
 min-height:44px!important;padding:10px 22px!important;border:1px solid var(--bqf-accent)!important;
 border-radius:4px!important;background:var(--bqf-accent)!important;
 color:var(--bqf-ink)!important;font-size:13px!important;font-weight:700!important;
 line-height:1.3!important;white-space:nowrap!important;cursor:pointer;
}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .bqf-apply:hover{background:var(--bqf-focus)!important;color:#fff!important;border-color:var(--bqf-focus)!important}
body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .bqf-shop :is(button,a,summary,input):focus-visible{
 outline:3px solid var(--bqf-focus)!important;outline-offset:3px!important;
}
@media(max-width:850px){
 body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .bqf-groups{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:23px}
}
@media(max-width:600px){
 body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .bqf-shop{margin:10px 0 18px}
 body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .bqf-form{padding:16px}
 body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .bqf-groups{grid-template-columns:minmax(0,1fr);gap:18px}
 body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .bqf-fieldset:not(:first-child){border-top:1px solid var(--bqf-line);padding-top:15px}
 body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .bqf-checklist{max-height:150px}
 body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .bqf-actions{justify-content:space-between;gap:12px}
 body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .bqf-apply{padding:10px 14px!important}
}
@media(prefers-reduced-motion:reduce){
 body:is(.woocommerce-shop,.tax-product_cat,.tax-product_brand) .bqf-chevron{transition:none}
}

/* Brand experience #148 and MoleQlar #149 hide the entire native listing
   toolbar in compact layouts. Restore the wrapper ONLY when our shared
   filter component is inside it; leave standalone editorial layouts alone. */
html body.tax-product_brand.bqbr-active.bqbr-minimal .woo-listing-top:has(>.bqf-shop),
html body.tax-product_brand.term-moleqlar.bqmx-compact-catalog .woo-listing-top:has(>.bqf-shop){
 display:grid!important;
 grid-template-columns:minmax(0,1fr) auto!important;
}
@media(max-width:740px){
 /* The approved mobile sort script moves the native <form> beside search.
    Keep the filter panel visible rather than hiding its old wrapper. */
 html body.bq-palette-global-v010.tax-product_brand.bqbr-active .bq-cerca.bq-mobile-sort-inline+.woo-listing-top:has(>.bqf-shop),
 html body.bq-palette-global-v010.tax-product_brand.term-moleqlar .bq-cerca.bq-mobile-sort-inline+.woo-listing-top:has(>.bqf-shop){
  display:block!important;
  width:100%!important;
  margin:0 0 18px!important;
 }
}
