@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

html{
    scroll-behavior: smooth;
}

/* scrollbar design starts */
body::-webkit-scrollbar{
    width: .8em;
}

body::-webkit-scrollbar-track{
    -webkit-box-shadow: inset 0 0 6px rgba(107, 96, 96, 0.08)
}

body::-webkit-scrollbar-thumb{
    background-color: var(--clr-neutral-900);
    border-radius: 0 0 10px 10px;
}
/* scrollbar design ends */


:root{
    --clr-neutral-900: hsl(207,19%,9%);
    --clr-neutral-100: hsl(0,0%,100%);
    --clr-accent-400: hsl(142, 90%, 61%);
}

*{
    padding: 0;
    margin: 0;
}

*::before,*::after{
    box-sizing: border-box;
}


body{
    line-height: 1.6;
    font-family: sans-serif;
    transition: all 0.3s ease;
}

/* mega navigation menu style starts */

nav{
    background: var(--clr-neutral-900);
    position: fixed;
    width: 100%;
    z-index: 999;
    padding: 0;
    margin: 0;
    font-family: "Poppins", sans-serif;
    height: 45px;
    line-height: 45px;
}

nav .wrapper{
    position: relative;
    max-width: 1250px;
    padding: 0 30px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wrapper .logo a{
    color: #fff;
    text-decoration: none;
    font-size: 22px;
    font-weight: 600;
}

.wrapper .nav-links{
    display: inline-flex;
}

.wrapper .btn{
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: none;
}
.wrapper .btn.cancel-btn{
    position: absolute;
    right: 30px;
    top: 10px;
}

ul{
    list-style-type: none;
}

.nav-links li:hover .mega-box{
    opacity: 1;
    visibility: visible;
    transition: all .3s ease;
}

.nav-links li a{
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 5px 15px;
    border-radius: 5px;
}

.nav-links li a:hover{
    background-color: rgb(34, 41, 48);
}

.nav-links li a i{
    padding-left: 5px;
}

.mega-box{
    position: absolute;
    top: 45px;
    width: 100%;
    left: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mega-box .content{
    background: var(--clr-neutral-900);
    padding: 25px 20px;
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.content .row header{
    color: #fff;
    font-size: 16px;
    font-weight: 500;
}

.content .row .mega-links{
    margin-left: -40px;
    border-left: 1px solid rgba(255,255,255, 0.08);
}

.row .mega-links li{
    padding: 0 20px;
}
.row .mega-links li a{
    padding: 0 20px;
    font-size: 14px;
    display: block;
    font-weight: 400;
}

.wrapper input{
    display: none;
}

.nav-links .mobile-item{
    display: none;
}

/* media queries */
@media screen and (max-width: 970px) {

    .wrapper .btn{
        display: block;
    }

    .wrapper .nav-links{
        position: fixed;
        height: 100vh;
        width: 100%;
        max-width: 350px;
        background: var(--clr-neutral-900);
        display: block;
        top: 0;
        left: -120%;
        overflow-y: auto;
        line-height: 50px;
        padding: 50px 10px;
        box-shadow: 0 15px 15px rgba(0,0,0,0.15);
        transition: all 0.3s ease;
    }

    #menu-btn:checked ~ .nav-links{
        left: 0;
    }
    #menu-btn:checked ~ .btn.menu-btn{
        display: none;
    }

     #portfolio{
        padding-bottom: 50px;
    } 

    .nav-links::-webkit-scrollbar{
        width: 0px;
    }

    .nav-links li{
        margin: 15px 10px;
    }

    .nav-links li a{
        padding: 0 20px;
        display: block;
        font-size: 20px;
    }

    .nav-links .desktop-item{
        display: none;
    }

    #showMega:checked ~ .mega-box{
        max-height: 100%;
    }

    .nav-links .mobile-item{
        display: block;
        font-size: 20px;
        font-weight: 500;
        color: #fff;
        padding-left: 20px;
        cursor: pointer;
        border-radius: 5px;
        transition: all 0.3s ease;
    }

    .nav-links .mobile-item:hover{
        background: rgb(34, 41, 48);
    }

    .mega-box{
        position: static;
        top: 25px;
        width: 100%;
        padding: 0 20px;
        opacity: 1;
        max-height: 0px;
        overflow: hidden;
        visibility: visible;
        transition: all 0.3s ease;
    }
    
    .mega-box .content{
        background: var(--clr-neutral-900);
        flex-direction: column;
        padding: 20px 20px 0 20px;
    }

    .mega-box .content .row{
        width: 100%;
        margin-bottom: 15px;
        border-top: 1px solid rgba(255,255,255, 0.08);
    }

    .mega-box .content .row:nth-child(1){
        border-top: 0;
    }

    .content .row .mega-links{
        border-left: 0px;
        padding-left: 15px;
    }

    .row .mega-links li{
        margin: 0;
    }

    .content .row header{
        font-size: 19px;
    }
}


/* mega navigation menu style ends */

/* card with hover animation style starts */
.card-with-hover-animation{
    display: grid;
    min-height: 100vh;
    place-items: center;
}

.card{
    color: var(--clr-neutral-100);
    background: url("./laptop-coffee.jpg");
    background-size: cover;
    padding: 10rem 0 0;
    max-width: 35ch;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: transform 500ms ease;
}

