/* Modern Product Card System - 3:4 Aspect Ratio with 80% Width Layout */
@import url("https://fonts.googleapis.com/css2?family=Audiowide:wght@400;700&family=Raleway:wght@300;400;500;600;700&family=Montserrat:wght@300;400;500;600;700&display=swap");

/* Enhanced CSS Variables for Product Cards */
:root {
  --primary-color: #1b3c53;
  --secondary-color-1: #456882;
  --secondary-color-2: #d2c1b6;
  --secondary-color-3: #f9f3ef;
  --text-dark: #1a1a1a;
  --text-light: #6b7280;
  --text-muted: #9ca3af;
  --white: #ffffff;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color-1));
  --gradient-secondary: linear-gradient(135deg, var(--secondary-color-2), var(--secondary-color-3));
  --shadow-card: 0 4px 20px rgba(27, 60, 83, 0.08);
  --shadow-card-hover: 0 12px 40px rgba(27, 60, 83, 0.15);
  --shadow-card-active: 0 8px 30px rgba(27, 60, 83, 0.12);
  --border-radius-card: 16px;
  --border-radius-image: 12px;
  --border-radius-button: 8px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Modern Product Card Container - 3:4 Aspect Ratio (Portrait) */
.modern-product-card {
  background: var(--white);
  border-radius: var(--border-radius-card);
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(27, 60, 83, 0.06);
  display: flex;
  flex-direction: column;
  width: 100%;
  aspect-ratio: 3/4;
  margin: 0 auto;
}

.modern-product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(27, 60, 83, 0.12);
}

.modern-product-card:active {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-active);
}

/* Product Image Section - 70% of card height for portrait layout */
.modern-product-image-section {
  position: relative;
  height: 70%;
  overflow: hidden;
  border-radius: var(--border-radius-card) var(--border-radius-card) 0 0;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.modern-product-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: var(--transition-smooth);
  padding: 16px;
  background: transparent;
}

.modern-product-card:hover .modern-product-image {
  transform: scale(1.05);
}

/* Product Badges - Fixed Position */
.modern-product-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 10;
}

.modern-product-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.modern-badge-new {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color-1));
  color: var(--white);
}

.modern-badge-offer {
  background: linear-gradient(135deg, var(--danger-color), #dc2626);
  color: var(--white);
}

.modern-badge-bestseller {
  background: linear-gradient(135deg, var(--warning-color), #d97706);
  color: var(--white);
}

/* Wishlist Button - Fixed Position */
.modern-wishlist-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(27, 60, 83, 0.1);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-bounce);
  z-index: 10;
  font-size: 0.9rem;
}

.modern-wishlist-btn:hover {
  background: var(--white);
  color: var(--danger-color);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.modern-wishlist-btn.wishlisted {
  background: var(--danger-color);
  color: var(--white);
  border-color: var(--danger-color);
}

.modern-wishlist-btn.wishlisted:hover {
  background: #dc2626;
  transform: scale(1.1);
}

/* Small Cart Icon - Bottom Right Corner */
.modern-cart-icon {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-color);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-bounce);
  z-index: 10;
  font-size: 0.85rem;
  box-shadow: 0 2px 8px rgba(27, 60, 83, 0.3);
  border: 2px solid var(--white);
  opacity: 0;
  visibility: hidden;
  transform: scale(0.8);
}

