/* Styles généraux */
body {
  margin: 0;
  font-family: 'Cairo', sans-serif;
  background-color: #f9f9f9;
  color: #333;
  direction: rtl;
}

/* Logo */
.logo {
  width: 150px;
  height: auto;
  padding: 0;
}

/* Panier */
.panier {
  font-family: 'Cairo', sans-serif;
  justify-items: center;
  text-align: center;
  color: #333;
  font-size: 30px;
  font-weight: bold;
}

h1 {
  justify-items: center;
  text-align: center;
  color: #fff;
  margin-left: 0;
}

h2 {
  color: #333;
  text-align: center;
}

/* Barre de navigation */
.navbar {
  background-color: #00353f;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 10px;
  flex-direction: row-reverse;
}

/* Icône du panier */
.cart-icon {
  font-size: 20px;
  cursor: pointer;
  position: relative;
  padding: 10px;
  display: inline-block;
  text-decoration: none;
  color: inherit;
}

/* Compteur de panier */
#cart-count {
  position: absolute;
  top: -8px;
  right: -10px;
  background: #430c05;
  color: white;
  border-radius: 50%;
  padding: 2px 8px;
  font-size: 14px;
}

.menu-icon {
  font-size: 24px;
  cursor: pointer;
}

/* Menu latéral */
aside {
  background-color: #333;
  color: #fff;
  position: fixed;
  top: 0;
  right: 0;
  width: 250px;
  height: 100%;
  padding: 20px;
  transform: translateX(0);
  transition: transform 0.3s ease-in-out;
}

aside.hidden {
  transform: translateX(100%);
}

aside ul {
  list-style: none;
  padding: 0;
}

aside ul li {
  padding: 5px 0;
  border-bottom: 1px solid #555;
  cursor: pointer;
  text-align: center;
  transition: all 0.3s ease;
}

aside ul li a {
  text-decoration: none;
  color: #fff;
  font-size: 16px;
  display: block;
  transition: all 0.3s ease;
}

/* Survol des liens */
aside ul li a:hover {
  background-color: #555;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  color: #430c05;
}

/* Boutons */
span {
  cursor: pointer;
  font-weight: bold;
}

/* Bouton du menu dans la barre de navigation */
.close-icon {
  font-size: 30px;
  color: white;
  position: absolute;
  top: 10px;
  left: 20px;
  cursor: pointer;
}

.menu-icon {
  font-size: 30px;
  cursor: pointer;
  color: #fff;
}

/* Conteneur des produits */
.product-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin: 20px;
}

.product-card {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  width: 250px;
  padding: 15px;
  text-align: center;
  transition: transform 0.2s ease;
}

.product-card:hover {
  transform: translateY(-10px);
  border: 2px solid #430c05;
  box-shadow: 0 0 10px 4px rgba(67, 12, 5, 0.6);
}

.product-card img {
  width: 100%;
  border-radius: 10px;
}

.price {
  font-weight: bold;
  margin: 10px 0;
}

.old-price {
  text-decoration: line-through;
  color: #888;
}

.new-price {
  color: #430c05;
}

.stars {
  color: gold;
}

/* Style général des boutons */
.product-card button {
  background-color: #007bff;
  color: #fff;
  border: none;
  padding: 10px 15px;
  margin: 5px;
  border-radius: 5px;
  font-size: 1em;
  cursor: pointer;
  transition: background-color 0.3s ease-in-out;
}

.product-card button:nth-of-type(1) {
  background-color: #00353f;
}

.product-card button:nth-of-type(1):hover {
  background-color: #012127;
}

.product-card button:nth-of-type(2) {
  background-color: #ffc107;
  color: #333;
}

.product-card button:nth-of-type(2):hover {
  background-color: #e0a800;
}

/* Media Queries pour les petits écrans (téléphones) */
@media (max-width: 768px) {
  /* Modifier le style de la barre de navigation */
  .navbar {
      flex-direction: column;
      padding: 20px;
  }

  /* Adapter le logo pour les petits écrans */
  .logo {
      width: 120px;
  }

  /* Adapter la taille de la police pour les titres */
  h1 {
      font-size: 24px;
  }

  h2 {
      font-size: 18px;
  }

  /* Adapter la présentation du panier */
  .panier {
      font-size: 24px;
  }

  /* Menu latéral */
  aside {
      width: 200px;
  }

  /* Réduire la taille des cartes produits */
  .product-card {
      width: 200px;
      padding: 10px;
  }

  /* Adapter les boutons */
  .product-card button {
      font-size: 0.9em;
      padding: 8px 12px;
  }

  /* Réduire l'espacement des produits */
  .product-container {
      gap: 10px;
  }
}

/* Pour les très petits écrans (téléphones portrait) */
@media (max-width: 480px) {
  /* Ajuster la taille du texte et du logo */
  .logo {
      width: 100px;
  }

  h1 {
      font-size: 20px;
  }

  h2 {
      font-size: 16px;
  }

  .panier {
      font-size: 20px;
  }

  /* Adapter le menu latéral */
  aside {
      width: 100%;
      padding: 10px;
  }

  /* Cartes produits encore plus petites */
  .product-card {
      width: 100%;
      padding: 8px;
  }

  .product-container {
      margin: 10px;
  }
}
