/* --------------------------------------------
  PRODUCT LISTING
  -------------------------------------------- */

.woocommerce,
.single-product {
    .product-item-wrap {
        padding: 0 20px 0 20px;
        margin-bottom: 40px !important;

        @media (max-width: 1300px) {
            padding-left: 10px;
            padding-right: 10px;
            margin-bottom: 30px !important;
        }

    }

    .star-rating.rating-invisible {
        display: none;
    }

    .product-item-inner {
        background-color: @white;
        position: relative;
        overflow: hidden;
        .transition(all 0.35s ease-in-out);
    }

    .product-thumb img {
        width: 100%;
    }

    .product-flash-wrap {
        position: absolute;
        top: 20px;
        right: 20px;
        z-index: 9;
        display: flex;
        flex-direction: column;
        transition: all ease-in-out .3s;

        div {
            font-size: 13px;
            font-weight: bold;
            text-transform: uppercase;
            line-height: 40px;
            text-align: center;
            color: @white;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            margin-bottom: 5px;

            &.on-new {
                background-color: var(--primary_color);
            }

            &.on-hot {
                background-color: var(--primary_color);
            }

            &.on-sold {
                background-color: @Grey_3;
            }

            &.on-sale {
                background-color: #ff7d8a;
            }
        }
    }

    .product-thumb {
        position: relative;
        background-color: @white;

        .product-thumb-primary {
            overflow: hidden;

            img {
                .transition(all 0.5s ease);
            }
        }

        .product-thumb-secondary {
            img {
                .transition(all 0.5s ease);
            }
        }
    }

    .product-thumb-secondary {
        position: absolute;
        margin: auto;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        opacity: 0;
        z-index: 1;
        .transition(all 0.2s linear);
    }

    // Background overplay for product
    .product-link {
        opacity: 0;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
        visibility: visible;
        .transition(all 0.25s ease-in-out);
    }

    .add-to-cart-wrap {
        display: inline-block;
        position: absolute;
        opacity: 0;
        left: -10px;
        bottom: 12px;
        .transition(all 0.25s ease-in-out);

        a {
            display: inline-block;
            text-align: center;
            color: var(--text_color);
            display: inline-block;
            padding: 0;
            opacity: 0;
            position: relative;
            -webkit-border-radius: 0;
            -moz-border-radius: 0;
            border-radius: 0;
            font-size: 16px;
            min-width: 0;
            vertical-align: middle;

            &:before {
                font-family: "Font Awesome 5 Pro";
                font-weight: 300;
                content: "\f217";
                font-style: normal;
                font-weight: normal;
                -webkit-font-smoothing: antialiased;
                -moz-osx-font-smoothing: grayscale;
                font-size: 15px;
                line-height: 1;
                vertical-align: middle;
                display: none;
            }
        }
    }

    .yith-wcwl-wishlistaddedbrowse a,
    .yith-wcwl-wishlistexistsbrowse a,
    .add_to_wishlist,
    .compare,
    .product-quick-view,
    .btn_add_to_cart,
    .add-to-cart-wrap a {
        text-align: center;
        color: @white;
        background-color: var(--heading_color);
        width: 40px;
        height: 40px;
        line-height: 40px;
        border-radius: 50%;
        display: inline-block;
        padding: 0;
        position: relative;
        min-width: 0;
        vertical-align: middle;
        opacity: 1;
        box-shadow: none;
        border: none;

        &:hover,
        &.active {
            background-color: var(--primary_color);
            box-shadow: none;
        }
    }

    .add_to_wishlist {
        font-size: 0;
    }

    .add-to-cart-wrap a {
        font-size: 16px;

        &.loading {
            padding: 0;
            opacity: 1;
        }

        &:after {
            display: none;
        }
    }

    .wishlist_table {
        .add-to-cart-wrap a {
            &.loading {
                font-size: 0 !important;
                min-height: 38px;
            }

            &:after {
                display: block;
                font-size: 14px;
                text-align: center;
                width: 100%;
                right: 0;
                line-height: 38px;
                top: 0;
            }
        }
    }

    .added_to_cart.wc-forward {
        &:before {
            content: '\f217';
            display: inline-block;
            font-family: 'Font Awesome 5 Pro';
            font-weight: 300;
            font-size: 16px;
            -webkit-transition: all 0.35s ease;
            -o-transition: all 0.35s ease;
            transition: all 0.35s ease;
        }

        background-color: var(--primary_color);

        i {
            color: var(--primary_color);
        }
    }

    .compare {
        right: 30px;

        .blockUI.blockOverlay {
            background: none !important;
        }
    }

    .product-quick-view {
        &.active {
            i {
                &.fa-spin {
                    &:before {
                        content: "\f110";
                        -webkit-animation: fa-spin 2s infinite linear;
                        animation: fa-spin 2s infinite linear;
                        font-family: "Font Awesome 5 Pro";
                        font-weight: 300;
                    }
                }
            }
        }
    }

    .yith-wcwl-wishlistaddedbrowse a {
        color: var(--primary_color);
        background-color: @white;
    }

    .added-spinner {
        color: var(--primary_color);
    }

    .yith-wcwl-add-to-wishlist {
        display: inline-block;
        margin: 0;
        top: 25px;
        right: 0px;
        line-height: 1;
        .transition(all 0.35s ease);

        span.feedback {
            display: none;
        }
    }

    .yith-wcwl-add-to-wishlist+div.clear {
        display: none;
    }

    .yith-wcwl-add-button {
        a {
            i {
                margin-right: 0px;
            }

            line-height: 36px;
        }

        font-weight: bold;
        text-transform: uppercase;
        height: 36px !important;
        position: relative;
        margin-top: 15px;
        -webkit-border-radius: 100px;
        -moz-border-radius: 100px;
        border-radius: 100px;
        transition: all ease-in-out .3s;
        border: none;

        .ajax-loading {
            display: none !important;
        }

        &:after {}

        &:hover {
            border-color: var(--primary_color);

            a {
                color: var(--primary_color);
            }
        }
    }

    .add_to_wishlist:before,
    .yith-wcwl-wishlistaddedbrowse a:before,
    .yith-wcwl-wishlistexistsbrowse a:before,
    .compare.added:before {
        font-family: "Font Awesome 5 Pro";
        font-weight: 300;
        content: "\f004";
        font-style: normal;
        line-height: 1;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        font-size: 18px;
        line-height: 1;
        vertical-align: middle;
    }

    .yith-wcwl-wishlistexistsbrowse {
        a {
            font-weight: bold;
            text-transform: uppercase;
            font-size: 0;
            background-color: var(--primary_color);
        }
    }

    .add_to_wishlist {
        i {
            font-size: 16px;
            line-height: 1;

            &:before {
                line-height: 1;
            }
        }
    }

    .compare {
        i {
            &.fa-spinner {
                font-size: 16px;
                line-height: 28px;
            }
        }
    }

    .compare.added:before {
        content: "\f268" !important;
        font-family: Ionicons;
        font-size: 20px;
        line-height: 28px;
    }

    .add_to_wishlist.added-spinner:before {
        content: "";
        display: none;
    }

    .added-spinner:before {
        content: "\f110";
        -webkit-animation: fa-spin 2s infinite linear;
        animation: fa-spin 2s infinite linear;
    }

    .product-info {
        padding: 10px 0;
        text-align: center;
        background: @white;
        position: relative;
        z-index: 3;
        min-height: 92px;

        h3 {
            position: relative;
            top: 0;
            font-size: 16px;
            margin-top: 10px;
            margin-bottom: 10px;
            color: #555;
            text-align: left;
            font-weight: 400;
            width: 100%;
            padding-right: 0px;
            .transition(all 0.35s ease);
        }

        .star-rating {
            position: absolute;
            right: 0px;
            bottom: 18px;
            margin-top: 0;
            font-size: 14px;
            width: 93px;
            .transition(all 0.35s ease);
        }

        span.price {
            font-size: 16px !important;
            display: block;
            padding: 0px 0px;
            text-align: left;
            color: var(--primary_color);

            ins {
                display: inline-block;
                text-decoration: none;
                font-style: inherit;
            }

            del {
                color: var(--heading_color_fade_50);
                display: inline-block;
                opacity: 1;
                margin-right: 0px;
                font-weight: inherit;
                font-style: inherit;
            }
        }
    }

    .product-item-wrap.active,
    .product-item-wrap:hover {
        .product-thumb {
            .product-thumb-secondary {
                opacity: 1;
            }
        }

        .product-info {
            h3 {
                color: var(--primary_color);
            }

            span.price,
            .star-rating {
                opacity: 0;
            }

            .add-to-cart-wrap {
                left: 0px;
                opacity: 1;
            }

            .yith-wcwl-add-to-wishlist {
                opacity: 1;
            }

            .product-quick-view,
            .compare {
                opacity: 1;
            }
        }
    }

    .product-item-wrap {
        @media (max-width: 479px) and (min-width: 321px) {
            .product-info {

                .yith-wcwl-add-to-wishlist,
                .product-quick-view,
                .compare {
                    opacity: 0 !important;
                }
            }
        }
    }

    &.columns-2 .product-item-wrap {
        -ms-flex: 0 0 50%;
        flex: 0 0 50%;
        max-width: 50%;
    }

    &.columns-3 .product-item-wrap {
        -ms-flex: 0 0 33.333%;
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }

    &.columns-4 .product-item-wrap {
        -ms-flex: 0 0 25%;
        flex: 0 0 25%;
        max-width: 25%;
    }

    &.columns-5 .product-item-wrap {
        -ms-flex: 0 0 20%;
        flex: 0 0 20%;
        max-width: 20%;
    }

    &.product-slider {
        .product-item-wrap {
            float: none;
            padding-bottom: 0;
        }
    }

    @media (max-width: @screen-sm-max) {

        &.columns-5 .product-item-wrap,
        &.columns-4 .product-item-wrap {
            width: 33.33%;
            -ms-flex: 0 0 33.333%;
            flex: 0 0 33.333%;
            max-width: 33.333%;
        }
    }

    @media (max-width: @screen-sm-min) {

        &.columns-5 .product-item-wrap,
        &.columns-4 .product-item-wrap,
        &.columns-3 .product-item-wrap {
            width: 50%;
            -ms-flex: 0 0 50%;
            flex: 0 0 50%;
            max-width: 50%;
        }
    }

    @media (max-width: 414px) {

        &.columns-5 .product-item-wrap,
        &.columns-4 .product-item-wrap,
        &.columns-3 .product-item-wrap,
        &.columns-2 .product-item-wrap {
            width: 100%;
            -ms-flex: 0 0 100%;
            flex: 0 0 100%;
            max-width: 100%;
        }
    }
}