.modern-product-card:hover .modern-cart-icon {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.modern-cart-icon:hover {
  background: var(--secondary-color-1);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(27, 60, 83, 0.4);
}

.modern-cart-icon:active {
  transform: scale(0.95);
}

/* Quick View Overlay */
.modern-quick-view-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(27, 60, 83, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
}

.modern-product-card:hover .modern-quick-view-overlay {
  opacity: 1;
  visibility: visible;
}

.modern-quick-view-btn {
  background: var(--white);
  color: var(--primary-color);
  border: none;
  padding: 12px 24px;
  border-radius: var(--border-radius-button);
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-bounce);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modern-quick-view-btn:hover {
  background: var(--primary-color);
  color: var(--white);
  transform: scale(1.05);
}

/* Product Info Section - 30% of card height */
.modern-product-info {
  height: 30%;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
}

/* Brand Section */
.modern-product-brand {
  font-family: "Montserrat", sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0;
  line-height: 1;
}

/* Title Section with Ellipsis */
.modern-product-title {
  margin: 0;
  flex: 1;
  display: flex;
  align-items: flex-start;
}

.modern-product-title a {
  font-family: "Raleway", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  text-decoration: none;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.modern-product-title a:hover {
  color: var(--primary-color);
}

/* Rating Section */
.modern-product-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
}

.modern-rating-stars {
  display: flex;
  gap: 2px;
}

.modern-rating-star {
  color: #fbbf24;
  font-size: 0.8rem;
}

.modern-rating-star.empty {
  color: #e5e7eb;
}

.modern-rating-count {
  font-family: "Montserrat", sans-serif;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Price Section */
.modern-product-price {
  margin: 6px 0;
}

.modern-price-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.modern-current-price {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary-color);
}

.modern-original-price {
  font-family: "Montserrat", sans-serif;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: line-through;
  font-weight: 500;
}

.modern-discount-badge {
  background: linear-gradient(135deg, var(--success-color), #059669);
  color: var(--white);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: "Montserrat", sans-serif;
}

.modern-offer-text {
  font-size: 0.75rem;
  color: var(--success-color);
  font-weight: 600;
  font-family: "Montserrat", sans-serif;
  margin: 0;
  line-height: 1;
}

/* Stock Status */
.modern-stock-status {
  margin: 4px 0;
}

.modern-stock-indicator {
  font-family: "Montserrat", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
}

.modern-stock-in-stock {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
}

.modern-stock-low-stock {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-color);
}

.modern-stock-out-of-stock {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
}

/* Action Buttons Section */
.modern-product-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: auto;
}

.modern-add-to-cart-btn {
  flex: 1;
  background: var(--white);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 12px 16px;
  border-radius: var(--border-radius-button);
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-height: 44px;
}

.modern-add-to-cart-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.modern-add-to-cart-btn:hover::before {
  left: 0;
}

.modern-add-to-cart-btn i,
.modern-add-to-cart-btn span {
  position: relative;
  z-index: 2;
  transition: color 0.3s ease;
}

.modern-add-to-cart-btn:hover {
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(27, 60, 83, 0.25);
}

