/* Listing pages: /books/, /new/, /sale/, /topics/<slug>/, /authors/<slug>/
   Provides the page-level scaffolding; the .book-card inside is styled by
   book-detail.css so cards look identical to the recommendation rails on
   book detail pages. */

.listing-page {
  max-width: 1242px;
  margin: 0 auto;
  padding: 60px 36px 100px;
}

.listing-page__title {
  font-family: var(--tmme-font-display, "Cormorant Garamond", serif);
  font-size: 44px;
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
  /* owner, 21 Nov 2026: the subtitle a bit closer (the letters' gap 25px -> 17px) */
  margin: 0;
  text-align: center;
  color: var(--tmme-ink, #1a1a1a);
}

.listing-page__subtitle {
  font-size: 16px;
  text-align: center;
  margin: 0 0 56px;
  color: rgb(94, 94, 94);
  font-weight: 300;
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 48px 28px;
}

.listing-grid .book-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.listing-grid .book-card__image {
  aspect-ratio: 188 / 286;
  overflow: hidden;
  margin-bottom: 12px;
}

.listing-grid .book-card__image img {
  width: 100%;
  height: 100%;
  /* contain, not cover: real covers come in many shapes (square board books,
     shop photos) and cover cropped their titles off. */
  object-fit: contain;
  object-position: center bottom;
  display: block;
}

.listing-grid .book-card__title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  margin: 0 0 4px;
}

.listing-grid .book-card__author {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.3;
  margin: 0;
  color: rgb(94, 94, 94);
}

.listing-empty {
  text-align: center;
  padding: 80px 20px;
  color: rgb(94, 94, 94);
  font-size: 18px;
}

.listing-page__pagination {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 64px;
  font-size: 14px;
}

.listing-page__pagination a {
  padding: 8px 14px;
  border: 1px solid rgb(220, 220, 220);
  text-decoration: none;
  color: inherit;
  border-radius: 2px;
}

.listing-page__pagination a:hover {
  border-color: var(--tmme-ink, #1a1a1a);
}

.listing-page__pagination .is-current {
  background: var(--tmme-ink, #1a1a1a);
  color: #fff;
  padding: 8px 14px;
  border-radius: 2px;
}

@media (max-width: 767px) {
  .listing-page {
    padding: 40px 16px 64px;
  }
  .listing-page__title {
    font-size: 32px;
    margin: 0 0 4px;
  }
  .listing-page__subtitle {
    margin: 0 0 36px;
  }
  .listing-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 16px;
  }
}

/* Topic and author index pages — list of tiles, not book covers */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.tile-grid a {
  display: block;
  padding: 24px 20px;
  border: 1px solid rgb(220, 220, 220);
  border-radius: 2px;
  text-decoration: none;
  color: inherit;
  background: #fff;
  transition: border-color 0.15s ease;
}

.tile-grid a:hover {
  border-color: var(--tmme-ink, #1a1a1a);
}

.tile-grid__label {
  font-size: 16px;
  font-weight: 500;
  margin: 0 0 4px;
}

.tile-grid__count {
  font-size: 13px;
  color: rgb(120, 120, 120);
  margin: 0;
}

/* Static / policy pages — Privacy, Terms, Shipping, Returns, Cart, Login, Contact */
.static-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 60px 36px 100px;
}

.static-page__title {
  font-family: var(--tmme-font-display, "Cormorant Garamond", serif);
  font-size: 44px;
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0 0 16px;
  text-align: center;
  color: var(--tmme-ink, #1a1a1a);
}

.static-page__lede {
  font-size: 18px;
  color: rgb(94, 94, 94);
  margin: 0 0 40px;
  text-align: center;
}

.static-page__body {
  font-size: 16px;
  line-height: 1.7;
  color: var(--tmme-ink, #1a1a1a);
}

.static-page__body h2 {
  font-size: 22px;
  font-weight: 500;
  margin: 32px 0 12px;
}

.static-page__body p {
  margin: 0 0 16px;
}

.static-page__body ul,
.static-page__body ol {
  margin: 0 0 16px;
  padding-left: 24px;
}

.static-page__body li {
  margin-bottom: 6px;
}

.static-page__body a {
  color: var(--tmme-ink, #1a1a1a);
  text-decoration: underline;
}

.static-page__cta {
  display: inline-block;
  background: var(--tmme-ink, #1a1a1a);
  color: #fff;
  padding: 14px 32px;
  text-decoration: none;
  margin-top: 8px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 14px;
}

.static-page__cta:hover {
  background: rgb(70, 70, 70);
}

/* Data / rates table used on Privacy and Shipping pages. The wrapper carries the margins and, on phones too
   narrow for a table (Privacy's 4-column table at 320px), scrolls the table inside itself instead of the page. */
.static-page__table-wrap {
  margin: 12px 0 24px;
  overflow-x: auto;
}
.static-page__table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 15px;
}

.static-page__table th,
.static-page__table td {
  border-bottom: 1px solid rgb(225, 220, 210);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  line-height: 1.5;
}

.static-page__table th {
  font-weight: 600;
  background: rgb(248, 244, 235);
}

@media (max-width: 767px) {
  .static-page {
    padding: 40px 16px 64px;
  }
  .static-page__title {
    font-size: 32px;
  }
  .static-page__table {
    font-size: 14px;
  }
  .static-page__table th,
  .static-page__table td {
    padding: 8px 8px;
  }
}

/* page.njk pages do not load book-detail.css, which holds .container on book pages,
   so the header ran edge to edge. Same values as book-detail.css (1140px / 20px). */
.site-header__inner.container {
  max-width: 1140px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
  width: 100%;
}

/* page.njk pages load book-header.css but not book-detail.css, where the header's variables
   live. Without them the phone menu bars were transparent and the open menu had no background. */
:root {
  --color-text: #000;
  --color-bg: #fff;
  --color-rule: #d9d9d9;
  --z-header: 5;
}
/* No hero sits under the header here, so keep it in the page flow instead of over the title. */
.site-header { position: relative; }
