/* ============================================================
   books.css — Styles specific to books.html
   ============================================================ */

/* Active nav link */
.nav-active {
  color: var(--blue) !important;
  background: rgba(37, 99, 235, .07);
  border-radius: 8px;
}

/* ---- Page hero ---- */
.page-hero {
  background: var(--white);
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--gray-100);
  position: relative;
}

.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .06) 1px, transparent 1px);
  background-size: 52px 52px;
  pointer-events: none;
}

.page-hero .container { position: relative; z-index: 1; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .83rem;
  font-weight: 500;
  color: var(--gray-500);
  margin-bottom: 20px;
  transition: color var(--ease);
}

.back-link:hover { color: var(--blue); }

.page-hero h1 {
  font-size: 2.4rem;
  color: var(--gray-900);
  letter-spacing: -.03em;
  margin-bottom: 14px;
}

.page-hero p {
  font-size: .97rem;
  color: var(--gray-500);
  line-height: 1.75;
  max-width: 620px;
  margin-bottom: 30px;
}

/* Filter bar */
.books-filter-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.bfilter {
  background: none;
  border: 1.5px solid var(--gray-100);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  font-family: var(--sans);
  transition: all var(--ease);
}

.bfilter:hover { border-color: var(--gray-300); color: var(--gray-900); }

.bfilter.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

/* ---- Main content ---- */
.books-main {
  padding: 64px 0 96px;
  background: var(--gray-50);
}

/* ---- Full book card ---- */
.books-full-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.book-full-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 32px;
  padding: 32px;
  transition: box-shadow .25s ease, border-color .25s ease;
}

.book-full-card:hover {
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.book-full-card.is-hidden {
  display: none;
}

/* Cover */
.bfc-cover {
  width: 80px;
  min-width: 80px;
  height: 108px;
  border-radius: 5px 8px 8px 5px;
  background: var(--c, #2563eb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 800;
  color: rgba(255, 255, 255, .9);
  letter-spacing: .05em;
  box-shadow: -4px 4px 12px rgba(0,0,0,.2), inset -3px 0 6px rgba(0,0,0,.15);
  position: relative;
  flex-shrink: 0;
}

.bfc-cover::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0; bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, .15);
}

/* Body */
.bfc-body { flex: 1; min-width: 0; }

.bfc-meta { margin-bottom: 8px; }

.bfc-body h2 {
  font-size: 1.2rem;
  color: var(--gray-900);
  margin-bottom: 5px;
  line-height: 1.35;
}

.bfc-author {
  font-size: .82rem;
  color: var(--gray-500);
  margin-bottom: 14px;
  display: block;
}

.bfc-author em { font-style: italic; }

.bfc-desc {
  font-size: .88rem;
  color: var(--gray-700);
  line-height: 1.75;
  margin-bottom: 14px;
}

.bfc-buy-btn {
  display: inline-block;
  margin-top: 14px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--blue);
  transition: opacity var(--ease);
}

.bfc-buy-btn:hover { opacity: .7; }

/* Responsive */
@media (max-width: 640px) {
  .book-full-card {
    flex-direction: column;
    gap: 20px;
    padding: 22px;
  }

  .bfc-cover {
    width: 64px;
    min-width: 64px;
    height: 86px;
  }

  .page-hero h1 { font-size: 1.7rem; }
}
