/* =====================================================================
   PK Mart — style.css
   Professional, mobile-first e-commerce + referral UI
   Matches index.html structure + app.js generated markup 1:1
===================================================================== */

/* ---------------------------------------------------------------------
   1. RESET & ROOT VARIABLES
--------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #F5A623;
  --primary-dark: #C97F00;
  --primary-light: #FFCB66;
  --primary-50: #FFF6E5;
  --accent: #0A1F44;
  --success: #10b981;
  --success-bg: #ecfdf5;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;

  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;

  --text: #0A1F44;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgba(10, 31, 68, 0.06);
  --shadow-md: 0 2px 6px rgba(10, 31, 68, 0.08);
  --shadow-lg: 0 4px 12px rgba(10, 31, 68, 0.10);
  --shadow-glow: 0 1px 2px rgba(10, 31, 68, 0.06);
  --shadow-card-hover: 0 4px 12px rgba(10, 31, 68, 0.10);

  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.4);

  --header-h: 64px;
  --bottom-nav-h: 64px;
  --sidebar-w: 268px;

  --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);

  /* ---- Premium additions (additive — nothing above changed) ---- */
  --dark: #0A1F44;
  --secondary: #123B7A;
  --navy: #0A1F44;
  --navy-deep: #04101F;
  --gold: #F5A623;
  --gold-soft: #FFCB66;
  --gradient-brand: var(--primary);
  --gradient-brand-soft: var(--primary-50);
  --gradient-gold: var(--primary);
  --gradient-navy: var(--accent);
  --gradient-mesh: none;
  --shadow-xl: 0 6px 16px rgba(10, 31, 68,0.10);
  --shadow-glow-lg: 0 2px 6px rgba(10, 31, 68,0.10);
  --shadow-glow-navy: 0 2px 6px rgba(10, 31, 68,0.10);
  --glass-bg-strong: rgba(255, 255, 255, 0.85);
  --ring: 0 0 0 3px var(--primary-50);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html { scroll-behavior: smooth; overflow-x: hidden; width: 100%; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
  letter-spacing: -0.01px;
}

/* Premium shared keyframes */
@keyframes float-y { 0%, 100% { transform: translateY(0); } }
@keyframes shimmer-sweep { 0%, 100% { transform: translateX(-120%); } }
@keyframes gradient-pan { 0%, 100% { background-position: 50% 50%; } }
@keyframes pulse-glow { 0%, 100% { opacity: 1; } }
@keyframes skeleton-shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

a { text-decoration: none; color: inherit; cursor: pointer; }
button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }
input { font-family: inherit; border: none; outline: none; background: none; color: inherit; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

.material-icons-round { font-size: 22px; line-height: 1; user-select: none; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

.hidden { display: none !important; }
.muted { color: var(--text-secondary); font-size: 14px; }

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-on-scroll.in-view { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll { opacity: 1; transform: none; transition: none; }
  .product-card, .sidebar-link, .section-header, .overlay { animation: none !important; }
}

/* ---------------------------------------------------------------------
   2. BUTTONS (shared across the whole app)
--------------------------------------------------------------------- */
.btn-primary, .btn-outline, .btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: var(--radius-md);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #1a1206;
  transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
  box-shadow: 0 2px 8px rgba(10, 31, 68, 0.14);
}
.btn-primary:active { background: var(--primary-dark); box-shadow: none; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary:focus-visible { outline: none; box-shadow: var(--ring); }

.btn-outline {
  background: var(--surface);
  color: var(--primary-dark);
  border: 1.5px solid var(--border);
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}
.btn-outline:hover {
  border-color: var(--primary);
  background: var(--primary-50);
  box-shadow: 0 1px 4px rgba(10, 31, 68, 0.08);
}
.btn-outline:active { background: var(--primary-50); box-shadow: none; }
.btn-outline:focus-visible { outline: none; box-shadow: var(--ring); }

.btn-google {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text);
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}
.btn-google:hover {
  background: var(--surface-alt);
  border-color: var(--text-muted);
  box-shadow: 0 1px 4px rgba(10, 31, 68, 0.08);
}
.btn-google img { width: 18px; height: 18px; }

.full-width { width: 100%; }

.icon-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  position: relative;
  transition: background-color 0.18s ease, color 0.18s ease;
}
.icon-btn:hover {
  background: var(--primary-50);
  color: var(--primary-dark);
}
.icon-btn:active { background: var(--primary-100, var(--primary-50)); }

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  margin-bottom: 14px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
}
.back-btn:hover { color: var(--primary-dark); }

/* ---------------------------------------------------------------------
   3. TOAST
--------------------------------------------------------------------- */
.toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translate(-50%, -120%);
  z-index: 9999;
  background: rgba(10, 31, 68, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  padding: 13px 22px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  max-width: 90vw;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

/* ---------------------------------------------------------------------
   4. AUTH OVERLAY
--------------------------------------------------------------------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  background: var(--accent);
  animation: overlayFade 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.overlay.active { display: flex; }
@keyframes overlayFade { from { opacity: 0; } to { opacity: 1; } }

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes slideUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 6px;
}
.auth-logo .material-icons-round { font-size: 28px; }

.auth-tagline {
  text-align: center;
  color: var(--text-secondary);
  font-size: 13.5px;
  margin-bottom: 26px;
}

.auth-trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 10px 0 4px;
}
.auth-trust-row span {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  padding: 5px 10px;
  border-radius: var(--radius-full);
}
.auth-trust-row .material-icons-round { font-size: 13px; color: var(--success); }

.auth-tabs {
  display: flex;
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 22px;
}
.auth-tab {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  cursor: pointer;
}
.auth-tab.active { background: var(--surface); color: var(--primary-dark); box-shadow: var(--shadow-sm); font-weight: 700; }
.auth-tab:not(.active):hover { color: var(--text); }

.auth-form { display: none; flex-direction: column; gap: 14px; }
.auth-form.active { display: flex; }

.input-group {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  transition: var(--transition-fast);
  background: var(--surface);
}
.input-group:hover { border-color: var(--text-muted); }
.input-group:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-50);
  background: var(--surface);
}
.input-group .material-icons-round { font-size: 19px; color: var(--text-muted); }
.input-group input { flex: 1; font-size: 14.5px; color: var(--text); }
.input-group input::placeholder { color: var(--text-muted); }
.toggle-pw { cursor: pointer; }
.toggle-pw:hover { color: var(--primary); }

.auth-meta { display: flex; justify-content: flex-end; font-size: 13px; }
.auth-meta a { color: var(--primary-dark); font-weight: 500; }
.auth-meta a:hover { text-decoration: underline; }

.divider { display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: 12.5px; margin: 2px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---------------------------------------------------------------------
   5. SPINNER
--------------------------------------------------------------------- */
.spinner-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  overflow: hidden;
  background: var(--accent);
}
.spinner-overlay.active { display: flex; }

.spinner-aurora {
  position: absolute;
  inset: -20%;
  display: none;
}

