/**
 * Herbalist
 * Herbalist – is a website template created for selling the cannabis, medical marijuana and CBD products, cannabis blogging and others
 * Exclusively on https://1.envato.market/herbalist-html
 *
 * @encoding        UTF-8
 * @version         1.0.0
 * @copyright       (C) 2018 - 2021 Merkulove ( https://merkulov.design/ ). All rights reserved.
 * @license         Envato License https://1.envato.market/KYbje
 * @contributors    Lamber Lilit (winter.rituel@gmail.com)
 * @support         help@merkulov.design
 **/
// cart page main content

.cart {
    &_main {
        margin-bottom: 30px;

        &-header {
            margin-bottom: 30px;
        }

        &-list {
            margin-bottom: 40px;

            &_item {
                margin-bottom: 30px;
                width: 100%;

                .wrapper {
                    background: #fff;
                    padding: 15px;
                    box-shadow: 0 0 15px rgba(37, 143, 103, 0.1);
                    border-radius: 16px;

                    .price {
                        font-family: $accentFont;
                        font-weight: 800;
                        font-size: 20px;
                        line-height: 1.3;
                        color: $primary;

                        &_wrapper {
                            width: 50%;

                            .title {
                                color: $gray;
                                font-size: 14px;
                                font-weight: 500;
                                font-family: $bodyFont;
                                margin-bottom: 5px;
                            }
                        }


                        &--old {
                            text-decoration: line-through;
                            color: $gray;
                            margin-bottom: 5px;
                            font-weight: 700;
                        }

                        &--total {
                            color: $secondary;
                            font-size: 24px;
                            line-height: 1.1;
                        }
                    }

                    &_item {
                        margin-bottom: 10px;

                        &-media {
                            border-radius: 16px;
                            overflow: hidden;
                            margin-right: 15px;
                        }

                        &-info {
                            width: calc(100% - 95px);

                            .title {
                                margin-bottom: 5px;
                            }
                        }
                    }
                }

                .close {
                    color: $gray;
                    margin-top: 10px;
                    transition: color .3s ease-in-out;
                    font-size: 20px;

                    &:hover, &:focus {
                        color: $text;
                    }
                }
            }
        }

        &-action {
            .btn--underline {
                margin-bottom: 20px;
            }
        }
    }

    &_summary {
        padding: 30px;
        box-shadow: 0 0 15px rgba(37, 143, 103, 0.1);
        border-radius: 16px;

        &-header {
            margin-bottom: 30px;
        }

        &-table {
            font-family: $accentFont;
            font-weight: 700;
            color: $primary;
            font-size: 17px;
            line-height: 1.3;

            &_row {
                margin-bottom: 15px;

                &:last-of-type {
                    margin-bottom: 0;
                }

                &--total {
                    margin-top: 30px;
                    font-size: 20px;
                    line-height: 1.3;
                }
            }
        }

        &-form {
            margin-bottom: 30px;

            &_header, &_field {
                margin-bottom: 20px;
            }

            &_field {
                width: 100%;
                border: 1px solid $gray;
                border-radius: 24px;
                padding: 13px 20px;
                height: 48px;
                transition: all .3s ease-in-out;

                &::placeholder {
                    font-size: 14px;
                    color: $primary;
                    transition: opacity .3s ease-in-out;
                }

                &:focus {
                    border-color: $primary;

                    &::placeholder {
                        opacity: 0;
                    }
                }
            }
        }

        &-btn {
            margin-top: 30px;
            width: 100%;
        }
    }
}

// media queries

@media screen and (min-width: 575.98px) {
    .cart {
        &_main {
            &-list {

                &_item {

                    .wrapper {
                        position: relative;

                        &_item {
                            order: 1;
                            min-width: 100%;
                        }

                        .price {

                            &_wrapper {
                                order: 3;
                                width: unset;

                                &--subtotal {
                                    order: 5;
                                    flex-grow: 1;
                                    text-align: right;
                                }
                            }
                        }
                    }

                    .qty {
                        order: 4;
                        margin-top: 0;
                        margin-left: 60px;
                    }

                    .close {
                        order: 2;
                        margin-top: 0;
                        position: absolute;
                        top: 15px;
                        right: 15px;
                    }
                }
            }

            &-action {
                .btn--underline {
                    margin-bottom: 0;
                }
            }
        }
    }
}

@media screen and (min-width: 767.98px) {
    .cart {
        &_main {
            width: calc(100% - 330px);
        }

        &_summary {
            max-width: 300px;
            height: max-content;
        }
    }
}

@media screen and (min-width: 991.98px) {
    .cart {
        &_main {
            width: calc(100% - 400px);

            &-header {
                margin: 0 0 40px;
            }

            &-list {
                &_item {
                    .wrapper {
                        padding: 30px;

                        .close {
                            top: 30px;
                            right: 30px;
                        }

                        .price {
                            font-size: 22px;
                            &--total {
                                font-size: 28px;
                            }
                        }
                    }
                }
            }
        }

        &_summary {
            max-width: 340px;
            padding: 40px;

            &-table {

                &_row {
                    &--total {
                        font-size: 22px;
                    }
                }
            }
        }
    }
}

@media screen and (min-width: 1199.98px) {
    .cart {
        &_main {
            &-list {
                &_item {
                    .wrapper {

                        .qty {
                            margin-left: 0;
                        }

                        .price {

                            &--old {
                                margin-bottom: 15px;
                            }

                            &_wrapper {

                                &--subtotal {
                                    order: 5;
                                    flex-grow: unset;
                                    text-align: left;
                                }
                            }
                        }

                        &_item {
                            min-width: unset;
                            &-media {
                                width: 140px;
                                height: 140px;
                                margin-right: 30px;
                            }

                            &-info {
                                max-width: 200px;
                            }
                        }
                    }
                }
            }
        }
    }
}

@media screen and (min-width: 1399.98px) {
    .cart {
        &_main {
            &-list {
                &_item {
                    .wrapper {

                        .close {
                            position: static;
                            order: 5;
                        }

                    }
                }
            }
        }
    }
}
