/* ===== CART ITEMS ===== */

.cart-item {
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  border-radius: 10px;
  border: 1px solid rgba(11,20,32,0.04);
  box-shadow: 0 8px 22px rgba(2,6,23,0.04);
  margin-bottom: 1rem;
  padding: 1.2rem;
  
  /* Ajout crucial : force l'affichage en ligne (horizontal) */
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

/* LA CORRECTION EST ICI : on bloque la taille de la miniature */
.cart-thumb {
  width: 120px; /* Empêche l'image de grandir */
  flex-shrink: 0; /* Empêche l'image de s'écraser */
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(11,20,32,0.06);
  background: #f8fafc;
}

.cart-thumb img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

/* Conteneur pour le texte à côté de l'image */
.cart-content {
  flex-grow: 1;
}

.cart-title strong {
  font-size: 1.1rem;
}

.cart-price {
  font-size: 1.1rem;
  font-weight: bold;
}

/* ===== QUANTITY CONTROLS ===== */

.quantity-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quantity-control .btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(11,20,32,0.06);
  background: #fff;
}

.qty-display {
  min-width: 48px;
  height: 36px;
  border-radius: 999px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(11,20,32,0.06);
  background: #f8f9fa;
}

/* ===== SUMMARY ===== */

.cart-summary {
  background: linear-gradient(180deg,#fff,#fbfdff);
  border-radius: 10px;
  padding: 1.5rem;
  border: 1px solid rgba(11,20,32,0.04);
  box-shadow: 0 12px 30px rgba(2,6,23,0.06);
}

.cart-summary h5 {
  font-weight: 800;
  margin-bottom: 1.2rem;
}

/* ===== SHIPPING ===== */

.shipping-card {
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 0.6rem;
  padding: 0.9rem 1rem;
  background: #ffffff;
  cursor: pointer;
  margin-bottom: 0.5rem;
}

.shipping-card.selected {
  border-color: var(--primary);
  background-color: rgba(0, 74, 132, 0.03); /* Un léger fond bleu quand c'est sélectionné */
}

/* Adaptations pour mobile */
@media (max-width: 768px) {
  .cart-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .cart-thumb {
    width: 150px;
  }
}

.cart-item {
  display: flex;
  width: 100%; /* Important */
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  border-radius: 10px;
  border: 1px solid rgba(11,20,32,0.04);
  box-shadow: 0 8px 22px rgba(2,6,23,0.04);
  margin-bottom: 1rem;
  padding: 1.2rem;
}

/* On s'assure que le contenu prend la place nécessaire */
.cart-info {
  flex: 1;
  min-width: 0; /* Évite les débordements de texte */
}

.cart-actions {
  min-width: 100px; /* Évite que le prix ne soit écrasé */
}

/* Mobile : on repasse en colonne pour la lisibilité */
@media (max-width: 768px) {
  .cart-item .d-flex {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .cart-actions {
    align-items: center !important;
    margin-top: 1rem;
    width: 100%;
  }
  
  .ms-auto {
    margin-left: 0 !important;
  }
}