/*
 * Catalogue archive layout (inc/catalog-layout.php), by Tiago (2026-10): Additional CSS grid,
 * shop-sidebar widget CSS (layout, one-line chips, esthetic filter), in their original order
 * (openspec: catalog-archive). States his script set with the "hidden" attribute are CSS now:
 * the active filters panel shows when it has selections.
 */

/* Native category footer lives inside the catalogue column. Keep its fields
   and FacetWP template; the shared grid puts both bottom sections after filters. */
@media(max-width:849px){.category-page-row:has(.gf-bb-category-bottom) .gf-bb-category-bottom{width:calc(100% + 30px);margin-left:-15px}}
@media(min-width:850px){
 .category-page-row:has(.gf-bb-category-bottom){display:grid;max-width:none;grid-template-columns:minmax(0,1fr) minmax(0,calc(min(100%,1200px)*.25)) minmax(0,calc(min(100%,1200px)*.75)) minmax(0,1fr);grid-template-rows:min-content min-content auto min-content auto auto;align-items:start}
 .category-page-row:has(.gf-bb-category-bottom):before,.category-page-row:has(.gf-bb-category-bottom):after{content:none!important;display:none!important}
 .category-page-row:has(.gf-bb-category-bottom)>.large-3{grid-column:2;grid-row:1 / span 4;width:auto;max-width:none;align-self:start}
 .category-page-row:has(.gf-bb-category-bottom)>.large-9,.category-page-row:has(.gf-bb-category-bottom)>.large-9>.shop-container{display:contents}
 .category-page-row:has(.gf-bb-category-bottom) .facetwp-template{display:grid;grid-column:1 / -1;grid-row:1 / span 6;grid-template-columns:subgrid;grid-template-rows:subgrid;min-width:0}
 .category-page-row:has(.gf-bb-category-bottom) .facetwp-template>.term-description{grid-column:3;grid-row:1;margin-left:15px;margin-right:15px}
 .category-page-row:has(.gf-bb-category-bottom) .facetwp-template>.woocommerce-notices-wrapper{grid-column:3;grid-row:2;margin-left:15px;margin-right:15px}
 .category-page-row:has(.gf-bb-category-bottom) .facetwp-template>.products{grid-column:3;grid-row:3;width:auto;margin-left:5px!important;margin-right:5px!important;align-self:start}
 .category-page-row:has(.gf-bb-category-bottom) .facetwp-template>.woocommerce-info,.category-page-row:has(.gf-bb-category-bottom) .facetwp-template>.woocommerce-no-products-found{grid-column:3;grid-row:3;margin-left:15px;margin-right:15px;align-self:start}
 .category-page-row:has(.gf-bb-category-bottom) .facetwp-template>.container{grid-column:3;grid-row:4;width:auto;max-width:none;margin-left:15px;margin-right:15px}
 .category-page-row:has(.gf-bb-category-bottom) .facetwp-template>hr{display:none}
 .category-page-row:has(.gf-bb-category-bottom) .gf-bb-category-bottom--faq{grid-column:1 / -1;grid-row:5;width:100%;margin-left:0}
 .category-page-row:has(.gf-bb-category-bottom) .gf-bb-category-bottom--editorial{grid-column:1 / -1;grid-row:6;width:100%;margin-left:0}
}

/* Shared catalogue presentation derived from the currently served widget. */
body.gf-bb-catalog-ready .gf-bb-shop-bottom-slot[hidden]{display:none!important;}
/* Match the category editorial widths already served at this breakpoint. */
@media(min-width:1440px){
 body.wp-child-theme-buyback.woocommerce-shop.gf-bb-catalog-ready .gf-bb-shop-top{max-width:var(--gf-bb-layout-max);}
 body.wp-child-theme-buyback.woocommerce-shop.gf-bb-catalog-ready .gf-bb-shop-bottom-slot .section-content>.row{max-width:var(--gf-bb-layout-max);}
 body.wp-child-theme-buyback.woocommerce-shop.gf-bb-catalog-ready .gf-bb-shop-bottom-slot .col.large-12>.col-inner>.text{max-width:1200px;margin-inline:auto;}
}

