/*===============================
Woocommerce Archive Layout
==============================*/

.woocommerce{
    .wholewrapper{
        display: block;
        .woowrapper{
            @include flex;
            -webkit-flex-wrap: wrap;
            -ms-flex-wrap: wrap;
            flex-wrap: wrap;
            -webkit-align-items: center;
            align-items: center;
            border-bottom: 1px solid var(--genborderColor);
            margin-bottom: 40px;
            padding-bottom: 20px;
            position: relative;
            z-index: 1;
        }
        ul.products{
            @include flex;
            -webkit-flex-wrap: wrap;
            -ms-flex-wrap: wrap;
            flex-wrap: wrap;
            margin-left: -15px;
            margin-right: -15px;
            margin-bottom: 0;
            padding-bottom: 10px;
            &:before, &:after{
                display: none;
            }
            &.columns-2{
                li.product{
                    width: calc(50% - 30px);
                    @include media(sm){
                        width: 100%;
                    }
                }
            }
            &.columns-3{
                li.product{
                    width: calc(33.333% - 30px);
                    @include media(sm){
                        width: 100%;
                    }
                }
            }
            &.columns-4{
                li.product{
                    width: calc(25% - 30px);
                    @include media(sm){
                        width: 100%;
                    }
                }
            }
            &.columns-5{
                li.product{
                    width: calc(20% - 30px);
                    @include media(sm){
                        width: 100%;
                    }
                }
            }
                
            li.product{
                border-radius: var(--borderRadius);
                margin-right: 15px;
                margin-left: 15px;
                margin-bottom: 60px;
                overflow: hidden;
                text-align: var(--cardAlignment);

                .woocommerce-LoopProduct-link{
                    display: inline-flex;
                    flex-wrap: wrap;
                    margin: 0;
                    position: relative;
                    width: 100%;
                    img{
                        height: 100%;
                        margin: 0;
                    }
                }
                
                @include media(sm){
                    width: 100%;
                }
    
                &:last-of-type{
                    margin-bottom: 60px;
                }
                
                .caption-content-wrapper{
                    padding: 25px 15px;
                    .woocommerce-LoopProduct-link {
                        display: block;
                    }
                }
                .woocommerce-loop-product__title{
                    font-size: 1em;
                    line-height: 1.4;
                    font-weight: 400;
                    margin-bottom: 16px;
                    padding: 0;
                    color: var(--color);
                    @include transition(all ease 0.3s);
                    
                    &:hover{
                        color: var(--colorHover);
                    }
                }
                .star-rating{
                    color: #F5B223;
                    font-size: 16px;
                    display: inline-block;
                    vertical-align: middle;
                    margin: 6px 0 16px;
                    
                    &:before{
                        color: #F5B223;
                    }
                }
                .price{
                    color: var(--color);
                    font-size: 0.888889em;
                    font-weight: 400;
                    margin-bottom: 16px;
                    
                    del{
                        opacity: 0.4;
                        margin-right: 3px;
                    }
                    ins{
                        font-weight: 400;
                    }
                }
            }
        }
        .woocommerce-notices-wrapper{
            width: 100%;
            .woocommerce-message{
                background: var(--baseColor);
                border: none !important;
                font-size: 0.888889em;
                display: flex;
                align-items: center;
                justify-content: space-between;
                position: relative;
                &:before{
                    color: var(--wooBgColor);
                    top: 35%;
                }
    
                a.button{
                    order: 3;
                    background: var(--wooBgColor);
                    border: 1px solid var(--wooBorderColor);
                    -webkit-border-radius: var(--bottonRoundness);
                    border-radius: var(--bottonRoundness);
                    color: var(--wooTextColor);
                    display: inline-flex;
                    font-size: 0.875em;
                    font-weight: 300;
                    justify-content: center;
                    letter-spacing: 0.5px;
                    padding: 0 20px;
                    text-transform: uppercase;
    
                    &:hover{
                        background: var(--wooBgHoverColor);
                        border-color: var(--wooBorderHoverColor);
                        color: var(--wooHoverColor);
                    }
                    
                    &:focus, &:active{
                        outline: none;
                        -webkit-box-shadow: none;
                        box-shadow: none;
                    }
                }
            }
            .woocommerce-error{
                background: var(--baseColor);
                border: none !important;
                font-size: 0.888889em;
                margin: 0 0 20px;
                display: flex;
                -webkit-flex-wrap: wrap;
                -ms-flex-wrap: wrap;
                flex-wrap: wrap;
                -webkit-align-items: center;
                align-items: center;
                padding: 20px;
                
                &:before{
                    display: inline-block;
                    position: relative;
                    top: 0;
                    left: 0;
                    vertical-align: middle;
                    margin-right: 12px;
                }
                li{
                    list-style: none;
                    margin-bottom: 0;
                    &:before{
                        display: none;
                    }
                }
                &:before{
                    color: var(--primaryColor);
                }
            }
        }
        .woocommerce-ordering{
            -webkit-order: 2;
            -ms-order: 2;
            order: 2;
            margin: 0;
            position: relative;
            @include media(sm){
                margin-bottom: 10px;
                width: 100%;
            }
            select{
                color: var(--primaryColor);
                -webkit-appearance: none;
                -moz-appearance: none;
                appearance: none;
                border: 1px solid var(--genborderColor);
                background: none;
                padding: 0 40px 0 17px;
                height: 40px;
                line-height: 40px;
                font-size: 0.77778em;
                @include media(sm){
                    width: 100%;
                }
                
                &:focus{
                    outline: none;
                    -webkit-box-shadow: none;
                    box-shadow: none;
                    border-color: var(--genborderColor);
                }
            }
            &:after{
                content: "";
                height: 10px;
                width: 10px;
                background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='7' viewBox='0 0 14 7'%3E%3Cpath id='caret-down-arrow' d='M7,0l7,7H0Z' transform='translate(14 7) rotate(180)' fill='%23292929'/%3E%3C/svg%3E%0A") no-repeat;
                background-size: 10px !important;
                line-height: 1;
                position: absolute;
                top: 17px;
                right: 17px;
                left: auto;
                color: #5081f5;
            }
        }
        .woocommerce-result-count{
            font-size: 0.77778em;
            color: var(--primaryColor);
            -webkit-order: 1;
            -ms-order: 1;
            order: 1;
            margin-bottom: 0;
            margin-left: 0;
            margin-right: auto;
            @include media(sm){
                width: 100%;
                margin-bottom: 20px;
                margin-left: 0;
            }
        }
        .woocommerce-pagination{
            border-top: 1px solid var(--genborderColor);
            clear: both;
            display: block;
            padding: 25px 0 15px;
            width: 100%;
            ul.page-numbers{
                border: none;
                margin: 0;
                @include flex;
                -webkit-flex-wrap: wrap;
                -ms-flex-wrap: wrap;
                flex-wrap: wrap;
                -webkit-align-items: center;
                align-items: center;
                justify-content: center;
                &:before, &:after{
                    display: none;
                }
                
                li{
                    border: none;
                    float: none;
                    .page-numbers{
                        background: none;
                        display: block;
                        font-size: 1em;
                        font-weight: 400;
                        color: var(--primaryColor);
                        height: 40px;
                        width: 40px;
                        line-height: 40px;
                        padding: 0;
                        text-align: center;
                        text-decoration: none;
                        -webkit-transition: all ease 0.3s;
                        -moz-transition: all ease 0.3s;
                        -ms-transition: all ease 0.3s;
                        transition: all ease 0.3s;
                        
                        &:hover{
                            color: var(--genLinkColor);
                        }
    
                        &.next{
                            margin-right: 0;
                            margin-left: 0;
                            width: auto;
    
                            &:after{
                                content: "";
                                width: 10px;
                                height: 12px;
                                background: var(--primaryColor);
                                -webkit-mask-image : url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6.693' height='11.266' viewBox='0 0 6.693 11.266'%3E%3Cpath id='Path_26493' data-name='Path 26493' d='M-21221.934-19353.359l4.57,4.57-4.57,4.57' transform='translate(21222.996 19354.422)' fill='none' stroke='%23292929' stroke-linecap='round' stroke-width='1.5'/%3E%3C/svg%3E%0A");
                                mask-image :  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6.693' height='11.266' viewBox='0 0 6.693 11.266'%3E%3Cpath id='Path_26493' data-name='Path 26493' d='M-21221.934-19353.359l4.57,4.57-4.57,4.57' transform='translate(21222.996 19354.422)' fill='none' stroke='%23292929' stroke-linecap='round' stroke-width='1.5'/%3E%3C/svg%3E%0A");
                                -webkit-mask-repeat: no-repeat;
                                mask-repeat: no-repeat;
                                -webkit-mask-position: center;
                                mask-position: center;
                                margin-left: 8px;
                                display: inline-block;
                                vertical-align: middle;
                            }
                            &:hover:after{
                                background: var(--genLinkColor);
                            }
                        }
                        &.prev{
                            margin-right: 0;
                            margin-left: 0;
                            width: auto;
                            &:before{
                                content: "";
                                width: 10px;
                                height: 12px;
                                background: var(--primaryColor);
                                -webkit-mask-image : url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6.693' height='11.266' viewBox='0 0 6.693 11.266'%3E%3Cpath id='Path_26493' data-name='Path 26493' d='M-21221.934-19353.359l4.57,4.57-4.57,4.57' transform='translate(21222.996 19354.422)' fill='none' stroke='%23292929' stroke-linecap='round' stroke-width='1.5'/%3E%3C/svg%3E%0A");
                                mask-image :  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6.693' height='11.266' viewBox='0 0 6.693 11.266'%3E%3Cpath id='Path_26493' data-name='Path 26493' d='M-21221.934-19353.359l4.57,4.57-4.57,4.57' transform='translate(21222.996 19354.422)' fill='none' stroke='%23292929' stroke-linecap='round' stroke-width='1.5'/%3E%3C/svg%3E%0A");
                                -webkit-mask-repeat: no-repeat;
                                mask-repeat: no-repeat;
                                -webkit-mask-position: center;
                                mask-position: center;
                                margin-right: 8px;
                                margin-top: -4px;
                                display: inline-block;
                                vertical-align: middle;
                                transform: rotate(-180deg);
                            }
                            &:hover:before{
                                background: var(--genLinkColor);
                            }
                        }
                    }
                    
                    .current{
                        display: block;
                        color: #FFF;
                        background: var(--genLinkColor);
                        text-align: center;
                        -webkit-border-radius: 4px;
                        border-radius: 4px;
                        &:hover{
                            color: #FFF !important;
                            pointer-events: none;
                        }
                    }
                    &:first-child{
                        .page-numbers{
                            margin-left: 0;
                        }
                    }
                }
            }
        }
        &[data-card-badge="square"]{
            .product{
                .onsale{
                    -webkit-border-radius: 4px;
                    border-radius: 4px;
                    height: 25px;
                    min-height: 25px;
                    padding: 6px 0;
                }
            }
        }
    }
}

.woocommerce-shop{
    ul.products{
        li.product{
            background: var(--cardCaptionBgColor);
            box-shadow: var(--box-shadow);
        }
    }
}

.woocommerce-page{
    .archive-title-wrapper{
        .tagged-in-wrapper{
            color: var(--shopFontColor);
            margin: var(--wooMargin) 0;
            h1{
                color: var(--shopFontColor);
                font-size: var(--fontSize);
            }
        }
    }
}