.rbc-product-inner {
    overflow: hidden;
    background-color: @white;
    transition: all ease-in-out .4s;
    position: relative;

    .product__price {
        text-align: center;
        margin: 0px 0 3px;

        .price {
            del {
                font-weight: 400;
                font-size: 14px;
                color: var(--heading_color_fade_50);
            }

            ins {
                text-decoration: none;
            }
        }
    }

    .product__thumb {
        position: relative;
        overflow: hidden;

        &:before {
            left: 0;
            top: 0;
            content: "";
            width: 100%;
            height: 100%;
            position: absolute;
            z-index: 1;
            -webkit-transition: all 0.25s ease-in-out;
            -o-transition: all 0.25s ease-in-out;
            transition: all 0.25s ease-in-out;
            background-color: #f7f7f7;
            mix-blend-mode: darken;
        }

        img {
            width: 100%;
            transition: opacity .3s ease-out, transform .3s ease-out, filter .3s ease-out;
        }
    }

    .product__info {
        padding: 33px 0 10px;
    }

    .product__title {
        h5 {
            transition: all ease-in-out .3s;
            margin: 0;
        }
    }

    .product__meta {
        .quick-view-wrap {
            padding-bottom: 10px;
        }

        flex-direction: column;
        .transition(all ease-in-out .3s);
        position: absolute;
        left: 25px;
        bottom: -10px;
        opacity: 0;
        z-index: 2;

        .product-quick-view,
        .add-to-cart-wrap {
            opacity: 1;
            position: relative;
            left: 0;
            top: 0;
        }

        .add-to-cart-wrap {
            position: relative;

            .added_to_cart {
                font-size: 0px;
            }
        }

        .product-quick-view {
            a {
                &:hover {
                    color: var(--primary_color);
                }
            }

            &:hover {
                a {
                    color: var(--primary_color) !important;
                }
            }
        }

        .compare .add_to_compare {
            opacity: 1;
            position: relative;

            &:hover {
                a {
                    color: var(--primary_color) !important;
                }
            }
        }

        .yith-wcwl-add-to-wishlist {
            .yith-wcwl-add-button {
                margin-top: 0;
                height: fit-content !important;

                a {
                    line-height: normal;
                    font-size: 0;
                }

                &:hover {
                    border: none;
                }
            }
        }

        .grf-compare {
            position: relative;

            a {
                right: 0;
            }
        }
    }

    &:hover {
        .product__thumb img {
            transform: scale3d(1.1, 1.1, 1.1);
        }

        .product__meta {
            opacity: 1;
            bottom: 15px;
        }
    }

    &:hover {
        .product__title {
            h5 {
                color: var(--primary_color);
            }
        }
    }
}

