.cat-slider-wrapper {
  position: relative;
}

.cat-slider-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 10px 40px 30px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.cat-slider-track::-webkit-scrollbar {
  display: none;
}

.cat-card {
  width: 150px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.cat-card-bg {
  width: 150px;
  height: 150px;
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cat-card-bg img {
  width: 75%;
}

.cat-title {
  margin: 10px 0;
  font-weight: 700;
}

.cat-count {
  display: inline-block;
  padding: 6px 14px;
  background: #f1f3ef;
  border-radius: 999px;
  font-size: 13px;
}

.cat-nav {
  position: absolute;
  top: 60px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  border: none;
  cursor: pointer;
  z-index: 2;
}

.cat-nav.prev { left: 0; }
.cat-nav.next { right: 0; }

.cat-scrollbar {
  height: 3px;
  background: #e5e5e5;
  margin: 0 40px;
  border-radius: 10px;
  position: relative;
}

.cat-scrollbar span {
  position: absolute;
  height: 100%;
  width: 20%;
  background: currentColor;
  border-radius: 10px;
}

/* موبایل: حدود ۲.۸ آیتم در قاب */
@media (max-width: 767px) {
  .cat-slider-track {
    gap: 12px;
    padding: 8px 0 20px;
    scroll-snap-type: x mandatory;
  }

  .cat-card {
    /* 2.8 آیتم + ۲ فاصله بین آن‌ها */
    width: calc((100% - 24px) / 2.8);
    scroll-snap-align: start;
  }

  .cat-card-bg {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 20px;
  }

  .cat-card-bg img {
    width: 150%;
  }

  .cat-title {
    margin: 8px 0 6px;
    font-size: 13px;
    line-height: 1.35;
  }

  .cat-count {
    padding: 4px 10px;
    font-size: 11px;
  }

  .cat-nav {
    display: none;
  }

  .cat-scrollbar {
    margin: 0;
  }
}
