/* ============================================================
   Bharat Bullion — Luxury Gold Theme (PHP edition)
   ============================================================ */
:root {
  --bg: #FBF7EF;
  --fg: #2B2118;
  --muted: #6E6357;
  --card: #FDFBF7;
  --border: #E6D5B8;
  --secondary: #FAF0E6;
  --primary: #D4A20A;       /* antique gold */
  --primary-fg: #FFFFFF;
  --accent: #800020;        /* burgundy */
  --emerald: #047857;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow: 0 6px 18px -10px rgba(40,28,12,.18), 0 1px 2px rgba(0,0,0,.04);
  --radius: 12px;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 768px) { .container { padding: 0 1.5rem; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: transparent;
  padding: 1rem 0;
  transition: background .25s, box-shadow .25s, padding .25s, border-color .25s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(251,247,239,.88);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
  padding: .65rem 0;
}
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; min-width: 0; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(212,162,10,.10);
  border: 1px solid rgba(212,162,10,.30);
  color: var(--primary);
}
.brand-text strong { font-family: var(--font-serif); font-weight: 700; font-size: 1.2rem; line-height: 1; display: block; }
.brand-text small { display: block; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--primary); margin-top: 3px; }
.brand-footer { display: inline-flex; gap: .5rem; align-items: center; margin-bottom: .75rem; color: var(--fg); }
.brand-footer strong { font-family: var(--font-serif); font-size: 1.25rem; }

.primary-nav { display: none; gap: 1.6rem; align-items: center; }
.primary-nav a {
  font-size: .9rem; font-weight: 500; color: var(--muted);
  position: relative; padding: .35rem 0; transition: color .2s;
}
.primary-nav a:hover { color: var(--primary); }
.primary-nav a.active { color: var(--primary); }
.primary-nav a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--primary); border-radius: 2px;
}

/* Mobile hamburger */
.nav-toggle {
  display: inline-flex; flex-direction: column; gap: 4px; justify-content: center; align-items: center;
  width: 40px; height: 40px; border-radius: 8px; background: var(--card);
  border: 1px solid var(--border); cursor: pointer; padding: 0;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--fg); border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-drawer {
  position: fixed; inset: 0 0 0 auto; width: 82%; max-width: 360px; z-index: 60;
  background: var(--bg); border-left: 1px solid var(--border);
  transform: translateX(100%); transition: transform .3s ease;
  display: flex; flex-direction: column;
  box-shadow: -10px 0 30px -10px rgba(0,0,0,.18);
}
.mobile-drawer.open { transform: translateX(0); }
.mobile-drawer .drawer-head {
  padding: 1.5rem; border-bottom: 1px solid var(--border); display: flex; gap: .75rem; align-items: center;
}
.mobile-drawer nav { flex: 1; padding: 1rem .75rem; overflow-y: auto; }
.mobile-drawer nav a {
  display: flex; justify-content: space-between; align-items: center;
  padding: .9rem 1rem; border-radius: 8px; font-family: var(--font-serif);
  font-size: 1.05rem; font-weight: 600; color: var(--fg); transition: background .2s;
}
.mobile-drawer nav a:hover, .mobile-drawer nav a.active { background: rgba(212,162,10,.10); color: var(--primary); border-left: 2px solid var(--primary); }
.mobile-drawer nav a span.arrow { color: var(--primary); font-size: 1.25rem; }
.drawer-overlay { position: fixed; inset: 0; background: rgba(43,33,24,.45); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .25s; }
.drawer-overlay.show { opacity: 1; pointer-events: auto; }

@media (min-width: 1024px) {
  .primary-nav { display: flex; }
  .nav-toggle { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; padding: 2.5rem 0 3rem;
  border-bottom: 1px solid var(--border);
}
.hero::before, .hero::after {
  content: ''; position: absolute; width: 40%; height: 60%; border-radius: 50%;
  filter: blur(80px); pointer-events: none;
}
.hero::before { background: rgba(212,162,10,.07); top: -10%; right: -5%; }
.hero::after { background: rgba(128,0,32,.05); bottom: -10%; left: -5%; }
.hero-inner { position: relative; text-align: center; max-width: 760px; margin: 0 auto 2.5rem; }
.hero h1 {
  font-family: var(--font-serif); font-weight: 700;
  font-size: clamp(2rem, 5vw, 4.25rem); line-height: 1.1; margin: 0 0 1rem;
}
.hero h1 em { font-style: italic; color: var(--primary); }
.hero p.lead { color: var(--muted); font-size: clamp(.95rem, 1.6vw, 1.15rem); margin: 0 auto; max-width: 640px; }
.hero .meta { margin-top: 1rem; font-size: .8rem; color: var(--muted); display: inline-flex; gap: .5rem; align-items: center; flex-wrap: wrap; justify-content: center; }
.hero .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .4 } }
@media (min-width: 768px) { .hero { padding: 4rem 0 5rem; } }

