/* Your custom css */

/* ============================================
   CORRECTION SECTION COLLECTION
   ============================================ */

/* Fix offer-product pour affichage horizontal des produits */
.offer-product {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 1rem !important;
  flex-direction: unset !important;
}

/* Grille produits collection (sans carousel) */
.collection-products-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 1fr; /* Force toutes les lignes à avoir la même hauteur */
}

@media (min-width: 768px) {
  .collection-products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 992px) {
  .collection-products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1400px) {
  .collection-products-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* Forcer toutes les cartes produit à avoir la même hauteur */
.collection-products-grid .product-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Image produit avec ratio fixe */
.collection-products-grid .product-card .product-thumb {
  position: relative;
  width: 100%;
  padding-top: 100%; /* Ratio 1:1 (carré) */
  overflow: hidden;
  flex-shrink: 0;
}

.collection-products-grid .product-card .product-thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collection-products-grid .product-card .product-thumb a {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Contenu produit flexible */
.collection-products-grid .product-card .product-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.75rem;
}

/* Titre produit avec hauteur fixe */
.collection-products-grid .product-card .product-content .title {
  min-height: 2.5rem;
  max-height: 2.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.25rem;
  margin-bottom: 0.5rem;
}

/* Prix toujours en bas */
.collection-products-grid .product-card .product-content .single_content__info {
  margin-top: auto;
}

/* Description produit cachée dans grille collection */
.collection-products-grid .product-card .product-content .single_content {
  display: none;
}

/* Assurer que le carousel prend toute la largeur disponible */
.product-slider-wrapper {
  flex-grow: 1;
  width: calc(100% - (var(--divide-w) + 20px));
}

/* Optimisation bannière collection */
.offer-banner {
  width: var(--divide-w);
  flex-shrink: 0;
}

/* Navigation carousel owl */
.product-with-banner .owl-nav button.owl-prev,
.product-with-banner .owl-nav button.owl-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5) !important;
  color: white !important;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  z-index: 10;
  transition: all 0.3s ease;
}

.product-with-banner .owl-nav button.owl-prev {
  left: 10px;
}

.product-with-banner .owl-nav button.owl-next {
  right: 10px;
}

.product-with-banner .owl-nav button:hover {
  background: rgba(0, 0, 0, 0.8) !important;
}

/* Responsive: Mobile */
@media (max-width: 575px) {
  .offer-product {
    grid-template-columns: 1fr;
  }

  .offer-wrapper {
    flex-direction: column;
  }

  .offer-banner {
    width: 100%;
    margin-bottom: 1rem;
  }

  .product-slider-wrapper {
    width: 100%;
  }
}

/* Responsive: Tablet */
@media (min-width: 576px) and (max-width: 767px) {
  .offer-product {
    grid-template-columns: 1fr;
  }
}

/* Responsive: Desktop petit */
@media (min-width: 768px) and (max-width: 991px) {
  .offer-product {
    grid-template-columns: 1fr 1fr;
  }
}

/* Responsive: Desktop moyen */
@media (min-width: 992px) and (max-width: 1399px) {
  .offer-product {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* Responsive: Desktop large */
@media (min-width: 1400px) {
  .offer-product {
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }
}

/* Section header style cohérent */
.section-header.left-style {
  margin-bottom: 1.5rem;
}

.section-header.left-style .title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
  margin: 0;
}

/* Espacement section collection */
.my-60 {
  margin-top: 3.75rem;
  margin-bottom: 3.75rem;
}
