/* ================================================================
   MAHAKALI JEWELLERS – styles.css
   Brand: #003336 (primary/dark), #d9b25f (gold accent)
   Text: #1f2937 (dark) on #fff / #f9fafb background
   Mobile-first, no layout shifts, premium jewellery feel
   ================================================================ */

/* ---------- TOKENS ---------- */
:root {
  --brand:       #134258;
  --brand-mid:   #1a5472;
  --brand-light: #206690;
  --brand-pale:  #e8f0f4;
  --gold:        #D9B25F;
  --gold-pale:   #fdf6e3;
  --gold-dark:   #b8922e;
  --gold-shine:  #f0cc7a;

  --bg:          #f5f5f0;
  --surface:     #ffffff;
  --surface2:    #f9fafb;
  --border:      rgba(217,178,95,0.35);
  --border-soft: rgba(0,51,54,0.08);

  --text:        #0f1f1f;
  --text-sub:    #4b6060;
  --text-muted:  #7a9090;

  --up-bg:       rgba(34,197,94,0.12);
  --up-fg:       #16a34a;
  --down-bg:     rgba(239,68,68,0.12);
  --down-fg:     #dc2626;
  --neu-bg:      rgba(0,51,54,0.05);
  --neu-fg:      #0f1f1f;

  --radius:      20px;
  --radius-sm:   12px;
  --radius-xs:   8px;
  --shadow-sm:   0 2px 12px rgba(0,51,54,0.07);
  --shadow-md:   0 8px 32px rgba(0,51,54,0.10);
  --shadow-lg:   0 16px 48px rgba(0,51,54,0.13);

  --bnav-h:      76px;
  --contact-h:   0px;   /* set to 52px by JS when contact bar is visible */
  --header-h:    110px; /* site-header (logo only) */
  --marquee-h:   36px;  /* ticker bar (always visible) */
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  /* dvh = dynamic viewport height — accounts for iOS/Android browser chrome */
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  /* Space for fixed bottom nav + OS home indicator */
  padding-bottom: var(--bnav-h);
}

/* ---------- HEADER ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--brand);
  box-shadow: 0 2px 20px rgba(0,0,0,0.25);
  padding: env(safe-area-inset-top) 0 0;
}
/* ── Header inner: mobile = centered, desktop = 3-col grid ── */
.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}
.header-logo {
  height: 86px;
  width: auto;
  max-width: min(75vw, 280px);
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  transition: height 0.3s ease;
}

/* ══ TICKER BAR (always visible) ══════════════════════════════ */
.marquee-container {
  background: var(--brand-mid);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: sticky;
  top: 0;
  z-index: 99;
}
.marquee-bar {
  display: flex;
  align-items: stretch;
  min-height: 38px;
}
/* CSS-animated ticker — works on desktop and mobile */
.ticker-track {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 0 12px;
}
.ticker-inner {
  display: inline-block;
  white-space: nowrap;
  animation: ticker 50s linear infinite;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--gold);
}
@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
/* Live-time pill — stretches full marquee bar height */
.marquee-meta {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.22);
  padding: 0 14px;
  border-left: 1px solid rgba(255,255,255,0.1);
}
/* Clock badge */
.marquee-clock {
  font-size: 0.84rem;
  font-weight: 800;
  color: rgba(255,255,255,0.9);
  padding: 0 4px;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  letter-spacing: 0.03em;
}

