/* 
########     ###    ########  ########     ###       ##    ##    ###    ##     ## ########  ######      ###     ######  ####  #######  ##    ## 
##     ##   ## ##   ##     ## ##     ##   ## ##      ###   ##   ## ##   ##     ## ##       ##    ##    ## ##   ##    ##  ##  ##     ## ###   ## 
##     ##  ##   ##  ##     ## ##     ##  ##   ##     ####  ##  ##   ##  ##     ## ##       ##         ##   ##  ##        ##  ##     ## ####  ## 
########  ##     ## ########  ########  ##     ##    ## ## ## ##     ## ##     ## ######   ##   #### ##     ## ##        ##  ##     ## ## ## ## 
##     ## ######### ##   ##   ##   ##   #########    ##  #### #########  ##   ##  ##       ##    ##  ######### ##        ##  ##     ## ##  #### 
##     ## ##     ## ##    ##  ##    ##  ##     ##    ##   ### ##     ##   ## ##   ##       ##    ##  ##     ## ##    ##  ##  ##     ## ##   ### 
########  ##     ## ##     ## ##     ## ##     ##    ##    ## ##     ##    ###    ########  ######   ##     ##  ######  ####  #######  ##    ## */
.bar-buscca {
    width: 40%;
    position: relative;
    transition: all 0.3s ease-in-out;

    & label {
        display: flex;
        align-items: center;
        border-radius: 30px;
        border: solid 1px #999;
        width: 80%;
        box-sizing: border-box;

        & input {
            font-size: 1em;
            background: transparent;
            border: none;
            outline: none;
            border-radius: 30px;
            color: #333;
            &::placeholder {
                color: #9e9e9e;
                font-style: italic;
                transition: color 0.3s ease;
            }
        }
    }

    & i {
        color: #001489;
        font-size: 1em;
        margin-left: auto;
        margin-right: 10px;
        cursor: pointer;
    }

    & .resultados.mostrar {
        display: block;
    }

    & .resultados {
        position: absolute;
        height: 400px;
        top: 100%;
        left: 0%;
        width: 80%;
        border: solid 1px #999;
        background-color: #ffffff;
        box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 5000;
        overflow-y: scroll;
        display: none;
    }

    & span{
        text-align: left;
    }

    & .resultadoarticulo {
        display: flex;
        justify-content: space-between;
        height: 80px;
        width: 100%;
        align-items: center;
        padding: 10px;
        border-bottom: 1px solid #ddd;
    }

    & .resultadoprecio{
        color: #001489;
        font-weight: bold;
        font-size: .8em;
    }

    & .resultadoarticulo:hover {
        background-color: #e0dede;
        cursor: pointer;
    }

    & .resultadodescripcion{
        max-width: 70%;
    }
    
    & .resultadoarticulo:last-child {
        border-bottom: none;
    }

    & img {
        width: 65px;
        height: 65px;
    }
}

.bar-buscca .resultados::-webkit-scrollbar {
    width: 8px; 
}

.bar-buscca .resultados::-webkit-scrollbar-track {
    background: #d4d4d4; 
}

.bar-buscca .resultados::-webkit-scrollbar-thumb {
    background: #001489; 
    border-radius: 10px; 
}

#texto_busqueda,
#texto_busquedamovil {
    width: 80%;
    padding: 10px;
    transition: all 0.3s ease-in-out;
}

#texto_busqueda::placeholder {
    opacity: 0.8;
    transition: opacity 0.3s;
}

.logo img {
    height: 60px;
}

/*
 ######     ###    ########  ########  #### ########  #######     ##    ##     ######  ########  ######  ####  #######  ##    ## 
##    ##   ## ##   ##     ## ##     ##  ##     ##    ##     ##     ##  ##     ##    ## ##       ##    ##  ##  ##     ## ###   ## 
##        ##   ##  ##     ## ##     ##  ##     ##    ##     ##      ####      ##       ##       ##        ##  ##     ## ####  ## 
##       ##     ## ########  ########   ##     ##    ##     ##       ##        ######  ######    ######   ##  ##     ## ## ## ## 
##       ######### ##   ##   ##   ##    ##     ##    ##     ##       ##             ## ##             ##  ##  ##     ## ##  #### 
##    ## ##     ## ##    ##  ##    ##   ##     ##    ##     ##       ##       ##    ## ##       ##    ##  ##  ##     ## ##   ### 
 ######  ##     ## ##     ## ##     ## ####    ##     #######        ##        ######  ########  ######  ####  #######  ##    ## */
