/* Cart Manager Styles */

/* Spinner Animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

/* Notification Slide-in Animation */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.cart-notification {
    animation: slideIn 0.4s ease-out !important;
}

/* Cart Badge Pulse Animation */
@keyframes cart-badge-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.cart-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: cart-badge-pulse 0.5s ease-out;
}

/* Fade Out Animation */
@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(-100%) scale(0.95);
    }
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button Loading State */
.btn-loading {
    pointer-events: none;
    opacity: 0.6;
}

/* Smooth Transitions */
.cart-item {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.cart-item.removing {
    opacity: 0;
    transform: translateY(20px);
}

/* Cart Badge Styling */
.cart-badge,
.wishlist-badge {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    justify-content: center;
}

/* Wishlist Toggle Button */
.wishlist-toggle-btn {
    transition: all 0.3s ease;
}

.wishlist-toggle-btn svg {
    transition: fill 0.3s ease;
}

.wishlist-toggle-btn.in-wishlist {
    background-color: #fee2e2 !important;
}

.wishlist-toggle-btn.in-wishlist svg {
    stroke: #dc2626;
    fill: currentColor;
    stroke-width: 0;
}

/* Wishlist Item */
.wishlist-item {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.wishlist-item[data-product-id] {
    position: relative;
}
