/**
 * 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
 **/
//  popular products section

.popular {
    &_header {
        text-align: center;
        margin-bottom: 30px;

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

        &-text {
            max-width: 500px;
            margin: 0 auto;
        }
    }

    &_slider {
        &-slide {
            .wrapper {
                height: 100%;

                .media {
                    position: relative;
                    border-radius: 16px;
                    overflow: hidden;
                    cursor: pointer;
                    margin-bottom: 10px;

                    &:hover {
                        .overlay {
                            opacity: 1;
                            visibility: visible;
                        }
                    }

                    .overlay, .sale {
                        position: absolute;
                    }

                    .sale {
                        width: 40px;
                        height: 40px;
                        background: $secondary;
                        border-radius: 50%;
                        top: 20px;
                        right: 20px;
                        color: #fff;
                        font-weight: 600;
                        font-size: 14px;
                    }

                    .overlay {
                        background: rgba($primary, 0.6);
                        left: 0;
                        right: 0;
                        top: 0;
                        bottom: 0;
                        transition: all .3s ease-in-out;
                        opacity: 0;
                        visibility: hidden;

                        .action {

                            .list-item {
                                margin-right: 15px;

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

                            &_link {
                                background: #fff;
                                width: 40px;
                                height: 40px;
                                border-radius: 50%;
                                border: 1px solid $accent;
                                color: $accent;
                                font-size: 16px;


                                &:hover, &.active {
                                    background: $accent;
                                    color: #fff;
                                }
                            }
                        }
                    }
                }

                .main {
                    flex-grow: 1;

                    &_rating {
                        &-stars {

                            &_star {
                                margin-right: 10px;
                                font-size: 20px;
                                line-height: 1;

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

                    &_title {
                        margin: 10px 0;
                        flex-grow: 1;
                        font-family: $accentFont;
                        color: $primary;
                        font-size: 20px;
                        line-height: 1.3;
                        font-weight: 700;
                        transition: all .3s ease-in-out;

                        &:hover, &:focus {
                            color: $secondary !important;
                        }
                    }

                    &_price {

                        .price {
                            color: $secondary;
                            font-size: 22px;
                            line-height: 1.1;
                            font-weight: 800;
                            font-family: $accentFont;

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

    }

}

// media queries


@media screen and (min-width: 991.98px) {
    .popular {
        &_header {
            margin-bottom: 40px;
        }

        &_slider {

            &-slide {
                .wrapper {
                    .media {
                        margin-bottom: 20px;
                    }
                    .main {

                        &_title {
                            font-size: 22px;
                            margin: 20px 0 15px;
                        }

                    }
                }
            }
        }
    }
}
