/* ========================================
   PRODUCT CAROUSEL SECTION
   ======================================== */

.section--products {
  padding: 80px 0;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  /* overflow: hidden; */ /* Removed to prevent clipping arrows if they go outside */
}

@media (max-width: 768px) {
  .section--products {
    padding: 60px 0;
  }
}

.section--products .section__header {
  text-align: center;
  margin-bottom: 50px;
}

.section--products .section__title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 15px;
}

@media (max-width: 768px) {
  .section--products .section__title {
    font-size: 2rem;
  }
}

.section--products .section__subtitle {
  font-size: 1.1rem;
  color: #7f8c8d;
  font-weight: 400;
}

/* ========================================
   CAROUSEL CONTAINER
   ======================================== */

.products-carousel {
  position: relative;
  padding: 0 70px; /* Increased padding to give space for arrows */
}

@media (max-width: 768px) {
  .products-carousel {
    padding: 0 40px;
  }
}

.products-carousel__track-container {
  overflow: hidden;
  width: 100%;
}

.products-carousel__track {
  display: flex;
  gap: 30px;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.products-carousel__track--center {
  justify-content: center;
}

/* ========================================
   PRODUCT CARD
   ======================================== */

.product-card {
  min-width: calc(33.333% - 20px);
  max-width: calc(33.333% - 20px);
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

@media (max-width: 1024px) {
  .product-card {
    min-width: calc(50% - 15px);
    max-width: calc(50% - 15px);
  }
}

@media (max-width: 640px) {
  .product-card {
    min-width: 100%;
    max-width: 100%;
  }
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.product-card__image {
  position: relative;
  width: 100%;
  height: 280px;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-card__image img {
  transform: scale(1.1);
}

.product-card__badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.product-card__badge--popular {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

.product-card__content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-card__title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 12px;
  line-height: 1.4;
  min-height: 60px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}

.product-card__description {
  font-size: 0.95rem;
  color: #7f8c8d;
  line-height: 1.6;
  margin-bottom: 20px;
  min-height: 48px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}

.product-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid #ecf0f1;
  margin-top: auto;
}

.product-card__price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #667eea;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========================================
   CAROUSEL BUTTONS
   ======================================== */

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: white;
  border: none;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100; /* Increased z-index */
  color: #667eea;
  outline: none;
}

.carousel-btn:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
  transform: translateY(-50%) scale(1.1);
}

.carousel-btn:hover svg {
  stroke: white;
}

.carousel-btn svg {
  transition: stroke 0.3s ease;
}

.carousel-btn--prev {
  left: 10px; /* Position inside padding */
}

.carousel-btn--next {
  right: 10px; /* Position inside padding */
}

.carousel-btn:disabled {
  opacity: 0.15;
  visibility: visible;
  cursor: not-allowed;
  pointer-events: none;
}

@media (max-width: 768px) {
  .carousel-btn {
    width: 40px;
    height: 40px;
  }
  
  .carousel-btn svg {
    width: 20px;
    height: 20px;
  }
}

/* ========================================
   CAROUSEL DOTS
   ======================================== */

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 40px;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d1d5db;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.carousel-dot:hover {
  background: #9ca3af;
  transform: scale(1.2);
}

.carousel-dot.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  width: 30px;
  border-radius: 6px;
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-card {
  animation: slideIn 0.6s ease-out backwards;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }
.product-card:nth-child(6) { animation-delay: 0.6s; }