.botones-navegacion {
    display: flex;
    align-items: center;
    gap: 30px;
    & i {
        font-size: 1.6em;
        color: #9e9e9e;
    }
}

#boton-carrito,
#boton-carrito-movil {
    background: none;
    border: none;
    position: relative;
}

.carrito {
    position: relative;
}

.contador-carrito {
    background-color: #001489;
    color: white;
    font-size: 0.8rem;
    border-radius: 50%;
    padding: 3px 6px;
    position: absolute;
    top: -10px;
    right: -10px;
}

.menu-desplegable.mostrar {
    display: block;
}

.barra-navegacion,
.barra-navegacion-movil {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    min-height: 80px;
    font-family: 'Raleway', sans-serif;
    background-color: #ffffff;
    justify-content: center;
    align-items: center;
}

.barra-navegacion-movil {
    display: none;
}

.contenedor-izquierda {
    display: flex;
    align-items: center;
}

.sesion {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sesion a {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sesion .fa-user {
    font-size: 1.3em;
    color: #9e9e9e;
}

.sesion-activa .fa-user {
    color: #001489; 
}

.sesion .nombre-usuario {
    margin-top: 3px;
    font-size: .7em;
    color: #001489;
    text-align: center;
}

.sesion .nombre-usuario-moviles {
    margin-top: 1.5px;
    font-size: .4em;
    color: #ffffff;
    text-align: center;
}

/*
########     ###    ########  ########     ###        ######  ##     ## ########  ######## ########  ####  #######  ########  
##     ##   ## ##   ##     ## ##     ##   ## ##      ##    ## ##     ## ##     ## ##       ##     ##  ##  ##     ## ##     ## 
##     ##  ##   ##  ##     ## ##     ##  ##   ##     ##       ##     ## ##     ## ##       ##     ##  ##  ##     ## ##     ## 
########  ##     ## ########  ########  ##     ##     ######  ##     ## ########  ######   ########   ##  ##     ## ########  
##     ## ######### ##   ##   ##   ##   #########          ## ##     ## ##        ##       ##   ##    ##  ##     ## ##   ##   
##     ## ##     ## ##    ##  ##    ##  ##     ##    ##    ## ##     ## ##        ##       ##    ##   ##  ##     ## ##    ##  
########  ##     ## ##     ## ##     ## ##     ##     ######   #######  ##        ######## ##     ## ####  #######  ##     ## */
.barra-superior {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.sucursales {
    display: flex;
    margin-left: 2em;
    gap: 15px;
    font-weight: 400;
    align-items: center;

    & a {
        color: #686868;
        font-size: 1em;
        text-decoration: none;
        display: flex;
        align-items: center;
        font-weight: 520;
    }

    & span {
        margin-left: 10px;
    }

    & img {
        width: auto;
        height: 50px;
    }
}

.sucursales a:hover {
    color: #001489;
}

/*
########     ###    ########  ########     ###       #### ##    ## ######## ######## ########  ####  #######  ########  
##     ##   ## ##   ##     ## ##     ##   ## ##       ##  ###   ## ##       ##       ##     ##  ##  ##     ## ##     ## 
##     ##  ##   ##  ##     ## ##     ##  ##   ##      ##  ####  ## ##       ##       ##     ##  ##  ##     ## ##     ## 
########  ##     ## ########  ########  ##     ##     ##  ## ## ## ######   ######   ########   ##  ##     ## ########  
##     ## ######### ##   ##   ##   ##   #########     ##  ##  #### ##       ##       ##   ##    ##  ##     ## ##   ##   
##     ## ##     ## ##    ##  ##    ##  ##     ##     ##  ##   ### ##       ##       ##    ##   ##  ##     ## ##    ##  
########  ##     ## ##     ## ##     ## ##     ##    #### ##    ## ##       ######## ##     ## ####  #######  ##     ## */
.barra-inferior {
    background-color: #001489;
    border-top: 1px solid #e0e0e0;
}

.menu-principal {
    display: flex;
    justify-content: center;
    gap: 2em;
    list-style: none;
}

.menu-principal li {
    position: relative;
    padding: 8px 0;
}

.menu-principal a {
    text-decoration: none;
    font-size: 1em;
    color: #ffffff;
    font-weight: 500;
    width: fit-content;
}

.menu-principal a:hover {
    color: #e0e0e0;
}

/*
##     ## ######## ##    ## ##     ##    ########  ########  ######  ########  ##       ########  ######      ###    ########  ##       ######## 
###   ### ##       ###   ## ##     ##    ##     ## ##       ##    ## ##     ## ##       ##       ##    ##    ## ##   ##     ## ##       ##       
#### #### ##       ####  ## ##     ##    ##     ## ##       ##       ##     ## ##       ##       ##         ##   ##  ##     ## ##       ##       
## ### ## ######   ## ## ## ##     ##    ##     ## ######    ######  ########  ##       ######   ##   #### ##     ## ########  ##       ######   
##     ## ##       ##  #### ##     ##    ##     ## ##             ## ##        ##       ##       ##    ##  ######### ##     ## ##       ##       
##     ## ##       ##   ### ##     ##    ##     ## ##       ##    ## ##        ##       ##       ##    ##  ##     ## ##     ## ##       ##       
##     ## ######## ##    ##  #######     ########  ########  ######  ##        ######## ########  ######   ##     ## ########  ######## ######## */
.menu-desplegable .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 270px;
    width: fit-content;
    background-color: #ffffff;
    box-shadow: 2px 2px 5px rgba(36, 36, 36, 0.1);
    list-style: none;
    z-index: 10;

    & a,
    i {
        color: #686868;
        font-size: .8em;
        font-weight: 600;
    }
}

.menu-desplegable:hover .submenu {
    display: block;
}

.submenu .linea {
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 0;

    & i {
        margin-left: .5em;
    }
}

.linea:hover {
    i {
        color: #001489;
    }

    a {
        color: #001489;
    }
}

/*
 ######  ##     ## ########  ##     ## ######## ##    ## ##     ##     ######  ########  ######  ##     ## ##    ## ########     ###    ########  ####  #######  
##    ## ##     ## ##     ## ###   ### ##       ###   ## ##     ##    ##    ## ##       ##    ## ##     ## ###   ## ##     ##   ## ##   ##     ##  ##  ##     ## 
##       ##     ## ##     ## #### #### ##       ####  ## ##     ##    ##       ##       ##       ##     ## ####  ## ##     ##  ##   ##  ##     ##  ##  ##     ## 
 ######  ##     ## ########  ## ### ## ######   ## ## ## ##     ##     ######  ######   ##       ##     ## ## ## ## ##     ## ##     ## ########   ##  ##     ## 
      ## ##     ## ##     ## ##     ## ##       ##  #### ##     ##          ## ##       ##       ##     ## ##  #### ##     ## ######### ##   ##    ##  ##     ## 
##    ## ##     ## ##     ## ##     ## ##       ##   ### ##     ##    ##    ## ##       ##    ## ##     ## ##   ### ##     ## ##     ## ##    ##   ##  ##     ## 
 ######   #######  ########  ##     ## ######## ##    ##  #######      ######  ########  ######   #######  ##    ## ########  ##     ## ##     ## ####  #######  */
.submenu-secundario {
    position: absolute;
    top: 0;
    left: 100%;
    width: 200px;
    height: fit-content;
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 10px;
    z-index: 20;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.submenu .linea:hover .submenu-secundario {
    display: block;
    opacity: 1;
    visibility: visible;
}

.submenu-secundario li {
    padding: 8px 10px;
}

.submenu-secundario a {
    text-decoration: none;
    color: #686868;
    font-size: 0.9em;
    font-weight: 600;
}

.submenu-secundario a:hover {
    color: #001489;
}

/*
######## ##       ########  ######  ##     ##    ###     ######  
##       ##       ##       ##    ## ##     ##   ## ##   ##    ## 
##       ##       ##       ##       ##     ##  ##   ##  ##       
######   ##       ######   ##       ######### ##     ##  ######  
##       ##       ##       ##       ##     ## #########       ## 
##       ##       ##       ##    ## ##     ## ##     ## ##    ## 
##       ######## ########  ######  ##     ## ##     ##  ######  */
.flecha,
.flecha-lateral {
    margin-left: 5px;
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.menu-desplegable:hover>a .flecha {
    transform: rotate(180deg);
}

.submenu li:hover>a .flecha-lateral {
    opacity: 0;
}

/*
 ######  ######## ##       ##     ## ##          ###    ########  
##    ## ##       ##       ##     ## ##         ## ##   ##     ## 
##       ##       ##       ##     ## ##        ##   ##  ##     ## 
##       ######   ##       ##     ## ##       ##     ## ########  
##       ##       ##       ##     ## ##       ######### ##   ##   
##    ## ##       ##       ##     ## ##       ##     ## ##    ##  
 ######  ######## ########  #######  ######## ##     ## ##     ## */
#menu-hamburguesa {
    font-size: 1.5em;
    color: #ffffff;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 20px;
}

.barra-inferior-movil {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #001489;
    border-top: 1px solid #ccc;
}

#boton-favoritos-movil i,
#boton-sesion-movil i,
#boton-carrito-movil i {
    color: #ffffff;
}

#menu-desplegable-movil {
    flex-direction: column;
    background-color: #fff;
    padding: 10px;
    border-top: 1px solid #ccc;
    position: absolute;
    width: 100%;
    height: 100vh;
    z-index: 1000;
    transition: top 0.3s ease-in-out;
}

#menu-desplegable-movil ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#menu-desplegable-movil ul li {
    display: block;
    padding: 10px 0;
    text-align: start;
    border-bottom: 1px solid #e0e0e0;
}

