@use "helpers";
$breakH: 620px;
$breakW: 500px;

#carrinho-module-overlay{
    display: none;
    z-index: 2000;
    background-color: helpers.$backgroundModal;
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
}

#carrinho-module{
    position: fixed;
    z-index: 2000;
    display: none;
    width: 100%;
    max-width: 1330px;
    top: 40px;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0px;
    border: none;
    background-color: #fff;

    @media(max-width:1250px){
        width: auto;
        top: 15px;
        bottom: 15px;
        left: 15px;
        right: 15px;    
        transform: initial;
    }

    &[data-position="target"]{
        .overlay{
            display: none;
        }
    }

    .btnClose{
        position: absolute;
        z-index: 10;
        cursor: pointer;
        display: flex;
        top: 0px;
        right: 0px;
        width: 50px;
        height: 50px;
        align-items: center;
        justify-content: center;
        background-color: helpers.$light;

        @media(max-width:575px){
            width: 30px;
            height: 30px;
        }

        &:before{
            @include helpers.sprite();
            display: block;
            content: "";
            width: 24px;
            height: 24px;
            background-position: -258px -12px;
        }
    }

    .inner{
        display: block;
        width: 100%;
        height: 100%;
        overflow-y: auto;
        overflow-x: hidden;
        transition: opacity 0.4s;

        .conteudo-principal{
            display: flex;
            width: 100%;
            padding: 40px 15px;
            align-items: flex-start;
            justify-content: center;

            @media(max-width:991px){
                flex-direction: column;
                align-items: center;
            }

            .prd-fotos{
                display: block;
                width: 100%;
                max-width: 620px;

                .fotos{
                    display: flex;
                    width: 100%;
                    align-items: stretch;
                    justify-content: center;

                    .fotosp{
                        overflow-y: auto;
                        display: block;
                        width: 100%;
                        max-width: 86px;
                        max-height: 429px;

                        @media(max-width:991px){
                            display: none;
                        }

                        .fotospDisplay,.share-p{
                            height: 100%;
                        }

                        .share-p{
                            display: block;
                            /*                            flex-direction: column;
                                                        align-items: center;
                                                        justify-content: center;*/
                        }

                        li{
                            position: relative;
                            cursor: pointer;
                            display: block;
                            width: 100%;
                            margin-bottom: 5px;

                            a{
                                display: block;
                                outline: 0px;
                                width: 100%;

                                img{
                                    display: block;
                                    width: 100%;
                                }
                            }
                        }
                    }

                    .fotosm{
                        display: block;
                        width: calc(100% - 86px);
                        max-width: 528px;
                        margin-left: 5px;

                        @media(max-width:991px){
                            width: 100%;
                            margin-right: 0px;
                        }

                        .conteudo{
                            display: block;
                            width: 100%;

                            img{
                                display: block;
                                width: 100%;
                            }

                            &.prevent-load{
                                img{
                                    width: 585px;
                                    max-width: 100%;
                                    flex: 0 0 100%;
                                }
                            }

                            .owl-dots, .owl-nav{
                                display: none !important;
                            }
                        }
                    }
                }
            }

            .content-foto-info{
                display: block;
                width: 100%;
                max-width: 500px;
                margin-left: 85px;

                @media(max-width:1199px){
                    margin-left: 30px;
                }

                @media(max-width:991px){
                    margin-left: 0px;
                    margin-top: 40px;
                    padding-top: 0px;
                }

                .prd-form{
                    display: block;
                    width: 100%;
                    margin-bottom: 30px;

                    .h1dentro{
                        display: block;
                        margin: 0px;
                        margin-bottom: 5px;
                        color: helpers.$textoDark;
                        font: normal 25px helpers.$fontBold;
                        line-height: 30px;
                        text-align: center;
                    }

                    .ref{
                        display: block;
                        margin: 0px;
                        color: helpers.$textoDark;
                        font: normal 12px helpers.$fontLight;
                        line-height: 18px;
                        letter-spacing: 0.04em;
                        text-align: center;
                    }
                }

                .content-info{
                    display: block;
                    width: 100%;

                    .content{
                        display: block;
                        width: 100%;
                        max-height: 584px;

                        .btn-deslogado{
                            display: block;
                            outline: 0px;
                            margin-bottom: 50px;
                            color:helpers.$textoDark;
                            font: normal 15px helpers.$fontRegular;
                            text-align: center;

                            strong{
                                font-weight: normal;
                                font-family: helpers.$fontBold;
                            }
                        }

                        .msg-deslogado{
                            margin-bottom: 50px;
                            text-align: center;
                            font: normal 14px helpers.$fontRegular;
                            color:#17100D;
                        }

                        .box-share{
                            display: none;
                            padding-bottom: 30px;

                            @media(max-width:991px){
                                display: block;
                            }
                        }
                    }
                }
            }


            .box-share{
                display: block;
                width: 100%;
                margin-top: 15px;
                padding-left: 96px;

                @media(max-width:991px){
                    display: none;
                    padding: 0px;
                }

                .titulo{
                    display: block;
                    margin: 0px;
                    margin-bottom: 15px;
                    color: helpers.$textoDark;
                    font: normal 12px helpers.$fontSemibold;
                    line-height: 18px;
                    letter-spacing: 0.04em;
                    text-align: center;
                }

                .share-opcoes{
                    display: flex;
                    width: 100%;
                    align-items: center;
                    justify-content: center;

                    .shareProduto{
                        display: block;
                        outline: 0px;
                        margin-right: 20px;

                        &:before{
                            @include helpers.sprite();
                            display: block;
                            content: "";
                            width: 23px;
                            height: 23px;
                        }

                        &.whatsapp{
                            &:before{
                                background-position: -206px -113px;
                            }
                        }
                        &.facebook{
                            &:before{
                                background-position: -101px -113px;
                            }
                        }
                        &.twitter{
                            &:before{
                                background-position: -241px -112px;
                            }
                        }
                        &:last-of-type{
                            margin-right: 0px;
                        }
                    }
                }
            }
        }
    }

    &.loading{
        .inner{
            transition: none;
            pointer-events: none;
            opacity: 0.3;
        }
        .carrinho-loading{
            display: block;
        }
    }

    #frmProdAjax{
        width: 100%;
    }

    /*
    * Produtos Nomais
    */
    .prd-tam {
        .prd-estoque-real{
            display: none;
        }

        .prd-tam-qtd{
            display: block;
            width: 100%;
            max-width: 100px;
            margin-right: 15px;

            @media(max-width:575px){
                margin-right: 0px;
                margin-bottom: 15px;
            }

            h4{
                display: block;
                margin: 0px;
                margin-bottom: 5px;
                color: helpers.$textoDark;
                font: normal 12px helpers.$fontSemibold;
            }

            .box-quantidade{
                display: flex;
                width: 100%;
                align-items: stretch;
                justify-content: center;
                border: solid 1px #9A9A9A;

                .optQtdVal {
                    display: block;
                    width: calc(100% - 22px);
                    padding: 10px 5px;
                    color: helpers.$textoDark;
                    font: normal 15px helpers.$fontSemibold;
                    line-height: 16px;
                    text-align: center;
                    outline: 0px;
                    border: none;
                    background-color: transparent;
                    box-shadow: none;

                    &:hover,&:focus{
                        outline: 0px;
                    }
                }
                .optQtdVal::-webkit-inner-spin-button { 
                    -webkit-appearance: none;

                }
                .optQtdVal { 
                    -moz-appearance: textfield;
                    appearance: textfield;
                }

                .box-set{
                    display: flex;
                    width: 22px;
                    gap: 3px;
                    flex-direction: column;
                    align-items: center;
                    justify-content: space-between;

                    .set-quantidade{
                        display: flex;
                        width: 22px;
                        height: 22px;
                        align-items: center;
                        justify-content: center;
                        background-color: #F5F5F5;

                        &:before{
                            @include helpers.sprite();
                            display: block;
                            content: "";
                            width: 12px;
                            height: 6px;
                        }

                        &.set-mais{
                            &:before{
                                background-position: -386px -5px;
                            }
                        }
                        &.set-menos{
                            &:before{
                                background-position: -386px -21px;
                            }
                        }
                    }
                }
            }
        }
    }

    .prd-variation{
        overflow: hidden;
        width: 100%;

        .prd-tam-qtd{
            width: 100%;

            label{
                display: block;
            }
        }
        .optVariacao{
            background-color: #fff;
            border: solid 1px #dddddd;
            box-sizing: border-box;
            font-family: helpers.$fontRegular;
            font-size: 14px;
            font-weight: bold;
            height: calc(24px + 3px);
            padding-left: 10px;
            text-align: center;
            width: 150px;
        }
    }

    .prd-unavailable{
        display: block;
        width: 100%;
        margin-bottom: 20px;

        p{
            display: block;
            margin: 0px;
            margin-bottom: 5px;
            color: helpers.$textoDark;
            font: normal 15px helpers.$fontRegular;
        }
    }

    .prd-guia{
        display: block;
        outline: 0px;
        color: helpers.$textoDark;
        font: normal 12px helpers.$fontSemibold;
        line-height: 18px;
        letter-spacing: 0.04em;
        text-align:center;

        &:before{
            @include helpers.sprite();
            content: "";
            width: 26px;
            height: 12px;
            margin-top: -2px;
            margin-right: 10px;
            vertical-align: middle;
            background-position: -315px -92px;
        }
    }

    .prd-comp {
        position: relative;
        display: flex;
        margin-top: 35px;
        margin-bottom: 40px;
        align-items: center;
        justify-content: center;
        
        @media(max-width:575px){
            flex-direction: column;
        }

        .box-comp{
            display: flex;
            width: calc(100% - 115px);
            align-items: center;
            justify-content: center;
            
            @media(max-width:575px){
                width: 100%;
            }

            .btAddCarrinho,
            .btDeslogado{
                width: calc(100% - 60px);
                margin-right: 15px;
            }
        }
    }

    .prd-avise{
        position: relative;
        display: flex;
        width: 100%;
        flex-wrap: wrap;
        align-items: stretch;
        justify-content: center;

        h4{
            display: block;
            width: 100%;
            margin: 0px;
            margin-bottom: 10px;
            color: helpers.$textoDark;
            font: normal 12px helpers.$fontSemibold;
        }

        .avise-email{
            display: block;
            outline: 0px;
            width: calc(100% - 85px);
            padding: 10px;
            color: helpers.$textoDark;
            font: normal 15px helpers.$fontRegular;
            border: solid 1px helpers.$borders;
            box-shadow: none;

            &:focus{
                outline: 0px;
            }
        }

        .btSend{
            width: 85px;
            margin: 0px;
        }

        .loading{
            display: none;
            left: 50%;
            position: absolute;
            top: 50%;
            transform: translateX(-50%) translateY(-50%);
            z-index: 10;
        }

        &:after{
            content:'';
            background-color:rgba(255,255,255,0.5);
            bottom: 0;
            display: none;
            left: 0;
            position: absolute;
            right: 0;
            top: 0;
            z-index: 0;
        }
    }

    .opcoes{
        display: block;
        width: 100%;
        max-width: 475px;
        margin: 0 auto;
        margin-top: 50px;
        margin-bottom: 20px;

        .opcao{
            display: block;
            width: 100%;
            padding-top: 10px;
            padding-bottom: 10px;
            border-bottom: solid 1px #E6E6E6;

            .titulo{
                display: flex;
                cursor: pointer;
                outline: 0px;
                margin: 0px;
                color: #17100D;
                font: normal 15px helpers.$fontBold;
                align-items: center;
                justify-content: space-between;

                &:after{
                    @include helpers.sprite();
                    display: block;
                    content: "";
                    width: 10px;
                    height: 6px;
                    background-position: -454px -67px;
                    @include helpers.transicao(0.4s ease-in-out);
                }
            }

            .subtitulo{
                display: block;
                width: 100%;
                margin: 0px;
                margin-top: 10px;
                color: #17100D;
                font: normal 15px helpers.$fontRegular;
            }

            .conteudo{
                display: none;
                width: 100%;

                .frete{
                    display: block;
                    width:100%;
                    margin-top: 15px;
                    margin-bottom: 15px;

                    .form-frete{
                        display: flex;
                        width:100%;
                        align-items: stretch;
                        justify-content: center;

                        .cep{
                            display: block;
                            width: calc(100% - 195px);
                            padding: 15px 10px;
                            color: #999999;
                            font: normal 12px helpers.$fontRegular;
                            border: solid 1px #A0A0A0;
                            box-shadow: none;
                        }

                        .submit{
                            display: block;
                            width: 100%;
                            max-width: 195px;
                            padding: 15px 10px;
                            color: #FFFFFF;
                            font: normal 12px helpers.$fontRegular;
                            border: none;
                            background-color:#17100D;
                            @include helpers.transicao(0.4s ease-in-out);

                            &:hover,&:focus{
                                background-color: helpers.$success;
                            }
                        }
                    }
                }
            }

            .opt-mais{
                display: block;
                outline: 0px;
                margin-top: 10px;
                color: #17100D;
                font: normal 15px helpers.$fontRegular;
                text-decoration: underline;
            }

            &:first-of-type{
                border-top: solid 1px #E6E6E6;
            }

            &:last-of-type{
                margin-bottom: 0px;
            }

            &.ativo{
                .titulo{
                    &:after{
                        transform: rotate(180deg);
                    }
                }
            }
        }
    }

    .prd-options{
        clear: both;
        padding-bottom: 50px;

        .item{
            overflow: hidden;

            &.frete{
            }
        }

        #frmProdFreteAjax{
            overflow: hidden;

            h4{
                display: block;
                outline: 0px;
                margin: 0px;
                margin-bottom: 20px;
                color: helpers.$textoDark;
                font: normal 12px helpers.$fontSemibold;
                line-height: 18px;
                letter-spacing: 0.04em;
            }

            .box-campos{
                display: flex;
                width: 100%;
                align-items: stretch;
                justify-content: flex-start;

                .frete-cep{
                    display: block;
                    outline: 0px;
                    width: calc(100% - 135px);
                    padding: 10px;
                    color: helpers.$textoDark;
                    font: normal 12px helpers.$fontLight;
                    line-height: 16px;
                    letter-spacing: 0.04em;
                    box-shadow: none;
                    background-color: helpers.$light;
                    border: solid 1px #9A9A9A;
                }

                .btSend{
                    display: block;
                    outline: 0px;
                    width: 100%;
                    margin: 0px;
                    max-width: 135px;
                    color: helpers.$textoLight;
                    font: normal 12px helpers.$fontSemibold;
                    line-height: 18px;
                    letter-spacing: 0.04em;
                    text-align: center;
                    padding: 15px 10px;
                    border: none;
                    background-color: helpers.$highlight;
                    box-shadow: none;
                    @include helpers.transicao(0.4s ease-in-out);

                    &:hover,&:focus{
                        background-color: helpers.$success;
                    }
                }
            }
        }

        .frete-list{
            display: none;
            margin-top: 10px;
        }

        .item-frete{
            display: flex;
            padding: 5px 10px;
            border-bottom: solid 1px helpers.$borders;
            align-items: center;
            justify-content: space-between;
            background-color: helpers.$medium;

            @media(max-width:450px){
                flex-direction: column;
            }

            p{
                display: block;
                width: 33%;
                padding: 5px 0px;
                color: helpers.$textoDark;
                font-size:12px;
                font-family: helpers.$fontRegular;

                @media(max-width:450px){
                    width: 100%;
                    text-align: center !important;
                }

                .item-titulo,
                .item-valor{
                    font-family: helpers.$fontRegular;
                    font-weight: normal;
                }

                .item-prazo,.fretePrazo{
                    font-family: helpers.$fontSemibold;
                    font-weight: normal;
                }

                &:nth-child(1){
                    text-align: left;
                }
                &:nth-child(2){
                    text-align: center;
                }
                &:nth-child(3){
                    text-align: right;
                }
            }

            &:last-of-type{
                border-bottom-width: 0px;
            }
        }
    }

    .bt{
        position: relative;
        display: block;
        width: 100%;
        padding: 15px 10px;
        margin: 0 auto;
        color: helpers.$textoLight;
        font: normal 12px helpers.$fontSemibold;
        line-height: 18px;
        letter-spacing: 0.04em;
        text-align: center;
        border: none;
        border-radius: 0px;
        background-color: helpers.$highlight;
        @include helpers.transicao(0.4s ease-in-out);

        &:hover,&:focus {
            background-color: helpers.$success;
        }

        &:after{
            animation-duration: 1.4s;
            animation-iteration-count: infinite;
            animation-name: loadingRotate;
            animation-timing-function: linear;
            background-image: url(../img/loading.png);
            background-position: center;
            background-repeat: no-repeat;
            background-size: contain;
            content:'';
            display: none;
            height: 20px;
            left: 50%;
            margin: -10px;
            position: absolute;
            top: 50%;
            width: 20px;
        }
    }

    .sending{
        .bt{
            color: rgba(0,0,0,0);
            pointer-events: none;

            &:after{
                display: block;
            }
        }
    }

    .tabela-medidas-content{
        background-color: #fff;
        display: none;
        height: 100%;
        left: 0;
        position: absolute;
        top: 0;
        width: 100%;
        z-index: 51;

        .titulo{
            background-color: #fff;
            border: solid 1px #ccc;
            color: helpers.$highlight;
            font-size: 16px;
            font-weight: bold;
            line-height: 30px;
            text-align: center;

            .btn-close{
                color: #666;
                cursor: pointer;
                display: block;
                font-size: 15px;
                font-weight: bold;
                line-height: 35px;
                position: absolute;
                right: 0px;
                text-align: center;
                text-decoration: none;
                text-shadow: 0 0 1px #000;
                -webkit-text-stroke: 2px;
                text-stroke: 2px;
                top: 0px;
                width: 30px;
            }
        }
        .box-imagem{
            position: absolute;
            overflow-x: hidden;
            overflow-y: auto;
            z-index: 10;
            display: block;
            outline: 0px;
            width: 100%;
            top: 35px;
            left: 0;
            height: calc(100% - 40px);
            background-color: #fff;

            img{
                display: block;
                width: auto;
                max-width: 100%;
                margin: 0 auto;
            }

            @media(max-width: 767px){
                overflow-x: scroll;

                img{
                    max-width: unset;
                    height: 100%;
                }
            }
        }
        iframe{
            background-color: #fff;
            border: none;
            height: calc(100% - 40px);
            left: 0;
            position: absolute;
            top: 35px;
            width: 100%;
            z-index: 10;
        }
    }

    .btAddCarrinho{
        .loading{
            height: 17px;
        }
    }

    .addCarrinhoDone{
        position: absolute;
        right: 0;
        width: 260px;
        margin-top: 3px;
    }

    .carrinho-loading{
        animation-duration: 1.4s;
        animation-name: loadingRotate;
        animation-iteration-count: infinite;
        animation-timing-function: linear;
        opacity: 0.6;
        position: absolute;
        top: 50%;
        left: 50%;
        margin-left: -24px;
        margin-top: -24px;
        display: none;
    }

    .btPageDetalhe{
        width: 100%;
        margin: 10px auto;
        text-align: center;

        @media (max-height: $breakH), (max-width: $breakW){
            margin: 30px auto;
        }
    }
}

