:root {
  /* Colors */
  --clr-dark-cyan: hsl(158, 36%, 37%);
  --clr-dark-green: hsl(158, 36%, 20%);
  --clr-cream: hsl(30, 38%, 92%);

  --clr-dark-blue: hsl(212, 21%, 14%);
  --clr-dark-grayish-blue: hsl(228, 12%, 48%);
  --clr-white: hsl(0, 0%, 100%);

  /* Fonts */
  --ff-fraunces: "Fraunces", serif;
  --ff-montserrat: "Montserrat", sans-serif;

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

/*
  CSS reset by Josh Comeau
  1. Use a more-intuitive box-sizing model.
*/
*,
*::before,
*::after {
  box-sizing: border-box;
}
/*
  2. Remove default margin
*/
* {
  margin: 0;
}
/*
  3. Allow percentage-based heights in the application
*/
html,
body {
  height: 100%;
}
/*
  Typographic tweaks!
  4. Add accessible line-height
  5. Improve text rendering
*/
body {
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
/*
  6. Improve media defaults
*/
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}
/*
  7. Remove built-in form typography styles
*/
input,
button,
textarea,
select {
  font: inherit;
}
/*
  8. Avoid text overflows
*/
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  line-height: 1;
}

/* General Styling */
body {
  font-family: var(--ff-montserrat);
  font-weight: var(--fw-reg);
  font-size: 0.875rem;
  color: var(--clr-dark-grayish-blue);
  background-color: var(--clr-cream);

  display: grid;
  place-content: center;
  margin: 1rem;
}

/* Utilities */
.flex-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.visually-hidden:not(:focus):not(:active) {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

/* Button */
.button {
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;

  border: 0;
  border-radius: 8px;
  padding: 0.75em 1.5em;
  background-color: var(--clr-dark-cyan);
  color: var(--clr-white);
  font-weight: var(--fw-bold);
  font-size: 0.925rem;
}

.button[data-icon="shopping-cart"]::before {
  content: "";
  background-image: url(images/icon-cart.svg);
  width: 15px;
  height: 16px;
}

.button:is(:hover, :focus) {
  background-color: var(--clr-dark-green);
}

/* Product Styles */
.product {
  display: grid;
  background-color: var(--clr-white);
  border-radius: 8px;
  overflow: hidden;
  max-width: 600px;
}

@media (min-width: 600px) {
  .product {
    grid-template-columns: 1fr 1fr;
  }
}

.product-content {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
}

.product-category {
  font-size: 0.8125rem;
  letter-spacing: 5px;
  text-transform: uppercase;
}

.product-title {
  font-size: 2rem;
  font-family: var(--ff-fraunces);
  color: var(--clr-dark-blue);
}

.product-price {
  font-size: 2rem;
  font-family: var(--ff-fraunces);
  color: var(--clr-dark-cyan);
  font-weight: var(--fw-bold);
}

/* Footer */
.attribution {
  font-size: 11px;
  text-align: center;
  margin-top: 4px;
}

.attribution a {
  color: hsl(228, 45%, 44%);
}
