:is(.wp-block-woocommerce-product-template, .products-block-post-template) {
    &:not(.is-style-product-template-style-v2):not(.is-style-product-template-style-v4):not(:has(.fashion-style)):not(:is(.furniture-products *)) {
        .product {
            &:hover {
                box-shadow: 0px 8px 32px -4px rgba(103, 111, 123, 0.1);
                background: transparent;
                border-radius: 8px;
            }

            .wc-block-components-product-sale-badge--align-left {
                left: 16px;
                top: 16px;
            }

            .wc-block-components-product-sale-badge {
                padding: 2px 10px;
                place-items: center;
                background-color: var(--wp--preset--color--danger);
                color: #fff;
                /*var(--wp--preset--color--base);*/
                border: 1px solid var(--wp--preset--color--danger);
                font-size: 12px;
                right: auto;
                font-weight: 500;
                position: absolute;
                text-transform: capitalize;
                z-index: 1;
                border-radius: 4px;
                line-height: 16px;

                &:alignright {
                    right: 16px;
                    top: 16px;
                }

                &:alignleft {
                    left: 16px;
                    top: 16px;
                }
            }

            .wc-block-grid__product-price {
                display: flex;
                flex-wrap: wrap;
                column-gap: 8px;
                align-items: center;
                justify-content: flex-start;

                del {
                    font-size: 14px;
                    font-weight: 400;
                    line-height: 1;
                    color: var(--wp--preset--color--gray-400);
                    order: 2;
                }
            }

            .wc-block-components-product-rating__stars {
                letter-spacing: 2.5px;
                width: 6.3em;

                span.rating {
                    color: var(--wp--preset--color--warning);
                }
            }

            .wc-block-components-product-button {

                .add_to_cart_button,
                .product_type_grouped,
                .product_type_external,
                .product_type_variable {
                    gap: 8px;
                    background-color: transparent;
                    color: var(--wp--preset--color--gray-800);
                    flex-flow: row-reverse;
                    text-indent: -999px;
                    opacity: 0;

                    &::before {
                        content: "";
                        text-indent: 0;
                        font-size: 16px;
                        background-image: url('data:image/svg+xml,<svg width="16px" height="16px" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M6.00016 13.9168C5.95414 13.9168 5.91683 13.9541 5.91683 14.0002C5.91683 14.0462 5.95414 14.0835 6.00016 14.0835C6.04619 14.0835 6.0835 14.0462 6.0835 14.0002C6.0835 13.9541 6.04619 13.9168 6.00016 13.9168ZM4.75016 14.0002C4.75016 13.3098 5.30981 12.7502 6.00016 12.7502C6.69052 12.7502 7.25016 13.3098 7.25016 14.0002C7.25016 14.6905 6.69052 15.2502 6.00016 15.2502C5.30981 15.2502 4.75016 14.6905 4.75016 14.0002Z" fill="%23fffff"/><path fill-rule="evenodd" clip-rule="evenodd" d="M13.3335 13.9168C13.2875 13.9168 13.2502 13.9541 13.2502 14.0002C13.2502 14.0462 13.2875 14.0835 13.3335 14.0835C13.3795 14.0835 13.4168 14.0462 13.4168 14.0002C13.4168 13.9541 13.3795 13.9168 13.3335 13.9168ZM12.0835 14.0002C12.0835 13.3098 12.6431 12.7502 13.3335 12.7502C14.0239 12.7502 14.5835 13.3098 14.5835 14.0002C14.5835 14.6905 14.0239 15.2502 13.3335 15.2502C12.6431 15.2502 12.0835 14.6905 12.0835 14.0002Z" fill="%23333D4C"/><path fill-rule="evenodd" clip-rule="evenodd" d="M0.0834961 0.666829C0.0834961 0.344663 0.344663 0.0834961 0.666829 0.0834961H3.3335C3.61153 0.0834961 3.85092 0.279721 3.90549 0.552346L4.47881 3.41683H15.3335C15.5073 3.41683 15.6721 3.49437 15.783 3.62832C15.8938 3.76227 15.9391 3.93867 15.9065 4.10944L14.839 9.70714C14.7514 10.1484 14.5113 10.5447 14.1609 10.8268C13.8121 11.1076 13.376 11.2573 12.9284 11.2502H6.4586C6.01098 11.2573 5.5749 11.1076 5.22607 10.8268C4.8758 10.5448 4.63582 10.1487 4.54811 9.70764L3.43395 4.14103C3.42974 4.12406 3.42628 4.10679 3.42359 4.08926L2.85535 1.25016H0.666829C0.344663 1.25016 0.0834961 0.988996 0.0834961 0.666829ZM4.71232 4.5835L5.69232 9.47985C5.72661 9.6525 5.82054 9.80759 5.95765 9.91796C6.09476 10.0283 6.26633 10.087 6.44232 10.0836L6.4535 10.0835H12.9335L12.9447 10.0836C13.1207 10.087 13.2922 10.0283 13.4293 9.91796C13.566 9.80799 13.6597 9.65364 13.6943 9.48175L13.6947 9.47985L14.6284 4.5835H4.71232Z" fill="%23333D4C"/></svg>');
                        background-repeat: no-repeat;
                        background-position: center center;
                        background-color: var(--wp--preset--color--gray-100);
                        border: 1px solid var(--wp--preset--color--gray-100);
                        border-radius: 8px;
                        display: block;
                        width: 40px;
                        height: 40px;
                        order: 1;
                        transition: 0.3s ease-in-out;
                    }
                }
            }

            span[data-wp-bind--hidden="!selectors.woocommerce.displayViewCart"]:not([hidden]),
            span[data-wp-bind--hidden="!state.displayViewCart"]:not([hidden]) {
                position: absolute;
                right: 0px;
                bottom: 0px;
                margin-bottom: 0;
                align-items: center;

                /* Same pattern as the Add to cart button: the label sits inside the link, hidden until hover. */
                .added_to_cart {
                    display: flex;
                    flex-flow: row-reverse;
                    justify-content: flex-end;
                    gap: 8px;
                    overflow: hidden;
                    white-space: nowrap;
                    text-indent: -999px;
                    font-size: 14px;
                    font-weight: 500;
                    text-transform: capitalize;
                    color: var(--wp--preset--color--primary);
                    align-items: center;

                    &::before {
                        content: "";
                        text-indent: 0;
                        font-size: 16px;
                        background-image: url('data:image/svg+xml,<svg width="16px" height="16px" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M6.00016 13.9168C5.95414 13.9168 5.91683 13.9541 5.91683 14.0002C5.91683 14.0462 5.95414 14.0835 6.00016 14.0835C6.04619 14.0835 6.0835 14.0462 6.0835 14.0002C6.0835 13.9541 6.04619 13.9168 6.00016 13.9168ZM4.75016 14.0002C4.75016 13.3098 5.30981 12.7502 6.00016 12.7502C6.69052 12.7502 7.25016 13.3098 7.25016 14.0002C7.25016 14.6905 6.69052 15.2502 6.00016 15.2502C5.30981 15.2502 4.75016 14.6905 4.75016 14.0002Z" fill="%23fffff"/><path fill-rule="evenodd" clip-rule="evenodd" d="M13.3335 13.9168C13.2875 13.9168 13.2502 13.9541 13.2502 14.0002C13.2502 14.0462 13.2875 14.0835 13.3335 14.0835C13.3795 14.0835 13.4168 14.0462 13.4168 14.0002C13.4168 13.9541 13.3795 13.9168 13.3335 13.9168ZM12.0835 14.0002C12.0835 13.3098 12.6431 12.7502 13.3335 12.7502C14.0239 12.7502 14.5835 13.3098 14.5835 14.0002C14.5835 14.6905 14.0239 15.2502 13.3335 15.2502C12.6431 15.2502 12.0835 14.6905 12.0835 14.0002Z" fill="%23333D4C"/><path fill-rule="evenodd" clip-rule="evenodd" d="M0.0834961 0.666829C0.0834961 0.344663 0.344663 0.0834961 0.666829 0.0834961H3.3335C3.61153 0.0834961 3.85092 0.279721 3.90549 0.552346L4.47881 3.41683H15.3335C15.5073 3.41683 15.6721 3.49437 15.783 3.62832C15.8938 3.76227 15.9391 3.93867 15.9065 4.10944L14.839 9.70714C14.7514 10.1484 14.5113 10.5447 14.1609 10.8268C13.8121 11.1076 13.376 11.2573 12.9284 11.2502H6.4586C6.01098 11.2573 5.5749 11.1076 5.22607 10.8268C4.8758 10.5448 4.63582 10.1487 4.54811 9.70764L3.43395 4.14103C3.42974 4.12406 3.42628 4.10679 3.42359 4.08926L2.85535 1.25016H0.666829C0.344663 1.25016 0.0834961 0.988996 0.0834961 0.666829ZM4.71232 4.5835L5.69232 9.47985C5.72661 9.6525 5.82054 9.80759 5.95765 9.91796C6.09476 10.0283 6.26633 10.087 6.44232 10.0836L6.4535 10.0835H12.9335L12.9447 10.0836C13.1207 10.087 13.2922 10.0283 13.4293 9.91796C13.566 9.80799 13.6597 9.65364 13.6943 9.48175L13.6947 9.47985L14.6284 4.5835H4.71232Z" fill="%23333D4C"/></svg>');
                        background-repeat: no-repeat;
                        background-position: center center;
                        background-color: var(--wp--preset--color--gray-100);
                        border: 1px solid var(--wp--preset--color--gray-100);
                        display: block;
                        width: 40px;
                        height: 40px;
                        order: 0;
                        border-radius: 8px;
                        transition: 0.3s ease-in-out;
                    }

                    &:is(:hover, :focus-visible) {
                        text-indent: 0;

                        &::before {
                            background-color: var(--wp--preset--color--primary);
                            background-image: url('data:image/svg+xml,<svg width="16px" height="16px" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M6.00016 13.9168C5.95414 13.9168 5.91683 13.9541 5.91683 14.0002C5.91683 14.0462 5.95414 14.0835 6.00016 14.0835C6.04619 14.0835 6.0835 14.0462 6.0835 14.0002C6.0835 13.9541 6.04619 13.9168 6.00016 13.9168ZM4.75016 14.0002C4.75016 13.3098 5.30981 12.7502 6.00016 12.7502C6.69052 12.7502 7.25016 13.3098 7.25016 14.0002C7.25016 14.6905 6.69052 15.2502 6.00016 15.2502C5.30981 15.2502 4.75016 14.6905 4.75016 14.0002Z" fill="white"/><path fill-rule="evenodd" clip-rule="evenodd" d="M13.3335 13.9168C13.2875 13.9168 13.2502 13.9541 13.2502 14.0002C13.2502 14.0462 13.2875 14.0835 13.3335 14.0835C13.3795 14.0835 13.4168 14.0462 13.4168 14.0002C13.4168 13.9541 13.3795 13.9168 13.3335 13.9168ZM12.0835 14.0002C12.0835 13.3098 12.6431 12.7502 13.3335 12.7502C14.0239 12.7502 14.5835 13.3098 14.5835 14.0002C14.5835 14.6905 14.0239 15.2502 13.3335 15.2502C12.6431 15.2502 12.0835 14.6905 12.0835 14.0002Z" fill="white"/><path fill-rule="evenodd" clip-rule="evenodd" d="M0.0834961 0.666829C0.0834961 0.344663 0.344663 0.0834961 0.666829 0.0834961H3.3335C3.61153 0.0834961 3.85092 0.279721 3.90549 0.552346L4.47881 3.41683H15.3335C15.5073 3.41683 15.6721 3.49437 15.783 3.62832C15.8938 3.76227 15.9391 3.93867 15.9065 4.10944L14.839 9.70714C14.7514 10.1484 14.5113 10.5447 14.1609 10.8268C13.8121 11.1076 13.376 11.2573 12.9284 11.2502H6.4586C6.01098 11.2573 5.5749 11.1076 5.22607 10.8268C4.8758 10.5448 4.63582 10.1487 4.54811 9.70764L3.43395 4.14103C3.42974 4.12406 3.42628 4.10679 3.42359 4.08926L2.85535 1.25016H0.666829C0.344663 1.25016 0.0834961 0.988996 0.0834961 0.666829ZM4.71232 4.5835L5.69232 9.47985C5.72661 9.6525 5.82054 9.80759 5.95765 9.91796C6.09476 10.0283 6.26633 10.087 6.44232 10.0836L6.4535 10.0835H12.9335L12.9447 10.0836C13.1207 10.087 13.2922 10.0283 13.4293 9.91796C13.566 9.80799 13.6597 9.65364 13.6943 9.48175L13.6947 9.47985L14.6284 4.5835H4.71232Z" fill="white"/>');
                            border-color: var(--wp--preset--color--primary);
                        }
                    }
                }
            }
        }
    }

    &.is-style-product-template-style-v2 {

        span[data-wp-bind--hidden="!selectors.woocommerce.displayViewCart"],
        span[data-wp-bind--hidden="!state.displayViewCart"] {
            width: 100%;

            .added_to_cart {
                line-height: 1.8;
                font-weight: 500;
                background-color: var(--wp--preset--color--gray-800);
                border-color: var(--wp--preset--color--gray-800);
                color: var(--wp--preset--color--base);
                align-items: center;
                border-radius: 30px;
                padding: 7.5px 10px;
                text-align: center;
            }
        }

        .wc-block-grid__product-price {
            display: flex;
            flex-wrap: wrap;
            column-gap: 8px;
            align-items: center;
            justify-content: flex-start;

            del {
                font-size: 14px;
                font-weight: 400;
                line-height: 1;
                color: var(--wp--preset--color--gray-400);
                order: 2;
            }
        }
    }

    &.is-style-product-template-style-v3 {
        column-gap: 0;

        .wc-block-components-product-button {
            align-items: flex-end;
            position: absolute;
            bottom: 16px;
            right: 16px;
        }

        .product {
            &:hover {
                box-shadow: none;
            }
        }
    }

    &.is-style-product-template-style-v4 {
        .product {
            &:hover {
                .wc-block-components-product-button {
                    opacity: 1;
                }
            }

            .wc-block-components-product-button {
                opacity: 0;
                z-index: 9999;
                position: absolute;
                bottom: 0px;
                right: 0;
                width: 100%;
                padding: 20px;

                .add_to_cart_button,
                .product_type_grouped,
                .product_type_external,
                .product_type_variable,
                a {
                    width: 100%;
                }

                span[data-wp-bind--hidden="!selectors.woocommerce.displayViewCart"],
                span[data-wp-bind--hidden="!state.displayViewCart"] {
                    width: 100%;

                    .added_to_cart {
                        line-height: 1.8;
                        font-weight: 500;
                        background-color: var(--wp--preset--color--gray-900);
                        color: var(--wp--preset--color--base);
                        border-radius: 8px;
                        padding: 7.5px 10px;
                        text-align: center;
                    }
                }
            }
        }
    }
}


