/* ============================================
   BOOKS & JOY — "The Reading Room" v2
   Editorial publishing-house redesign
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Libre+Caslon+Text:ital,wght@0,400;0,700;1,400&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --green-deep: #1F3B2C;
  --green-deeper: #16291F;
  --brass: #B8933F;
  --brass-light: #D4B36A;
  --ivory: #F8F4EA;
  --ivory-warm: #F1E9D6;
  --ink: #241C15;
  --ink-soft: #5A4E3F;
  --terracotta: #A8503F;
  --cream-card: #FFFDF8;
  --line: rgba(36, 28, 21, 0.09);

  --genre-health: #6B8F71;
  --genre-psychology: #B8933F;
  --genre-truecrime: #A8503F;
  --genre-relationships: #B97A82;
  --genre-childrens: #5B8FA3;
  --genre-novels: #7A6A8C;

  --font-display: 'Libre Caslon Text', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.75rem;
  --space-lg: 3.5rem;
  --space-xl: 6rem;
  --space-xxl: 9rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  font-family: var(--font-body);
  background: var(--ivory);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

/* ============================================
   HEADER
   ============================================ */

.site-header {
  background: var(--green-deep);
  color: var(--ivory);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(184, 147, 63, 0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem clamp(1.25rem, 4vw, 3rem);
  max-width: 1240px;
  margin: 0 auto;
  gap: 1.5rem;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--ivory);
  white-space: nowrap;
}
.logo em { font-style: italic; color: var(--brass-light); }

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 2.5vw, 2.2rem);
  flex-wrap: wrap;
}

.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ivory);
  opacity: 0.85;
  transition: opacity 0.15s ease;
  padding: 0.4rem 0;
  border-bottom: 1px solid transparent;
}
.main-nav a:hover, .main-nav a:focus-visible { opacity: 1; border-bottom-color: var(--brass-light); }

.header-right { display: flex; align-items: center; gap: 1.4rem; }

.search-toggle {
  background: none;
  border: none;
  color: var(--ivory);
  cursor: pointer;
  padding: 0.3rem;
  opacity: 0.9;
}
.search-toggle:hover { opacity: 1; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--ivory);
  font-size: 1.5rem;
  cursor: pointer;
}

/* --- Search overlay --- */

.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(22, 41, 31, 0.96);
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
}
.search-overlay.open { display: flex; }

.search-box { width: min(600px, 90vw); }

.search-box input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--brass);
  color: var(--ivory);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  padding: 0.6rem 0.2rem;
}
.search-box input::placeholder { color: rgba(243, 236, 221, 0.4); }
.search-box input:focus { outline: none; }

.search-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: none;
  border: none;
  color: var(--ivory);
  font-size: 1.6rem;
  cursor: pointer;
}

.search-results { margin-top: 1.5rem; }
.search-result {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 0.2rem;
  border-bottom: 1px solid rgba(243, 236, 221, 0.1);
  color: var(--ivory);
}
.search-result img { width: 38px; border-radius: 2px; }
.search-result .r-title { font-weight: 600; font-size: 0.98rem; }
.search-result .r-meta { font-size: 0.82rem; color: rgba(243,236,221,0.6); }
.search-empty { color: rgba(243,236,221,0.5); font-size: 0.95rem; margin-top: 1.5rem; }

/* ============================================
   HERO — editorial, dramatic
   ============================================ */

.hero {
  background: var(--green-deep);
  color: var(--ivory);
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem);
  position: relative;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
  position: relative;
}

.hero-eyebrow {
  font-size: 0.9rem;
  color: var(--brass-light);
  font-weight: 600;
  margin-bottom: 1.2rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5.5vw, 4.4rem);
  line-height: 1.05;
  font-weight: 400;
  margin-bottom: 1.5rem;
  max-width: 13ch;
}

