@import url("https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,100..900;1,9..144,100..900&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap");

:root {
    --green500: hsl(158, 36%, 37%);
    --green700: hsl(158, 42%, 18%);
    --black: hsl(212, 21%, 14%);
    --grey: hsl(228, 12%, 48%);
    --cream: hsl(30, 38%, 92%);
    --white: hsl(0, 0%, 100%);
}

body {
    display: flex;
    flex-direction: column;
    font-family: Montserrat, sans-serif;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
    background-color: var(--cream);
}

.card {
    display: flex;
    flex-direction: column; /* Default to column layout */
    max-width: 400px;
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    color: var(--grey);
}

.card__image img {
    width: 100%;
    display: block;
}

.card__text {
    display: flex;
    flex-direction: column;
    padding: 30px 25px 25px 25px;
}

.product-type {
    text-transform: uppercase;
    letter-spacing: 0.2rem;
}

.product__prices {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.price, .product-name {
    font-family: Fraunces, serif;
}

.product-name {
    font-size: 30px;
    color: var(--black);
    margin-top: 20px;
}

.product-description {
    margin-top: 20px;
    font-size: 14px;
    line-height: 150%;
}

.price {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--green500);
}

.reduced-from {
    text-decoration: line-through;
}

.buy-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--green500);
    color: var(--white);
    font-family: inherit;
    border: none;
    padding: 0.75rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
}

.buy-button:hover {
    background-color: var(--green700);
}

.buy-button img {
    width: 16px;
    height: 16px;
}

@media (min-width: 600px) {
    .card {
        flex-direction: row; 
        max-width: 800px;
    }

    .card__image {
        flex: 1;    
    }

    .card__text {
        flex: 1;    
        padding: 2rem;
    }

    .card__image img {
        height: 100%;
        object-fit: cover;
    }
}

footer {
    margin-top: 8px;
    opacity: 0.7;
}