/**
 * Anchor the absolutely positioned "View cart" link to the product button.
 * Style v3 and the `.grocery-cart` button (Home v5) position the button
 * absolutely, so it is already the anchor and must not be reset here.
 */
:is(.wp-block-woocommerce-product-template, .products-block-post-template):not(.is-style-product-template-style-v2):not(.is-style-product-template-style-v3):not(.is-style-product-template-style-v4):not(:has(.fashion-style)) .product .wc-block-components-product-button:not(.grocery-cart) {
    position: relative;

    .add_to_cart_button {
        white-space: nowrap;
    }

    /* Once "View cart" is shown it replaces the "in cart" button it overlays. */
    &:has(:not([hidden]) > .added_to_cart) .add_to_cart_button {
        visibility: hidden;
        transition: none;

        &::before {
            transition: none;
        }
    }
}

/**
 * Responsive columns: 2 per row below 768px, 3 per row below 1200px.
 */
@media (width < 75rem) {
    :is(.wc-block-product-template, .products-block-post-template):not(.slick-slider):is(.columns-2, .columns-3, .columns-4, .columns-5, .columns-6) {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));

        >li {
            width: auto;
        }
    }
}

@media (48rem <=width < 75rem) {
    :is(.wc-block-product-template, .products-block-post-template):not(.slick-slider):is(.columns-3, .columns-4, .columns-5, .columns-6) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/**
 * Min width md: 768px
 */
@media (width >=48rem) {
    :is(.wp-block-woocommerce-product-template, .products-block-post-template) {
        &:not(.is-style-product-template-style-v2):not(.is-style-product-template-style-v4):not(:has(.fashion-style)):not(:is(.furniture-products *)) {
            :is(.product, .wp-block-post, li):is(:hover, :focus-within) {
                .wc-block-components-product-button {
                    :is(.add_to_cart_button, .product_type_grouped, .product_type_external, .product_type_variable)::before,
                    span:not([hidden]) .added_to_cart::before {
                        text-indent: 0;
                        background-color: var(--wp--preset--color--primary);
                        background-image: url('data:image/svg+xml,<svg width="16px" height="16px" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M6.00016 13.9168C5.95414 13.9168 5.91683 13.9541 5.91683 14.0002C5.91683 14.0462 5.95414 14.0835 6.00016 14.0835C6.04619 14.0835 6.0835 14.0462 6.0835 14.0002C6.0835 13.9541 6.04619 13.9168 6.00016 13.9168ZM4.75016 14.0002C4.75016 13.3098 5.30981 12.7502 6.00016 12.7502C6.69052 12.7502 7.25016 13.3098 7.25016 14.0002C7.25016 14.6905 6.69052 15.2502 6.00016 15.2502C5.30981 15.2502 4.75016 14.6905 4.75016 14.0002Z" fill="white"/><path fill-rule="evenodd" clip-rule="evenodd" d="M13.3335 13.9168C13.2875 13.9168 13.2502 13.9541 13.2502 14.0002C13.2502 14.0462 13.2875 14.0835 13.3335 14.0835C13.3795 14.0835 13.4168 14.0462 13.4168 14.0002C13.4168 13.9541 13.3795 13.9168 13.3335 13.9168ZM12.0835 14.0002C12.0835 13.3098 12.6431 12.7502 13.3335 12.7502C14.0239 12.7502 14.5835 13.3098 14.5835 14.0002C14.5835 14.6905 14.0239 15.2502 13.3335 15.2502C12.6431 15.2502 12.0835 14.6905 12.0835 14.0002Z" fill="white"/><path fill-rule="evenodd" clip-rule="evenodd" d="M0.0834961 0.666829C0.0834961 0.344663 0.344663 0.0834961 0.666829 0.0834961H3.3335C3.61153 0.0834961 3.85092 0.279721 3.90549 0.552346L4.47881 3.41683H15.3335C15.5073 3.41683 15.6721 3.49437 15.783 3.62832C15.8938 3.76227 15.9391 3.93867 15.9065 4.10944L14.839 9.70714C14.7514 10.1484 14.5113 10.5447 14.1609 10.8268C13.8121 11.1076 13.376 11.2573 12.9284 11.2502H6.4586C6.01098 11.2573 5.5749 11.1076 5.22607 10.8268C4.8758 10.5448 4.63582 10.1487 4.54811 9.70764L3.43395 4.14103C3.42974 4.12406 3.42628 4.10679 3.42359 4.08926L2.85535 1.25016H0.666829C0.344663 1.25016 0.0834961 0.988996 0.0834961 0.666829ZM4.71232 4.5835L5.69232 9.47985C5.72661 9.6525 5.82054 9.80759 5.95765 9.91796C6.09476 10.0283 6.26633 10.087 6.44232 10.0836L6.4535 10.0835H12.9335L12.9447 10.0836C13.1207 10.087 13.2922 10.0283 13.4293 9.91796C13.566 9.80799 13.6597 9.65364 13.6943 9.48175L13.6947 9.47985L14.6284 4.5835H4.71232Z" fill="white"/></svg>');
                        border-color: var(--wp--preset--color--primary);
                        color: var(--wp--preset--color--white);
                    }
                }
            }

            .product {
                .wc-block-components-product-button {

                    .add_to_cart_button,
                    .product_type_grouped,
                    .product_type_external,
                    .product_type_variable {
                        padding: 0;
                        opacity: 1;

                        &:before {
                            order: 0;
                        }

                        &:is(:hover, :focus) {
                            &::before {
                                text-indent: 0;
                                background-color: var(--wp--preset--color--primary);
                                background-image: url('data:image/svg+xml,<svg width="16px" height="16px" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M6.00016 13.9168C5.95414 13.9168 5.91683 13.9541 5.91683 14.0002C5.91683 14.0462 5.95414 14.0835 6.00016 14.0835C6.04619 14.0835 6.0835 14.0462 6.0835 14.0002C6.0835 13.9541 6.04619 13.9168 6.00016 13.9168ZM4.75016 14.0002C4.75016 13.3098 5.30981 12.7502 6.00016 12.7502C6.69052 12.7502 7.25016 13.3098 7.25016 14.0002C7.25016 14.6905 6.69052 15.2502 6.00016 15.2502C5.30981 15.2502 4.75016 14.6905 4.75016 14.0002Z" fill="white"/><path fill-rule="evenodd" clip-rule="evenodd" d="M13.3335 13.9168C13.2875 13.9168 13.2502 13.9541 13.2502 14.0002C13.2502 14.0462 13.2875 14.0835 13.3335 14.0835C13.3795 14.0835 13.4168 14.0462 13.4168 14.0002C13.4168 13.9541 13.3795 13.9168 13.3335 13.9168ZM12.0835 14.0002C12.0835 13.3098 12.6431 12.7502 13.3335 12.7502C14.0239 12.7502 14.5835 13.3098 14.5835 14.0002C14.5835 14.6905 14.0239 15.2502 13.3335 15.2502C12.6431 15.2502 12.0835 14.6905 12.0835 14.0002Z" fill="white"/><path fill-rule="evenodd" clip-rule="evenodd" d="M0.0834961 0.666829C0.0834961 0.344663 0.344663 0.0834961 0.666829 0.0834961H3.3335C3.61153 0.0834961 3.85092 0.279721 3.90549 0.552346L4.47881 3.41683H15.3335C15.5073 3.41683 15.6721 3.49437 15.783 3.62832C15.8938 3.76227 15.9391 3.93867 15.9065 4.10944L14.839 9.70714C14.7514 10.1484 14.5113 10.5447 14.1609 10.8268C13.8121 11.1076 13.376 11.2573 12.9284 11.2502H6.4586C6.01098 11.2573 5.5749 11.1076 5.22607 10.8268C4.8758 10.5448 4.63582 10.1487 4.54811 9.70764L3.43395 4.14103C3.42974 4.12406 3.42628 4.10679 3.42359 4.08926L2.85535 1.25016H0.666829C0.344663 1.25016 0.0834961 0.988996 0.0834961 0.666829ZM4.71232 4.5835L5.69232 9.47985C5.72661 9.6525 5.82054 9.80759 5.95765 9.91796C6.09476 10.0283 6.26633 10.087 6.44232 10.0836L6.4535 10.0835H12.9335L12.9447 10.0836C13.1207 10.087 13.2922 10.0283 13.4293 9.91796C13.566 9.80799 13.6597 9.65364 13.6943 9.48175L13.6947 9.47985L14.6284 4.5835H4.71232Z" fill="white"/></svg>');
                                border-color: var(--wp--preset--color--primary);
                                color: var(--wp--preset--color--white);
                            }
                        }
                    }
                }
            }
        }
    }
}

/**
 * Min width lg: 1024px
 */
@media (width >=64rem) {
    :is(.wp-block-woocommerce-product-template, .products-block-post-template) {
        &:not(.is-style-product-template-style-v2):not(.is-style-product-template-style-v4):not(:has(.fashion-style)):not(:is(.furniture-products *)) {
            /* Card hover only highlights the icon; the "Add to cart" label shows on button hover, so the price is not squeezed onto two lines. */
            :is(.product, .wp-block-post, li):is(:hover, :focus-within) {
                span[data-wp-bind--hidden="!selectors.woocommerce.displayViewCart"]:not([hidden]),
                span[data-wp-bind--hidden="!state.displayViewCart"]:not([hidden]) {
                    .added_to_cart {
                        text-indent: 0;
                    }
                }
            }

            .product {
                .wc-block-components-product-button {

                    .add_to_cart_button,
                    .product_type_grouped,
                    .product_type_external,
                    .product_type_variable {
                        &:is(:hover) {
                            text-indent: 0;
                            color: var(--wp--preset--color--primary);
                            background-color: transparent;
                            font-size: 14px;
                            text-transform: capitalize;
                            font-weight: 500;
                        }
                    }
                }
            }
        }
    }
}

/**
 * Min width lg: 1024px — keep the price and the button on one line.
 *
 * The button only reserves room for its 40px icon. Its "Add to cart" /
 * "View products" label grows leftwards over the price on hover instead of
 * pushing the price (or itself) onto a second line.
 */
@media (width >=64rem) {
    :is(.wp-block-woocommerce-product-template, .products-block-post-template):not(.is-style-product-template-style-v2):not(.is-style-product-template-style-v3):not(.is-style-product-template-style-v4):not(:has(.fashion-style)):not(:is(.furniture-products *)) .product {
        .wc-block-components-product-price {
            flex-wrap: nowrap;
            white-space: nowrap;
        }

        .wc-block-components-product-button {
            flex: 0 0 40px;
            width: 40px;
            height: 40px;

            :is(.add_to_cart_button, .product_type_grouped, .product_type_external, .product_type_variable, .product_type_simple) {
                position: absolute;
                top: 0;
                right: 0;
                z-index: 1;
                width: auto;
                white-space: nowrap;

                &:is(:hover, :focus-visible) {
                    padding-left: 12px;
                    background-color: var(--wp--preset--color--base);
                }

                /* Card hover only highlights the icon for every button type ("Read more" links included). */
                &:not(:hover, :focus-visible) {
                    text-indent: -999px;
                }
            }
        }
    }
}
