/* Mejoras específicas para el carrito */
.cart-item {
  transition: all 0.3s ease;
}

.cart-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dark .cart-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Animación para productos actualizados */
.cart-item.price-updated {
  animation: priceUpdatePulse 2s ease-in-out;
  border-left: 4px solid #FF9800;
}

@keyframes priceUpdatePulse {
  0%, 100% { 
    background-color: transparent; 
  }
  50% { 
    background-color: rgba(255, 152, 0, 0.1); 
  }
}

/* Badge de precio actualizado mejorado */
.price-updated-badge {
  display: inline-block;
  background: linear-gradient(135deg, #FF9800, #F57C00);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: badgePulse 1.5s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { 
    opacity: 1; 
    transform: scale(1);
  }
  50% { 
    opacity: 0.8; 
    transform: scale(0.95);
  }
}

/* Botones de cantidad mejorados */
.quantity-controls {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  overflow: hidden;
}

.dark .quantity-controls {
  background: rgba(255, 255, 255, 0.05);
}

.quantity-btn {
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.quantity-btn:active {
  transform: scale(0.95);
}

.quantity-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
}

.quantity-btn:active::before {
  width: 100px;
  height: 100px;
}

/* Header del carrito con gradiente */
.cart-header {
  background: linear-gradient(135deg, #075E54, #128C7E);
  position: relative;
  overflow: hidden;
}

.cart-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

/* Resumen de costos mejorado */
.cost-summary {
  background: linear-gradient(135deg, rgba(7, 94, 84, 0.05), rgba(18, 140, 126, 0.05));
  border: 1px solid rgba(7, 94, 84, 0.1);
}

.dark .cost-summary {
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.05), rgba(18, 140, 126, 0.05));
  border: 1px solid rgba(37, 211, 102, 0.1);
}

/* Datos de entrega mejorados */
.delivery-info {
  position: relative;
}

.delivery-info::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #075E54, #25D366, #075E54);
  border-radius: 1px;
}

.delivery-card {
  transition: all 0.2s ease;
}

.delivery-card:hover {
  background: rgba(7, 94, 84, 0.05);
}

.dark .delivery-card:hover {
  background: rgba(37, 211, 102, 0.05);
}

/* Botón de envío mejorado */
.send-button {
  background: linear-gradient(135deg, #075E54, #128C7E);
  position: relative;
  overflow: hidden;
  transform: translateY(0);
  transition: all 0.3s ease;
}

.send-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(7, 94, 84, 0.3);
}

.send-button:active {
  transform: translateY(0);
}

.send-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.send-button:hover::before {
  left: 100%;
}

/* Scroll suave para lista de productos */
.cart-products-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(7, 94, 84, 0.3) transparent;
}

.cart-products-list::-webkit-scrollbar {
  width: 4px;
}

.cart-products-list::-webkit-scrollbar-track {
  background: transparent;
}

.cart-products-list::-webkit-scrollbar-thumb {
  background: rgba(7, 94, 84, 0.3);
  border-radius: 2px;
}

.cart-products-list::-webkit-scrollbar-thumb:hover {
  background: rgba(7, 94, 84, 0.5);
}

/* Animación de entrada para elementos del carrito */
.cart-item {
  animation: slideInCart 0.3s ease-out;
}

@keyframes slideInCart {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Estados de carga */
.loading-shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.dark .loading-shimmer {
  background: linear-gradient(90deg, #374151 25%, #4B5563 50%, #374151 75%);
  background-size: 200% 100%;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Modal de confirmación de pedido */
#orderConfirmationModal {
  animation: fadeIn 0.3s ease;
}

#orderConfirmationModal > div {
  animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* Responsive mejoras */
@media (max-width: 480px) {
  .cart-item {
    margin: 0 -4px;
  }
  
  .send-button {
    padding: 16px;
    font-size: 16px;
  }
  
  .delivery-card {
    padding: 12px;
  }
}