/* Floating glow blobs behind the loader — disabled for flat theme */
.spinner-blob { display: none; }
.blob-1 { width: 320px; height: 320px; top: -80px; left: -60px; background: #F5A623; animation-delay: 0s; }
.blob-2 { width: 260px; height: 260px; bottom: -60px; right: -40px; background: #0A1F44; animation-delay: 1.5s; }
.blob-3 { width: 220px; height: 220px; bottom: 20%; left: 10%; background: #FFCB66; animation-delay: 3s; }

.spinner-orbit {
  position: absolute;
  width: 220px;
  height: 220px;
  z-index: 1;
  animation: orbitSpin 6s linear infinite;
}
.orbit-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: none;
}
.dot-1 { top: 0; left: 50%; margin-left: -4px; color: #F5A623; background: #F5A623; }
.dot-2 { bottom: 12%; right: 6%; color: #0A1F44; background: #0A1F44; animation: dotPulse 1.6s ease-in-out infinite; }
.dot-3 { bottom: 12%; left: 6%; color: #FFCB66; background: #FFCB66; animation: dotPulse 1.6s ease-in-out infinite 0.8s; }

.spinner-wrap {
  position: relative;
  width: 110px;
  height: 110px;
  z-index: 1;
}

.spinner-logo-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  display: none;
}

.spinner-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  filter: none;
}
.spinner-ring-outer { animation: spin 1.4s cubic-bezier(0.6,0,0.4,1) infinite; }
.spinner-ring-inner { animation: spinReverse 1.9s cubic-bezier(0.6,0,0.4,1) infinite; }

.spinner-logo {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: logoPulse 1.4s ease-in-out infinite;
}
.spinner-logo img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: none;
}

.spinner-text {
  font-family: "Inter", sans-serif;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #fff;
  z-index: 1;
}

.spinner-subtext {
  font-family: "Inter", sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.3px;
  z-index: 1;
}

.spinner-progress {
  position: relative;
  width: 160px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  overflow: hidden;
  z-index: 1;
}
.spinner-progress-fill {
  position: absolute;
  inset: 0;
  width: 40%;
  border-radius: 999px;
  background: var(--primary);
  animation: progressSlide 1.6s ease-in-out infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spinReverse { to { transform: rotate(-360deg); } }
@keyframes auroraSpin { to { transform: rotate(360deg); } }
@keyframes orbitSpin { to { transform: rotate(360deg); } }
@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0.5; }
}
@keyframes glowPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}
@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -20px) scale(1.1); }
}
@keyframes blobMorph {
  0%, 100% { border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; }
  50% { border-radius: 58% 42% 37% 63% / 55% 60% 40% 45%; }
}
@keyframes progressSlide {
  0% { left: -40%; }
  100% { left: 100%; }
}
@keyframes progressShimmer {
  0% { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}
@keyframes logoPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.12); opacity: 0.85; }
}
@keyframes textShine {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* ---------------------------------------------------------------------
   6. HEADER
--------------------------------------------------------------------- */

 .header {
  position: fixed;
  top: 0; left: 0; right: 0;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 1px 0 rgba(10, 31, 68,0.04), 0 8px 32px rgba(10, 31, 68,0.03);
  z-index: 200;
}
.header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--primary);
  opacity: 0.5;
}
@keyframes headerGlow {
  0% { background-position: 0% 0; }
  100% { background-position: 300% 0; }
}
.header-left { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.mobile-menu-btn { display: inline-flex; }

.logo {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 19px;
  font-weight: 800;
  background: var(--gradient-brand);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--primary-dark);
  transition: var(--transition);
}
.logo:hover { background-position: 100% 50%; }
.logo .material-icons-round {
  font-size: 23px;
  -webkit-text-fill-color: initial;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: none;
}

.search-box {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-alt);
  border-radius: var(--radius-full);
  padding: 9px 12px;
  max-width: 520px;
  transition: var(--transition);
  border: 1.5px solid transparent;
}
.search-box:focus-within { background: var(--surface); border-color: var(--primary-light); box-shadow: var(--ring), var(--shadow-sm); }
.search-box .material-icons-round { font-size: 19px; color: var(--text-muted); flex-shrink: 0; }
.search-box input { flex: 1; min-width: 0; width: 100%; font-size: 14px; }
.search-box input::placeholder { color: var(--text-muted); }

.header-right { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }

.badge {
  position: absolute;
  top: 2px; right: 2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.avatar-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid var(--border);
  transition: var(--transition);
  margin-left: 4px;
}
.avatar-btn:hover { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-50); transform: scale(1.05); }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }

/* ---------------------------------------------------------------------
   7. BOTTOM NAV (mobile)
--------------------------------------------------------------------- */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-h);
  background: var(--glass-bg-strong);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid var(--border-light);
  display: flex;
  z-index: 200;
  box-shadow: 0 -4px 20px rgba(10, 31, 68, 0.06);
}
.nav-item {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition);
}
body.page-transitioning .nav-item.active::after {
  transition: width 0.4s var(--ease-spring);
}
.nav-item .material-icons-round { font-size: 22px; }
.nav-item.active { color: var(--primary); }
.nav-item.active .material-icons-round {
  transform: translateY(-2px);
  transition: transform 0.2s ease;
}
.nav-item::after {
  content: "";
  display: block;
  width: 0;
  height: 3px;
  background: var(--gradient-brand);
  border-radius: var(--radius-full);
  transition: width 0.25s var(--ease-spring);
  margin: 0 auto;
}
.nav-item.active::after {
  width: 22px;
}
.nav-item.active .material-icons-round { filter: none; }

/* ---------------------------------------------------------------------
   8. SIDEBAR
--------------------------------------------------------------------- */
.sidebar {
  position: fixed;
  top: 0; bottom: 0; left: 0;
  width: var(--sidebar-w);
  max-width: 85vw;
  background: var(--surface);
  z-index: 400;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.sidebar.open { transform: translateX(0); }

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  border-bottom: 1px solid var(--border-light);
}
.sidebar-header .logo { font-size: 18px; }

.sidebar-nav { display: flex; flex-direction: column; padding: 10px; gap: 2px; }
.sidebar.open .sidebar-link { animation: sidebarLinkIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both; }
.sidebar.open .sidebar-link:nth-child(1) { animation-delay: 0.03s; }
.sidebar.open .sidebar-link:nth-child(2) { animation-delay: 0.06s; }
.sidebar.open .sidebar-link:nth-child(3) { animation-delay: 0.09s; }
.sidebar.open .sidebar-link:nth-child(4) { animation-delay: 0.12s; }
.sidebar.open .sidebar-link:nth-child(5) { animation-delay: 0.15s; }
.sidebar.open .sidebar-link:nth-child(6) { animation-delay: 0.18s; }
.sidebar.open .sidebar-link:nth-child(7) { animation-delay: 0.21s; }
.sidebar.open .sidebar-link:nth-child(8) { animation-delay: 0.24s; }
.sidebar.open .sidebar-link:nth-child(9) { animation-delay: 0.27s; }
.sidebar.open .sidebar-link:nth-child(10) { animation-delay: 0.3s; }
@keyframes sidebarLinkIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px;
  min-height: 44px;
  border-radius: var(--radius-md);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
  transition: var(--transition);
}
.sidebar-link .material-icons-round { font-size: 20px; color: var(--text-secondary); transition: var(--transition-fast); }
.sidebar-link:hover { background: var(--primary-50); color: var(--primary-dark); transform: translateX(2px); }
.sidebar-link:hover .material-icons-round { color: var(--primary-dark); }
.sidebar-link.active { background: var(--gradient-brand-soft); color: var(--primary-dark); font-weight: 700; position: relative; box-shadow: var(--shadow-sm); }
.sidebar-link.active .material-icons-round { color: var(--primary-dark); }
.sidebar-link.active::before {
  content: "";
  position: absolute;
  left: -10px; top: 50%; transform: translateY(-50%);
  width: 4px; height: 60%;
  background: var(--gradient-brand);
  border-radius: 0 4px 4px 0;
}
.sidebar-link.danger { color: var(--danger); margin-top: auto; }
.sidebar-link.danger .material-icons-round { color: var(--danger); }
.sidebar-link.danger:hover { background: var(--danger-bg); }

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 31, 68, 0.45);
  z-index: 300;
  display: none;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.sidebar-overlay.active { display: block; opacity: 1; }

