@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto+Flex:opsz,wght@8..144,100..1000&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body{
    font-family: "Roboto Flex", serif;
    background-color: hsl(30, 30%, 95%);
}
.container{
    max-width: 1170px;
    margin: auto;
    padding: 0 15px;
}
.products{
    padding: 100px 0;
}
.products-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 50px 30px;
}
.product{
    position: relative;
}
.product-img-box{
    box-shadow: 0 0 10px hsl(0, 0%, 0%, 0.15);
    overflow: hidden;
}
.product-img{
    max-width: 100%;
    display: block;
    margin: auto;
    transition: transform 0.3s ease;
}

.product:hover .product-img{
   transform: translateX(-10px);
}
.product-title{
    margin: 25px 0 15px;
    font-size: 16px;
    font-weight: 300;
    line-height: 1,3;
    text-transform: capitalize;
}
.product-title a{
    color: hsl(0, 0%, 30%);
    text-decoration: none;
}
.product-price{
    color: hsl(0, 0%, 10%);
    font-weight: 500;
    font-size: 16px;
    line-height: 1;
}
.product-icon-btns{
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
}
.product-icon-btns a{
    height: 40px;
    width: 40px;
    background-color: hsl(0, 0%, 100%);
    box-shadow: 0 0 5px hs(0, 0%, 88%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    border-radius: 50px;
    text-decoration: none;
    color: hsl(0, 0%, 30%);
    transition: all 0.3s ease;
    position: relative;
}
.product:hover .product-icon-btns a:nth-child(2){
    transition-delay: 0.1s;
}
.product:hover .product-icon-btns a:nth-child(2){
    transition-delay: 0.2s;
}
@media(min-width: 992px){
    .product-icon-btns a{
        opacity: 0;
        transform: translate(10px);

    }
    .product:hover .product-icon-btns a{
        opacity: 1;
        transform: translateY(0);
    }
}

.product-tooltip{
    position: absolute;
    top: 50%;
    right: 100%;
    transform: translateY(-50%);
    background-color: hsl(0, 0%, 20%);
    color: hsl(0, 0%, 95%);
    font-size: 12px;
    text-transform: capitalize;
    padding: 4px 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}
.product-tooltip::before{
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent transparent hsl(0, 0%, 20%);
}
@media(min-width: 992px){
    .product-icon-btns a:hover .product-tooltip{
        opacity: 1;
        transform: translate(-10px, -50%);

    }
}
.product-colors{
    list-style: none;
    margin-top: 20px;
}
.product-color{
    height: 15px;
    width: 15px;
    display: inline-block;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 5px hsl(0, 0%, 88%);
    outline: 2px solid transparent;
    outline-offset: 4px;
    margin: 0 10px 0 6px;
    transition: outline-color 0.3s ease;
}
.product-color.active{
    outline-color:  hsl(0, 0%, 30%);

}