
/*
########     ###    ########  ########     ###       ########  #######  ########  
##     ##   ## ##   ##     ## ##     ##   ## ##         ##    ##     ## ##     ## 
##     ##  ##   ##  ##     ## ##     ##  ##   ##        ##    ##     ## ##     ## 
########  ##     ## ########  ########  ##     ##       ##    ##     ## ########  
##     ## ######### ##   ##   ##   ##   #########       ##    ##     ## ##        
##     ## ##     ## ##    ##  ##    ##  ##     ##       ##    ##     ## ##        
########  ##     ## ##     ## ##     ## ##     ##       ##     #######  ##        */
.barra-superior-filtros {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    margin: 1.5em auto;
    width: 90%;
    gap: 1.5em;
    background-color: #f8f8f8;
    border-radius: .5em;

    & .izquierda {
        display: flex;
        gap: 2em;
    }

    & i {
        color: #001489;
    }
}

#toggleFiltros,
#botonOrdenar {
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.ordenar-por {
    position: relative;
}

.opciones {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #ffffff;
    border: 1px solid #ccc;
    list-style: none;
    padding: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.opciones ul {
    margin: 0;
    padding: 0;
}

.opciones li {
    padding: 10px;
    cursor: pointer;
}

.opciones li:hover {
    background-color: #f0f0f0;
}

.opciones.mostrar {
    display: block;
    opacity: 1;
    z-index: 10;
    visibility: visible;
}

#panelFiltros {
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

#panelFiltros.ocultar {
    display: none;
}

.contenedor-principal.overlay {
    position: relative;
}

/*
######## #### ##       ######## ########   #######  
##        ##  ##          ##    ##     ## ##     ## 
##        ##  ##          ##    ##     ## ##     ## 
######    ##  ##          ##    ########  ##     ## 
##        ##  ##          ##    ##   ##   ##     ## 
##        ##  ##          ##    ##    ##  ##     ## 
##       #### ########    ##    ##     ##  #######  */

.barra-filtros {
    width: 15%;
    height: auto;
    padding: 20px;
    border-radius: 8px;

    & label {
        font-size: 1em;
        margin-bottom: 10px;
        color: #727272;
        letter-spacing: 1px;
    }
}

.filtro-apartado {
    margin-bottom: 20px;
    border-top: solid 2px #d4d4d4;
}

.titulo-filtro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.2em;
    color: #001489;
}

.boton-desplegar {
    background: none;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    color: #001489;
    font-weight: 700;
}

.cantidadfiltro {
    margin-left: auto;
    text-align: right;
    font-size: .9em;
    color: #bbbbbb;
}

.filtro-apartado {
    margin-bottom: 10px;
}

.opcion-sublinea,
.opcion-precio,
.opcion-marca {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    cursor: pointer;
    gap: .5em;
}

#colorLista {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.opcion-color {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.circulo {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/*
######## #### ##       ######## ########   #######   ######      ######  ######## ##       ########  ######   ######  ####  #######  ##    ##    ###    ########   #######   ######  
##        ##  ##          ##    ##     ## ##     ## ##    ##    ##    ## ##       ##       ##       ##    ## ##    ##  ##  ##     ## ###   ##   ## ##   ##     ## ##     ## ##    ## 
##        ##  ##          ##    ##     ## ##     ## ##          ##       ##       ##       ##       ##       ##        ##  ##     ## ####  ##  ##   ##  ##     ## ##     ## ##       
######    ##  ##          ##    ########  ##     ##  ######      ######  ######   ##       ######   ##       ##        ##  ##     ## ## ## ## ##     ## ##     ## ##     ##  ######  
##        ##  ##          ##    ##   ##   ##     ##       ##          ## ##       ##       ##       ##       ##        ##  ##     ## ##  #### ######### ##     ## ##     ##       ## 
##        ##  ##          ##    ##    ##  ##     ## ##    ##    ##    ## ##       ##       ##       ##    ## ##    ##  ##  ##     ## ##   ### ##     ## ##     ## ##     ## ##    ## 
##       #### ########    ##    ##     ##  #######   ######      ######  ######## ######## ########  ######   ######  ####  #######  ##    ## ##     ## ########   #######   ######  */
.filtros-seleccionados {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    width: 100%;
    flex-wrap: wrap;
}

.filtro-seleccionado {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: solid thin #c8c8c8;
    border-radius: 1em;
    padding: 5px 10px;
    display: flex;
    align-items: center;
}

.filtro-seleccionado span {
    margin-right: 8px;
}

.eliminar-filtro {
    cursor: pointer;
    color: #888;
    font-weight: bold;
    margin-left: 5px;
}

.circulo.seleccionado::before {
    content: "✓";
}

/*
########  ########  ######  ########   #######  ##    ##  ######  #### ##     ##  #######  
##     ## ##       ##    ## ##     ## ##     ## ###   ## ##    ##  ##  ##     ## ##     ## 
##     ## ##       ##       ##     ## ##     ## ####  ## ##        ##  ##     ## ##     ## 
########  ######    ######  ########  ##     ## ## ## ##  ######   ##  ##     ## ##     ## 
##   ##   ##             ## ##        ##     ## ##  ####       ##  ##   ##   ##  ##     ## 
##    ##  ##       ##    ## ##        ##     ## ##   ### ##    ##  ##    ## ##   ##     ## 
##     ## ########  ######  ##         #######  ##    ##  ######  ####    ###     #######  */
@media (max-width: 768px) {
    .barra-superior-filtros {
        width: 90%;
    }

    #panelFiltros {
        margin-top: 100px;
        position: fixed;
        top: 0;
        left: 0;
        width: 80vw;
        height: 100vh;
        background-color: #ffffff;
        box-shadow: -5px 0px 15px rgba(0, 0, 0, 0.3);
        z-index: 10;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-y: scroll;
    }

    #panelFiltros:not(.ocultar) {
        transform: translateX(0);
    }
}

