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

:root {
  --green-500: hsl(158, 36%, 37%);
  --green-700: hsl(158, 42%, 18%);

  --black: hsl(212, 21%, 14%);
  --grey: hsl(228, 12%, 48%);
  --cream: hsl(30, 38%, 92%);
  --white: hsl(0, 0%, 100%);

  --font-family-montserrat: "Montserrat", sans-serif;
  --font-family-fraunces: "Fraunces", serif;
}

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

body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  font-size: 14px;
  font-family: var(--font-family-montserrat);
  padding: 1rem;
  background-color: var(--cream);
}

.card {
  display: flex;
  align-items: stretch;
  max-width: 40rem;
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
  background-color: var(--white);
  border-radius: 1.5rem;
}

.image-container {
  flex: 0 0 50%;
}

.image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-top-left-radius: 1.5rem; /* Скругление верхнего левого угла */
  border-bottom-left-radius: 1.5rem; /* Скругление нижнего левого угла */
  display: block;
}

.content-container {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  box-sizing: border-box;
  flex: 0 0 50%;
  padding: 2rem;
}

.name {
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--grey);
}

.fullname {
  font-family: var(--font-family-fraunces);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
}

.description {
  color: var(--grey);
  line-height: 1.3;
  font-size: 16px;
}

.price {
  font-family: var(--font-family-fraunces);
  font-size: 2rem;
  color: var(--green-500);
  display: inline-block; /* Размещает в одной строке */
  margin-right: 1rem; /* Отступ между ценами */
}

.oldprice {
  font-family: var(--font-family-montserrat);
  font-size: 0.9rem;
  color: var(--grey);
  text-decoration: line-through; /* Зачёркивание */
  display: inline-block; /* Размещает в одной строке */
  vertical-align: middle; /* Выравнивание по вертикали */
  position: relative;
  top: -2px; /* Тонкая настройка выравнивания */
}

.price-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem; /* Отступ между ценами */
}

.cart-icon {
  height: 16px;
  display: inline-block;
  padding-right: 1rem;
}

.cart {
  color: var(--white);
  background-color: var(--green-500);
  border-radius: 0.7rem;
  font-size: 1rem;
  font-weight: 600;
  padding: 1.2rem;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

@media (max-width: 650px) {
  .card {
    flex-direction: column;
    max-width: 400px;
    margin: 1rem auto;
  }

  .image-container {
    flex: 0 0 40vh; /* Фиксированная высота для мобильных */
    width: 100%;
    overflow: hidden;
  }

  .fullname {
    font-size: 2rem;
    padding: 1rem 0;
  }

  .price {
    padding: 1rem 0;
  }
}