/* ---------- Price cards (top strip) ---------- */
.price-grid { display: grid; gap: .75rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 1024px) { .price-grid { grid-template-columns: repeat(4, 1fr); gap: 1.25rem; } }
.price-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem; box-shadow: var(--shadow-sm); transition: box-shadow .25s, transform .25s;
}
.price-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.price-card .head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .85rem; }
.price-card .title { font-family: var(--font-serif); font-weight: 700; font-size: 1.05rem; }
.price-card .unit {
  font-size: .68rem; padding: .2rem .55rem; border-radius: 999px;
  background: rgba(212,162,10,.12); color: var(--primary); font-weight: 600;
}
.price-card .value { font-family: var(--font-serif); font-weight: 700; font-size: clamp(1.5rem, 3vw, 1.85rem); }
.price-card .change { display: inline-flex; align-items: center; gap: .25rem; font-size: .78rem; padding: .25rem .55rem; border-radius: 6px; margin-top: .65rem; font-weight: 600; }
.price-card .change.up { background: rgba(4,120,87,.10); color: var(--emerald); }
.price-card .change.down { background: rgba(128,0,32,.08); color: var(--accent); }
.price-card .change.flat { background: var(--secondary); color: var(--muted); }

/* ---------- Section heads ---------- */
section { padding: 3rem 0; border-bottom: 1px solid var(--border); }
@media (min-width: 768px) { section { padding: 4.5rem 0; } }
.section-eyebrow { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--primary); font-weight: 600; margin: 0 0 .5rem; }
.section-title { font-family: var(--font-serif); font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.4rem); margin: 0 0 .75rem; }
.section-sub { color: var(--muted); margin: 0; }
.section-head-center { text-align: center; max-width: 640px; margin: 0 auto 2.25rem; }

.bg-secondary { background: rgba(250,240,230,.5); }
.bg-secondary-light { background: rgba(250,240,230,.3); }

/* ---------- City icon grid ---------- */
.city-row {
  display: flex; gap: .75rem; overflow-x: auto; padding-bottom: 1rem;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  margin: 0 -1rem; padding-left: 1rem; padding-right: 1rem;
}
.city-row::-webkit-scrollbar { height: 6px; }
.city-row::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
@media (min-width: 768px) {
  .city-row { flex-wrap: wrap; justify-content: center; overflow: visible; gap: 1rem; margin: 0; padding: 0; }
}
.city-card {
  flex: 0 0 auto; scroll-snap-align: start;
  width: 118px; padding: 1.1rem .75rem .9rem;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; flex-direction: column; align-items: center; gap: .55rem;
  box-shadow: var(--shadow-sm); transition: transform .25s, box-shadow .25s, border-color .25s;
  text-align: center;
}
.city-card:hover { transform: translateY(-3px); border-color: rgba(212,162,10,.45); box-shadow: var(--shadow); }
.city-card img { width: 64px; height: 64px; object-fit: contain; transition: transform .35s; }
.city-card:hover img { transform: scale(1.06); }
.city-card .city-name { font-family: var(--font-serif); font-weight: 600; color: var(--accent); font-size: 15px; }
.city-card:hover .city-name { color: var(--primary); }

/* ---------- Silver section ---------- */
.silver-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .silver-grid { grid-template-columns: repeat(3, 1fr); } }
.silver-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.4rem; box-shadow: var(--shadow-sm);
}
.silver-card.featured { background: rgba(212,162,10,.06); border-color: rgba(212,162,10,.35); }
.silver-card .label { font-size: 11px; text-transform: uppercase; letter-spacing: .15em; color: var(--muted); margin-bottom: .35rem; }
.silver-card.featured .label { color: var(--primary); }
.silver-card .price { font-family: var(--font-serif); font-weight: 700; font-size: 1.7rem; }
.silver-card .note { font-size: .8rem; color: var(--muted); margin-top: .5rem; }

.section-head-row { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; margin-bottom: 2rem; }
@media (min-width: 768px) { .section-head-row { flex-direction: row; align-items: flex-end; justify-content: space-between; } }
.btn-link { display: inline-flex; align-items: center; gap: .35rem; font-size: .9rem; font-weight: 600; color: var(--primary); }
.btn-link:hover { color: var(--accent); }

/* ---------- Charts ---------- */
.chart-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow-sm); }
.chart-head { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 1.1rem; }
@media (min-width: 640px) { .chart-head { flex-direction: row; align-items: flex-end; justify-content: space-between; } }
.chart-head h3 { font-family: var(--font-serif); font-weight: 700; font-size: 1.35rem; margin: 0; }
.chart-head .chart-eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .18em; color: var(--primary); font-weight: 600; margin-bottom: .25rem; }
.range-toggle {
  display: inline-flex; gap: 2px; padding: 4px; background: var(--secondary); border-radius: 8px; align-self: flex-start;
}
.range-toggle button {
  padding: .4rem .75rem; border: 0; background: transparent; cursor: pointer; font-size: .8rem; font-weight: 600;
  color: var(--muted); border-radius: 6px; transition: background .2s, color .2s;
  font-family: inherit;
}
.range-toggle button.active { background: var(--primary); color: var(--primary-fg); box-shadow: var(--shadow-sm); }
.range-toggle button:not(.active):hover { color: var(--fg); background: rgba(255,255,255,.6); }
.chart-canvas-wrap { position: relative; height: 320px; }
@media (min-width: 768px) { .chart-canvas-wrap { height: 380px; } }