#menu-desplegable-movil ul li a {
    color: #001489;
    text-decoration: none;
    font-weight: bold;
}

#menu-desplegable-movil.oculto {
    display: none;
}

/*
##       ####  ######  ########    ###          ###    ########  ########    ####  ######   #######  ##    ##  #######      ######     ###    ########  ########  #### ########  #######  
##        ##  ##    ##    ##      ## ##        ## ##   ##     ##    ##        ##  ##    ## ##     ## ###   ## ##     ##    ##    ##   ## ##   ##     ## ##     ##  ##     ##    ##     ## 
##        ##  ##          ##     ##   ##      ##   ##  ##     ##    ##        ##  ##       ##     ## ####  ## ##     ##    ##        ##   ##  ##     ## ##     ##  ##     ##    ##     ## 
##        ##   ######     ##    ##     ##    ##     ## ########     ##        ##  ##       ##     ## ## ## ## ##     ##    ##       ##     ## ########  ########   ##     ##    ##     ## 
##        ##        ##    ##    #########    ######### ##   ##      ##        ##  ##       ##     ## ##  #### ##     ##    ##       ######### ##   ##   ##   ##    ##     ##    ##     ## 
##        ##  ##    ##    ##    ##     ##    ##     ## ##    ##     ##        ##  ##    ## ##     ## ##   ### ##     ##    ##    ## ##     ## ##    ##  ##    ##   ##     ##    ##     ## 
######## ####  ######     ##    ##     ##    ##     ## ##     ##    ##       ####  ######   #######  ##    ##  #######      ######  ##     ## ##     ## ##     ## ####    ##     #######  
*/
.carrito-desplegable {
    display: none;
    position: absolute;
    background-color: #dddddd;
    border: 2px solid #fdfdfd;
    padding: 1px;
    width: 500px;
    max-height: 600px;
    overflow-y: auto;
    z-index: 1000;
    top: 19px;
    left: -15px;
    transform: translateX(-80%);
    overflow-y: auto; 
    flex-direction: column;   
}

