.woocommerce {
    .wc-block-components-product-image {
        .wc-block-components-product-sale-badge--align-right {
            top: 15px !important;
            right: 15px !important;
        }
    }

    .products ul,
    ul.products {
        li {
            .woocommerce-loop-product__title {
                font-size: var(--wp--preset--font-size--h-5) !important;
            }
        }
    }
}

.woocommerce-ordering {
    margin-bottom: 30px !important;

    select {
        background-color: white !important;
        border: 1px solid #ccc !important;
        font-family: inherit !important;
        padding: 10px 15px !important;
    }
}

.wc-block-cart-items {
    .wc-block-cart-items__header-image {
        text-align: left !important;
    }

    .wc-block-cart-item__image {
        padding-left: 0 !important;
        padding-right: 20px !important;

        width: 150px !important;

        img {
            
        }
    }

    .wc-block-components-product-name {
        font-size: var(--wp--preset--font-size--h-5) !important;
    }

    .wc-block-formatted-money-amount {
        font-size: var(--wp--preset--font-size--p) !important;
    }
}

.wc-block-cart .wc-block-cart__totals-title {
    line-height: 1.2 !important;
}

.wc-block-components-quantity-selector,
.woocommerce div.product form.cart table.variations td select,
.woocommerce div.product form.cart div.quantity .qty {
    background-color: white !important;
    border: 1px solid #ccc !important;
    font-family: inherit !important;
}

.woocommerce-variation-price .woocommerce-Price-amount.amount,
.wc-block-formatted-money-amount {
    font-size: var(--wp--preset--font-size--h-5) !important;
    color: var(--wp--preset--color--quaternary) !important;
    font-weight: 600 !important;
}

.single_variation_wrap .wc-block-formatted-money-amount {
    font-size: var(--wp--preset--font-size--large) !important;
}

.wc-block-components-product-badge {
    background-color: var(--wp--preset--color--secondary) !important;
    border: 0 !important;
    color: white !important;
}

.wp-block-woocommerce-cart-order-summary-block,
.wp-block-woocommerce-checkout-order-summary-block {
    background-color: white !important;
    padding: 30px !important;
    border-radius: 0 !important;
    border: 0 !important;

    h2 {
        font-size: var(--wp--preset--font-size--h-5) !important;
    }
}

.woocommerce-tabs {
    .tabs {
        margin: 0 !important;
        display: flex;
        gap: 5px !important;

        li {
            flex-grow: 1;
            border-bottom: 0 !important;
            border-left: 0 !important;
            border-bottom: 5px solid var(--wp--preset--color--grey) !important;
            background-color: rgba(255, 255, 255, 0.75) !important;
            margin-bottom: 0 !important;

            a {
                padding: 15px 30px !important;
                font-weight: 400 !important;
                text-transform: uppercase !important;
                color: #333 !important;
            }

            &.active {
                border-bottom: 5px white !important;
                background-color: white !important;
                
                a {
                    color: var(--wp--preset--color--secondary) !important;
                }
            }
        }
    }

    .wc-tab {
        padding: 30px !important;
        background-color: white !important;

        h2 {

        }
    }
}

.wp-block-woocommerce-checkout-order-summary-block {
    padding: 15px !important;
}

.wc-block-components-form .wc-block-components-text-input input:autofill, 
.wc-block-components-form .wc-block-components-text-input.is-active input[type="email"], 
.wc-block-components-form .wc-block-components-text-input.is-active input[type="number"], 
.wc-block-components-form .wc-block-components-text-input.is-active input[type="password"],
.wc-block-components-form .wc-block-components-text-input.is-active input[type="tel"], 
.wc-block-components-form .wc-block-components-text-input.is-active input[type="text"], 
.wc-block-components-form .wc-block-components-text-input.is-active input[type="url"], 
.wc-block-components-form select,
.wc-block-components-text-input input:autofill, 
.wc-block-components-text-input.is-active input[type="email"], 
.wc-block-components-text-input.is-active input[type="number"], 
.wc-block-components-text-input.is-active input[type="password"], 
.wc-block-components-text-input.is-active input[type="tel"], 
.wc-block-components-text-input.is-active input[type="text"], 
.wc-block-components-text-input.is-active input[type="url"],
.wc-block-components-form .wc-block-components-text-input input[type="email"], 
.wc-block-components-form .wc-block-components-text-input input[type="number"], 
.wc-block-components-form .wc-block-components-text-input input[type="password"], 
.wc-block-components-form .wc-block-components-text-input input[type="tel"], 
.wc-block-components-form .wc-block-components-text-input input[type="text"], 
.wc-block-components-form .wc-block-components-text-input input[type="url"], 
.wc-block-components-text-input input[type="email"], 
.wc-block-components-text-input input[type="number"], 
.wc-block-components-text-input input[type="password"], 
.wc-block-components-text-input input[type="tel"], 
.wc-block-components-text-input input[type="text"], 
.wc-block-components-text-input input[type="url"] {
    border: 0 !important;
    border-radius: 0 !important;
    border: 1px solid #ccc !important;
}