.charts-2col { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .charts-2col { grid-template-columns: 1fr 1fr; } }

/* ---------- Affiliate cards ---------- */
.affil-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .affil-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .affil-grid { grid-template-columns: repeat(4, 1fr); } }
.affil-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; }
.affil-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.affil-card .image { aspect-ratio: 1/1; overflow: hidden; background: var(--secondary); }
.affil-card .image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.affil-card:hover .image img { transform: scale(1.05); }
.affil-card .body { padding: 1rem 1.15rem 1.25rem; flex: 1; display: flex; flex-direction: column; }
.affil-card .brand { font-size: 11px; letter-spacing: .15em; text-transform: uppercase; color: var(--primary); font-weight: 600; }
.affil-card .name { font-family: var(--font-serif); font-weight: 700; font-size: 1.1rem; margin: .35rem 0 .55rem; }
.affil-card .price { font-family: var(--font-serif); font-weight: 700; font-size: 1.25rem; margin-bottom: .85rem; }
.affil-card .btn { margin-top: auto; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; padding: .65rem 1.1rem; border-radius: 8px; font-weight: 600; font-size: .9rem; cursor: pointer; border: 1px solid var(--primary); background: var(--primary); color: var(--primary-fg); transition: filter .2s; text-align: center; }
.btn:hover { filter: brightness(1.05); }
.btn.secondary { background: transparent; color: var(--primary); }
.btn.full { width: 100%; }

/* ---------- City detail page ---------- */
.city-hero { background: var(--secondary); padding: 3rem 0; border-bottom: 1px solid var(--border); }
.city-hero img { width: 110px; height: 110px; object-fit: contain; margin: 0 auto 1rem; }
.city-hero h1 { font-family: var(--font-serif); text-align: center; font-size: clamp(2rem, 5vw, 3.5rem); margin: .25rem 0 .35rem; }
.city-hero p { text-align: center; color: var(--muted); margin: 0 0 1.5rem; }
.calc { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow-sm); }
.calc label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .35rem; }
.calc input, .calc select { width: 100%; padding: .65rem .8rem; border-radius: 8px; border: 1px solid var(--border); background: #fff; font: inherit; }
.calc-row { display: grid; gap: .85rem; grid-template-columns: 1fr 1fr; margin-bottom: 1rem; }
.calc-result { background: var(--secondary); border-radius: 8px; padding: 1rem 1.2rem; font-family: var(--font-serif); font-weight: 700; font-size: 1.5rem; text-align: center; }

/* ---------- Tables ---------- */
.tbl { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.tbl th, .tbl td { padding: .85rem 1rem; text-align: left; border-bottom: 1px solid var(--border); font-size: .9rem; }
.tbl th { background: rgba(250,240,230,.6); font-family: var(--font-serif); font-weight: 700; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: rgba(250,240,230,.4); }
.tbl td.right, .tbl th.right { text-align: right; }
.scroll-x { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.scroll-x .tbl { border: 0; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1rem; max-width: 640px; }
.form .field { display: flex; flex-direction: column; gap: .35rem; }
.form label { font-weight: 600; font-size: .85rem; }
.form input, .form select, .form textarea { padding: .7rem .85rem; border-radius: 8px; border: 1px solid var(--border); background: #fff; font: inherit; }
.form textarea { min-height: 100px; resize: vertical; }
.alert { padding: .85rem 1rem; border-radius: 8px; font-size: .9rem; margin-bottom: 1rem; }
.alert.success { background: rgba(4,120,87,.10); color: var(--emerald); border: 1px solid rgba(4,120,87,.30); }
.alert.error { background: rgba(128,0,32,.08); color: var(--accent); border: 1px solid rgba(128,0,32,.30); }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--border); padding: 1rem 0; }
.faq summary { cursor: pointer; font-family: var(--font-serif); font-weight: 700; font-size: 1.1rem; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::after { content: '+'; color: var(--primary); font-size: 1.4rem; transition: transform .2s; }
.faq details[open] summary::after { content: '−'; }
.faq summary:hover { color: var(--primary); }
.faq p { margin: .65rem 0 0; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: rgba(250,240,230,.5); border-top: 1px solid var(--border); padding: 3rem 0 1.5rem; margin-top: 2rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; gap: 3rem; } }
.site-footer h4 { font-family: var(--font-serif); margin: 0 0 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.site-footer a { color: var(--muted); font-size: .9rem; }
.site-footer a:hover { color: var(--primary); }
.site-footer p { color: var(--muted); font-size: .9rem; max-width: 420px; }
.foot-bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: .5rem; }
@media (min-width: 768px) { .foot-bottom { flex-direction: row; justify-content: space-between; align-items: center; } }
.foot-bottom p { font-size: .75rem; margin: 0; }
.foot-bottom .muted { max-width: 600px; }