.hero p {
  font-size: 1.2rem;
  color: rgba(243, 236, 221, 0.82);
  max-width: 44ch;
  margin-bottom: 2.3rem;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 0.95rem 1.9rem;
  border-radius: 2px;
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-brass { background: var(--brass); color: var(--green-deeper); }
.btn-brass:hover { background: var(--brass-light); }
.btn-outline { background: transparent; color: var(--ivory); border-color: rgba(243, 236, 221, 0.4); }
.btn-outline:hover { border-color: var(--ivory); }
.btn-dark { background: var(--green-deep); color: var(--ivory); }
.btn-dark:hover { background: var(--green-deeper); }

/* --- Hero featured cover: one large book, not a shelf of tiny ones --- */

.hero-cover {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-cover img {
  width: min(320px, 80%);
  border-radius: 3px;
  box-shadow: 0 40px 80px rgba(0,0,0,0.45), 0 10px 30px rgba(0,0,0,0.3);
  transform: rotate(2deg);
}

.hero-cover .cover-tag {
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brass);
  color: var(--green-deeper);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.45rem 1rem;
  border-radius: 2px;
  white-space: nowrap;
}

/* --- Shelf display: multiple covers together --- */

.shelf-display {
  position: relative;
  height: 340px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.shelf-board {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  height: 14px;
  background: linear-gradient(180deg, var(--brass) 0%, #8f6d2c 100%);
  border-radius: 2px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.35);
}

.shelf-books {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  position: relative;
  z-index: 2;
  padding-bottom: 30px;
}

.shelf-books a {
  display: block;
  text-decoration: none;
  transition: transform 0.25s ease;
}

.shelf-books img {
  width: 92px;
  border-radius: 2px;
  box-shadow: 0 12px 24px rgba(0,0,0,0.4);
  display: block;
}

.shelf-books a:nth-child(1) { transform: rotate(-4deg); }
.shelf-books a:nth-child(2) { transform: translateY(-10px) rotate(2deg); }
.shelf-books a:nth-child(2) img { width: 100px; }
.shelf-books a:nth-child(3) { transform: rotate(-2deg); }
.shelf-books a:nth-child(4) { transform: translateY(-6px) rotate(3deg); }
.shelf-books a:nth-child(5) { transform: rotate(-5deg); }
.shelf-books a:nth-child(5) img { width: 88px; }

.shelf-books a:hover { transform: translateY(-14px) rotate(0deg); }

/* ============================================
   TRUST STRIP
   ============================================ */

.trust-strip { background: var(--ivory-warm); border-bottom: 1px solid var(--line); padding: 1.2rem 0; }
.trust-inner {
  display: flex; flex-wrap: wrap; gap: clamp(1.2rem, 3vw, 2.8rem);
  justify-content: center; align-items: center;
  font-size: 0.88rem; color: var(--ink-soft); font-weight: 500;
}
.trust-inner span { display: flex; align-items: center; gap: 0.5rem; }
.trust-inner svg { flex-shrink: 0; color: var(--brass); }

/* ============================================
   SECTIONS
   ============================================ */

.section { padding: var(--space-xl) 0; }
.section-tight { padding: var(--space-lg) 0; }

.section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: var(--space-lg); gap: 1rem; flex-wrap: wrap;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  font-weight: 400;
}
.section-head p { color: var(--ink-soft); font-size: 1.02rem; max-width: 42ch; }

.eyebrow-label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--terracotta);
  margin-bottom: 0.8rem;
  display: block;
}

.see-all {
  font-weight: 600; font-size: 0.94rem; color: var(--terracotta);
  white-space: nowrap; border-bottom: 1px solid currentColor; padding-bottom: 2px;
}

/* ============================================
   FEATURED BOOK — large editorial moment
   ============================================ */

.featured-book {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
  background: var(--cream-card);
  border-radius: 6px;
  padding: clamp(2rem, 5vw, 3.5rem);
}

.featured-book img {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  border-radius: 3px;
  box-shadow: 0 30px 60px rgba(31, 59, 44, 0.25);
}

.featured-book h3 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 0.6rem;
}

.featured-book .by { color: var(--ink-soft); font-size: 1.02rem; margin-bottom: 1.3rem; }
.featured-book .by a { color: var(--green-deep); font-weight: 600; }