// WooCommerce shortcode for menu
.woocommerce {
    >.woocommerce {
        margin: 0;

        .product-item-wrap {
            padding: 0;

            .product-item-inner {
                .transition(all 0.35s ease);

                .product-thumb {
                    width: 33.33%;
                    float: left;

                    .product-thumb-primary {
                        img {
                            padding-top: 0;
                        }
                    }

                    .product-thumb-secondary {
                        img {
                            padding-top: 0;
                        }
                    }

                    .product-flash-wrap {
                        span {
                            margin-top: 0;
                        }
                    }
                }

                .product-info {
                    padding: 0 0 0 30px;
                    width: 66.66%;
                    float: left;
                    text-align: left;

                    .star-rating {
                        position: relative;
                        text-align: left;
                        right: 0;
                        margin: 20px 0 10px 0;

                        &:before {
                            left: 0;
                            .translateX(0);
                        }
                    }

                    span.price {
                        margin-top: 25px;
                        padding-top: 10px;
                    }

                    h3 {
                        width: 100%;
                        padding-right: 0;
                        margin-top: 12px;
                        margin-bottom: 20px;
                        font-size: 16px;
                    }

                    @media (min-width: 768px) and (max-width: 991px) {
                        padding-left: 10px;

                        h3 {
                            font-size: 14px;
                            margin-bottom: 0;
                            margin-top: 0;
                        }

                        span.price {
                            margin-top: 0;
                        }
                    }
                }

                .product-actions {
                    display: none;
                }

                &:hover {
                    .translate(0, -3px);
                }
            }
        }
    }

    &.columns-1 {
        .woocommerce {
            .product-item-wrap {
                .product-info {
                    .star-rating {
                        bottom: 0;
                    }

                    span.price {
                        margin-top: 10px !important;
                    }

                    span.price,
                    .star-rating {
                        opacity: 1;
                    }

                    .add-to-cart-wrap {
                        display: none;
                    }
                }

                &:hover {
                    .product-info {

                        span.price,
                        .star-rating {
                            opacity: 1;
                        }

                        .yith-wcwl-add-to-wishlist {
                            opacity: 0;
                        }

                        .product-quick-view,
                        .compare {
                            opacity: 0;
                        }
                    }
                }
            }
        }

        .product-item-wrap {
            width: 100%;

            .product-info {
                h3 {
                    font-size: 14px;
                    color: var(--text_color);
                    text-align: left;
                }

                .star-rating {
                    &:before {
                        left: 0;
                        .translate(0)
                    }
                }

                span.price {
                    text-align: left;
                }

                .product-single-short-description {
                    text-align: left;
                }
            }
        }
    }
}

