.main-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  margin-top: 144px;
}
.sidebar {
  width: 250px;
  background: #fff;
  border-right: 1px solid #ddd;
  padding: 20px;
  height: 100vh;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

.sidebar h1 {
  font-size: 18px;
  color: #333;
  margin-bottom: 10px;
}

.sidebar label {
  font-size: 14px;
  color: #555;
}

.sidebar input[type="checkbox"] {
  margin-right: 10px;
}

.sidebar button {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  margin-top: 15px;
  width: 100%;
}

.sidebar button:hover {
  background-color: #0056b3;
}

.container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  align-items: flex-start;
  flex: 1;
}

.card {
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 16px;
  width: 300px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.card button[type="submit"]:hover {
  background-color: #0056b3;
  /* Changement de couleur au survol */
}

.carousel {
  position: relative;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  overflow: hidden;
  /* Masquer les images qui débordent */
}

.carousel input[type="radio"] {
  display: none;
  /* Masquer les boutons radio */
}

.carousel-images {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-image {
  flex: 0 0 100%;
}

.carousel input[type="radio"]:nth-of-type(1):checked ~ .carousel-images {
  transform: translateX(0);
}

.carousel input[type="radio"]:nth-of-type(2):checked ~ .carousel-images {
  transform: translateX(-100%);
}

.carousel input[type="radio"]:nth-of-type(3):checked ~ .carousel-images {
  transform: translateX(-200%);
}

.carousel img {
  width: 100%;
  height: auto;
  display: block;
}

.carousel label.prev,
.carousel label.next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  padding: 10px;
  cursor: pointer;
  font-size: 24px;
  z-index: 2;
}

.carousel label.prev {
  left: 5px;
}

.carousel label.next {
  right: 5px;
}

.card h1,
.card h2 {
  font-size: 18px;
  color: #333;
  margin: 10px 15px;
}

.card .price {
  color: #e63946;
  font-size: 20px;
  font-weight: bold;
  margin: 5px 15px;
}

.card .old-price {
  color: #999;
  text-decoration: line-through;
  font-size: 16px;
  margin-left: 5px;
}

.card .rating {
  color: #f4b400;
  margin: 5px 15px;
}

.card .availability {
  font-size: 14px;
  color: #555;
  margin: 10px 15px;
}

.card .product-options .add_to_cart {
  text-align: center;
}

.card button {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  margin: 15px;
  align-self: center;
  text-align: center;
}

.card button[type="submit"] {
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 10px 15px;
  cursor: pointer;
  text-align: center;
  justify-content: center;
  margin-top: 10px auto 0;
  display: block;
  transition: background-color 0.3s ease;
}

.card button:hover {
  background-color: #0056b3;
}

.sale {
  background-color: red;
  color: white;
  font-size: 12px;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 3px;
  position: absolute;
  top: 10px;
  left: 10px;
}

.card-link {
  text-decoration: none;
  color: inherit;
}

.card:hover {
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.color-swatch input[type="radio"]:checked + label {
  border: 2px solid #000;
  /* Bordure noire pour la couleur sélectionnée */
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.color-swatches {
  display: flex;
  flex-direction: row;
}

@media (max-width: 768px) {
  .card {
    width: 100%;
  }

  .sidebar {
    width: 100%;
    margin-bottom: 20px;
    height: auto;
  }

  .main-container {
    flex-direction: column;
  }
}