/* ---------- STATUS DOT & TIMER ---------- */
/* ── Status dot (bigger, animated) ── */
.status-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  background: #94a3b8;
  flex-shrink: 0;
  transition: background 0.4s;
}
.status-dot.live {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34,197,94,0.25), 0 0 10px rgba(34,197,94,0.6);
  animation: pulse-live 2s infinite;
}
.status-dot.disconnected {
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239,68,68,0.25), 0 0 10px rgba(239,68,68,0.5);
}
@keyframes pulse-live {
  0%,100% { box-shadow: 0 0 0 4px rgba(34,197,94,0.25), 0 0 10px rgba(34,197,94,0.5); }
  50%      { box-shadow: 0 0 0 7px rgba(34,197,94,0.10), 0 0 18px rgba(34,197,94,0.7); }
}
.last-updated {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.75);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- DESKTOP NAV ---------- */
.desktop-nav {
  display: none;
  gap: 4px;
  align-items: center;
  padding: 0 8px;
  flex-wrap: nowrap;
  overflow: hidden;
}
.dnav-btn {
  background: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  padding: 7px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.dnav-btn:hover {
  color: var(--gold);
  background: rgba(255,255,255,0.07);
}
.dnav-btn.active {
  color: var(--gold);
  background: rgba(255,255,255,0.1);
  border-color: rgba(217,178,95,0.4);
}
.dnav-icon { display: flex; align-items: center; flex-shrink: 0; }
/* Call + Share action buttons */
.dnav-action {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.85);
}
.dnav-action:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--brand);
  opacity: 1;
}
.dnav-share {
  background: rgba(37,211,102,0.15);
  border-color: rgba(37,211,102,0.35);
  color: #25d366;
}
.dnav-share:hover {
  background: #25d366;
  border-color: #25d366;
  color: #fff;
}
/* Call+Share live together as a pill group */
.dnav-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  background: rgba(0,0,0,0.15);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 5px;
}

/* ---------- PAGE LAYOUT ---------- */
.page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.page.hidden { display: none; }

/* ---------- PAGE TITLE ---------- */
.page-title {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--brand);
  letter-spacing: -0.02em;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--border);
}

/* ---------- SECTION ---------- */
.section { display: flex; flex-direction: column; gap: 10px; }
.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  gap: 8px;
  flex-wrap: wrap;
}
.section-title {
  font-size: 1.25rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand);
}
.section-subtitle {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ---------- KARAT GRID ---------- */
.karat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.karat-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  padding: 12px 8px;
  text-align: center;
  transition: box-shadow 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}
.karat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-shine));
}
.karat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.karat-label {
  font-family: 'Oswald', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: 0.04em;
  line-height: 1;
}
.karat-purity {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-top: 2px;
}
.karat-price {
  font-family: 'Oswald', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold-dark);
  font-variant-numeric: tabular-nums;
  margin: 6px 0 2px;
  min-height: 1.6em;
  transition: color 0.3s;
}
.karat-price.up   { color: var(--up-fg); }
.karat-price.down { color: var(--down-fg); }
.karat-unit {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- RATE CARD ---------- */
.rate-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 16px;
  overflow: hidden;
}

/* ---------- CARD HEADER ---------- */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 10px;
}
.card-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: -0.01em;
}

/* Metal badges */
.metal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
}
.silver-badge {
  background: rgba(100,116,139,0.10);
  color: #475569;
  border: 1px solid rgba(100,116,139,0.2);
}
.gold-badge {
  background: rgba(217,178,95,0.14);
  color: var(--gold-dark);
  border: 1px solid rgba(217,178,95,0.3);
}

/* Live pill */
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--up-fg);
  background: var(--up-bg);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.live-dot {
  width: 7px;
  height: 7px;
  background: var(--up-fg);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
  flex-shrink: 0;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* ---------- SLIDER ---------- */
.slider-dots { display: flex; gap: 6px; align-items: center; }
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.3s, transform 0.3s;
  cursor: pointer;
}
.dot.active { background: var(--gold); transform: scale(1.2); }

/* ── Table-wrap: isolate horizontal scroll inside card only ── */
.table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) transparent;
  border-radius: 0 0 var(--radius) var(--radius);
}
table { min-width: 320px; }

.slider-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
}
.slider-track:active { cursor: grabbing; }
.slider-track::-webkit-scrollbar { display: none; }

.slider-card {
  flex: 0 0 100%;
  scroll-snap-align: start;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 16px;
}

/* ---------- TABLES ---------- */
.table-wrap { width: 100%; overflow: hidden; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  table-layout: fixed;
  font-variant-numeric: tabular-nums;
}

