/* ═══════════════════════════════════════════════════════
   Arab Coins Network — Shared Stylesheet
   Editorial magazine feel. Serif headings, generous whitespace.
   Per-site accent via CSS custom properties on :root.
   ═══════════════════════════════════════════════════════ */

:root {
  /* Defaults — overridden per site in index.php */
  --accent: #8B1A1A;
  --accent-dark: #1c0505;
  --accent-muted: #fdf4f4;
  --accent-text: #5a0a0a;
  --gold: #c9a84c;
  --gold-muted: #e8d9a8;
  --surface: #FDFCFA;
  --border: #E8E6E0;
  --text: #1a1a1a;
  --text-secondary: #555;
  --text-muted: #888;
}

/* ─── Reset ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
  background: var(--surface);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ─── Layout ─── */
.container { max-width: 780px; margin: 0 auto; padding: 0 24px; }

/* ═══ HERO ═══ */
.hero {
  background: var(--accent-dark);
  padding: 2rem 2.5rem 1.75rem;
  position: relative;
  overflow: hidden;
}
.hero-inner { max-width: 780px; margin: 0 auto; position: relative; z-index: 1; }
.hero-watermark {
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  height: 200px;
  opacity: 0.07;
  pointer-events: none;
}
.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  pointer-events: none;
}
.hero-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}
.hero-nav img { width: 28px; height: 18px; border: 1px solid rgba(255,255,255,0.2); border-radius: 2px; }
.hero-nav span { font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold); }
.hero h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 3.2rem;
  font-weight: 400;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 6px;
}
.hero h1 small {
  display: block;
  font-size: 1rem;
  font-weight: 400;
  color: rgba(255,255,255,0.55);
  margin-top: 6px;
  font-family: system-ui, sans-serif;
}
.hero-prose {
  margin-top: 24px;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.7;
  max-width: 600px;
}
.hero-prose p { margin-bottom: 12px; }
.era-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.era-pill {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.75);
  background: transparent;
  padding: 3px 10px;
  border-radius: 2px;
}
.era-pill:hover { background: rgba(255,255,255,0.1); color: rgba(255,255,255,1); }

/* ═══ HISTORICAL NOTE (Hejaz) ═══ */
.historical-note {
  background: var(--accent-muted);
  border-left: 3px solid var(--gold);
  padding: 1rem 1.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ═══ COIN GRID ═══ */
.coins-section { background: var(--accent-muted); padding: 2rem 2.5rem; }
.coins-section .container { max-width: 780px; margin: 0 auto; }
.coin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 20px; }
.coin-card { text-align: center; padding: 0 0.5rem; cursor: pointer; }
.coin-card img {
  width: 100%;
  max-width: 180px;
  height: auto;
  border-radius: 6px;
  display: block;
  margin: 0 auto 0.75rem;
  border: 1px solid rgba(0,0,0,0.08);
}
.coin-card img.rev { display: none; }
.coin-card.flipped img.ob { display: none; }
.coin-card.flipped img.rev { display: block; margin: 0 auto 0.75rem; }
.coin-label { font-size: 0.85rem; font-weight: 500; color: var(--text); line-height: 1.3; }
.coin-grade { font-size: 0.75rem; color: var(--accent); margin-top: 0.2rem; letter-spacing: 0.04em; }
.coin-sub { font-size: 0.78rem; color: var(--text-secondary); margin-top: 2px; }

/* ═══ PROSE + MAP ═══ */
.prose-section { padding: 2.5rem 2.5rem; border-top: 1px solid rgba(0,0,0,0.06); }
.prose-grid { display: grid; grid-template-columns: 1fr 280px; gap: 3rem; max-width: 780px; margin: 0 auto; align-items: start; }
.prose-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.prose-text { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.75; }
.prose-text p { margin-bottom: 14px; }
.prose-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  border-left: 2px solid var(--gold);
  padding-left: 1rem;
  margin-top: 16px;
  line-height: 1.7;
}
.sidebar-map {
  width: 100%;
  aspect-ratio: 4/3;
  background: #f8f6f2;
  border: 1px solid var(--border);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}
.fact-rows { margin-top: 16px; }
.fact-row {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
}
.fact-row .label { color: var(--text-muted); }
.fact-row .value { font-weight: 500; }

