/* Reset some basic styles */
body, html {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background-color: #f5f5f5;
  overflow-x: hidden; /* Ajouté pour désactiver le défilement horizontal */
}


/* Container to hold the cards */
.cards-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 10px;
}

.card {
  border: 1px solid black;
  border-radius: 10px;
  box-shadow: 5px 5px 5px rgb(134, 131, 131);
  padding: 20px;
  margin: 10px;
  text-align: center;
  width: 250px;
  height: 250px;
  display: inline-block;
  overflow: hidden; /* Ensure content doesn't overflow */
  position: relative; /* Necessary for absolute positioning */
  transition: width 0.3s, height 0.3s;
  cursor: pointer;
}

.card img {
  width: auto;
  height: 65%;
  border-radius: 1px;
  transition: transform 0.6s, opacity 0.6s;
}

.card:hover img {
  position: absolute; /* Make the image cover the entire card */
  top: 0;
  left: 0;
  width: 100%; /* Ensure image covers the full card */
  height: 100%;
  border-radius: 10px;
  object-fit: cover;
  transform: scale(1.1);
  opacity: 0.8;
}

.card h2,
.card p {
  margin: 10px;
  z-index: 1; /* Ensure text is above the image */
  position: relative; /* Ensure text is above the image */
}

@media (max-width: 576px) {
  .card h2 {
      font-size: 14px;
  }

  .card p {
      font-size: 12px;
  }
}

/* Modal styles */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

.modal-content {
  background-color: #fefefe;
  margin: 5% auto; /* Centered */
  padding: 20px;
  border: 1px solid #888;
  width: 80%; /* Could be more or less, depending on screen size */
  max-width: 600px;
  border-radius: 10px;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

/* Styles for product detail inside modal */
.product {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  background: #fff;
  border-radius: 10px;
}

.main_bloc1 {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-bottom: 20px;
}

.image_bloc {
  width: 100%;
  padding: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.image_bloc img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  transition: transform 0.3s ease;
}

.info_bloc {
  width: 100%;
  padding: 10px;
  text-align: center;
}

.info_bloc h3 {
  margin: 0;
  font-size: 24px;
  font-weight: bold;
  color: #333;
}

.info_bloc p {
  margin: 5px 0;
  font-size: 18px;
  color: #666;
}

/* Commande container styling */
.commande-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 20px;
  border-top: 1px solid #eee;
}

.commande {
  display: flex;
  flex-direction: row;
  width: 100%;
  max-width: 600px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.commande input {
  width: 80px;
  padding: 10px;
  margin: 5px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

.commande input:focus {
  border-color: #007bff;
  outline: none;
}

.commande button {
  padding: 10px 20px;
  margin: 5px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.commande button:hover {
  background-color: #0056b3;
}

@media (max-width: 768px) {
  .commande {
      flex-direction: column;
      width: 65%;
  }

  .commande input, .commande button {
      width: 100%;
  }
}

/* Message container styling */
.message, .error {
  width: 100%;
  padding: 15px;
  margin-top: 20px;
  background-color: #dff0d8;
  border: 1px solid #d6e9c6;
  border-radius: 5px;
  text-align: center;
  display: none; /* Hidden by default */
}

.error {
  background-color: #f8d7da;
  border-color: #f5c6cb;
}

.message p, .error p {
  margin: 0;
  font-size: 16px;
}

/* Add to Wishlist button */
.add-to-wishlist {
  padding: 10px 20px;
  margin: 5px;
  background-color: #ffc107;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.add-to-wishlist:hover {
  background-color: #e0a800;
}



