:root {
  --clr-Green500: hsl(158, 36%, 37%);
  --clr-Green700: hsl(158, 42%, 18%);
  --clr-Black: hsl(212, 21%, 14%);
  --clr-Grey: hsl(228, 12%, 48%);
  --clr-Cream: hsl(30, 38%, 92%);
  --clr-White: hsl(0, 0%, 100%);

  --ff-Montserrat: "Montserrat";
  --ff-Fraunces: "Fraunces";

  --fw-regular: 500;
  --fw-bold: 700;
}

/* 1. Use a more-intuitive box-sizing model */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 2. Remove default margin */
* {
  margin: 0;
}

/* 3. Enable keyword animations */
@media (prefers-reduced-motion: no-preference) {
  html {
    interpolate-size: allow-keywords;
  }
}

body {
  /* 4. Add accessible line-height */
  line-height: 1.7;
  /* 5. Improve text rendering */
  -webkit-font-smoothing: antialiased;
}

/* 6. Improve media defaults */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/* 7. Inherit fonts for form controls */
input,
button,
textarea,
select {
  font: inherit;
}

/* 8. Avoid text overflows */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* 9. Improve line wrapping */
p {
  text-wrap: pretty;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}
h1,
h2,
h3 {
  line-height: 1;
}

/*
  10. Create a root stacking context
*/
#root,
#__next {
  isolation: isolate;
}

/* general styling */
body {
  font-family: var(--ff-Fraunces);
  font-weight: var(--fw-regular);
  font-size: 0.875rem;
  color: var(--clr-Grey);
  background-color: var(--clr-Cream);

  /* for this project */
  display: grid;
  place-content: center;
  min-height: 100vh;
  margin: 1rem;
}
/* product styling */
.product {
  --content-padding: 1.5rem;
  --content-spacing: 1rem;

  display: grid;
  background-color: var(--clr-White);
  border-radius: 0.5rem;
  max-width: 600px;
  overflow: hidden;
}
@media (min-width:600px){
  .product{
    --content-padding:2rem;
    grid-template-columns: 1fr 1fr;  
  }
}
.product__content {
  display: grid;
  gap: var(--content-spacing);
  padding: var(--content-padding);
}
/* button */
.button {
  cursor: pointer;
  font-family: var(--ff-Montserrat);
  font-weight: var(--fw-bold);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;

  border: none;
  border-radius: 0.5rem;
  padding: 0.75rem 1.5rem;
  background-color: var(--clr-Green500);
  color: var(--clr-White);
  font-size: 0.925rem;
}
.button[data-icon="shopping__cart"]::before {
  content: "";
  width: 15px;
  height: 1rem;
  background-image: url("images/icon-cart.svg");
}
.button:is(:hover, :focus) {
  background-color: var(--clr-Green700);
}

/* flex use */
.price-flex {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}
.product__category {
  font-family: var(--ff-Montserrat);
  font-weight: var(--fw-regular);
  letter-spacing: 0.3125rem;
}
.product__title {
  font-family: var(--ff-Fraunces);
  font-size: 2rem;
  color: var(--clr-Black);
}
.current__price {
  font-family: var(--ff-Fraunces);
  font-size: 2rem;
  color: var(--clr-Green500);
  font-weight: var(--fw-bold);
}
.visually-hidden:not(:focus):not(:active) {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  width:1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
}
