/* ===== Aryato lightweight mobile categories ===== */
#aryato-mobile-categories.aryato-mcat{
  --mcat-blue:#2E79FF;
  --mcat-text:#222;
  --mcat-border:#e8e8e8;
  --mcat-bg:#fff;
  display:flex;
  width:100%;
  max-width:100%;
  min-width:0;
  box-sizing:border-box;
  background:var(--mcat-bg);
  color:var(--mcat-text);
  font-family:YekanBakhFaNum,inherit;
  padding:0;
  gap:0;
  direction:rtl;
  position:fixed;
  inset:0;
  z-index:999999;
  height:100dvh;
  max-height:100dvh;
  overflow:hidden;
  transform:translateY(100%);
  visibility:hidden;
  pointer-events:none;
  transition:transform .2s ease,visibility 0s linear .2s;
}

#aryato-mobile-categories.aryato-mcat.is-open{
  transform:translateY(0);
  visibility:visible;
  pointer-events:auto;
  transition:transform .2s ease,visibility 0s linear 0s;
}

#aryato-mobile-categories .aryato-mcat__close{
  position:absolute;
  top:8px;
  left:8px;
  z-index:20;
  width:36px;
  height:36px;
  border:0;
  border-radius:50%;
  background:#fff;
  color:#222;
  box-shadow:0 1px 8px rgba(0,0,0,.12);
  font-size:25px;
  line-height:1;
  cursor:pointer;
}


#aryato-mobile-categories *,
#aryato-mobile-categories *::before,
#aryato-mobile-categories *::after{
  box-sizing:border-box;
}

#aryato-mobile-categories .aryato-mcat__tabs{
  flex:0 0 119px;
  width:119px;
  height:100%;
  max-height:none;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  scrollbar-width:none;
  border-right:0;
}

#aryato-mobile-categories .aryato-mcat__tabs::-webkit-scrollbar,
#aryato-mobile-categories .aryato-mcat__panels::-webkit-scrollbar{
  width:0;
  height:0;
}

#aryato-mobile-categories .aryato-mcat__tab{
  appearance:none;
  -webkit-appearance:none;
  width:100%;
  min-height:78px;
  margin:0;
  padding:9px 4px;
  border:0;
  border-left:1px solid var(--mcat-border);
  border-bottom:1px solid var(--mcat-border);
  border-radius:0;
  background:#fff;
  color:inherit;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  text-align:center;
  font-family:inherit;
  font-size:10px;
  font-weight:700;
  line-height:1.45;
  cursor:pointer;
}

#aryato-mobile-categories .aryato-mcat__tab:first-child{
  border-top:0;
}

#aryato-mobile-categories .aryato-mcat__tab.is-active{
  background:#fff;
  color:var(--mcat-blue);
}

#aryato-mobile-categories .aryato-mcat__tab img{
  width:30px;
  height:30px;
  display:block;
  object-fit:contain;
  flex:0 0 30px;
}

#aryato-mobile-categories .aryato-mcat__tab span{
  display:block;
  width:100%;
}

#aryato-mobile-categories .aryato-mcat__panels{
  flex:1 1 auto;
  min-width:0;
  height:100%;
  max-height:none;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  scrollbar-width:none;
  padding:0 8px 24px 10px;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
}

#aryato-mobile-categories .aryato-mcat__panel{
  display:none;
  width:100%;
  min-width:0;
}

#aryato-mobile-categories .aryato-mcat__panel.is-active{
  display:block;
}

#aryato-mobile-categories .aryato-mcat__section{
  width:100%;
  margin:0 0 14px;
}

#aryato-mobile-categories .aryato-mcat__section:last-child{
  margin-bottom:0;
}

#aryato-mobile-categories .aryato-mcat__section-title{
  min-height:30px;
  padding:2px 0 7px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:6px;
  color:var(--mcat-blue);
  font-family:YekanBakhFaNum,inherit;
  font-size:13px;
  font-weight:600;
  line-height:1;
  text-align:right;
}

#aryato-mobile-categories .aryato-mcat__section-title i{
  width:8px;
  height:8px;
  display:inline-block;
  flex:0 0 8px;
  border-left:2px solid var(--mcat-blue);
  border-bottom:2px solid var(--mcat-blue);
  transform:rotate(45deg);
  margin-top:-2px;
}

#aryato-mobile-categories .aryato-mcat__grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px 10px;
  width:100%;
}

#aryato-mobile-categories .aryato-mcat__item{
  position:relative;
  min-width:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  gap:1px;
  padding:0;
  color:inherit;
  text-decoration:none;
  text-align:center;
  font-family:YekanBakhFaNum,inherit;
  font-size:10px;
  font-weight:500;
  line-height:1.35;
}

#aryato-mobile-categories .aryato-mcat__item:hover,
#aryato-mobile-categories .aryato-mcat__item:focus{
  color:inherit;
  text-decoration:none;
}

#aryato-mobile-categories .aryato-mcat__image{
  width:45px;
  height:45px;
  display:block;
  object-fit:cover;
  object-position:center center;
  flex:0 0 45px;
  margin:0 auto;
}

#aryato-mobile-categories .aryato-mcat__item span{
  display:block;
  width:100%;
  overflow-wrap:anywhere;
}

/* جلوگیری از تداخل با استایل‌های عمومی منوی WoodMart */
#aryato-mobile-categories button:focus-visible,
#aryato-mobile-categories a:focus-visible{
  outline:2px solid var(--mcat-blue);
  outline-offset:2px;
}

@media (max-width:380px){
  #aryato-mobile-categories.aryato-mcat{
    padding-left:0;
    padding-right:0;
  }
  #aryato-mobile-categories .aryato-mcat__tabs{
    flex-basis:108px;
    width:108px;
  }
  #aryato-mobile-categories .aryato-mcat__panels{
    padding-left:6px;
    padding-right:6px;
  }
  #aryato-mobile-categories .aryato-mcat__grid{
    gap:10px 6px;
  }
}

html.aryato-mcat-open,
body.aryato-mcat-open{
  overflow:hidden !important;
  touch-action:none;
}

@media (min-width:1025px){
  /* این بلوک برای منوی موبایل است؛ فقط در دسکتاپ (بالای ۱۰۲۴px) مخفی می‌ماند.
     تبلت (عمودی/افقی) و موبایل افقی هم مثل موبایل عمودی منو را نشان می‌دهند. */
  #aryato-mobile-categories.aryato-mcat{
    display:none;
  }
}