.product-item-wrap {
    .rbc-product-inner {
        .product__meta {

            .add-to-cart-wrap,
            .yith-wcwl-add-to-wishlist {
                padding-bottom: 10px;
            }

            .product-quick-view {
                padding-bottom: 5px;
            }
        }
    }
}

/* --------------------------------------------
ORDER RECEIVED
-------------------------------------------- */

.woocommerce-order-received .woocommerce,
.woocommerce-account .woocommerce {

    header.title h3 {
        font-size: 26px;
        margin-bottom: 20px;
    }

    address {
        line-height: 1.8;
    }
}

.woocommerce .order_details {
    padding: 0;
}

/* --------------------------------------------
ORDER TRACKING
-------------------------------------------- */

.track_order {
    text-align: left;

    .form-row {
        input.button {
            margin-top: 30px;
            height: 50px;
            min-width: 170px;
            text-transform: uppercase;
            font-size: 16px;
        }
    }
}

.track_order p:first-child {
    line-height: 1.8;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    display: block;
    display: none;
}

.woocommerce .track_order .form-row-first,
.woocommerce .track_order .form-row-last {
    float: none;
    margin: auto;
    margin-bottom: 20px;
    width: 100%;

    label {
        font-weight: bold;
        margin-bottom: 10px;
        color: var(--heading_color);
    }

    input {
        text-align: left;
        color: var(--primary_color);

        .placeholder {
            text-align: left;
            color: var(--primary_color_fade_50);
        }
    }
}