#he-topo{
    .msg-carrinho-vazio{
        padding: 8px;
    }
}
.btAddCarrinho {
    position: relative;

    &.error{
        background-color: #d9534f !important;
    }
    &.success{
        background-color: #00D86C !important;
        border-color: #00D86C !important;
    }

    &:after{
        animation-duration: 1.4s;
        animation-iteration-count: infinite;
        animation-name: loadingRotate;
        animation-timing-function: linear;
        background-image: url(../img/loading.png);
        background-position: center;
        background-repeat: no-repeat;
        background-size: contain;
        content:'';
        display: none;
        height: 20px;
        left: 50%;
        margin: -10px;
        position: absolute;
        top: 50%;
        width: 20px;
    }
}

.sending{
    .btAddCarrinho{
        color: rgba(0,0,0,0) !important;
        pointer-events: none;

        &:after{
            display: block;
        }
    }
}

#msg-container{
    position: fixed;
    top: 50px;
    right: 650px;
    z-index: 2010;

    @media(max-width:740px){
        top: 15px;
        right: 20px;
    }

    &.carrinho-off{
        right: 20px !important;
    }

    > p{
        position: relative;
        display: block;
        cursor: pointer;
        width: 320px;
        padding: 10px 15px;
        margin: 0 auto 25px auto;
        color: #232323;
        font: normal 13px helpers.$fontRegular;
        /*line-height: 1.6em;*/
        border-radius: 6px;
        background-color: #FFFFFF;

        &:before{
            @include helpers.sprite();
            content: "";
            width: 34px;
            height: 34px;
            margin-right: 16px;
            vertical-align: middle;
        }

        &:after{
            content: "X";
            color: #fff;
            display: block;
            font-family: helpers.$fontRegular;
            font-size: 16px;
            font-weight: bold;
            line-height: 16px;
            opacity: 0.7;
            position: absolute;
            right: 6px;
            text-align: center;
            -webkit-text-stroke: 2px;
            text-stroke: 2px;
            top: 6px;
        }

        &.error{
            /*background: #d9534f;*/
            &:before{
                background-position: -462px -107px;
            }
        }
        &.success{
            /*background: #00D86C;*/
            /*border: solid 1px #00D86C;*/
            &:before{
                background-position: -413px -107px;
            }
        }
    }

    a{
        text-decoration: underline;
        color: #ccc;
    }

}

/*
.box-itens{
    &:after{
        animation-duration: 1.4s;
        animation-iteration-count: infinite;
        animation-name: loadingRotate;
        animation-timing-function: linear;
        background-image: url(../img/loading.png);
        background-position: center;
        background-repeat: no-repeat;
        background-size: contain;
        content:'';
        display: none;
        height: 20px;
        left: 50%;
        margin: -10px;
        position: absolute;
        top: 50%;
        width: 20px;
    }
    &.loading{
        &:after{
            display: block;
        }
    }
}
*/
.box-itens-loading{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255,255,255,0.8);
    display: none;

    img{
        position: absolute;
        top: 50%;
        left: 50%;
        margin: -24px;
        animation-duration: 1.4s;
        animation-iteration-count: infinite;
        animation-name: loadingRotate;
        animation-timing-function: linear;
    }
}
.box-itens{
    &.loading{
        .box-itens-loading{
            display: block;
        }
    }
}

@keyframes loadingRotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}