/* Printable catalogue: looks like A4 pages on screen, prints/saves as a clean PDF. */
:root {
  --ivory: #fbf8f1; --paper: #fff; --ink: #23201a; --muted: #6b6458; --line: #e7dfd0;
  --olive: #4f7129; --olive-ink: #46662a; --forest: #25381a; --gold: #b8912f; --gold-ink: #8a6a1c;
  --serif: "Cormorant Garamond", Georgia, serif; --sans: "Jost", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: #e9e4da; color: var(--ink); font: 400 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; line-height: 1.1; }

/* ── Screen toolbar ── */
.toolbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--forest); color: #fff; }
.toolbar .back { color: #fff; text-decoration: none; font-size: 14px; }
.toolbar .status { flex: 1; text-align: center; font-size: 13px; opacity: .8; }
.toolbar .save { border: 0; border-radius: 999px; padding: 11px 20px; font: 500 15px var(--sans); background: linear-gradient(135deg, #d4b35a, var(--gold)); color: #1f2a12; cursor: pointer; }
.toolbar .save:disabled { opacity: .55; cursor: wait; }
.inapp, .howto { max-width: 820px; margin: 14px auto 0; padding: 14px 16px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
.inapp { background: #fff6dd; border: 1px solid #f0dfa6; color: #5b460d; }
.inapp strong { display: block; margin-bottom: 4px; }
.inapp button { margin-top: 10px; border: 1px solid #c9a94a; background: #fff; border-radius: 999px; padding: 7px 14px; font: inherit; cursor: pointer; }
.howto { background: #eef6e6; border: 1px solid #cfe2bd; color: #2f4a17; }

/* ── Pages ── */
#book { max-width: 820px; margin: 18px auto 40px; }
.page, .cat-section, .back-page { background: var(--paper); padding: 40px 44px; margin-bottom: 18px; box-shadow: 0 2px 14px rgba(40, 30, 10, .08); }
.loading { text-align: center; padding: 60px; color: var(--muted); background: var(--paper); }

.cover { text-align: center; padding-top: 56px; }
.cover-logo { width: 120px; height: 120px; border-radius: 50%; margin: 0 auto 18px; }
.cover h1 { font-size: 54px; color: var(--forest); }
.cover-tag { max-width: 520px; margin: 10px auto 26px; color: var(--muted); font-size: 15px; }
.cover-photo { margin: 0 auto; width: 70%; aspect-ratio: 4 / 3; border-radius: 22px; overflow: hidden; border: 1px solid var(--gold); padding: 8px; }
.cover-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; }
.cover-date { margin: 22px 0 10px; font: italic 20px var(--serif); color: var(--gold-ink); }
.cover-contact { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; font-size: 14px; }

.cat-head { text-align: center; margin-bottom: 18px; }
.cat-head .eyebrow { font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--gold-ink); margin: 0 0 6px; }
.cat-head h2 { font-size: 40px; color: var(--forest); letter-spacing: .02em; }
.cat-head p { margin: 4px 0 0; font: italic 19px var(--serif); color: var(--gold-ink); }
.cat-head::after { content: ""; display: block; width: 56px; height: 2px; margin: 12px auto 0; background: var(--gold); }

.col-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 26px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.col-head h3 { font-size: 26px; color: var(--forest); }
.col-head p { margin: 0; font: italic 16px var(--serif); color: var(--gold-ink); }

.items { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 18px; }
.item { break-inside: avoid; page-break-inside: avoid; }
.item .photo { aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #f3eee4; }
.item .photo img { width: 100%; height: 100%; object-fit: cover; }
.item h4 { margin: 10px 0 2px; font: 500 18px/1.2 var(--serif); }
.item .price { margin: 0; font-weight: 500; color: var(--olive-ink); }
.item .price small { font-weight: 300; color: var(--muted); margin-left: 3px; }
.item .details { margin: 4px 0 0; font-size: 12px; color: var(--muted); font-weight: 300; line-height: 1.4; }

.back-page { text-align: center; }
.back-page h2 { font-size: 36px; color: var(--forest); margin-bottom: 10px; }
.back-page p { max-width: 520px; margin: 0 auto 18px; color: var(--muted); }
.back-page .fine { font-size: 12px; margin-top: 18px; }

@media (max-width: 640px) {
  .toolbar .status { display: none; }
  .toolbar { justify-content: space-between; }
  #book { margin: 10px 8px 30px; }
  .page, .cat-section, .back-page { padding: 26px 16px; }
  .cover h1 { font-size: 40px; }
  .cover-photo { width: 100%; }
  .items { grid-template-columns: repeat(2, 1fr); gap: 16px 12px; }
  .cat-head h2 { font-size: 32px; }
  .col-head { flex-direction: column; gap: 2px; }
}

/* ── Print / Save as PDF ── */
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; font-size: 11px; }
  .toolbar, .inapp, .howto { display: none !important; }
  #book { max-width: none; margin: 0; }
  .page, .cat-section, .back-page { box-shadow: none; margin: 0; padding: 0; }
  .cover { min-height: 260mm; padding-top: 16mm; break-after: page; page-break-after: always; }
  .cat-section { break-before: page; page-break-before: always; }
  .back-page { break-before: page; page-break-before: always; padding-top: 30mm; }
  .items { grid-template-columns: repeat(3, 1fr); gap: 14px 14px; }
  .col-head { break-after: avoid; page-break-after: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