.woocommerce-cart {
    .wp-block-woocommerce-product-collection {
        margin: 0 !important;
    }
}


@media screen and (max-width: 762px) {
    .wc-block-cart-items {
        display: block !important;

        .wc-block-cart-item__image {
            width: 100% !important;
            padding: 0 !important;
        }

        .wc-block-cart-item__product {
            padding-left: 0 !important;
        }

        thead {
            display: none !important;
        }

        tbody {
            display: block !important;
        }

        .wc-block-cart-items__row {
            display: block !important;
            gap: 15px !important;

            td {
                display: block !important;
                border-top: 0 !important;
            }
        }

        .wc-block-formatted-money-amount {
            font-size: var(--wp--preset--font-size--h-5) !important;
        }
    }
}

@media screen and (max-width: 991px) {
    .woocommerce {
        .products ul,
        ul.products {
            grid-template-columns: repeat(auto-fill,minmax(max(150px, 100%),1fr)) !important;

            li {
                width: 100% !important;
            }
        }
    }

    .wp-block-woocommerce-product-template,
    .wc-block-product-template__responsive {
        &.columns-3 {
            grid-template-columns: repeat(auto-fill,minmax(max(150px, 100%),1fr)) !important;

            li {
                width: 100% !important;
            }
        }
    }

    .wc-block-components-sidebar.wc-block-checkout__sidebar.wp-block-woocommerce-checkout-totals-block.is-sticky {
        display: none !important;
    }

    .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-checkout-order-summary__title {
        margin-top: 0 !important;
    }

    .wc-block-cart .wc-block-components-sidebar .wc-block-cart__totals-title, 
    .wc-block-cart-item__total .wc-block-components-sale-badge {
        display: block !important;
    }

    .wp-block-woocommerce-product-template {
        &.columns-3 {
            li {
                width: 100% !important;
            }
        }
    }

}

@media screen and (min-width: 991px) and (max-width: 1365px) {
    .woocommerce {
        .products ul,
        ul.products {
            gap: 60px !important;
            display: flex !important;
            margin-bottom: 60px !important;

            &:before,
            &:after {
                display: none !important;
            }

            li {
                float: none !important;
                margin: 0 !important;
                width: calc(50% - 30px) !important;
                flex: 0 1 calc(50% - 30px) !important;
            }
        }
    }
    .wp-block-woocommerce-product-template,
    .wc-block-product-template__responsive {
        grid-gap: 60px !important;

        &.columns-3 {
            grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        }
    }

    .wp-block-woocommerce-product-template {
        &.columns-3 {
            li {
                width: calc(50% - 30px) !important;
            }
        }
    }

    .woocommerce-cart {
        .wp-block-woocommerce-product-collection {
            .wp-block-woocommerce-product-template {
                &.columns-3 {
                    li {
                        width: 100% !important;
                    }
                }
            }
        }
    }

    .wc-block-product-template__responsive {
        &.columns-3 {
            li {
                width: 100% !important;
            }
        }
    }
}

@media screen and (min-width: 1366px) {
    .wp-block-woocommerce-product-template,
    .wc-block-product-template__responsive {
        grid-gap: 60px !important;

        &.columns-3 {
            grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        }
    }

    .wp-block-woocommerce-product-template {
        &.columns-3 {
            li {
                width: calc(33.3333% - 40px) !important;
            }
        }
    }

    .woocommerce-cart {
        .wp-block-woocommerce-product-template {
            &.columns-3 {
                li {
                    width: 100% !important;
                }
            }
        }
    }

    .post-type-archive {
        .wp-block-woocommerce-product-template {
            &.columns-3 {
                li {
                    width: 100% !important;
                }
            }
        }
    }
}