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

@import url("https://fonts.googleapis.com/css2?family=Fraunces:wght@700&family=Montserrat:wght@400;500;700&display=swap");

:root {
  font-size: 62.5%; /* 10px base font size */
  --font-montserrat: "Montserrat", sans-serif;
  --font-fraunces: "Fraunces", serif;
  --Green500: hsl(158, 36%, 37%);
  --Green700: hsl(158, 42%, 18%);
  --Black: hsl(212, 21%, 14%);
  --Grey: hsl(228, 12%, 48%);
  --Cream: hsl(30, 38%, 92%);
  --White: hsl(0, 0%, 100%);
}

body {
  background-color: var(--Cream);
}

.container {
  width: 100%;
  height: 100vh;
  background-color: var(--Cream);
  display: flex;
  align-items: center;
  justify-content: center;
}

.grid {
  width: 55rem; /* 550px */
  height: 41.7rem; /* 417px */
}

.product-preview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background-color: white;
  border-radius: 1rem; /* 10px */
}

.product {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-top-left-radius: 1rem; /* 10px */
  border-bottom-left-radius: 1rem; /* 10px */
}
.product-details {
  padding: 22px;
}
.product-details h2 {
  font-size: 1.6rem;
  color: gray;
  text-transform: uppercase;
  letter-spacing: 0.4rem;
  font-family: var(--font-montserrat);
  font-weight: 500;
}
.product-details h1 {
  font-size: 3.2rem;
  font-family: var(--font-fraunces);
  font-weight: 700;
  margin: 2.4rem 0;
}
.product-details p {
  font-size: 1.6rem;
  color: gray;
  font-family: var(--font-montserrat);
  font-weight: 400;
  margin: 0 0 1.6rem 0;
}
.price {
  display: flex;
  align-items: center;
  margin: 1.6rem 0;
}
.price span {
  font-size: 3.2rem;
  font-family: var(--font-fraunces);
  font-weight: 700;
  color: var(--Green500);
  margin-right: 12px;
}
.price del {
  font-size: 1.4rem;
  text-decoration: line-through;
  color: gray;
  font-family: var(--font-montserrat);
  font-weight: 500;
}

button {
  width: 100%;
  background-color: var(--Green500);
  color: white;
  font-size: 1.4rem;
  font-family: var(--font-montserrat);
  font-weight: 700;
  border: none;
  border-radius: 0.5rem; /* 5px */
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease-in-out,
    box-shadow 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.6rem; /* 10px 16px */
}
button:hover,
button:focus-visible {
  transform: scale(1.02);
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);
}
button:active {
  background-color: var(--Green700);
}

.cart {
  width: 1.4rem; /* 14px */
  margin-right: 1rem; /* 10px */
  object-fit: contain;
}


@media (max-width: 475px) {
  body {
    padding: 1rem;
  }
  .container {
    width: 100vw;
    height: 100vh;
  }
  .grid {
    width: 80%;
  }
  .product-preview {
    grid-template-columns: 1fr;
    width: 100%;
    height: auto;
  }
  .product {
    width: 100%;
    height: auto;
    border-top-left-radius: 10px; /* 10px */
    border-top-right-radius: 10px; /* 10px */
    border-bottom-left-radius: 0;
    border-bottom: 0;
  }
}

@media (max-width: 375px) {
  .container {
    width: 100%;
    height: 100%;
  }
  .product-details h1 {
    font-size: 1.8rem;
  }
  .product {
    width: 100%;
    height: auto;
    border-top-left-radius: 10px; /* 10px */
    border-top-right-radius: 10px; /* 10px */
    border-bottom-left-radius: 0;
    border-bottom: 0;
  }
}


.attribution {
  font-size: 1.4rem;
  text-align: center;
}
.attribution a {
  color: hsl(228, 45%, 44%);
}
