/* ====== Base & Reset ====== */
*, *::after, *::before {
    margin: 0;
    padding:0;
    box-sizing: border-box;
}

/* ====== Variables ====== */
:root {
    --orange: hsl(26, 100%, 55%);
    --pale-orange: hsl(26, 100%, 75%) ;
    --very-dark-blue: hsl(220, 13%, 13%);
    --dark-grayish-blue: hsl(219, 9%, 45%);
    --grayish-blue: hsl(220, 14%, 75%);
    --light-grayish-blue: hsl(0, 17%, 95%);
    --white: hsl(0, 0%, 100%);
    --black : #000000;
    --black-lightbox: rgba(0, 0, 0, 0.75);
    --font-size-base : clamp(0.9rem, 4.3vw, 1.4rem);
    --layout-gap:5.5vw;
}

#add-cart {
    display: flex;
    background-color: var(--orange);
    flex-direction: row;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-weight: 700;
    color: var(--black);
    box-shadow: 0px 5px 15px var(--orange);
}

#add-cart:hover,
#checkout-button:hover {
    background-color: var(--pale-orange);
}

body {
    width: 100%;
    height: 100%;
}

.bold,
.current-price {
    font-weight: 700;
    color: var(--black);
}

html {
    font-size: var(--font-size-base);
    background-color: var(--white);
    color: var(--dark-grayish-blue);
    height: 100vh;
    width: 100vw;
    font-family: "Kumbh Sans", sans-serif;
    font-weight: 400;
}

.nav-menu {
    list-style-type: none;
}

.normal-price {
    font-weight: 700;
    text-decoration: line-through;
    align-self: center;
    margin-bottom:20px;
}

.product-description {
    line-height: 1.5;
}

.quantity-wrapper {
    background-color: var(--light-grayish-blue);
    border-radius: 10px;
    display:flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

#delete-button:hover,
#checkout-button:hover,
#open-menu-button:hover,
#user-avatar:hover,
#add-cart:hover,
#previous-button:hover,
#next-button:hover,
#overlay-previous-button:hover,
#overlay-next-button:hover,
#cart-button:hover,
#increase-quantity,
#reduce-quantity,
#close-menu-button,
#product-count {
    cursor: pointer;
}

.attribution {
    font-size: 11px;
    text-align: center;
}
.attribution a {
    color: var(--orange);
}

