/* Conteneur principal */
.index-product-carousel,
.product-best-seller {
  background-color: var(--background-color-3);
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px 20px 30px;
}

/* Titre et message promo */
.index-product-carousel-header,
.product-best-seller-header {
  text-align: center;
}

.remise-message {
  text-align: center;
  font-weight: bold;
  animation: popBounce 1s ease-in-out 3;
}

/* Grille produits */
.index-product-carousel-content-wrapper,
.product-best-seller-content-wrapper {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  /* 2 produits par ligne */
  gap: 12px;
}

/* Carte produit */
.index-product-carousel-item,
.product-best-seller-item {
  background-color: var(--background-color-1);
  border: 1px solid var(--background-color-2);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 12px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Top Vente label (uniquement best-seller) */
.top-sale-label {
  position: absolute;
  top: 50px;
  left: -25px;
  background: linear-gradient(135deg, var(--background-color-1) 0%, var(--background-color-2) 180%);
  padding: 4px 24px;
  font-size: 0.8rem;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transform: rotate(-45deg);
  transform-origin: left top;
  box-sizing: border-box;
  user-select: none;
}

/* Image produit */
.product-image,
.best_seller_product-image {
  width: 100%;
  height: 120px;
  object-fit: contain;
  margin-bottom: 8px;
  transition: transform 0.3s ease;
}

.index-product-carousel-item:hover .product-image,
.product-best-seller-item:hover .best_seller_product-image {
  transform: scale(1.05);
}

/* Nom produit */
.product-name,
.best-seller-product-name {
  margin: 12px 0;
  text-align: center;
  font-family: var(--font-accent);
  font-weight: 600;
  font-size: 15px;
  color: var(--primary-color);
  line-height: 1.4;
  margin: 0 auto;
  width: 80%;
}

/* Prix */
.product-info-wrapper,
.best-seller-product-info-wrapper {
  text-align: center;
}

.prix-avant-remise {
  font-size: 0.9rem;
  font-weight: bold;
}

.include-tva {
  font-size: 0.75rem;
  color: #777;
}

.prix-ttc,
.prix-ttc-avant {
  font-size: 0.9rem;
  font-weight: bold;
  margin-top: 4px;
}

.prix-ttc-avant {
  font-size: 0.8rem;
  text-decoration: line-through;
  color: #888;
}

/* Boutons */
.btn-add-cart,
.btn-sort,
.btn-see-all {
  background-color: var(--primary-color);
  color: black;
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  width: 100%;
  transition: background-color 0.3s ease;
}

.btn-add-cart:hover,
.btn-sort:hover,
.btn-see-all:hover {
  background-color: #1e7e34;
}

/* Lien produit */
.product-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-link:hover {
  text-decoration: underline;
  color: var(--primary-color);
}

/* Avis */
.rating-container {
  text-align: center;
  margin-top: 4px;
  color: rgba(255, 213, 0, 0.934);
}

/* Formulaire tri */
.sort-form {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 14px;
}

.sort-form label {
  color: var(--primary-color);
  font-weight: 600;
  align-self: center;
}

.sort-form select {
  width: 80%;
}

.sort-form select:focus {
  border-color: var(--primary-color);
  outline: none;
}

/* Animation promo */
@keyframes popBounce {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

.product-description {
  white-space: pre-line;
  font-size: 1rem;
  line-height: 1.5;
}