/* =========================================================
   Bestsellers Slider Component CSS
   ========================================================= */

.bestsellers-section {
  grid-column: 1 / -1;
  width: 100%;
  margin: 36px 0 28px;
  padding: 32px 24px;
  background: #f8fafc;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  box-sizing: border-box;
  position: relative;
}

.bestsellers-header {
  text-align: center;
  margin-bottom: 28px;
}

.bestsellers-title {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.5px;
}

.bestsellers-slider-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.bestsellers-track-container {
  width: 100%;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.bestsellers-track-container::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.bestsellers-track {
  display: flex;
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
}

.bestsellers-item {
  flex: 0 0 calc((100% - 60px) / 4);
  max-width: calc((100% - 60px) / 4);
  min-width: 0;
  box-sizing: border-box;
  background: #ffffff;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #f1f5f9;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bestsellers-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.bestsellers-item .product-card {
  margin: 0;
}

/* Nav Buttons */
.bestsellers-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  transition: all 0.25s ease;
}

.bestsellers-nav:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.3);
}

.bestsellers-nav.prev-btn {
  right: -20px;
}

.bestsellers-nav.next-btn {
  left: -20px;
}

/* Responsive */
@media (max-width: 1200px) {
  .bestsellers-item {
    flex: 0 0 calc((100% - 40px) / 3);
    max-width: calc((100% - 40px) / 3);
  }
}

@media (max-width: 768px) {
  .bestsellers-section {
    padding: 24px 16px;
    overflow: hidden;
  }
  .bestsellers-item {
    flex: 0 0 calc((100% - 20px) / 2);
    max-width: calc((100% - 20px) / 2);
  }
  .bestsellers-nav {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }
  .bestsellers-nav.prev-btn {
    right: 4px;
  }
  .bestsellers-nav.next-btn {
    left: 4px;
  }
}

@media (max-width: 480px) {
  .bestsellers-item {
    flex: 0 0 78%;
    max-width: 78%;
  }
  .bestsellers-nav {
    display: none; /* در موبایل لمسی با کشیدن انگشت (Swipe) اسکرول می‌شود */
  }
}