th:nth-child(1), td:nth-child(1) { width: 30%; }
th:nth-child(2), td:nth-child(2) { width: 17%; }
th:nth-child(3), td:nth-child(3) { width: 17%; }
th:nth-child(4), td:nth-child(4) { width: 18%; }
th:nth-child(5), td:nth-child(5) { width: 18%; }

thead th {
  padding: 12px 10px;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffffff;
  background-color: var(--brand);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 11px 8px;
  border-bottom: 1px solid rgba(217,178,95,0.15);
  vertical-align: middle;
  white-space: nowrap;
  font-weight: 700;
  font-size: 1.05rem;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(0,51,54,0.035); }

.rowhead {
  font-weight: 800;
  color: var(--text);
  font-size: 1rem;
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.02em;
  white-space: normal;
  line-height: 1.25;
}

/* ---------- PRICE CHIPS ---------- */
.chip-val {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 1.15rem;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  min-width: 50px;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s;
  background: transparent !important;
}
.chip-val.up   { color: var(--up-fg); }
.chip-val.down { color: var(--down-fg); }
.chip-val.same { color: var(--neu-fg); }
.chip-val.always-green { color: var(--up-fg); }
.chip-val.always-red   { color: var(--down-fg); }

/* ---------- COIN TABS ---------- */
.coin-tabs {
  display: flex;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  gap: 0;
}
.coin-tab {
  flex: 1;
  background: none;
  border: none;
  cursor: pointer;
  padding: 14px 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-bottom: 3px solid transparent;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
  letter-spacing: 0.02em;
}
.coin-tab:hover { color: var(--brand); background: var(--brand-pale); }
.coin-tab.active {
  color: var(--brand);
  background: var(--brand-pale);
  border-bottom-color: var(--gold);
  font-weight: 800;
}
.coin-tab-icon { font-size: 1.05rem; }
.coin-panel.hidden { display: none; }

/* ---------- COIN TABLE (2-col: Name + Buy) ---------- */
.coin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  table-layout: fixed;
  font-variant-numeric: tabular-nums;
}
.coin-table th:nth-child(1), .coin-table td:nth-child(1) { width: 65%; }
.coin-table th:nth-child(2), .coin-table td:nth-child(2) { width: 35%; }

.coin-table thead th {
  padding: 12px 10px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffffff;
  background-color: var(--brand);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.coin-table tbody td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(217,178,95,0.15);
  vertical-align: middle;
  font-weight: 700;
  font-size: 1rem;
}
.coin-table tbody tr:last-child td { border-bottom: none; }
.coin-table tbody tr:hover { background: rgba(0,51,54,0.035); }
.coin-table .rowhead {
  font-weight: 800;
  color: var(--text);
  font-size: 0.88rem;
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.02em;
}
.coin-price {
  font-family: 'Oswald', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--gold-dark);
  transition: color 0.3s;
}
.coin-price.up   { color: var(--up-fg); }
.coin-price.down { color: var(--down-fg); }

/* ---------- APX W/O GST ROW (below product tables) ---------- */
.apx-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(217,178,95,0.12), rgba(217,178,95,0.06));
  border: 1.5px solid rgba(217,178,95,0.45);
  border-radius: var(--radius-xs);
  gap: 10px;
}
.apx-label {
  font-family: 'Oswald', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.apx-value {
  font-family: 'Oswald', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold-dark);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* ---------- KARAT CARD — W/O GST BADGE on section heading ---------- */
.karat-wogst-badge {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--gold-dark);
  background: rgba(217,178,95,0.18);
  border: 1.5px solid rgba(217,178,95,0.5);
  border-radius: 6px;
  padding: 2px 7px;
  vertical-align: middle;
  margin-left: 6px;
  line-height: 1.5;
  white-space: nowrap;
}

