/* The deep-red sweep mirrors the rounded, rising fill used on Manico. */
body :is(.vh-home .vh-button, .add-to-cart-loop, .single_add_to_cart_button) {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    transition: color .25s ease, border-color .25s ease;
}

body :is(.vh-home .vh-button, .add-to-cart-loop, .single_add_to_cart_button)::before {
    content: "";
    position: absolute;
    top: -60%;
    left: -25%;
    width: 150%;
    height: 220%;
    z-index: -1;
    background: #8f1026;
    border-radius: 42% 58% 46% 54% / 55% 44% 56% 45%;
    transform: translateY(100%) rotate(-8deg) scale(1.1);
    transition: transform .55s cubic-bezier(.22, 1, .36, 1), border-radius .55s cubic-bezier(.22, 1, .36, 1);
    pointer-events: none;
}

/* Keep the original button underneath the moving fill, including on touch. */
body .vh-home .vh-button:hover,
body .vh-home .vh-button:focus-visible {
    background-color: var(--vh-red);
    transform: none;
}

body .vh-home .vh-button.vh-button-outline:hover,
body .vh-home .vh-button.vh-button-outline:focus-visible {
    background-color: transparent;
}

body :is(.add-to-cart-loop, .single_add_to_cart_button):is(:hover, :focus-visible) {
    background-color: var(--btn-accented-bgcolor, var(--wd-primary-color, #e2001a));
}

body :is(.vh-home .vh-button, .add-to-cart-loop, .single_add_to_cart_button):focus-visible:not(:disabled):not(.disabled):not([aria-disabled="true"]) {
    color: #ffffff;
    border-color: #8f1026;
    outline: 2px solid var(--wd-primary-color, #e2001a);
    outline-offset: 3px;
}

body :is(.vh-home .vh-button, .add-to-cart-loop, .single_add_to_cart_button):focus-visible:not(:disabled):not(.disabled):not([aria-disabled="true"])::before {
    transform: translateY(0) rotate(0) scale(1.1);
    border-radius: 0;
}

@media (hover: hover) and (pointer: fine) {
    body :is(.vh-home .vh-button, .add-to-cart-loop, .single_add_to_cart_button):hover:not(:disabled):not(.disabled):not([aria-disabled="true"]) {
        color: #ffffff;
        border-color: #8f1026;
    }

    body :is(.vh-home .vh-button, .add-to-cart-loop, .single_add_to_cart_button):hover:not(:disabled):not(.disabled):not([aria-disabled="true"])::before {
        transform: translateY(0) rotate(0) scale(1.1);
        border-radius: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    body :is(.vh-home .vh-button, .add-to-cart-loop, .single_add_to_cart_button),
    body :is(.vh-home .vh-button, .add-to-cart-loop, .single_add_to_cart_button)::before {
        transition: none;
    }
}
