.wc-block-cart {
    table.wc-block-cart-items {
        thead {
            margin-bottom: 20px;
            .wc-block-cart-items__header {
                background: var(--wp--preset--color--base-3);

                th {
                    padding: 22px 30px;
                    font-size: 18px;
                    color:var(--wp--preset--color--gray-100);
                    text-transform: none;

                    &:last-child {
                        border-top-right-radius: 15px;
                        border-bottom-right-radius: 15px;
                    }

                    &:first-child {
                        border-top-left-radius: 15px;
                        border-bottom-left-radius: 15px;
                    }
                }
            }
        }
    }

    table.wc-block-cart-items,
    .editor-styles-wrapper table.wc-block-cart-items {
        thead .wc-block-cart-items__header {            
            .wc-block-cart-items__header-product {
                visibility: visible;
                span  {
                    display: none;
                }
            }
        }

        .wc-block-cart-items__row {
            td {
                padding-top: 30px;
                padding-bottom: 25px;
            }

            &:first-child td {
                border-top: 0px;
            }

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

            .wc-block-cart-item__image img {
                max-width: 70px;
                height: 70px;
                object-fit: cover;
                aspect-ratio: 1/1;
            }

            .wc-block-cart-item__wrap {
                gap: 6px;

                .wc-block-components-product-name {
                    display: block;
                    font-size: 14px;
                    font-weight: 500;
                    line-height: 20px;
                    margin-bottom: 0;
                    max-width: max-content;
                }

                .wc-block-components-product-metadata {
                    margin-bottom: 0.75em;
                    
                    .wc-block-components-product-metadata__description {
                        p {
                          display: -webkit-box;
                            -webkit-line-clamp: 1;
                            -webkit-box-orient: vertical;
                            overflow: hidden;
                        }
                    }
                }

                .wc-block-cart-item__quantity {
                    align-items: center;
                    display: flex;
                    flex-direction: row;
                    gap: 12px;
                    width: 110px;

                    .wc-block-components-quantity-selector {
                        display: flex;
                        padding: 4px;
                        border-radius: 60px;
                        align-items: center;
                        width: 100%;
                        border-color: var(--wp--preset--color--gray-1100);


                        input.wc-block-components-quantity-selector__input {
                            font-size: 14px;
                            line-height: 24px;
                            font-weight: 400;
                            padding: 0;
                            border-radius: 0;
                            border-left-width: 0;
                            border-right-width: 0;
                            min-width: 25px;                            
                        }
            
                        button {
                            font-size: 0;
                            border-width: 0;
                            background: var(--wp--preset--color--base-3);
                            cursor: pointer;
                            width: 28px;
                            height: 28px;
                            border-radius: 50px;
                            opacity: 1;

                            &:hover {
                                background: var(--wp--preset--color--base-3);
                            }
                        }

                         .wc-block-components-quantity-selector__button--plus::before {
                            content: "";
                            display: block;
                            width: 7px;
                            height: 7px;
                            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='7' viewBox='0 0 7 7' fill='none'%3E%3Cpath d='M0 3.795V2.73H2.865V0H3.99V2.73H6.855V3.795H3.99V6.54H2.865V3.795H0Z' fill='%234A4F56'/%3E%3C/svg%3E");
                            background-repeat: no-repeat;
                            background-size: contain;
                            margin: auto;
                            transition: all 0.2s ease;
                        }

                        .wc-block-components-quantity-selector__button--minus::before {
                            content: "";
                            display: block;
                            width: 6px;
                            height: 2px;
                            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='2' viewBox='0 0 6 2' fill='none'%3E%3Cpath d='M0 1.065V0H5.94V1.065H0Z' fill='%234A4F56'/%3E%3C/svg%3E");
                            background-repeat: no-repeat;
                            background-size: contain;
                            margin: auto;
                            transition: all 0.2s ease;                            
                        }
                    }
                }
            }

            .wc-block-cart-item__total {
                font-size: var(--wp--preset--font-size--small, 14px);
                line-height: 1.8;
                text-align: right;
            }    
        }
    }

    .editor-styles-wrapper table.wc-block-cart-items {
        thead .wc-block-cart-items__header {
            th {
                &:first-child {
                    border-top-left-radius: 15px;
                    border-bottom-left-radius: 15px;
                }

                &:last-child {
                    border-top-right-radius: 15px;
                    border-bottom-right-radius: 15px;
                }
            }
        }
    }

    .wc-block-cart__sidebar {

        .wc-block-components-totals-item {
            gap: 0;
            color: var(--wp--preset--color--gray-100);

            strong {
                font-weight: 400;
                text-transform: capitalize;
            }
        }

        .wc-block-components-totals-footer-item {
            .wc-block-components-totals-item__label {
                font-size: 15px;
                font-weight: 400;
                line-height: 24px;
            }

            .wc-block-components-totals-item__value {
                font-size: 24px;
                font-weight: 600;
                line-height: 1.4;
            }
        }

        .wc-block-components-totals-discount__coupon-list {
            .wc-block-components-chip {
                border-color: var(--wp--preset--color--gray-1100);
            }
        }


        .wc-block-cart__submit-container {
            .wc-block-cart__submit-button {
                background-color: var(--wp--preset--color--primary);
                color: var(--wp--preset--color--base);
                padding: 15px;
                border-radius: 28px;
                font-size: 13px;
            }
        }
    }
}