/* ---------- APX TABLE ROW (injected at bottom of products table) ---------- */
.apx-tr {
  background: linear-gradient(90deg, rgba(217,178,95,0.10), rgba(217,178,95,0.04));
  border-top: 1.5px solid rgba(217,178,95,0.35);
}
.apx-tr-name {
  color: var(--gold-dark) !important;
  font-weight: 900 !important;
  font-style: italic;
}
.apx-chip {
  color: var(--gold-dark) !important;
  font-weight: 800 !important;
}

/* ---------- COIN NOTE (below coin table) ---------- */
.coin-note {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 4px 0;
  font-style: italic;
  letter-spacing: 0.01em;
}

/* ---------- COIN PREMIUM PERCENT BADGE ---------- */
.coin-premium-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-pale);
  border: 1.5px solid rgba(19,66,88,0.25);
  border-radius: 6px;
  padding: 3px 9px;
  white-space: nowrap;
  margin-left: auto;
  margin-right: 6px;
}

/* ---------- BOTTOM NAV (mobile-only, PWA-safe) ---------- */
:root {
  /* Real bottom nav height = icon area + OS home-indicator */
  --bnav-icon-h: 56px;
  --bnav-h: calc(var(--bnav-icon-h) + env(safe-area-inset-bottom, 0px));
}
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  /* Don't set height — let padding-bottom create the safe-area gap */
  z-index: 300;
  background: var(--brand);
  display: flex;
  align-items: stretch;
  border-top: 2px solid var(--gold);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.25);
  /* Safe-area padding so content sits above home indicator */
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}
.bottom-nav-inner {
  display: flex;
  width: 100%;
  /* Fixed height for the tappable icon area only */
  height: var(--bnav-icon-h);
  align-items: stretch;
}
.bnav-btn {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  border-top: 3px solid transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  /* Enough padding but never overflow */
  padding: 6px 2px;
  color: rgba(255,255,255,0.5);
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
.bnav-btn:active { opacity: 0.7; }
/* Tab-style: gold underline on active, no background box */
.bnav-btn.active {
  color: var(--gold);
  border-top-color: var(--gold);
}
.bnav-icon {
  /* SVG icon size — fixed so it never clips */
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.bnav-icon svg { width: 100%; height: 100%; }
.bnav-label {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- EMPTY / LOADING ---------- */
.empty-msg {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 16px 4px;
  font-style: italic;
}

/* ---------- FOOTER ---------- */
.site-footer {
  text-align: center;
  padding: 20px 16px 28px;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-soft);
  background-color: var(--surface);
}
.footer-copyright {
  margin-bottom: 8px;
}
.footer-contacts-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 10px;
}
.footer-contact {
  margin-top: 0;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer-contact a {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--gold);
  text-decoration: none;
}
.footer-contact a:hover { text-decoration: underline; }
.footer-address {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.footer-socials {
  margin-top: 10px;
  font-size: 0.82rem;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.footer-socials a {
  color: var(--text-muted);
  text-decoration: none;
}
.footer-socials a:hover { color: var(--gold); }
.footer-developer {
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.footer-developer a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
}
.footer-developer a:hover {
  text-decoration: underline;
}

/* ---------- CONTACT BAR (sticky, mobile) ---------- */
.contact-bar { display: none !important; }
.contact-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: opacity 0.15s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.contact-btn:active { opacity: 0.82; transform: scale(0.97); }
/* ═══════════════════════════════════════════════════
   SHARE MODAL OVERLAY
   ═══════════════════════════════════════════════════ */
.share-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fade-in 0.2s ease;
  /* Sit on top of the bottom nav (icon area only — safe-area already in .bottom-nav) */
  padding-bottom: var(--bnav-icon-h);
}
.share-modal {
  background: var(--surface);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 24px 20px 20px;
  width: 100%;
  max-width: 500px;
  animation: slide-up 0.28s cubic-bezier(0.34,1.56,0.64,1);
}
.share-modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--brand);
  margin: 0 0 6px;
}
.share-modal-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 16px;
}
.share-opts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
.share-opt-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface2);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand);
  transition: background 0.15s, border-color 0.15s;
  width: 100%;
  text-align: left;
}
.share-opt-btn:hover:not(:disabled) { background: var(--brand-pale); border-color: var(--gold); }
.share-opt-btn:disabled { opacity: 0.65; cursor: wait; }
.share-opt-icon { color: var(--gold); display: flex; align-items: center; }
.share-cancel-btn {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--surface2);
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.share-cancel-btn:hover { background: var(--border-soft); }
@keyframes slide-up  { from { transform: translateY(80px); opacity:0; } to { transform:translateY(0); opacity:1; } }
@keyframes fade-in   { from { opacity: 0; } to { opacity: 1; } }
@media (min-width: 992px) {
  .share-overlay { align-items: center; padding-bottom: 0; }
  .share-modal   { border-radius: var(--radius); }
}

