@charset "UTF-8";
@import url('https://fonts.googleapis.com/css2?family=Kumbh+Sans:wght@400;700&display=swap');

/*Generic CSS*/

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

}

:root {
    --box-shadow: hsla(0, 0%, 0%, 0.2);
    --orange: hsl(26, 100%, 55%);
    --pale-orange: hsl(25, 100%, 94%);    
    --very-dark-blue: hsl(220, 13%, 13%);
    --dark-grayish-blue: hsl(219, 9%, 45%);
    --grayish-blue: hsl(220, 14%, 75%);
    --light-grayish-blue: hsl(223, 64%, 98%);
    --white: hsl(0, 0%, 100%);
    --black: hsl(0, 0%, 0%);

    /* Font */

    --font-main: 'Kumbh Sans', sans-serif;

    --fs-xl: 2.5em;
    --fs-600: 1.6em;
    --fs-500: 1.2em;
    --fs-400: 1em;
    --fs-200: .6em;

    --fw-regular: 400;
    --fw-bold: 700;

    /* Variables */

    --content: '1';
}

html,
body {
    height: 100vh;
    font-size: 16px;
}

body,
input,
textarea,
button,
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--very-dark-blue);
    font-family: var(--font-main);
    font-size: var(--fs-400);
    font-weight: var(--fw-regular);
}

::placeholder {
    opacity: 1;
    color: var(--font-color);
}

button, input {
    appearance: none;
    border: none;
    background: none;
    cursor: pointer;
}

ul,
ol {
    list-style: none;
}

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

.pr {
    position: relative;
}

/* Content */

body {
    display: flex;
    flex-direction: column;
    overflow-x: hidden;

    background-color: var(--white);
}

.container {
    margin: auto;
    max-width: 800px;
    width: 95%;
}

header > nav{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2em;

    padding: 1em 0;
    border-bottom: 3px solid var(--light-grayish-blue);
}

.nav-hamburguer {
    display: none;
}

.nav-list {
    flex: 1;
    align-self: stretch;
    display: flex;
    flex-direction: row;
    gap: .8em;
    margin: -1em 0;

    color: var(--grayish-blue);
}

.nav-list li:not(:first-child) {
    display: flex;
    align-items: center;
}

.nav-list li:hover {
    box-shadow: inset 0 -5px 0 var(--orange);
}

.nav-avatar {
    height: 50px;
    border-radius: 50%;
    transition: all .2s ease;
}

.nav-avatar:hover {
    box-shadow: 0 0 0 2px var(--orange);
}

main {
    flex: 1 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 2em;

    padding: 3em 2em;
}

.product-showcase {
    display: flex;
    flex-direction: column;
    gap: 1.4em;
}

.big-showcase {
    flex: 1;
    background-image: url('./images/image-product-1.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;

    border-radius: 1em;
    cursor: pointer;
}

.big-showcase:not(.full) > .pass-images {
    display: none;
}

.showcase-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1em;
}

.mini-showcase {
    aspect-ratio: 1/1;
    position: relative;
    border-radius: .8em;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    cursor: pointer;
    overflow: hidden;
}

.mini-showcase.active {
    box-shadow: 0 0 0 2px var(--orange);
}

.mini-showcase.active::after {
    display: block;
    position: absolute;
    content: '';
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--white);
    opacity: .6;
}

.showcase-1 { background-image: url('./images/image-product-1-thumbnail.jpg'); }
.showcase-2 { background-image: url('./images/image-product-2-thumbnail.jpg'); }
.showcase-3 { background-image: url('./images/image-product-3-thumbnail.jpg'); }
.showcase-4 { background-image: url('./images/image-product-4-thumbnail.jpg'); }

.product-content {
    align-self: center;
}

.product-content h2 {
    text-transform: uppercase;
    font-weight: var(--fw-bold);
    color: var(--orange);
    margin-bottom: 1em;
}

.product-content h1 {
    font-size: clamp(var(--fs-600), 5vw, var(--fs-xl));
    font-weight: var(--fw-bold);
    margin-bottom: .7em;
}

.product-content p {
    color: var(--dark-grayish-blue);
    font-size: clamp(var(--fs-200), 2vw, var(--fs-400));
}

.price-container {
    margin: 25px 0;
}

.price-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1em;
}

.price {
    display: inline-block;
    font-weight: var(--fw-bold);
}

.actual-price {
    font-size: var(--fs-600);
}

.discount {
    padding: .3em .5em;
    border-radius: .3em;
    background-color: var(--pale-orange);
    color: var(--orange);
}

.last-price {
    display: block;
    text-decoration: line-through;
    color: var(--grayish-blue);
}

.bttns-card-wrapper {
    display: flex;
    flex-direction: row;
    gap: 1em;
}

.bttn-count {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    background-color: var(--light-grayish-blue);
    border-radius: .6em;
    gap: 2em;
    padding: 1em;
    font-weight: var(--fw-bold);
}

.count-add {
    color: var(--orange);
    display: flex;
    align-items: center;
}

.bttn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5em;
    border-radius: .6em;
    padding: 1em;
    font-weight: var(--fw-bold);
    background-color: var(--orange);
    color: white;
    box-shadow: 0 30px 20px -20px hsla(26, 100%, 55%, 50%);
    transition: opacity .2s ease;
}

.bttn:hover {
    opacity: .75;
}

.cart-container {
    position: relative;
}

