/**************************************************/
/* CSS RESET
/**************************************************/

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

* {
    margin: 0;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

input,
button,
textarea,
select {
    font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

#root,
#__next {
    isolation: isolate;
}


/**************************************************/
/* FONTS
/**************************************************/

/* fraunces-700 - latin-ext */
@font-face {
    font-display: swap;
    /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 700;
    src: url('./fonts/fraunces-v31-latin-ext-700.woff2') format('woff2');
    /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* montserrat-500 - latin-ext */
@font-face {
    font-display: swap;
    /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 500;
    src: url('./fonts/montserrat-v29-latin-ext-500.woff2') format('woff2');
    /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* montserrat-700 - latin-ext */
@font-face {
    font-display: swap;
    /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 700;
    src: url('./fonts/montserrat-v29-latin-ext-700.woff2') format('woff2');
    /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}


/**************************************************/
/* VARIABLES
/**************************************************/

:root {
    --white: hsl(0, 0%, 100%);
    --gunmetal: hsl(212, 21%, 14%);
    --cream: hsl(30, 38%, 92%);
    --aurometal_saurus: hsl(228, 12%, 48%);
    --deep_aquamarine: hsl(158, 36%, 37%);
    --deep_aquamarine_hover: hsl(158, 42%, 18%);
}


/**************************************************/
/* GENERAL
/**************************************************/

html,
:root {
    font-size: 10px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    min-height: 100vh;
    position: relative;
    background-color: var(--cream);
    font-size: 1.4rem;
    line-height: 2.3rem;
    color: var(--aurometal_saurus);
    font-family: 'Montserrat';
    padding: 2.8rem 1.6rem;
}

img {
    max-inline-size: 100%;
    block-size: auto;
}

.attribution {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    -webkit-transform: translateX(-50%);
    -ms-transform: translateX(-50%);
    transform: translateX(-50%);
    font-size: 1.1rem;
    text-align: center;
    color: var(--gunmetal);
}

.attribution a {
    color: var(--deep_aquamarine);
}


/**************************************************/
/* TYPOGRAPHY
/**************************************************/

h1,
h2 {
    font-size: 3.2rem;
    font-family: 'Fraunces';
    font-weight: 700;
    line-height: 3.2rem;
    color: var(--gunmetal);
    margin-bottom: 2.4rem;
}


p {
    margin-bottom: 3rem;
}

p.product__cat {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: .5rem;
}

ins {
    text-decoration: none;
}


/**************************************************/
/* CLASSES
/**************************************************/

.d-flex {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
}

.flex-column {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
}

.justify-content-center {
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
}

.align-items-center {
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.color--green {
    color: var(--deep_aquamarine);
}


/**************************************************/
/* PRODUCT
/**************************************************/

.product {
    max-width: 60rem;
    width: 100%;
    border-radius: 1rem;
    overflow: hidden;
    background-color: var(--white);
}

.product__img,
.product__content {
    width: 50%;
}

.product__img img {
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
    object-fit: cover;
}

.product__content {
    padding: 3.2rem;
}

button {
    gap: 1.2rem;
    border: 0;
    background-color: var(--deep_aquamarine);
    color: var(--white);
    width: 100%;
    line-height: 100%;
    border-radius: .8rem;
    padding: 1.6rem;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-transition: background-color .3s;
    -o-transition: background-color .3s;
    transition: background-color .3s;
}

button:hover {
    background-color: var(--deep_aquamarine_hover);
    cursor: pointer;
}

button:focus,
button:focus-within {
    -webkit-box-shadow: 0 0 2rem rgba(61, 129, 104, .75);
    box-shadow: 0 0 2rem rgba(61, 129, 104, .75);
}

.product__price {
    gap: 2rem;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    margin-bottom: 3rem;
}


/**************************************************/
/* RESPONSIVE
/**************************************************/

@media only screen and (min-width: 641px) {
    .img-mobile {
        display: none;
        visibility: hidden;
        opacity: 0;
    }
}

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

    h1,
    h2 {
        margin-bottom: 1.6rem;
    }

    p {
        margin-bottom: 2.4rem;
    }

    p.product__cat {
        font-size: 1.2rem;
        margin-bottom: 1.2rem;
    }

    .product {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
    }

    .product__img {
        aspect-ratio: 343 / 240;
        overflow: hidden;
    }

    .product__img,
    .product__content {
        width: 100%;
    }

    .product__content {
        padding: 2.4rem;
    }

    .img-desktop {
        display: none;
        visibility: hidden;
        opacity: 0;
    }
}