@import url('https://fonts.googleapis.com/css2?family=Montserrat&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Fraunces&display=swap');

:root {
    --color-bg: hsl(30, 38%, 92%);
    --color-white: hsl(0, 0%, 100%);
    --color-primary: hsl(158, 36%, 37%);
    --color-primary-dark: hsl(158, 42%, 18%);
    --color-text-muted: hsl(228, 12%, 48%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    background-color: var(--color-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: clamp(0.75rem, 1vw, 0.875rem);
    height: 100vh;
    padding: 0;
}

.card {
    display: flex;
    flex-direction: row;
    width: clamp(20rem, 50vw, 34.375rem);
    border-radius: 0.75rem;
    overflow: hidden;
}

.image,
.specs {
    width: 50%;
}

.image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-width: 18.75rem;
}

.specs {
    background-color: var(--color-white);
    display: flex;
    flex-direction: column;
    gap: 0.9375rem;
    padding: 1.875rem;
}

.category,
.desc {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.specs h1 {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: clamp(1.75rem, 4vw, 2.1875rem);
    line-height: 1;
}

.price {
    display: flex;
    gap: 1.125rem;
    font-family: 'Fraunces', serif;
    font-weight: 700;
    align-items: center;
}

.new {
    color: var(--color-primary);
    font-size: clamp(1.75rem, 4vw, 2.1875rem);
}

.old {
    color: var(--color-text-muted);
    text-decoration: line-through;
}

.sale {
    background-color: var(--color-primary);
    padding: 0.9375rem 0.625rem;
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1rem;
}

.sale .icon {
    width: 1rem;
    height: 1rem;
}

.sale:hover {
    background-color: var(--color-primary-dark);
}

@media (max-width: 37.5em) {
    body {
        padding: 1.25rem 0;
        height: auto;
        font-size: clamp(0.75rem, 1vw, 0.875rem);
    }

    .card {
        flex-direction: column;
        width: 95%;
        width: 18.125rem;
        margin: 0 auto;
        border-radius: 0.75rem;
        overflow: hidden;
    }

    .image,
    .specs {
        width: 100%;
    }

    .image img {
        content: url('./images/image-product-mobile.jpg');
        max-width: 100%;
        height: auto;
        display: block;
    }

    .specs {
        padding: 1.25rem;
        gap: 0.625rem;
    }

    .specs h1,
    .price .new {
        font-size: clamp(1.25rem, 5vw, 1.5625rem);
    }

    .sale {
        padding: 0.8125rem 0.9375rem;
    }
}