/* ==========================================================================
   goldrate.insosys.in - Retail Gold & Ornament Price Calculator
   Royal Emerald Green & 24K Golden Luxury Design System
   Fully Mobile-Responsive & Touch-Optimized Layout
   ========================================================================== */

:root {
  /* Royal Emerald Green Palette */
  --royal-green-950: #03140d; /* Deepest Forest Obsidian */
  --royal-green-900: #052116; /* Royal Emerald Dark */
  --royal-green-800: #093223; /* Royal Velvet Green */
  --royal-green-700: #0e4531; /* Emerald Jewel */
  --royal-green-600: #145940; /* Rich Emerald Accent */
  --royal-green-500: #1c7253; /* Luminous Mint Emerald */
  --royal-green-400: #2ea378; /* Vibrant Mint */
  --royal-green-100: #d8eee4; /* Soft Pale Celadon */

  /* Royal 24K Gold Metallics */
  --gold-50: #fffbee;
  --gold-100: #fdf2cc;
  --gold-200: #fbe599;
  --gold-300: #f5d365;
  --gold-400: #e9be3a;
  --gold-500: #d4a726; /* Pure 24K Bullion Gold */
  --gold-600: #b88a18;
  --gold-700: #8f680d;
  --gold-800: #694a08;
  
  /* Luxury Metallic Gradients */
  --gold-gradient: linear-gradient(135deg, #fbe8a6 0%, #dfb235 45%, #b98816 80%, #8c6308 100%);
  --gold-gradient-hover: linear-gradient(135deg, #fff0ba 0%, #ecbe3f 45%, #c8951e 80%, #9e710d 100%);
  --royal-green-gradient: linear-gradient(145deg, #093223 0%, #052116 60%, #03140d 100%);
  --gold-glow: 0 0 25px rgba(212, 167, 38, 0.35);
  --emerald-glow: 0 0 25px rgba(20, 89, 64, 0.4);

  /* Theme Defaults: Royal Emerald & Gold (Dark Mode) */
  --bg-primary: #04160f;
  --bg-secondary: #08261b;
  --bg-card: rgba(9, 38, 27, 0.82);
  --bg-card-hover: rgba(12, 48, 35, 0.92);
  --bg-input: #03120c;
  --border-color: rgba(212, 167, 38, 0.24);
  --border-focus: #dfb235;

  /* Typography Colors */
  --text-main: #f5f9f6;
  --text-muted: #9cbaa9;
  --text-dim: #6b8c7a;
  --accent-gold: #fbe599;
  --accent-green: #2ea378;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;

  /* Elevation & Glassmorphism */
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 26px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 16px 44px rgba(0, 0, 0, 0.7);
  --glass-blur: blur(18px);

  /* Geometry & Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Fonts */
  --font-heading: 'Cinzel', serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme Variables: Regal Mint Silk & Royal Gold */
[data-theme="light"] {
  --bg-primary: #f2f7f4;
  --bg-secondary: #e5efe9;
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-card-hover: #ffffff;
  --bg-input: #ffffff;
  --border-color: rgba(184, 138, 24, 0.3);
  --border-focus: #b88a18;
  --text-main: #062317;
  --text-muted: #416152;
  --text-dim: #708f81;
  --shadow-sm: 0 2px 10px rgba(5, 33, 22, 0.08);
  --shadow-md: 0 8px 24px rgba(5, 33, 22, 0.1);
  --shadow-lg: 0 16px 40px rgba(5, 33, 22, 0.14);
  --gold-glow: 0 0 20px rgba(184, 138, 24, 0.22);
  --emerald-glow: 0 0 20px rgba(28, 114, 83, 0.15);
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  background-image: 
    radial-gradient(circle at 12% 15%, rgba(212, 167, 38, 0.09) 0%, transparent 45%),
    radial-gradient(circle at 88% 85%, rgba(20, 89, 64, 0.14) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(5, 33, 22, 0.4) 0%, transparent 80%);
  background-attachment: fixed;
}

/* Outer Wrapper */
.app-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 20px 80px 20px;
}

/* Header & Brand Navbar */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.site-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 5%;
  right: 5%;
  height: 1px;
  background: var(--gold-gradient);
  opacity: 0.6;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-icon-box {
  width: 48px;
  height: 48px;
  background: var(--gold-gradient);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--gold-glow);
  font-size: 22px;
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.brand-tagline {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.4px;
  font-weight: 600;
  margin-top: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle-btn {
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 18px;
  flex-shrink: 0;
}

.theme-toggle-btn:hover {
  border-color: var(--gold-400);
  box-shadow: var(--gold-glow);
  transform: scale(1.05);
}

/* Benchmark Rates Ticker Bar */
.rates-ticker {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ticker-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold-400);
  white-space: nowrap;
  flex-shrink: 0;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-green);
  animation: pulseLive 2s infinite;
}

@keyframes pulseLive {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

.ticker-items {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 2px 0;
}

.ticker-items::-webkit-scrollbar {
  display: none;
}

.rate-badge {
  background: var(--bg-secondary);
  border: 1px solid rgba(212, 167, 38, 0.3);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.rate-badge:hover, .rate-badge.active {
  border-color: var(--gold-400);
  background: rgba(212, 167, 38, 0.16);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.rate-badge .carat-label {
  font-weight: 700;
  color: var(--gold-300);
}

.rate-badge .rate-val {
  font-weight: 600;
  color: var(--text-main);
}

/* Calculator Grid */
.calculator-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 26px;
  align-items: start;
}

/* Cards Common */
.calc-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-md);
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
}

.calc-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold-gradient);
  opacity: 0.85;
}

