/* cart-modern.css - Estilos modernos para el carrito */

/* Animaciones */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutRight {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100px);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

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

/* Diseño responsivo del grid */
@media (max-width: 968px) {
    .container > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
}

/* Estilos para items del carrito vacío */
/* Estilos para items del carrito vacío - OVERRIDDEN BY INLINE STYLES */
.empty-cart {
    text-align: center !important;
    padding: 3rem 2rem !important;
    background: white !important;
    border-radius: 16px !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08) !important;
    max-width: 500px !important;
    margin: 0 auto !important;
}

.empty-cart i {
    font-size: 2rem !important;
    color: white !important;
    margin-bottom: 0 !important;
}

.empty-cart h2 {
    font-size: 1.5rem !important;
    color: #2d3748 !important;
    margin-bottom: 0.75rem !important;
    font-weight: 700 !important;
}

.empty-cart p {
    color: #718096 !important;
    margin-bottom: 2rem !important;
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
}

.empty-cart .btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.875rem 2rem !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    text-decoration: none !important;
    border-radius: 50px !important;
    font-weight: 600 !important;
    transition: all 0.3s !important;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3) !important;
}

.empty-cart .btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4) !important;
}

/* Items del carrito */
.cart-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 16px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border: 1px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.5s ease;
    position: relative;
    overflow: hidden;
}

.cart-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.05), transparent);
    transition: left 0.5s;
}

.cart-item:hover::before {
    left: 100%;
}

.cart-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.cart-item-image {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.cart-item:hover .cart-item-image {
    transform: scale(1.05);
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cart-item-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

.cart-item-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #667eea;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.quantity-btn {
    width: 36px;
    height: 36px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.quantity-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

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

.quantity-value {
    min-width: 48px;
    text-align: center;
    font-weight: 700;
    font-size: 1.125rem;
    color: #2d3748;
    background: #f7fafc;
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
}

.cart-item-remove {
    background: white;
    border: 2px solid #feb2b2;
    color: #e53e3e;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.cart-item-remove:hover {
    background: #e53e3e;
    color: white;
    border-color: #e53e3e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.3);
}

.cart-item-remove:active {
    transform: translateY(0);
}

/* Resumen de compra */
.cart-summary {
    background: linear-gradient(145deg, #ffffff 0%, #f7fafc 100%);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.12);
    border: 2px solid rgba(102, 126, 234, 0.1);
    position: sticky;
    top: 100px;
    animation: slideInRight 0.5s ease;
}

.cart-summary h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: #2d3748;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.summary-row:last-child {
    border-bottom: none;
    font-size: 1.25rem;
    font-weight: 700;
    color: #2d3748;
    padding-top: 1rem;
}

.summary-total {
    color: #667eea !important;
}

.checkout-btn {
    width: 100%;
    padding: 1.125rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.checkout-btn::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;
}

.checkout-btn:hover::before {
    left: 100%;
}

.checkout-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.5);
}

.checkout-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.continue-shopping {
    width: 100%;
    padding: 0.875rem;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.continue-shopping:hover {
    background: #f7fafc;
}

/* Productos recomendados */
.product-card {
    animation: fadeInUp 0.6s ease;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }

/* Notificaciones */
.cart-notification {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Responsive */
@media (max-width: 768px) {
    .cart-item {
        flex-direction: column;
    }
    
    .cart-item-image {
        width: 100%;
        height: 200px;
    }
    
    .cart-summary {
        position: static;
    }
    
    .cart-notification {
        top: 80px !important;
        right: 10px !important;
        left: 10px !important;
        text-align: center;
    }
}

/* Modal de confirmación */
.confirmation-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    text-align: center;
}

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

.modal-content h3 {
    font-size: 1.5rem;
    color: #2d3748;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.modal-content p {
    color: #718096;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-actions button {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.cancel-btn {
    background: #f7fafc;
    color: #2d3748;
    border: 2px solid #e2e8f0;
}

.cancel-btn:hover {
    background: #edf2f7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.confirm-btn {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.3);
}

.confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(229, 62, 62, 0.4);
}

.confirm-btn:active,
.cancel-btn:active {
    transform: translateY(0);
}
