/* SalamTavalod catalog filters — own stylesheet, enqueued after generic themes CSS.
   Only .st-facets (shop/product categories/search) and its body-level popup portal.
   Do not affect WooCommerce variable product attribute selects or other pages. */
:where(.cat-page,.search-page,.shop-page) .st-facets {
  box-sizing:border-box;
  width:100%;
  display:grid !important;
  grid-template-columns:minmax(0,1fr);
  gap:13px;
  padding:16px 18px !important;
  border:1px solid #dbe4e2 !important;
  border-radius:16px !important;
  background:#f8faf9 !important;
  direction:rtl;
  overflow:visible !important;
  text-align:right;
  font-family:var(--st-font-family,'IRANSansFaNum',Tahoma,Arial,sans-serif);
}
:where(.cat-page,.search-page,.shop-page) .st-facets *,
:where(.cat-page,.search-page,.shop-page) .st-facets *::before,
:where(.cat-page,.search-page,.shop-page) .st-facets *::after {box-sizing:border-box;}
:where(.cat-page,.search-page,.shop-page) .st-facets .facets-top {
  display:flex !important;
  justify-content:space-between !important;
  align-items:center !important;
  flex-wrap:wrap !important;
  gap:10px 18px !important;
  margin:0 !important;
  padding:0 0 11px;
  border-bottom:1px solid #e3ebea;
}
:where(.cat-page,.search-page,.shop-page) .st-facets .facets-heading {
  flex:1 1 235px;
  display:flex;
  align-items:baseline;
  flex-wrap:wrap;
  gap:5px 9px;
  min-width:0;
}
:where(.cat-page,.search-page,.shop-page) .st-facets .facets-title {
  font-size:.87rem; line-height:1.7; color:#173f49; font-weight:900; margin:0;
}
:where(.cat-page,.search-page,.shop-page) .st-facets .facets-subtitle {
  display:inline !important;
  margin:0;
  font-size:.68rem;
  line-height:1.7;
  color:#75888d;
}
:where(.cat-page,.search-page,.shop-page) .st-facets .facets-actions {
  flex:0 1 auto;
  display:flex !important;
  flex-wrap:wrap;
  align-items:center !important;
  justify-content:flex-end;
  gap:8px !important;
  min-width:0;
}
:where(.cat-page,.search-page,.shop-page) .st-facets .facets-actions label {
  margin:0; font-size:.71rem; font-weight:800; color:#173f49; white-space:nowrap;
}
:where(.cat-page,.search-page,.shop-page) .st-facets .clear-facets {
  display:inline-flex; align-items:center; justify-content:center;
  min-height:42px; padding:0 8px; color:#e45468;
  font-size:.72rem; white-space:nowrap; text-decoration:none; order:3;
}
:where(.cat-page,.search-page,.shop-page) .st-facets .sort-select {
  box-sizing:border-box !important;
  height:42px !important;
  min-height:42px !important;
  min-width:0 !important;
  max-width:230px !important;
  width:205px !important;
  flex:0 1 205px !important;
  margin:0 !important;
  padding:0 12px !important;
  border:1px solid #d8e2e1 !important;
  border-radius:10px !important;
  background-color:#fff !important;
  color:#173f49 !important;
  font-family:inherit !important;
  font-size:.72rem !important;
  font-weight:700 !important;
  line-height:1.5 !important;
  appearance:auto;
}
:where(.cat-page,.search-page,.shop-page) .st-facets .facet-strip {
  display:flex !important;
  flex-wrap:wrap !important;
  align-items:center !important;
  gap:9px !important;
  min-width:0;
  width:100%;
  margin:0 !important;
  padding:0 !important;
  overflow:visible !important;
  scrollbar-width:auto;
}
:where(.cat-page,.search-page,.shop-page) .st-facets .st-facet {
  display:block;
  position:relative;
  flex:0 1 178px;
  min-width:136px;
  max-width:100%;
}
:where(.cat-page,.search-page,.shop-page) .st-facets .facet-trigger {
  box-sizing:border-box !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  width:100% !important;
  max-width:none !important;
  min-width:0 !important;
  height:43px !important;
  min-height:43px !important;
  gap:12px !important;
  margin:0 !important;
  padding:0 12px !important;
  border:1px solid #d8e2e1 !important;
  border-radius:10px !important;
  background:#fff !important;
  color:#173f49 !important;
  font-family:inherit !important;
  font-size:.74rem !important;
  font-weight:800 !important;
  text-align:right !important;
  cursor:pointer;
}
:where(.cat-page,.search-page,.shop-page) .st-facets .facet-trigger-label {
  display:block; min-width:0; flex:1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
:where(.cat-page,.search-page,.shop-page) .st-facets .facet-trigger-end {
  display:inline-flex; align-items:center; gap:7px; flex-shrink:0;
}
:where(.cat-page,.search-page,.shop-page) .st-facets .facet-trigger[aria-expanded='true'],
:where(.cat-page,.search-page,.shop-page) .st-facets .facet-trigger.has-selection {
  border-color:#79adae !important; background:#f0f8f6 !important;
}
:where(.cat-page,.search-page,.shop-page) .st-facets .st-facet-submit {
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  box-sizing:border-box !important;
  min-height:43px !important;
  height:43px !important;
  margin:0 auto 0 0 !important;
  padding:0 20px !important;
  flex:0 0 auto;
  border:1px solid #173f49 !important;
  border-radius:10px !important;
  background:#173f49 !important;
  color:#fff !important;
  font-family:inherit !important;
  font-size:.76rem !important;
  font-weight:900 !important;
  line-height:1.5 !important;
  white-space:nowrap;
  cursor:pointer;
}
:where(.cat-page,.search-page,.shop-page) .st-facets .facet-popover[hidden],
.st-facet-popup-portal[hidden],.st-facet-scrim-portal[hidden]{display:none !important;}
:where(.cat-page,.search-page,.shop-page) .st-facets a:focus-visible,
:where(.cat-page,.search-page,.shop-page) .st-facets button:focus-visible,
:where(.cat-page,.search-page,.shop-page) .st-facets select:focus-visible,
.st-facet-popup-portal input:focus-visible,.st-facet-popup-portal button:focus-visible {
  outline:2px solid #ff6b7a;outline-offset:2px;
}
/* BODY PORTAL: stays outside any .facet-strip scroll container or clipping ancestor. */
.st-facet-popup-portal:not([hidden]) {
  position:fixed !important;
  z-index:2147483001 !important;
  display:flex !important;
  flex-direction:column !important;
  direction:rtl !important;
  box-sizing:border-box !important;
  width: min(348px,calc(100vw - 24px));
  max-width:calc(100vw - 24px);
  max-height:min(470px,calc(100dvh - 22px));
  padding:15px !important;
  margin:0 !important;
  overflow:hidden !important;
  border:1px solid #d1e1dd !important;
  border-radius:16px !important;
  background:#fff !important;
  box-shadow:0 19px 52px rgba(17,54,61,.19) !important;
  color:#173f49 !important;
  font-family:var(--st-font-family,'IRANSansFaNum',Tahoma,Arial,sans-serif) !important;
  font-size:.79rem;
  text-align:right !important;
  isolation:isolate;
}
.st-facet-popup-portal *, .st-facet-popup-portal *::before, .st-facet-popup-portal *::after {box-sizing:border-box;}
.st-facet-popup-portal .facet-popover-head {
  display:flex; justify-content:space-between; align-items:center; gap:12px;
  flex:0 0 auto; padding-bottom:9px; margin:0 0 11px;
  border-bottom:1px solid #edf1f0;
}
.st-facet-popup-portal .facet-popover-title {font-size:.9rem;line-height:1.6;font-weight:900;margin:0;}
.st-facet-popup-portal .facet-popover-close {
  width:35px;height:35px;display:grid;place-items:center;flex-shrink:0;
  padding:0;border:1px solid #e2e9e7;border-radius:9px;
  background:#f5f8f8;color:#173f49;cursor:pointer;font-size:1.25rem;
}
.st-facet-popup-portal .facet-search {
  box-sizing:border-box !important;
  display:block !important;
  appearance:none !important;
  -webkit-appearance:none !important;
  width:100% !important;
  height:42px !important;
  min-height:42px !important;
  padding:0 13px !important;
  margin:0 0 10px !important;
  border:1px solid #ccdcd9 !important;
  border-radius:10px !important;
  background:#fff !important;
  color:#173f49 !important;
  font-family:inherit !important;
  font-size:.78rem !important;
  font-weight:500 !important;
  line-height:normal !important;
  text-align:right !important;
  direction:rtl;
  box-shadow:none !important;
  outline-offset:2px;
  flex:0 0 auto;
}
.st-facet-popup-portal .facet-search::-webkit-search-cancel-button{appearance:none;}
.st-facet-popup-portal .facet-options {
  display:flex;flex-direction:column;gap:2px;
  flex:1 1 auto;min-height:0;
  max-height:280px;
  overflow-y:auto;overscroll-behavior:contain;
  padding:0 1px;
  scrollbar-width:thin;
}
.st-facet-popup-portal .facet-choice {
  display:flex !important;align-items:center !important;gap:9px;
  padding:8px 7px;min-height:43px;
  border-radius:8px;background:transparent;cursor:pointer;
  color:#173f49;font-size:.75rem;line-height:1.5;
}
.st-facet-popup-portal .facet-choice[hidden]{display:none !important;}
.st-facet-popup-portal .facet-choice:hover{background:#f1f7f6;}
.st-facet-popup-portal .facet-choice input[type='checkbox']{
  display:block !important;
  appearance:auto !important;
  -webkit-appearance:checkbox !important;
  width:17px !important;height:17px !important;
  margin:0 !important;padding:0 !important;flex:0 0 17px;
  accent-color:#173f49;
}
.st-facet-popup-portal .facet-choice-label{flex:1;min-width:0;overflow-wrap:anywhere;}
.st-facet-popup-portal .facet-choice-count{font-size:.69rem;color:#7a8c8e;}
.st-facet-popup-portal .facet-no-options{margin:10px 0;color:#6b8083;font-size:.75rem;}
.st-facet-popup-portal .facet-no-options[hidden]{display:none!important;}
.st-facet-popup-portal .facet-popover-foot {
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  flex:0 0 auto;margin:10px 0 0;padding:12px 0 0;
  border-top:1px solid #edf1f0;
}
.st-facet-popup-portal .facet-option-total{color:#75888d;font-size:.71rem;}
.st-facet-popup-portal .facet-done {
  display:inline-flex;align-items:center;justify-content:center;
  padding:0 18px;min-height:38px;border:0;border-radius:9px;
  background:#173f49;color:#fff;cursor:pointer;font-size:.77rem;font-weight:800;
}
.st-facet-scrim-portal:not([hidden]){
  position:fixed !important;inset:0;display:block !important;
  z-index:2147483000 !important;
  background:rgba(10,38,45,.44) !important;
}
@media(max-width:740px){
  :where(.cat-page,.search-page,.shop-page) .st-facets{padding:13px !important;gap:11px;}
  :where(.cat-page,.search-page,.shop-page) .st-facets .facets-top{align-items:flex-start !important;gap:9px!important;}
  :where(.cat-page,.search-page,.shop-page) .st-facets .facets-actions{flex:1 1 100%;justify-content:flex-start;}
  :where(.cat-page,.search-page,.shop-page) .st-facets .facet-strip{display:grid !important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px!important;}
  :where(.cat-page,.search-page,.shop-page) .st-facets .st-facet{min-width:0;max-width:none;flex:1;}
  :where(.cat-page,.search-page,.shop-page) .st-facets .facet-trigger{min-height:42px!important;height:42px!important;}
  :where(.cat-page,.search-page,.shop-page) .st-facets .st-facet-submit{width:100% !important;grid-column:1/-1;margin:0 !important;}
}
@media(max-width:640px){
  html.st-facets-mobile-open{overflow:hidden;}
  .st-facet-popup-portal:not([hidden]){
    position:fixed !important;
    left:0 !important;right:0 !important;top:auto !important;bottom:0 !important;
    width:100% !important;max-width:none !important;
    height:min(78dvh,600px) !important;max-height:calc(100dvh - 20px) !important;
    padding:18px 16px max(18px,env(safe-area-inset-bottom)) !important;
    border-radius:20px 20px 0 0 !important;
    border-bottom:0 !important;
  }
  .st-facet-popup-portal .facet-options{max-height:none;flex:1 1 auto;}
}
@media(max-width:340px){
  :where(.cat-page,.search-page,.shop-page) .st-facets .facets-actions{gap:6px!important;}
  :where(.cat-page,.search-page,.shop-page) .st-facets .sort-select{width:100% !important;max-width:none !important;flex:1 1 100% !important;}
  :where(.cat-page,.search-page,.shop-page) .st-facets .facet-strip{grid-template-columns:1fr;}
}
@media(prefers-reduced-motion:reduce){
  .st-facet-popup-portal,.st-facet-scrim-portal{transition:none!important;animation:none!important;}
}
