/* ═══════════════════════════════════════════════
   books.css — Страница каталога книг
   ═══════════════════════════════════════════════ */

/* ── Breadcrumb ── */
.breadcrumb-bar {
  background: #fff;
  border-bottom: 1px solid var(--border-light);
  padding: 10px 0;
}
.breadcrumb {
  margin: 0;
  font-size: 12px;
  font-family: 'Montserrat', sans-serif;
}
.breadcrumb-item a {
  color: var(--green-mid);
  text-decoration: none;
}
.breadcrumb-item a:hover { text-decoration: underline; }
.breadcrumb-item.active { color: var(--text-gray); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-gray); }

/* ── Page wrap ── */
.books-page-wrap {
  padding: 40px 0 60px;
  background: var(--gray-bg);
}

/* ── Book card ── */
.book-list-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: stretch;
  overflow: hidden;
  transition: box-shadow var(--tr), transform var(--tr);
  position: relative;
  cursor: pointer;
}
.book-list-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

/* ── Cover (left) ── */
.book-list-cover {
  flex-shrink: 0;
  width: 140px;
  background: #eef4f0;
  overflow: hidden;
  position: relative;
}
.book-cover-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 200px;
  cursor: pointer;
}
.book-cover-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.4s ease;
}
.book-list-card:hover .book-cover-link img {
  transform: scale(1.04);
}
.book-cover-link .no-cover {
  width: 100%;
  height: 100%;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.book-cover-link .no-cover i {
  font-size: 40px;
  color: rgba(27,77,53,0.18);
}


/* ── Info (right) ── */
.book-list-info {
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.book-list-title {
  font-family: 'KZBookman', serif;
  font-size: 16px;
  font-weight: normal;
  color: var(--green-dark);
  line-height: 1.4;
  margin-bottom: 5px;
}

.book-list-title a {
  color: inherit;
  text-decoration: none;
}

.book-list-author {
  font-size: 13px;
  font-weight: 600;
  color: var(--green-mid);
  margin-bottom: 12px;
}

.book-list-desc {
  font-size: 12.5px;
  color: var(--text-gray);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  margin-bottom: 16px;
}

.book-list-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.book-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 20px;
  white-space: nowrap;
}
.book-tag-cat {
  background: #e8f2ec;
  color: var(--green-dark);
}
.book-tag-year {
  background: #fdf5e0;
  color: #8a6f1a;
  border: 1px solid #e8d690;
}

/* ── Pagination ── */
.books-pagination {
  margin-top: 36px;
  display: flex;
  justify-content: center;
}
.books-pagination .page-link {
  color: var(--green-dark);
  border-color: var(--border-light);
  font-size: 13px;
  font-family: 'Montserrat', sans-serif;
}
.books-pagination .page-item.active .page-link {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: #fff;
}
.books-pagination .page-link:hover {
  background: #f0f7f3;
  color: var(--green-mid);
}

/* ── Responsive ── */
@media (max-width: 575px) {
  .book-list-cover { width: 100px; }
  .book-cover-link { min-height: 160px; }
  .book-cover-link .no-cover { min-height: 160px; }
  .book-list-title { font-size: 14px; }
  .book-list-info { padding: 14px 14px; }
}

/* ══ BOOKS TOOLBAR ═══════════════════════════════════════ */
.books-toolbar {
  background: #fff;
  border-bottom: 1px solid #e8ede9;
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: 0 2px 8px rgba(27,77,53,.06);
}

.books-toolbar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Tabs */
.books-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.books-tab {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 18px;
  border-radius: 20px;
  border: 1.5px solid #d1dbd5;
  background: #fff;
  color: var(--green-mid);
  cursor: pointer;
  transition: background .18s, border-color .18s, color .18s;
  white-space: nowrap;
}

.books-tab:hover {
  border-color: var(--green-mid);
  background: #f0f7f2;
}

.books-tab.active {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: #fff;
}

/* Search */
.books-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-bg);
  border: 1.5px solid #d1dbd5;
  border-radius: 20px;
  padding: 6px 14px;
  flex: 1;
  min-width: 200px;
  max-width: 360px;
  transition: border-color .18s;
}

.books-search-wrap:focus-within {
  border-color: var(--green-mid);
  background: #fff;
}

.books-search-wrap .bi-search {
  color: var(--green-mid);
  font-size: 14px;
  flex-shrink: 0;
}

.books-search-wrap input {
  border: none;
  background: transparent;
  outline: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  color: #333;
  flex: 1;
  min-width: 0;
}

.books-search-wrap input::placeholder { color: #aaa; }

.books-search-clear {
  background: none;
  border: none;
  padding: 0;
  color: #999;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 15px;
  flex-shrink: 0;
}

.books-search-clear:hover { color: var(--green-dark); }

@media (max-width: 575px) {
  .books-toolbar-inner { gap: 10px; }
  .books-tab { font-size: 12px; padding: 6px 13px; }
  .books-search-wrap { max-width: 100%; }
}
