/* Catalogues page (selection.html / selection_en.html): hero, catalogue cards, PDF viewer, shop banner, enquiry button.
   Loaded after pages.css (header, footer, buttons, colours). Logic in js/selection.js. */

/* ── Hero ───────────────────────────────────────────────────────────────────── */
.page-hero { text-align: center; padding-top: clamp(36px, 6vw, 72px); padding-bottom: clamp(28px, 4vw, 44px); }
.page-hero h1 { font-size: clamp(2rem, 5.2vw, 3.4rem); margin: .6rem 0 1rem; letter-spacing: .01em; }
.page-hero .lead { max-width: 640px; margin: 0 auto; color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.1rem); line-height: 1.75; }

/* ── Catalogue cards: the whole card opens the PDF ──────────────────────────── */
.catalogs {
  list-style: none; margin: 0 auto; padding: 0 0 clamp(48px, 8vw, 96px); max-width: 1080px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px;
}
.catalog-card {
  position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.catalog-card:hover { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(0, 0, 0, .08); }
.catalog-preview { position: relative; aspect-ratio: 1287 / 910; background: #EDE9E3; overflow: hidden; border-bottom: 1px solid var(--line); }
.catalog-preview img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.catalog-card:hover .catalog-preview img { transform: scale(1.03); }
.pdf-badge {
  position: absolute; top: 12px; right: 12px; padding: .28rem .5rem; background: var(--gold); color: #fff;
  font-size: .66rem; font-weight: 700; letter-spacing: .1em; line-height: 1.2;
}
.catalog-info { display: flex; flex-direction: column; gap: .45rem; flex: 1; padding: 18px 20px 20px; }
.catalog-title { font-size: 1.3rem; line-height: 1.25; }
.catalog-link { text-decoration: none; }
.catalog-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }   /* stretches the link over the card */
.catalog-link:focus-visible { outline: none; }
.catalog-link:focus-visible::after { outline: 2px solid var(--ink); outline-offset: 3px; }
.catalog-description { flex: 1; color: var(--muted); font-size: .9rem; line-height: 1.6; }
.catalog-category { margin-top: .3rem; font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }

/* ── Shop banner ────────────────────────────────────────────────────────────── */
.shop-banner { padding: clamp(48px, 8vw, 96px) 0; border-top: 1px solid var(--line); text-align: center; }
.shop-banner .inner { max-width: 540px; margin: 0 auto; }
.kicker { margin-bottom: 1.1rem; font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.shop-banner h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); margin-bottom: 1rem; }
.shop-banner p { margin: 0 0 2rem; color: var(--muted); line-height: 1.75; }

/* ── PDF viewer (<dialog>, built by selection.js on large screens) ──────────── */
html.pdf-open { overflow: hidden; }
.pdf-viewer {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: #141312; overflow: hidden;
}
.pdf-viewer[open] { display: flex; flex-direction: column; }
.pdf-viewer::backdrop { background: rgba(20, 19, 18, .92); }
.pdf-bar {
  display: flex; align-items: center; gap: 12px; height: 64px; flex: none; padding: 0 12px 0 24px;
  background: var(--bg); border-bottom: 1px solid var(--line); color: var(--ink);
}
.pdf-title { flex: 1; min-width: 0; font-size: 1.25rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-newtab {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; font-size: .88rem; font-weight: 500;
  text-decoration: underline; text-decoration-color: var(--gold-light); text-underline-offset: 4px; white-space: nowrap;
}
.pdf-newtab:hover { color: var(--gold); }
.pdf-close {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: none; padding: 0;
  border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.pdf-close:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.pdf-frame { flex: 1; width: 100%; border: 0; background: #fff; }

/* ── Floating enquiry button ────────────────────────────────────────────────── */
.fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 900; display: inline-flex; align-items: center; gap: .55rem;
  min-height: 48px; padding: 0 1.4rem 0 1.1rem; border-radius: 999px; background: var(--gold); color: #fff;
  font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
  box-shadow: 0 8px 24px rgba(52, 50, 47, .22); transition: background-color .25s var(--ease), transform .25s var(--ease);
}
.fab:hover { background: var(--ink); color: #fff; transform: translateY(-2px); }
.fab, .catalog-link { -webkit-tap-highlight-color: transparent; }
.fab:active { background: var(--ink); }

/* ── Tablet ─────────────────────────────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .catalogs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}

/* ── Phone: compact rows, picture on the left ───────────────────────────────── */
@media (max-width: 767.98px) {
  .fab { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: 52px; height: 52px; padding: 0; justify-content: center; }
  .fab-label { display: none; }
  .site-footer { padding-bottom: 84px; }   /* the enquiry button must not cover the footer links */
}
@media (max-width: 575.98px) {
  .catalogs { grid-template-columns: 1fr; gap: 12px; }
  .catalog-card { flex-direction: row; }
  .catalog-card:hover { transform: none; }
  .catalog-preview { flex: 0 0 40%; aspect-ratio: auto; min-height: 118px; border-bottom: 0; border-right: 1px solid var(--line); }
  .pdf-badge { top: 8px; right: 8px; }
  .catalog-info { padding: 12px 14px 14px; gap: .3rem; }
  .catalog-title { font-size: 1.08rem; }
  .catalog-description { font-size: .82rem; line-height: 1.5; }
  .catalog-category { font-size: .66rem; letter-spacing: .12em; }
}