/* ---------------------------------------------------------------------
   9. PAGE CONTAINER / TAB PANELS
--------------------------------------------------------------------- */
.page-container {
  padding: calc(var(--header-h) + 18px) 18px calc(var(--bottom-nav-h) + 28px);
  max-width: 1180px;
  margin: 0 auto;
}
.tab-panel { display: none; animation: pageEnter 0.55s cubic-bezier(0.16, 1, 0.3, 1); }
.tab-panel.active { display: block; }

@keyframes pageEnter {
  from { opacity: 0; transform: translateY(22px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------------------------------------------------------------------
   10. HERO BANNER
--------------------------------------------------------------------- */
.hero-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--accent);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  margin-bottom: 24px;
  overflow: hidden;
  color: #fff;
  box-shadow: var(--shadow-xl);
}
.hero-banner::before {
  content: "";
  position: absolute;
  width: 320px; height: 320px;
  display: none;
}
.hero-banner::after {
  content: "";
  position: absolute;
  width: 260px; height: 260px;
  display: none;
}
@keyframes heroPulse {
  0%,100% { transform: scale(1) translateY(0); }
  50% { transform: scale(1.04) translateY(-4px); }
}
.hero-content { position: relative; z-index: 2; max-width: 480px; animation: heroSlideIn 0.7s cubic-bezier(0.34,1.56,0.64,1) both; }
@keyframes heroSlideIn { from { opacity:0; transform: translateX(-40px); } to { opacity:1; transform: translateX(0); } }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.16);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 14px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.32);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  animation: badgePop 0.5s cubic-bezier(0.34,1.56,0.64,1) 0.3s both, pulse-glow 2.4s ease-in-out infinite 1s;
}
@keyframes badgePop { from { opacity:0; transform: scale(0.7); } to { opacity:1; transform: scale(1); } }
.hero-content h1 { font-size: 32px; font-weight: 800; line-height: 1.2; margin-bottom: 12px; animation: heroSlideIn 0.7s cubic-bezier(0.34,1.56,0.64,1) 0.15s both; }
.hero-content h1 span { color: #fde68a; }
.hero-content p { font-size: 14.5px; opacity: 0.9; margin-bottom: 22px; max-width: 380px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-actions .btn-primary {
  background: #fff;
  color: var(--primary-dark);
  box-shadow: var(--shadow-md);
  animation: heroSlideIn 0.7s cubic-bezier(0.34,1.56,0.64,1) 0.35s both;
}
.hero-actions .btn-primary:hover {
  background: #f8fafc;
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 16px 32px rgba(0,0,0,0.18);
}
.hero-actions .btn-outline {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-color: rgba(255,255,255,0.4);
  backdrop-filter: blur(6px);
  animation: heroSlideIn 0.7s cubic-bezier(0.34,1.56,0.64,1) 0.45s both;
}
.hero-actions .btn-outline:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-3px) scale(1.04);
  border-color: rgba(255,255,255,0.7);
}

.hero-visual { position: relative; z-index: 2; display: none; }
.earn-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  animation: heroSlideIn 0.8s cubic-bezier(0.34,1.56,0.64,1) 0.5s both, float-y 3.5s ease-in-out infinite 1.2s;
  color: var(--text);
  padding: 18px 22px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
}
.earn-card .material-icons-round { font-size: 30px; color: var(--success); }
.earn-card div { display: flex; flex-direction: column; }
.earn-label { font-size: 12px; color: var(--text-secondary); }
.earn-amount { font-size: 20px; font-weight: 800; color: var(--text); }
.floating { animation: floaty 3.2s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------------------------------------------------------------------
   11. STATS BAR
--------------------------------------------------------------------- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.stat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
}
.stat-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.stat-item .material-icons-round {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gradient-brand);
  color: #fff;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.stat-item div { display: flex; flex-direction: column; }
.stat-item strong { font-size: 17px; font-weight: 800; }
.stat-item span { font-size: 12px; color: var(--text-secondary); }

/* ---------------------------------------------------------------------
   12. SECTION HEADERS
--------------------------------------------------------------------- */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; animation: pageEnter 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }
.section-title { font-size: 18px; font-weight: 800; letter-spacing: -0.3px; display: flex; align-items: center; gap: 8px; }
.see-all { font-size: 13.5px; font-weight: 600; color: var(--primary-dark); }
.see-all:hover { text-decoration: underline; }
.sub-title { font-size: 16px; font-weight: 700; margin: 24px 0 12px; }

