:root {

    --Orange: hsl(26, 100%, 55%);
    --Pale-orange: hsl(25, 100%, 94%);
    --Dark-blue: hsl(220, 13%, 13%);
    --Dark-gray-blue: hsl(219, 9%, 45%);
    --Gray-blue: hsl(220, 14%, 75%);
    --Light-gray-blue: hsl(223, 64%, 98%);
    --White: hsl(0, 0%, 100%);
    --Black: hsl(0, 0%, 0%);
    --Black-opacity:hsl(0, 0%, 0%, 0.75);
    --Cart-qty:'0';
}

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

html {
    font-family: 'Kumbh Sans', sans-serif;
}

body {
    min-height:100vh;
    position:relative;
    background-color: var(--White);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- header --- */

header {
    display: flex;
    height:112px;
    width: 88%;
    max-width:1110px;
    border-bottom: 1px solid #E8E8EA;
}

.nav-logo {
    margin:42px 0 auto .5em;
    /* border:solid red; */
}    

/* mobile nav */

.nav-mobile-hamburger {
    display:none;   
}

.nav-mobile {
    width:100vw;
    background-color: var(--Black-opacity);
    height:100vh;
    position:absolute;
    left:-5000px;
    z-index: 99;
}

.nav-mobile.active {
    left:0px;
}

.nav-mobile li {
    padding:11px 0 12px;
    list-style: none;
    font-size: 1.125rem;
    font-weight: bolder;
}

.nav-mobile li:first-of-type {
    padding: 0 0 35px;
}

.nav-mobile a {
    text-decoration: none;
    color:var(--Black);
}

.nav-mobile > ul {
    width:250px;
    height:100vh;
    background-color: var(--White);
    padding:22px;
}

/* main nav */

.nav-main > ul {
    display: flex;
    list-style: none;
    text-decoration: none;
}

.nav-mobile-hamburger,
.nav-mobile-close{
    border:none;
    background-color: transparent;

}

.nav-main {
    display: flex;
    margin:42px auto auto 0;
}

.nav-main > ul {
    display: flex;
    list-style: none;
}

.nav-main a {
    text-decoration: none;
    margin:auto 14px;
    color:var(--Dark-gray-blue);
    padding:43px 0;
    border-bottom: 3px solid transparent;
}

.nav-main a:hover{
    color:var(--Black);
    border-bottom:3px solid var(--Orange);
}

.user-info {
    display: flex;
    position:relative;
    height:55px;
    margin: auto 0;
    bottom:4px;
}

.cart-icon {
    margin:auto 45px;
    padding:20px 0;
    position:relative;
}

.cart-icon::after {
    position:absolute;
    left:50%;
    bottom:55%;
    content:var(--Cart-qty);
    display: inline-block;
    text-align: center;
    height:12px;
    min-width:19px;
    color:var(--White);
    background-color: var(--Orange);
    border-radius: 7px;
    font-size: 10px;
    font-weight: 800;
}

.user-info:has(.hidden) .cart-icon::after {
    display:none;
}

.cart-svg {
    filter: invert(37%) sepia(15%) saturate(236%) hue-rotate(187deg) brightness(60%) contrast(100%);
}

.user-icon img{
    margin:auto;
    height:100%;
    border:2px solid var(--White);
    border-radius:100%;
}

.user-icon img:hover{
    border:2px solid var(--Orange);
}

/* cart summary */

.cart-summary {
    position: absolute;
    display:none;
    z-index: 9;
    width:360px;
    height:260px;
    background-color: var(--White);
    border-radius:10px;
    box-shadow: rgba(17, 12, 46, 0.25) 0px 48px 100px 0px;
}

.cart-summary {
    top:90%;
    right:0;
}

.user-info:has(.cart-icon:hover) .cart-summary,
.cart-summary:hover{
    display:block;
}

.cart-summary > p {
    font-weight:800;
    margin:1em;
}

.cart-summary-body {
    display: flex;
    flex-direction: column;
    width:100%;
    height:80%;
    align-items: center;
    justify-content:space-evenly;
    font-weight: 800;
    color:var(--Dark-gray-blue);
}

.item-container {
    width:100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    line-height: 1.5;
    padding:1em;
    font-weight: 400;
}

.item-container > img {
    width:50px;
    border-radius: 5px;
}

.item-container b {
    color:var(--Black)
}

.item-container button {
    border:none;
    background-image: url("./images/icon-delete.svg");
    background-repeat: no-repeat;
    background-position: 50%;
    height:50%;
    background-color: transparent;
}

#checkout-btn {
    border:none;
    border-radius: 10px;
    background-color: var(--Orange);
    color:var(--White);
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 1px;
    width:calc(100% - 3em);
    height:56px;
}

