/* =========================
   RESET
========================= */

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

/* =========================
   VARIABLES
========================= */

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

    --font-title: "Fraunces", serif;
    --font-body: "Montserrat", sans-serif;

    --radius: 0.625rem;
}

/* =========================
   BASE
========================= */

body {
    min-height: 100vh;
    padding: 2rem 0.75rem;

    display: grid;
    place-items: center;

    background-color: var(--cream);

    font-family: var(--font-body);
    line-height: 1.5;
    color: var(--black);
}

/* =========================
   CARD
========================= */

.product-card {
    width: 100%;
    max-width: 37.5rem;

    display: flex;
    flex-direction: column;

    background-color: var(--white);

    border-radius: var(--radius);
    overflow: hidden;
}

/* =========================
   IMAGE
========================= */

.product-card__image {
    width: 100%;
}

.product-card__image img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}

/* =========================
   CONTENT
========================= */

.product-card__content {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;

    padding: 1.5rem;
}

.product-card__category {
    font-size: 0.75rem;
    font-weight: 500;

    letter-spacing: 0.3rem;
    text-transform: uppercase;

    color: var(--grey);
}

.product-card__title {
    font-family: var(--font-title);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.product-card__description {
    font-size: 0.875rem;
    color: var(--grey);
}

/* =========================
   PRICES
========================= */

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

.product-card__price-current {
    font-family: var(--font-title);
    font-size: 2rem;
    font-weight: 700;

    color: var(--green-500);
}

.product-card__price-old {
    font-size: 0.875rem;
    color: var(--grey);
}

/* =========================
   BUTTON
========================= */

.product-card__button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;

    width: 100%;

    padding: 0.9rem 1rem;

    border: none;
    border-radius: 0.5rem;

    background-color: var(--green-500);

    color: var(--white);

    font-size: 0.875rem;
    font-weight: 700;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        outline-color 0.2s ease;
}

.product-card__button:hover,
.product-card__button:active {
    background-color: var(--green-700);
}

.product-card__button:focus-visible {
    outline: 3px solid var(--black);
    outline-offset: 3px;
}

.product-card__icon {
    width: 1rem;
    height: 1rem;
}

/* =========================
   SCREEN READER ONLY
========================= */

.sr-only {
    position: absolute;

    width: 1px;
    height: 1px;

    padding: 0;
    margin: -1px;

    overflow: hidden;

    clip: rect(0, 0, 0, 0);

    white-space: nowrap;

    border: 0;
}

/* =========================
   DESKTOP
========================= */

@media (min-width: 600px) {

    .product-card {
        flex-direction: row;
    }

    .product-card__image,
    .product-card__content {
        width: 50%;
    }

    .product-card__content {
        justify-content: space-between;
        padding: 2rem;
    }
}

/* =========================
   REDUCED MOTION
========================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        transition: none !important;
        scroll-behavior: auto !important;
    }
}