/* ---------------------------------------------------------------------
   13. CATEGORIES
--------------------------------------------------------------------- */
.categories-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 26px;
}
.category-chip {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  min-width: 88px;
  cursor: pointer;
  transition: var(--transition);
}
.category-chip:hover { border-color: transparent; transform: translateY(-3px); box-shadow: var(--shadow-md); }
.category-chip .material-icons-round { color: var(--primary-dark); font-size: 24px; transition: transform 0.3s var(--ease-spring); }
.category-chip:hover .material-icons-round { transform: scale(1.15) rotate(-4deg); }
.category-chip span:last-child { font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.category-chip.active { border-color: transparent; background: var(--gradient-brand); box-shadow: var(--shadow-sm); }
.category-chip.active .material-icons-round { color: #fff; }
.category-chip.active span:last-child { color: #fff; }

.active-category-badge {
  display: none;
  align-items: center;
  gap: 8px;
  background: var(--primary-50);
  border: 1.5px solid var(--primary-light);
  border-radius: var(--radius-full);
  padding: 8px 14px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-dark);
  width: fit-content;
}
.active-category-badge .material-icons-round:first-child { font-size: 16px; }
.active-category-badge button {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  color: var(--primary-dark);
}
.active-category-badge button .material-icons-round { font-size: 15px; }
.active-category-badge button:hover { color: var(--danger); }

.categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.category-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}
.category-card:hover { border-color: transparent; box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.category-card .material-icons-round {
  font-size: 26px;
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 10px;
  background: var(--gradient-brand-soft);
  color: var(--primary-dark);
  border-radius: var(--radius-md);
  transition: transform 0.3s var(--ease-spring);
}
.category-card:hover .material-icons-round { transform: scale(1.1) rotate(-4deg); }
.category-card h4 { font-size: 14.5px; font-weight: 700; margin-bottom: 4px; }
.category-card p { font-size: 12px; color: var(--text-secondary); }

/* ---------------------------------------------------------------------
   14. FLASH SALE
--------------------------------------------------------------------- */
.flash-sale-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin-bottom: 26px;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}
.flash-sale-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  display: none;
}
.flash-info { display: flex; align-items: center; gap: 12px; }
.flash-info .material-icons-round { font-size: 26px; color: var(--warning); }
.flash-info h3 { font-size: 15px; font-weight: 700; }
.flash-info p { font-size: 12.5px; color: #cbd5e1; }
.countdown { display: flex; gap: 8px; }
.cd-unit {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  min-width: 46px;
}
.cd-unit span { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; color: #fde68a; }
.cd-unit small { font-size: 9.5px; color: #cbd5e1; text-transform: uppercase; }

/* ---------------------------------------------------------------------
   15. PRODUCT GRID / CARDS
--------------------------------------------------------------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}
.product-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s ease, border-color 0.35s ease;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  animation: cardEnter 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
  will-change: transform;
}
.product-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--gradient-brand);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.product-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-9px) scale(1.015);
  border-color: transparent;
}
.product-card:hover::after { opacity: 1; }
@keyframes cardEnter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.product-grid .product-card:nth-child(1) { animation-delay: 0.02s; }
.product-grid .product-card:nth-child(2) { animation-delay: 0.05s; }
.product-grid .product-card:nth-child(3) { animation-delay: 0.08s; }
.product-grid .product-card:nth-child(4) { animation-delay: 0.11s; }
.product-grid .product-card:nth-child(5) { animation-delay: 0.14s; }
.product-grid .product-card:nth-child(6) { animation-delay: 0.17s; }
.product-grid .product-card:nth-child(7) { animation-delay: 0.2s; }
.product-grid .product-card:nth-child(8) { animation-delay: 0.23s; }

.product-img-wrap { position: relative; aspect-ratio: 1 / 1; background: var(--surface-alt); cursor: pointer; overflow: hidden; }
.product-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.product-card:hover .product-img-wrap img { transform: scale(1.08); }

.commission-tag {
  position: absolute;
  bottom: 8px; left: 8px;
  background: var(--success);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 12px rgba(16,185,129,0.35);
  backdrop-filter: blur(4px);
}

.wishlist-btn {
  position: absolute;
  top: 8px; right: 8px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  z-index: 2;
  box-shadow: 0 2px 8px rgba(10, 31, 68,0.08);
  transition: var(--transition);
}
.wishlist-btn .material-icons-round { font-size: 18px; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.wishlist-btn:hover { background: #fff; transform: scale(1.12); box-shadow: 0 4px 14px rgba(10, 31, 68,0.14); }
.wishlist-btn:active .material-icons-round { transform: scale(0.75); }
.wishlist-btn.active { color: var(--accent); }
.wishlist-btn.active .material-icons-round { animation: heartPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes heartPop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }

.product-info { padding: 11px 12px 6px; cursor: pointer; flex: 1; min-width: 0; }
.product-info h4 {
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: break-word;
  line-height: 1.35;
}
.product-price {
  font-size: 15.5px;
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--primary-dark);
}

.btn-add-cart {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: calc(100% - 24px);
  margin: 8px 12px 12px;
  padding: 9px;
  background: var(--primary-50);
  color: var(--primary-dark);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 12.5px;
  transition: background-color 0.18s ease, color 0.18s ease;
}
.btn-add-cart .material-icons-round { font-size: 17px; }
.btn-add-cart:hover {
  background: var(--primary-dark);
  color: #fff;
}
.btn-add-cart:active { background: var(--primary-dark); opacity: 0.9; }

/* ---------------------------------------------------------------------
   16. REFERRAL CTA (home page banner)
--------------------------------------------------------------------- */
.referral-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background: var(--primary-50);
  border: 1px solid var(--primary-light);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.referral-cta:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.referral-cta-text h3 { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.referral-cta-text p { font-size: 13.5px; color: var(--text-secondary); }
.referral-cta-text strong { color: var(--primary-dark); }

/* ---------------------------------------------------------------------
   17. SHOP TOOLBAR + FILTER PANEL
--------------------------------------------------------------------- */
.shop-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar-actions { display: flex; align-items: center; gap: 10px; }

.select-input {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
  transition: var(--transition);
}
.select-input:focus { border-color: var(--primary); }

.filter-panel {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: pageEnter 0.35s ease both;
}
.filter-group label { display: block; font-size: 12.5px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 10px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-chip {
  padding: 7px 14px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
}
.filter-chip:hover { border-color: var(--primary-light); transform: translateY(-1px); }
.filter-chip.active { background: var(--gradient-brand); border-color: transparent; color: #fff; box-shadow: var(--shadow-sm); }
.price-range { display: flex; align-items: center; gap: 10px; }
.price-range input { width: 100%; }
.price-range span { color: var(--text-muted); }
.filter-actions { display: flex; gap: 10px; }
.filter-actions button { flex: 1; }

/* ---------------------------------------------------------------------
   18. PRODUCT DETAIL
--------------------------------------------------------------------- */
.product-detail-grid { display: grid; grid-template-columns: 1fr; gap: 22px; }
.product-detail-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--surface-alt);
  box-shadow: var(--shadow-lg);
}
.product-detail-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.product-detail-img:hover img { transform: scale(1.05); }

.product-detail-info { display: flex; flex-direction: column; gap: 10px; }
.product-detail-cat {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--primary-dark);
}
.product-detail-info h1 { font-size: 22px; font-weight: 800; line-height: 1.3; }
.product-detail-price {
  font-size: 27px;
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--text);
}

.commission-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--success-bg);
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: 0 4px 16px rgba(16,185,129,0.12);
}
.commission-box .material-icons-round { color: var(--success); font-size: 24px; }
.commission-box strong { font-size: 13.5px; display: block; margin-bottom: 2px; }
.commission-box p { font-size: 12.5px; color: var(--text-secondary); }

.product-detail-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }

.stock-info { font-size: 13px; font-weight: 600; padding: 8px 0; }
.stock-info.in-stock { color: var(--success); }
.stock-info.out-stock { color: var(--danger); }

.product-detail-actions { display: flex; gap: 12px; margin-top: 6px; }
.product-detail-actions .btn-primary { flex: 1; }