.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  color: var(--gold-300);
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.3;
}

.card-subtext {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Carat Selector Grid */
.carat-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.carat-option-card {
  position: relative;
}

.carat-radio {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.carat-label-block {
  display: block;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 64px;
}

.carat-radio:checked + .carat-label-block {
  border-color: var(--gold-400);
  background: rgba(212, 167, 38, 0.18);
  box-shadow: 0 0 16px rgba(212, 167, 38, 0.28);
  transform: translateY(-2px);
}

.carat-tag {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--gold-300);
  display: block;
}

.purity-tag {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

/* Input Fields */
.input-group {
  margin-bottom: 16px;
}

.input-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.input-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.input-helper {
  font-size: 11px;
  color: var(--text-dim);
}

.input-control-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-affix-prefix, .input-affix-suffix {
  position: absolute;
  color: var(--gold-400);
  font-weight: 700;
  font-size: 14px;
  pointer-events: none;
}

.input-affix-prefix { left: 14px; }
.input-affix-suffix { right: 14px; }

.form-control {
  width: 100%;
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 15px;
  font-family: var(--font-body);
  color: var(--text-main);
  transition: all var(--transition-fast);
  outline: none;
  min-height: 46px;
}

.has-prefix { padding-left: 32px; }
.has-suffix { padding-right: 46px; }

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 14px rgba(212, 167, 38, 0.3);
  background: var(--bg-secondary);
}

/* Weight Deduction Grid (Gross - Stone = Net) */
.weight-deduction-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  align-items: end;
  background: var(--bg-secondary);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 14px;
}

.net-weight-highlight {
  background: rgba(20, 89, 64, 0.4);
  border: 1.5px solid var(--gold-400);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  text-align: center;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.net-weight-title {
  font-size: 10.5px;
  text-transform: uppercase;
  color: var(--gold-300);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.net-weight-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

/* Making Charges Tab Selector */
.tab-pills {
  display: flex;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 4px;
  margin-bottom: 12px;
}

.tab-pill-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 9px 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 40px;
}

.tab-pill-btn.active {
  background: var(--gold-gradient);
  color: #04140d;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Range Sliders */
.range-with-bubbles {
  margin-top: 10px;
}

.custom-range {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 7px;
  border-radius: 4px;
  background: #062419;
  outline: none;
  cursor: pointer;
}

.custom-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gold-gradient);
  box-shadow: 0 0 10px rgba(212, 167, 38, 0.6);
  cursor: pointer;
  transition: transform 0.1s;
}

.custom-range::-webkit-slider-thumb:hover {
  transform: scale(1.18);
}

.quick-bubbles {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.bubble-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}

.bubble-btn:hover {
  border-color: var(--gold-400);
  color: var(--text-main);
  background: rgba(212, 167, 38, 0.15);
}

/* Switch Toggle (Hallmarking) */
.switch-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
}

.switch-box {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.switch-box input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-round {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #0c3324;
  border: 1px solid var(--border-color);
  transition: .3s;
  border-radius: 34px;
}

.slider-round:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #f5f9f6;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider-round {
  background: var(--gold-gradient);
  border-color: var(--gold-400);
}

input:checked + .slider-round:before {
  transform: translateX(22px);
  background-color: #04140d;
}

/* ==========================================================================
   Right Panel: Real-Time Price & Summary Breakdown
   ========================================================================== */