/* ---------- CONTACT BUTTON COLOURS ---------- */
.phone-btn {
  background: var(--brand);
  color: #fff;
  border: 2px solid transparent;
}
.phone-btn:hover { opacity: 0.9; }
.share-btn {
  background: #25d366;
  color: #fff;
  border: 2px solid transparent;
  cursor: pointer;
}
.share-btn:hover    { opacity: 0.9; }
.share-btn:disabled { opacity: 0.6; cursor: wait; }

/* .bottom-nav-inner is now defined alongside .bottom-nav above */

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet portrait (768+): still uses bottom nav */
@media (min-width: 768px) {
  .header-logo { height: 68px; }
  .header-inner { padding: 10px 28px; }
  .karat-grid { grid-template-columns: repeat(7, 1fr); gap: 8px; }
  .karat-label { font-size: 1.25rem; }
  .karat-price { font-size: 1.05rem; }
  .karat-card { padding: 12px 6px; }
  .page { padding: 20px 28px 24px; }
  .slider-card { flex: 0 0 calc(50% - 8px); }
  .slider-dots { display: none; }
  table { font-size: 0.9rem; }
  .chip-val { font-size: 1.1rem; min-width: 50px; padding: 3px 8px; }
  .coin-price { font-size: 1.1rem; }
  .rowhead { font-size: 0.9rem; }
  thead th { font-size: 0.8rem; }
  tbody td { font-size: 0.95rem; }
  .section-title { font-size: 1.1rem; }
  .page-title { font-size: 1.6rem; }
}

/* Desktop (992+): 3-column header (nav | LOGO | nav), hide mobile elements */
@media (min-width: 992px) {
  body { padding-bottom: 0; }
  /* 3-column grid: left-nav takes equal space as right-nav, logo stays centered */
  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    justify-content: unset;
    padding: 12px 32px;
    gap: 0;
  }
  .desktop-nav { display: flex; align-items: center; }
  #desktop-nav-left  { justify-content: flex-start; }
  #desktop-nav-right { justify-content: flex-end; }
  .header-logo { height: 100px; }
  .bottom-nav  { display: none; }
  .contact-bar { display: none !important; }
  .page { padding: 28px 40px 32px; gap: 24px; }
  .karat-grid { grid-template-columns: repeat(7, 1fr); gap: 14px; }
  .karat-card { padding: 18px 10px; }
  .karat-label { font-size: 1.5rem; }
  .karat-price { font-size: 1.3rem; }
  .karat-purity { font-size: 0.72rem; }
  .karat-unit { font-size: 0.65rem; }
  .slider-card { flex: 0 0 calc(50% - 8px); }
  .slider-dots { display: none; }
  table { font-size: 1rem; }
  .chip-val { font-size: 1.2rem; min-width: 58px; padding: 4px 8px; }
  .rowhead { font-size: 1rem; }
  thead th { font-size: 0.85rem; padding: 12px 10px; }
  tbody td { font-size: 1rem; padding: 10px 8px; }
  .section-title { font-size: 1.2rem; }
  .page-title { font-size: 1.9rem; }
  .card-title { font-size: 1.4rem; }
  .coin-table tbody td, .coin-table .rowhead { font-size: 1rem; }
  .coin-price { font-size: 1.2rem; }
}