/* ---------------------------------------------------------------------
   19. CART
--------------------------------------------------------------------- */
.cart-layout { display: flex; flex-direction: column; gap: 18px; }
.cart-items { display: flex; flex-direction: column; gap: 12px; }
.cart-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.cart-item:hover { border-color: transparent; box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.cart-item img { width: 64px; height: 64px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; }
.cart-item-info { min-width: 0; }
.cart-item-info h4 { font-size: 13.5px; font-weight: 600; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
.cart-item-info p { font-size: 13px; color: var(--primary-dark); font-weight: 700; }

.qty-control {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-alt);
  border-radius: var(--radius-full);
  padding: 5px 8px;
  flex-shrink: 0;
}
.qty-control button {
  width: 22px; height: 22px;
  min-width: 22px;
  border-radius: 50%;
  background: var(--surface);
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
}
.qty-control button { transition: var(--transition-fast); }
.qty-control button:hover { background: var(--gradient-brand); color: #fff; transform: scale(1.1); box-shadow: var(--shadow-sm); }
.qty-control button:active { transform: scale(0.92); }
.qty-control span { font-size: 13.5px; font-weight: 700; min-width: 16px; text-align: center; }

.cart-summary {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}
.cart-summary::before {
  content: "";
  position: absolute;
  top: 0; left: 20px; right: 20px;
  height: 3px;
  border-radius: var(--radius-full);
  background: var(--gradient-brand);
}
.cart-summary h3 { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.summary-row { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--text-secondary); }
.summary-row.discount span:last-child { color: var(--success); font-weight: 600; }
.summary-row.total { font-size: 16px; font-weight: 800; color: var(--text); border-top: 1px dashed var(--border); padding-top: 12px; margin-top: 2px; }

.wallet-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
}
.wallet-toggle label { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.wallet-toggle input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
#walletAvailable { color: var(--text-muted); font-size: 12px; }

/* ---------------------------------------------------------------------
   20. ORDERS
--------------------------------------------------------------------- */
.order-tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 16px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.order-tabs::-webkit-scrollbar { display: none; }
.order-tab {
  flex-shrink: 0;
  padding: 9px 18px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  cursor: pointer;
}
.order-tab:hover:not(.active) { border-color: var(--primary-light); color: var(--primary-dark); }
.order-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.orders-list { display: flex; flex-direction: column; gap: 12px; }
.order-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.order-card:hover { box-shadow: var(--shadow-lg); border-color: transparent; transform: translateY(-3px); }
.order-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.order-id { font-size: 12.5px; font-weight: 700; color: var(--text-secondary); letter-spacing: 0.3px; }

.order-status { font-size: 11px; font-weight: 700; padding: 4px 11px; border-radius: var(--radius-full); text-transform: capitalize; }
.status-pending { background: var(--warning-bg); color: #b45309; }
.status-shipped { background: #e0f2fe; color: #0369a1; }
.status-delivered { background: var(--success-bg); color: #047857; }
.status-pending_verification { background: #fff3d6; color: #B8720A; }
.status-pending_verification::after { content: none; }
.status-confirmed { background: var(--success-bg); color: #047857; }

.order-items-preview { font-size: 12.5px; color: var(--text-secondary); margin-bottom: 10px; line-height: 1.5; }
.order-footer { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--text-muted); border-top: 1px dashed var(--border); padding-top: 10px; }
.order-footer strong { font-size: 14.5px; color: var(--text); }

/* ---------------------------------------------------------------------
   21. WALLET
--------------------------------------------------------------------- */
.wallet-card {
  position: relative;
  overflow: hidden;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 6px;
  box-shadow: var(--shadow-xl);
}
.wallet-card::before {
  content: "";
  position: absolute;
  width: 200px; height: 200px;
  display: none;
}
.wallet-balance { position: relative; z-index: 1; }
.wallet-top { display: flex; flex-direction: column; gap: 6px; margin-bottom: 22px; }
.wallet-label { font-size: 13px; opacity: 0.85; }
.wallet-balance { font-size: 32px; font-weight: 800; }
.wallet-bottom { display: flex; gap: 14px; margin-bottom: 18px; }
.wallet-stat {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  padding: 12px;
}
.wallet-stat .material-icons-round { font-size: 18px; }
.wallet-stat strong { display: block; font-size: 14.5px; font-weight: 700; }
.wallet-stat small { font-size: 11px; opacity: 0.85; }
.wallet-card .btn-outline { background: rgba(255, 255, 255, 0.95); color: var(--primary-dark); border: none; }
.wallet-card .btn-outline:hover { background: #fff; }

.transactions-list { display: flex; flex-direction: column; gap: 10px; }
.transaction-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 13px;
  transition: var(--transition);
}
.transaction-item:hover { transform: translateX(4px); border-color: var(--primary-light); box-shadow: var(--shadow-sm); }
.transaction-item .material-icons-round {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.transaction-item.credit .material-icons-round { background: var(--success-bg); color: var(--success); }
.transaction-item.debit .material-icons-round { background: var(--danger-bg); color: var(--danger); }
.tx-info { flex: 1; min-width: 0; }
.tx-info strong { display: block; font-size: 13.5px; font-weight: 600; }
.tx-info small { font-size: 11.5px; color: var(--text-muted); }
.tx-amount { font-size: 14px; font-weight: 800; flex-shrink: 0; }
.tx-amount.credit { color: var(--success); }
.tx-amount.debit { color: var(--danger); }

/* ---------------------------------------------------------------------
   22. REFERRAL PAGE
--------------------------------------------------------------------- */
.how-it-works { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.step-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  position: relative;
  transition: var(--transition);
}
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-glow); border-color: var(--primary-light); }
.step-num {
  position: absolute;
  top: 12px; left: 12px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
}
.step-card .material-icons-round { font-size: 28px; color: var(--primary-dark); margin: 6px 0 10px; }
.step-card h4 { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.step-card p { font-size: 12.5px; color: var(--text-secondary); }
.step-divider { display: flex; align-items: center; justify-content: center; color: var(--text-muted); transform: rotate(90deg); }

.commission-tiers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 24px; }
.tier-card {
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  color: #fff;
  transition: var(--transition);
}
.tier-card:hover { transform: scale(1.04); box-shadow: var(--shadow-lg); }
.tier-card .material-icons-round { font-size: 22px; opacity: 0.9; margin-bottom: 8px; }
.tier-card h4 { font-size: 13px; font-weight: 700; opacity: 0.95; margin-bottom: 4px; }
.tier-pct { font-size: 28px; font-weight: 800; margin-bottom: 4px; }
.tier-card p { font-size: 11.5px; opacity: 0.85; }
.tier-l1 { background: var(--primary); }
.tier-l2 { background: var(--accent); }

.invite-box {
  background: var(--surface);
  border: 1.5px dashed var(--primary-light);
  border-radius: var(--radius-lg);
  padding: 22px;
  text-align: center;
  margin-bottom: 10px;
  box-shadow: var(--shadow-md);
  position: relative;
}
.invite-code-display span {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.invite-box h3 { font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.invite-code-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--primary-50);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 16px;
}
.invite-code-display span {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 4px;
  color: var(--primary-dark);
}
.invite-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.invite-actions button { flex: 1; min-width: 140px; }

.referral-tree { display: flex; flex-direction: column; gap: 10px; }
.referral-node {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px;
  transition: var(--transition);
}
.referral-node:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.referral-node img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.referral-node-info strong { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 3px; }
.referral-status { font-size: 11.5px; font-weight: 600; padding: 2px 0; }
.referral-status.active { color: var(--success); }
.referral-status.inactive { color: var(--danger); }

/* ---------------------------------------------------------------------
   23. PROFILE
--------------------------------------------------------------------- */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}
.profile-info h3 { overflow-wrap: break-word; }
.profile-avatar-wrap { position: relative; flex-shrink: 0; }
.profile-avatar-wrap img { width: 78px; height: 78px; border-radius: 50%; object-fit: cover; border: 3px solid transparent; background: var(--gradient-brand); box-shadow: var(--shadow-sm); }
.avatar-edit-btn {
  position: absolute;
  bottom: -2px; right: -2px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--surface);
  box-shadow: var(--shadow-sm);
}
.avatar-edit-btn .material-icons-round { font-size: 14px; }
.profile-info { min-width: 0; }
.profile-info h3 { font-size: 18px; font-weight: 800; margin-bottom: 3px; }
.profile-badge {
  display: inline-block;
  margin-top: 8px;
  background: var(--primary-50);
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.profile-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 18px; }
.profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.profile-card:hover { border-color: transparent; box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.profile-card .material-icons-round {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gradient-brand-soft);
  color: var(--primary-dark);
  border-radius: var(--radius-md);
  transition: transform 0.3s var(--ease-spring);
}
.profile-card:hover .material-icons-round { transform: scale(1.1) rotate(-4deg); }
.profile-card strong { display: block; font-size: 15px; font-weight: 800; }
.profile-card span { font-size: 11.5px; color: var(--text-secondary); }

.profile-menu {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}
.profile-menu-item:last-child { border-bottom: none; }
.profile-menu-item .material-icons-round:first-child { font-size: 19px; color: var(--text-secondary); }
.profile-menu-item:hover { background: var(--primary-50); padding-left: 20px; }
.profile-menu-item .chevron { margin-left: auto; color: var(--text-muted); font-size: 18px; }
.profile-menu-item.danger { color: var(--danger); }
.profile-menu-item.danger .material-icons-round:first-child { color: var(--danger); }
.profile-menu-item.danger:hover { background: var(--danger-bg); }

/* ---------------------------------------------------------------------
   24. NOTIFICATIONS
--------------------------------------------------------------------- */
.notifications-list { display: flex; flex-direction: column; gap: 10px; }
.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: var(--transition);
}
.notification-item:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.notification-item.unread { background: var(--gradient-brand-soft); border-color: var(--primary-light); box-shadow: var(--shadow-sm); }
.notification-item .material-icons-round { color: var(--primary-dark); font-size: 20px; margin-top: 2px; }
.notification-item strong { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 3px; }
.notification-item p { font-size: 12.5px; color: var(--text-secondary); margin-bottom: 5px; line-height: 1.5; }
.notification-item small { font-size: 11px; color: var(--text-muted); }

/* ---------------------------------------------------------------------
   25. CHECKOUT
--------------------------------------------------------------------- */
.checkout-layout { display: flex; flex-direction: column; gap: 20px; }
.checkout-section {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.checkout-section:hover { box-shadow: var(--shadow-lg); }
.checkout-section h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.checkout-section h3 .material-icons-round { font-size: 19px; color: var(--primary-dark); flex-shrink: 0; }
.input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 400px) {
  .input-row { grid-template-columns: 1fr; }
}

.payment-options { display: flex; flex-direction: column; gap: 10px; }
.payment-option {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.payment-option { cursor: pointer; }
.payment-option:hover { border-color: var(--primary-light); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.payment-option:has(input:checked) { border-color: var(--primary); background: var(--gradient-brand-soft); box-shadow: var(--ring); transform: translateY(-1px); }
.payment-option input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.payment-option .material-icons-round { font-size: 19px; color: var(--text-secondary); transition: var(--transition-fast); }
.payment-option:has(input:checked) .material-icons-round { color: var(--primary-dark); transform: scale(1.1); }

.stripe-box {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  background: var(--surface);
  overflow: hidden;
  max-height: 640px;
  opacity: 1;
  transform: translateY(0);
  transition: max-height 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.35s ease,
              transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              padding 0.35s ease,
              margin-top 0.35s ease,
              border-color 0.3s ease;
}
.stripe-box.collapsed {
  max-height: 0;
  opacity: 0;
  transform: translateY(-8px);
  padding-top: 0;
  padding-bottom: 0;
  border-color: transparent;
}

.checkout-right {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: fit-content;
  box-shadow: var(--shadow-xl);
  position: sticky;
  top: calc(var(--header-h) + 16px);
}
.checkout-right h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.checkout-items { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; padding-bottom: 10px; border-bottom: 1px dashed var(--border); }
.checkout-line { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-secondary); }

/* ---------------------------------------------------------------------
   26. EMPTY STATE
--------------------------------------------------------------------- */
.empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 50px 20px;
  color: var(--text-muted);
}
.empty-state .material-icons-round { font-size: 44px; color: var(--text-muted); margin-bottom: 12px; animation: float-y 3s ease-in-out infinite; opacity: 0.6; }
.empty-state h3 { font-size: 15px; font-weight: 700; color: var(--text-secondary); margin-bottom: 4px; }
.empty-state p { font-size: 13px; max-width: 260px; }

/* ---------------------------------------------------------------------
   27. RESPONSIVE — TABLET & DESKTOP
--------------------------------------------------------------------- */
@media (max-width: 639px) {
  .checkout-right { position: static; top: auto; }
}
@media (min-width: 640px) {
  .stats-bar { grid-template-columns: repeat(4, 1fr); }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
  .product-detail-grid { grid-template-columns: 1fr 1fr; align-items: start; }
  .cart-layout { flex-direction: row; align-items: flex-start; }
  .cart-items { flex: 1; min-width: 0; }
  .cart-summary { width: 340px; flex-shrink: 0; position: sticky; top: calc(var(--header-h) + 18px); }
  .checkout-layout { flex-direction: row; align-items: flex-start; }
  .checkout-left { flex: 1; min-width: 0; }
  .checkout-right { width: 340px; flex-shrink: 0; position: sticky; top: calc(var(--header-h) + 18px); }
  .how-it-works { flex-direction: row; }
  .step-divider { transform: none; }
}

@media (min-width: 768px) and (max-width: 879px) {
  .hero-content h1 { font-size: 34px; }
  .page-container { padding-left: 24px; padding-right: 24px; }
}
@media (min-width: 880px) {
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero-visual { display: block; }
}

@media (min-width: 1024px) {
  .mobile-menu-btn { display: inline-flex; }
  .bottom-nav { display: none; }

  .sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
    border-right: 1px solid var(--border-light);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay { display: none; }
  .sidebar-overlay.active { display: block; }

  .header { left: 0; right: 0; }
  .page-container {
    margin-left: 0;
    padding-bottom: 32px;
    max-width: 1180px;
    padding-left: 24px;
    padding-right: 24px;
  }


  .product-grid { grid-template-columns: repeat(4, 1fr); }
  .categories-grid { grid-template-columns: repeat(4, 1fr); }
  .commission-tiers { grid-template-columns: repeat(2, 1fr); max-width: 480px; }
}.btn-cancel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px;
  background: var(--danger-bg);
  color: var(--danger);
  border: 1.5px solid var(--danger);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
}
.btn-cancel:hover { background: var(--danger); color: #fff; }
@media (max-width: 480px) {
  .header { padding: 0 10px; gap: 6px; }
  .header-left { flex-shrink: 0; min-width: 0; }
  .logo span { display: none; }
  .search-box { 
    padding: 7px 10px; 
    min-width: 0;
    flex: 1;
  }
  .search-box input { font-size: 13px; min-width: 0; }
  .header-right { 
    gap: 0px; 
    flex-shrink: 0;
  }
  .icon-btn { width: 34px; height: 34px; }
  .icon-btn .material-icons-round { font-size: 18px; }
  .avatar-btn { 
    width: 30px; 
    height: 30px; 
    margin-left: 1px; 
  }
  /* Hide wishlist and notification on very small screens */
  .header-right .icon-btn:nth-child(1) { display: none; }
  .header-right .icon-btn:nth-child(2) { display: none; }
}

@media (max-width: 359px) {
  .header { padding: 0 8px; gap: 4px; }
  .logo .material-icons-round { font-size: 20px; }
  .search-box { padding: 6px 9px; }
  .search-box input { font-size: 12.5px; }
  .icon-btn { width: 30px; height: 30px; }
  .avatar-btn { width: 28px; height: 28px; }
}
.skeleton {
  background: linear-gradient(90deg, #f1f5f9 20%, #e2e8f0 45%, #e2e8f0 55%, #f1f5f9 80%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-md);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.skeleton-img {
  width: 100%;
  aspect-ratio: 1/1;
}
.skeleton-text {
  height: 14px;
  margin: 12px 12px 6px;
}
.skeleton-text-sm {
  height: 12px;
  margin: 0 12px 12px;
  width: 60%;
}
/* ---------------------------------------------------------------------
   28. VISIT-STORE LINK + SELLER STORE PAGE
--------------------------------------------------------------------- */
.visit-store-link {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: var(--surface-alt);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  transition: var(--transition);
  margin: 2px 0 4px;
}
.visit-store-link:hover {
  border-color: var(--primary-light);
  background: var(--primary-50);
  transform: translateY(-1px);
}
.visit-store-link .material-icons-round:first-child { font-size: 18px; color: var(--primary-dark); }
.visit-store-link strong { color: var(--primary-dark); }
.visit-store-link .store-verified-icon { font-size: 15px; color: var(--success); }
.visit-store-link .chevron { margin-left: auto; color: var(--text-muted); font-size: 18px; }

/* True full-width hero banner, pulled out of the page's side padding */
/* ---- Store page: full-bleed hero ---- */
.store-cover-wrap {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  height: 260px;
  background: var(--surface-alt);
  overflow: hidden;
}
.store-cover-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.store-cover-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary);
}
.store-cover-placeholder .material-icons-round { font-size: 48px; color: rgba(255,255,255,0.7); }

/* ---- Shop info card — sits ON TOP of the hero, like a real store profile ---- */
.store-info-card {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 16px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 16px 18px 18px;
  margin: -46px 0 20px;
}
.store-logo-box {
  width: 78px; height: 78px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-alt);
  display: flex; align-items: center; justify-content: center;
  border: 4px solid var(--surface);
  box-shadow: var(--shadow-sm);
}
.store-logo-img { width: 100%; height: 100%; object-fit: cover; }
.store-logo-fallback { font-size: 32px; color: var(--primary-dark); }
.store-header-text { flex: 1; min-width: 0; padding-top: 6px; }
.store-header-text h2 { font-size: 19px; font-weight: 800; margin-bottom: 6px; }

