/* assets/css/user-app.css */
:root {
  --plum: #630B4E;
  --plum-soft: #F7EAF3;
  --bg-app: #F6F7F9;
  --surface: #FFFFFF;
  --text-main: #111827;
  --text-muted: #6B7280;
  --border: #E5E7EB;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-pill: 999px;
}

/* SILVER THEME TOKENS */
[data-metal="Silver"] {
  --hero-bg: #2B3440;
  --hero-text: #FFFFFF;
  --hero-sub: #CBD5E1;
  --btn-primary: #3A4B5C;
  --pill-active-bg: #E9EEF3;
  --pill-active-text: #1E293B;
  --stat-highlight: #EEF2F6;
  --icon-tint: #94A3B8;
}

/* GOLD THEME TOKENS */
[data-metal="Gold"] {
  --hero-bg: #3E2B07;
  --hero-text: #FCD34D;
  --hero-sub: #E5D3B3;
  --btn-primary: #8A6108;
  --pill-active-bg: #F5E9C8;
  --pill-active-text: #78350F;
  --stat-highlight: #F7EED3;
  --icon-tint: #C59326;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  background: var(--bg-app);
  color: var(--text-main);
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
}

/* Responsive Container: Mobile 100%, Tablet/Desktop clean centered layout */
.app-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px;
}

/* SPLASH SCREEN (Rajatkala splash.png) */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--plum);
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 400ms ease, visibility 400ms ease;
}
.splash-screen.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.dashed-logo-box {
  width: 112px;
  height: 112px;
  border: 2px dashed rgba(255,255,255,0.45);
  border-radius: 26px;
  display: grid;
  place-items: center;
  font-size: 14px;
  margin-bottom: 20px;
}
.splash-bar {
  position: absolute;
  bottom: 36px;
  width: 120px;
  height: 4px;
  border-radius: 999px;
  background: #FFFFFF;
}

/* SLIDING METAL SWITCH (Home Silver.png / Home Gold.png) */
.metal-toggle-bar {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #ECEFF3;
  border-radius: 14px;
  padding: 4px;
  margin: 14px 0;
  cursor: pointer;
}
.metal-toggle-slider {
  position: absolute;
  top: 4px; left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: #FFFFFF;
  border-radius: 11px;
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}
[data-metal="Gold"] .metal-toggle-slider { transform: translate3d(100%, 0, 0); }
.metal-toggle-bar button {
  position: relative; z-index: 1;
  border: 0; background: transparent;
  padding: 10px; font-weight: 600; font-size: 14px;
  color: var(--text-muted); cursor: pointer;
}
.metal-toggle-bar button.active { color: var(--text-main); }

/* LIVE RATE HERO CARD */
.rate-hero-card {
  background: var(--hero-bg);
  color: #FFFFFF;
  border-radius: 22px;
  padding: 20px;
  transition: background-color 280ms ease;
}
.rate-hero-top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--hero-sub); }
.live-badge {
  background: rgba(255,255,255,0.92);
  color: #111827;
  font-weight: 600;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}
.rate-hero-price {
  font-size: 36px;
  font-weight: 800;
  color: var(--hero-text);
  margin: 8px 0 6px;
  letter-spacing: -0.5px;
}
.rate-hero-meta { font-size: 12px; color: var(--hero-sub); }

/* CATEGORY FILTER PILLS */
.pill-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 0;
  scrollbar-width: none;
}
.pill-row::-webkit-scrollbar { display: none; }
.cat-pill {
  border: 1px solid var(--border);
  background: #FFFFFF;
  color: var(--text-main);
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.cat-pill.active { background: #111827; color: #FFFFFF; border-color: #111827; }

/* PRODUCT GRID: 2 cols on Mobile, 4 cols on Laptop/Desktop */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 768px) {
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
}
.product-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 12px;
  text-decoration: none;
  color: inherit;
  display: block;
}
.product-thumb {
  aspect-ratio: 1 / 1;
  background: #EBEEF2;
  border-radius: 14px;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin-bottom: 10px;
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-title { font-weight: 700; font-size: 15px; margin: 0 0 4px; }
.product-sub { font-size: 12px; color: var(--text-muted); margin: 0 0 6px; }
.product-price { font-weight: 800; font-size: 15px; }

/* PRIMARY THEME CTA */
.btn-theme {
  width: 100%;
  border: 0;
  background: var(--btn-primary);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 15px;
  padding: 15px;
  border-radius: 14px;
  cursor: pointer;
}
.btn-plum { background: var(--plum); color: #FFFFFF; }

/* FLOATING BOTTOM NAV (Mobile) & TOP BAR (Desktop) */
.floating-nav {
  position: fixed;
  bottom: calc(14px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 440px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  box-shadow: 0 8px 24px rgba(17,24,39,0.08);
  z-index: 100;
}
.floating-nav a {
  text-align: center;
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 13px;
  padding: 10px 4px;
  border-radius: var(--radius-pill);
}
.floating-nav a.active {
  background: var(--pill-active-bg);
  color: var(--pill-active-text);
}
@media (min-width: 900px) {
  body { padding-bottom: 32px; padding-top: 72px; }
  .floating-nav {
    top: 12px; bottom: auto;
    max-width: 520px;
  }
}