/* main */

main {
    display:flex;
    gap:125px;
    margin-top:90px;
    min-width:375px;
}

.container {
    display:flex;  
}

.product-images-container,
.product-info-container {
    max-width:445px;
    flex-direction: column;
}

/* product - images */

.product-image-selected {
    width:100%;
    border-radius:5%;
}

.photo-scroll-buttons {
    display: none;
}    

.thumbnail-container {
    width:100%;
    justify-content: space-between;
    margin-top:25px;
}

.thumbnail,
.lightbox-thumbnail {
    width:90px;
    height:90px;
    border-radius:10px;  
    overflow: hidden;
    background-color: white;
}

.thumbnail img {
    width:100%;
}

.thumbnail.selected,
.lightbox-thumbnail.selected {
    border:solid 2px var(--Orange);
}

.thumbnail.selected img,
.lightbox-thumbnail.selected img,
.thumbnail img:hover,
.lightbox-thumbnail img:hover {
    opacity:0.3;    
}

/* lightbox */

.lightbox-bg{
    position:absolute;
    display: flex;
    justify-content: center;
    top:0;
    left:0;
    background-color: var(--Black-opacity);
    height:120%;
    width:100%;
}

.lightbox-bg.hidden{
    display:none;
}

.lightbox-container{
    display:flex;
    flex-direction: column;
    position: relative;
    width:550px;
    margin-top:85px;
    align-items: center;
}

#close-lightbox {
    border:none;
    background-color: transparent;
    width:21px;
    margin-left: auto;
}

#close-lightbox > img {
    width: 21px;
    filter: grayscale(100%) brightness(500%);;
}

#close-lightbox > img:hover,
.lightbox-scroll-buttons button:hover img {
    filter: brightness(0) saturate(100%) invert(74%) sepia(38%) saturate(7331%) hue-rotate(337deg) brightness(101%) contrast(101%);
}

.lightbox-scroll-buttons {
    display:flex;
    position: absolute;
    top:285px;
    width:605px;
    margin:auto;
    justify-content: space-between;
}

.lightbox-scroll-buttons button {
    display:flex;
    height:55px;
    width:55px;
    border:none;
    border-radius:50%;
}

.lightbox-scroll-buttons button > img {
    margin:auto;
}

.lightbox-product-image-selected {
    width:100%;
    border-radius:10px;
    margin-top:18px;
}

.lightbox-thumbnail-container {
    width:450px;
    margin:auto;
    justify-content: space-between;
    margin-top:25px;
}

.lightbox-thumbnail {
    width:90px;
    height:90px;
    border-radius:10px;  
    overflow: hidden;
    background-color: white;
}

.lightbox-thumbnail img {
    width:100%;
}

.lightbox-thumbnail.selected {
    border:solid 2px var(--Orange);
}

.lightbox-thumbnail.selected img {
    opacity:0.3;
}

/* product */

.product-brand {
    margin-top:61px;
    text-transform: uppercase;
    color:var(--Orange);
    font-size:14px;
    font-weight: 800;
    letter-spacing: 1px;
}

.product-name {
    font-size:44px;
    margin:18px auto;
    line-height: 48px;
}

