/* Cart-specific animations and styles */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-out forwards;
}

.animate-fade-out {
  animation: fadeOut 0.3s ease-in forwards;
}

.animate-slide-in-up {
  animation: slideInUp 0.4s ease-out forwards;
}

/* Cart item hover effects */
.cart-item-card {
  transition: all 0.2s ease-in-out;
}

.cart-item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Quantity input enhancements */
.quantity-control {
  transition: all 0.2s ease-in-out;
}

.quantity-control:focus-within {
  transform: scale(1.05);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Checkout button loading state */
.btn.loading {
  position: relative;
  color: transparent;
}

.btn.loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Empty cart illustration enhancement */
.empty-cart-illustration {
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
  transition: all 0.3s ease-in-out;
}

.empty-cart-illustration:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.15));
}

/* Responsive cart layout improvements */
@media (max-width: 768px) {
  .cart-item-mobile {
    flex-direction: column;
    align-items: stretch;
  }
  
  .cart-item-mobile .quantity-section {
    justify-content: center;
    margin: 1rem 0;
  }
  
  .cart-item-mobile .price-section {
    text-align: center;
  }
}