/* Fly-to-cart clone */
.fly-to-cart-clone {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100000;
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
    pointer-events: none;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    will-change: transform, opacity;
}

@media (max-width: 767px) {
    .fly-to-cart-clone {
        width: 56px;
        height: 56px;
    }
}

/* Cart badge bounce */
.js-cart-badge {
    display: inline-block;
    transform-origin: center center;
}

.js-cart-badge.is-bouncing {
    animation: cart-badge-bounce 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cart-badge-bounce {
    0% {
        transform: scale(1);
    }
    35% {
        transform: scale(1.4);
    }
    55% {
        transform: scale(0.92);
    }
    75% {
        transform: scale(1.12);
    }
    100% {
        transform: scale(1);
    }
}

.addcart.is-loading,
.product-card__cart.is-loading {
    opacity: 0.72;
    pointer-events: none;
}

.js-header-cart-icon.is-cart-pulse {
    animation: cart-icon-pulse 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-block;
    transform-origin: center center;
}

@keyframes cart-icon-pulse {
    0% {
        transform: scale(1);
    }
    40% {
        transform: scale(1.25);
    }
    100% {
        transform: scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .fly-to-cart-clone {
        display: none !important;
    }

    .js-cart-badge.is-bouncing,
    .js-header-cart-icon.is-cart-pulse {
        animation: none;
    }
}
