/* Subcategory Slider Styles */
.subcategory-slider-section {
  padding: 40px 0;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.subcategory-slider-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: white;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.subcategory-slider {
  display: flex;
  transition: transform 0.6s ease-in-out;
  width: 300%; /* 3 slides */
}

.subcategory-slide {
  width: 33.333%;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  padding: 30px 20px;
}

.subcategory-slide.active {
  opacity: 1;
}

.subcategory-items {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  align-items: center;
}

.subcategory-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #333;
  padding: 15px;
  border-radius: 12px;
  transition: all 0.3s ease;
  background: #fff;
  border: 2px solid transparent;
}

.subcategory-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: #007bff;
  color: #007bff;
}

.subcategory-item img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 10px;
  border: 3px solid #f1f3f4;
  transition: border-color 0.3s ease;
}

.subcategory-item:hover img {
  border-color: #007bff;
}

.subcategory-item span {
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  line-height: 1.2;
}

/* Slider Indicators */
.slider-indicators {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 20px 0 10px;
  background: white;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ddd;
  cursor: pointer;
  transition: all 0.3s ease;
}

.indicator.active {
  background: #007bff;
  transform: scale(1.2);
}

.indicator:hover {
  background: #0056b3;
}

/* Auto-slide Animation */
@keyframes slideAnimation {
  0%, 30% { transform: translateX(0); }
  33.33%, 63.33% { transform: translateX(-33.333%); }
  66.66%, 96.66% { transform: translateX(-66.666%); }
  100% { transform: translateX(0); }
}

.subcategory-slider.auto-slide {
  animation: slideAnimation 12s infinite; /* 4 seconds per slide × 3 slides */
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .subcategory-items {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
  }
  
  .subcategory-item {
    padding: 10px;
  }
  
  .subcategory-item img {
    width: 45px;
    height: 45px;
  }
  
  .subcategory-item span {
    font-size: 12px;
  }
  
  .subcategory-slider-section {
    padding: 20px 0;
  }
}

@media (max-width: 480px) {
  .subcategory-items {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .subcategory-item img {
    width: 40px;
    height: 40px;
  }
  
  .subcategory-item span {
    font-size: 11px;
  }
}

/* Tablet Responsive */
@media (min-width: 769px) and (max-width: 1024px) {
  .subcategory-items {
    grid-template-columns: repeat(4, 1fr);
  }
}

.subcategory-icon {
  font-size: 28px;
  margin-bottom: 8px;
  color: #333;
  transition: all 0.3s ease;
}

.subcategory-item:hover .subcategory-icon {
  color: #007bff;
  transform: scale(1.1);
}

.subcategory-item span {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  transition: all 0.3s ease;
}

.subcategory-item:hover span {
  color: #007bff;
}

.swiper-button-next,
.swiper-button-prev {
  color: #333;
  background: white;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  background: #007bff;
  color: white;
}

.swiper-button-next:after,
.swiper-button-prev:after {
  font-size: 16px;
  font-weight: bold;
}

/* Responsive styles */
@media (max-width: 767px) {
  .subcategory-slider-container {
    padding: 15px 0;
    margin-bottom: 15px;
  }
  
  .subcategory-item {
    padding: 10px 5px;
    height: 80px;
  }
  
  .subcategory-icon {
    font-size: 22px;
    margin-bottom: 5px;
  }
  
  .subcategory-item span {
    font-size: 12px;
  }
  
  .swiper-button-next,
  .swiper-button-prev {
    width: 30px;
    height: 30px;
  }
  
  .swiper-button-next:after,
  .swiper-button-prev:after {
    font-size: 14px;
  }
}