/* Large desktop (1200+) */
@media (min-width: 1200px) {
  .page { width: 80%; max-width: none; }
  table { font-size: 1.2rem; }
  .chip-val { font-size: 1.45rem; }
  .rowhead { font-size: 1.2rem; }
  thead th { font-size: 1rem; }
  tbody td { font-size: 1.2rem; }
  .karat-price { font-size: 1.8rem; }
  .coin-price { font-size: 1.45rem; }
  .karat-label { font-size: 1.9rem; }
}

/* Extra large (1400+) */
@media (min-width: 1400px) {
  .page { width: 75%; }
  table { font-size: 1.3rem; }
  .chip-val { font-size: 1.6rem; }
  .rowhead { font-size: 1.3rem; }
  .karat-price { font-size: 2rem; }
  .coin-price { font-size: 1.6rem; }
  .karat-label { font-size: 2rem; }
}

/* Very small (≤360 px) */
@media (max-width: 360px) {
  .header-logo { height: 68px; }
  .karat-grid  { grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .karat-label { font-size: 1rem; }
  .karat-price { font-size: 1rem; }
  .karat-purity { font-size: 0.5rem; }
  .karat-card  { padding: 7px 3px; }
  #karat-card-24k { grid-column: span 2; }
  #karat-card-24k .karat-price { font-size: 1.15rem; }
  .chip-val    { font-size: 0.88rem; min-width: 0; }
  .coin-price  { font-size: 0.88rem; }
  thead th     { font-size: 0.62rem; padding: 6px 3px; }
  tbody td     { font-size: 0.8rem; padding: 6px 3px; }
  .rowhead     { font-size: 0.75rem; }
  .page        { padding: 10px 8px 16px; gap: 12px; }
  .section     { gap: 8px; }
  .marquee-clock  { font-size: 0.7rem; }
  .last-updated   { font-size: 0.7rem; }
  .ticker-inner   { font-size: 0.72rem; }
  .section-title  { font-size: 0.95rem; }
  .page-title     { font-size: 1.3rem; }
  .bnav-label     { font-size: 0.58rem; }
}

@media (max-width: 767px) {
  .ticker-inner   { font-size: 0.78rem; }
  .marquee-clock  { font-size: 0.75rem; }
}

/* Small mobile (361–480 px) */
@media (min-width: 361px) and (max-width: 480px) {
  .header-logo { height: 82px; }
  .page        { padding: 14px 12px 20px; gap: 14px; }
  .section     { gap: 12px; }
  .karat-grid  { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .karat-card  { padding: 9px 5px; }
  .karat-label { font-size: 1.15rem; }
  .karat-price { font-size: 1.05rem; }
  .karat-purity { font-size: 0.55rem; }
  #karat-card-24k { grid-column: span 2; }
  #karat-card-24k .karat-price { font-size: 1.2rem; }
  table        { font-size: 0.85rem; }
  thead th     { font-size: 0.68rem; padding: 8px 5px; }
  tbody td     { font-size: 0.88rem; padding: 8px 5px; }
  .chip-val    { font-size: 0.95rem; }
  .coin-price  { font-size: 0.95rem; }
  .rowhead     { font-size: 0.82rem; }
  .section-title { font-size: 1rem; }
  .page-title  { font-size: 1.4rem; }
  .bnav-label  { font-size: 0.62rem; }
}

/* Medium mobile (481–767px) */
@media (min-width: 481px) and (max-width: 767px) {
  .header-logo { height: 88px; }
  .karat-grid  { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .karat-label { font-size: 1.25rem; }
  .karat-price { font-size: 1.1rem; }
  .chip-val    { font-size: 1.05rem; }
  .coin-price  { font-size: 1.05rem; }
  table        { font-size: 0.9rem; }
  thead th     { font-size: 0.72rem; }
  tbody td     { font-size: 0.92rem; }
}

/* Prevent body-level horizontal scroll */
html, body { overflow-x: hidden; }
