/* ========================================================
   BOOKIFY ARCHIVE — LIBRARY & CATALOG STYLES
   ======================================================== */

.page-container {
  min-height: 100vh;
  padding: 104px 48px 80px;
  max-width: 1360px;
  margin: 0 auto;
}

.library-section {
  width: 100%;
}

.library-header {
  margin-bottom: 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.library-headline-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 1px solid rgba(20, 20, 20, 0.15);
  padding-bottom: 20px;
}

.library-headline {
  font-family: var(--display);
  font-size: 32px;
  font-weight: 700;
  color: var(--cobalt);
  margin-top: 6px;
}

.library-filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.library-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #FFFFFF;
  border: 1px solid rgba(20, 20, 20, 0.2);
  border-radius: 24px;
  padding: 8px 18px;
  width: min(100%, 360px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.library-search-box input {
  border: none;
  outline: none;
  width: 100%;
  font-family: var(--sans);
  font-size: 13px;
  background: transparent;
  color: var(--ink);
}

.genre-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.genre-pill {
  border: 1px solid rgba(20, 20, 20, 0.15);
  background: #FFFFFF;
  padding: 6px 14px;
  border-radius: 20px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.genre-pill:hover {
  border-color: var(--cobalt);
  color: var(--cobalt);
}

.genre-pill.active {
  background: var(--cobalt);
  border-color: var(--cobalt);
  color: #FFFFFF;
}

/* Books Grid */
.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 32px;
}

.book-card {
  background: #FFFFFF;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(20, 20, 20, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
  cursor: pointer;
}

.book-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12);
}

.book-card-cover {
  width: 100%;
  aspect-ratio: 1 / 1.5;
  background-size: cover;
  background-position: center;
  position: relative;
  background-color: #1B3BA8;
  overflow: hidden;
}

.book-card-cover-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 16px;
  box-sizing: border-box;
  color: #ECE8E0;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.2);
}

.book-card-price-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.book-card-price-badge.free {
  background: var(--green);
  color: #FFFFFF;
}

.book-card-price-badge.paid {
  background: var(--cobalt);
  color: #FFFFFF;
}

.book-card-info {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
  gap: 12px;
}

.book-card-genre {
  font-size: 10px;
  letter-spacing: 0.14em;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--muted);
}

.book-card-title {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  margin: 2px 0 4px;
}

.book-card-author {
  font-size: 12px;
  color: var(--muted);
}

.book-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.book-card-actions .box-btn {
  flex: 1;
  height: 30px;
  font-size: 10px;
  padding: 0 8px;
}

@media (max-width: 767px) {
  .page-container {
    padding: 76px 16px 80px;
  }
  .library-headline {
    font-size: 24px;
  }
  .library-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }
  .book-card-title {
    font-size: 15px;
  }
  .book-card-info {
    padding: 12px 14px 16px;
  }
}

