/**
 * Cart Animation Styles
 * Animations for cart interactions
 */

/* Plus button hover effect */
.product-add-btn {
    position: absolute;
    bottom: 15px;
    left: 15px;
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background-color: #0d6efd;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 10;
}

.product-add-btn:hover {
    opacity: 1 !important;
    transform: scale(1.1);
    background-color: #0b5ed7;
}

.product-add-btn i {
    font-size: 32px;
    pointer-events: none;
}

.product-image-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.product-image-wrapper:hover .product-add-btn {
    opacity: 1;
}

/* Cart count update animation */
@keyframes cartPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
    }
}

.cart-updated-animation {
    animation: cartPulse 0.5s ease-in-out;
    animation-iteration-count: 2;
}

/* Button loading state */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

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

/* Cart item remove transition */
.cart-item-removing {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s ease;
}

/* Success feedback */
@keyframes successPulse {
    0%, 100% {
        background-color: transparent;
    }
    50% {
        background-color: rgba(40, 167, 69, 0.1);
    }
}

.cart-success-feedback {
    animation: successPulse 0.6s ease;
}
