.shop-container {
    .woocommerce-breadcrumb {
        margin-bottom: 0;
    }

    .woocommerce-products-header {
        margin-top: 0;
    }

    .products-list {
        @include box();
        padding-right: 0;
        padding-left: 0;

        .list-header {
            padding-left: 15px;
            padding-right: 15px;
            margin-bottom: 15px;

            .woocommerce-result-count {
                margin-bottom: 0;
                float: right;
            }

            .woocommerce-ordering {
                margin-bottom: 0;
                float: left;
                position: relative;

                .orderby {
                    position: relative;
                    padding-left: 25px;

                    a {
                        border-radius: 3px;
                        padding: 0 7px;
                        line-height: 26px;

                        &:hover {
                            background-color: #ECE9E9;
                        }

                        &.active {
                            background: $primary;
                            color: #FFF;
                        }
                    }

                    a:nth-child(1) {
                        margin-left: 75px;
                    }

                    &:before {
                        position: absolute;
                        content: attr(aria-label);
                    }
                }

                &:before {
                    content: "\E1B9\00FE0E";
                    font-family: IRANKala;
                    color: #CECECE;
                    position: absolute;
                    top: 3px;
                }
            }
        }
    }
}

.woocommerce {
    ul.products {
        display: -ms-flexbox;
        display: flex;
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
        margin-top: -1px;
        margin-left: -1px;

        li.product {
            margin: 0;
            outline: 1px solid #EBEBEB;
            padding: 10px;
            padding-top: 35px;
            transition: $transition;
            position: relative;

            &:hover {
                -webkit-box-shadow: 0 2px 17px 0 rgba(0, 0, 0, .09);
                box-shadow: 0 2px 17px 0 rgba(0, 0, 0, .09);
                z-index: 11;
            }

            .woocommerce-LoopProduct-link {
                display: block;

                img {
                    width: auto;
                    margin: auto;
                }
            }

            .woocommerce-loop-product__title {
                height: 53px;
                line-height: 25px;
                overflow: hidden;

            }

            .product-rating {
                //margin-top: 15px;
                position: relative;
                height: 28px;

                .rating {
                    float: right;
                    display: inline-flex;
                    align-items: center;

                    .icon {
                        margin-right: 4px;
                        color: $warning;
                    }
                }

                .add-to-compare {
                    float: left;
                    color: #ABABAB;
                    opacity: 0;
                    visibility: hidden;

                    input[type="checkbox"]:checked:before {
                        margin-top: -4px;
                    }
                }
            }

            .price {
                margin: 10px 0 0 0;
            }

            .button {
                display: block;
                margin-top: 5px;
                padding-top: 2px;
                padding-bottom: 2px;
                height: auto;

                &.loading::after {
                    top: 2px;
                }
            }

            .cart {
                margin-top: 5px;

                .quantity {
                    display: inline-flex;

                    .qty {
                        height: 38px;
                        width: 56px;
                    }
                }

                .button {
                    margin-top: 0;
                    display: inline-block;
                    width: auto;
                    max-height: 38px;

                    .plus {
                        font-size: 20px;
                        position: relative;
                        top: 6px;
                    }

                    .ajax-loader {
                        display: none;
                        width: auto;
                        margin: 0;
                        max-width: 24px;
                    }
                }
            }

            .product-info {
                position: relative;
                height: 35px;
            }

            .product-seller {
                border-top: 1px solid #F5F5F5;
                @media (min-width: 768px) {
                    display: none;
                }
                position: absolute;
                background: #FFF;
                width: 100%;
                left: 0;

                &:before {
                    font-family: IRANKala;
                    content: "\E1C1\00FE0E";
                    font-size: 20px;
                    margin-right: 5px;
                    position: relative;
                    top: 5px;
                }

                strong {
                    display: inline-block;
                }
            }

            .fake-badge {
                padding: 0 6px;
                color: #D5901F;
                background-color: rgba(249, 168, 37, .11);
                font-size: 11px;
                line-height: 2;
                position: absolute;
                bottom: 4px;
                border-radius: $border-radius;
            }

            .onsale {
                right: auto;
                margin: 0;
            }

            .stock {
                height: 32px;
                display: flex;
                align-items: center;
                width: 100%;

                .icon {
                    margin-right: 4px;
                    color: #0fabc6;
                    font-size: 16px;
                    position: relative;
                    top: 3px;
                }
            }

            .product-actions {
                position: absolute;
                left: 50%;
                top: 50%;
                transform: translate(-50%, -50%);
                z-index: 9;
                opacity: 0;
                visibility: hidden;
                transition: $transition;

                .quick-view, .favorites {
                    width: 28px;
                    height: 28px;
                    border-radius: 2px;
                    margin: 0 3px;
                    background: rgba(155, 155, 155, 0.85);
                    cursor: pointer;
                    display: inline-block;
                    text-align: center;

                    &:before {
                        font-family: IRANKala;
                        font-size: 16px;
                        color: #FFF;
                    }

                    &.active:before {
                        color: $danger;
                    }
                }

                .quick-view:before {
                    content: "\E131\00FE0E";
                }

                .add-to-favorite:before {
                    content: "\E134\00FE0E";
                }
            }

            &:hover {
                .product-rating .add-to-compare, .product-actions {
                    opacity: 1;
                    visibility: visible;
                }

                .product-seller {
                    display: block;
                }
            }
        }

        li.product-category {
            a {
                display: block;

                img {
                    width: auto;
                    margin: auto;
                }
            }

            mark.count {
                background: #EEE;
                color: #7A7A7A;
            }
        }
    }

    ul.products.columns-1,
    ul.products {
        li.product {
            -ms-flex: 0 0 100%;
            flex: 0 0 100%;
            max-width: 100%;
            margin-top: 1px;
            margin-left: 1px;
            background: #FFF;
            margin-bottom: 0 !important;
        }
    }

    ul.products.columns-2 {
        li.product {
            -ms-flex: 0 0 calc(50% - 1px);
            flex: 0 0 calc(50% - 1px);
            max-width: calc(50% - 1px);
        }
    }

    ul.products.columns-3 {
        li.product {
            -ms-flex: 0 0 calc(33.3333333% - 1px);
            flex: 0 0 calc(33.3333333% - 1px);
            max-width: calc(33.3333333% - 1px);
        }
    }

    ul.products.columns-4 {
        li.product {
            -ms-flex: 0 0 calc(25% - 1px);
            flex: 0 0 calc(25% - 1px);
            max-width: calc(25% - 1px);
        }
    }

    ul.products.columns-5 {
        li.product {
            -ms-flex: 0 0 calc(20% - 1px);
            flex: 0 0 calc(20% - 1px);
            max-width: calc(20% - 1px);
        }
    }

    ul.products.columns-6 {
        li.product {
            -ms-flex: 0 0 calc(16.6666667% - 1px);
            flex: 0 0 calc(16.6666667% - 1px);
            max-width: calc(16.6666667% - 1px);
        }
    }

    @media (max-width: 992px) {
        ul.products {
            li.product {
                -ms-flex: 0 0 calc(50% - 1px) !important;
                flex: 0 0 calc(50% - 1px) !important;
                max-width: calc(50% - 1px) !important;
            }
        }
    }
    @media (max-width: 756px) {
        ul.products {
            li.product {
                -ms-flex: 0 0 100% !important;
                flex: 0 0 100% !important;
                max-width: 100% !important;
            }
        }
    }
}