.cart-container:has(>.cart-pop>.cart-content:not(.empty))  > .cart-bttn::after {
    content: var(--content);

    display: inline-block;
    position: absolute;
    left: 100%;
    top: -5px;
    transform: translateX(-50%);
    padding: .1em .7em;
    border-radius: 50px;

    background-color: var(--orange);
    color: var(--white);
    font-size: var(--fs-200);
    font-weight: var(--fw-bold);
}

.cart-pop {
    display: none;
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;

    border-radius: .5em;
    background-color: var(--white);
    box-shadow: 0 10px 20px var(--box-shadow);

    z-index: 12;
}

.cart-pop.active {
    display: block;
}

.cart-pop h1 {
    font-weight: var(--fw-bold);
    padding: 1em;
    border-bottom: 2px solid var(--light-grayish-blue);
}

.cart-content {
    display: flex;
    flex-direction: column;
    gap: 1em;
    padding: 1em;
}

.cart-content.empty {
    font-weight: var(--fw-bold);
    color: var(--grayish-blue);
    justify-content: center;
    align-items: center;
    padding: 4em 5em;
}

.cart-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1em;
}

.product-avatar {
    aspect-ratio: 1/1;
    height: 40px;
    border-radius: .3em;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
}

.product-prices {
    flex: 1 0 auto;
    align-self: stretch;
}

.product-prices p{
    color: var(--grayish-blue);
}

.bttn-checkout {
    padding: .7em 1em;
    width: 100%;
}

.product-final-price {
    font-weight: var(--fw-bold);
    color: var(--very-dark-blue);
}

.product-final-price::before {
    content: ' - ';
    font-weight: var(--fw-regular);
}

.showcase-full {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100svh;
}

.showcase-full.active {
    display: block;
    background-color: rgba(0,0,0,.7);
    padding: 3em 0;
}

.product-showcase.full {
    height: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.big-showcase.full {
    position: relative;
    cursor: auto;
}

.showcase-wrapper.full {
    width: 80%;
    margin: 0 auto;
}

.close-bttn {
    display: flex;
    cursor: pointer;
    user-select: none;
}

.showcase-close {
    justify-content: flex-end;
}

.nav-close {
    margin-bottom: 2em;
    display: none;
}

.pass-images {
    position: absolute;
    width: calc(100% + 3em);
    top: 50%;
    left: 0;
    transform: translate(-1.5em, -50%);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pass {
    width: 50px;
    height: 50px;
    padding: 1em;

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

    color: var(--black);
    font-weight: var(--fw-bold);
    font-size: var(--fs-500);
    background-color: var(--white);
    border-radius: 50%;
    user-select: none;
    cursor: pointer;
}

.pass-wrapper {
    display: none;
}

.svg-s *,
.svg-f *,
.svg-fb *,
.svg-fp * {
    transition: stroke .1s ease-out,
                fill .1s ease-out;   
}

.svg-s:hover *{
    stroke: var(--orange);
}

.svg-f:hover *{
    fill: var(--orange);
}

.svg-fb:hover *{
    fill: var(--black);
}

.svg-fp:hover *{
    fill: hsla(26, 100%, 55%, 50%);
}

@media (max-width: 1000px) {
    .cart-container {
        position: static;
    }

    .cart-pop {
        width: 95%;
        max-width: 500px;
        top: 100px;
    }
}

@media (max-width: 728px) {
    header > nav {
        padding: 1em 2em;
    }

    .nav-hamburguer {
        display: block;
        cursor: pointer;
    }

    .nav-list {
        position: fixed;
        left: 0;
        display: flex;
        flex-direction: column;
        padding: 2em;
        background-color: var(--white);
        height: 100svh;
        width: 60vw;

        z-index: 10;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .nav-list.active {
        transform: translateX(0);
    }
    
    .nav-list.active::before {
        position: absolute;
        top: 0;
        left: 0;
        transform: translateX(60vw);
        content: '';
        width: 100vw;
        height: 100svh;
        background-color: rgba(0,0,0,.7);
        
        z-index: -1;
    }
    
        .nav-close {
            display: flex;
        }
    
    .nav-list.active li {
        font-weight: var(--fw-bold);
        color: var(--black);
    }

    .nav-list li:hover {
        box-shadow: none;
    }

    .nav-logo {
        flex: 1;
    }

    .container {
        width: 100%;
    }

    main {
        padding: 0;
        display: flex;
        flex-direction: column;
    }
    
    .big-showcase:not(.full) {
        aspect-ratio: 3 / 2;
        border-radius: 0;
        position: relative;
    }

    .pass-wrapper {
        width: 100%;
        top: 50%;
        transform: translateY(-50%);

        position: absolute;
        display: flex;
    }

    .big-showcase:not(.full) .pass-images {
        position: relative;

        margin: 0 auto;
        width: 90%;
        transform: translate(0);
    }

    .showcase-wrapper:not(.full) {
        display: none;
    }

    .product-content {
        padding: 0 1em 3em 1em;
    }

    .product-content h1 {
        font-size: var(--fs-xl);
        margin-bottom: .7em;
    }
    
    .product-content p {
        color: var(--dark-grayish-blue);
        font-size: var(--fs-400);
    }

    .price-container {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .bttns-card-wrapper {
        flex-direction: column;
    }

    .bttn-count {
        justify-content: space-between;
    }
}

@media (min-height: 800px) {
    main {
        max-height: 700px;
    }
}