.carrito-desplegable.activo {
    display: block !important;
}

.carrito:hover .carrito-desplegable {
    display: block;
}

.carrito-item {
    align-items: center;
    justify-content: space-between;
    padding: 5px 5px;
    margin-bottom: 5px;
    border-radius: 10px;
    background-color: #fff; 
    flex-grow: 1;
    overflow-y: auto; 
}

.parte-arriba{
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.parte-abajo{
    width: 80%;
    margin: auto;
    display: flex;
    justify-content: space-between;
    position: relative; 
    padding-bottom: 10px;

    & .precios{
        display: flex;
        flex-direction: column;
        text-align: right;
        & .textoazul{
            color: #001489;
            font-weight: bold;
        }
    }
}

.seleccion-cantidad {
    display: flex;
    align-items: center;
    gap: 5px;
}

#cantidad-seleccionada {
    width: 35px;
    height: 35px;
    text-align: center;
    font-size: 15px;
    border: 1px solid #d4d4d4;
    border-radius: 5px;
}

#cantidad-seleccionada::-webkit-inner-spin-button,
#cantidad-seleccionada::-webkit-outer-spin-button {
    display: none;
}

.btn-cantidad {
    color: #001489;
    font-size: 20px;
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s;
}

.btn-cantidad:hover {
    background-color: #d4d4d4;
}

