#subcats-carousel { margin: 12px 0 20px; }
#subcats-carousel .subcats-head { margin-bottom: 10px; }

#subcats-carousel .btn-subcats{
  border:1px solid #e5e7eb; background:#fff; padding:6px 10px; border-radius:10px; cursor:pointer;
}
#subcats-carousel .btn-subcats:hover{ background:#f8fafc; }

#subcats-carousel .subcats-wrap{ position:relative; }

/* خط اصلی اسکرول افقی */
#subcats-carousel .subcats-scroll{
  display:flex; gap:10px;
  overflow-x:auto; overflow-y:hidden;
  -webkit-overflow-scrolling:touch;
  scroll-snap-type:x mandatory;
  padding-bottom:6px;
}
#subcats-carousel .subcats-scroll::-webkit-scrollbar{ height:8px; }
#subcats-carousel .subcats-scroll::-webkit-scrollbar-thumb{ background:#e5e7eb; border-radius:999px; }

/* کارت هر زیر‌دسته */
#subcats-carousel .subcat-card{
  flex:0 0 auto; width:160px; max-width:65vw;
  scroll-snap-align:start;
  background:#fff; border:1px solid #eef2f7; border-radius:16px;
  display:flex; flex-direction:column; align-items:center; gap:8px;
  padding:12px; text-decoration:none;
  transition:transform .15s ease, box-shadow .15s ease, border-color .2s ease;
}
#subcats-carousel .subcat-card:hover{
  transform:translateY(-2px);
  box-shadow:0 6px 20px rgba(0,0,0,.06);
  border-color:#e5e7eb;
}

#subcats-carousel .subcat-card img{
  width:64px; height:64px; object-fit:cover; border-radius:12px; background:#f3f4f6;
}
#subcats-carousel .subcat-fallback-icon{
  width:64px; height:64px; border-radius:12px; background:#f3f4f6;
  display:flex; align-items:center; justify-content:center;
}
#subcats-carousel .subcat-fallback-icon i{ font-size:22px; color:#64748b; }

#subcats-carousel .subcat-title{
  font-size:.9rem; line-height:1.4; text-align:center; color:#111827;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}

/* Responsive */
@media (max-width: 768px){
  #subcats-carousel .subcat-card{ width:140px; }
}
@media (max-width: 480px){
  #subcats-carousel .subcat-card{ width:130px; padding:10px; }
  #subcats-carousel .subcat-card img{ width:56px; height:56px; }
}

/* درگ اسکرول حالت grabbing */
#subcats-carousel .subcats-scroll.grabbing { cursor: grabbing; cursor: -webkit-grabbing; }