.wp-block-woocommerce-cart-cross-sells-block {
    margin-top: 3.75rem;
}

.wc-block-cart-item__total .price.wc-block-components-product-price {
    margin-bottom: 0;
    font-size: 15px;
    font-weight: 400;
    color: var(--wp--preset--color--gray-100);
}

.wc-block-cart-item__prices {
    .price.wc-block-components-product-price {
        display: flex;
        align-items: center;
        gap: 7px;
        justify-content: flex-start;
        color: var(--wp--preset--color--gray-100);
        font-size: 15px;
        font-weight: 400;
        margin-bottom: 0;
        flex-direction: column;

        del {
            font-size: 12px;
            line-height: 18px;
        }
    }
}

.wc-block-cart-item__total-price-and-sale-badge-wrapper {
    position: relative;

    .wc-block-components-product-badge {
        float: right;
        background-color: var(--wp--preset--color--gray-1100);
        padding: 2px 4px;
        color: var(--wp--preset--color--gray-100);
    }
}

@media (width >= 64rem) {
    .wc-block-components-sidebar-layout,
    .wp-block-woocommerce-cart .wc-block-components-sidebar-layout > .block-editor-inner-blocks > .block-editor-block-list__layout {
        display: grid;
        grid-template-columns: 1fr minmax(min(400px, 35%), 400px);
        column-gap: 40px;

        .wc-block-components-main {
            width: 100%;
            padding: 0;
        }
    }

    .wc-block-cart .wp-block-woocommerce-cart-order-summary-block {
        margin-bottom: 0;
        font-size: 15px;
        font-weight: 400;
        line-height: 26px;
    }

    .wc-block-cart .wc-block-cart__totals-title,
    .wp-block.wp-block-woocommerce-cart-order-summary-heading-block textarea {
        font-size: 18px;
        position: relative;
        text-align: left;
        text-transform: capitalize;
        line-height: 21px;
        font-weight: 700;
        color: var(--wp--preset--color--gray-100);
        padding-left: 0;
    }

    .wc-block-components-totals-wrapper {
        padding: 16px 0;
        border-color: var(--wp--preset--color--gray-1100);

        &.wp-block-woocommerce-cart-order-summary-coupon-form-block {
            border: none;
        }
    }

    .wp-block-woocommerce-cart-order-summary-totals-block {
        padding: 10px 0;
        border-color: var(--wp--preset--color--gray-1100);
        line-height: 1.4;

        .wc-block-components-totals-wrapper {
            padding: 10px 0;
            border: 0;
        }
    }

    .wc-block-components-sidebar {
        width: 100%;
        padding: 35px;
        border-radius: 4px;
        background-color: var(--wp--preset--color--base-3);
        border-radius: 15px;
        align-self: flex-start;
    
        .wc-block-cart__submit {
            margin-top: 16px;
            margin-bottom: 0;
        }
    }

    .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input {
        min-width: 37px;
    }
}

