/* Toast Notification System */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    background: white;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid #e9ecef;
    min-width: 300px;
    max-width: 400px;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: auto;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.success {
    border-left: 4px solid #28a745;
}

.toast.error {
    border-left: 4px solid #dc3545;
}

.toast.info {
    border-left: 4px solid #17a2b8;
}

.toast.warning {
    border-left: 4px solid #ffc107;
}

.toast-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.toast-title {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 0.875rem;
    margin: 0;
    color: #333;
}

.toast-title i {
    margin-right: 0.5rem;
    font-size: 1.125rem;
}

.toast.success .toast-title {
    color: #28a745;
}

.toast.error .toast-title {
    color: #dc3545;
}

.toast.info .toast-title {
    color: #17a2b8;
}

.toast.warning .toast-title {
    color: #856404;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s ease;
}

.toast-close:hover {
    color: #666;
}

.toast-body {
    font-size: 0.875rem;
    color: #666;
    line-height: 1.4;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #28a745, #20c997);
    transition: width linear;
    border-radius: 0 0 12px 12px;
}

.toast.error .toast-progress {
    background: linear-gradient(90deg, #dc3545, #e74c3c);
}

.toast.info .toast-progress {
    background: linear-gradient(90deg, #17a2b8, #20c997);
}

.toast.warning .toast-progress {
    background: linear-gradient(90deg, #ffc107, #ffca2c);
}

/* Cart Added Animation */
.cart-added-animation {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
    font-size: 1.5rem;
    color: #28a745;
    animation: cartAddedFloat 2s ease-out forwards;
}

@keyframes cartAddedFloat {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2) translateY(-20px);
        opacity: 0.8;
    }
    100% {
        transform: scale(1) translateY(-50px);
        opacity: 0;
    }
}

/* Shopping Cart Bounce Animation */
.cart-bounce {
    animation: cartBounce 0.6s ease-in-out;
}

@keyframes cartBounce {
    0%, 20%, 60%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    80% {
        transform: translateY(-5px);
    }
}

/* Cart Count Badge Animation */
.cart-count-badge {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.cart-count-update {
    animation: countUpdate 0.5s ease-out;
    transform-origin: center;
}

@keyframes countUpdate {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
        background: #28a745;
    }
    100% {
        transform: scale(1);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
        transform: translateY(-100%);
    }
    
    .toast.show {
        transform: translateY(0);
    }
}

/* Cart Icon Pulse Effect */
.cart-pulse {
    animation: cartPulse 1s ease-in-out;
}

@keyframes cartPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}
