/* Conteneur principal */
.containers {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.section-titles {
  text-align: center;
  margin-bottom: 30px;
  font-size: 2rem;
  color: var(--dark-color);
  text-decoration: underline ;
  text-underline-position: under;
}

/* Barre de recherche */
.search-container {
    max-width: 600px;
    margin: 0 auto 30px;
    position: relative;
}

.search-container form {
    display: flex;
    position: relative;
}

.search-container input {
    width: 100%;
    padding: 12px 50px 12px 20px;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-size: 1rem;
    outline: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.search-container input:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.search-container button {
    position: absolute;
    right: 5px;
    top: 5px;
    background: transparent;
    color: var(--dark-color);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.search-container button:hover {
    color: var(--secondary-color);
}

.clear-search {
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.clear-search:hover {
    color: var(--accent-color);
}

/* Message quand aucun résultat */
.no-results {
    text-align: center;
    grid-column: 1 / -1;
    padding: 40px;
    color: #666;
    width: 100%;
}

.no-results h3 {
    color: var(--dark-color);
    margin-bottom: 10px;
}

.no-results .btn {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.no-results .btn:hover {
    background-color: var(--dark-color);
}

/* Grille de produits */
.products-containers {
  width: 100%;
}

.products-scrollers {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 produits par ligne par défaut */
  gap: 25px;
}

.product-cards {
  background: #fff;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-cards:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Styles des produits */
.product-image-containers {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  border: none;
}

.product-image:hover {
  transform: scale(1.05);
}

.stock-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: bold;
  color: #ffffff;
}

.stock-badge.in-stock {
  background-color: #65d880;
}

.stock-badge {
  background-color: #dc3545;
}

.product-infos {
  padding: 15px;
}

.products-title {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--dark-color);
}

.products-description {
  font-size: 0.9rem;
  color: gray;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.price {
  font-size: 1.1rem;
  font-weight: bold;
  color: black;
  font-style: italic;
  font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
  margin-bottom: 15px;
}

.products-actions {
  display: flex;
  flex-direction: column;
}

.btn {
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 0.9rem;
  text-align: center;
  transition: all 0.3s ease;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.details-btn {
  background-color: var(--light-color);
  color: var(--dark-color);
  border: 1px solid #ddd;
}

.details-btn:hover {
 opacity: 0.8;
}

.whatsapp-btn {
  background-color: #25D366;
  color: white;
}

.whatsapp-btn:hover {
  background-color: #128C7E;
}

/* Responsive */
@media (max-width: 1024px) {
  /* 3 produits par ligne sur tablette */
  .products-scrollers {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

@media (max-width: 768px) {
  /* 2 produits par ligne sur mobile */
  .products-scrollers {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  .product-image-containers {
    height: 180px;
  }
}

@media (max-width: 480px) {
  /* Optimisation pour très petits écrans */
  .products-scrollers {
    gap: 10px;
  }
  
  .product-infos {
    padding: 10px;
  }
  
  .products-actions {
    flex-direction: column;
    gap: 8px;
  }
  
  .btn {
    padding: 8px;
    font-size: 0.8rem;
  }
}