@media (max-width : 768px) {

    #add-cart {
        gap:var(--layout-gap);
        margin: 0px var(--layout-gap);
        width: calc(100% - 2*var(--layout-gap));
        padding: var(--layout-gap) 0px;
        font-size: 1.2rem;
    }

    button {
        all:unset;
    }

    #cart-button {
        height: 5.5vw;
        width: 5.5vw;
    }

    .cart-text {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
    }

    #cart-title {
        color: var(--black);
        font-weight: 700;
    }

    #cart-title::after {
        content: "";
        display: block;
        width: 100%;
        height: 1px;
        background-color: var(--dark-grayish-blue);
        margin-top: var(--layout-gap); 
    }

    .cart-wrapper {
        display: none;
        flex-direction: column;
        gap:var(--layout-gap);
        margin-top: var(--layout-gap);
        }

    #checkout-button {
        all: unset;
        background-color: var(--orange);
        border-radius: 10px;
        width: 100%;
        padding: calc(0.75*var(--layout-gap)) 0px;
        font-size: 1.2rem;
        font-weight: 700;
        color: var(--black);
        text-align: center;
    }

    .chosen-quantity {
        color: var(--black);
        font-weight: 700;
    }

    #close-menu-button {
        height: 4vw;
        width: 4.25vw;
    }

    #company-logo {
        height: 5.5vw;
        width: 37vw;
    }

    .company-name {
        color:var(--dark-grayish-blue);
        font-size:clamp(0.7rem, 2.5vw, 1.4rem);
        letter-spacing: 0.1rem;
    }

    .current-price {
        font-size: clamp(1.75rem, 8.5vw, 3.5rem);
    }

    #customer-cart {
        display: none;
        position: absolute;
        padding: var(--layout-gap);
        background-color: var(--white);
        border-radius: 10px;
        top: 20vw;
        left:3vw;
        width:94vw;
        z-index: 50;
        height: 65vw;
    }

    #delete-button {
        justify-self: center;
        align-self: center;
        height: 4.25vw;
        width: 4vw;
    }

    #desktop-overlay {
        display: none;
    }

    .discount {
        color: var(--white);
        background-color: var(--black);
        padding:calc(0.25*var(--layout-gap)) calc(0.5*var(--layout-gap));
        border-radius: 5px;
        font-weight: 700;
        align-self: center;
    }

    #empty-cart {
        font-weight: 700;
        text-align: center;
        margin-top:20vw;
    }

    footer {
        margin:var(--layout-gap);
    }

    header {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: var(--layout-gap);
        width: 100%;
        position:fixed;
        top:0;
        z-index: 50;
        background-color: var(--white);
    }

    #increase-quantity:hover > path,
    #reduce-quantity:hover > path {
        fill:var(--pale-orange);
    }

    main {
        margin-top: 52px; 
        width: 100%;
    }

    .menu-item {
        margin-bottom: calc(1.5*var(--layout-gap));
    }

    .menu-item:hover {
        color: var(--orange);
        text-decoration: underline;
        cursor: pointer;
    }

    .mini-picture {
        width: 12vw;
        height: auto;
        border-radius: 5px;
    }

    nav {
        position: fixed;
        left: 0;
        top:0;
        display: none; 
        flex-direction: column;
        width: 70vw;
        height: 100vh;
        color: var(--black);
        background-color: var(--white);
        z-index: 60;
        padding: var(--layout-gap);
    }

    .nav-menu {
        font-size: clamp(1.4rem, 6vw, 2rem);
        margin-top: calc(2*var(--layout-gap));
        font-weight: 700;
    }

    #next-button {
        right:5%;
    }

    #mobile-overlay {
        display: none;
        position: fixed;
        top:0;
        left:0;
        width: 100vw;
        height: 100vh;
        background-color: var(--black-lightbox);
        z-index: 55;
    }

    #open-menu-button {
        margin-right: var(--layout-gap);
        height: 4vw;
        width: 4.25vw;
    }

    .picture-wrapper {
        width:100%;
        position:relative;
    }

    #previous-button {
        left:5%;
    }

    #previous-button, #next-button {
        position:absolute;
        top:50%;
        z-index: 20;
        border-radius: 50%;
        background-color: var(--white);
        padding: 15px;
        height: 50px; 
        width:50px;  
    }

    #previous-button:hover, 
    #next-button:hover {
        border: 1px solid var(--orange);
    }

    #previous-button:hover > path, 
    #next-button:hover > path {
        stroke: var(--orange);
    }

    .price-wrapper {
        display: flex;
        flex-direction: row;
        justify-content:space-between;
        width: 100%;
        padding:0px var(--layout-gap);
    }

    #product-count {
        display:none;
        position:absolute;
        top:calc(0.9*var(--layout-gap));
        right: 16vw;
        background-color: var(--orange);
        padding: 2px 2vw;
        border-radius: 10px;
        color: var(--white);
        font-size: calc(0.5*var(--font-size-base));
    }

    .product-in-cart {
        display:flex;
        flex-direction: row;
        gap: calc(0.5*var(--layout-gap));
        align-items: center;
    }

    .product-name {
        font-size:clamp(2rem, 8vw, 4rem);
        color:var(--black);
        line-height: 1;
    }

    .product-picture {
        max-width: 100%;
        height: auto;
        object-fit: cover;
        max-height: 80vw;
        object-position: center 0%;
    }

    .product-thumbnail {
        display:none;
    }

    .quantity-wrapper {
        margin:var(--layout-gap);
        padding:calc(0.75*var(--layout-gap));
    }

    .text-wrapper {
        padding: var(--layout-gap);
        display: flex;
        flex-direction: column;
        gap:var(--layout-gap);
    }

    #user-avatar {
        margin-left: var(--layout-gap);
        height: 5.5vw;
        width: 5.5vw;
    }
}


@media (min-width: 575px) and (max-width: 768px) {
    .product-in-cart {
        display:flex;
        flex-direction: row;
        gap: var(--layout-gap);
        align-items: center;
    }
  }
  
