/* */

:root {
  --heading-font: "Fraunces", serif;
  --body-text-color: hsl(228, 12%, 48%);
  --green: hsl(158, 36%, 37%);
}

html {
  font-family: "Montserrat", serif;
  background-color: hsl(30, 38%, 92%);
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-size: clamp(
    1rem,
    0.8rem + 1vw,
    3rem
  ); /*ensures the font size never goes below 1rem, scales with the viewport, and never exceeds 3rem.*/
  padding: 0;
  margin: 0;
  height: auto;
}
body {
  background-color: hsl(0, 0%, 100%);
  display: flex;
  flex-direction: column;
  border-radius: 1rem;
  align-items: center;
  justify-content: center;
  margin: auto;
  margin-top: 1rem;
  margin-left: 0.8rem;
  margin-right: 0.8rem;
}
.card {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.body {
  /*adjusts text spacing */
  margin: 0 1.5rem 1.5rem 1.5rem;
}
.img-mobile {
  width: 100%;
  border-radius: 1rem 1rem 0 0;
}
.img-desktop {
  display: none;
}
.tagline-perfume {
  text-transform: uppercase;
  letter-spacing: 0.4rem;
  color: var(--body-text-color);
  font-size: 0.7rem;
  margin-top: 1.2rem;
  margin-bottom: -0.5rem;
  font-weight: 500;
}
.title {
  font-family: var(--heading-font);
  font-weight: 700;
  color: hsl(212, 21%, 14%);
  line-height: 1;
}
.description {
  color: var(--body-text-color);
  line-height: 1.5;
  font-weight: 500;
  width: 100%;
  font-size: 0.9rem;
}
.pricing {
  display: flex;
  width: 100%;
  margin: -1.5rem 0 -1rem 0;
  padding: 0;
}
.sale-price {
  color: var(--green);
  font-family: var(--heading-font);
  font-size: 2rem;
  font-weight: 700;
}
.full-price {
  text-decoration: line-through;
  color: var(--body-text-color);
  align-self: center;
  margin-left: 1.5rem;
  font-size: 0.8rem;
  font-weight: 500;
}
.cart {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-items: center;
  width: 100%;
  height: 3rem;
  background-color: var(--green);
  border-radius: 0.51rem;
  color: hsl(0, 0%, 100%);
  font-weight: 700;
  border: transparent;
  text-align: center;
}

.add-to-cart {
  text-align: center;
  margin: auto;
}
.shopping {
  margin-left: auto;
  margin-right: -5rem;
  padding: 0;
  width: 1rem;
}

button:active,
button:hover,
button:focus {
  background-color: hsl(136, 50%, 13%);
  outline: hsl(136, 50%, 13%);
}

@media only screen and (min-width: 760px) {
  html {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin-top: 3rem;
    margin-bottom: 3rem;
  }
  .card {
    display: grid;
    height: 30rem;
    width: 40rem;
  }
  .img-mobile {
    display: none;
  }
  .img-desktop {
    display: grid;
    height: 30rem;
    width: auto;
    border-radius: 1rem 0 0 1rem;
  }
  .body {
    grid-column-start: 3;
    grid-column-end: 5;
    grid-row-start: 1;
    grid-row-end: 5;
    display: flex; /* evenly spaces body text within the grid, may need to adjust margins, etc*/
    flex-direction: column;
    margin-left: 2rem;
    margin-right: 2rem;
    margin-top: 0.4rem;
    margin-bottom: 2rem;
    height: auto;
    justify-content: space-evenly;
  }
  .cart {
    grid-row-start: 3;
    grid-row-end: 4;
  }
  .title {
    font-size: 2.5rem;
  }
  .description {
    margin-top: -0.5rem;
  }
  .add-to-cart {
    font-size: 1rem;
  }
  .shopping {
    width: 1.2rem;
    height: auto;
    padding-right: 2rem;
  }
}