/* BuyBack category V2. Native category fields, catalogue and controls. */
body.gf-bb-catalog-ready .gf-bb-category-top{max-width:1200px;margin:0 auto;padding:24px 15px 28px;font-family:Lato,Arial,sans-serif;}
body.gf-bb-catalog-ready .gf-bb-category-top .woocommerce-breadcrumb{font-size:12px;line-height:1.6;text-transform:none;letter-spacing:0;font-weight:400;margin:0 0 14px;color:#647080;white-space:normal;}
body.gf-bb-catalog-ready .gf-bb-category-top .woocommerce-breadcrumb a{color:inherit;}
body.gf-bb-catalog-ready .gf-bb-category-top .woocommerce-breadcrumb .divider{margin:0 6px;opacity:.55;}
body.gf-bb-catalog-ready .gf-bb-top-card{background:#fff;border:1px solid #e0e6eb;border-radius:10px;padding:20px 24px;}
body.gf-bb-catalog-ready .gf-bb-top-card h1{font-family:Lato,Arial,sans-serif;font-size:24px;line-height:1.35;font-weight:700;letter-spacing:0;margin:0 0 10px;color:#111820;}
body.gf-bb-catalog-ready .gf-bb-top-card p{font-size:15px;line-height:1.65;margin:0;color:#647080;}
body.gf-bb-catalog-ready .gf-bb-category-native-title-used{display:none!important;}
body.gf-bb-category-v2-has-top .facetwp-template>.term-description{display:none!important;}
body.gf-bb-catalog-ready .gf-bb-category-controls{display:none;}
body.gf-bb-catalog-ready .gf-bb-category-controls-anchor{height:0;}
body.gf-bb-catalog-ready .category-page-row{padding-top:0!important;}
body.gf-bb-catalog-ready .gf-bb-category-sort{font-family:Lato,Arial,sans-serif;background:#fff;border:1px solid #e0e6eb;border-radius:14px;margin:0 0 12px;color:#111820;overflow:hidden;}
body.gf-bb-catalog-ready .gf-bb-category-sort summary{display:flex;align-items:center;gap:10px;min-height:56px;padding:14px 16px;cursor:pointer;list-style:none;font-size:16px;font-weight:700;line-height:1.4;}
body.gf-bb-catalog-ready .gf-bb-category-sort summary::-webkit-details-marker{display:none;}
body.gf-bb-catalog-ready .gf-bb-category-sort summary i{color:#647080;font-size:19px;}
body.gf-bb-catalog-ready .gf-bb-category-sort summary:after{content:'';width:7px;height:7px;border-left:1.5px solid #647080;border-top:1.5px solid #647080;transform:rotate(45deg);margin-left:auto;flex-shrink:0;}
body.gf-bb-catalog-ready .gf-bb-category-sort:not([open]) summary:after{transform:rotate(225deg);}
body.gf-bb-catalog-ready .gf-bb-category-sort fieldset{border:0;padding:0 16px 12px;margin:0;min-width:0;}
body.gf-bb-catalog-ready .gf-bb-category-sort label{display:flex;align-items:center;gap:10px;min-height:44px;padding:7px 0;margin:0;font-size:13px;line-height:1.45;font-weight:400;color:#647080;cursor:pointer;}
body.gf-bb-catalog-ready .gf-bb-category-sort input{accent-color:#028543;width:16px;height:16px;margin:0;flex:0 0 16px;}
body.gf-bb-catalog-ready .gf-bb-category-sort label:has(input:checked){color:#028543;font-weight:700;}
body.gf-bb-catalog-ready .gf-bb-category-sort input:focus-visible,body.gf-bb-catalog-ready .gf-bb-category-sort summary:focus-visible,body.gf-bb-catalog-ready .gf-bb-category-controls a:focus-visible,body.gf-bb-catalog-ready .gf-bb-category-controls select:focus-visible{outline:3px solid #028543;outline-offset:3px;}
body.gf-bb-catalog-ready .gf-bb-category-listing-toolbar{display:flex;align-items:center;min-height:56px;margin:0 15px 16px;}
body.gf-bb-catalog-ready .gf-bb-category-listing-toolbar .woocommerce-result-count{display:block!important;font-family:Lato,Arial,sans-serif;font-size:14px;line-height:1.4;margin:0;color:#647080;}

@media(min-width:720px){
 body.gf-bb-catalog-ready .category-page-row{display:grid!important;max-width:none!important;grid-template-columns:minmax(0,1fr) minmax(0,300px) minmax(0,900px) minmax(0,1fr);grid-template-rows:min-content min-content min-content auto min-content auto auto!important;align-items:start;}
 body.gf-bb-catalog-ready .category-page-row:before,body.gf-bb-catalog-ready .category-page-row:after{display:none!important;content:none!important;}
 body.gf-bb-catalog-ready .category-page-row>.large-3{display:block!important;grid-column:2;grid-row:1 / span 5;width:auto;max-width:none;padding:0 15px;align-self:start;}
 body.gf-bb-catalog-ready .category-page-row>.large-9,body.gf-bb-catalog-ready .category-page-row>.large-9>.shop-container{display:contents!important;}
 body.gf-bb-catalog-ready .category-page-row .gf-bb-category-listing-toolbar{grid-column:3;grid-row:1;}
 body.gf-bb-catalog-ready .category-page-row .gf-bb-active-filters{grid-column:3;grid-row:2;margin-left:15px;margin-right:15px;}
 body.gf-bb-catalog-ready .category-page-row .gf-bb-active-filters:not(:has(.facetwp-selection-value)){display:none!important;}
 body.gf-bb-catalog-ready .category-page-row .facetwp-template{display:grid;grid-column:1 / -1;grid-row:1 / span 7!important;grid-template-columns:subgrid;grid-template-rows:subgrid;min-width:0;}
 body.gf-bb-catalog-ready .category-page-row .facetwp-template>.woocommerce-notices-wrapper{grid-column:3;grid-row:3!important;margin-left:15px;margin-right:15px;}
 body.gf-bb-catalog-ready .category-page-row .facetwp-template>.products{grid-column:3;grid-row:4!important;width:auto;margin-left:5px!important;margin-right:5px!important;align-self:start;}
 body.gf-bb-catalog-ready .category-page-row .facetwp-template>.woocommerce-info,body.gf-bb-catalog-ready .category-page-row .facetwp-template>.woocommerce-no-products-found{grid-column:3;grid-row:4!important;margin-left:15px;margin-right:15px;align-self:start;}
 body.gf-bb-catalog-ready .category-page-row .facetwp-template>.container{grid-column:3;grid-row:5!important;width:auto;max-width:none;margin-left:15px;margin-right:15px;}
 body.gf-bb-catalog-ready .category-page-row .facetwp-template>hr{display:none!important;}
 body.gf-bb-catalog-ready .category-page-row .gf-bb-category-bottom--faq{grid-column:1 / -1;grid-row:6!important;width:100%;margin-left:0;}
 body.gf-bb-catalog-ready .category-page-row .gf-bb-category-bottom--editorial{grid-column:1 / -1;grid-row:7!important;width:100%;margin-left:0;}
 body.gf-bb-catalog-ready .category-page-row .gf-bb-filter-status{grid-column:3;}
}
@media(min-width:720px) and (max-width:1230px){
 body.gf-bb-catalog-ready .category-page-row{grid-template-columns:0 minmax(0,25%) minmax(0,75%) 0;}
}
@media(min-width:720px) and (max-width:999px){
 body.gf-bb-catalog-ready .category-page-row{grid-template-columns:0 250px minmax(0,1fr) 0;}
 body.gf-bb-catalog-ready .category-page-row .products>.product{width:50%;max-width:50%;flex-basis:50%;}
 body.gf-bb-catalog-ready .category-page-row .gf-bb-category-sort summary{font-size:15px;}
}
@media(max-width:719px){
 body.gf-bb-catalog-ready #header{height:var(--gf-bb-category-header-height,84px)!important;min-height:0!important;}
 body.gf-bb-catalog-ready #header .header-wrapper,body.gf-bb-catalog-ready #header .header-wrapper.stuck{position:fixed!important;top:var(--gf-bb-category-header-top,0px)!important;left:0!important;right:0!important;transform:none!important;visibility:visible!important;opacity:1!important;background:#f7f8f9!important;z-index:30;}
 body.gf-bb-catalog-ready .gf-bb-category-top{padding:20px 16px 24px;}
 body.gf-bb-catalog-ready .gf-bb-top-card{padding:18px 16px;}
 body.gf-bb-catalog-ready .gf-bb-top-card h1{font-size:22px;}
 body.gf-bb-catalog-ready .gf-bb-top-card p{font-size:14px;line-height:1.6;}
 body.gf-bb-catalog-ready .gf-bb-category-sort,body.gf-bb-catalog-ready .gf-bb-category-listing-toolbar{display:none!important;}
 body.gf-bb-catalog-ready .gf-bb-category-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:center;gap:0;width:100%;height:58px;margin:0 0 20px;background:#fff;border-top:1px solid #e0e6eb;border-bottom:1px solid #e0e6eb;z-index:1000;font:600 13px/1.35 Lato,Arial,sans-serif;}
 body.gf-bb-catalog-ready .gf-bb-category-controls.gf-bb-category-controls-pinned{position:fixed;left:0;right:0;top:var(--gf-bb-category-controls-top,84px);margin-bottom:0;box-shadow:0 5px 12px #1e23270d;}
 body.gf-bb-catalog-ready .gf-bb-category-controls .woocommerce-ordering{position:relative;float:none;display:block;width:100%;height:44px;margin:0;border-right:1px solid #e0e6eb;}
 body.gf-bb-catalog-ready .gf-bb-category-mobile-order-label{display:flex;align-items:center;justify-content:center;gap:9px;height:100%;color:#111820;}
 body.gf-bb-catalog-ready .gf-bb-category-mobile-order-label:after{content:'';width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);margin-top:-3px;}
 body.gf-bb-catalog-ready .gf-bb-category-controls .orderby,body.gf-bb-catalog-ready .gf-bb-category-controls .gf-bb-sort-select{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer;}
 body.gf-bb-catalog-ready .gf-bb-category-controls .woocommerce-ordering:focus-within{outline:3px solid #028543;outline-offset:-3px;}
 body.gf-bb-catalog-ready .gf-bb-category-mobile-count{text-align:center;color:#647080;white-space:nowrap;padding:0 4px;}
 body.gf-bb-catalog-ready .gf-bb-category-controls .category-filtering{display:flex!important;align-items:center;justify-content:center;margin:0;height:44px;border-left:1px solid #e0e6eb;}
 body.gf-bb-catalog-ready .gf-bb-category-controls .category-filtering .inline-block{display:none;}
 body.gf-bb-catalog-ready .gf-bb-category-controls .filter-button{display:flex;align-items:center;justify-content:center;flex-direction:row-reverse;gap:8px;width:100%;height:44px;padding:0;margin:0;font:inherit;text-transform:none;color:#111820;}
 body.gf-bb-catalog-ready .gf-bb-category-controls .filter-button i{font-size:16px;}
 body.gf-bb-catalog-ready .gf-bb-category-controls .filter-button strong{font:inherit;}
 body.gf-bb-catalog-ready .gf-bb-active-filters{margin-top:0;}
 body.gf-bb-catalog-ready .category-page-row>.large-9{padding-top:0;}
 body.gf-bb-catalog-ready #main{padding-top:0;}
 /* Native header is at 1001; native drawers and search overlays remain above it.
    Product badges and image tools are at 21 and must stay behind the controls.
    Use an opaque fallback and a dense frosted surface when backdrop blur exists. */
 @supports ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  body.gf-bb-catalog-ready #header .header-wrapper,body.gf-bb-catalog-ready #header .header-wrapper.stuck{background:rgba(247,248,249,.96)!important;-webkit-backdrop-filter:blur(24px);backdrop-filter:blur(24px);}
  body.gf-bb-catalog-ready .gf-bb-category-controls.gf-bb-category-controls-pinned{background:rgba(255,255,255,.96);-webkit-backdrop-filter:blur(24px);backdrop-filter:blur(24px);}
 }
}
@media(prefers-reduced-motion:reduce){body.gf-bb-catalog-ready .gf-bb-category-controls,body.gf-bb-catalog-ready #header .header-wrapper{transition:none!important;animation:none!important;}}



/* Category-only FacetWP selections. Reuse the BuyBack tokens already served. */
.gf-bb-catalog-ready .gf-bb-active-filters {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--bb-space-sm, 8px);
  margin: 0 0 var(--bb-space-lg, 16px);
  max-width: 100%;
}
.gf-bb-active-filters:not(:has(.facetwp-selection-value)) { display: none !important; }
.gf-bb-catalog-ready .gf-bb-active-filters .facetwp-selections { min-width: 0; max-width: 100%; }
.gf-bb-catalog-ready .gf-bb-active-filters .facetwp-selections ul,
.gf-bb-catalog-ready .gf-bb-active-filters .facetwp-selections li {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--bb-space-sm, 8px);
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 100%;
}
.gf-bb-catalog-ready .gf-bb-active-filters .facetwp-selection-label { display: none; }
.gf-bb-catalog-ready .gf-bb-active-filters .facetwp-selections,
.gf-bb-catalog-ready .gf-bb-active-filters .facetwp-selections ul,
.gf-bb-catalog-ready .gf-bb-active-filters .facetwp-selections li { display: contents; }
.gf-bb-catalog-ready .gf-bb-active-filters .gf-bb-filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--bb-space-sm, 8px);
  min-width: 44px;
  min-height: 44px;
  max-width: 100%;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid var(--bb-color-border-default, #e3e7ea);
  border-radius: 22px !important;
  background: var(--bb-color-bg-subtle, #f7f8f9);
  box-shadow: none;
  color: var(--bb-color-text-primary, #1e2327);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.1;
  text-transform: none;
  letter-spacing: normal;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.gf-bb-catalog-ready .gf-bb-filter-chip__close { flex: none; font-size: 16px; line-height: 1; }
.gf-bb-catalog-ready .gf-bb-active-filters .gf-bb-active-filters__clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 80px;
  margin: 0;
  padding: 10px 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
  color: var(--bb-color-text-link, #028543);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.1;
  text-transform: none;
  letter-spacing: normal;
  cursor: pointer;
}
.gf-bb-catalog-ready .gf-bb-active-filters .gf-bb-filter-chip:hover { background: var(--bb-color-bg-muted, #f1f3f5); }
.gf-bb-catalog-ready .gf-bb-active-filters .gf-bb-active-filters__clear:hover { text-decoration: underline; }
.gf-bb-catalog-ready .gf-bb-active-filters button:focus-visible {
  outline: 2px solid var(--bb-color-focus-ring, #029046);
  outline-offset: 2px;
}
.gf-bb-catalog-ready .gf-bb-active-filters button:disabled { cursor: wait; opacity: .6; }
.gf-bb-catalog-ready .gf-bb-active-filters__short { display: none; }
.gf-bb-catalog-ready .gf-bb-filter-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
/* The existing category footer uses a shared subgrid on desktop. Add a row
   only while selections are visible, preserving its full-width footer. */
@media (min-width: 850px) {
  .gf-bb-catalog-ready .category-page-row:has(.gf-bb-category-bottom):has(.gf-bb-active-filters:has(.facetwp-selection-value)) { grid-template-rows: min-content min-content min-content auto min-content auto auto; }
  .gf-bb-catalog-ready .category-page-row:has(.gf-bb-category-bottom):has(.gf-bb-active-filters:has(.facetwp-selection-value)) > .large-3 { grid-row: 1 / span 5; }
  .gf-bb-catalog-ready .category-page-row:has(.gf-bb-category-bottom):has(.gf-bb-active-filters:has(.facetwp-selection-value)) .facetwp-template { grid-row: 1 / span 7; }
  .gf-bb-catalog-ready .category-page-row:has(.gf-bb-category-bottom) .gf-bb-active-filters { grid-column: 3; grid-row: 2; margin-inline: 15px; }
  .gf-bb-catalog-ready .category-page-row:has(.gf-bb-category-bottom):has(.gf-bb-active-filters:has(.facetwp-selection-value)) .facetwp-template > .woocommerce-notices-wrapper { grid-row: 3; }
  .gf-bb-catalog-ready .category-page-row:has(.gf-bb-category-bottom):has(.gf-bb-active-filters:has(.facetwp-selection-value)) .facetwp-template > .products,
  .gf-bb-catalog-ready .category-page-row:has(.gf-bb-category-bottom):has(.gf-bb-active-filters:has(.facetwp-selection-value)) .facetwp-template > .woocommerce-info,
  .gf-bb-catalog-ready .category-page-row:has(.gf-bb-category-bottom):has(.gf-bb-active-filters:has(.facetwp-selection-value)) .facetwp-template > .woocommerce-no-products-found { grid-row: 4; }
  .gf-bb-catalog-ready .category-page-row:has(.gf-bb-category-bottom):has(.gf-bb-active-filters:has(.facetwp-selection-value)) .facetwp-template > .container { grid-row: 5; }
  .gf-bb-catalog-ready .category-page-row:has(.gf-bb-category-bottom):has(.gf-bb-active-filters:has(.facetwp-selection-value)) .gf-bb-category-bottom--faq { grid-row: 6; }
  .gf-bb-catalog-ready .category-page-row:has(.gf-bb-category-bottom):has(.gf-bb-active-filters:has(.facetwp-selection-value)) .gf-bb-category-bottom--editorial { grid-row: 7; }
}
@media (max-width: 849px) {
  .gf-bb-catalog-ready .gf-bb-active-filters .gf-bb-filter-chip,
  .gf-bb-catalog-ready .gf-bb-active-filters .gf-bb-active-filters__clear { font-size: 12px; }
  .gf-bb-catalog-ready .gf-bb-active-filters__long { display: none; }
  .gf-bb-catalog-ready .gf-bb-active-filters__short { display: inline; }
  .gf-bb-catalog-ready .gf-bb-active-filters .gf-bb-filter-chip { padding-inline: 12px; border-color: transparent; }
}
@media (max-width: 549px) {
  .gf-bb-catalog-ready .gf-bb-active-filters .gf-bb-filter-chip,
  .gf-bb-catalog-ready .gf-bb-active-filters .gf-bb-active-filters__clear { font-size: 13px; }
  .gf-bb-catalog-ready .gf-bb-active-filters .gf-bb-filter-chip { padding-inline: 14px; }
}

/* Price presets stay visible while the native custom range is collapsed. */
.gf-bb-catalog-ready .gf-bb-price-filter {
  margin: 0 0 var(--bb-space-md, 12px);
  background: var(--bb-color-bg-canvas, #fff);
  border: 1px solid var(--bb-color-border-default, #e3e7ea);
  border-radius: var(--bb-radius-lg, 16px);
}
.gf-bb-catalog-ready .gf-bb-price-filter[hidden] { display: none; }
.gf-bb-catalog-ready .gf-bb-price-filter > .bb-filter[data-facet="preco"] {
  margin: 0;
  border: 0;
  background: transparent;
}
.gf-bb-catalog-ready .gf-bb-price-presets {
  display: flex;
  gap: 6px;
  padding: 0 var(--bb-space-lg, 16px) var(--bb-space-lg, 16px);
}
.gf-bb-catalog-ready .gf-bb-price-presets .gf-bb-price-preset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 8px 6px;
  border: 1px solid transparent;
  border-radius: var(--bb-radius-sm, 8px) !important;
  background: var(--bb-color-bg-support-subtle);
  color: var(--bb-color-text-support);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: none;
  letter-spacing: normal;
  white-space: nowrap;
  box-shadow: none;
  cursor: pointer;
}
.gf-bb-catalog-ready .gf-bb-price-presets .gf-bb-price-preset:hover {
  background: var(--bb-color-bg-support-muted);
}
.gf-bb-catalog-ready .gf-bb-price-presets .gf-bb-price-preset[aria-pressed="true"] {
  border-color: var(--bb-color-action-primary);
  background: var(--bb-color-action-primary);
  color: var(--bb-color-text-inverse, #fff);
}
.gf-bb-catalog-ready .gf-bb-price-presets .gf-bb-price-preset:focus-visible {
  outline: 2px solid var(--bb-color-focus-ring, #029046);
  outline-offset: 2px;
}
.gf-bb-catalog-ready .gf-bb-price-presets .gf-bb-price-preset:disabled {
  opacity: .6;
  cursor: wait;
}


@media (max-width:719px){
  body.gf-bb-catalog-ready #shop-sidebar .gf-bb-active-filters{box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;min-width:0;max-width:100%;margin:0 0 14px;padding:12px;border:1px solid #e0e6eb;border-radius:14px;background:#fff;color:#111820;font-family:Lato,Arial,sans-serif;}
  body.gf-bb-catalog-ready #shop-sidebar .gf-bb-active-filters:not(:has(.facetwp-selection-value)){display:none!important;}
  body.gf-bb-catalog-ready #shop-sidebar .gf-bb-mobile-active-title{min-width:0;font-size:14px;font-weight:700;line-height:1.4;}
  body.gf-bb-catalog-ready #shop-sidebar .gf-bb-active-filters .facetwp-selections{display:flex;flex-wrap:wrap;gap:8px;grid-column:1/-1;grid-row:2;min-width:0;max-width:100%;}
  body.gf-bb-catalog-ready #shop-sidebar .gf-bb-active-filters .facetwp-selections ul,
  body.gf-bb-catalog-ready #shop-sidebar .gf-bb-active-filters .facetwp-selections li{display:contents;}
  body.gf-bb-catalog-ready #shop-sidebar .gf-bb-filter-chip{box-sizing:border-box;min-width:0;max-width:100%;min-height:44px;justify-content:space-between;gap:8px;padding:10px 12px;border-color:#bce7d2;background:#f0faf5;color:#007d3c;line-height:1.45;text-align:left;}
  body.gf-bb-catalog-ready #shop-sidebar .gf-bb-filter-chip>span:first-child{min-width:0;white-space:normal;overflow-wrap:anywhere;}
  body.gf-bb-catalog-ready #shop-sidebar .gf-bb-filter-chip__close{flex:0 0 auto;}
  body.gf-bb-catalog-ready #shop-sidebar .gf-bb-active-filters__clear{grid-column:2;grid-row:1;min-width:0;margin:0;padding:6px 0;font-size:12px;white-space:nowrap;}
  body.gf-bb-catalog-ready #shop-sidebar .gf-bb-active-filters__long,
  body.gf-bb-catalog-ready #shop-sidebar .gf-bb-active-filters__short{display:none!important;}
  body.gf-bb-catalog-ready .gf-bb-category-controls .filter-button{box-sizing:border-box;min-width:0;flex-direction:row;gap:6px;padding:0 6px;font-size:13px;white-space:nowrap;}
  body.gf-bb-catalog-ready .gf-bb-category-controls .filter-button strong{order:1;flex:0 1 auto;min-width:0;}
  body.gf-bb-catalog-ready .gf-bb-category-controls .filter-button i{order:2;display:inline-block;flex:0 0 16px;font-size:16px;line-height:1;}
  body.gf-bb-catalog-ready .gf-bb-mobile-active-badge{order:3;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;min-width:18px;height:18px;padding:0 4px;border-radius:999px;background:#028543;color:#fff;font-size:10px;font-weight:700;line-height:1;}
  body.gf-bb-catalog-ready .gf-bb-mobile-active-badge[hidden]{display:none!important;}
  body.gf-bb-catalog-ready #shop-sidebar .gf-bb-active-filters__clear:focus-visible,
  body.gf-bb-catalog-ready #shop-sidebar .gf-bb-filter-chip:focus-visible{outline:2px solid #028543;outline-offset:2px;}
}


body.gf-bb-catalog-ready .gf-bb-desktop-active-title[hidden],
body.gf-bb-catalog-ready .gf-bb-desktop-active-clear-label[hidden],
body.gf-bb-catalog-ready .gf-bb-desktop-active-facet-label[hidden]{display:none!important;}
@media (min-width:850px){
  body.gf-bb-catalog-ready .gf-bb-active-filters{box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px 12px;min-width:0;max-width:100%;margin-bottom:20px;padding:12px 16px;border:1px solid #e0e6eb;border-radius:12px;background:#fff;color:#111820;font-family:Lato,Arial,sans-serif;}
  body.gf-bb-catalog-ready .gf-bb-active-filters:not(:has(.facetwp-selection-value)){display:none!important;}
  body.gf-bb-catalog-ready .gf-bb-desktop-active-title{grid-column:1;grid-row:1;font-size:14px;font-weight:700;line-height:1.4;}
  body.gf-bb-catalog-ready .gf-bb-active-filters .facetwp-selections{display:flex;flex-wrap:wrap;gap:8px;grid-column:1/-1;grid-row:2;min-width:0;max-width:100%;}
  body.gf-bb-catalog-ready .gf-bb-active-filters .facetwp-selections ul,
  body.gf-bb-catalog-ready .gf-bb-active-filters .facetwp-selections li{display:contents;}
  body.gf-bb-catalog-ready .gf-bb-active-filters .gf-bb-filter-chip{gap:8px;min-width:0;max-width:100%;min-height:44px;padding:8px 14px;border:1px solid #b8e3ca;border-radius:24px!important;background:#f0faf5;color:#006c38;font-size:13px;line-height:1.3;}
  body.gf-bb-catalog-ready .gf-bb-filter-chip>span:first-child{min-width:0;overflow-wrap:anywhere;}
  body.gf-bb-catalog-ready .gf-bb-desktop-active-facet-label{order:-1;flex:0 0 auto;}
  body.gf-bb-catalog-ready .gf-bb-active-filters__clear{grid-column:2;grid-row:1;min-height:44px;min-width:0;margin:0;padding:6px 0;font-size:13px;white-space:nowrap;}
  body.gf-bb-catalog-ready .gf-bb-active-filters__long,
  body.gf-bb-catalog-ready .gf-bb-active-filters__short{display:none!important;}
}


/* One shared heading/clear label, maintaining the existing desktop/tablet variants. */
body.gf-bb-catalog-ready .gf-bb-catalog-active-title[hidden],body.gf-bb-catalog-ready .gf-bb-catalog-active-clear-label[hidden]{display:none!important;}
@media(min-width:850px){body.gf-bb-catalog-ready .gf-bb-catalog-active-title{grid-column:1;grid-row:1;font-size:14px;font-weight:700;line-height:1.4;}}
@media(min-width:720px){body.gf-bb-catalog-ready:not(.gf-bb-category-v2-has-top) .shop-page-title{display:block;}body.gf-bb-catalog-ready:not(.gf-bb-category-v2-has-top) .shop-page-title .page-title-inner{min-height:0;}}
@media(min-width:1440px){body.wp-child-theme-buyback.gf-bb-catalog-ready.gf-bb-category-v2-ready .category-page-row{grid-template-columns:minmax(0,1fr) 300px minmax(0,calc(min(100%,var(--gf-bb-layout-max,1600px)) - 300px)) minmax(0,1fr)!important;}body.gf-bb-catalog-ready .facetwp-template>.products{max-width:none;}body.gf-bb-catalog-ready .facetwp-template>.products>.product-small.col{flex-basis:25%;max-width:25%;}}
@media(max-width:719px){
 body.gf-bb-catalog-ready #header .header-wrapper,body.gf-bb-catalog-ready #header .header-wrapper.stuck{animation:none!important;}
 body.gf-bb-catalog-ready .category-page-row>.large-3{display:none!important;}
 body.gf-bb-catalog-ready .gf-bb-catalog-active-title{grid-column:1;grid-row:1;min-width:0;font-size:14px;font-weight:700;line-height:1.4;}
 body.gf-bb-catalog-ready .gf-bb-active-filters .gf-bb-active-filters__long,body.gf-bb-catalog-ready .gf-bb-active-filters .gf-bb-active-filters__short{display:none!important;}
 body.gf-bb-catalog-ready #shop-sidebar .gf-bb-filter-chip{border-radius:24px!important;}
}
@media(prefers-reduced-motion:reduce){body.gf-bb-catalog-ready .gf-bb-category-controls,body.gf-bb-catalog-ready #header .header-wrapper{transition:none!important;animation:none!important;}}

/* BuyBack: one native active-filter row on category desktop/tablet only. */
@media (min-width: 720px) {
  body:is(.tax-product_cat,.tax-bb_tema).gf-bb-catalog-ready .gf-bb-active-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto;
    align-items: center;
    gap: 0 12px;
    padding: 0;
    box-sizing: border-box;
  }
  body:is(.tax-product_cat,.tax-bb_tema).gf-bb-catalog-ready .gf-bb-active-filters .facetwp-selections {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    max-width: 100%;
    min-height: 44px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
  }
  body:is(.tax-product_cat,.tax-bb_tema).gf-bb-catalog-ready .gf-bb-active-filters .facetwp-selections ul,
  body:is(.tax-product_cat,.tax-bb_tema).gf-bb-catalog-ready .gf-bb-active-filters .facetwp-selections li {
    display: contents;
  }
  body:is(.tax-product_cat,.tax-bb_tema).gf-bb-catalog-ready .gf-bb-active-filters .gf-bb-filter-chip {
    flex: 0 0 auto;
    max-width: none;
    white-space: nowrap;
  }
  body:is(.tax-product_cat,.tax-bb_tema).gf-bb-catalog-ready .gf-bb-active-filters .gf-bb-filter-chip > span:first-child {
    white-space: nowrap;
    overflow-wrap: normal;
  }
  body:is(.tax-product_cat,.tax-bb_tema).gf-bb-catalog-ready .gf-bb-active-filters .gf-bb-filter-chip:focus-visible {
    outline-offset: -3px;
  }
  body:is(.tax-product_cat,.tax-bb_tema).gf-bb-catalog-ready .gf-bb-active-filters .facetwp-selections::-webkit-scrollbar {
    height: 6px;
  }
  body:is(.tax-product_cat,.tax-bb_tema).gf-bb-catalog-ready .gf-bb-active-filters .gf-bb-active-filters__clear {
    grid-column: 2;
    grid-row: 1;
    flex: none;
    white-space: nowrap;
  }
}
@media (min-width: 850px) {
  body:is(.tax-product_cat,.tax-bb_tema).gf-bb-catalog-ready .gf-bb-active-filters {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 8px 12px;
  }
  body:is(.tax-product_cat,.tax-bb_tema).gf-bb-catalog-ready .gf-bb-active-filters .gf-bb-catalog-active-title {
    grid-column: 1;
    grid-row: 1;
    white-space: nowrap;
  }
  body:is(.tax-product_cat,.tax-bb_tema).gf-bb-catalog-ready .gf-bb-active-filters .facetwp-selections {
    grid-column: 2;
  }
  body:is(.tax-product_cat,.tax-bb_tema).gf-bb-catalog-ready .gf-bb-active-filters .gf-bb-active-filters__clear {
    grid-column: 3;
  }
}

/* New facet only. Existing sidebar and page widths remain native. */
#shop-sidebar .gf-bb-esthetic-filter .bb-filter__icon svg { width:20px; height:20px; fill:none; stroke:currentColor; }
#shop-sidebar .gf-bb-esthetic-filter .facetwp-checkbox { min-height:32px; display:flex; align-items:center; }
#shop-sidebar .gf-bb-esthetic-filter .facetwp-checkbox:focus-visible { outline:2px solid currentColor; outline-offset:2px; }
@media (max-width:719px) { #shop-sidebar .gf-bb-esthetic-filter .facetwp-checkbox { min-height:44px; } }

/* ---------- States formerly set by script ---------- */
/* Active filters: drawer copy on mobile, shop column copy from 720px. */
@media (min-width: 720px) {
  body.gf-bb-catalog-ready .gf-bb-active-filters.gf-bb-active-filters--drawer { display: none !important; }
}
@media (max-width: 719px) {
  body.gf-bb-catalog-ready .gf-bb-active-filters.gf-bb-active-filters--shop { display: none !important; }
}
/* "Filtros ativos" title and "Limpar todos" label: mobile and 850px+. */
@media (min-width: 720px) and (max-width: 849px) {
  body.gf-bb-catalog-ready .gf-bb-catalog-active-title,
  body.gf-bb-catalog-ready .gf-bb-catalog-active-clear-label { display: none !important; }
}
/* Facet name inside each chip: 850px+. */
@media (max-width: 849px) {
  body.gf-bb-catalog-ready .gf-bb-desktop-active-facet-label { display: none !important; }
}
/* Presets follow the price group when it has no range to offer. */
body.gf-bb-catalog-ready .gf-bb-price-filter:has(> .bb-filter[hidden]) { display: none; }
/* FacetWP facets inside the mobile controls bar (sort select, product count): no facet margin. */
body.gf-bb-catalog-ready .gf-bb-category-controls .facetwp-facet { margin: 0; }