@media (min-width: 769px) {
    #add-cart {
        border:none;
        width: 60%;
        padding: 18.5px 20px;
        font-size: 1.2rem;
        gap:10px;
    }

    body {
        min-height: 500px;
        overflow:auto;
    }

    #cart-button {
        all:unset;
        height: 2vw;
        width: 2vw;
    }

    .cart-text {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
    }

    #cart-title {
        color: var(--black);
        font-weight: 700;
        font-size:clamp(12px, 1.1vw, 18px);
    }

    #cart-title::after {
        content: "";
        display: block;
        width: 100%;
        height: 1px;
        background-color: var(--dark-grayish-blue);
        margin-top: 0; 
    }

    .cart-wrapper {
        display: none;
        flex-direction: column;
        gap:clamp(5px,1.5vh,35px);
        margin-top:clamp(5px,1.5vh,35px);;
        }

    #checkout-button {
        all: unset;
        background-color: var(--orange);
        border-radius: 10px;
        width: 100%;
        padding: clamp(2px,calc(0.25*var(--layout-gap)),15px) 0px;
        font-size: 1.2rem;
        font-weight: 700;
        color: var(--black);
        text-align: center;
    }

    #close-menu-button,
    #open-menu-button,
    #next-button,
    #previous-button {
        display:none;
    }

    #company-logo {
        height: auto;
        width: 12vw;
    }
    
    .company-name {
        color:var(--dark-grayish-blue);
        letter-spacing: 0.1rem;
        margin-bottom: 20px;
        font-size: 1.1vw;
    }

    .current-price {
        font-size: clamp(18px, 2vw, 24px);
    }

    #customer-cart {
        display: none;
        position: absolute;
        padding: 20px;
        background-color: var(--white);
        border-radius: 10px;
        top: clamp(30px, 6vh, 100px);
        right:5vw;
        width:30vw;
        z-index: 50;
        height: clamp(150px,40vh,200px);
        box-shadow: 0px 10px 10px rgba(0, 0, 0, 0.3);
    }

    #desktop-overlay {
        display: none;
        flex-direction: column;
        position: fixed;
        justify-content: center;
        align-items: center;
        top:0;
        left:0;
        width: 100vw;
        height: 100vh;
        background-color: var(--black-lightbox);
        z-index: 55;
    }

    #desktop-wrapper {
        display: flex;
        gap:5%;
    }

    .discount {
        color: var(--white);
        background-color: var(--black);
        padding: 2px 10px;
        border-radius: 5px;
        font-weight: 700;
        font-size: clamp(12px, 1.1vw, 18px);
        align-self: center;
        width: fit-content;
        position:relative;
        top: -2.5vw;
        left: 10vw;
    }

    #empty-cart {
        font-weight: 700;
        text-align: center;
        margin-top:clamp(20px,8vh,30px);
    }

    header {
        display: flex;
        flex-direction: row;
        align-items: center;
        margin: 0 3.5vw 5vh 3.5vw;
        justify-content: space-between;
        border-bottom: 1px solid var(--grayish-blue);
        height:5vh;
        min-height: 25px;
    }

    html {
        font-size: 1vw;
    }

    #left-main {
        width:44vw;
        max-width: 44vw;
        min-height: 400px;
    }

    .menu-item:hover {
        color: var(--orange);
        cursor: pointer;
        padding-bottom:clamp(5px, 1vh,100px);
        border-bottom: 3px solid var(--orange);
    }

    .mini-picture {
        border-radius: 5px;
        height: 50px;
        width:50px;
    }

    .nav-menu {
        position:absolute;
        top:clamp(5px, 1.5vh,50px);
        left:30vw;
        display: flex;
        flex-direction: row;
        list-style-type: none;
        gap:2vw;
        font-size: 1.25vw;
    }

    .normal-price {
        font-size: clamp(12px, 1.1vw, 18px);
    }

    #overlay-close-button {
        margin-bottom:2vh;
        margin-left:min(54vh,36vw);
    }

    #overlay-close-button:hover > path{
        fill:var(--orange);
    }

    #overlay-main-picture {
        max-width: min(60vh, 40vw);
        max-height: min(60vh, 40vw);
        border-radius: 15px;
    }

    #overlay-main-picture-wrapper {
        display:flex;
        align-items: center;
        justify-content: center;
    }

    #overlay-next-button {
        position:relative;
        right:25%;
    }

    #overlay-previous-button {
        position:relative;
        left:25%;
    }

    #overlay-previous-button, #overlay-next-button {
        position:absolute;
        top:50%;
        z-index: 20;
        border-radius: 50%;
        background-color: var(--white);
        padding: 15px;
        height: 50px;
        width:50px;
    }

    #overlay-previous-button:hover, #overlay-next-button:hover {
        border: 1px solid var(--orange);
    }

    #overlay-previous-button:hover > path, #overlay-next-button:hover > path {
        stroke: var(--orange);
    }

    .overlay-thumbnail {
        position:relative;
        overflow: hidden;
        max-width: min(13vh, 9vw);
        max-height: min(13vh, 9vw);
        border-radius: 10px;
    }

    .overlay-thumbnail::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(255, 255, 255, 0);
        transition: background-color 0.3s ease;
        z-index: 900;
      }

    .overlay-thumbnail:hover::after {
        background-color: rgba(255, 255, 255, 0.9);
      }

    .overlay-thumbnail:hover {
        cursor: pointer;
    }

    #overlay-thumb-wrapper {
        display: none;
        position: relative;
        gap:min(1.2vw,2.5vh);
        max-width: min(60vh, 40vw);
        margin-top:3vh;
    }

    .picture-wrapper {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: 4fr 1fr;
        max-width:min(65vh, 44vw);
        max-height: min(80vh,54vw);
        min-height: 400px;
    }

    .price-wrapper {
        margin-top: 1.1vw;
        margin-bottom: 1.1vw;
    }

    #product-count {
        display:none;
        position:absolute;
        top:clamp(5px,1.5vh,50px);
        right: 9vw;
        background-color: var(--orange);
        padding: 2px 4px;
        border-radius: 10px;
        color: var(--white);
        font-size: calc(0.5*var(--font-size-base));
    }

    .product-description {
        font-size: clamp(12px, 1.1vw, 18px);
    }

    .product-in-cart {
        display:flex;
        flex-direction: row;
        gap: calc(0.5*var(--layout-gap));
        align-items: center;
    }

    .product-name {
        font-size: clamp(25px, min(5vh, 3.3vw), 35px);
        margin-bottom: 5vh;
        color:var(--black);
        line-height: 1;
    }

    .product-picture {
        border-radius: 15px;
        grid-column: 1/5;
        grid-row: 1;
        max-height: min(65vh, 44vw);
        max-width: min(65vh, 44vw);
        min-height: 325px;
        min-width: 325px;
    }

    .product-section {
        display: flex;
        flex-direction: row;
        margin: 0 4.5vw 5vh 4.5vw;
    }

    .product-thumbnail {
        grid-row: 2;
        border-radius: 10px;
        max-height: min(13vh, 9.5vw); 
        max-width: min(13vh, 9.5vw);
        min-height: 65px;
        min-width: 65px;
        margin-top:2vh; 
    }

    .quantity-wrapper {
        padding:20px; 
        width:35%;
    }

    .right-header {
        display: flex;
        flex-direction: row;
        align-items: center;
    }

    #right-main {
        display: flex;
        flex-direction: column;
        justify-content: center;
        margin-left:3vw;
        width:44vw;
        max-width: 44vw;
        max-height: 91vh;
        min-height: 400px;
    }

    #thumbnail-1 {
        grid-column: 1;
    }

    #thumbnail-2 {
        grid-column: 2;
        justify-self: center;
    }

    #thumbnail-3 {
        grid-column: 3;
        justify-self: center;
    }

    #thumbnail-4 {
        grid-column: 4;
        justify-self: end;
    }

    #user-avatar {
        margin-left: calc(0.5 * var(--layout-gap));
        height: 3vw;
        width: 3vw;
    }
  }

  @media (min-width: 1001px) {

    body {
        min-height: 550px;
    }
    
    #customer-cart {
        top: clamp(70px, 12vh, 200px);
        height: clamp(175px,40vh,250px);
    }

    #company-logo {
        width: 17.5vw;
    }

    header {
        margin: 0 12vw 10vh 12vw;
        height:11vh;
        min-height: 60px;
    }

    #left-main {
        width:30vw;
        max-width: 30vw;
    }

    .menu-item:hover {
        color: var(--orange);
        cursor: pointer;
        padding-bottom:clamp(5px, 1vh,100px);
        border-bottom: 3px solid var(--orange);
    }
    
    .nav-menu {
        top:clamp(20px, 4.25vh,100px);
        left:35vw;
        gap:2vw;
        font-size: 1.5vw;
    }

    .picture-wrapper {
        max-width:min(50vh, 30vw);
        max-height: min(64vh,39vw);
    }

    #product-count {
        display:none;
        position:absolute;
        top:clamp(12px,3.8vh,50px);
        right: 17.5vw;
        background-color: var(--orange);
        padding: 3px 6px;
        border-radius: 10px;
        color: var(--white);
        font-size: calc(0.5*var(--font-size-base));
    }

    .product-name {
        margin-bottom: 30px;
        font-size: clamp(25px, min(5vh, 3.3vw), 35px);
    }

    .product-picture {
        max-height: min(50vh, 30vw);
        max-width: min(50vh, 30vw);
    }

    .product-section {
        margin: 0 15vw 15vh 15vw;
    }

    .product-thumbnail {
        max-height: min(10vh, 7vw);
        max-width: min(10vh, 7vw);
        margin-top:4vh;
    }

    .quantity-wrapper {
        padding:20px;
    }

    #right-main {
        margin-left:10vw;
        width:30vw;
        max-width: 30vw;
        max-height: 64vh;
    }
  }