.featured-book .desc {
  font-size: 1.08rem;
  color: var(--ink-soft);
  max-width: 52ch;
  margin-bottom: 1.8rem;
  line-height: 1.7;
}

.featured-actions { display: flex; align-items: center; gap: 1.3rem; flex-wrap: wrap; }
.featured-price { font-family: var(--font-display); font-size: 1.6rem; color: var(--green-deep); }

/* ============================================
   MOOD / GENRE CHIPS
   ============================================ */

.mood-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.mood-card {
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.6rem 1.4rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.mood-card:hover { border-color: var(--genre-color, var(--brass)); transform: translateY(-3px); }
.mood-card .emoji { font-size: 1.6rem; display: block; margin-bottom: 0.7rem; }
.mood-card h4 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; margin-bottom: 0.3rem; }
.mood-card p { font-size: 0.86rem; color: var(--ink-soft); }

/* ============================================
   BOOK GRID (lighter — less boxy than v1)
   ============================================ */

.book-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.8rem;
}

.book-card { transition: transform 0.2s ease; }
.book-card:hover { transform: translateY(-4px); }

.book-card .cover-wrap {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 3px;
  background: var(--ink);
  margin-bottom: 0.9rem;
  box-shadow: 0 14px 30px rgba(31, 59, 44, 0.14);
}
.book-card img { width: 100%; height: 100%; object-fit: cover; }

.book-card h3 { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; line-height: 1.3; margin-bottom: 0.3rem; }
.book-card .author { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 0.5rem; }
.book-card .price { font-weight: 700; color: var(--green-deep); font-size: 0.95rem; }

.genre-shelf { margin-bottom: var(--space-lg); }
.genre-label {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-display); font-size: 1.5rem;
  margin-bottom: 1.5rem; padding-bottom: 0.7rem;
  border-bottom: 2px solid var(--genre-color, var(--brass));
}
.genre-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--genre-color, var(--brass)); flex-shrink: 0; }

/* ============================================
   AUTHORS
   ============================================ */

.authors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.8rem;
}

.author-card {
  background: var(--cream-card);
  border-radius: 6px;
  padding: 1.8rem;
  text-align: center;
}

.author-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--genre-color, var(--brass)), var(--green-deep));
  margin: 0 auto 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--ivory);
}

.author-card h4 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; margin-bottom: 0.35rem; }
.author-card .genres { font-size: 0.85rem; color: var(--genre-color, var(--terracotta)); font-weight: 600; margin-bottom: 0.9rem; }
.author-card p.bio { font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 1rem; }
.author-card .author-link { font-size: 0.88rem; font-weight: 600; color: var(--green-deep); border-bottom: 1px solid currentColor; }

/* Author detail page */

.author-hero {
  background: var(--ivory-warm);
  border-bottom: 1px solid var(--line);
  padding: var(--space-lg) 0;
}
.author-hero-inner { display: flex; gap: 2rem; align-items: center; flex-wrap: wrap; }
.author-hero .author-avatar { width: 110px; height: 110px; font-size: 2.2rem; margin: 0; flex-shrink: 0; }
.author-hero h1 { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 400; margin-bottom: 0.4rem; }
.author-hero .genres { font-size: 0.95rem; color: var(--terracotta); font-weight: 600; margin-bottom: 0.8rem; }
.author-hero .bio { color: var(--ink-soft); max-width: 60ch; }

/* ============================================
   NEWSLETTER
   ============================================ */

