/**
 * Fly To Cart Animation
 * Optimized for performance and brand consistency
 */

:root {
    --fly-duration: 1.2s;
    --fly-ease-x: linear;
    --fly-ease-y: cubic-bezier(0, .5, .5, 1);
}

.fly-item {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    pointer-events: none;
    will-change: transform;
    transition: transform var(--fly-duration) var(--fly-ease-x);
}

.fly-item-inner {
    width: 38px;
    height: 38px;
    background-color: var(--opsim-brand, #355872);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 10px 25px rgba(var(--opsim-brand-rgb, 53, 88, 114), 0.4);
    will-change: transform, opacity;
    transition: 
        transform var(--fly-duration) var(--fly-ease-y), 
        opacity var(--fly-duration) ease;
}

.fly-item svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
}

/* Target icon bounce animation */
@keyframes cart-bounce {
    0%, 100% { transform: scale(1); }
    40% { transform: scale(1.3); }
    70% { transform: scale(0.9); }
}

.cart-bounce {
    animation: cart-bounce 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

