.woocommerce-cart {
    #primary {
        width: 100%;
    }
}

.shop_table {
    &.cart {
        .cart_item {
            .amount {
                font-size: 1.2em;
            }
            td {
                padding-right: 15px;
            }
            .nbd-cart-upload-file {
                margin-bottom: 10px;
                margin-top: 10px;
                a {
                    display: inline-block;
                    padding: 0 5px;
                }
            }
        }
        .to-shop {
            float: left;
        }
        .nb-quantity.style-1 {
            width: 74px;
        }
    }
    th,
    td {
        text-align: left;
        &[data-title]{
            .title{
                display: none;
                @media (max-width:767px){
                    display: block;
                }
            }
        }
    }
    thead {
        th {
            border-bottom: 2px solid;
            text-transform: uppercase;
            padding-bottom: 20px;
        }
    }
    td {
        padding-top: 15px;
        padding-bottom: 15px;
    }
    th,
    td {
        border-bottom: 1px solid;
    }
    .cart_item {
        td {
            a {
                color: #323232
            }
            &.product-remove {
                @include media-breakpoint-up(lg) {
                    opacity: 0;
                    width: 1%;
                    transition: opacity .2s ease;
                }
            }
            .variation {
                dt {
                    float: left;
                    margin-right: 10px;
                }
            }
        }
        &:hover {
            @include media-breakpoint-up(lg) {
                >td.product-remove {
                    opacity: 1;
                }
            }
        }
    }
    .actions {
        @include media-breakpoint-up(lg) {
            text-align: right;
        }
    }
    &.cart {
        @include media-breakpoint-down(sm) {
            thead,
            tbody,
            th,
            td,
            tr {
                display: block;
            }
            /* Hide table headers (but not display: none;, for accessibility) */
            thead tr,
            .product-thumbnail {
                position: absolute;
                top: -9999px;
                left: -9999px;
            }
            td {
                /* Behave  like a "row" */
                border: none;
                position: relative;
                padding-left: 15px;
                &:not(.actions){
                    display: flex;
                    justify-content: space-between;
                }
            }
            td:before {
                /* Now like a table header */
                position: absolute;
                /* Top/left values mimic padding */
                top: 32%;
                left: 15px;
                white-space: nowrap;
            }
            .product-name {
                padding-left: 15px;
                padding-top: 30px;
                padding-bottom: 30px;
            }
            .product-remove {
                padding-left: 15px;
            }
            .actions {
                padding-left: 15px;
            }
        }
    }
}

.cart-layout-1 {
    .product-thumbnail {
        max-width: 180px;
        width: 180px;
    }
    .cart-totals-wrap {
        .shop_table {
            font-size: 1.4em;
            th,
            td {
                text-align: right;
                border: 0;
                font-weight: 400;
            }
            td {
                width: 1%;
                white-space: nowrap;
                padding: 0 0 0 45px;
            }
            .order-total strong {
                font-weight: 400;
                font-size: 1.5em;
            }
        }
    }
    .coupon {
        text-align: right;
    }
}

.cart-layout-2 {
    .product-thumbnail {
        max-width: 120px;
        width: 120px;
    }
    .cart-right-section {
        .cart_totals {
            h3 {
                margin-top: 0;
                margin-bottom: 15px;
                line-height: 1;
            }
        }
        td {
            text-align: right;
        }
    }
    .wc-proceed-to-checkout {
        .checkout-button {
            text-align: center;
        }
    }
    .cart-totals-wrap {
        padding: 15px 15px 30px;
    }
    .coupon {
        h3 {
            line-height: 1;
            margin-bottom: 15px;
        }
    }
    .coupon-wrap {
        border: 2px solid #edf0f5;
        padding: 15px 15px 30px;
        .input-text {
            width: 100%;
            margin-bottom: 15px;
        }
    }
}

.coupon {
    margin-bottom: 60px;
    input[name="coupon_code"] {
        border-color: transparent;
        border-bottom-color: #ccc;
        margin-right: 15px;
        font-size: 16px;
        &:focus {
            outline: 0;
        }
    }
}

.cart-collaterals {
    .cart_totals {
        >h3 {
            text-align: right;
            margin-bottom: 15px;
        }
    }
}

.wc-proceed-to-checkout {
    text-align: right;
}

.cross-sells {
    .swiper-wrapper {
        width: 100%;
    }
    .products {
        margin-left: -15px;
        margin-right: -15px;
    }
    .product {
        @include make-col-ready();
        @include media-breakpoint-up(sm) {
            width: 50%;
        }
    }
    @include media-breakpoint-up(md) {
        &.row-3-products {
            .product {
                width: 33.33333%;
            }
        }
        &.row-4-products {
            .product {
                width: 25%;
            }
        }
        &.row-5-products {
            .product {
                width: 20%;
            }
        }
    }
    .swiper-button-next,
    .swiper-button-prev,
    .swiper-button-next.swiper-button-disabled,
    .swiper-button-prev.swiper-button-disabled {
        background-size: 20px 44px;
        opacity: 0;
    }
    .swiper-button-next,
    .swiper-button-prev {
        height: 100%;
        top: 0;
        margin-top: 0;
    }
    .swiper-pagination {
        width: 100%;
        position: relative;
    }
    .swiper-pagination-bullet {
        width: 12px;
        height: 12px;
        margin-left: 5px;
        outline: none;
    }
}

.cart-left-section {
    @include media-breakpoint-down(md) {
        margin-bottom: 45px;
    }
}

.cart-right-section .cart_totals {
    margin-bottom: 45px;
}