.product-description {
    margin:17px auto 26px;
    color:var(--Dark-gray-blue);
    line-height: 26px;
}

.product-price-container {
    flex-wrap: wrap;
}    

.current-price {
    font-size:28px;
    font-weight:800;
    color:var(--Black);
    letter-spacing: 1px;
}

.price-discount {
    background-color: var(--Pale-orange);
    color:var(--Orange);
    padding:3px 9px;
    font-weight:800;
    border-radius: 5px;
    text-align: center;
    margin:auto 1em;
}

.full-price {
    width:100%;
    font-weight:800;
    color:var(--Gray-blue);
    text-decoration: line-through;
    margin:.5em auto;
}

.product-button-container {
    display: flex;
    width:100%;
    gap:20px;
    margin-bottom:auto;
    margin-top: 28px;
}

.cart-quantity {
    background-color: var(--Light-gray-blue);
    align-items: center;
    border-radius:10px;
    min-height:56px;
}

.cart-quantity .icon {
    height:fit-content;
    padding:20px;
}

.cart-quantity .icon:hover {
    opacity:0.7;
}

.cart-count {
    font-weight: 800;
    margin:auto 20px;
    min-width:20px;
}

#add-to-cart {
    border:none;
    border-radius: 10px;
    background-color: var(--Orange);
    background-image: url("./images/icon-cart.svg");
    background-repeat: no-repeat;
    background-size: 18px;
    background-position:30% 50%;
    color:var(--White);
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 1px;
    width:100%;
    min-height:56px;
}

#add-to-cart > span {
    padding-left:20px;
}

#add-to-cart:hover {
    opacity:0.6;
}

@media only screen and (max-width:750px){

    header {
        height:67px;
    }

    .nav-mobile-hamburger {
        display:flex;
        margin:auto 0 auto -8px;
        height:35px;
        width:35px;
    }

    .nav-mobile-hamburger > img {
        margin:auto;   
    }

    .nav-logo {
        margin:auto 0 auto .5em;
    }  

    .nav-main {
        display: none;
    }

    .user-info {
        width:70px;
        height:30px;
        top:0;
        margin-left:auto;
    }

    main {
        flex-direction: column;
        gap:0;
        margin: 0 auto;
    }

    .cart-icon {
        margin:auto;
        padding:0;
        margin-left:0;
    }

    .cart-summary {
        right:-20%;
    }

    .product-info-container{
        padding:1.5em;
    }

    .product-brand {
        margin-top:-2px;
        font-size:13px;
    }

    .product-name {
        font-size: 28px;
        line-height: 32px;
        margin-top:14px;
        margin-bottom:16px;
    }

    .product-description {
        margin-top:0;
        margin-bottom:25px;
        line-height: 25px;
        font-size: 15px;
    }

    .product-images-container {
        width:100%;
        position: relative;
        z-index: 0;
    }

    .photo-scroll-buttons {
        display: flex;
        position: absolute;
        top:calc(50% - 20px);
        width:100%;
        justify-content: space-between;
        padding:0 1rem;
    }

    .photo-scroll-buttons button {
       width:40px;
       height:40px;
       border: none;
       border-radius: 50%;
       background-color: white;
       background-repeat: no-repeat;
       background-size: 25%;
       background-position: 50% 50%;
    }

    #prev-image {
        background-image: url("./images/icon-previous.svg");
    }

    #next-image {
        background-image: url("./images/icon-next.svg");
    } 

    .product-image-selected {
        border-radius:0;
        height:300px;
        object-fit: cover;
    }

    .thumbnail-container {
        display:none;
    }

    .full-price {
        width:25%;
        margin-right: 0;
    }

    .product-button-container {
        display: flex;
        flex-direction: column;
        margin-top:23px;
        gap:1rem;
    }

    .cart-count {
        font-weight: 800;
        margin:auto;
    }

    #add-to-cart {
        display:flex;
    }

    #add-to-cart > span {
        margin: 1em auto;
    }

}