/* ═══ BOOK CARD (Oman) ═══ */
.book-section { padding: 48px 24px; }
.book-card {
  max-width: 780px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 20px;
}
.book-cover {
  width: 120px;
  height: 160px;
  background: var(--accent-muted);
  border: 1px solid var(--gold);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Georgia, serif;
  font-size: 13px;
  color: var(--accent-text);
  text-align: center;
  padding: 8px;
}
.book-title { font-family: Georgia, serif; font-size: 1.1rem; font-weight: 400; margin-bottom: 6px; }
.book-year { display: inline-block; font-size: 0.7rem; background: var(--gold); color: #fff; padding: 2px 8px; border-radius: 10px; margin-bottom: 8px; }
.book-isbn { font-family: monospace; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 10px; }
.book-desc { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.65; margin-bottom: 12px; }
.book-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.book-actions a {
  font-size: 0.8rem;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text);
  text-decoration: none;
}
.book-actions a:hover { border-color: var(--accent); color: var(--accent); }

/* ═══ RESOURCES ═══ */
.resources { padding: 2.5rem 2.5rem; }
.resources .container { max-width: 780px; }
.resources h2 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}
.resource-item {
  display: flex; gap: 14px; padding: 0.85rem 0 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  border-left: 2px solid transparent;
  transition: border-color 0.15s ease;
}
.resource-item:hover { border-left-color: var(--gold); }
.resource-num { font-size: 1.4rem; font-family: Georgia, serif; color: var(--gold); opacity: 0.5; min-width: 32px; font-weight: 400; }
.resource-body { flex: 1; }
.resource-title { font-size: 0.9rem; font-weight: 600; }
.resource-title a { color: var(--text); }
.resource-title a:hover { color: var(--accent); }
.resource-desc { font-size: 0.8rem; color: var(--text-muted); margin-top: 3px; }
.resource-url { font-size: 0.7rem; color: var(--text-muted); font-variant: small-caps; margin-top: 2px; }

/* ═══ SECTION SPACING ═══ */
.section { padding: 2.5rem 2.5rem; }
.section + .section { border-top: 1px solid rgba(0,0,0,0.06); }

/* ═══ EBAY CARDS ═══ */
.ebay-section { padding: 2rem 2.5rem; border-top: 1px solid rgba(0,0,0,0.06); }
.ebay-section .container { max-width: 780px; }
.ebay-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; }
.ebay-card {
  text-align: center;
  text-decoration: none;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: border-color 0.15s;
  display: block;
}
.ebay-card:hover { border-color: var(--accent); text-decoration: none; }
.ebay-card img { width: 100%; max-width: 120px; height: auto; border-radius: 4px; margin: 0 auto 0.5rem; }
.ebay-card-label { display: block; font-size: 0.78rem; font-weight: 500; color: var(--text); line-height: 1.3; }
.ebay-card-cta { display: block; font-size: 0.68rem; color: var(--accent); margin-top: 0.25rem; letter-spacing: 0.02em; }

/* ═══ LINK BAR ═══ */
.link-bar {
  padding: 0.9rem 2.5rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  max-width: 780px;
  margin: 0 auto;
}
.lb-link { color: var(--accent); text-decoration: none; font-weight: 500; }
.lb-link:hover { text-decoration: underline; }
.lb-sep { color: var(--gold); opacity: 0.6; }
.featured-listing {
  border-top: 1px solid var(--gold);
  padding: 0.6rem 2.5rem;
  font-size: 0.82rem;
  background: var(--accent-muted);
  display: flex;
  gap: 0.75rem;
  align-items: center;
  max-width: 780px;
  margin: 0 auto;
}
.fl-label { color: var(--accent-text); font-weight: 600; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; }
.fl-link { color: var(--accent); text-decoration: none; }
.fl-link:hover { text-decoration: underline; }

/* ═══ FOOTER ═══ */
.site-footer {
  padding: 1rem 2.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: none; }
.footer-sep { opacity: 0.35; }
.footer-current { font-weight: 600; color: var(--accent); }

/* ═══ MOBILE ═══ */
@media (max-width: 768px) {
  .prose-grid { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 640px) {
  .hero h1 { font-size: 2rem; }
  .coin-grid { grid-template-columns: repeat(2, 1fr); }
  .book-card { grid-template-columns: 1fr; }
  .hero { padding: 1.5rem 1rem 1.25rem; }
  .link-bar { flex-wrap: wrap; padding: 0.9rem 1rem; }
}
