/**
 * @package Helix V3 Framework
 * @author JoomShaper http://www.joomshaper.com
 * @copyright Copyright (c) 2010 - 2016 JoomShaper
 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later
 */

/*=========================================
 *======= 	 Megamenu	   ============
 *=======================================*/
.sp-megamenu-parent {
    list-style: none;
    padding: 0;
    margin: 0;
    z-index: 9;
    display: block;
    float: left;
    >li {
        display: inline-block;
        position: relative;
        padding: 0;
        margin-right: 35px;
        &.menu-justify {
            position: static;
        }
        >a {
            display: inline-block;
            line-height: 60px;
            font-size: 15px;
            color: #363636;
            position: relative;
        }

        &.sp-has-child>a:after{
            font-family: "FontAwesome";
            content: " \f107";
        }
    }

    .sp-module {
        padding: 10px;
    }

    .sp-mega-group {
        list-style: none;
        padding: 0;
        margin: 0;

        .sp-mega-group-child {
            list-style: none;
            padding: 0;
            margin: 0;
        }
    }

    .sp-dropdown {
        margin: 0;
        position: absolute;
        z-index: 10;
        display: none;

        .sp-dropdown-inner {
            background: fade(#363636, 98%);
            box-shadow: 0 3px 5px 0 rgba(0, 0, 0, 0.2);
        }

        .sp-dropdown-items {
            list-style: none;
            padding: 0;
            margin: 0;

            .sp-has-child>a:after{
                font-family: "FontAwesome";
                content: " \f105";
                float: right;
            }
        }

        &.sp-menu-center {
            margin-left: 45px;
        }

        &.sp-dropdown-main {
            top: 100%;
            &.sp-menu-right,
            &.sp-menu-full {
                left: 0;
            }

            &.sp-menu-left {
                right: 0;
            }
            &.sp-menu-full .sp-dropdown-inner{
                box-shadow: none;
                position: relative;
            }
            &.sp-menu-full >.sp-dropdown-inner:before,
                &.sp-menu-full >.sp-dropdown-inner:after {
                content: " ";
                position: absolute;
                top: 0;
                height: 100%;
                width: 2000px;
                background: fade(#363636, 98%);
            }
            &.sp-menu-full >.sp-dropdown-inner:before{
                left: -2000px;
            }
            &.sp-menu-full >.sp-dropdown-inner:after{
                right: -2000px;
            }
        }

        &.sp-dropdown-sub {
            top: 0;
            left: 100%;
            .sp-dropdown-inner {
                box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
            }
        }

        //List Item
        li.sp-menu-item { //child sub
                          display: block;
                          padding: 0;
                          position: relative;
                          >a {
                              display: block;
                              padding: 15px 20px;
                              color: #fff;
                              cursor: pointer;

                              &.sp-group-title {
                                  text-transform: uppercase;
                                  font-weight: bold;
                              }

                              &:hover {
                                  color: #fff;
                              }
                          }

                          &.active>a {
                              &:hover {
                                  color: #fff;
                              }
                          }
        }
    }

    .sp-dropdown-mega {
        >.row {
            margin-top: 30px;
            &:first-child {
                margin-top: 0;
            }
        }
    }

    //Has Child
    .sp-has-child {
        &:hover {
            >.sp-dropdown {
                display: block;
            }
        }
    }

    //Fade Animation
    &.menu-fade {
        .sp-has-child:hover {
            >.sp-dropdown {
                -webkit-animation: spMenuFadeIn 400ms;
                animation: spMenuFadeIn 400ms;
            }
        }
    }

    //Zoom Animation
    &.menu-zoom {
        .sp-has-child:hover {
            >.sp-dropdown {
                -webkit-animation: spMenuZoom 400ms;
                animation: spMenuZoom 400ms;
            }
        }
    }

    //Fade in up Animation
    &.menu-fade-up {
        .sp-has-child:hover {
            >.sp-dropdown {
                -webkit-animation: spMenuFadeInUp 400ms;
                animation: spMenuFadeInUp 400ms;
            }
        }
    }
    //sp-shop-menu
    .sp-shop-menu{
        .sp-dropdown-inner{
            padding: 15px;
        }
        .j2store-latest-products{
            .sp-module-title{
                color: #fff;
                margin-top: 10px;
            }
            .j2store-module-product{
                border: none;
                margin: 0;
                padding-bottom: 20px;
                .product-cart-section .j2store-product-image{
                    width: 25%;
                    overflow: hidden;
                    a{
                        display: block;
                    }
                    img{
                        .transition(.3s);
                    }
                }
                .product-title a,
                .product-price-container .sale-price{
                    color: #fff;
                    font-size: 14px;
                }
                .product_cart_block{
                    display: none;
                }
                &:last-child{
                    border: none;
                    padding-bottom: 0;
                    margin-bottom: 0;
                }
                &:hover{
                    .product-cart-section .j2store-product-image img{
                        .scale(1.3);
                    }
                }
            }
        }
        .banneritem{
            img{
                width: 100%;   
            }
        }
    }
}


/*=========================================
 *=======   Off Canvas   ============
 *=======================================*/
#offcanvas-toggler {
    float: right;
    line-height: 65px;
    margin-left: 15px;
    font-size: 20px;
    >i {
        .transition(~'color 400ms, background-color 400ms');
        &:hover {
            color: #fff;
        }
    }
 }

 body.offcanvas {
    .body-innerwrapper{
        right: 320px;
    }
    .offcanvas-overlay {
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        right: 0;
        opacity: 1;
        z-index: 9999;
    }
 }
.body-innerwrapper{
    position: relative;
    overflow-x: hidden;
    -webkit-transition: .4s;
    transition: .4s;
    right: 0;
}

 .close-offcanvas {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1;
    border-radius: 100%;
    width: 25px;
    height: 25px;
    line-height: 23px;
    text-align: center;
    font-size: 16px;
    border: 1px solid #fff;
    color: #fff;
 }

 .offcanvas-menu {
    width:  320px;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    color: #fff;
    position: fixed;
    top: 0;
    right: -320px;
    z-index: 99999;
    overflow: inherit;
    -webkit-transition: .4s;
    transition: .4s;
    .offcanvas-inner {
        .sp-module {
            margin-top: 20px;
            border-bottom: 1px solid rgba(0,0,0,0.08);
            margin-bottom: 50px;
            &:after{
                display: none;
            }

            &:last-child{
                border-bottom: none;
                margin-bottom: 0;   
            }

            &.off-canvas-menu{
                padding: 0;
            }

            .sp-module-title {
                font-size: 16px;
                line-height: 1;
                text-transform: uppercase;
            }

            ul {
                > li{
                    border: 0;
                    position: relative;
                    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
                    overflow: hidden;
                    a {
                        .transition(300ms);
                        padding:10px 20px;
                        font-size: 14px;
                        text-transform: uppercase;
                        color: #fff;
                        font-weight: 500;
                        line-height: 28px;
                    }
                    &:hover,
                    &:focus{
                        a{
                            background: rgba(0, 0, 0, 0.15);
                        }
                    }
                    a {
                        &:hover,
                        &:focus{
                            background: rgba(0, 0, 0, 0.15);
                        }
                    }
                    ul {
                        > li{
                            &.active,
                            &:hover,
                            &:focus {
                                > a{
                                    background: rgba(0, 0, 0, 0.15) !important;
                                }
                            }
                            > a{
                                &:hover,
                                &:focus{
                                    background: rgba(0, 0, 0, 0.15) !important;
                                }
                            }
                        }
                    }

                    .offcanvas-menu-toggler {
                        display: inline-block;
                        position: absolute;
                        top: 0;
                        right: 0;
                        padding:13px 20px;
                        cursor: pointer;
                        .open-icon {
                            display: none;
                        }

                        .close-icon {
                            display: inline;
                        }

                        &.collapsed {
                            .open-icon {
                                display: inline;
                            }
                            .close-icon {
                                display: none;
                            }
                        }
                    }

                    >a:after  {
                        display: none;
                    }

                    ul {
                        background: rgba(0,0,0,0.02);
                        >li > a{padding-left: 30px;}
                    }
                }
            }

            &:first-child {
                margin-top: 0;
                padding: 30px;
            }           
        }
        .search {
            margin-top: 25px;
            input {
                width: 100%;
                background: transparent;
                border-color: #5f5f5f;
                color: #fff;
            }
        }
    }
 }

 .ltr {

    .offcanvas-menu {
        .transition(.4s);
    }

    .body-innerwrapper:after {
        right: 0;
    }

    .offcanvas-menu {
        right: -320px;
    }

    &.offcanvas {
        .offcanvas-menu {
            right: 0;
        }
    }
 }

 .offcanvas {
    width: 100%;
    height: 100%;
    position: relative;

    .body-innerwrapper:after {
        width: 100%;
        height: 100%;
    }

    .offcanvas-menu {
        right: 0;

        ul.nav-child li {
            padding-left: 10px;
        }
    }
 }

 .menu .nav-child.small {
    font-size: inherit;
 }




/*=========================================
 *======= 	Menu Animation   ============
 *=======================================*/
@-webkit-keyframes spMenuFadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes spMenuFadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@-webkit-keyframes spMenuZoom {
    0% {
        opacity: 0;
        -webkit-transform: scale(.8);
    }

    100% {
        opacity: 1;
        -webkit-transform: scale(1);
    }
}

@keyframes spMenuZoom {
    0% {
        opacity: 0;
        transform: scale(.8);
        -webkit-transform: scale(.8);
    }

    100% {
        opacity: 1;
        transform: scale(1);
        -webkit-transform: scale(1);
    }
}

@-webkit-keyframes spMenuFadeInUp {
    0% {
        opacity: 0;
        -webkit-transform: translate3d(0, 30px, 0);
    }

    100% {
        opacity: 1;
        -webkit-transform: none;
    }
}

@keyframes spMenuFadeInUp {
    0% {
        opacity: 0;
        transform: translate3d(0, 30px, 0);
    }

    100% {
        opacity: 1;
        transform: none;
    }
}
