/* Cart Notifications and Popup Styles */
.cart-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 999999;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    animation: slideInRight 0.3s ease;
}

.cart-notification.error {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

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

/* Enhanced Cart Popup */
.cart-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-popup.show {
    opacity: 1;
    visibility: visible;
}

.cart-popup.show .cart-popup-overlay {
    opacity: 1;
}

.cart-popup.show .cart-popup-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.cart-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cart-popup-content {
    position: relative;
    background: white;
    padding: 40px 35px;
    border-radius: 20px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1;
}

/* Close Button */
.cart-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    background: #f8f9fa;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6c757d;
}

.cart-popup-close:hover {
    background: #e9ecef;
    color: #495057;
    transform: rotate(90deg);
}

/* Success Animation */
.success-animation {
    margin-bottom: 25px;
}

.success-icon {
    display: inline-block;
    animation: successPulse 0.6s ease;
}

.success-icon svg {
    filter: drop-shadow(0 4px 12px rgba(58, 184, 174, 0.3));
}

@keyframes successPulse {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Text Styles */
.cart-popup h3 {
    color: #2d3748;
    margin: 0 0 12px;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.popup-message {
    color: #718096;
    margin: 0 0 30px;
    font-size: 15px;
    line-height: 1.6;
}

/* Action Buttons */
.cart-popup-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.cart-popup .button {
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

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

.cart-popup .button:hover::before {
    width: 300px;
    height: 300px;
}

.cart-popup .button svg {
    position: relative;
    z-index: 1;
}

.cart-popup .button span,
.cart-popup .button:not(svg) {
    position: relative;
    z-index: 1;
}

.cart-popup .view-cart {
    background: linear-gradient(135deg, #3AB8AE 0%, #2a9d8f 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(58, 184, 174, 0.3);
}

.cart-popup .view-cart:hover {
    background: linear-gradient(135deg, #2a9d8f 0%, #238276 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(58, 184, 174, 0.4);
}

.cart-popup .continue-shopping {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #495057;
    border: 2px solid #dee2e6;
}

.cart-popup .continue-shopping:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-color: #cbd5e0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .cart-popup-content {
        padding: 35px 25px;
        border-radius: 16px;
    }
    
    .cart-popup h3 {
        font-size: 22px;
    }
    
    .popup-message {
        font-size: 14px;
    }
    
    .cart-popup-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .cart-popup .button {
        width: 100%;
        justify-content: center;
        padding: 13px 24px;
    }
    
    .success-icon svg {
        width: 70px;
        height: 70px;
    }
}

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

/* Hide WooCommerce default "View cart" link */
a.added_to_cart.wc-forward {
    display: none !important;
}

/* Button States */
.add_to_cart_button.loading,
.ajax_add_to_cart.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.add_to_cart_button.added,
.ajax_add_to_cart.added {
    background: #4CAF50 !important;
    color: white !important;
    border-color: #4CAF50 !important;
    animation: addedPulse 0.5s ease;
}

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