: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%);
}

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

html,
body {
  height: 100vh;
  width: 100%;
  font-family: sans-serif;
  line-height: 1.5;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Outfit:wght@500;700&display=swap");
@font-face {
  font-family: "Fraunces";
  src: url("./fonts/Fraunces[SOFT,WONK,opsz,wght].woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
body {
  font-family: "Montserrat", sans-serif;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
  background-color: var(--cream);
  display: flex;
  justify-content: center;
  align-items: center;
}

article {
  display: flex;
  flex-direction: column;
  width: 90%;
  max-width: 600px;
  margin: auto;
  border-radius: 1rem;
  background-color: var(--white);
  height: auto;
}

h4 {
  text-transform: uppercase;
  letter-spacing: 0.3rem;
  color: var(--grey);
}

figure {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
  width: 100%;
  margin: 0;
}

figure picture,
figure img {
  display: block;
  border-radius: 1rem 1rem 0 0;
  width: 100%;
}

h1,
.price {
  font-family: "Fraunces", serif;
  font-optical-sizing: auto;
  font-weight: 700;
  font-variation-settings: "SOFT" 50, "WONK" 1;
  font-size: 1.8rem;
  line-height: 1.8rem;
}

section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 2rem;
}

p {
  color: var(--grey);
}

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

.price {
  color: var(--green-500);
}

.old-price {
  text-decoration: line-through;
  font-size: 0.8rem;
  color: var(--grey);
}

button {
  background-color: var(--green-500);
  border-radius: 0.5rem;
  border: none;
  padding: 1rem 4rem;
  color: var(--white);
  font-weight: 700;
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 0.8rem;
}

button:hover,
button:focus,
button:active {
  background-color: var(--green-700);
  border-style: outset;
  border: 0;
  outline: none;
}

.icon {
  display: inline-block;
  width: 0.8rem;
  height: 0.8rem;
  background-size: cover;
}

.icon-cart {
  background-image: url("./images/icon-cart.svg");
}

@media (min-width: 27rem) {
  body {
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100vh;
  }
  article {
    flex-direction: row;
    border-radius: 0;
    height: auto;
  }

  article > * {
    flex: 1;
  }

  figure {
    height: 100%;
  }

  figure picture,
  figure img {
    display: block;
    border-radius: 0;
    width: 100%;
    min-height: 100%;
  }

  section {
    justify-content: space-around;
    padding: 1rem;
  }
}
