/* Conteneur principal */
.container {
  width: 90%;
  margin: 0 auto;
  padding-top: 50px;
  text-align: center;
}

/* Titre de la page */
.page-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: #1e1c70;
  margin-bottom: 30px;
  text-transform: uppercase;
  letter-spacing: 2px;
  transform: translateY(-20px);
}

/* Sélecteur personnalisé */
.custom-select {
  width: 100%;
  appearance: none;
  background-color: transparent;
  border: 1px solid #ccc;
  padding: 10px 40px 10px 15px;
  border-radius: 6px;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  color: #1e1c70;
  cursor: pointer;
  position: relative;
  transition: border-color 0.3s ease;
}

.custom-select:focus {
  outline: none;
  border-color: #1e1c70;
  background-color: transparent;
}

/* Icône à droite */
.select-wrapper {
  position: relative;
  width: 100%;
}

.select-wrapper i {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #1e1c70;
  pointer-events: none;
}

/* --- Grille catégories (shop-grid) --- */
.shop-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  padding: 20px 0;
}

/* Carte catégorie - shop-card */
.shop-card {
  background-color: #fff;
  width: 250px;
  height: 350px;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  overflow: hidden;
  text-decoration: none;
  cursor: pointer;
  transform: translateY(20px);
}

/* Image catégorie */
.shop-card .shop-img {
  display: block;
  width: 80%;
  max-width: 100%;
  height: 80%;
  object-fit: contain;
  object-position: center;
  margin: 0 auto;
  transition: transform 0.3s ease;
}

/* Zoom image au hover */
.shop-card:hover .shop-img {
  transform: scale(1.1);
  opacity: 0.9;
}

/* Texte catégorie - en bleu majuscule */
.shop-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e1c70;
  margin-top: 20px;
  text-transform: uppercase;
  text-align: center;
  transform: translateY(20px);
  animation-delay: 0.4s;
}

/* Effet hover global sur la carte */
.shop-card:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
  background-color: #ffffff;
}

/* --- Grille produits (product-grid) --- */
.product-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  padding: 20px 0;
}

/* Carte produit avec animations de recherche */
.product-card {
  background-color: #fff;
  width: 100%;
  max-width: 900px;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  transform: translateY(0) scale(1);
  max-height: 1000px;
  overflow: hidden;
}

/* Animation de disparition */
.product-card.hiding {
  opacity: 0;
  transform: translateY(-20px) scale(0.95);
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: 0;
}

/* Animation d'apparition */
.product-card.showing {
  opacity: 1;
  transform: translateY(0) scale(1);
  max-height: 1000px;
}

/* État caché final */
.product-card.hidden {
  display: none;
}

/* Animation au survol des cartes */
.product-card:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Image produit */
.product-img {
  width: 250px;
  max-height: 200px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 6px;
}

/* Contenu texte produit */
.product-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
}

/* Nom produit */
.product-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #1e1c70;
  margin-bottom: 10px;
  text-transform: uppercase;
  text-align: left;
}

/* Description produit */
.product-description {
  font-family: 'Roboto', sans-serif;
  font-size: 1rem;
  color: #333;
  margin-bottom: 15px;
  text-align: left;
}

.product-quantity {
  font-family: 'Roboto', sans-serif;
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 10px;
  text-align: left;
}

/* Pied de carte produit */
.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: auto;
}

/* Prix produit */
.product-price {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e1c70;
  margin: 0;
}

.product-price::before {
  content: "PRIX : ";
  font-weight: 700;
  margin-right: 5px;
  color: #1e1c70;
  text-transform: uppercase;
}

.search-filter-container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 20px;
  margin: 20px auto; /* auto pour centrer */
  max-width: 900px; /* correspond à .product-card */
  width: 100%;
  box-sizing: border-box;
}

.search-container {
  position: relative;
  flex: 1;
  min-width: 0;
}

.search-input {
  width: 100%;
  padding: 12px 45px 12px 15px;
  border: 2px solid #ddd;
  border-radius: 25px;
  font-size: 16px;
  background-color: #fff;
  transition: all 0.3s ease;
  box-sizing: border-box;
  font-family: 'Montserrat', sans-serif;
}

.search-input::-webkit-input-placeholder {
  font-family: 'Montserrat', sans-serif;
}

.search-input:-moz-placeholder {
  font-family: 'Montserrat', sans-serif;
}

.search-input::-moz-placeholder {
  font-family: 'Montserrat', sans-serif;
}

.search-input:-ms-input-placeholder {
  font-family: 'Montserrat', sans-serif;
}

.search-input:focus {
  outline: none;
  border-color: #1e1c70;
  box-shadow: 0 0 0 3px rgba(30, 28, 112, 0.1);
}

.search-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #1e1c70;
  font-size: 16px;
  pointer-events: none;
  transition: all 0.3s ease;
}

.search-input:focus + .search-icon {
  color: #1e1c70;
  transform: translateY(-50%) scale(1.1);
}

