//Marina(06/08/2019)
//Creamos un archivo a parte para la cesta desplegable 
//Lo llamamos desde la cabecera que nos interese

@mixin cestaDesplegable(){
    .shopping_cart_menu {
        display: inline-block;
        margin-left: 5px;
        width: auto;
        float: right;
        position: relative;
        .cesta_desplegableV2{
            height: 50px;
            width: auto;
            min-width: 163px;
            line-height: 49px;
            text-align: center;
            @media(max-width:767px){
                min-width: 50px;
            }
            &:hover{
                background-color: $fondo_cesta_desp_hover;
                .contenedor_totales_cesta{
                    a.btn_comprar_minicest{
                        color:$minicesta_boton_comprar_fuente_hover;
                        background-color: $fondo_cesta_desp_hover;
                    }
                }
            }
            .contenedor_totales_cesta{
                a.btn_comprar_minicest{
                    color:$minicesta_boton_comprar_fuente;
                    height: 100%;
                    width: 100%;
                    display: block;
                    background: $minicesta_boton_comprar_fondo;
                    &:hover{
                        color:$minicesta_boton_comprar_fuente_hover;
                        background-color: $minicesta_boton_comprar_fondo_hover;
                    }
                    span.mdi{
                        font-size: 1.4em;
                        vertical-align: middle;
                    }
                }
            }
            .contenedor_cesta_desplegable {
                height: auto;
                overflow: hidden;
                border-top: $borde_cesta_desp;
                width: 280px;
                text-align: left;
                z-index: 1100;
                max-height: 450px;
                overflow-y: auto;
                scrollbar-width: thin;
                padding-bottom: 110px;

                &::-webkit-scrollbar {
                    width: 6px; 
                    height: 6px;
                }
                &::-webkit-scrollbar-thumb{
                    background: #ccc;
                    border-radius: 2px;
                }
                &::-webkit-scrollbar-thumb:hover {
                    background: #b3b3b3;
                    box-shadow: 0 0 2px 1px rgba(0, 0, 0, 0.2);
                }
                &::-webkit-scrollbar-thumb:active{
                    background-color: #999999;
                }
                &::-webkit-scrollbar-track{
                    background: #e1e1e1;
                    border-radius: 4px;
                }
                &::-webkit-scrollbar-track:hover, &::-webkit-scrollbar-track:active{
                    background: #d4d4d4;
                }
                .contenedor_totales_cesta{
                    position: absolute;
                    bottom: 0;
                    width: 100%;
                    background: $blanco;
                }
                .lineas_cesta_linea_mini_cesta {
                    max-height:  470px;
                    overflow-y:  auto;
                }
                .cart-prices{
                    color: $precio_minicesta;
                }
                .cesta_restaurar{
                    .minicesta_restaurar_estilos{
                        p{
                            text-align: center;
                            padding:10px;
                            margin:0px;
                        }
                        .articulo{
                            font-weight: bold;
                            color: $precio_minicesta;
                        }
                        .enlace_restaurar{
                            text-align: center;
                            background:$gris;
                            .restaurar{
                                float:none;
                                display: block;
                            }
                        }
                    }
                }
                .cart-prices-line, .cesta_restaurar p {
                    overflow: hidden;
                    background: $blanco;
                    line-height: initial;
                }
                .cart-prices-line{
                    padding: 15px;
                    text-align: left;
                    border-bottom: 1px solid #e2dfdf;
                    padding-right: 7px;
                }
                .cart_block_total, .cart_block_shipping_cost, a{
                    float: right;
                }
                .price, a{
                    color: $precio_minicesta;
                    font-size: 16px;
                    font-weight: bold;
                    white-space: nowrap;
                }
                .cart-buttons {
                    overflow: hidden;
                    padding: 15px;
                    margin: 0;
                    a {
                        border: medium none;
                        font-family: $fuente;
                        font-size: 14px;
                        margin-right: 0;
                        text-transform: uppercase;
                        line-height: 1;
                        padding: 7px 15px;
                        background-color: $botones_color;
                        color: $botones_fuente;
                        font-weight: bold;
                        &:hover{
                            background: $botones_color_hover;
                            color:$botones_fuente_hover;
                        }
                    }
                    #button_order_cart {
                        padding-top: 8px;
                        padding-bottom: 5px;
                    }
                    .cesta_vaciar a{
                        float:left;
                    }
                }
                .cesta_vaciar a{
                    float: none;
                    padding-top: 9px;
                    padding-bottom: 8px;
                    margin:0px 3px;
                }
            }
            /*Líneas de la cesta*/
            .linea_cesta{
                .first_item {
                    //background: $blanco none repeat scroll 0 0;
                    font-weight: normal;
                    padding: 10px 6px 6px 6px;
                    position: relative;
                    overflow:hidden;
                    a{
                        //float:none;
                        font-size: 12px;
                        transition: all 0.3s ease-in-out 0s;
                        -webkit-transition: all 0.3s ease-in-out 0s;
                        -moz-transition: all 0.3s ease-in-out 0s;
                        &.cart-images{
                            border: 1px solid $gris;
                            display: flex;
                            justify-content: center;
                            vertical-align: top;
                            margin-right: 15px;   
                            width: 95px;
                            height: 109px;
                            text-align: center;
                            float: left;
                            align-items: center;
                            img{
                                max-width:100%;
                                height: auto;
                            }
                        }
                        img{
                            width:auto !important;
                            @include sombraPortada();
                        }
                    }
                    .cart-info {
                        display: inline-block;
                        max-width: 110px;
                        max-height: 107px;
                        .product-name {
                            padding: 0;
                            display: block;
                            margin-top: -3px;
                            height:30px;
                            a {
                                display: inline-block;
                                color: $titulo_ficha;
                                line-height: 18px;
                                font-weight: normal;
                                float: left;
                                font-size: 14px;
                                max-width: 125px;
                                &:hover{
                                    color:$titulo_ficha_hover;
                                }
                                .quantity-formated {
                                    display:none;
                                }
                                .nombre{
                                    overflow:hidden;
                                    white-space: nowrap;
                                    text-overflow: ellipsis;
                                    display: block;
                                    line-height: 2;
                                }
                            }
                        }
                        .product-atributes {
                            padding-bottom: 3px;
                            font-size: 13px;
                            height: 30px;
                            a {
                                color: $primario;
                                font-size: 12px;
                                max-width: 130px;
                                line-height: 2;
                                float: left;
                                overflow: hidden;
                                display: inline-block;
                                white-space: nowrap;
                                text-overflow: ellipsis;
                            }
                        }
                        .cantidad{
                            display: -webkit-inline-box;
                            width: 85px;
                            .menos, .mas{
                                a{
                                    padding:0px;
                                }
                            }
                            .cantidad_articulos{
                                input{
                                    padding: 0px;
                                    height: 24px;
                                    width: 45px;
                                    text-align: center;
                                }
                            }
                        }
                    }
                    .eliminar{
                        position: absolute;
                        right: 6px;
                        top: -6px;
                        padding: 0px;
                        i{
                            font-size: 20px;
                        }
                        a:hover {
                            i{
                                color:$secundario;
                            }
                        }
                    }
                    .linea_cesta_importe{
                        text-align: right;
                        position: absolute;
                        right: 8px;
                        bottom: 9px;
                    }
                    .remove_link {
                        position: absolute;
                        right: 0px;
                        top: 11px;
                        .linea_cesta_borrar a{
                            color: #bbbbbb;
                            outline: none;
                            text-decoration: none;
                            font-size: 0px;
                            &:before{
                                display: inline-block;
                                content: "\f1c0";
                                font-family: $fuente_iconos;
                                font-size: 18px;
                                line-height: 18px;
                                text-shadow: 1px 1px #f9f9f9;
                            }
                        }
                    }
                    &:hover{
                        background: $grisCesta;
                        .cart-info .cantidad{
                            .menos, .mas{
                                a{
                                    background-color: $grisCesta;
                                }
                            }
                        }
                        a.cart-images{
                            background-color: $blanco;
                        }
                    }
                }
                dd {
                    border-bottom: 1px solid #e2dfdf;
                    -webkit-box-shadow: 0 1px $blanco;
                    -moz-box-shadow: 0 1px $blanco;
                    box-shadow: 0 1px $blanco;
                    margin-bottom: 1px;
                    position: relative;
                }
            }

            /*****************************/
            /***ESTILO LOTES MINICESTA***/
            /****************************/
            .cabecera_lote{
                background-color: $gris;
                border:1px solid $primario;
                position: relative;
                padding: 5px;
                margin-top:5px;
                display: block;
                overflow:hidden;
                .palabra_lote{
                    float:left;
                }
                p{
                    margin: 0;
                    float:left;
                    a{
                        max-width: 226px;
                        white-space: nowrap;
                        overflow:hidden;
                        text-overflow: ellipsis;
                    }
                }
                strong{
                    position: absolute;
                    bottom: 10px;
                    right: 10px;
                }
                .cantidad{
                    display: flex;
                    justify-content: left;
                    width: 50%;
                    .mas,.menos{
                        a{
                            padding:3px;
                        }
                        a.boton{
                            background-color: $gris;
                        }
                    }
                    .cantidad_articulos input{
                        text-align: center;
                    }
                }
                .eliminar_lote{
                    display: inline-block;
                    float: right;
                    padding: 0px;
                    font-size: 21px;
                    position: absolute;
                    top:-1px;
                    right: 5px;
                    i{
                        font-size: 22px;
                    }
                }
            }

            div.first_item.linea_lote{
                background-color: $gris;
                border-bottom: 1px solid $primario;
                margin-bottom: 0px;
                padding:7px;
                margin:0px 5px;
                &:hover{
                    .cart-info .cantidad{
                        .menos, .mas{
                            a.boton{
                                background-color: $grisCesta;
                            }
                        }
                    }
                }
                a{
                    float:none;
                }
                a.cart-images{
                    display:none;
                }

                .cart-info{
                    max-width: 100%;
                    .product-atributes{
                        padding:0px;
                        font-size:12px;
                        height: auto;
                    }
                    .product-name{
                        width: auto;
                        margin-top: 0px;
                        line-height: 2;
                        a{
                            max-width: 230px;
                            font-size:12px;
                            white-space: nowrap;
                            overflow: hidden;
                            text-overflow: ellipsis;
                        }
                    }
                    .cantidad{
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        .mas,.menos{
                            a.boton{
                                background-color: $gris;
                            }
                        }   
                    }
                    .linea_cesta_importe{
                        float: right;
                        margin: auto;
                        position: absolute;
                        right: 10px;
                        bottom: 10px;
                        font-size: 14px;
                        text-align: right;
                        width: auto;
                        display: inline-block;
                    }
                }
                .eliminar{
                    position:absolute;
                    right:-20px;
                    top:-8px;
                }
            }

            .linea_no_lote{
                border-bottom: 1px solid $secundario;
            }
        }
    }
    .sticky-fixed-top{
        .shopping_cart_menu {
            padding: 1px 0px;
            width: auto;
            .cesta_desplegableV2 {
                height: 39px;
                line-height: 39px;
                &:hover{
                    background: rgba(255,255,255,0.3);
                }
            }
        }
    }
    /**************************************/
    /*************MEDIA QUERIES************/
    /**************************************/
    @media(max-width: 991px){
        header{
            .busquedaCesta{
                #sticky_top {
                    &.sticky-fixed-top .shopping_cart_menu{
                        top: 0px;
                        right: 21px;
                        z-index: 1031;
                        position: fixed;
                        .cesta_desplegableV2{
                            line-height: 54px;
                            min-width:50px;
                            span{
                                font-size: 20px;
                                &.ajax_cart_no_product.hidden-xs{
                                    display: none;
                                }
                            }
                        } 
                    }
                }
            }
        }
    }
    @media(max-width: 767px){
        #sticky_top {
            .shopping_cart_menu{
                position:initial;
                top:auto;
                right:auto;
                display: block;
                float:none;
                margin:0;
                padding:0;
                .mdi-cart{
                    font-size: 30px;
                }
            }
            &.sticky-fixed-top .shopping_cart_menu{
                right: 0px;
            }
        }
    }
    @media(max-width: 560px){
        span.ajax_cart_no_product{
            display: none;
        }

        header .busquedaCesta #sticky_top .shopping_cart_menu .cesta_desplegableV2{
            min-width: 60px;
        }
    }
    @media (max-width:450px){
        #sticky_top{
            #search_block_top{
                div#search_block_top_collapse.in{
                    position: absolute;
                    right: 0;
                    width: 100%;
                }
            }
        } 
    }
}