@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");

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

*:not(html, body) {
  /* border: 1px dashed blue; */
}

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

  --Montserrat: "Montserrat", sans-serif;
  --Fraunces: "Fraunces", serif;

  --Montserrat-bold: 700;
  --Montserrat-medium: 500;

  --Fraunces-bold: 700;
}

body {
  block-size: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 0.8rem;
  background-color: var(--Cream);
}

main {
  inline-size: 93%;
  max-inline-size: 550px;
  margin: 6em auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: calc(10px + 0.5vw);
  background-color: var(--White);
}

.product-image {
  inline-size: 100%;
  border-radius: calc(10px + 0.5vw) calc(10px + 0.5vw) 0 0;
  overflow: hidden;
  background-color: yellowgreen;
}

picture img {
  inline-size: 100%;
  block-size: 100%;
}

section {
  inline-size: 100%;
  display: flex;
  flex-direction: column;
  gap: 2em;
  padding: 2em;
}

h1,
.discount-price {
  font-family: var(--Fraunces);
  font-weight: var(--Fraunces-bold);
}

p,
span,
.attribution {
  font-family: var(--Montserrat);
  font-weight: var(--Montserrat-medium);
  color: var(--Grey);
}

section h1 {
  font-size: 2rem;
  line-height: 1em;
  color: var(--Black);
}

span.category {
  text-transform: uppercase;
  letter-spacing: 0.5ch;
}

.price-container {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  gap: 1em;
}

section .discount-price {
  font-size: 2.1rem;
  color: var(--Green-500);
}

section .original-price {
  text-decoration: line-through;
}

button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5em;
  background-color: var(--Green-500);
  border: none;
  padding: 1.2em 2em;
  border-radius: calc(0.2em + 0.5vw);
}

button span {
  color: var(--White);
  font-family: var(--Montserrat);
  font-weight: var(--Montserrat-bold);
}

.icon path {
  fill: var(--White);
}

button:hover {
  background-color: var(--Green-700);
  cursor: pointer;
}

.attribution {
  font-size: 0.8rem;
  text-align: center;
}
.attribution a {
  color: var(--Green-500);
  text-decoration: none;
}

@media (min-width: 43em) {
  main {
    flex-direction: row;

    margin: auto;
  }

  .product-image {
    inline-size: 50%;
    block-size: 100%;
    border-radius: calc(10px + 0.5vw) 0 0 calc(10px + 0.5vw);
  }

  section {
    inline-size: 50%;
    block-size: 100%;
    justify-content: center;
  }
}
