/*------------------------------------------------------------
CART
====================================*/

.cart-content {
    margin-bottom: 50px;
}

// items
.cart-items {
    th {
        @extend .title-label;
    }
    td {
        vertical-align: middle;
    }
    .product-price {
        color: $dark;
    }
    .input-number, .custom-input-number {
        max-width: 95px;
    }
}
.cart-item-img-wrapper {
    width: 80px;
    margin-right: 15px;
}
.cart-item-product-name {
    font-size: 1.4rem;
    font-weight: $font-weight-sbold;
    line-height: 1.8rem;
}
.cart-item-delete {
    padding: 0;
    background: none;
    border: 0;
    svg {
        transition: 0.3s;
    }
    &:focus {
        outline: 0;
    }
    &:hover {
        svg {
            fill: $primary;
            transform: rotate(180deg);
        }
    }
}

// Cross-selling
.cart-suggestion {
    .h2 {
        margin-bottom: 15px;
        text-align: center;
    }
}

// Delivery
.checkout-shipping-list + .checkout-shipping-list {
    margin-top: 30px;
}

// Payment
.checkout-payment-list + .checkout-payment-list {
    margin-top: 30px;
}

/* RESPONSIVE */
/***************************************/
@include media-breakpoint-down(sm) {
    // items
    #sylius-cart-items, #sylius-order {
        border: none;
        thead {
            display: none;
        }
        tr {
            display: grid;
            position: relative;
            border: $table-border-width solid $table-border-color;
        }
        td {
            border: none;
        }
        tbody {
            tr {
                border-bottom: none;
            }
            td {
                &:nth-child(1) { // info produit + image
                    grid-column: 1/3;
                    grid-row: 1;
                    padding-right: 30px;
                }
                &:nth-child(3) { // Quantité
                    grid-column: 1/2;
                    grid-row: 2/4;
                }
                &.cart-delete-product { // delete
                    position: absolute;
                    right: 12px;
                    top: 0;
                }
                &:nth-child(2) { // Prix unitaire
                    grid-column: 2/3;
                    grid-row: 2;
                    padding-bottom: 0;
                }
                &:nth-child(5) { // Prix total
                    grid-column: 2/3;
                    grid-row: 3;
                    padding-top: 0;
                }
                .title-mobile {
                    font-weight: $font-weight-sbold;
                }
            }
        }
    }
    .cart-items {
        .title-mobile {
            margin-right: 10px;
            font-weight: $font-weight-medium;
            font-size: 1.2rem;
            color: $black;
        }
    }
    .cart-item-delete {
        position: absolute;
        top: 0.25rem;
        right: $table-cell-padding;
    }
}

@include media-breakpoint-up(md) {
    .cart-content {
        margin-bottom: 85px;
    }

    // Coupon
    .cart-coupon {
        max-width: 320px;
    }

    // items
    .cart-items {
        .title-mobile {
            display: none;
        }
        .input-number, .custom-input-number {
            margin: auto;
        }
    }
}
