/* ========================================
   PRODUITS SIMILAIRES / SLIDER
   ======================================== */

.produits-similaires-wrapper {
  margin: 50px auto;
  padding: 0 20px;
  max-width: 1400px;
  width: 100%;
  box-sizing: border-box;
}

/* ========================================
   TITRE
   ======================================== */

.produits-similaires-title {
  text-align: left;
  font-weight: 700;
  margin: 0 0 15px 0;
  padding-bottom: 20px;
  position: relative;
}

/* ========================================
   SLIDER
   ======================================== */

.produits-similaires-slider {
  position: relative;
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 40px;
  width: 100%;
}

.produits-similaires-viewport {
  overflow: hidden;
  width: 100%;
  min-width: 0;
}

.produits-similaires-grid {
  display: flex;
  gap: 30px;
  margin-bottom: 2px;
  padding: 0;
  transition: transform 0.4s ease;
  will-change: transform;
}

/* ========================================
   CARTE PRODUIT
   ======================================== */

.produits-similaire-item {
  flex: 0 0 calc((100% - 90px) / 4);
  min-width: 0;
  background: #ffffff;
  overflow: hidden;
  border: 1px solid #e0e0e0;
  box-sizing: border-box;
  height: auto;

  transition:
    box-shadow 0.3s ease,
    opacity 0.3s ease;

  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.produits-similaire-item:hover {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

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

.produits-similaire-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #ffffff;
}

/* ========================================
   IMAGE
   ======================================== */

.produits-similaire-card-image {
  position: relative;
  overflow: hidden;
  background: #f8f9fa;
  aspect-ratio: 1 / 1;
  cursor: pointer;
}

.produits-similaire-card-image a {
  display: block;
  width: 100%;
  height: 100%;
}

.produits-similaire-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.produits-similaire-card-image:hover img {
  transform: scale(1.05);
}

/* ========================================
   PAS D'IMAGE
   ======================================== */

.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: #f5f5f5;
  color: #999;
  font-size: 0.85rem;
}

/* ========================================
   INFORMATIONS PRODUIT
   ======================================== */

.produits-similaire-card-info {
  padding-top: 6px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* ========================================
   TITRE PRODUIT
   ======================================== */

.produits-similaire-card-title {
  padding: 0 8px;
  margin: 0 0 10px 0;
  font-size: 13px;
  font-weight: 600;
}

.produits-similaire-card-title a {
  text-decoration: none;
  transition: color 0.3s ease;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;

  overflow: hidden;
}

.produits-similaire-card-title a:hover {
  color: #52b370;
}

/* ========================================
   PRIX
   ======================================== */

.produits-similaire-card-price {
  margin-top: auto;
  padding-top: 10px;
  padding-left: 8px;
}

.produits-similaire-card-price .price-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: #e74c3c;
  display: inline-block;
}

.produits-similaire-card-price .price-label {
  display: block;
  font-size: 0.75rem;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
}

/* ========================================
   BOUTONS SLIDER
   ======================================== */

.produits-similaires-prev,
.produits-similaires-next {
  position: relative;
  z-index: 10;

  width: 45px;
  height: 45px;

  flex: 0 0 45px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;

  border: 1px solid #e0e0e0;
  border-radius: 50%;

  background: #ffffff;
  color: #333333;

  font-size: 30px;
  line-height: 1;

  cursor: pointer;

  transition:
    background 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease,
    opacity 0.3s ease;
}

.produits-similaires-prev:hover,
.produits-similaires-next:hover {
  background: #52b370;
  color: #ffffff;
  border-color: #52b370;
}

.produits-similaires-prev:focus,
.produits-similaires-next:focus {
  outline: 2px solid #52b370;
  outline-offset: 2px;
}

/* ========================================
   ANIMATION APPARITION
   ======================================== */

@keyframes fadeInUp {

  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }

}

/* ========================================
   DELAIS ANIMATION
   ======================================== */

.produits-similaire-item:nth-child(1) {
  animation-delay: 0.1s;
}

.produits-similaire-item:nth-child(2) {
  animation-delay: 0.2s;
}

.produits-similaire-item:nth-child(3) {
  animation-delay: 0.3s;
}

.produits-similaire-item:nth-child(4) {
  animation-delay: 0.4s;
}

.produits-similaire-item:nth-child(5) {
  animation-delay: 0.5s;
}

.produits-similaire-item:nth-child(6) {
  animation-delay: 0.6s;
}

/* ========================================
   TABLETTE
   ======================================== */

@media screen and (max-width: 1200px) {

  .produits-similaire-item {
    flex: 0 0 calc((100% - 60px) / 3);
  }

  .produits-similaires-title {
    font-size: 2rem;
  }

}

/* ========================================
   PETITE TABLETTE
   ======================================== */

@media screen and (max-width: 900px) {

  .produits-similaire-item {
    flex: 0 0 calc((100% - 30px) / 2);
  }

  .produits-similaire-card-info {
    padding: 15px;
  }

  .produits-similaire-card-title {
    min-height: 45px;
  }

}

/* ========================================
   MOBILE
   ======================================== */

@media screen and (max-width: 600px) {

  .produits-similaires-wrapper {
    padding: 0 15px;
    margin: 30px auto;
  }

  .produits-similaires-title {
    font-size: 1.8rem;
    padding-bottom: 15px;
  }

  .produits-similaires-slider {
    gap: 8px;
  }

  .produits-similaires-grid {
    gap: 15px;
  }

  .produits-similaire-item {
    flex: 0 0 100%;
  }

  .produits-similaires-prev,
  .produits-similaires-next {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    font-size: 25px;
  }

  .produits-similaire-card-info {
    padding: 12px;
  }

  .produits-similaire-card-title {
    min-height: 40px;
    margin-bottom: 10px;
  }

  .produits-similaire-card-price .price-value {
    font-size: 1.2rem;
  }

}

/* ========================================
   TRES PETIT MOBILE
   ======================================== */

@media screen and (max-width: 480px) {

  .produits-similaires-slider {
    gap: 5px;
  }

  .produits-similaires-grid {
    gap: 10px;
  }

  .produits-similaires-prev,
  .produits-similaires-next {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    font-size: 22px;
  }

}