@import './colors.css';
@import './fonts.css';

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body{
    background-color: var(--color-bg-main);
    max-width: 1400px;
}

.container{
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 20% 80%);
}

/*filters*/
.filters-mobile{
    display: none;
}

.filters ul{
    width: 100%;
    display: flex;
    flex-direction: column;
    padding: 5px;
    list-style: none;
    justify-content: space-around;
}

.filter{
    font-size: 15px;
    font-weight: bold;
    text-align: left;
    border-width: 0px;
    background-color: transparent;
    padding: 5px 0;
}

.filters .subfilter{
    padding: 3px 0;
    width: 100%;
}

#color-grid{
    display: grid;
    grid-template-columns: repeat(6, auto);
    gap: 15px;
    padding-left: 3px;
}

#color-grid li > span{
    display: inline-block;
    width: 22px;
    height: 20px;
    border-radius: 10%;
    border: 1px solid rgba(0, 0, 0, 0.2);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#color-grid li:nth-child(1) > span{
    background-color: red;
}

.subfilter li:nth-child(2) > span{
    background-color: blue;
}

#color-grid li:nth-child(3) > span{
    background-color: green;
}

#color-grid li:nth-child(4) > span{
    background-color: white;
}

#color-grid li:nth-child(5) > span{
    background-color: black;
}

.color-dot:hover{
    transform: scale(1.1);
}

.color-dot.selected{
    outline: 2px solid #fff;
    outline-offset: 3px;
}

#checkbox-grid{
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 3px;
}

.checkbox{
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    gap: 8px;
}

.checkbox input{
    display: none;
}

.checkmark{
    width: 18px;
    height: 18px;
    border: 2px solid #444;
    border-radius: 4px;
    position: relative;
}

.check-text:hover{
    color: #fff;
}

.checkbox input:checked + .checkmark::after{
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #fff;
    border-radius: 2px;
}

/*body*/
.root{
    display: grid;
    grid-template-columns: repeat(3, minmax(260px, auto));
    gap: 1em;
    margin: 10px 10px 10px 0;
}

/*Products cards*/
.product-card{
    width: 100%;
    height: 400px;
    display: flex;
    flex-direction: column;
    border: solid #444;
    background-color: var(--color-bg-card);
}

.product-img-container{
    width: 100%;
    height: 50%; 
}

.product-img-container img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-info{
    padding: 10px 0 0 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-info h3{
    font-size: 23px;
}

.product-price{
    display: flex;
    gap: 1em;
}

.product-price div{
    display: flex;
    flex-direction: column;
    text-align: center;
}

.product-price div > .text{
    font-size: 15px;
}

.product-price div > .price-old{
    text-decoration: line-through;
}

.product-price div > strong{
    font-size: 20px;
}

.product-colors{
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-colors .color-dot{
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

/*Hover efects*/
@media(min-width: 1080px){
    .product-card:hover{
        transform: translateY(-5px);
        box-shadow: rgba(17, 17, 26, 0.1) 0px 4px 16px, rgba(17, 17, 26, 0.1) 0px 8px 24px, rgba(17, 17, 26, 0.1) 0px 16px 56px;
    }
}

/*Responsive*/
@media (max-width: 500px){
    
}