.img-carrito {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-right: 18px;
}

.separacion{
    height: 10px;
    background-color: #001489;
}

.carrito-item.encabezado {
    font-weight: bold;
    background-color: #001489;
    border-bottom: 2px solid #ffffff;
    padding: 10px 10px;
    padding-right: 0px;
    color: #fff;
    position: sticky;
    top: 0; 
    z-index: 1; 
}

.carrito-item.encabezado span {
    text-align: left; 
}

.botones-container {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    border-top: 2px solid #dee2e6;
}

.boton-comprar {
    background-color: #001489;
    color: white;
    border: none;
    padding: 7px;
    width: 100%;
    text-align: center;
    letter-spacing: 2px;
    font-size: 15px;
    border: 2px solid #dee2e6;
}

.boton-comprar:hover {
    background-color: #ffffff;
    color: #001489;
}

.boton-vaciar {
    background-color: #ffffff;
    color: #001489;
    border: none;
    padding: 7px;
    width: 100%;
    text-align: center;
    letter-spacing: 2px;
    font-size: 15px;
    border: 2px solid #dee2e6;
}

.boton-vaciar:hover {
    background-color: #001489;
    color: #ffffff;
}

.contador-carrito{
    color: #ffffff;
    background-color: #001489;
    transition: all 0.3s ease-in-out;
}

.btn-eliminar {
    padding: 0;
    font-size: 20px;
    border-radius: 40%;
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: white;
    cursor: pointer;
    border: none;
    margin-left: -38px; 
    margin-top: 10px ;
}

.btn-eliminar i {
    color: #7171718b;
    font-size: 20px; 
}

.btn-eliminar i:hover {
    color: #da0b0bc4;
    font-size: 20px; 
}

/*
########  ########  ######  ########   #######  ##    ##  ######  #### ##     ##  #######  
##     ## ##       ##    ## ##     ## ##     ## ###   ## ##    ##  ##  ##     ## ##     ## 
##     ## ##       ##       ##     ## ##     ## ####  ## ##        ##  ##     ## ##     ## 
########  ######    ######  ########  ##     ## ## ## ##  ######   ##  ##     ## ##     ## 
##   ##   ##             ## ##        ##     ## ##  ####       ##  ##   ##   ##  ##     ## 
##    ##  ##       ##    ## ##        ##     ## ##   ### ##    ##  ##    ## ##   ##     ## 
##     ## ########  ######  ##         #######  ##    ##  ######  ####    ###     #######  */

@media (max-width: 768px) {
    .logo img {
        height: 50px;
    }

    .sucursales img {
        height: 40px;
    }

    .barra-navegacion-movil {
        display: block;
    }

    .barra-navegacion {
        display: none;
    }

}

@media (max-width: 768px) {
    .carrito .carrito-desplegable {
        display: none !important;
    }
}