.newsletter {
  background: var(--green-deep);
  color: var(--ivory);
  border-radius: 8px;
  padding: clamp(2.2rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem;
  align-items: center;
}
.newsletter h2 { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 400; margin-bottom: 0.7rem; }
.newsletter p { color: rgba(243, 236, 221, 0.8); max-width: 42ch; }
.newsletter-form { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.newsletter-form input {
  flex: 1; min-width: 200px; padding: 0.9rem 1.1rem; border-radius: 2px;
  border: 1px solid rgba(243, 236, 221, 0.25);
  background: rgba(243, 236, 221, 0.08); color: var(--ivory);
  font-size: 0.95rem; font-family: var(--font-body);
}
.newsletter-form input::placeholder { color: rgba(243, 236, 221, 0.5); }
.newsletter-form input:focus { outline: 2px solid var(--brass-light); background: rgba(243, 236, 221, 0.12); }
.form-note { font-size: 0.78rem; color: rgba(243,236,221,0.55); margin-top: 0.6rem; }

/* ============================================
   BLOG / READING ROOM
   ============================================ */

.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.2rem; }
.blog-card { border-top: 3px solid var(--genre-color, var(--brass)); padding-top: 1.2rem; }
.blog-card .tag { font-size: 0.78rem; font-weight: 700; color: var(--genre-color, var(--terracotta)); margin-bottom: 0.6rem; display: block; }
.blog-card h3 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; line-height: 1.35; margin-bottom: 0.6rem; }
.blog-card p { color: var(--ink-soft); font-size: 0.94rem; }

/* ============================================
   FOOTER
   ============================================ */

.site-footer { background: var(--green-deeper); color: rgba(243, 236, 221, 0.75); padding: var(--space-xl) 0 var(--space-lg); margin-top: var(--space-xl); }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 2.2rem; margin-bottom: var(--space-lg); }
.footer-brand .logo { margin-bottom: 0.9rem; }
.footer-brand p { font-size: 0.9rem; max-width: 32ch; line-height: 1.65; }
.footer-col h4 { color: var(--ivory); font-size: 0.85rem; font-weight: 600; margin-bottom: 1rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-col a { font-size: 0.9rem; transition: color 0.15s ease; }
.footer-col a:hover { color: var(--brass-light); }
.footer-bottom {
  border-top: 1px solid rgba(243, 236, 221, 0.12); padding-top: 1.5rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  font-size: 0.82rem; color: rgba(243, 236, 221, 0.5);
}

/* ============================================
   BOOK DETAIL PAGE
   ============================================ */

.breadcrumb { font-size: 0.85rem; color: var(--ink-soft); padding: 1.3rem 0; }
.breadcrumb a { color: var(--green-deep); font-weight: 500; }
.breadcrumb a:hover { text-decoration: underline; }

.book-detail { display: grid; grid-template-columns: 380px 1fr; gap: var(--space-xl); padding: var(--space-md) 0 var(--space-xl); }
.book-detail-cover img { width: 100%; border-radius: 4px; box-shadow: 0 30px 60px rgba(31, 59, 44, 0.25); }

.book-genre-tag {
  display: inline-block; font-size: 0.78rem; font-weight: 700; color: var(--genre-color);
  background: color-mix(in srgb, var(--genre-color) 14%, transparent);
  padding: 0.35rem 0.8rem; border-radius: 3px; margin-bottom: 1.1rem;
}

.book-detail h1 { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3rem); font-weight: 400; line-height: 1.15; margin-bottom: 0.5rem; }
.book-detail .by-line { font-size: 1.05rem; color: var(--ink-soft); margin-bottom: 1rem; }
.book-detail .by-line a { color: var(--green-deep); font-weight: 600; }
.book-detail .stars { color: var(--brass); font-size: 1.1rem; margin-bottom: 1.5rem; letter-spacing: 2px; }

.book-price-row { display: flex; align-items: center; gap: 1.5rem; margin-bottom: 1.8rem; flex-wrap: wrap; }
.book-price { font-family: var(--font-display); font-size: 2.1rem; color: var(--green-deep); }

.format-pills { display: flex; gap: 0.6rem; margin-bottom: 1.8rem; flex-wrap: wrap; }
.format-pill { font-size: 0.85rem; font-weight: 500; border: 1px solid var(--line); padding: 0.5rem 0.9rem; border-radius: 20px; background: var(--cream-card); }

.book-desc { max-width: 62ch; color: var(--ink-soft); font-size: 1.04rem; line-height: 1.75; margin-bottom: 2rem; }
.book-desc h4 { font-family: var(--font-body); font-size: 0.95rem; font-weight: 700; color: var(--ink); margin: 1.6rem 0 0.5rem; }
.book-desc p + p { margin-top: 1rem; }

