.book-collection {
  background: var(--soft);
}

.book-catalog {
  padding-block: clamp(32px, 4vw, 56px) clamp(46px, 6vw, 84px);
}

.book-collection .section-top p {
  max-width: 34em;
  text-wrap: balance;
}

.book-collection .book-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.book-collection .book-card {
  display: grid;
  grid-row: auto;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 0;
  align-items: start;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafbf9;
}

.book-collection .book-art {
  display: grid;
  place-items: end center;
  min-height: 0;
  padding: 0;
  overflow: visible;
  background: transparent;
}

.book-collection .book-art img {
  display: block;
  width: min(100%, 148px);
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: contain;
  filter: drop-shadow(0 5px 7px rgb(25 27 25 / .18));
}

.book-collection .book-art:hover img {
  transform: none;
}

.book-collection .book-category {
  margin: 19px 0 7px;
}

.book-collection .book-card h3 {
  font: 600 clamp(1.22rem, 1.5vw, 1.45rem) / 1.22 var(--serif);
}

.book-collection .book-card p {
  margin-top: 9px;
  font-size: .94rem;
}

.book-collection .book-card :is(h3, p, .book-category) {
  text-align: start;
  -webkit-hyphens: auto;
  hyphens: auto;
  overflow-wrap: break-word;
}

.book-collection .book-card .text-link {
  align-self: end;
  justify-self: start;
  margin-top: 13px;
  padding-top: 0;
}

@media (min-width: 621px) {
  @supports (grid-template-rows: subgrid) {
    .book-collection .book-grid { row-gap: 0; }
    .book-collection .book-card {
      grid-row: span 5;
      grid-template-rows: subgrid;
      margin-block-end: 22px;
    }
  }
}

@media (max-width: 1149px) {
  .book-collection .book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 859px) {
  .book-collection .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .book-collection .book-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .book-collection .book-card {
    grid-template-columns: clamp(64px, 21vw, 108px) minmax(0, 1fr);
    grid-template-rows: repeat(4, auto);
    gap: 0 14px;
    padding: 14px;
  }
  .book-collection .book-art {
    grid-area: 1 / 1 / 5;
    align-self: start;
  }
  .book-collection .book-card > :not(.book-art) { grid-column: 2; }
  .book-collection .book-category { margin-top: 0; }
  .book-collection .book-card h3 { font-size: 1.22rem; }
  .book-collection .book-card p { margin-top: 7px; }
  .book-collection .book-card .text-link { margin-top: 10px; }
}

@media (max-width: 580px) {
  .book-collection .book-category { font-size: .75rem; line-height: 1.5; }
  .book-collection .book-card p { line-height: 1.6; }
  .book-collection .book-card .text-link { font-size: .875rem; gap: 9px; }
  .book-collection .book-card .link-arrow { width: 21px; height: 21px; }
}

@media (max-width: 360px) {
  .book-collection .book-card .link-arrow { width: 18px; height: 18px; }
}
