/* ============================================================
 * fly-to-cart.css — анимация «фото → корзина» и пульс бейджа.
 * ============================================================ */
.fly-to-cart {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    transform-origin: 50% 50%;
    transition:
        transform .9s cubic-bezier(0.42, 0, 0.25, 1),
        opacity   .9s ease,
        width    .9s cubic-bezier(0.42, 0, 0.25, 1),
        height   .9s cubic-bezier(0.42, 0, 0.25, 1),
        border-radius .9s ease;
    will-change: transform, opacity, width, height;
}
.fly-to-cart img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.fly-to-cart.is-flying {
    transform: translate(var(--dx, 0), var(--dy, 0)) scale(0.12);
    opacity: 0.35;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50%;
}

/* Пульс иконки/бейджа корзины */
.is-cart-pulse {
    animation: cart-badge-pulse 0.65s ease-out !important;
}
@keyframes cart-badge-pulse {
    0%   { transform: scale(1);    box-shadow: 0 0 0 0 rgba(254, 213, 0, 0.85); }
    35%  { transform: scale(1.35); box-shadow: 0 0 0 12px rgba(254, 213, 0, 0); }
    100% { transform: scale(1);    box-shadow: 0 0 0 0 rgba(254, 213, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .fly-to-cart { transition-duration: .01s; }
    .is-cart-pulse { animation: none !important; }
}