:root {
  --black: hsl(212, 21%, 14%);
  --grey: hsl(228, 12%, 48%);
  --cream: hsl(30, 38%, 92%);
  --white: hsl(0, 0%, 100%);
  --green-500: hsl(158, 36%, 37%);
  --green-700: hsl(158, 42%, 18%);
  --spacing-40: 2.5rem;
  --spacing-32: 2rem;
  --spacing-24: 1.5rem;
  --spacing-16: 1rem;
  --spacing-8: 0.5rem;
  --spacing-4: 0.25rem;
  --font-size-32: 2rem;
  --font-size-14: 0.875rem;
  --font-size-13: 0.8125rem;
  --font-size-12: 0.75rem;
  --fraunces: "Fraunces", serif;
  --montserrat: "Montserrat", sans-serif;
}

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

h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
li {
  margin-top: 0;
}

body {
  background-color: var(--cream);
  font-family: var(--montserrat);
  color: var(--grey);
  font-weight: 400;
  width: 100%;
  margin: auto;
}

.product-preview-card {
  margin: 5rem 0.78125rem;
  border-radius: 0.5rem;
  background-color: var(--white);
}

.product-img {
  width: 100%;
  border-radius: 0.5rem 0.5rem 0 0;
}

.product-type {
  line-height: 120%;
  letter-spacing: 0.3125rem;
  font-size: var(--font-size-12);
}

.product-listing {
  padding: var(--spacing-32);
  display: flex;
  flex-direction: column;
}

.product-name {
  font-family: var(--fraunces);
  font-weight: 700;
  font-size: var(--font-size-32);
  color: var(--black);
}

.product-description {
  line-height: 160%;
  font-size: var(--font-size-14);
}

.price {
  display: flex;
  align-items: baseline;
}

.sale-price {
  font-family: var(--fraunces);
  font-size: var(--font-size-32);
  color: var(--green-500);
}

.product-description,
.price {
  margin-bottom: var(--spacing-24);
}

.original-price {
  font-size: var(--font-size-13);
  line-height: 120%;
  margin-left: var(--spacing-16);
  align-self: center;
}

.product-type,
.product-description,
.original-price {
  font-weight: 500;
}

.add-to-cart {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 3.125rem;
  border-radius: 0.5rem;
  border: solid 0 transparent;
  background-color: var(--green-500);
  color: var(--white);
  font-family: var(--montserrat);
  font-weight: 700;
  gap: var(--spacing-8);
}

footer,
footer a {
  text-align: center;
  font-size: var(--font-size-12);
  color: var(--grey);
  text-decoration: none;
}

footer {
  font-weight: 500;
}

footer a {
  font-weight: 700;
}

footer a:hover {
  color: var(--green-500);
  text-decoration: underline;
}

@media screen and (min-width: 768px) {
  body {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    height: 100vh;
  }

  .product-preview-card {
    width: 37.5rem;
    min-height: 28.5rem;
    display: flex;
  }

  .product-listing {
    max-width: 50%;
  }
  .product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.5rem 0 0 0.5rem;
  }
}

@media (hover: hover) {
  .add-to-cart:hover {
    background-color: var(--green-700);
  }
}