.card:hover, .card:focus-within{
    transform: scale(1.05);
}

.card-content{
    --padding: 1.5rem;
    padding: var(--padding);
    background: linear-gradient(hsl(0 0% 0% / 0), hsl(20 0% 0% / 0.3) 20%, hsl(0 0% 0% / 1));
}

.card-title{
    position: relative;
    width: max-content;
}

.card-title::after{
    content: "";
    position: absolute;
    height: 4px;
    left: calc(var(--padding) * -1);
    bottom: -2px;
    width: calc(100% + var(--padding));
    background: var(--clr-accent-400);
    transform-origin: left;

    transition: transform 500ms ease;
}

.card:hover .card-title::after,.card:focus-within .card-title::after{
    transform: scaleX(1);
}

.card-body{
    margin: 20px 0;
    color: rgb(255 255 255 / 0.85);
}


@media (hover){
    .card-content{
        transform: translateY(65%);
        transition: transform 500ms ease;
    }
    
    .card:hover .card-content, .card:focus-within .card-content{
    transform: translateY(0);
    transition-delay: 500ms;
    }

    .card:focus-within .card-content{
    transition-duration: 0ms;
    }

    .card-content > *:not(.card-title) {
    opacity: 0;
    transition: opacity 500ms linear;
    }

    .card:hover .card-content  > *:not(.card-title),.card:focus-within .card-content  > *:not(.card-title) {
    opacity: 1;
    transition-delay: 800ms;
    }

    .card-title::after{
    transform: scaleX(0);
    }
}


.button{
    cursor: pointer;
    display: inline;
    text-decoration: none;
    color: var(--clr-neutral-900);
    background-color: var(--clr-accent-400);
    padding: 0.5em 1.25em;
    border-radius: .25rem;
}

.button:hover, .button:focus{
    background-color: var(--clr-neutral-100);
    /* outline: none; */
}


/* for those people who don't like animation or something like that. (their motion settings could be off in the settings) */
@media (prefers-reduced-motion: reduce){
    *,*::before,*::after{
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
        transition-delay: 0ms !important;
    }
}
/* card with hover animation style ends */

/* ecommerce product card style starts */

.ecommerce-product-card{
    height: 100vh;
    display: grid;
    place-items: center;
    font-family: "Poppins";
}

.e-card{
    position: relative;
    max-width: 35ch;
    height: min-content;
    padding: 25px;
    background: #fff;
    box-shadow: 0 5px 12px rgba(0,0,0,0.08);
    border-radius: 20px;
    transition: .4s;
}

.e-card:hover{
    border-color: #fff;
    transform: translateY(-10px);
}

.e-card .e-card-header h3{
    color: #404d61;
    font-size: 28px;
}

.e-card .e-card-header p{
    color: #757d8a;
    font-size: 20px;
}

.e-card .e-card-header span{
    position: absolute;
    color: #f43c3c;
    background: #fef0f0;
    right: 25px;
    top: 25px;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 18px;
}

.e-card .e-card-img{
    position: relative;
    height: 220px;
    border-radius: 12px;
    overflow: hidden;
    margin: 22px 0;
}

.e-card .e-card-img img{
    width: 100%;
    height: 100%;
    transition: .4s;
}

.e-card:hover .e-card-img img{
    transform: scale(1.03);
}

.e-card .e-card-img i{
    cursor: pointer;
    position: absolute;
    top: 12px;
    right: 12px;
    color: #757d8a;
    border-radius: 6px;
    background: #fff;
    padding: 6px;
}

.e-card .e-card-details{
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.e-card .e-card-details .price p{
    color: #757d8a;
    font-size: 20px;
}

.e-card .e-card-details .price strong{
    color: #404d61;
    font-size: 22px;
}

.e-card .e-card-details .colors{
    display: flex;
}

.e-card .e-card-details .colors div{
    cursor: pointer;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    margin: 0 4px;
}

.e-card .e-card-details .colors div:nth-child(1){
    background: linear-gradient(90deg, #b72c31, #efb9b0);
}
.e-card .e-card-details .colors div:nth-child(2){
    background: linear-gradient(90deg, #25476d, #a8bed2);
}
.e-card .e-card-details .colors div:nth-child(3){
    background: linear-gradient(90deg, #10505b, #a4beb2);
}

.e-card .e-card-details .colors div i{
    opacity: 0;
    margin: 8px;
    color: #fff;
    font-size: 18px;
}

.e-card .e-card-details .colors div.selected i{
    opacity: 1;
}

.e-card .card-sizes{
    display: flex;
    justify-content: space-between;
    margin: 22px 0;
}

.e-card .card-sizes span{
    cursor: pointer;
    color: #757d8a;
    background: #fafafa;
    border-radius: 5px;
    padding: 6px 12px;
}

.e-card .card-sizes span.selected{
    color: #fff;
    background: #10505b;
}

.e-card .card-btn button{
    cursor: pointer;
    border: none;
    height: 46px;
    width: 100%;
    border-radius: 12px;
    color: #fff;
    font-size: 20px;
    letter-spacing: .5px;
    background: linear-gradient(to left, #404d61, #10505b);
}

/* ecommerce product card style ends */