:root{
    --orange: hsl(26, 100%, 55%);
    --pale-orange: hsl(25, 100%, 94%);
    --light-grey-font: hsl(220, 14%, 75%);
    --dark-blue-font: hsl(220, 13%, 13%);

}

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

a{
    text-decoration: none;
    color: black;
}

.nav_header{
    width: 80%;
    height: 100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--light-grey-font);
    margin-bottom: 50px;
    position: relative;
}

.nav_header .left{
    height: 100%;
    display: flex;
    align-items: center;
    gap: 60px;
}

.nav_header .left .menu_toggle{
    display: none;
    border: none;
    background: transparent;
    cursor: pointer;
    align-items: center;
}

.nav_header .left .menu_toggle img{
    width: 16px;
}

.nav_header .left .logo{
    width: 150px;
}

.nav_header .left .navbar{
    display: flex;
    align-items: center;
    gap: 30px;
    height: 100%;
}

.nav_header .left .navbar a{
    font-size: 18px;
    font-weight: 500;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--light-grey-font);
    height: 100%;
    width: 70px;

}

.nav_header .left .navbar a:hover{
    color: black;
    border-bottom: 2px solid var(--orange);
    border-collapse: collapse;
}

.nav_header .right{
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav_header .right .cart_toggle{
    background: transparent;
    border: none;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.nav_header .right .cart_count{
    display: none;
    position: absolute;
    top: -8px;
    right: -12px;
    background-color: var(--orange);
    color: white;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    padding: 3px 7px;
    border-radius: 10px;
}

.nav_header .right .cart_count.visible{
    display: inline-block;
}

.nav_header .right .avatar{
    width: 50px;
}

.sidebar_backdrop{
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.55);
    z-index: 30;
}

.sidebar_menu{
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: min(300px, 75vw);
    background-color: white;
    z-index: 40;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 48px;
    box-shadow: 0 16px 30px rgba(29, 32, 38, 0.25);
}

.sidebar_menu .close_sidebar{
    width: fit-content;
    border: none;
    background: transparent;
    cursor: pointer;
}

.sidebar_menu .sidebar_nav{
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar_menu .sidebar_nav a{
    font-size: 18px;
    font-weight: 700;
    color: var(--dark-blue-font);
}

.cart_panel{
    position: absolute;
    top: 95px;
    right: 8%;
    width: 360px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 20px 32px rgba(29, 32, 38, 0.2);
    z-index: 20;
}

.cart_panel[hidden]{
    display: none;
}

.cart_panel .cart_panel_header{
    font-size: 16px;
    font-weight: 700;
    padding: 20px;
    border-bottom: 1px solid hsl(220, 14%, 90%);
}

.cart_panel .cart_panel_body{
    padding: 24px 20px;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
}

.cart_panel .empty_cart_message{
    color: hsl(219, 9%, 45%);
    font-size: 15px;
    font-weight: 700;
    text-align: center;
}

.cart_panel .cart_item{
    display: flex;
    align-items: center;
    gap: 16px;
}

.cart_panel .cart_item .cart_item_thumbnail{
    width: 50px;
    border-radius: 4px;
}

.cart_panel .cart_item .cart_item_details{
    flex: 1;
}

.cart_panel .cart_item .cart_item_name,
.cart_panel .cart_item .cart_item_pricing{
    color: hsl(219, 9%, 45%);
    font-size: 15px;
}

.cart_panel .cart_item .cart_item_pricing{
    margin-top: 2px;
}

.cart_panel .cart_item .cart_item_total{
    color: var(--dark-blue-font);
    margin-left: 6px;
}

.cart_panel .cart_item .remove_item{
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.cart_panel .checkout_button{
    width: 100%;
    border: none;
    border-radius: 10px;
    background-color: var(--orange);
    color: white;
    font-size: 16px;
    font-weight: 700;
    padding: 16px 20px;
    cursor: pointer;
}

.lightbox_overlay{
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.78);
    z-index: 70;
    display: grid;
    place-items: center;
    padding: 20px;
}

.lightbox_modal{
    position: static;
    inset: auto;
    width: min(560px, 92vw);
    margin: 0;
    border: none;
    padding: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.lightbox_modal .close_lightbox{
    border: none;
    background: transparent;
    width: fit-content;
    align-self: flex-end;
    cursor: pointer;
}

.lightbox_modal .close_lightbox img{
    width: 20px;
    filter: brightness(0) invert(1);
}

.lightbox_modal .lightbox_main_image_wrapper{
    position: relative;
}

.lightbox_modal .lightbox_main_image_wrapper .image_nav{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 50%;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.lightbox_modal .lightbox_main_image_wrapper .lightbox_prev_image{
    left: -24px;
}

.lightbox_modal .lightbox_main_image_wrapper .lightbox_next_image{
    right: -24px;
}

.lightbox_modal .lightbox_main_image{
    width: 100%;
    border-radius: 14px;
}

.lightbox_modal .lightbox_thumbnails{
    width: 88%;
    align-self: center;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.lightbox_modal .lightbox_thumbnails .lightbox_thumbnail{
    width: 22%;
    border-radius: 10px;
    border: 2px solid transparent;
    cursor: pointer;
    background-color: white;
}

.lightbox_modal .lightbox_thumbnails .lightbox_thumbnail:hover,
.lightbox_modal .lightbox_thumbnails .lightbox_thumbnail.active{
    border: 2px solid var(--orange);
    opacity: 0.5;
}

.main{
    width: 70%;
    margin: 0 auto;
    display: flex;
    gap: 100px;
    align-items: center;
}

.main .product-image{
    width: 50%;
}

.main .product_image .main_image{
    width: 100%;
    border-radius: 10px;
    cursor: pointer;
}

.main .product_image .main_image_wrapper{
    position: relative;
}

.main .product_image .main_image_wrapper .image_nav{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(29, 32, 38, 0.2);
}

.main .product_image .main_image_wrapper .image_nav:hover{
    background-color: var(--pale-orange);
}

.main .product_image .main_image_wrapper .prev_image{
    left: 16px;
}

.main .product_image .main_image_wrapper .next_image{
    right: 16px;
}

.main .product_image .main_image_wrapper .image_nav img{
    width: 12px;
}

.main .product_image .thumbnails{
    display: flex;
    gap: 20px;
    margin-top: 20px;
    justify-content: space-around;
}

.main .product_image .thumbnails img{
    width: 20%;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid transparent;
}

.main .product_image .thumbnails img:hover{
    border: 2px solid var(--orange);
}

.main .product_image .thumbnails img.active{
    border: 2px solid var(--orange);
    opacity: 0.45;
}

.main .product_info{
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.main .product_info .cmp{
    text-transform: uppercase;
    color: var(--dark-blue-font);
    font-size: 14px;
    font-weight: 700;
}

.main .product_info .prod_name{
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 10px;
}

.main .product_info .prod_desc{
    color: var(--light-grey-font);
    font-size: 18px;
    line-height: 30px;
}

.main .product_info .price{
    display: flex;
    align-items: center;
    gap: 20px;
}

.main .product_info .price .current_price{
    font-size: 28px;
    font-weight: 700;
}

.main .product_info .price .discount{
    background-color: black;
    color: white;
    font-size: 16px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 5px;
}

.main .product_info .original_price{
    color: var(--dark-blue-font);
    font-size: 18px;
    text-decoration: line-through;
}

.main .product_info .add_to_cart{
    display: flex;
    align-items: center;
    gap: 20px;
}

.main .product_info .add_to_cart .quantity_selector{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    background-color: hsl(223, 64%, 98%);
    padding: 10px 20px;
    border-radius: 10px;
}
.main .product_info .add_to_cart .quantity_selector button{
    background-color: transparent;
    border: none;
    font-size: 18px;
    font-weight: 700;
    color: var(--orange);
    cursor: pointer;
}

.main .product_info .add_to_cart .quantity_selector span{
    font-size: 18px;
    font-weight: 700;
}

.main .product_info .add_to_cart .add_to_cart_button{
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--orange);
    color: white;
    font-size: 18px;
    font-weight: 700;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

.main .product_info .add_to_cart .add_to_cart_button:hover,
.cart_panel .checkout_button:hover{
    filter: brightness(1.05);
}

.main .product_info .add_to_cart .add_to_cart_button::before{
    content: url('./images/icon-cart.svg');
    margin-right: 10px;
}

.attribution{
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 16px;
    color: var(--light-grey-font);
}

[hidden] {
  display: none !important;
}

@media (max-width: 768px){

    .nav_header{
        width: 90%;
        border-bottom: none;
        margin-bottom: 0px;
    }

    .nav_header .left{
        gap: 18px;
    }

    .nav_header .left .menu_toggle{
        display: flex;
    }

    .nav_header .left .navbar{
        display: none;
    }


    .cart_panel{
        left: 16px;
        right: 16px;
        width: auto;
        top: 110px;
    }

    .main{
        flex-direction: column;
        gap: 20px;
        width: 100%;
    }

    .main .product_image{
        width: 100%;
    }

    .main .product_image .main_image{
        width: 100%;
        border-radius: 0px;
    }

    .main .product_image .main_image_wrapper .image_nav{
        width: 38px;
        height: 38px;
    }

    .main .product_image .main_image_wrapper .prev_image{
        left: 12px;
    }

    .main .product_image .main_image_wrapper .next_image{
        right: 12px;
    }

    .main .product_image .thumbnails{
        display: none;
    }

    .lightbox_modal{
        width: min(460px, 94vw);
    }

    .lightbox_modal .lightbox_main_image_wrapper .lightbox_prev_image{
        left: 10px;
    }

    .lightbox_modal .lightbox_main_image_wrapper .lightbox_next_image{
        right: 10px;
    }

    .lightbox_modal .lightbox_main_image_wrapper .image_nav{
        width: 42px;
        height: 42px;
    }

    .lightbox_modal .lightbox_thumbnails{
        width: 100%;
        gap: 10px;
    }

    .main .product_info{
        width: 100%;
        padding: 0px 16px;
    }

    .main .product_info .prod_name{
        font-size: 32px;
        margin-bottom: 10px;
    }

    .main .product_info .whole_price{
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

        .main .product_info .price .current_price{
            font-size: 24px;
        }
    
        .main .product_info .price .discount{
            font-size: 14px;
        }
    
        .main .product_info .original_price{
            font-size: 14px;
        }

        .main .product_info .add_to_cart{
            flex-direction: column;
            gap: 10px;
        }

        .main .product_info .add_to_cart .quantity_selector{
            width: 100%;
            justify-content: space-between;
            height: 50px;
        }

        .main .product_info .add_to_cart .add_to_cart_button{
            width: 100%;
            justify-content: center;
            height: 70px;
        }

        .attribution{
            position: static;
            transform: none;
            text-align: center;
            margin-top: 20px;
            margin-bottom: 20px;
        }
}

