/* catalog.css — Styles for /catalog page. Luxury book grid with category sections. */

/* ─── Page Header ──────────────────────────────────────── */
.page-hero {
  background: var(--bg-deep);
  padding: 8rem 2rem 6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(201, 169, 110, 0.08) 0%, transparent 60%),
    linear-gradient(180deg, #0f0d0b 0%, #1a1714 100%);
}

.page-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}

.page-hero__label {
  display: inline-block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.page-hero__title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 400;
  color: var(--bg);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.page-hero__sub {
  font-size: 1.1rem;
  color: rgba(250, 248, 245, 0.5);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ─── Category Section ────────────────────────────────────── */
.books-section {
  padding: 5rem 2rem 4rem;
  background: var(--bg);
}

.books-section--alt {
  background: var(--bg-warm);
}

.books__inner {
  max-width: 1200px;
  margin: 0 auto;
}

.books__category-header {
  margin-bottom: 3rem;
  text-align: center;
}

.books__category-label-lg {
  display: inline-block;
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 400;
  font-style: italic;
  color: var(--fg);
  letter-spacing: -0.01em;
}

.books__category-rule {
  width: 50px;
  height: 2px;
  background: var(--accent);
  margin: 1.25rem auto;
}

.books__category-desc {
  font-size: 1rem;
  color: var(--fg-muted);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ─── Book Grid ─────────────────────────────────────────── */
.books__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.75rem;
}

@media (max-width: 1100px) {
  .books__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 800px) {
  .books__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 500px) {
  .books__grid { grid-template-columns: 1fr; max-width: 320px; margin: 0 auto; }
}

/* ─── Book Card ─────────────────────────────────────────── */
.book-card {
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.25s ease;
}

.books-section--alt .book-card {
  background: var(--bg);
}

.book-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.book-card:hover {
  border-color: rgba(201, 169, 110, 0.5);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  transform: translateY(-3px);
}

.book-card:hover::before { transform: scaleX(1); }

/* ─── Book Cover ────────────────────────────────────────── */
.book__cover-wrap {
  width: 100%;
  aspect-ratio: 2/3;
  overflow: hidden;
  background: var(--charcoal);
  flex-shrink: 0;
}

.book__cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.book-card:hover .book__cover-wrap img {
  transform: scale(1.03);
}

/* ─── Book Info ─────────────────────────────────────────── */
.book__title {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.25;
  margin: 0;
}

.book__author {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--fg-muted);
  margin: -0.2rem 0 0;
}

.book__meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.4rem;
}

.book__price {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent);
}

.book__detail-link {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.8rem;
  color: var(--fg-muted);
  text-decoration: none;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
}

.book__detail-link:hover {
  color: var(--fg);
  border-color: var(--accent);
}

/* ─── Actions ───────────────────────────────────────────── */
.book__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.book__cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  background: var(--accent);
  color: var(--bg-deep);
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  transition: background 0.25s ease, transform 0.2s ease;
}

.book__cta-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.book__affiliates {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.book__affiliates-label {
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  font-family: 'Cormorant Garamond', serif;
}

.book__affiliate-link {
  font-size: 0.72rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.04em;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.book__affiliate-link:hover {
  opacity: 1;
}

/* ─── Footer nav (catalog page) ───────────────────────── */
.footer-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.footer-nav a {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(250, 248, 245, 0.4);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: var(--accent);
}

.footer-nav a.active {
  color: var(--accent);
}
