/* ===================================
   HOMEPAGE - STYLES SPÉCIFIQUES
   ================================== */

/* Hero Section */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 20px;
}

.hero-card {
  background: var(--card);
  padding: 20px;
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease;
}

.hero-card:first-child {
  text-align: center;
}

.hero-card:first-child h2 {
  text-transform: uppercase;
}

.hero-card:last-child {
  text-align: center;
}

.hero-card:last-child h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.hero-card:hover {
  transform: translateY(-2px);
}

.hero-card h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.hero-image {
  width: auto;
  max-width: 100%;
  border-radius: 12px;
  margin-top: 0;
  max-height: 200px;
  object-fit: contain;
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease-in-out, transform 0.2s ease;
  cursor: pointer;
}

.hero-image:hover {
  transform: scale(1.02);
}

.hero-image.active {
  display: block;
  opacity: 1;
}

.hero-image-banner {
  width: 70%;
  max-width: 70%;
  max-height: 250px;
  object-fit: cover;
  object-position: center 40%;
}

/* Image Noël sans carrousel */
.hero-noel-image-container {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  min-height: 250px;
}

.hero-noel-image-container picture {
  width: 100%;
}

.hero-noel-image {
  width: 70%;
  max-width: 70%;
  max-height: 250px;
  object-fit: cover;
  object-position: center 40%;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.hero-noel-image:hover {
  transform: scale(1.02);
}

/* Carousel */
.carousel {
  position: relative;
  margin-top: 10px;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  border-radius: 12px;
  padding-bottom: 30px;
}

.hero-card:last-child .carousel {
  min-height: 250px;
}

.carousel-images {
  position: relative;
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 15px;
}

.hero-card:last-child .carousel-images {
  height: 200px;
}

.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
}

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

.indicator:hover {
  background: #94a3b8;
  transform: scale(1.2);
}

.indicator.active {
  background: #ef4444;
  width: 24px;
  border-radius: 4px;
}

/* Search Row */
.search-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

.search-row select {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.product {
  background: var(--card);
  padding: 14px;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.product img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 10px;
}

/* Product Carousel */
.product-carousel {
  position: relative;
  width: 100%;
  height: 220px;
  border-radius: 10px;
  overflow: hidden;
}

.product-images {
  position: relative;
  width: 100%;
  height: 100%;
}

.product-images img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.product-images img.active {
  opacity: 1;
  position: relative;
}

.product-carousel-indicators {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}

.product-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.product-indicator:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: scale(1.3);
}

.product-indicator.active {
  background: rgba(209, 213, 219, 1);
  width: 18px;
  border-radius: 3px;
}

.product-info {
  margin-top: 10px;
}

.product-description {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
  margin: 8px 0;
}

.product-name {
  font-weight: 700;
  margin-bottom: 4px;
}

.product .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.price {
  font-weight: 700;
  font-size: 16px;
}

/* Tags */
.tags {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.tag {
  background: #f1f5f9;
  padding: 6px 8px;
  border-radius: 999px;
  font-size: 12px;
  color: #444;
  white-space: nowrap;
}

.out-of-stock .product-carousel-indicators {
  display: none;
}

.out-of-stock .product-images img {
  display: none !important;
}

.out-of-stock .product-images picture:first-child img {
  display: block !important;
  position: relative !important;
  opacity: 1 !important;
}

/* Out of Stock Styles */
.out-of-stock .product-carousel,
.out-of-stock .product-image-wrapper {
  position: relative;
}

.out-of-stock .product-carousel .product-images img,
.out-of-stock .product-image-wrapper img {
  filter: blur(1px) grayscale(40%);
  opacity: 0.6;
}

.out-of-stock-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 10px;
  z-index: 20;
  pointer-events: none;
}

.out-of-stock-overlay span {
  background: rgba(203, 213, 225, 0.95);
  color: #475569;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.out-of-stock .btn[disabled], .qty .btn[disabled] {
  background: #cbd5e1;
  color: #94a3b8;
  cursor: not-allowed;
  opacity: 0.6;
}

.out-of-stock .btn[disabled]:hover, .qty .btn[disabled]:hover {
  background: #cbd5e1;
  transform: none;
  box-shadow: none;
}

.product-image-wrapper {
  position: relative;
  width: 100%;
  height: 220px;
  border-radius: 10px;
  overflow: hidden;
}

.product-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

/* Responsive Homepage */
@media (max-width: 1000px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  
  .hero-noel-image {
    width: 100%;
    max-width: 100%;
  }
  
  .search-row {
    flex-direction: column;
  }
  
  .search-row select {
    width: 100%;
  }
}
