:root {
  --brand:   #1a3a5c;
  --accent:  #c8a84b;
  --text:    #222;
  --muted:   #555;
  --border:  #d8dde8;
  --bg-alt:  #f4f5f8;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: system-ui, "Segoe UI", Arial, sans-serif;
  margin: 0;
  color: var(--text);
  line-height: 1.7;
  background: #fff;
}

/* ── Header ── */
header {
  background: var(--brand);
  color: #fff;
  padding: .9rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}

.site-name a {
  color: var(--accent);
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: .03em;
}

nav { display: flex; flex-wrap: wrap; gap: .15rem; }

nav a {
  color: #dce8f5;
  text-decoration: none;
  padding: .3rem .7rem;
  border-radius: 3px;
  font-size: .9rem;
  transition: background .15s;
}

nav a:hover,
nav a.active {
  background: rgba(200,168,75,.18);
  color: var(--accent);
}

/* ── Main content ── */
main {
  max-width: 860px;
  margin: 2.5rem auto;
  padding: 0 2rem;
}

h1 { color: var(--brand); margin-top: 0; font-size: 2rem; }
h2 { color: var(--brand); font-size: 1.4rem; margin-top: 2rem; }
h3 { color: var(--brand); font-size: 1.15rem; }

a { color: var(--brand); }
a:hover { color: var(--accent); }

/* ── Tables ── */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.2rem 0;
  font-size: .93rem;
}
th, td { border: 1px solid var(--border); padding: .5rem .8rem; text-align: left; }
th { background: var(--brand); color: #fff; font-weight: 600; }
tr:nth-child(even) td { background: var(--bg-alt); }

/* ── Code ── */
code { background: var(--bg-alt); padding: .1em .4em; border-radius: 3px; font-size: .88em; }
pre { background: var(--bg-alt); padding: 1rem; border-radius: 5px; overflow-x: auto; }
pre code { background: none; padding: 0; }

/* ── Product list ── */
.product-list { list-style: none; padding: 0; }
.product-list li {
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  padding: 1.5rem 1.8rem;
  margin-bottom: 1.5rem;
  border-radius: 5px;
  background: #fff;
}
.product-list h2 { margin-top: 0; }
.disclaimer { color: var(--muted); font-size: .9rem; }

/* ── Footer ── */
footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border);
  padding: 1.4rem 2rem;
  color: var(--muted);
  font-size: .85rem;
  text-align: center;
  background: var(--bg-alt);
}
footer a { color: var(--muted); }
footer a:hover { color: var(--brand); }

/* ── Catalogue coin entries ── */
.coin-entry { margin: 1.5rem 0 2rem; }
.coin-images {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.coin-images figure {
  margin: 0;
  text-align: center;
  flex: 0 0 auto;
}
.coin-images img {
  display: block;
  width: 140px;
  height: 140px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-alt);
  padding: 6px;
  cursor: zoom-in;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.coin-images img:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
}
.coin-images figcaption {
  margin-top: .4rem;
  font-size: .78rem;
  color: var(--muted);
}

/* ── Lightbox ── */
#lb {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.88);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
#lb.open { display: flex; }
#lb img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 6px;
  box-shadow: 0 8px 48px rgba(0,0,0,.6);
  object-fit: contain;
  cursor: zoom-out;
}
#lb-caption {
  position: fixed;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.8);
  font-size: .85rem;
  pointer-events: none;
  white-space: nowrap;
}
#lb-close {
  position: fixed;
  top: 1rem;
  right: 1.4rem;
  color: rgba(255,255,255,.7);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}
#lb-close:hover { color: #fff; }

/* ── Responsive ── */
@media (max-width: 600px) {
  header { flex-direction: column; align-items: flex-start; }
  main { padding: 0 1rem; margin: 1.5rem auto; }
  .coin-images img { width: 110px; height: 110px; }
}
