/* --- PANIER --- */

/* Container des items du panier */
.cart-items-container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 1rem;
}

#cartItems {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
}

/* Card d'un article dans le panier */
.cart-item-card {
  display: flex;
  gap: 20px;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a0000 100%);
  border: 3px solid #ff0000;
  border-radius: 12px;
  padding: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cart-item-card:hover {
  transform: translateX(5px);
  box-shadow: 0 0 25px rgba(255, 0, 0, 0.5);
}

/* Image de l'article */
.cart-item-image {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border: 2px solid #ff0000;
  border-radius: 8px;
  flex-shrink: 0;
}

/* Contenu de l'article */
.cart-item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Header avec titre et bouton supprimer */
.cart-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.cart-item-title {
  font-size: 20px;
  color: #ffffff;
  margin: 0 0 8px 0;
  text-transform: uppercase;
}

.cart-item-rarity {
  display: inline-block;
  padding: 8px 15px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: bold;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border: 3px solid;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.cart-item-rarity::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: rotate(45deg);
  animation: shine 3s infinite;
}

/* Couleurs des raretés - IDENTIQUE AUX VARIANTES */
.cart-item-rarity.rarity-common { 
  background: linear-gradient(135deg, #4a4a4a 0%, #6b6b6b 50%, #4a4a4a 100%);
  color: #fff; 
  border-color: #8b8b8b;
  box-shadow: 0 0 15px rgba(107, 107, 107, 0.5), inset 0 0 10px rgba(255, 255, 255, 0.1);
}

.cart-item-rarity.rarity-uncommon { 
  background: linear-gradient(135deg, #0d9500 0%, #1eff00 50%, #0d9500 100%);
  color: #000; 
  border-color: #3fff2f;
  box-shadow: 0 0 20px rgba(30, 255, 0, 0.7), inset 0 0 15px rgba(255, 255, 255, 0.2);
  animation: glowGreen 2s infinite alternate;
}

.cart-item-rarity.rarity-rare { 
  background: linear-gradient(135deg, #0050aa 0%, #0070dd 50%, #0050aa 100%);
  color: #fff; 
  border-color: #00aaff;
  box-shadow: 0 0 20px rgba(0, 112, 221, 0.8), inset 0 0 15px rgba(255, 255, 255, 0.2);
  animation: glowBlue 2s infinite alternate;
}

.cart-item-rarity.rarity-epic { 
  background: linear-gradient(135deg, #6b1a99 0%, #a335ee 50%, #6b1a99 100%);
  color: #fff; 
  border-color: #d896ff;
  box-shadow: 0 0 25px rgba(163, 53, 238, 0.9), inset 0 0 20px rgba(255, 255, 255, 0.2);
  animation: glowPurple 2s infinite alternate;
}

.cart-item-rarity.rarity-legendary { 
  background: linear-gradient(135deg, #cc6600 0%, #ff8000 50%, #ffaa00 100%);
  color: #000; 
  border-color: #ffcc00;
  box-shadow: 0 0 30px rgba(255, 128, 0, 1), inset 0 0 20px rgba(255, 255, 255, 0.3);
  animation: glowOrange 1.5s infinite alternate;
  font-size: 17px;
}

.cart-item-rarity.rarity-mythic { 
  background: linear-gradient(135deg, #b8860b 0%, #e6cc80 50%, #ffd700 100%);
  color: #000; 
  border-color: #fff;
  box-shadow: 0 0 40px rgba(255, 215, 0, 1), inset 0 0 25px rgba(255, 255, 255, 0.4);
  animation: glowGold 1s infinite alternate;
  font-size: 18px;
  font-weight: 900;
}

.cart-item-mutation {
  color: #ffcc00;
  font-weight: bold;
  font-style: normal;
  font-size: 14px;
  padding: 6px 12px;
  background: linear-gradient(135deg, rgba(255, 204, 0, 0.2) 0%, rgba(255, 153, 0, 0.3) 100%);
  border: 2px solid #ffcc00;
  border-radius: 6px;
  display: inline-block;
  margin-top: 5px;
  text-shadow: 0 0 10px rgba(255, 204, 0, 0.8), 0 2px 4px rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 15px rgba(255, 204, 0, 0.5), inset 0 0 10px rgba(255, 204, 0, 0.2);
  animation: mutationGlow 2.5s infinite alternate;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cart-item-remove {
  background: #ff0000;
  border: none;
  padding: 8px 12px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 18px;
  transition: 0.3s;
}

.cart-item-remove:hover {
  background: #ffffff;
  transform: scale(1.1);
}

/* Stats de l'article */
.cart-item-stats {
  display: flex;
  gap: 20px;
  align-items: center;
}

.cart-item-stat {
  padding: 8px 15px;
  background: rgba(255, 0, 0, 0.1);
  border: 1px solid #ff0000;
  border-radius: 5px;
  color: #fff;
  font-weight: bold;
}

.cart-item-price {
  font-size: 22px;
  color: #00ff00;
  font-weight: bold;
  text-shadow: 0 0 10px #00ff00;
}

/* Contrôles de quantité */
.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 15px;
}

.qty-btn {
  width: 40px;
  height: 40px;
  background: #ff0000;
  border: 2px solid #ff0000;
  color: white;
  font-size: 20px;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:hover {
  background: #ffffff;
  color: #ff0000;
  transform: scale(1.1);
}

.qty-btn:active {
  transform: scale(0.95);
}

.qty-input {
  width: 60px;
  height: 40px;
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  background: #0d0d0d;
  border: 2px solid #ff0000;
  color: white;
  border-radius: 8px;
  margin: 0;
}

.cart-item-total {
  font-size: 24px;
  color: #ffffff;
  font-weight: bold;
  margin-left: auto;
  padding: 8px 15px;
  background: #600000;
  border: 2px solid #ff0000;
  border-radius: 8px;
}

/* --- RÉCAPITULATIF --- */
.cart-summary-content {
  background: rgba(255, 0, 0, 0.05);
  border: 2px solid #ff0000;
  border-radius: 10px;
  padding: 20px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 0, 0, 0.3);
  font-size: 18px;
}

.summary-row:last-child {
  border-bottom: none;
}

.summary-label {
  color: #ff6666;
  font-weight: bold;
}

.summary-value {
  color: #ffffff;
  font-weight: bold;
}

.total-row {
  margin-top: 10px;
  padding-top: 20px;
  border-top: 3px solid #ff0000;
  font-size: 24px;
}

.total-row .summary-value {
  color: #00ff00;
  text-shadow: 0 0 10px #00ff00;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .cart-item-card {
    flex-direction: column;
    padding: 15px;
  }

  .cart-item-image {
    width: 100%;
    height: 200px;
  }

  .cart-item-header {
    flex-direction: column;
    gap: 10px;
  }

  .cart-item-remove {
    align-self: flex-end;
  }

  .cart-item-stats {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .cart-item-quantity {
    flex-wrap: wrap;
  }

  .cart-item-total {
    width: 100%;
    text-align: center;
    margin-left: 0;
  }

  .summary-row {
    font-size: 16px;
  }

  .total-row {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .cart-item-title {
    font-size: 16px;
  }

  .cart-item-price {
    font-size: 18px;
  }

  .qty-btn {
    width: 35px;
    height: 35px;
    font-size: 18px;
  }

  .qty-input {
    width: 50px;
    height: 35px;
    font-size: 16px;
  }
}


/* --- BADGE PANIER DANS LA NAVIGATION --- */
.cart-badge {
  position: absolute;
  top: -8px;
  right: -12px;
  background: #ff0000;
  color: white;
  font-size: 12px;
  font-weight: bold;
  padding: 3px 7px;
  border-radius: 50%;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.8);
  animation: pulse 2s infinite;
  border: 2px solid #ffffff;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.8);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 0, 0, 1);
  }
}