
/* Performance Store Filters v1.0.0 */
.psf-root{position:relative;z-index:50;margin:18px 0 24px;width:100%}
.psf-toolbar{display:flex;align-items:center;width:100%}
.psf-desktop-filters{display:flex;flex-wrap:wrap;align-items:center;gap:10px;width:100%}
.psf-dropdown{position:relative;display:inline-flex;align-items:center}
.psf-trigger,.psf-sale-toggle{
    box-sizing:border-box;min-height:42px;height:42px;background:#fff;border:1px solid #d9dee4;
    border-radius:22px;padding:0 14px;font:inherit;font-size:14px;color:#151515;
    display:inline-flex;align-items:center;justify-content:center;gap:8px;vertical-align:middle;cursor:pointer;
    line-height:1;white-space:nowrap
}
.psf-trigger:hover,.psf-trigger[aria-expanded="true"],.psf-sale-toggle:hover{border-color:#111}
.psf-trigger-label{display:inline-flex;align-items:center;line-height:1}
.psf-arrow{display:block;flex:0 0 16px;width:16px;height:16px;margin:0;transform:translateY(.25px);transition:transform .16s ease}
.psf-trigger[aria-expanded="true"] .psf-arrow{transform:rotate(180deg)}
.psf-badge{display:inline-flex;align-items:center;justify-content:center;min-width:19px;height:19px;padding:0 5px;border-radius:10px;background:#111;color:#fff;font-size:11px;line-height:1}
.psf-sale-toggle input{width:16px;height:16px;margin:0 1px 0 0;accent-color:#111}
.psf-menu{
    position:absolute;left:0;top:calc(100% + 8px);width:340px;max-height:440px;overflow:auto;
    background:#fff;border:1px solid #e2e5e9;box-shadow:0 14px 36px rgba(0,0,0,.13);
    border-radius:12px;padding:14px;z-index:10000
}
.psf-menu[hidden]{display:none!important}
.psf-menu-head{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:0 0 12px}
.psf-menu-head strong{font-size:15px}
.psf-close{border:0;background:none;font-size:25px;line-height:1;cursor:pointer;padding:0 3px}
.psf-options{display:flex;flex-direction:column;gap:9px}
.psf-option{display:flex;align-items:center;gap:9px;cursor:pointer;margin:0}
.psf-option input{width:17px;height:17px;margin:0;accent-color:#111}
.psf-size-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.psf-size-option{display:block;position:relative}
.psf-size-option input{position:absolute;opacity:0;pointer-events:none}
.psf-size-option .psf-term-name{display:flex;align-items:center;justify-content:center;min-height:40px;padding:5px;border:1px solid #d9dde2;border-radius:7px;line-height:1.15;text-align:center}
.psf-size-option input:checked~.psf-term-name{border-color:#111;box-shadow:inset 0 0 0 1px #111;background:#f4f4f4}
.psf-color-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.psf-color-option{min-height:34px}
.psf-swatch{display:inline-block;width:22px;height:22px;flex:0 0 22px;border-radius:50%;background:var(--psf-swatch,#eee);border:1px solid rgba(0,0,0,.18)}
.psf-actions{display:flex;justify-content:space-between;gap:10px;margin-top:14px;padding-top:12px;border-top:1px solid #eee}
.psf-actions button,.psf-mobile-footer button{min-height:40px;border-radius:7px;padding:8px 14px;cursor:pointer;font:inherit;font-size:13px}
.psf-clear-one,.psf-clear-price,.psf-reset-all{background:#fff;border:1px solid #cfd4da}
.psf-apply{background:#111;color:#fff;border:1px solid #111}
.psf-price-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.psf-price-fields label{font-size:13px}
.psf-price-fields input{box-sizing:border-box;width:100%;margin-top:5px;padding:9px;border:1px solid #d8dde3;border-radius:6px}
.psf-active-chips{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:-8px 0 20px}
.psf-chip,.psf-clear-all{border:1px solid #d8dde3;background:#f6f6f6;border-radius:20px;padding:7px 11px;cursor:pointer;font:inherit;font-size:12px}
.psf-clear-all{background:#fff;border-color:transparent;text-decoration:underline}
.psf-mobile-open,.psf-mobile-panel,.psf-backdrop{display:none}

/* Hide YITH itself when our filter UI is active */
body.psf-enabled .yith-wcan-filters,
body.psf-enabled .yith-wcan-preset,
body.psf-enabled .yith-wcan-filters-opener,
body.psf-enabled .yith-wcan-reset-navigation{display:none!important}

/* Retailer / common shop sidebars: scoped only to product archives where PSF is enabled */
body.psf-hide-sidebar.woocommerce .shop_sidebar,
body.psf-hide-sidebar.woocommerce .shop-sidebar,
body.psf-hide-sidebar.woocommerce .woocommerce-sidebar,
body.psf-hide-sidebar.woocommerce #secondary.widget-area,
body.psf-hide-sidebar.woocommerce aside#secondary,
body.psf-hide-sidebar.woocommerce .catalog-sidebar,
body.psf-hide-sidebar.woocommerce .products-sidebar{display:none!important}

body.psf-hide-sidebar.woocommerce .site-main,
body.psf-hide-sidebar.woocommerce .content-area,
body.psf-hide-sidebar.woocommerce .shop-content,
body.psf-hide-sidebar.woocommerce .shop_content,
body.psf-hide-sidebar.woocommerce .shop_content_wrapper,
body.psf-hide-sidebar.woocommerce .products-wrapper{width:100%!important;max-width:100%!important;float:none!important}

/* Keep archive controls and our filters on clean rows */
body.psf-enabled .psf-root{clear:both}
body.psf-enabled .woocommerce-result-count,
body.psf-enabled .woocommerce-ordering{position:relative;z-index:20}

@media (max-width: 768px){
  .psf-root{margin:14px 0 22px}
  .psf-desktop-filters{display:none}
  .psf-mobile-open{
      display:inline-flex;align-items:center;justify-content:center;gap:7px;
      min-height:44px;border:1px solid #111;background:#fff;border-radius:8px;padding:0 16px;
      font:inherit;font-weight:600;cursor:pointer
  }
  .psf-mobile-count:not(:empty){display:inline-flex;min-width:18px;height:18px;padding:0 5px;align-items:center;justify-content:center;background:#111;color:#fff;border-radius:10px;font-size:10px}
  .psf-mobile-panel{position:fixed;inset:0 0 0 auto;width:min(94vw,430px);height:100dvh;background:#fff;z-index:100002;overflow:auto;padding-bottom:78px}
  .psf-mobile-panel:not([hidden]){display:block}
  .psf-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.36);z-index:100001}
  .psf-backdrop:not([hidden]){display:block}
  .psf-mobile-header{position:sticky;top:0;z-index:3;background:#fff;border-bottom:1px solid #eee;padding:15px 16px;display:flex;align-items:center;justify-content:space-between}
  .psf-mobile-close{border:0;background:none;font-size:28px;line-height:1;cursor:pointer}
  .psf-mobile-content{padding:2px 16px 18px}
  .psf-mobile-footer{position:fixed;right:0;bottom:0;width:min(94vw,430px);box-sizing:border-box;background:#fff;border-top:1px solid #eee;padding:12px 16px;display:flex;gap:10px;z-index:100003}
  .psf-mobile-footer button{flex:1}
  .psf-mobile-content .psf-dropdown{display:block;border-bottom:1px solid #eee}
  .psf-mobile-content .psf-trigger{width:100%;height:52px;justify-content:space-between;border:0;border-radius:0;padding:0}
  .psf-mobile-content .psf-menu{position:static;width:100%;max-height:none;box-shadow:none;border:0;border-radius:0;padding:0 0 14px}
  .psf-mobile-content .psf-menu-head,.psf-mobile-content .psf-actions{display:none}
  .psf-mobile-content .psf-sale-toggle{width:100%;justify-content:flex-start;border:0;border-radius:0;padding:0;min-height:52px}
  .psf-size-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}

/* User specifically requested exact label/arrow alignment */
.psf-trigger > *{align-self:center}
.psf-trigger .psf-trigger-label,
.psf-trigger .psf-badge,
.psf-trigger .psf-arrow{position:relative;top:0}


/* v1.1.0 — Retailer full-width archive expansion */
body.psf-hide-sidebar.woocommerce .psf-fullwidth-column,
body.psf-hide-sidebar.woocommerce .psf-fullwidth-parent{
    width:100%!important;
    max-width:100%!important;
    flex:0 0 100%!important;
    float:none!important;
    margin-left:0!important;
    margin-right:0!important;
}
body.psf-hide-sidebar.woocommerce ul.products{
    width:100%!important;
    max-width:100%!important;
}

/* Mobile inline mode */
.psf-mobile-inline{display:none}
@media (max-width:768px){
  body.psf-mobile-inline .psf-mobile-open{display:none!important}
  body.psf-mobile-inline .psf-mobile-inline{
      display:flex!important;
      flex-wrap:wrap;
      align-items:center;
      gap:8px;
      width:100%;
      margin-top:6px
  }
  body.psf-mobile-inline .psf-mobile-inline .psf-dropdown{
      display:inline-flex;
      border:0;
      width:auto
  }
  body.psf-mobile-inline .psf-mobile-inline .psf-trigger{
      width:auto;
      height:40px;
      min-height:40px;
      border:1px solid #d9dee4;
      border-radius:21px;
      padding:0 12px;
      justify-content:center
  }
  body.psf-mobile-inline .psf-mobile-inline .psf-menu{
      position:fixed;
      left:12px;
      right:12px;
      bottom:12px;
      top:auto;
      width:auto;
      max-height:70vh;
      overflow:auto;
      box-sizing:border-box;
      border:1px solid #e2e5e9;
      border-radius:14px;
      box-shadow:0 14px 38px rgba(0,0,0,.18);
      padding:14px;
      z-index:100004
  }
  body.psf-mobile-inline .psf-mobile-inline .psf-menu-head,
  body.psf-mobile-inline .psf-mobile-inline .psf-actions{display:flex}
  body.psf-mobile-inline .psf-mobile-inline .psf-sale-toggle{
      display:inline-flex;
      width:auto;
      min-height:40px;
      height:40px;
      border:1px solid #d9dee4;
      border-radius:21px;
      padding:0 12px
  }
}
