/* Cart Notification Toast */
.cart-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 14px 20px;
    border-radius: 8px;
    background: #333;
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    max-width: 380px;
    font-size: 14px;
}

.cart-notification--visible {
    transform: translateX(0);
    opacity: 1;
}

.cart-notification--success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.cart-notification--error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.cart-notification--warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.cart-notification--info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.cart-notification__message {
    flex: 1;
}

.cart-notification__close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    opacity: 0.7;
    transition: opacity 0.2s;
    line-height: 1;
}

.cart-notification__close:hover {
    opacity: 1;
}

/* Badge Bounce Animation */
.cart-badge.bounce,
#mobileCartBadge.bounce {
    animation: cartBadgeBounce 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes cartBadgeBounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.4);
    }
}

/* Button Spinner */
.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: btnSpin 0.8s linear infinite;
    margin-right: 6px;
}

@keyframes btnSpin {
    to {
        transform: rotate(360deg);
    }
}

/* Loading State for Buttons */
.is-loading {
    cursor: wait;
    opacity: 0.7;
}

/* Empty Cart States */
.cart-empty,
.mobile-cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    min-height: 200px;
}

.cart-empty-icon,
.mobile-cart-empty-icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.cart-empty-text,
.mobile-cart-empty-text {
    color: #666;
    margin-bottom: 20px;
    font-size: 15px;
}

.cart-empty-btn,
.mobile-cart-empty-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
}

.cart-empty-btn:hover,
.mobile-cart-empty-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-1px);
}

/* Unavailable Item Styling */
.cart-item--unavailable,
.mobile-cart-item--unavailable {
    opacity: 0.6;
    position: relative;
}

.cart-item--unavailable::after,
.mobile-cart-item--unavailable::after {
    content: 'Unavailable';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(239, 68, 68, 0.9);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

/* Stock Warning */
.cart-item-warning,
.mobile-cart-item-warning {
    color: #f59e0b;
    font-size: 11px;
    margin-top: 4px;
}

/* Quantity Button Disabled State */
.quantity-btn:disabled,
.mobile-cart-qty-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Mobile Responsive Notifications */
@media (max-width: 768px) {
    .cart-notification {
        left: 16px;
        right: 16px;
        bottom: 90px;
        max-width: none;
    }
}

/* Cart Dropdown Show State (for animation) */
.cart-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}