:root{
    --box-color: #c7c7c7;
    --button-color: #01a295;
    --background-color: #e7e7e7;
    --box2-color: #E9ECEF;
    --list-background: #343A40;
    --header-footer: #212529;
    --topic-stuff: #FFFFFF;
    --white-text: #FFFFFF;
    --black-text: #212529;
}

body{
    background-color:var(--background-color);
    height: 100dvh;
}

body::-webkit-scrollbar{
    width: 0;
}

*{
    padding: 0;
    margin: 0;
    font-family: 'SF Pro Text', -apple-system, BlinkMacSystemFont;
}

.container{
    transition: transform .5s ease-out;
}

/* -----------------------Header----------------------- */

header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    background-color: var(--header-footer);

    position: fixed;
    width: 98%;
    height: 70px;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid black;
    color: var(--white-text);
}

.logo{
    display: flex;
    align-items: center;
}

.icon-cart{
    cursor: pointer;
    transition: all .2s ease-out;
}

.icon-cart:hover{
    stroke-width: 0.5;
    transform: scale(1.1);
}

h1{
    font-weight:400;

}

/* -----------------------section----------------------- */
section{
    height: auto;;
}

.home-img{
    width: 98%;
    margin-left: 1%;
    
    margin-bottom: 8rem;
}

.home-img2{
    display: none;
}

.sec-anim{
    border: 1px solid black;

    position: relative;
    top: 80px;

    animation: popUp 0.5s ease-in 1s forwards;

    transform: translate(5px, 10px);
}

@keyframes popUp{
    from{
        transform: translate(5px, 10px);
        box-shadow: 0px 0px;
    }
    to{
        box-shadow: 7px 14px;
        transform: translate(0px, 0px);
    }
}


/* -----------------------Advertisement----------------------- */
.advertisement{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 50px;;
    
}

.advertisement div h2{
    font-size: 65px;
    font-weight: 500;
}
.advertisement div p{
    font-size: 40px;
    margin: 15px 0;
}
.advertisement div button{
    height: 50px;
    width: 150px;
    font-size: 20px;
}

.advertisement div button:hover{
    transform: scale(1.05);
    box-shadow: 3px 6px black;
}

.adv-data{
    width: 50%;
}

.adv-div{
    width: 50%;
}

.advertisement div img{
    width: 100%;
}

/* -----------------------Heading----------------------- */
.headin{
    width: 100%;
    height: 70px;

    display: flex;
    align-items: center;
    justify-content: center;

    background-color: var(--topic-stuff);
}

.headin > h1{
    font-size: 2.5rem;
    color: var(--black-color);
}


/* -----------------------main----------------------- */

h2{
    font-weight: 300;
}

main{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); 

    height: auto;
    min-height: 100dvh;
    padding: 0 2%;
    place-items: center;

    margin-bottom: 30px;
    gap: 0px;
}

.item-img{
    width: 13rem;
    border-radius: 10px;
    border: 1px solid black;
    
}

.item{
    width: 13rem;
    height: 20rem;
    border: 1px solid black;
    border-radius: 15px;
    background-color: var(--box-color);

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;

    margin: 10px;
    padding: 10px;
    box-shadow: 5px 10px; /* Softer shadow */
    transition: all 0.2s ease-in-out;
}

.item:hover{
    box-shadow: 0 0;
    transform: translate(5px, 10px)
}

.addToCart{
    height: 30px;
    width: 6rem;
    border: 1px solid black;
    cursor: pointer;

    background-color: var(--button-color);
    border-radius: 5px;
    color: var(--white-text);

    transition: all 0.2s ease-in-out;

}

.item:hover button {
    transform: translate(-5px, -10px);
    box-shadow: 2px 4px rgba(0, 0, 0, 1);
}

/* -----------------------Cart Tab----------------------- */

.cartTab{
    color: var(--black-text);
    background-color: var(--list-background);
    border-left: 2px solid black;

    width: 27rem;
    height: 100dvh;
    position: fixed;
    z-index: 30;
    padding: 0 15px;

    inset: 0 -29rem 0 auto;
    display: grid;
    grid-template-rows: 50px 1fr 20px 70px;

    transition: .4s ease-in-out;
    /* display: none; */
}

.shop-tab{
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--white-text);
}

