.wp-block-woocommerce-product-template {
    &:not(.is-style-product-template-style-v2):not(.is-style-product-template-style-v4) {
        .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;

                .added_to_cart {
                    display: flex;
                    overflow: visible;
                    text-indent: -74px;
                    font-size: 14px;
                    color: var(--wp--preset--color--primary);
                    align-items: center;

                    &::before{
                        content: "";
                        text-indent: 0;
                        border-color: var(--wp--preset--color--primary) !important;
                        background: var(--wp--preset--color--primary) !important;
                        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>') !important;
                        background-repeat: no-repeat !important;
                        background-position: center center !important;
                        display: block;
                        width: 40px;
                        height: 40px;
                        order: 1;
                        border-radius: 8px;
                        transition: 0.3s ease-in-out
                    }

                    &::after{
                        position: absolute;
                        width: 30px;
                        height: 30px;
                        left: 30px;
                    }

                    &:not(:hover) {
                        overflow: hidden;
                        text-indent: -80px;
                        padding: 0;
                    }
                }
            }

            .added_to_cart {
                text-transform: capitalize;
                font-weight: 500;
                font-size: 14px;

                &::before {
                    text-indent: 0;
                    background-color: var(--wp--preset--color--primary);
                    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="21px" height="20px"><path fill-rule="evenodd" fill="%23ffffff" d="M17.641,16.539 C17.485,16.538 17.444,16.577 17.445,16.731 C17.452,17.821 17.449,18.910 17.449,19.999 C16.878,19.999 16.307,19.999 15.736,19.999 C15.736,18.910 15.733,17.819 15.740,16.729 C15.742,16.572 15.695,16.538 15.543,16.539 C14.506,16.546 13.469,16.539 12.432,16.546 C12.273,16.547 12.218,16.512 12.223,16.345 C12.236,15.914 12.237,15.481 12.223,15.050 C12.217,14.879 12.279,14.851 12.434,14.852 C13.464,14.858 14.494,14.851 15.524,14.859 C15.698,14.861 15.742,14.816 15.741,14.645 C15.732,13.610 15.739,12.575 15.733,11.540 C15.733,11.402 15.760,11.349 15.913,11.353 C16.365,11.363 16.818,11.363 17.270,11.353 C17.420,11.350 17.453,11.397 17.452,11.538 C17.446,12.573 17.453,13.608 17.445,14.643 C17.444,14.811 17.483,14.861 17.660,14.859 C18.773,14.851 19.886,14.855 20.1000,14.855 C20.1000,15.418 20.1000,15.980 20.1000,16.542 C19.880,16.542 18.760,16.546 17.641,16.539 ZM19.810,9.447 C19.783,9.550 19.745,9.591 19.630,9.590 C19.115,9.583 18.600,9.584 18.085,9.589 C17.957,9.590 17.930,9.556 17.971,9.434 C18.034,9.246 18.071,9.050 18.134,8.862 C18.176,8.740 18.146,8.700 18.019,8.703 C17.838,8.708 17.657,8.705 17.476,8.705 C12.638,8.705 7.799,8.705 2.960,8.705 C2.680,8.705 2.681,8.705 2.755,8.969 C3.366,11.147 3.979,13.323 4.583,15.502 C4.634,15.689 4.713,15.744 4.908,15.743 C6.600,15.734 8.292,15.740 9.983,15.734 C10.168,15.733 10.234,15.772 10.227,15.968 C10.211,16.413 10.217,16.859 10.225,17.305 C10.228,17.442 10.200,17.493 10.046,17.493 C8.257,17.487 6.467,17.492 4.678,17.488 C3.865,17.486 3.175,16.985 2.955,16.214 C2.376,14.183 1.811,12.149 1.240,10.117 C1.048,9.432 0.854,8.749 0.661,8.065 C0.652,8.033 0.656,7.995 0.614,7.982 C0.614,7.872 0.614,7.762 0.614,7.652 C0.629,7.639 0.651,7.629 0.656,7.613 C0.829,7.119 1.196,6.945 1.705,6.949 C2.972,6.959 4.240,6.950 5.507,6.956 C5.642,6.957 5.719,6.912 5.793,6.806 C7.018,5.051 8.249,3.300 9.471,1.543 C9.709,1.200 9.948,0.876 10.389,0.779 C10.431,0.779 10.473,0.779 10.515,0.779 C10.957,0.872 11.197,1.192 11.435,1.537 C12.639,3.289 13.856,5.032 15.063,6.782 C15.152,6.910 15.242,6.957 15.399,6.956 C16.673,6.949 17.947,6.952 19.221,6.952 C19.967,6.953 20.361,7.457 20.167,8.164 C20.049,8.592 19.924,9.019 19.810,9.447 ZM10.452,3.227 C9.576,4.477 8.721,5.696 7.852,6.934 C9.592,6.934 11.296,6.934 13.023,6.934 C12.160,5.690 11.313,4.468 10.452,3.227 Z"/></svg>') !important;
                    border-color: var(--wp--preset--color--primary) !important;
                    color: var(--wp--preset--color--white);
                }
            }
        }
    }

    &.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;
                    }
                }
            }
        }
    }
}


/**
 * Min width md: 768px
 */
@media (width >= 48rem) {
    .wp-block-woocommerce-product-template {
        &:not(.is-style-product-template-style-v2):not(.is-style-product-template-style-v4) {
            .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;
                        }

                        &: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) {
    .wp-block-woocommerce-product-template {
        &:not(.is-style-product-template-style-v2):not(.is-style-product-template-style-v4) {
            .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;
                        }
                    }
                }
            }
        }
    }
}
