/* ==========================================================
   کاروسل دستی محصولات صفحه اصلی
   تعداد در هر نما: --per   |   فاصله‌ی کارت‌ها: --gap
   (برای ۳ کارت روی موبایل، در بخش @media پایین --per را 3 کن)
   ========================================================== */

html body.home ul.products {
  --per: 3;
  --gap: 20px;
  display: flex !important;
  flex-wrap: nowrap !important;
  grid-template-columns: none !important;
  gap: var(--gap) !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 8px 0 !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scroll-snap-type: x mandatory !important;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  transform: none !important;
}
html body.home ul.products::-webkit-scrollbar {
  display: none;
}

/* هر کارت دقیقاً 1/--per عرض */
html body.home ul.products > li.product {
  flex: 0 0 calc((100% - (var(--per) - 1) * var(--gap)) / var(--per)) !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  scroll-snap-align: none !important;
}
/* فقط ابتدای هر «صفحه» نقطه‌ی توقف است */
html body.home ul.products > li.product:nth-child(3n+1) {
  scroll-snap-align: start !important;
}
/* حداکثر ۹ محصول */
html body.home ul.products > li.product:nth-child(n+10) {
  display: none !important;
}

/* موبایل: ۲ کارت در هر نما */
@media (max-width: 600px) {
  html body.home ul.products {
    --per: 2;
    --gap: 12px;
  }
  html body.home ul.products > li.product:nth-child(3n+1) {
    scroll-snap-align: none !important;
  }
  html body.home ul.products > li.product:nth-child(2n+1) {
    scroll-snap-align: start !important;
  }
}

/* ---------- دکمه‌ها و نقطه‌ها ---------- */
.dc-wrap {
  position: relative;
  width: 100%;
}
.dc-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 22px;
}
.dc-btn {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: #c99a5b;
  color: #3b322d;
  cursor: pointer;
  transition: background .25s ease, opacity .25s ease;
}
.dc-btn:hover:not(:disabled) {
  background: #e3cda0;
}
.dc-btn:disabled {
  opacity: .35;
  cursor: default;
}
.dc-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}
.dc-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dc-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: rgba(201, 154, 91, .4);
  cursor: pointer;
  transition: width .25s ease, background .25s ease;
}
.dc-dot.is-active {
  width: 22px;
  background: #c99a5b;
}
