.books-page {
  background: #f4f6fb;
  color: #1c1654;
  font-family: Inter, sans-serif;
}

.books-page .c-header {
  background: #fff;
}

.books-page .c-header .o-grid,
.books-page .c-site-footer .o-grid {
  max-width: 1240px;
  padding-inline: 32px;
}

.books-page .c-header .o-grid__col,
.books-page .c-site-footer .o-grid__col {
  padding-inline: 0;
}

.books-main {
  padding: 36px 0 80px;
}

.books-wrap {
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 32px;
}

.books-title {
  margin: 0 0 22px;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #1c1654;
}

.books-status {
  margin: 0;
  color: #6d7390;
  font-size: 16px;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}

.book-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 22px 22px 18px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(28, 22, 84, 0.05);
}

.book-card__top {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.book-card__cover {
  width: 112px;
  border-radius: 6px;
  box-shadow: 0 10px 22px rgba(20, 24, 40, 0.16);
  overflow: hidden;
  background: #f3f4f8;
}

.book-card__cover img {
  display: block;
  width: 100%;
  height: auto;
}

.book-card__cover-fallback {
  display: flex;
  align-items: flex-end;
  min-height: 168px;
  padding: 12px;
  background: var(--book-tint, #f8e7d6);
  color: var(--book-ink, #c17a45);
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.book-card__title {
  margin: 0;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #1c1654;
}

.book-card__author {
  margin: 4px 0 0;
  color: #8b90a8;
  font-size: 15px;
  line-height: 1.3;
}

.book-card__ratings {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.book-card__rating {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  column-gap: 8px;
  align-items: start;
}

.book-card__rating-icon {
  display: flex;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.book-card__rating-icon svg {
  display: block;
  width: 18px;
  height: 18px;
}

.book-card__score {
  color: #1c1654;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.book-card__count {
  margin-left: 4px;
  color: #8b90a8;
  font-size: 14px;
  font-weight: 500;
}

.book-card__source {
  display: block;
  margin-top: 1px;
  color: #8b90a8;
  font-size: 13px;
  line-height: 1.2;
}

.book-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.book-card__tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--book-tint);
  color: var(--book-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.book-card__dek {
  margin: 16px 0 0;
  color: #2a2660;
  font-size: 15.5px;
  line-height: 1.55;
}

.book-card__actions {
  margin-top: auto;
}

.book-card__buy-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid #eceef5;
  color: #1c1654;
  font-size: 16px;
  font-weight: 700;
}

.book-card__buy-label svg {
  display: block;
  width: 16px;
  height: 16px;
}

.book-card__stores {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.book-card__store {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #e4e7f0;
  border-radius: 12px;
  background: #fff;
  color: #1c1654;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.book-card__store:hover {
  border-color: #cfd5e4;
}

.book-card__store-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.book-card__store-mark {
  display: flex;
  flex: none;
  width: 18px;
  height: 18px;
}

.book-card__store-mark svg {
  display: block;
  width: 18px;
  height: 18px;
}

.book-card__chevron {
  flex: none;
  color: #b0b6c9;
}

.book-card__list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  margin-top: 12px;
  padding: 12px 16px;
  border: 0;
  border-radius: 14px;
  background: var(--book-button);
  color: var(--book-ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.book-card__list[aria-pressed='true'] {
  box-shadow: inset 0 0 0 1px var(--book-ink);
}

.book-card__list svg {
  display: block;
  width: 16px;
  height: 16px;
}

@media (max-width: 1100px) {
  .books-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .books-page .c-header .o-grid,
  .books-page .c-site-footer .o-grid,
  .books-wrap {
    padding-inline: 16px;
  }

  .books-main {
    padding: 24px 0 56px;
  }

  .books-title {
    font-size: 28px;
  }

  .books-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .book-card {
    padding: 16px;
    border-radius: 22px;
  }

  .book-card__top {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 12px;
  }

  .book-card__cover {
    width: 84px;
  }

  .book-card__title {
    font-size: 20px;
  }
}