.filter-btn-left {
  background-color: #444;
  color: white;
  border: none;
  padding: 10px 16px;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

/* Message "aucun résultat" avec animation */
.no-results {
  font-family: 'Montserrat', sans-serif;
  text-align: center;
  padding: 40px 20px;
  color: #1e1c70;
  font-size: 18px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
}

.no-results.show {
  opacity: 1;
  transform: translateY(0);
}

/* Animations pour les résultats de recherche */
@keyframes fadeInResult {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fadeOutResult {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
}

/* Classe pour les résultats trouvés */
.product-card.search-match {
  animation: fadeInResult 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Classe pour les résultats non trouvés */
.product-card.search-no-match {
  animation: fadeOutResult 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@media (max-width: 768px) {
  .search-filter-container {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-container {
    max-width: none;
  }
}

/* Bouton panier */
.basket-btn {
  background-color: #1e1c70;
  border: none;
  color: white;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  line-height: 18px;
  text-transform: uppercase;
  transition: background-color 0.3s ease;
}

.basket-btn:hover {
  background-color: #3a3a9f;
}

.basket-btn i {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
}

/* Message panier vide */
.empty-message {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  color: #1e1c70;
  margin-top: 50px;
  font-weight: 600;
  text-transform: uppercase;
}

/* --- Panier - styles modernes --- */
.basket-container {
  max-width: 900px;
  margin: 30px auto;
  padding: 0 15px;
}

.basket-title {
  font-size: 2.5rem;
  margin-bottom: 30px;
  text-align: center;
  font-weight: 700;
  color: #1e1c70;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.basket-item {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.1);
  margin-bottom: 20px;
  padding: 10px 15px;
  gap: 15px;
  flex-wrap: wrap;
  width: 100%;
}

.basket-item-image img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
}

.basket-item-details {
  flex: 1;
  min-width: 200px;
  text-align: left;
}

.basket-item-name {
  font-size: 1.2rem;
  margin: 0 0 8px 0;
  color: #333;
  font-weight: 700;
}

.basket-item-description {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 10px;
}

.basket-item-quantity-price {
  display: flex;
  justify-content: flex-start;
  gap: 20px;
  font-weight: 600;
  color: #111;
  font-size: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

/* Ajout classes pour cibler icônes */
.basket-item-quantity-price span.quantity::before {
  content: "\f466"; /* fa-boxes */
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  margin-right: 6px;
  color: #1e1c70;
  font-size: 1.2rem;
}

.basket-item-quantity-price span.price::before {
  content: "\f153"; /* fa-euro-sign */
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  margin-right: 6px;
  color: #1e1c70;
  font-size: 1.2rem;
}

.basket-item-quantity-price input[type="number"] {
  width: 50px;
  padding: 5px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
}

.basket-item-remove {
  flex-shrink: 0;
}

.remove-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  color: #1e1c70;
  transition: transform 0.15s ease, color 0.15s ease;
}

.remove-btn:hover {
  transform: scale(1.1);
  color: #3a3a9f;
}

.basket-order-form {
  display: flex;
  justify-content: flex-end;
  margin-top: 30px;
}

.btn-validate {
  background-color: #1e1c70;
  color: white;
  padding: 14px 28px;
  border: none;
  border-radius: 6px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-weight: 700;
}

.btn-validate:hover {
  background-color: #3a3a9f;
}

.empty-basket-message {
  text-align: center;
  font-size: 1.2rem;
  margin-top: 50px;
  color: #555;
}

.btn-return {
  color: #1e1c70;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.btn-return:hover {
  color: #3a3a9f;
}

.btn-confirm,
.btn-cancel {
  padding: 10px 25px;
  border-radius: 8px;
  border: none;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-family: 'Montserrat', sans-serif;
}

.btn-confirm {
  background-color: #1e1c70;
  color: #fff;
}

.btn-confirm:hover {
  background-color: #3a3a9f;
}

.btn-cancel {
  background-color: #ddd;
  color: #1e1c70;
}

.btn-cancel:hover {
  background-color: #bbb;
}

.checkout-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
  padding: 0 10px;
  flex-wrap: wrap;
  gap: 10px;
}

.checkout-steps .step {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-weight: 600;
  border-bottom: 3px solid #ccc;
  color: #888;
  position: relative;
  transition: all 0.3s ease;
}

.checkout-steps .step.active {
  color: #000;
  border-color: #000;
}

.checkout-steps .step::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -3px;
  width: 0;
  height: 3px;
  background: #000;
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.checkout-steps .step.active::before {
  width: 100%;
}

@media (max-width: 600px) {
  .container {
    width: 95%;
    padding-top: 30px;
  }

  .page-title {
    font-size: 1.8rem;
    letter-spacing: 1px;
  }

  /* Grille catégories : 3 colonnes */
  .shop-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Passer à 2 colonnes */
    gap: 15px;
    padding: 10px 0;
    justify-items: center; /* centre les cartes dans chaque cellule */
  }

  /* Cartes catégorie */
  .shop-card {
    width: 100%; /* prend toute la largeur de la colonne */
    height: auto; /* hauteur automatique */
    padding: 10px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.)
  }
}