@charset "UTF-8";
.book-card {
  width: 190px;
  border-radius: 20px;
  border: 1px solid rgba(21, 54, 38, 0.25);
  text-decoration: none;
  gap: 6px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.book-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  border: 1.2px solid rgba(21, 54, 38, 0.6);
}
@media (max-width: 550px) {
  .book-card {
    height: 213px;
    width: 140px;
  }
}

.picture-book {
  height: 65%; /* Сохраняем пропорции */
  max-height: 200px; /* Ограничение высоты */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle, white, rgba(98, 167, 124, 0.5));
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  border-top: none;
  border-bottom: 1px solid rgba(21, 54, 38, 0.25);
}
@media (max-width: 550px) {
  .picture-book {
    height: 60%; /* Сохраняем пропорции */
    max-height: 200px; /* Ограничение высоты */
  }
}

.img-book {
  height: 90%;
  width: auto;
  object-fit: contain;
  border-radius: 10px;
  border: none;
}

.main-book-card {
  padding: 0 10px 0;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
}
@media (max-width: 550px) {
  .main-book-card {
    gap: 3px;
  }
}

.title-book {
  min-height: 2.4em;
  max-height: 2.4em;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.title-book h3 {
  text-align: center;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2; /* Ограничиваем заголовок 2 строками */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal; /* Позволяем перенос слов */
  word-break: break-word; /* Перенос длинных слов */
  min-height: 2.4em; /* Две строки высотой примерно 1.4em каждая */
}
@media (max-width: 550px) {
  .title-book {
    min-height: 1.8em;
    max-height: 1.8em;
  }
  .title-book h3 {
    min-height: 1.8em;
  }
}

.descrip-book-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.descrip-book-card .limited-line {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1; /* Ограничиваем одной строкой */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  max-height: 1.4em; /* Высота строки */
}
