@import url("https://fonts.googleapis.com/css2?family=Karla:ital,wght@0,200..800;1,200..800&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,100..900;1,9..144,100..900&family=Karla:ital,wght@0,200..800;1,200..800&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap");
:root {
  --Cream: hsl(30, 38%, 92%);
  --Green: hsl(158, 36%, 37%);
  --Green_dark: hsl(158, 42%, 18%);
}
body {
  font-family: Montserrat, auto;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  margin: 0;
  align-items: center;
  justify-content: center;
  background: var(--Cream);
}
h1,
.price {
  font-weight: bolder;
  font-family: Fraunces, auto;
}
code {
  letter-spacing: 0.5rem;
  font-weight: bold;
  text-transform: uppercase;
}
.price {
  font-size: xx-large;
  color: var(--Green);
}
del {
  font-size: small;
  font-weight: 400;
  color: gray;
  font-family: Montserrat, auto;
}
.info {
  color: grey;
}
main {
  display: grid;
  margin: 1rem;
  grid-template-columns: 1fr 1fr;
  background: white;
  border-radius: 20px;
  overflow: hidden;
  height: clamp(400px, 100%, 700px);
  width: clamp(400px, 100%, 700px);
}
.imgContainer {
  max-width: 100%;
  max-height: 100%;
  min-width: 200px;
  min-height: 200px;
  background-image: url(images/image-product-desktop.jpg);
  background-size: cover;
  background-position: center;
}
.text {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
}
button {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: var(--Green);
  color: white;
  gap: 1rem;
  border-radius: 10px;
  transition: cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.2s;
}
button:active {
  scale: 0.95;
}
@media (max-width: 600px) {
  main {
    grid-template-columns: 1fr;
    width: 90%; /* Лучше адаптируется под разные экраны */
    max-width: 400px;
    grid-template-rows: 240px auto; /* Фиксированная высота для изображения + авто для текста */
  }
  .imgContainer {
    background-image: url(images/image-product-mobile.jpg); /* Мобильная версия картинки */
    min-height: 240px; /* Фиксированная высота */
  }
}