.modern-add-to-cart-btn:disabled {
  background: var(--secondary-color-3);
  color: var(--text-muted);
  border-color: var(--secondary-color-2);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.modern-add-to-cart-btn:disabled::before {
  display: none;
}

/* Grid Layouts - 80% Width with 10% margins */
.modern-products-grid {
  display: grid;
  gap: 2%;
  width: 80%;
  margin: 0 auto;
  padding: 0;
}

/* Home Page - 4 Cards Layout with Equal Spacing */
.modern-products-grid.home-layout {
  grid-template-columns: repeat(4, 1fr);
  max-width: 1400px;
}

/* Shop Page - Responsive Grid with 80% width */
.modern-products-grid.shop-layout {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  max-width: none;
}

/* Category Page - Dense Grid */
.modern-products-grid.category-layout {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5%;
}

/* Search Results - Compact Grid */
.modern-products-grid.search-layout {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5%;
}

/* Responsive Design */
@media (min-width: 1400px) {
  .modern-products-grid.home-layout {
    grid-template-columns: repeat(4, 1fr);
    max-width: 1600px;
  }
  
  .modern-products-grid.shop-layout {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1200px) and (max-width: 1399px) {
  .modern-products-grid.home-layout {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .modern-products-grid.shop-layout {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  .modern-products-grid.home-layout {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .modern-products-grid.shop-layout {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .modern-products-grid.home-layout,
  .modern-products-grid.shop-layout {
    grid-template-columns: repeat(2, 1fr);
    width: 90%;
    gap: 3%;
  }
}

@media (min-width: 576px) and (max-width: 767px) {
  .modern-products-grid.home-layout,
  .modern-products-grid.shop-layout {
    grid-template-columns: repeat(2, 1fr);
    width: 95%;
    gap: 3%;
  }
  
  .modern-product-info {
    padding: 14px;
  }
  
  .modern-product-title a {
    font-size: 0.95rem;
  }
}

@media (max-width: 575px) {
  .modern-products-grid.home-layout,
  .modern-products-grid.shop-layout {
    grid-template-columns: 1fr;
    width: 90%;
    gap: 4%;
  }
  
  .modern-product-info {
    padding: 12px;
    gap: 4px;
  }
  
  .modern-product-title a {
    font-size: 0.9rem;
  }
  
  .modern-current-price {
    font-size: 1rem;
  }
  
  .modern-add-to-cart-btn {
    font-size: 0.8rem;
    padding: 10px 14px;
    min-height: 40px;
  }
}

/* Loading State */
.modern-product-card.loading {
  pointer-events: none;
}

.modern-product-card.loading .modern-product-image {
  opacity: 0.6;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.8;
  }
}

/* Accessibility Improvements */
.modern-product-card:focus-within {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.modern-add-to-cart-btn:focus,
.modern-wishlist-btn:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .modern-product-card {
    border: 2px solid var(--text-dark);
  }
  
  .modern-product-badge {
    border: 1px solid var(--text-dark);
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .modern-product-card,
  .modern-product-image,
  .modern-add-to-cart-btn,
  .modern-wishlist-btn {
    transition: none;
  }
  
  .modern-product-card:hover {
    transform: none;
  }
  
  .modern-product-card:hover .modern-product-image {
    transform: none;
  }
}

/* Print Styles */
@media print {
  .modern-product-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
  
  .modern-quick-view-overlay,
  .modern-product-actions {
    display: none;
  }
}

/* Override for Home Layout - Remove Blank Space (Full Width) */
.modern-products-grid.home-layout {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 16px !important;
  gap: 24px !important;
}

/* Override for Shop Layout - Full Width */
.modern-products-grid.shop-layout {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 20px !important;
}

/* Standard Product Card Styles - 3 Cards per Row */
.standard-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.standard-product-card {
  background: var(--white);
  border-radius: var(--border-radius-card);
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
  overflow: hidden;
  border: 1px solid rgba(27, 60, 83, 0.08);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.standard-product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(27, 60, 83, 0.15);
}

/* Card Image Container */
.card-image-container {
  position: relative;
  height: 280px;
  overflow: hidden;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: var(--transition-smooth);
  padding: 20px;
}

.standard-product-card:hover .card-image {
  transform: scale(1.05);
}

.card-image-link {
  display: block;
  width: 100%;
  height: 100%;
}

/* Card Badges */
.card-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  padding: 6px 12px;
  border-radius: 20px;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 10;
}

.new-badge {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color-1));
  color: var(--white);
}

.discount-badge {
  background: linear-gradient(135deg, var(--danger-color), #dc2626);
  color: var(--white);
  top: 50px;
}

/* Wishlist Button */
.wishlist-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(27, 60, 83, 0.1);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  z-index: 10;
  font-size: 1rem;
}

.wishlist-btn:hover {
  background: var(--white);
  color: var(--danger-color);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.wishlist-btn.wishlisted {
  background: var(--danger-color);
  color: var(--white);
  border-color: var(--danger-color);
}

/* Card Content */
.card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.card-brand {
  font-family: "Montserrat", sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0;
}

.card-title {
  margin: 0;
  flex: 1;
}

.card-title a {
  font-family: "Raleway", sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  text-decoration: none;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.card-title a:hover {
  color: var(--primary-color);
}

/* Card Rating */
.card-rating {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rating-stars {
  display: flex;
  gap: 2px;
}

.rating-stars i {
  color: #fbbf24;
  font-size: 0.9rem;
}

.rating-stars i.ri-star-line {
  color: #e5e7eb;
}

.rating-text {
  font-family: "Montserrat", sans-serif;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Card Price */
.card-price {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.current-price {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--primary-color);
}

.original-price {
  font-family: "Montserrat", sans-serif;
  font-size: 1rem;
  color: var(--text-muted);
  text-decoration: line-through;
  font-weight: 500;
}

/* Card Stock */
.card-stock {
  margin: 8px 0;
}

.stock-status {
  font-family: "Montserrat", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
}

.stock-in-stock {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
}

.stock-low-stock {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-color);
}

.stock-out-of-stock {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
}

/* Add to Cart Button */
.card-add-to-cart {
  width: 100%;
  background: var(--white);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 14px 20px;
  border-radius: var(--border-radius-button);
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: auto;
}

.card-add-to-cart:hover {
  background: var(--primary-color);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(27, 60, 83, 0.25);
}

.card-add-to-cart:disabled {
  background: var(--secondary-color-3);
  color: var(--text-muted);
  border-color: var(--secondary-color-2);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Responsive Design for Standard Cards */
@media (max-width: 1024px) {
  .standard-products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    max-width: 800px;
  }
}

@media (max-width: 768px) {
  .standard-products-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 400px;
    padding: 0 15px;
  }
  
  .card-image-container {
    height: 250px;
  }
  
  .card-content {
    padding: 16px;
    gap: 10px;
  }
  
  .card-title a {
    font-size: 1rem;
  }
  
  .current-price {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .card-image-container {
    height: 220px;
  }
  
  .card-content {
    padding: 14px;
  }
  
  .card-add-to-cart {
    padding: 12px 16px;
    font-size: 0.85rem;
  }
}

/* Carousel Styles */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 20px;
}

.carousel-top-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.carousel-indicators {
  display: flex;
  gap: 8px;
  align-items: center;
}

.carousel-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(27, 60, 83, 0.3);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.carousel-indicator.active {
  background: var(--primary-color);
  transform: scale(1.2);
}

.carousel-indicator:hover {
  background: var(--secondary-color-1);
  transform: scale(1.1);
}

.carousel-container {
  position: relative;
  overflow: visible;
  border-radius: var(--border-radius-card);
}

.carousel-wrapper {
  position: relative;
  width: 100%;
}

.carousel-slide {
  display: none;
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide.active {
  display: block;
  opacity: 1;
  transform: translateX(0);
}

/* Side Navigation Buttons */
.carousel-side-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  font-size: 1.4rem;
  box-shadow: var(--shadow-card);
  z-index: 20;
  opacity: 0.8;
}

.carousel-side-btn:hover {
  background: var(--primary-color);
  color: var(--white);
  transform: translateY(-50%) scale(1.1);
  box-shadow: var(--shadow-card-hover);
  opacity: 1;
}

.carousel-side-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.carousel-prev {
  left: -30px;
}

.carousel-next {
  right: -30px;
}

/* Carousel Animation Classes */
.carousel-slide.slide-in-right {
  animation: slideInRight 0.5s ease-out forwards;
}

.carousel-slide.slide-in-left {
  animation: slideInLeft 0.5s ease-out forwards;
}

.carousel-slide.slide-out-left {
  animation: slideOutLeft 0.5s ease-out forwards;
}

.carousel-slide.slide-out-right {
  animation: slideOutRight 0.5s ease-out forwards;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutLeft {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-100px);
  }
}

@keyframes slideOutRight {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100px);
  }
}

/* Responsive Side Buttons */
@media (max-width: 1024px) {
  .section-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
  }
  
  .carousel-side-btn {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
  
  .carousel-prev {
    left: -25px;
  }
  
  .carousel-next {
    right: -25px;
  }
}

@media (max-width: 768px) {
  .carousel-side-btn {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }
  
  .carousel-prev {
    left: -22px;
  }
  
  .carousel-next {
    right: -22px;
  }
  
  .carousel-indicator {
    width: 10px;
    height: 10px;
  }
}

@media (max-width: 480px) {
  .section-header {
    margin-bottom: 30px;
  }
  
  .carousel-side-btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .carousel-prev {
    left: -20px;
  }
  
  .carousel-next {
    right: -20px;
  }
  
  .carousel-indicator {
    width: 8px;
    height: 8px;
  }
}

/* Loading State for Carousel */
.carousel-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 400px;
  color: var(--text-muted);
}

.carousel-loading i {
  font-size: 2rem;
  margin-bottom: 10px;
  animation: pulse 1.5s ease-in-out infinite;
}

/* Accessibility Improvements for Carousel */
.carousel-side-btn:focus,
.carousel-indicator:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* High Contrast Mode Support for Carousel */
@media (prefers-contrast: high) {
  .carousel-side-btn {
    border: 3px solid var(--text-dark);
  }
  
  .carousel-indicator {
    border: 2px solid var(--text-dark);
  }
}

/* Enhanced Loading Spinner */
.carousel-loading {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 400px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius-card);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.carousel-loading.loading-visible {
  opacity: 1;
}

.loading-spinner {
  position: relative;
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
}

.spinner-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 4px solid transparent;
  border-radius: 50%;
  animation: spin 1.5s linear infinite;
}