.store-meta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.store-verified-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 700; color: var(--success);
  background: var(--success-bg); padding: 4px 10px; border-radius: var(--radius-full);
}
.store-verified-chip .material-icons-round { font-size: 14px; }
.store-meta-item {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12.5px; font-weight: 600; color: var(--text-secondary);
}
.store-meta-item .material-icons-round { font-size: 15px; color: var(--text-muted); }

.store-cat-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.store-cat-chip {
  font-size: 11.5px; font-weight: 600; color: var(--primary-dark);
  background: var(--primary-50); padding: 4px 11px; border-radius: var(--radius-full);
}

/* ---- Elevated sections, like real marketplace content blocks ---- */
.store-section {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px 16px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.store-section .section-header { margin-bottom: 14px; }

/* ---- Promotions: full-bleed banner strip you can actually see ---- */
.store-promo-band {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  margin-bottom: 20px;
}
.store-promo-scroll {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 0;
}
.store-promo-slide {
  flex: 0 0 100vw;
  scroll-snap-align: start;
  height: 220px;
}
.store-promo-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (min-width: 1024px) {
  .store-cover-wrap,
  .store-promo-band {
    left: 0; right: 0; margin-left: 0; margin-right: 0; width: 100%;
    border-radius: var(--radius-lg);
  }
  .store-cover-wrap { height: 300px; }
  .store-promo-slide { flex-basis: 100%; height: 260px; }
}

@media (max-width: 480px) {
  .store-cover-wrap { height: 190px; }
  .store-promo-slide { height: 160px; }
  .store-info-card { margin-top: -34px; }
  .store-logo-box { width: 60px; height: 60px; }
}

/* Category sections on categories page */
.cat-section {
  margin-bottom: 36px;
}
.cat-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-50);
}
.cat-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cat-section-title .material-icons-round {
  color: var(--primary-dark);
  font-size: 22px;
}
.cat-section-title h3 {
  font-size: 17px;
  font-weight: 800;
}
.cat-count {
  background: var(--primary-50);
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

/* ---------------------------------------------------------------------
   29. PUBLIC STORE PREVIEW MODE (loaded inside Seller Dashboard iframe)
--------------------------------------------------------------------- */
body.preview-mode .header,
body.preview-mode .bottom-nav,
body.preview-mode .sidebar,
body.preview-mode .sidebar-overlay,
body.preview-mode .wishlist-btn,
body.preview-mode .btn-add-cart,
body.preview-mode .visit-store-link,
body.preview-mode .back-btn {
  display: none !important;
}
body.preview-mode .page-container {
  padding-top: 18px;
  padding-bottom: 18px;
}
/* ---------------------------------------------------------------------
   RATINGS, REVIEWS & Q&A
--------------------------------------------------------------------- */
.buyer-star.star-filled { color: #f59e0b; }
.buyer-star.star-empty { color: #e2e8f0; }

.rating-summary-box { display: flex; align-items: center; gap: 10px; margin: 4px 0 2px; }
.rating-summary-num { font-size: 20px; font-weight: 800; color: var(--text); }
.rating-summary-stars { display: flex; gap: 1px; }
.rating-summary-count { font-size: 12.5px; color: var(--text-secondary); }
.rating-loading { font-size: 12.5px; color: var(--text-muted); }

.reviews-list, .qna-list { display: flex; flex-direction: column; gap: 14px; }
.review-card { background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--radius-md); padding: 16px; transition: var(--transition); }
.review-card:hover { box-shadow: var(--shadow-sm); border-color: var(--primary-light); }
.review-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.review-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.review-card-head strong { font-size: 13.5px; font-weight: 700; display: block; }
.review-card-stars { display: flex; gap: 1px; margin-top: 2px; }
.review-card-date { margin-left: auto; font-size: 11.5px; color: var(--text-muted); }
.review-card-comment { font-size: 13.5px; color: var(--text-secondary); line-height: 1.6; }
.review-photos-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.review-photo { width: 62px; height: 62px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border-light); cursor: pointer; transition: var(--transition); }
.review-photo:hover { transform: scale(1.08); box-shadow: var(--shadow-md); }
.empty-inline-note { font-size: 13px; color: var(--text-muted); padding: 16px 0; }

.ask-question-box { display: flex; gap: 10px; margin-bottom: 16px; }
.ask-question-box input { flex: 1; border: 1.5px solid var(--border); border-radius: var(--radius-md); padding: 12px 14px; font-size: 13.5px; background: var(--surface); }
.ask-question-box input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-50); }