.woocommerce form.track_order .form-row input.input-text {
    height: 55px;
    border: 1px solid #eee !important;

    &:focus {
        border-color: var(--primary_color) !important;
    }
}

/* --------------------------------------------
PRODUCT-LOADMORE
-------------------------------------------- */

.product-paging-load-more {
    button {
        background-color: var(--primary_color);
        .transition(all 0.35s ease);

        &:hover {
            background-color: var(--primary_color_darken_20);
        }
    }
}

#popup-product-quick-view-wrapper {
    &.fade {
        opacity: 1 !important;
    }

    .modal-dialog {
        top: 200px;
        transition: all ease-in-out .4s;
    }
}

.woocommerce {
    .rbc-product-inner {
        .product__price {
            .price {
                color: var(--primary_color);
                font-size: 1.15em;

                .sale_price {
                    padding-left: 10px;
                }
            }
        }
    }
}

.yolo-filter-widget {
    .sidebar {}
}

//================= PRODUCT RECENT ITEM =========
.recent-item {
    .recent-title {
        border-bottom: 1px solid #cecece;
    }

    .rbc-product-inner {
        .transition(all 0.6s ease);

        .product__thumb {
            float: left;
            margin: 0px;
            padding: 0px;
            display: flex;
            width: 100px;
            height: 120px;
            min-height: 120px;
            width: 30%;

            @media screen and(min-width: 992px) {
                float: left;
                margin: 0px;
                padding-top: 5px;
            }

            .product__price {
                display: inline-block;
                width: 70%;
                left: 40%;

                @media screen and(min-width: 768px) {
                    display: none;
                }

                @media screen and(min-width: 992px) {
                    display: inline-block;
                }

                .price {
                    display: flex;
                    font-family: var(--heading_font);

                    @media screen and(min-width: 768px) {
                        display: block;
                    }

                    @media screen and(min-width: 992px) {
                        display: flex;
                    }

                    del {
                        padding-right: 10px;
                        color: #8f8f8f;
                    }
                }
            }
        }

        .product__info {
            height: 100%;
            padding: 30px 0px;
            width: 70%;
            display: inline-block;

            @media screen and(min-width: 320px) {
                display: inline-block;
            }

            @media screen and(min-width: 768px) {
                display: inline-block;
                padding: 15px 0px;
            }

            @media screen and(min-width: 992px) {
                padding: 30px 0px;
            }

            .product__title {
                h3 {
                    padding-top: 10px;
                    padding-left: 15%;
                    text-align: left !important;
                }
            }

            .product__cat {
                padding-left: 15%;
                text-align: left !important;
            }
        }

        .product__meta {
            display: none;
        }

        .star-rating {
            @media screen and(min-width: 320px) {
                margin-top: 10px;
                margin-left: 15%;
            }

            @media screen and(min-width: 768px) {
                margin-left: 15%;
            }
        }

        .product__sale-flash {
            display: none;
        }

        &:hover {
            -webkit-box-shadow: 0px 2px 15px 0px #DEDEDE;
            -moz-box-shadow: 0px 2px 15px 0px #DEDEDE;
            box-shadow: 0px 2px 15px 0px #DEDEDE;
        }
    }
}