jQuery(document).ready(function ($) {
    // Smooth scroll to cart form from sticky button
    $('.vs-sp-mobile-cart-btn').on('click', function (e) {
        e.preventDefault();

        const cartForm = $('form.cart').first();

        if (cartForm.length) {
            $('html, body').animate({
                scrollTop: cartForm.offset().top - 100
            }, 500);
        }
    });

    // Optional: auto highlight selected variation
    $('.variations select').on('change', function () {
        $(this).closest('td').addClass('vs-selected-variation');
    });
});