.qna-card { background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--radius-md); padding: 14px 16px; }
.qna-question { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; font-weight: 600; margin-bottom: 8px; }
.qna-question .material-icons-round { font-size: 17px; color: var(--text-muted); margin-top: 1px; }
.qna-answer { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; color: var(--text-secondary); background: var(--primary-50); border-radius: var(--radius-sm); padding: 10px 12px; margin-left: 4px; }
.qna-answer .material-icons-round { font-size: 16px; color: var(--primary-dark); margin-top: 1px; }
.qna-pending { font-size: 12px; color: var(--text-muted); font-style: italic; padding-left: 4px; }

.store-rating-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--text); background: var(--warning-bg); padding: 4px 10px; border-radius: var(--radius-full); }
.store-rating-chip strong { color: var(--text); }
.store-rating-chip--none { color: var(--text-muted); background: var(--surface-alt); }

.notif-cta { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 700; color: var(--primary-dark); }

/* Review submission sheet */
.review-modal-sheet { background: var(--surface); width: 100%; max-width: 600px; margin: 0 auto; border-radius: 22px 22px 0 0; padding: 24px; max-height: 92vh; overflow-y: auto; animation: slideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
.review-modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.review-modal-header h3 { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 800; }
.review-modal-product { display: flex; align-items: center; gap: 12px; background: var(--surface-alt); border-radius: var(--radius-md); padding: 10px 12px; margin-bottom: 20px; }
.review-modal-product img { width: 46px; height: 46px; border-radius: var(--radius-sm); object-fit: cover; }
.review-modal-product span { font-size: 13.5px; font-weight: 700; }
.review-star-picker { display: flex; justify-content: center; gap: 10px; margin-bottom: 20px; padding: 14px 0; }
.review-star-picker .material-icons-round { font-size: 38px; cursor: pointer; color: #e2e8f0; transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.15s ease; }
.review-star-picker .material-icons-round:hover, .review-star-picker .material-icons-round.star-hover { transform: scale(1.2); }
.review-star-picker .material-icons-round.star-filled { color: #f59e0b; }
#reviewCommentInput { width: 100%; border: 1.5px solid var(--border); border-radius: var(--radius-md); padding: 12px 14px; font-size: 14px; font-family: inherit; resize: vertical; margin-bottom: 16px; transition: var(--transition); }
#reviewCommentInput:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-50); }
.review-photo-upload-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.review-photo-upload-btn { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.review-photo-preview-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.review-photo-preview-item { position: relative; width: 64px; height: 64px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border-light); }
.review-photo-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.review-photo-preview-item button { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; background: rgba(10, 31, 68,0.7); color: #fff; display: flex; align-items: center; justify-content: center; }
.review-photo-preview-item button .material-icons-round { font-size: 13px; }

/* ---------------------------------------------------------------------
   30. FOOTER
--------------------------------------------------------------------- */
.app-footer {
  position: relative;
  background: var(--surface);
  border-top: 1px solid var(--border-light);
  margin-top: 32px;
  padding: 36px 18px calc(var(--bottom-nav-h) + 24px);
}
.app-footer::before {
  content: "";
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 2px;
  background: var(--gradient-brand);
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
.footer-brand .logo { margin-bottom: 10px; font-size: 17px; }
.footer-brand p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 14px; max-width: 320px; }
.footer-socials { display: flex; gap: 10px; }
.footer-socials a {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--primary-50);
  color: var(--primary-dark);
  transition: var(--transition);
}
.footer-socials a:hover { background: var(--gradient-brand); color: #fff; transform: translateY(-3px) rotate(-6deg); box-shadow: var(--shadow-glow-lg); }

.footer-links h4, .footer-contact h4 { font-size: 13.5px; font-weight: 800; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text); }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: 13.5px; color: var(--text-secondary); transition: var(--transition-fast); }
.footer-links a:hover { color: var(--primary-dark); padding-left: 3px; }

.footer-contact p { font-size: 12.5px; color: var(--text-secondary); margin-bottom: 12px; }
.footer-contact .input-group { margin-bottom: 10px; }

.footer-bottom {
  max-width: 1180px;
  margin: 26px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--border-light);
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}
@media (min-width: 768px) {
  .footer-inner { grid-template-columns: 1.2fr 0.8fr 1.4fr; }
}

/* ---------------------------------------------------------------------
   31. HELP CENTER CHAT
--------------------------------------------------------------------- */
.help-chat-box {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 60vh;
  min-height: 380px;
}
.help-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface-alt);
}
.help-chat-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  line-height: 1.5;
}
.help-chat-bubble p { margin-bottom: 4px; }
.help-chat-bubble small { font-size: 10.5px; opacity: 0.65; }
.help-chat-bubble.from-buyer {
  align-self: flex-end;
  background: var(--gradient-brand);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: var(--shadow-sm);
}
.help-chat-bubble.from-admin {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-bottom-left-radius: 4px;
}
.help-chat-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--border-light);
  background: var(--surface);
}
.help-chat-input-row input {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  padding: 11px 16px;
  font-size: 13.5px;
}
.help-chat-input-row input:focus { border-color: var(--primary); }
/* ===== Extra small screens ===== */
@media (max-width: 480px) {
  .form-group input, .form-group select, .form-group textarea { font-size: 16px; } /* stops iOS auto-zoom */
  .password-toggle-btn, .modal-close, .notif-bell-btn, .menu-toggle { width: 44px; height: 44px; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-card { max-width: 100%; width: 100%; border-radius: var(--radius-lg) var(--radius-lg) 0 0; max-height: 94vh; }
  .auth-card { padding: 26px 18px 22px; margin: 16px auto; }
  .shop-name-display { display: none; }
  .topbar-title { font-size: 17px; }
  .content { padding: 14px 12px 100px; }
  .modal-actions { flex-direction: column-reverse; align-items: stretch; gap: 8px; }
  .modal-actions-right { flex-direction: column-reverse; width: 100%; margin-left: 0; gap: 8px; }
  .modal-actions-right .btn, #productDeleteBtn { width: 100%; }
  .stat-cards { grid-template-columns: 1fr; }

  .cart-item {
    grid-template-columns: 52px minmax(0, 1fr) auto;
    grid-template-areas:
      "img info info"
      "img qty del";
    row-gap: 8px;
  }
  .cart-item img { grid-area: img; width: 52px; height: 52px; }
  .cart-item-info { grid-area: info; }
  .cart-item-info p { font-size: 12.5px; }
  .cart-item > .qty-control { grid-area: qty; justify-self: start; }
  .cart-item > .icon-btn { grid-area: del; justify-self: end; align-self: start; }

  input, select, textarea, button { font-size: 16px; } /* global iOS zoom guard */
}
body { padding-bottom: env(safe-area-inset-bottom); }

/* ===== Referral / PK Mart Membership Card ===== */
.member-card-wrap { margin: 24px 0; }
.member-card-wrap h3 { margin-bottom: 12px; }
.member-card {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1.586 / 1;
  border-radius: 16px;
  padding: 20px 22px;
  background: var(--accent);
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.member-card::before {
  content: "";
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
}
.member-card::after {
  content: "";
  position: absolute;
  bottom: -60px; left: -30px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.member-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1;
}
.member-card-brand {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.5px;
}
.member-card-brand span { opacity: .85; font-weight: 500; font-size: 11px; display:block; letter-spacing: 1px; }
.member-card-chip {
  width: 38px; height: 28px;
  border-radius: 6px;
  background: var(--primary-light);
  z-index: 1;
}
.member-card-name {
  font-size: 14px;
  font-weight: 600;
  z-index: 1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.member-card-code-label {
  font-size: 10px;
  opacity: .75;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  z-index: 1;
}
.member-card-code {
  font-family: 'Courier New', monospace;
  font-size: clamp(16px, 5vw, 24px);
  font-weight: 700;
  letter-spacing: 2px;
  z-index: 1;
  max-width: 100%;
  overflow-wrap: break-word;
}

/* ── Event Hero Slider (19:6) ── */
.event-hero-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 19 / 6;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
  background: #FFF6E5;
  box-shadow: var(--shadow-md);
}
.event-hero-slides {
  position: relative;
  width: 100%;
  height: 100%;
}
.event-hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 4.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.event-hero-slide.active { opacity: 1; transform: scale(1); }

/* Mobile: shorter, less-wide ratio so uploaded banners don't lose their sides/subject */
@media (max-width: 640px) {
  .event-hero-slider { aspect-ratio: 4 / 3; border-radius: 12px; margin-bottom: 14px; }
}
.event-hero-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}
.event-hero-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.55);
  cursor: pointer;
  transition: all 0.2s;
}
.event-hero-dot.active { background: #fff; width: 18px; border-radius: 4px; }

.event-hero-cta {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 3;
  box-shadow: 0 6px 18px rgba(0,0,0,0.28);
}
@media (max-width: 640px) {
  .event-hero-cta { left: 12px; bottom: 34px; padding: 9px 16px !important; font-size: 12.5px !important; }
}

/* ===== Event Board Popup ===== */
.event-board-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(4,16,31,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn .25s ease;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
.event-board-popup {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  max-width: 420px; width: 100%;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  animation: popIn .4s var(--ease-spring);
}
@media (max-width: 560px) {
  .event-board-popup { max-width: 92vw; }
}
@keyframes popIn { from { transform: scale(.85) translateY(20px); opacity: 0 } to { transform: scale(1) translateY(0); opacity: 1 } }
.event-board-popup::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 4px;
  background: var(--gradient-brand);
  background-size: 200% 100%;
  animation: gradient-pan 3s ease infinite;
  z-index: 3;
}
.event-board-close {
  position: absolute; top: 12px; right: 12px; z-index: 4;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(4,16,31,.55); color: #fff; border: 1.5px solid rgba(255,255,255,0.35);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: var(--transition-fast);
}
.event-board-close:hover { background: var(--danger); transform: rotate(90deg) scale(1.08); border-color: transparent; }
.event-board-image { width: 100%; display: block; object-fit: cover; }
.event-board-timer { padding: 16px 20px 6px; text-align: center; background: var(--primary-50); }
.event-board-timer-text { display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 800; color: var(--primary-dark); font-size: 12.5px; letter-spacing: 0.3px; text-transform: uppercase; margin-bottom: 10px; }
.event-board-countdown { display: flex; justify-content: center; gap: 10px; }
.event-board-countdown .cd-unit {
  background: var(--gradient-navy);
  border: 1px solid var(--primary-light);
  box-shadow: 0 4px 12px rgba(4,16,31,0.25);
  transition: var(--transition);
}
.event-board-countdown .cd-unit:hover { transform: translateY(-3px) scale(1.05); box-shadow: var(--shadow-sm); }
.event-board-countdown .cd-unit span { color: var(--gold-soft); }
.event-board-countdown .cd-unit small { color: rgba(255,255,255,0.65); }
.event-board-cta { display: block; width: calc(100% - 40px); margin: 16px 20px 20px; text-align: center; }

/* ===== Event badge on product card ===== */
.event-tag {
  position: absolute; bottom: 6px; left: 6px;
  background: var(--primary); color: #fff;
  font-size: 9.5px; font-weight: 700;
  padding: 2px 7px; border-radius: 20px;
  max-width: 85%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}