/* ============================================
   CART ANIMATION STYLES
   - Fly-to-cart effect
   - Cart icon pulse
   ============================================ */

/* Flying image animation */
.jk-flying-image {
    position: fixed;
    z-index: 99999;
    pointer-events: none;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    will-change: transform, opacity, left, top;
}

/* Cart icon pulse animation */
.jk-cart-pulse {
    animation: jk-cart-pulse-animation 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
}

@keyframes jk-cart-pulse-animation {
    0% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.15);
    }
    50% {
        transform: scale(0.95);
    }
    75% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Add subtle highlight to cart when pulsing */
.cart-toggle.jk-cart-pulse,
.cart-icon.jk-cart-pulse {
    position: relative;
}

.cart-toggle.jk-cart-pulse::after,
.cart-icon.jk-cart-pulse::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    animation: jk-cart-highlight 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
    pointer-events: none;
    z-index: -1;
}

@keyframes jk-cart-highlight {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

/* Performance optimizations */
.jk-flying-image,
.jk-cart-pulse {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    perspective: 1000px;
    -webkit-perspective: 1000px;
}
