/* Sanat Catalog — mega under header (does not cover Digikala nav) */
.sanat-mega{
  position:relative;
  z-index:40;
  background:#fff;
  border-bottom:1px solid #e8eaef;
  font-family:Tahoma,Segoe UI,sans-serif;
}
.sanat-mega__hint{display:none !important}
.sanat-mega__bar{
  max-width:1280px;
  margin:0 auto;
  padding:8px 16px;
  display:flex;
  gap:18px;
  align-items:center;
  flex-wrap:nowrap;
}
.sanat-mega__nav-slot{
  flex:1;
  min-width:0;
  display:flex;
  align-items:center;
}
.sanat-mega__nav-slot .wd-header-main-nav,
.sanat-mega__nav-slot .wd-nav-main{
  width:100%;
  margin:0 !important;
}
.sanat-mega__nav-slot .wd-nav-main{
  display:flex !important;
  flex-wrap:wrap;
  gap:4px 10px;
  align-items:center;
}
.sanat-mega__nav-slot .wd-nav-main > li > a{
  padding:8px 10px !important;
  font-weight:700;
  white-space:nowrap;
}
.whb-header-bottom.sanat-header-nav-moved{
  display:none !important;
}
.sanat-mega__toggle{
  display:inline-flex;
  align-items:center;
  gap:10px;
  background:linear-gradient(135deg,#0b6e4f 0%,#0f766e 55%,#0d9488 100%);
  color:#fff;
  border:0;
  border-radius:12px;
  padding:10px 14px;
  font-weight:800;
  cursor:pointer;
  flex:0 0 auto;
  box-shadow:0 6px 14px rgba(15,118,110,.22);
}
.sanat-mega__burger{
  width:16px;
  height:12px;
  border-top:2px solid #fff;
  border-bottom:2px solid #fff;
  position:relative;
}
.sanat-mega__burger:before{
  content:"";
  position:absolute;
  left:0;right:0;top:3px;
  border-top:2px solid #fff;
}
.sanat-mega__hint{
  display:none !important;
}
.sanat-mega__panel{
  position:absolute;
  left:0;right:0;top:100%;
  background:#fff;
  box-shadow:0 18px 40px rgba(15,23,42,.12);
  border-bottom:1px solid #e8eaef;
  z-index:45;
}
.sanat-mega__panel-inner{
  max-width:1280px;
  margin:0 auto;
  padding:16px;
  display:grid;
  grid-template-columns:240px 1fr;
  gap:18px;
  min-height:280px;
}
.sanat-mega__parents{list-style:none;margin:0;padding:0;border-left:1px solid #eef1f6}
.sanat-mega__parents li a{
  display:flex;
  justify-content:space-between;
  gap:8px;
  padding:11px 12px;
  border-radius:10px;
  color:#111827;
  text-decoration:none;
  font-weight:700;
}
.sanat-mega__parents li.is-active a,
.sanat-mega__parents li a:hover{background:#e7f6f4;color:#0f766e}
.sanat-mega__parents small{color:#6b7280;font-weight:600}
.sanat-mega__child-group{display:none;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:10px}
.sanat-mega__child-group.is-active{display:grid}
.sanat-mega__chip{
  display:flex;
  justify-content:space-between;
  gap:8px;
  padding:12px 14px;
  border:1px solid #e6e8ee;
  border-radius:12px;
  text-decoration:none;
  color:#111827;
  background:#fafbfc;
}
.sanat-mega__chip:hover{border-color:#0f766e;background:#f1faf8}
.sanat-mega__chip em{color:#6b7280;font-style:normal}

/* Keep WoodMart Digikala header nav clickable above our layer */
.whb-header,
.whb-header .whb-main-header,
.whb-header .whb-header-bottom,
.whb-header .wd-nav-main{
  position:relative;
  z-index:60;
}
.whb-header .wd-nav-main > li,
.whb-header .wd-nav-main > li > a,
.whb-header .wd-header-nav .wd-nav > li,
.whb-header .wd-header-nav .wd-nav > li > a{
  pointer-events:auto !important;
}

.sanat-shop-layout{
  display:grid;
  grid-template-columns:240px minmax(0,1fr);
  gap:16px;
  align-items:start;
  max-width:1320px;
  width:100%;
  margin:12px auto 24px;
  padding:0 16px;
  box-sizing:border-box;
  font-family:Tahoma,Segoe UI,sans-serif;
}
body.sanat-theme-farnam .sanat-shop-layout,
body.sanat-no-woodmart .sanat-shop-layout{
  max-width:min(1320px, 100%);
}
.sanat-filters{
  background:#f0f2f5;
  border:1px solid #e1e4ea;
  border-radius:14px;
  padding:10px;
  margin:0;
  position:relative;
  top:auto;
  z-index:auto;
  max-height:none;
  overflow:visible;
  width:100%;
  box-sizing:border-box;
}
.sanat-filter-stack{
  position:sticky;
  top:90px;
  z-index:30;
  max-height:calc(100vh - 110px);
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.sanat-filter-stack .widget.sidebar-widget,
.sanat-filter-stack .wd-widget.widget{
  background:#f0f2f5;
  border:1px solid #e1e4ea;
  border-radius:14px;
  padding:10px 12px;
  margin:0;
}
.sanat-filter-stack .widget-title{
  font-size:13px;
  margin:0 0 8px;
  font-family:Tahoma,Segoe UI,sans-serif;
}
.sanat-sidebar-emptied{display:none !important}
.sanat-hide-child-cat{display:none !important}
.sanat-filters form{max-width:none;margin:0}
.sanat-filters__head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;gap:8px;flex-wrap:wrap}
.sanat-filters__head strong{font-size:14px}
.sanat-filters__clear{border:0;background:transparent;color:#0f766e;cursor:pointer;font-weight:700;font-size:12px;white-space:nowrap}
.sanat-filters__active{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin:0 0 12px;
  padding:10px;
  border-radius:12px;
  background:#e5e8ed;
  border:1px solid #d5dae3;
}
.sanat-filters__active[hidden]{display:none !important}
.sanat-filters__active-label{font-size:12px;font-weight:800;color:#4b5563}
.sanat-filters__chips{display:flex;flex-wrap:wrap;gap:6px}
.sanat-filters__chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border:1px solid #0f766e;
  background:#fff;
  color:#0f3d3a;
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
  font-family:Tahoma,Segoe UI,sans-serif;
  line-height:1.2;
}
.sanat-filters__chip:hover{background:#e7f6f4}
.sanat-filters__chip em{font-style:normal;font-size:14px;line-height:1;color:#0f766e}
.sanat-filters__search{display:grid;gap:4px;margin-bottom:10px;max-width:none}
.sanat-filters__search span{font-size:12px;color:#667085}
.sanat-filters__search input{border:1px solid #d7dbe3;border-radius:10px;padding:8px 10px;font-size:13px;width:100%;box-sizing:border-box;background:#f7f8fa}
.sanat-filters__grid{
  display:flex;
  flex-direction:column;
  gap:6px;
  max-width:none;
}
.sanat-filters__group{
  border:1px solid #e1e4ea;
  border-radius:10px;
  padding:0;
  background:#e9ecf0;
  max-height:none;
  overflow:hidden;
}
.sanat-filters__group summary{
  cursor:pointer;
  font-weight:800;
  padding:10px 10px;
  list-style:none;
  display:flex;
  align-items:center;
  gap:6px;
  user-select:none;
  background:#dde1e7;
  font-size:13px;
  line-height:1.35;
}
.sanat-filters__group summary::-webkit-details-marker{display:none}
.sanat-filters__group summary::after{
  content:"";
  margin-inline-start:auto;
  width:7px;
  height:7px;
  border-left:2px solid #667085;
  border-bottom:2px solid #667085;
  transform:rotate(-45deg);
  transition:transform .18s ease;
  flex:0 0 auto;
}
.sanat-filters__group[open] summary{
  background:#e7f6f4;
  color:#0f766e;
  border-bottom:1px solid #dff0ed;
}
.sanat-filters__group[open] summary::after{
  transform:rotate(135deg);
}
.sanat-filters__group-title{flex:0 1 auto;min-width:0}
.sanat-filters__group summary small,
.sanat-filters__count{
  color:#9aa3b2;
  font-weight:600;
  font-size:11px;
  flex:0 0 auto;
  margin:0;
  white-space:nowrap;
}
.sanat-filters__group summary small.sanat-filters__count::before,
.sanat-filters__item em.sanat-filters__count::before{
  content:"(";
}
.sanat-filters__group summary small.sanat-filters__count::after,
.sanat-filters__item em.sanat-filters__count::after{
  content:")";
}
.sanat-filters__group-body{padding:6px 8px 10px;display:none !important}
.sanat-filters__group-body[hidden]{display:none !important}
.sanat-filters__group[open] .sanat-filters__group-body{display:block !important}
.sanat-filters__group[open] .sanat-filters__group-body[hidden]{display:block !important}
.sanat-filters__item{display:flex;align-items:center;gap:6px;padding:6px 0;cursor:pointer;font-size:12px;line-height:1.35}
.sanat-filters__item input{width:15px;height:15px;accent-color:#0f766e;flex:0 0 auto}
.sanat-filters__item > span{flex:0 1 auto;min-width:0}
.sanat-filters__item em,
.sanat-filters__item .sanat-filters__count{
  margin-inline-start:2px;
  color:#9aa3b2;
  font-style:normal;
  font-size:11px;
  flex:0 0 auto;
}
.sanat-filters__item--parent{font-weight:700}
.sanat-filters__sticky-top{display:flex;flex-direction:column;gap:0}
.sanat-filters__footer{display:none}
.sanat-filters__submit{display:none}
@media (max-width:1024px){
  body.sanat-filters-panel-open .sanat-filters__footer,
  body.sanat-mobile-filters-open .sanat-filters__footer{
    display:block !important;
  }
  body.sanat-filters-panel-open .sanat-filters__submit,
  body.sanat-mobile-filters-open .sanat-filters__submit{
    display:block !important;
  }
}
.sanat-shop-layout__main{min-width:0}
.sanat-filters__results{max-width:none;margin:0;padding:0;border:0}
.sanat-filtered-products__title{font-size:16px;margin:0 0 12px;font-family:Tahoma,Segoe UI,sans-serif}
.sanat-filtered-products__title em{font-style:normal;color:#6b7280;font-weight:700;font-size:13px}
.sanat-filter-pagination{display:none !important}
.sanat-active-bar{display:none}
.sanat-filters__empty{padding:12px;color:#6b7280}
.sanat-filtered-products ul.products,
ul.sanat-products,
ul.products.sanat-products-grid,
body.woocommerce-shop ul.products,
body.post-type-archive-product ul.products,
body.tax-product_cat ul.products{
  display:grid !important;
  grid-template-columns:repeat(var(--sanat-cols, 4), minmax(0, 1fr)) !important;
  gap:14px !important;
  list-style:none;
  margin:0;
  padding:0;
  float:none !important;
  width:100% !important;
}
.sanat-filtered-products ul.products > li.product,
.sanat-filtered-products ul.products > .product,
.sanat-filtered-products ul.products > .wd-product,
ul.sanat-products > li.product,
ul.sanat-products > .product,
ul.sanat-products > .wd-product,
ul.products.sanat-products-grid > li.product,
ul.products.sanat-products-grid > .product,
ul.products.sanat-products-grid > .wd-product,
ul.products.sanat-products-grid > .product-list-45645654,
ul.products.sanat-products-grid > div,
body.woocommerce-shop ul.products > li.product,
body.woocommerce-shop ul.products > .product-list-45645654,
body.woocommerce-shop ul.products > div,
body.post-type-archive-product ul.products > .product-list-45645654,
body.tax-product_cat ul.products > .product-list-45645654{
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
  float:none !important;
  clear:none !important;
}
body.sanat-filtering .elementor-widget-wd_products,
body.sanat-filtering .elementor-widget-woocommerce-products,
body.sanat-filtering .wd-shop-product,
body.sanat-filtering .woocommerce-products-header + .products,
body.sanat-filtering .wd-products-element,
body.sanat-filtering .sanat-shop-layout__main > .elementor-widget,
body.sanat-filtering .sanat-shop-layout__main > .elementor-section,
body.sanat-filtering .sanat-shop-layout__main > ul.products{display:none !important}

@media (max-width:1024px){
  .sanat-mega{display:block !important}
  .sanat-mega__nav-slot{display:none !important}
  .sanat-shop-layout{
    display:grid !important;
    grid-template-columns:1fr;
    padding:0 12px;
  }
  .sanat-filter-stack{
    display:block !important;
    visibility:visible !important;
    opacity:1 !important;
    position:relative !important;
    width:100% !important;
    max-height:none !important;
    overflow:visible !important;
  }
  /* پنل باز: استایل sheet در site.css؛ بسته: مخفی در site.css — اینجا force نکن */
  .sanat-filtered-products ul.products,
  ul.sanat-products,
  ul.products.sanat-products-grid,
  body.woocommerce-shop ul.products,
  body.post-type-archive-product ul.products,
  body.tax-product_cat ul.products{
    grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
  }
  .sanat-filter-stack{
    top:auto;
    max-height:none;
  }
}
body.sanat-filtering .sanat-filters{z-index:5}