.shop-tab button{
    background-color: rgb(1, 98, 90);
    color: var(--white-text);
    height: 30px;
    width: 50px;
    font-size: 25px;
    border: 1px solid black;

    transition: all .3s ease-in-out;
}

.shop-tab:hover button {
    transform: translate(3px, 6px);
    box-shadow: -3px -6px rgba(0, 0, 0, 1);
}


body.showCart .cartTab{
    inset: 0 0 0 auto;
}

.body.showCart .container{
    transform: translateX(-250px)
}

.cartTab .listCart,h1{
    margin: 5px 0px;
}

.cartBtn{
    display: grid;
    grid-template-columns: repeat(2,1fr);
    margin: 3px 0px;
    gap: 2px;
}

.cartBtn button{
    background-color: var(--box-color);
    border: none;
    cursor: pointer;

    border: 1px solid black;
    font-size: 20px;
}

.hover-btn{
    transition: all .2s ease-in-out;
}

.hover-btn:hover {
    transform: translate(-3px, -6px);
    box-shadow: 3px 6px rgba(0, 0, 0, 1);
}


/* -----------------------Cart items----------------------- */

.cartTab .listCart .items img{
    width: 100%;

    position: relative;
    top: 1.5px;
    left: 1.5px;
}


.cartTab .listCart .items{
    display: grid;
    grid-template-columns: 70px 150px 50px 1fr;
    gap: 10px;
    text-align: center;
    align-items: center;

    background-color: var(--box2-color);
    border: 1px solid black;

}

.listCart .items:nth-child(even){
    background-color: var(--box-color);
}


.listCart{
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.listCart::-webkit-scrollbar{
    width: 0;
}

.listCart .quantity span{
    display: inline-block;
    width: 25px;
    height: 25px;
    background-color: var(--list-background);
    color: var(--white-text);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.15rem;
}

.listCart .quantity span:nth-child(2){
    background-color: transparent;
    color:black;
}

#totalAmount{
    color: var(--white-text);
}

/* -----------------------Footer----------------------- */

footer{
    height: 20rem;
    background-color: var(--header-footer);
    border-top: 1px solid black;
    color: var(--white-text);
}

.upper-footer{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 3rem;

    height: 70%;
}

.lower-footer{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 3rem;

    height: 30%;
}

.database{
    display: flex;
    flex-direction: column;
    gap: 10px;
}


/* -----------------------Media Queries----------------------- */


@media (max-width: 500px) {

    main{
        grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); 
        gap: 20px;
    }

    h1{
        font-size: 23px;
    }

    h2,button{
        font-size: 15px;
    }

    .item:active{
        box-shadow: 0 0;
        transform: translate(5px, 10px)
    }

    .item:active button {
        transform: translate(-5px, -10px);
        box-shadow: 2px 4px rgba(0, 0, 0, 1);
    }

    .home-img{
        display: none;
    }
    .home-img2{
        display: block;
        width: 90%;
        margin-left: 4%;

    }

    section{
        margin-bottom: 15dvh;
    }

    .cartTab{
        width: 92%;
        inset: 0 100% 0 auto;
    }
    .cartTab .listCart .items{
        grid-template-columns: 80px 1fr 1fr 1fr;
    }
    .item-img{
        width: 100%;
    }

    .item{
        width: 8rem;
        height: 13.5rem;
    }

    .quantity{
        width: 100px;
    }

    .quantity span{
        font-size: 1px;
        width: 10px;
        height: 10px;
    }
    .plus{
        height: 2px;
        width: 2px;
    }

    .advertisement{
        flex-direction:column-reverse;
        width: 70%;
    }

    .adv-data{
        width: 100%;
    }
    
    .adv-div{
        width: 100%;
    }
    

    .advertisement div h2{
        font-size: 35px;
        font-weight: 400;
    }
    .advertisement div p{
        font-size: 25px;
        margin: 15px 0;
    }
    .advertisement div button{
        height: 30px;
        width: 80px;
        font-size: 10px;
    }

    .headin{
        margin: 30px 0;
        height: 40px;
    }
    .headin > h1{
        font-size: 1.5rem;

        color: var(--black-text);
    }

    footer{
        height:5rem;
        font-size: 10px;
    }

    .upper-footer{
        display: none;
    }
    hr{
        display: none;
    }

    .lower-footer{
        height: 100%;
        padding: 0 10px;

        flex-direction: row-reverse;
    }

    .logo h1{
        font-size: 20px;
    }
}