/**
 * Min width lg: 1280px
 */
@media (width >= 80rem) {
    .wc-block-components-sidebar-layout,
    .wp-block-woocommerce-cart .wc-block-components-sidebar-layout > .block-editor-inner-blocks > .block-editor-block-list__layout {
        grid-template-columns: 1fr minmax(min(400px, 35%), 551px);
        column-gap: 63px;
    }

    .wc-block-cart-item__wrap {
        > *:first-child {
            grid-column: 1;
            grid-row: 1;
        }

        > *:nth-child(2) {
            grid-column: 2;
            grid-row: 1 / span 2;
        }

        > *:nth-child(3) {
            grid-column: 1;
            grid-row: 2;
        }

        > *:nth-child(4) {
            grid-column: 3;
            grid-row: 1 / span 2;
        }
    }

    table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__wrap,
    .editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__wrap {
        display: grid;
        grid-template-columns: 190px 1fr 110px;
        grid-template-rows: auto auto;
        gap: 4px 0;
        align-items: center;
    }

    .wc-block-components-product-name {
        max-width: 290px;
    }

    .wc-block-cart-item__image {
        a {
            display: flex;
        }
    }

    table.wc-block-cart-items,
    .editor-styles-wrapper table.wc-block-cart-items {
        thead {
            display: table;
            width: 100%;
            margin-bottom: 0;

            .wc-block-cart-items__header {
                font-size: 17px;
                line-height: 26px;
                text-transform: capitalize;
                background-color: var(--wp--preset--color--base-3);
            }

            th {
                padding: 4px 30px;
            }

            th.wc-block-cart-items__header-image {
                padding-left: 60px;
            }
        }

        tbody {
            display: table;
            width: 100%;
        }

        td {
            padding: 30px 0;
            vertical-align: middle;
        }

        .wc-block-cart-item__quantity .wc-block-cart-item__remove-link {
            position: absolute;
            left: 8px;
            width: 20px;
            height: 20px;
            min-width: 20px;
            padding: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            background: transparent;

            &::after {
                content: "";
                display: inline-block;
                width: 10px;
                height: 10px;
                background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6' viewBox='0 0 6 6' fill='none'%3E%3Cpath d='M0 0.550454L0.396248 0.1612L5.94371 5.61075L5.54747 6L0 0.550454Z' fill='%23202025'/%3E%3Cpath d='M5.60375 0L6 0.389253L0.452534 5.8388L0.0562868 5.44955L5.60375 0Z' fill='%23202025'/%3E%3C/svg%3E");
                background-repeat: no-repeat;
                background-size: contain;
                background-position: center;
            }

            svg {
                display: none;
            }
        }

        .wc-block-cart-item__image {
            padding-left: 60px;
            padding-right: 30px;
            width: 70px;

            img {
                width: 70px;
            }
        }

        .wc-block-cart-item__prices {
            padding-left: 58px;
        }

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

        .wc-block-cart-item__total {
            display: table-cell;
            padding-left: 30px;

        }

        .wc-block-cart-item__total,
        .wc-block-cart-item__prices {
            .price, .wc-block-components-product-price {
                margin-bottom: 0 !important;
            }
        }
    }

    .wc-block-cart {
        .wc-block-cart__sidebar {
            .wc-block-components-totals-coupon__form { 
                .wc-block-components-text-input {
                    label {
                        left: 29px;
                    }

                    &.is-active {
                        input[type="text"] {
                            padding-left: 30px !important;
                        }
                        label {
                            transform: translateY(-1px) scale(0.875);
                        }
                    }
                }
            }
        }


        table.wc-block-cart-items,
        .editor-styles-wrapper table.wc-block-cart-items {
            .wc-block-cart-items__row {
                .wc-block-cart-item__wrap {
                    .wc-block-components-product-metadata {
                        margin-bottom: 0;
                    }
                }
            }
        }
    }
}

