/* Elegant Products Section Styling */

/* Section Background */
.cs_products_section.cs_style_elegant {
  background: linear-gradient(135deg, #fafbfc 0%, #f8f9fa 100%);
  position: relative;
  overflow: hidden;
}

/* Ensure slider container is properly styled */
.cs_products_section .cs_slider {
  position: relative;
  width: 100%;
}

.cs_products_section.cs_style_elegant::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 80%, rgba(0, 123, 255, 0.03) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(40, 167, 69, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

/* Product Card Elegant */
.cs_product_card_elegant {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
}

.cs_product_card_elegant:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  border-color: rgba(0, 123, 255, 0.2);
}

/* Product Image Wrapper - 1:1 Square Format */
.cs_product_image_wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
}

/* Fallback for browsers that don't support aspect-ratio */
@supports not (aspect-ratio: 1 / 1) {
  .cs_product_image_wrapper {
    height: 0;
    padding-bottom: 100%; /* Creates 1:1 aspect ratio */
  }
  
  .cs_product_image_wrapper::before {
    content: '';
    display: block;
    height: 0;
    padding-bottom: 100%;
  }
}

.cs_product_image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.cs_product_card_elegant:hover .cs_product_image {
  transform: scale(1.05);
}

/* Elegant Overlay */
.cs_product_overlay_elegant {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 123, 255, 0.9) 0%, rgba(40, 167, 69, 0.9) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
}

.cs_product_card_elegant:hover .cs_product_overlay_elegant {
  opacity: 1;
}

.cs_view_btn {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  text-decoration: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.cs_view_btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
  color: white;
}

/* Product Content */
.cs_product_content {
  padding: 24px;
}

.cs_product_category {
  display: inline-block;
  background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
  color: #1976d2;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.cs_product_title {
  margin: 0 0 12px 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}

.cs_product_title a {
  color: #2c3e50;
  text-decoration: none;
  transition: color 0.3s ease;
}

.cs_product_title a:hover {
  color: #007bff;
}

.cs_product_description {
  color: #6c757d;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Elegant Button */
.cs_product_btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  padding: 12px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.cs_product_btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.cs_product_btn:hover::before {
  left: 100%;
}

.cs_product_btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
  color: white;
}

.cs_product_btn i {
  transition: transform 0.3s ease;
}

.cs_product_btn:hover i {
  transform: translateX(4px);
}

/* Slider Enhancements */
.cs_products_section .cs_slider {
  position: relative;
}

.cs_products_section .cs_slider_container {
  padding: 0 15px;
}

.cs_products_section .cs_slide {
  padding: 0 10px;
}

/* Ensure slider navigation works */
.cs_products_section .cs_pagination {
  margin-top: 30px;
}

.cs_products_section .cs_pagination .swiper-pagination-bullet {
  background: #007bff;
  opacity: 0.3;
  transition: all 0.3s ease;
}

.cs_products_section .cs_pagination .swiper-pagination-bullet-active {
  opacity: 1;
  transform: scale(1.2);
}

/* Responsive Design */
@media (max-width: 768px) {
  .cs_product_image_wrapper {
    aspect-ratio: 1 / 1; /* Maintain square format on tablets */
  }
  
  .cs_product_content {
    padding: 20px;
  }
  
  .cs_product_title {
    font-size: 18px;
  }
  
  .cs_product_description {
    font-size: 13px;
  }
}

@media (max-width: 576px) {
  .cs_product_image_wrapper {
    aspect-ratio: 1 / 1; /* Maintain square format on mobile */
  }
  
  .cs_product_content {
    padding: 16px;
  }
  
  .cs_product_title {
    font-size: 16px;
  }
}

/* Animation Delays for Staggered Effect */
.cs_slide:nth-child(1) .cs_product_card_elegant { animation-delay: 0.1s; }
.cs_slide:nth-child(2) .cs_product_card_elegant { animation-delay: 0.2s; }
.cs_slide:nth-child(3) .cs_product_card_elegant { animation-delay: 0.3s; }
.cs_slide:nth-child(4) .cs_product_card_elegant { animation-delay: 0.4s; }
.cs_slide:nth-child(5) .cs_product_card_elegant { animation-delay: 0.5s; }
.cs_slide:nth-child(6) .cs_product_card_elegant { animation-delay: 0.6s; }
.cs_slide:nth-child(7) .cs_product_card_elegant { animation-delay: 0.7s; }

/* Subtle Section Animation */
.cs_products_section {
  animation: fadeInUp 0.8s ease-out;
}

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