.spinner-ring:nth-child(1) {
  border-top-color: var(--primary-color);
  animation-delay: 0s;
}

.spinner-ring:nth-child(2) {
  border-right-color: var(--secondary-color-1);
  animation-delay: 0.3s;
  width: 70%;
  height: 70%;
  top: 15%;
  left: 15%;
}

.spinner-ring:nth-child(3) {
  border-bottom-color: var(--secondary-color-2);
  animation-delay: 0.6s;
  width: 40%;
  height: 40%;
  top: 30%;
  left: 30%;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.loading-text {
  font-family: "Montserrat", sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--primary-color);
  margin: 0;
  animation: pulse-text 1.5s ease-in-out infinite;
}

@keyframes pulse-text {
  0%, 100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

/* Enhanced Card Animations */
.card-animate {
  opacity: 0;
  transform: translateY(30px) scale(0.95);
  animation: cardFadeIn 0.6s ease-out forwards;
}

@keyframes cardFadeIn {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card-enter {
  animation: cardEnter 0.5s ease-out forwards;
}

@keyframes cardEnter {
  0% {
    opacity: 0;
    transform: translateY(20px) rotateX(10deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
  }
}

/* Enhanced Slide Animations */
.carousel-slide {
  display: none;
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide.active {
  display: block;
  opacity: 1;
  transform: translateX(0);
}

.carousel-slide.slide-in {
  animation: slideInSmooth 0.5s ease-out forwards;
}

.carousel-slide.slide-out {
  animation: slideOutSmooth 0.3s ease-in forwards;
}

@keyframes slideInSmooth {
  0% {
    opacity: 0;
    transform: translateX(30px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes slideOutSmooth {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(-30px) scale(0.98);
  }
}

/* Button Loading States */
.carousel-side-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: translateY(-50%) scale(0.9);
}

.add-to-cart:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Spinning Animation for Loading Icons */
.animate-spin {
  animation: spin 1s linear infinite;
}

/* Enhanced Hover Effects */
.standard-product-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.standard-product-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(27, 60, 83, 0.15);
}

.standard-product-card:hover .card-image {
  transform: scale(1.08);
}

.standard-product-card:hover .card-badge {
  transform: scale(1.1);
}

.standard-product-card:hover .wishlist-btn {
  transform: scale(1.15);
}

/* Staggered Animation for Multiple Cards */
.standard-products-grid .card-animate:nth-child(1) {
  animation-delay: 0ms;
}

.standard-products-grid .card-animate:nth-child(2) {
  animation-delay: 100ms;
}

.standard-products-grid .card-animate:nth-child(3) {
  animation-delay: 200ms;
}

/* Enhanced Button Interactions */
.card-add-to-cart {
  position: relative;
  overflow: hidden;
}

.card-add-to-cart::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;
}

.card-add-to-cart:hover::before {
  left: 100%;
}

/* Carousel Navigation Enhancements */
.carousel-side-btn {
  backdrop-filter: blur(15px);
  box-shadow: 0 8px 32px rgba(27, 60, 83, 0.1);
}

.carousel-side-btn:hover {
  box-shadow: 0 12px 40px rgba(27, 60, 83, 0.2);
}

.carousel-indicator {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(27, 60, 83, 0.1);
}

.carousel-indicator:hover {
  box-shadow: 0 4px 12px rgba(27, 60, 83, 0.2);
}

.carousel-indicator.active {
  box-shadow: 0 4px 16px rgba(27, 60, 83, 0.3);
}

/* Reduced Motion Support for Carousel */
@media (prefers-reduced-motion: reduce) {
  .carousel-slide,
  .card-animate,
  .loading-spinner,
  .carousel-side-btn,
  .carousel-indicator {
    animation: none !important;
    transition: none !important;
  }
  
  .carousel-slide.slide-in,
  .carousel-slide.slide-out,
  .card-enter {
    animation: none !important;
  }
  
  .standard-product-card:hover {
    transform: none;
  }
}

/* High Performance Mode */
@media (prefers-reduced-motion: no-preference) {
  .carousel-slide {
    will-change: transform, opacity;
  }
  
  .card-animate {
    will-change: transform, opacity;
  }
  
  .standard-product-card {
    will-change: transform;
  }
}