.price-display-hero {
  background: linear-gradient(145deg, #093424, #04180f);
  border: 1.5px solid var(--gold-400);
  border-radius: var(--radius-lg);
  padding: 26px 20px;
  box-shadow: 0 10px 32px rgba(212, 167, 38, 0.22);
  margin-bottom: 22px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.price-display-hero::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(212, 167, 38, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

[data-theme="light"] .price-display-hero {
  background: linear-gradient(145deg, #ffffff, #edf6f1);
  border-color: var(--gold-500);
}

.hero-tagline {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--gold-400);
  font-weight: 700;
  margin-bottom: 6px;
}

.grand-price-value {
  font-family: var(--font-heading);
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.5px;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
  line-height: 1.15;
  transition: transform 0.2s ease;
}

.grand-price-value.price-bounce {
  transform: scale(1.035);
}

.sub-meta-strip {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.sub-meta-item strong {
  color: var(--text-main);
}

/* Breakdown Table */
.calc-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 18px;
}

.calc-table tr {
  border-bottom: 1px solid rgba(212, 167, 38, 0.15);
  transition: background var(--transition-fast);
}

.calc-table tr:hover {
  background: rgba(212, 167, 38, 0.06);
}

.calc-table td {
  padding: 11px 8px;
  font-size: 13.5px;
}

.calc-table td.item-name {
  color: var(--text-main);
  font-weight: 600;
}

.calc-table td.item-basis {
  color: var(--text-dim);
  font-size: 11.5px;
}

.calc-table td.item-amount {
  text-align: right;
  font-weight: 700;
  color: var(--text-main);
  font-feature-settings: "tnum";
  white-space: nowrap;
}

.calc-table tr.subtotal-row td {
  border-top: 1px solid var(--gold-500);
  padding-top: 12px;
  font-weight: 700;
  color: var(--gold-300);
}

.calc-table tr.total-row td {
  border-top: 2px solid var(--gold-400);
  border-bottom: 2px solid var(--gold-400);
  background: rgba(212, 167, 38, 0.12);
  font-size: 15px;
  font-weight: 800;
  color: var(--gold-300);
}

/* Cost Composition Bar */
.share-composition {
  margin-bottom: 22px;
}

.share-header {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: 8px;
}

.share-stacked-bar {
  display: flex;
  height: 9px;
  border-radius: var(--radius-full);
  overflow: hidden;
  background: #062317;
  margin-bottom: 10px;
}

.share-seg-gold { background: #dfb235; }
.share-seg-making { background: #2ea378; }
.share-seg-wastage { background: #f59e0b; }
.share-seg-gst { background: #3b82f6; }
.share-seg-others { background: #a855f7; }

.share-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11px;
  color: var(--text-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* Action Buttons */
.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: all var(--transition-fast);
  min-height: 46px;
}

.btn-gold-primary {
  background: var(--gold-gradient);
  color: #04140d;
  box-shadow: 0 4px 14px rgba(212, 167, 38, 0.35);
}

.btn-gold-primary:hover {
  background: var(--gold-gradient-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 167, 38, 0.45);
}

.btn-glass-secondary {
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
}

.btn-glass-secondary:hover {
  border-color: var(--gold-400);
  background: rgba(212, 167, 38, 0.16);
}

/* Formula & Educational Accordion */
.formula-accordion {
  margin-top: 22px;
}

.formula-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 10px;
}

.formula-header {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-300);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.formula-math {
  font-family: 'Consolas', 'Fira Code', monospace;
  font-size: 12px;
  background: var(--bg-input);
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--gold-200);
  border: 1px solid rgba(212, 167, 38, 0.18);
  margin-top: 4px;
  word-break: break-all;
}

/* Toast Message */
.toast-msg {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #093223;
  color: #f5f9f6;
  border: 1.5px solid var(--gold-400);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 90vw;
}

.toast-msg.show {
  transform: translateY(0);
  opacity: 1;
}

/* Footer */
.app-footer {
  text-align: center;
  margin-top: 36px;
  font-size: 12px;
  color: var(--text-dim);
  border-top: 1px solid rgba(212, 167, 38, 0.16);
  padding-top: 22px;
}

.app-footer a {
  color: var(--gold-400);
  text-decoration: none;
}

/* ==========================================================================
   Mobile Responsive Layout & Touch Optimizations
   ========================================================================== */

/* Tablet & Mobile Screens (<= 992px) */
@media (max-width: 992px) {
  .app-wrapper {
    padding: 16px 14px 60px 14px;
  }

  .calculator-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Right column stacks under form */
  .summary-column {
    position: static !important;
  }

  .action-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile Screens (<= 768px) */
@media (max-width: 768px) {
  .site-header {
    padding: 14px 16px;
    margin-bottom: 16px;
  }

  .brand-icon-box {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .brand-name {
    font-size: 18px;
  }

  .brand-tagline {
    font-size: 10px;
    letter-spacing: 1px;
  }

  .calc-card {
    padding: 20px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
  }

  .card-title {
    font-size: 15.5px;
  }

  .carat-selector {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .carat-label-block {
    padding: 10px 6px;
    min-height: 58px;
  }

  .weight-deduction-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px;
  }

  .net-weight-highlight {
    min-height: 56px;
  }

  .net-weight-val {
    font-size: 22px;
  }

  .rates-ticker {
    padding: 10px 12px;
    margin-bottom: 18px;
  }

  .ticker-title {
    font-size: 11px;
  }

  .price-display-hero {
    padding: 22px 16px;
    margin-bottom: 16px;
  }

  .grand-price-value {
    font-size: 32px;
  }

  .sub-meta-strip {
    font-size: 11.5px;
    gap: 10px;
  }

  .calc-table td {
    padding: 10px 6px;
    font-size: 12.5px;
  }

  .calc-table td.item-basis {
    font-size: 11px;
  }

  .calc-table tr.total-row td {
    font-size: 14px;
  }

  .btn-action {
    width: 100%;
    font-size: 13px;
    min-height: 48px;
  }
}

/* Compact Mobile (<= 480px) */
@media (max-width: 480px) {
  .app-wrapper {
    padding: 12px 10px 50px 10px;
  }

  .site-header {
    padding: 12px 14px;
  }

  .brand-name {
    font-size: 16px;
  }

  .rates-ticker {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .ticker-items {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .rate-badge {
    padding: 5px 10px;
    font-size: 11.5px;
  }

  .tab-pills {
    flex-direction: column;
    gap: 4px;
  }

  .tab-pill-btn {
    padding: 8px;
    text-align: center;
  }

  .quick-bubbles {
    gap: 5px;
  }

  .bubble-btn {
    font-size: 10.5px;
    padding: 4px 8px;
  }

  .grand-price-value {
    font-size: 28px;
  }

  .toast-msg {
    right: 12px;
    left: 12px;
    bottom: 14px;
    max-width: 100%;
  }
}

/* ==========================================================================
   Header Navigation & Mobile Drawer Extensions (AdSense / Structure)
   ========================================================================== */
.header-brand-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  flex: 1;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.nav-item:hover {
  color: var(--gold-300);
  background: rgba(200, 149, 32, 0.1);
  border-color: rgba(212, 167, 38, 0.25);
}

.nav-item.active {
  color: var(--gold-300);
  background: rgba(200, 149, 32, 0.16);
  border-color: var(--gold-400);
  font-weight: 700;
}

.mobile-menu-btn {
  display: none;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mobile-menu-btn:hover {
  border-color: var(--gold-400);
  color: var(--gold-300);
}

.mobile-nav-drawer {
  display: none;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  padding: 16px;
  box-shadow: var(--shadow-md);
}

.mobile-nav-drawer.open {
  display: block;
  animation: fadeInDown 0.22s ease-out;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.mobile-nav-link:hover, .mobile-nav-link.active {
  background: rgba(200, 149, 32, 0.14);
  color: var(--gold-300);
}

@media (max-width: 960px) {
  .main-nav {
    display: none;
  }
  .mobile-menu-btn {
    display: flex;
  }
}

/* ==========================================================================
   Comprehensive AdSense-Compliant Multi-Column Site Footer
   ========================================================================== */
.site-footer {
  margin-top: 55px;
  background: linear-gradient(180deg, rgba(8, 38, 27, 0.6) 0%, rgba(3, 20, 13, 0.98) 100%);
  border-top: 1.5px solid var(--border-color);
  padding: 48px 24px 32px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: var(--gold-gradient);
  opacity: 0.6;
}

.footer-container {
  max-width: 1240px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1.1fr 1.1fr 1.1fr;
  gap: 36px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.footer-brand-icon {
  font-size: 24px;
}

.footer-brand-title {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 700;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-brand-sub {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  font-weight: 600;
}

.footer-bio {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-office-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 12px;
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.22);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--gold-400);
}

.office-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
}

.office-item strong {
  color: var(--gold-300);
}

.office-item a {
  color: var(--text-main);
  text-decoration: underline;
  text-decoration-color: rgba(212, 167, 38, 0.4);
}

.office-item a:hover {
  color: var(--gold-300);
}

.footer-heading {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--gold-300);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(212, 167, 38, 0.2);
  padding-bottom: 8px;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links-list li a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: all var(--transition-fast);
  display: inline-block;
}

.footer-links-list li a:hover {
  color: var(--gold-300);
  transform: translateX(4px);
}

.footer-bottom-bar {
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px dashed rgba(212, 167, 38, 0.2);
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 12px;
  color: var(--text-dim);
}

.footer-copy {
  color: var(--text-muted);
}

.footer-copy strong {
  color: var(--gold-300);
}

.footer-disclaimer-note {
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--text-dim);
}

.footer-disclaimer-note strong {
  color: var(--gold-400);
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
  .brand-col {
    grid-column: span 2;
  }
}

@media (max-width: 580px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .brand-col {
    grid-column: span 1;
  }
}

/* ==========================================================================
   Content & Legal Page Layouts (About, Privacy, Terms, Disclaimer, Contact)
   ========================================================================== */
.content-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  padding: 10px 0 40px;
}

.legal-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

.legal-hero {
  text-align: center;
  margin-bottom: 34px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(212, 167, 38, 0.25);
}

.legal-badge {
  display: inline-block;
  background: rgba(200, 149, 32, 0.18);
  color: var(--gold-300);
  border: 1px solid var(--gold-400);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 12px;
}

.legal-title {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.25;
  margin-bottom: 8px;
}

.legal-meta {
  font-size: 12.5px;
  color: var(--text-muted);
}

.legal-section {
  margin-bottom: 28px;
}

.legal-h2 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--gold-300);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.legal-p {
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--text-main);
  margin-bottom: 14px;
}

.legal-list {
  padding-left: 22px;
  margin-bottom: 16px;
}

.legal-list li {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--text-main);
  margin-bottom: 8px;
}

.legal-list li strong {
  color: var(--gold-300);
}

.legal-highlight-box {
  background: rgba(14, 69, 49, 0.45);
  border-left: 3.5px solid var(--gold-400);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 18px 0;
  font-size: 13px;
  line-height: 1.7;
  color: #d1fae5;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 28px;
  margin-top: 24px;
}

.contact-card-info {
  background: rgba(5, 33, 22, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-method {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.contact-method-icon {
  font-size: 24px;
  background: rgba(200, 149, 32, 0.15);
  border: 1px solid var(--gold-400);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-method-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-300);
  margin-bottom: 3px;
}

.contact-method-detail {
  font-size: 12.5px;
  color: var(--text-main);
  line-height: 1.55;
}

.btn-gold-submit {
  background: var(--gold-gradient);
  color: #000;
  border: none;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.btn-gold-submit:hover {
  background: var(--gold-gradient-hover);
  transform: translateY(-2px);
  box-shadow: var(--gold-glow);
}

@media (max-width: 768px) {
  .legal-card {
    padding: 24px 18px;
  }
  .legal-title {
    font-size: 22px;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   24K Royal Gold Vector SVG Icon Styling
   ========================================================================== */
.gold-svg-icon {
  display: inline-block;
  vertical-align: middle;
  color: var(--gold-400);
  fill: currentColor;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.brand-icon-box .gold-svg-icon {
  color: #052116;
  filter: drop-shadow(0 1px 1px rgba(255, 255, 255, 0.4));
}

.nav-item .gold-svg-icon {
  color: var(--gold-400);
  margin-right: 4px;
}

.nav-item:hover .gold-svg-icon,
.nav-item.active .gold-svg-icon {
  color: var(--gold-300);
  transform: translateY(-1px);
  filter: drop-shadow(0 0 6px rgba(212, 167, 38, 0.55));
}

.mobile-nav-link .gold-svg-icon {
  color: var(--gold-400);
}

.footer-heading .gold-svg-icon {
  color: var(--gold-400);
}

.office-icon .gold-svg-icon {
  color: var(--gold-300);
}

.contact-method-icon .gold-svg-icon {
  color: var(--gold-300);
}

.pillar-icon-box {
  width: 52px;
  height: 52px;
  background: rgba(200, 149, 32, 0.14);
  border: 1.5px solid var(--gold-400);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.pillar-icon-box .gold-svg-icon {
  color: var(--gold-300);
}