.coupon input[name="coupon_code"] {
    @include media-breakpoint-down(xs) {
        margin-right: 0;
        margin-bottom: 15px;
    }
}

.no_carosel {
    @include media-breakpoint-down(xs) {
        .swiper-wrapper {
            flex-wrap: wrap;
            .product {
                .product-title {
                    text-align: center;
                }
                .price {
                    .woocommerce-Price-amount {
                        display: flex;
                        justify-content: center;
                    }
                }
            }
        }
    }
}

.woocommerce div.product form.cart .variations {
    @include media-breakpoint-down(md) {
        width: auto;
        max-width: 300px;
    }
}

/*cart*/

.woocommerce-cart {
    .cart_item {
        .product-thumbnail {
            padding-left: 15px;
        }
        .product-name {
            a {
                font-weight: 600;
                display: block;
            }
            .nbd-cart-upload-file {
                &:not([id]){
                    display: inline-block !important;
                }
                p {
                    position: relative;
                    display: flex;
                    align-items: center;
                    .remove {
                        font-size: 34px;
                        height: 34px;
                        width: 34px;
                        line-height: 34px;
                        text-align: center;
                        margin-top: -8px;
                    }
                }
                a.button {
                    padding: 5px 20px;
                    text-transform: capitalize;
                    font-size: 14px;
                }
                &:not(:last-of-type)[id] {
                    padding-bottom: 25px;
                    border-bottom: 1px dashed #ccc;
                    margin-bottom: 20px;
                    display: block !important;
                    @include media-breakpoint-down(sm) {
                        margin-right: 0;
                    }
                }
                &:not(:last-of-type) {
                    margin-right: 20px;
                }
            }
        }
        @include media-breakpoint-down(sm) {
            .product-name {
                width: 100%;
                padding-bottom: 0 !important;
            }
            .product-quantity {
                overflow: hidden;
            }
        }
    }
    tbody {
        tr.cart_item {
            &:nth-of-type(2n+1) {
                background-color: #f4f4f4;
            }
            &:nth-of-type(2n) {
                background-color: #fafafa;
            }
            @include media-breakpoint-down(sm) {
                td {
                    &.product-price,
                    &.product-subtotal {
                        text-align: right;
                    }
                    &.product-quantity {
                        .nb-quantity {
                            float: right;
                            margin-right: 0;
                        }
                    }
                }
            }
        }
        .actions {
            .coupon {
                width: 50%;
                float: left;
                display: flex;
                input[type="text"] {
                    border: none;
                    background-color: #f4f4f4;
                    width: 100%;
                    padding-left: 15px;
                    padding-right: 15px;
                    margin-right: 30px;
                }
                @include media-breakpoint-down(md) {
                    width: 100%;
                    margin-bottom: 30px;
                }
                @media (max-width:400px) {
                    flex-direction: column;
                    input {
                        width: 100%;
                    }
                }
            }
            .nb-secondary-button {
                float: none;
                margin-right: 25px;
                i {
                    display: none;
                }
            }
            input,
            a {
                text-transform: capitalize;
                @include media-breakpoint-down(md) {
                    width: calc(50% - (0.5 * 30px));
                    text-align: center;
                }
                @media (max-width:400px) {
                    padding-left: 10px;
                    padding-right: 10px;
                }
            }
            @include media-breakpoint-down(sm) {
                padding-right: 15px;
            }
        }
    }
    .shop_table.cart {
        .cart_item {
            .amount {
                font-size: 16px;
            }
        }
    }
    .cart-collaterals {
        .cart_totals {
            width: 70%;
            float: right;
            margin-bottom: 60px;
            h3 {
                text-align: left;
                font-size: 24px;
            }
            .wc-proceed-to-checkout {
                a {
                    width: 100%;
                    text-align: center;
                    text-transform: capitalize;
                    font-weight: 600;
                    font-size: 20px;
                }
            }
            @include media-breakpoint-down(md) {
                width: 100%;
                td {
                    width: auto;
                    p {
                        white-space: normal;
                    }
                }
            }
        }
        table.shop_table {
            tr {
                th {
                    text-align: left;
                    padding-left: 15px;
                    font-size: 18px;
                    font-weight: 600;
                }
                td {
                    padding-right: 15px;
                    font-size: 16px;
                    ul {
                        padding-left: 0;
                        list-style-type: none;
                    }
                    .shipping-calculator-button {
                        display: inline-block;
                        margin-bottom: 1.5em;
                    }
                    @media (max-width:400px) {
                        padding-left: 20px;
                    }
                }
                &:nth-of-type(2n+1) {
                    background-color: #f4f4f4;
                }
                &:nth-of-type(2n) {
                    background-color: #fafafa;
                }
                &.order-total {
                    strong {
                        span {
                            font-weight: bold;
                            font-size: 20px;
                        }
                    }
                }
            }
        }
    }
    .cart-layout-2 {
        .cart-right-section {
            h3 {
                font-size: 24px;
            }
            table.shop_table {
                @media (max-width: 400px) {
                    tr.shipping {
                        td {
                            padding-left:15px;
                        }
                    }
                }
                th {
                    font-weight: 600;
                }
                ul {
                    padding-left: 0;
                    list-style-type: none;
                }
                .order-total {
                    span {
                        font-size: 18px;
                    }
                }
            }
            .coupon {
                input[type="text"] {
                    border: none;
                    background-color: #f4f4f4;
                    text-align: center;
                }
                input[type="submit"] {
                    text-transform: capitalize;
                    font-size: 18px;
                }
            }
            .wc-proceed-to-checkout {
                a {
                    text-transform: capitalize;
                    font-size: 18px;
                }
            }
        }
    }
}