.also-avail { border-top: 1px solid var(--line); padding-top: 1.5rem; margin-top: 1rem; }

/* --- Inline sample chapter reader --- */

.btn-outline-dark {
  background: transparent;
  color: var(--green-deep);
  border: 1px solid var(--green-deep);
}
.btn-outline-dark:hover { background: var(--green-deep); color: var(--ivory); }

/* Payhip's embed script sometimes injects its own inline styles on the
   buy button — these overrides keep it matching our design regardless. */
a.payhip-buy-button.btn-brass {
  background: var(--brass) !important;
  color: var(--green-deeper) !important;
  border-radius: 2px !important;
  font-family: var(--font-body) !important;
  font-weight: 600 !important;
  border: none !important;
  text-decoration: none !important;
}
a.payhip-buy-button.btn-brass:hover { background: var(--brass-light) !important; }

.sample-reader {
  position: relative;
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 2rem;
  max-height: 420px;
  overflow-y: auto;
}

.sample-reader-inner {
  padding: 1.8rem 2rem;
  font-family: var(--font-display);
}

.sample-reader-inner h4 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  font-family: var(--font-display);
}

.sample-reader-inner p {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--ink);
  margin-bottom: 1rem;
}

.sample-fade {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: linear-gradient(to bottom, transparent, var(--cream-card));
  pointer-events: none;
}
.also-avail h4 { font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 0.9rem; }
.retailer-links { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.retailer-link { border: 1px solid var(--line); padding: 0.6rem 1.1rem; border-radius: 3px; font-size: 0.88rem; font-weight: 500; color: var(--ink); background: var(--cream-card); transition: border-color 0.15s ease; }
.retailer-link:hover { border-color: var(--brass); }

/* ============================================
   GENRE PAGE
   ============================================ */

.genre-hero { background: var(--ivory-warm); border-bottom: 1px solid var(--line); padding: var(--space-lg) 0; }
.genre-hero h1 { font-family: var(--font-display); font-size: clamp(2.2rem, 4.5vw, 3.2rem); font-weight: 400; margin-bottom: 0.6rem; }
.genre-hero p { color: var(--ink-soft); max-width: 56ch; font-size: 1.08rem; }

.filter-bar { display: flex; gap: 0.6rem; flex-wrap: wrap; padding: 1.6rem 0; border-bottom: 1px solid var(--line); margin-bottom: var(--space-lg); }
.filter-pill { font-size: 0.85rem; font-weight: 500; padding: 0.5rem 1.1rem; border-radius: 20px; border: 1px solid var(--line); background: var(--cream-card); cursor: pointer; }
.filter-pill.active { background: var(--green-deep); color: var(--ivory); border-color: var(--green-deep); }

.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1.8rem; padding-bottom: var(--space-xl); }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
  .main-nav {
    position: fixed; inset: 66px 0 0 0; background: var(--green-deep);
    flex-direction: column; align-items: flex-start; padding: var(--space-md) 1.25rem; gap: 0.3rem;
    transform: translateX(100%); transition: transform 0.25s ease; overflow-y: auto;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav a { width: 100%; padding: 0.85rem 0; border-bottom: 1px solid rgba(243,236,221,0.1) !important; }
  .nav-toggle { display: block; }

  .hero-inner { grid-template-columns: 1fr; }
  .hero-cover { order: -1; }
  .hero-cover img { width: 220px; }
  .shelf-display { order: -1; height: 220px; }
  .shelf-books img { width: 70px; }
  .shelf-books a:nth-child(2) img { width: 78px; }
  .shelf-books a:nth-child(5) img { width: 66px; }

  .featured-book { grid-template-columns: 1fr; text-align: center; }
  .featured-book .desc { margin-left: auto; margin-right: auto; }
  .featured-actions { justify-content: center; }

  .newsletter { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .book-detail { grid-template-columns: 1fr; }
  .book-detail-cover { max-width: 260px; }
  .author-hero-inner { text-align: center; flex-direction: column; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .trust-inner { justify-content: flex-start; text-align: left; }
}