.archive-products-slider {
    margin-top: 20px;
}

.cover-outofstock {
    z-index: 2;
    position: relative;
    text-align: center;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;

    &:before {
        content: '';
        height: 1px;
        width: 100%;
        left: 0;
        top: 50%;
        position: absolute;
        background: #ABABAB;
        z-index: -1;
    }

    span {
        color: #ABABAB;
        font-weight: normal;
        background: #FFF;
        display: inline-block;
        padding-right: 10px;
        padding-left: 10px;
        font-size: 16px;
    }
}

.woocommerce-products-header {
    @include box();
    margin-bottom: 20px;
    margin-top: 20px;

    .page-title {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .page-description {
        font-size: 12px;
    }

    .showmore-button {
        cursor: pointer;
        text-align: center;
        font-weight: bold;
        position: relative;

        &:before {
            content: '';
            width: 100%;
            background-image: linear-gradient(180deg, hsla(0, 0%, 100%, .3), #FFF);
            position: absolute;
            top: -64px;
            height: 64px;
            left: 0;
        }

        &.show:before {
            display: none;
        }

        &:after {
            font-family: IRANKala;
            content: "\E0B1\00FE0E";
            position: absolute;
            top: 2px;
            margin-left: 5px;
        }

        &.show:after {
            top: -3px;
            transform: rotate(180deg);
        }
    }
}

.archive-amazing {
    .amazing-header {
        padding-left: 20px;
        padding-bottom: 20px;
    }

    .woocommerce-breadcrumb {
        display: none;
    }
}

body.archive-amazing {
    position: relative;

    &:after {
        content: '';
        background-color: rgba(255, 80, 98, .89);
        background-image: url("assets/img/amazing-bg.svg");
        position: absolute;
        top: -20px;
        left: 0;
        right: 0;
        height: 275px;
        z-index: -1;
        width: 100%;
    }
}

@media (max-width: 992px) {
    .shop-container {
        .products-list {
            background-color: transparent;
            -webkit-box-shadow: none;
            box-shadow: none;
            border: none;
            padding: 0;

            .list-header {
                padding: 0;

                .woocommerce-ordering {
                    position: fixed;
                    z-index: 101;
                    background: #FFF;
                    left: 0;
                    top: 30px;
                    width: calc(100% - 40px);
                    right: 0;
                    margin: auto;
                    border-radius: 10px;
                    padding: 52px 20px 20px;
                    display: none;
                    max-height: 320px;
                    overflow: auto;

                    &:before {
                        display: none;
                    }

                    .orderby {
                        padding: 0;

                        &:before {
                            top: -32px;
                            font-weight: bold;
                        }

                        .toggle-ordering {
                            display: inline-block;
                            border: none !important;
                            position: absolute;
                            top: -32px;
                            right: 0;

                            &:before {
                                font-family: IRANKala;
                                content: "\E08D\00FE0E";
                                font-size: 26px;
                            }
                        }

                        a {
                            display: block;
                            padding: 7px 0;
                            border-radius: 0;

                            &.active {
                                background: transparent;
                                color: $primary;
                            }
                        }

                        a:nth-child(1) {
                            margin: 0;
                        }

                        a:nth-child(2) {
                            border-top: 0.5px solid rgba(41, 41, 41, 0.18);
                        }

                        a:not(:last-child) {
                            border-bottom: .5px solid rgba(41, 41, 41, .18);
                        }
                    }
                }

                .shop-toggle {
                    background-color: #E0E0E0;
                    color: #424242;
                    border-radius: $border-radius;
                    padding: 0 10px;
                    line-height: 26px;

                    &:before {
                        font-family: IRANKala;
                        position: relative;
                        font-size: 18px;
                        top: 4px;
                        margin-right: 5px;
                    }

                    &.toggle-ordering:before {
                        content: "\E042\00FE0E";
                    }

                    &.toggle-sidebar-shop:before {
                        content: "\E024\00FE0E";
                    }
                }
            }
        }
    }
    body.show-ordering {
        .overlay {
            opacity: 1;
        }

        .woocommerce-ordering {
            display: block !important;
        }
    }
}

@media (min-width: 992px) {
    .shop-container {
        .products-list {
            .list-header {
                .shop-toggle {
                    display: none;
                }
            }
        }
    }
}

@media (max-width: 992px) {
    .woocommerce ul.products {
        -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, .09);
        box-shadow: 0 2px 4px 0 rgba(0, 0, 0, .09);
        border-radius: 10px;
        overflow: hidden;

        li.product {
            margin: 0;
            border: none;

            .onsale:not(.is-amazing) {
                text-align: left;
            }

            .woocommerce-LoopProduct-link {
                img {
                    float: left;
                    margin-right: 10px;
                    max-width: 100px;
                }
            }

            .product-rating .add-to-compare {
                opacity: 1;
                visibility: visible;
            }
        }
    }
}

.feature-seller {
    color: #388E3C;
    background: #F2F8F2;
    display: inline-block;
    line-height: 22px;
    border-radius: 11px;
    padding: 0 6px;
    margin-left: 5px;
    font-size: 12px;

    .check {
        background: #388E3C;
        border-radius: 8px;
        display: inline-block;
        width: 16px;
        height: 16px;
        text-align: center;
        position: relative;
        margin-right: 3px;
        top: 3px;
        font-size: 11px;

        &:before {
            font-family: IRANKala;
            content: "\E0D3\00FE0E";
            color: #FFF;
            font-size: 7px;
            position: absolute;
            right: 3px;
            bottom: -5px;
        }
    }
}

.woocommerce ul.products {
    li.product.has-secondary-image {
        &:hover {
            img[class^="attachment"]:nth-of-type(1) {
                display: none;
            }

            .secondary-image {
                display: block;
            }
        }

        .secondary-image {
            display: none;
        }
    }
}

.subcategories-list {
    @include box();
    margin-bottom: 20px;

    .categories-title {
        font-weight: bold;
        font-size: 16px;
        margin-bottom: 15px;
    }

    .row .item {
        -ms-flex: 0 0 12.5%;
        flex: 0 0 12.5%;
        max-width: 12.5%;
        position: relative;
        width: 100%;
        padding-right: 10px;
        padding-left: 10px;

        @media (max-width: 992px) {
            -ms-flex: 0 0 25%;
            flex: 0 0 25%;
            max-width: 25%;
        }

        @media (max-width: 768px) {
            -ms-flex: 0 0 33.333333%;
            flex: 0 0 33.333333%;
            max-width: 33.333333%;
        }

        @media (max-width: 576px) {
            -ms-flex: 0 0 50%;
            flex: 0 0 50%;
            max-width: 50%;
        }
    }

    .term {
        background-color: #F0F0F1;
        border-radius: $border-radius;
        padding: 25px 15px;
        text-align: center;
        display: block;
        margin-bottom: 20px;
        position: relative;

        &:hover {
            .term-count {
                background-color: $danger;
                color: #ffffff;
            }
        }

        img {
            max-width: 60px;
            height: auto;
        }

        .term-name {
            line-height: 32px;
            height: 32px;
            overflow: hidden;
            font-size: $font-size;
        }

        .term-count {
            position: absolute;
            left: 15px;
            top: 15px;
            background-color: #e7e7e7;
            line-height: 20px;
            display: inline-block;
            padding: 0 9px;
            border-radius: 11px;
            color: #ACACAC;
            font-size: 11px;
            transition: $transition;
        }
    }

    .others-categories {
        .count {
            font-weight: bold;
            font-size: 32px;
            height: 60px;
            display: flex;
            align-items: center;
            justify-content: center;
            direction: ltr;
        }

        .term-name {
            font-size: 11px;
        }
    }

    .row {
        height: 142px;
        overflow: hidden;

        &.show-all {
            height: auto;

            .others-categories {
                display: none;
            }
        }
    }

    @media (max-width: 992px) {
        .row {
            display: flex;
            flex-wrap: nowrap;
            overflow-x: auto;
        }

        .others-categories {
            display: none;
        }
    }
}


.page-description,
.term-description {
    @include wp-post-image();
}