/* Filters panel */

#filters {
    display: flex;
    gap: 20px;
    align-items: center;
    margin: 1rem 0;
    width: 85%;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-gutter: stable;
}

.filter {
    text-align: center;
    opacity: 0.7;
    cursor: pointer;
}

.filter p {
    font-size: 16px;
}

.filter:hover {
    opacity: 1;
}

#tax-switch{
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

#switch{
    height: 20px;
    width: 40px;
    border-radius: 3rem;
    border: 1px solid gray;
    display: flex;
    align-items: center;
    padding: 0 2px;
    cursor: pointer;
}

#switch #circle {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid gray;
}

#switch.active-switch{
   background-color: black;
}

#circle.active{
    transform: translateX(20px);
    background-color: white;
}

.tax-info {
    display: none;
}

.tax-info.active{
    display: inline;
}

/* ALL LISTINGS CARDS */


#cards-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.card {
    width: 23%;
    margin-bottom: 2rem;
    border: 2px solid lightgrey;
    border-radius: 10px;
    padding: 5px;
} 

.card-img img {
    width: 100%;
    height: 250px;
    border-radius: 15px;
    margin-bottom: 1px;
}

.card-title {
    font-size: 18px;
}



/* Media Queries */
@media screen  and (max-width:1150px){
    .card {
        width: 32%;
    }
}

@media screen  and (max-width:800px){
    .card {
        width: 48%;
    }
    h1 {
        font-size: 27px;
    }
    .filter p {
        font-size: 0.8rem;
    }
}


@media screen  and (max-width:700px){
   #tax-switch {
    flex-direction: column;
    gap: 1px;
    font-size: 0.9rem;
    margin-top: 1rem;
   }
   .filter p {
    font-size: 0.7rem;
   }

}

@media screen  and (max-width:575px){
    .card-img img {
        height: 200px;
    }
}


@media screen  and (max-width:470px){
    h1 {
        font-size: 25px;
    }
    .card {
        width: 47%;
    }
    .card-img img {
        height: 180px;
    }
}

@media screen  and (max-width:500px){
    h3 {
        text-align: center;
    }
    .card {
        width: 90%;
    }
    #cards-container {
        justify-content: center;
    }
    .card-img img {
        height: 250px;
    }
}

@media screen  and (max-width:380px){
    .card-img img {
        height: 200px;
    }
}

