/* ==========================================================================
   ABONI — FNI INSTITUTIONAL DESIGN SYSTEM
   Bleu Marine Souverain · Blanc Pur · Or Ambré Vigilance (60 / 30 / 10)
   ========================================================================== */

:root {
  /* FNI Brand Core */
  --marine: #16264a;
  --marine-deep: #0f1a33;
  --marine-mid: #1c2f5a;
  --marine-soft: #243a6b;
  --slate-tint: #f8fafc;
  --slate-border: #e2e8f0;
  --amber: #e3a33a;
  --amber-hover: #c98c28;
  --amber-soft: rgba(227, 163, 58, 0.16);
  --amber-border: rgba(227, 163, 58, 0.38);

  /* Dark Theme Surfaces (marine family) */
  --bg-deep: #0c1528;
  --bg-main: #0f1a33;
  --bg-surface: #16264a;
  --bg-surface-elevated: #1c2f5a;
  --bg-surface-hover: #243a6b;
  --bg-card: #16264a;
  --bg-glass: rgba(15, 26, 51, 0.94);

  /* Accent = Or Ambré (CTAs, active states, vigilance) */
  --primary: #e3a33a;
  --primary-hover: #c98c28;
  --primary-light: #f0b85a;
  --primary-glow: rgba(227, 163, 58, 0.32);
  --primary-container: rgba(227, 163, 58, 0.14);
  --primary-border: rgba(227, 163, 58, 0.38);

  --accent: #e3a33a;
  --accent-pink: #c98c28;
  --accent-cyan: #3b82c4;
  --accent-amber: #e3a33a;

  /* Typography Colors */
  --text-main: #f8fafc;
  --text-primary: #ffffff;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dim: #94a3b8;

  /* Precision Flat Borders */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-color: rgba(255, 255, 255, 0.12);
  --border-focus: #e3a33a;

  /* Status Colors */
  --status-success: #10b981;
  --status-success-bg: rgba(16, 185, 129, 0.12);
  --status-warning: #e3a33a;
  --status-warning-bg: rgba(227, 163, 58, 0.14);
  --status-danger: #ef4444;
  --status-danger-bg: rgba(239, 68, 68, 0.12);

  /* Elevation — marine-tinted, restrained */
  --shadow-xs: 0 1px 2px rgba(15, 26, 51, 0.18);
  --shadow-sm: 0 1px 3px rgba(15, 26, 51, 0.22);
  --shadow-md: 0 4px 6px -1px rgba(15, 26, 51, 0.28), 0 2px 4px -1px rgba(15, 26, 51, 0.16);
  --shadow-lg: 0 10px 15px -3px rgba(15, 26, 51, 0.32), 0 4px 6px -2px rgba(15, 26, 51, 0.16);
  --shadow-hover: 0 10px 25px -5px rgba(227, 163, 58, 0.22);
  --shadow-focus: 0 0 0 3px rgba(227, 163, 58, 0.28);

  /* Backward Compatibility Aliases (Overriding Neumorphism) */
  --neu-raised: var(--shadow-sm);
  --neu-raised-sm: var(--shadow-xs);
  --neu-raised-lg: var(--shadow-md);
  --neu-raised-hover: var(--shadow-hover);
  --neu-inset: none;
  --neu-inset-focus: var(--shadow-focus);
  --neu-primary: var(--shadow-sm);
  --neu-primary-active: none;
  --neu-border: 1px solid var(--border-color);
  --neu-border-top: 1px solid var(--border-color);

  /* Radius Tokens */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  /* Decorative step watermarks (theme-aware, WCAG AA on both backgrounds) */
  --wm1: #f0b85a;
  --wm2: #34d399;
  --wm3: #22d3ee;

  /* Typography */
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-arabic: 'Cairo', 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  /* Motion */
  --transition-fast: 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   LIGHT THEME — Blanc Pur & Neutres Clairs (workspace 30%)
   ========================================================================== */
[data-theme="light"] {
  --bg-deep: #f8fafc;
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-surface-hover: #f1f5f9;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.96);

  --primary: #e3a33a;
  --primary-hover: #c98c28;
  /* Darker amber for text on white: >= 4.5:1 contrast (was #c98c28 = 2.76:1) */
  --primary-light: #8f5b0c;
  --primary-container: rgba(227, 163, 58, 0.12);
  --primary-border: rgba(227, 163, 58, 0.32);
  --accent: #e3a33a;

  --text-main: #16264a;
  --text-primary: #16264a;
  --text-secondary: #334155;
  --text-muted: #475569;
  --text-dim: #64748b;

  --border-subtle: #f1f5f9;
  --border-color: #e2e8f0;
  --border-focus: #e3a33a;

  --shadow-xs: 0 1px 2px rgba(22, 38, 74, 0.05);
  --shadow-sm: 0 1px 3px rgba(22, 38, 74, 0.07);
  --shadow-md: 0 4px 6px -1px rgba(22, 38, 74, 0.08), 0 2px 4px -1px rgba(22, 38, 74, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(22, 38, 74, 0.1), 0 4px 6px -2px rgba(22, 38, 74, 0.05);
  --shadow-hover: 0 10px 20px -3px rgba(227, 163, 58, 0.18);
  --shadow-focus: 0 0 0 3px rgba(227, 163, 58, 0.22);

  --neu-raised: var(--shadow-sm);
  --neu-raised-sm: var(--shadow-xs);
  --neu-raised-lg: var(--shadow-md);
  --neu-raised-hover: var(--shadow-hover);
  --neu-inset: none;
  --neu-inset-focus: var(--shadow-focus);
  --neu-primary: var(--shadow-sm);
  --neu-primary-active: none;
  --neu-border: 1px solid var(--border-color);
  --neu-border-top: 1px solid var(--border-color);
}

[data-theme="light"] body {
  background-color: var(--bg-deep);
  background-image: none;
  color: var(--text-main);
}

[data-theme="light"] .brand-text {
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: #16264a;
  color: #16264a;
}

[data-theme="light"] h1, 
[data-theme="light"] h2, 
[data-theme="light"] h3, 
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6,
[data-theme="light"] strong,
[data-theme="light"] b,
[data-theme="light"] th,
[data-theme="light"] .product-title,
[data-theme="light"] .product-title a,
[data-theme="light"] .product-price-box .price-val {
  color: #16264a !important;
}

/* Keep white text on marine chrome (admin sidebar/drawer/topbar) */
[data-theme="light"] .dash-topbar,
[data-theme="light"] .dash-topbar *,
[data-theme="light"] .dash-sidebar,
[data-theme="light"] .dash-sidebar *,
[data-theme="light"] .dash-drawer,
[data-theme="light"] .dash-drawer *,
[data-theme="light"] .dash-bottom-nav,
[data-theme="light"] .dash-bottom-nav *,
[data-theme="light"] .admin-sidebar,
[data-theme="light"] .admin-sidebar * {
  -webkit-text-fill-color: unset;
}
[data-theme="light"] .dash-topbar strong,
[data-theme="light"] .dash-sidebar strong,
[data-theme="light"] .dash-drawer strong,
[data-theme="light"] .dash-on-marine,
[data-theme="light"] .dash-on-marine * {
  color: #ffffff !important;
}

[data-theme="light"] [style*="color:#fff"]:not(.badge):not(.badge *):not(.btn):not(.btn *):not(.user-avatar-pill):not(.brand-logo-icon):not(.brand-logo-icon *):not(.dock-highlight-icon *):not(.plan-radio-indicator *):not(.dash-topbar):not(.dash-topbar *):not(.dash-sidebar):not(.dash-sidebar *):not(.dash-drawer):not(.dash-drawer *):not(.dash-bottom-nav):not(.dash-bottom-nav *):not(.dash-on-marine):not(.dash-on-marine *):not(.admin-sidebar):not(.admin-sidebar *),
[data-theme="light"] [style*="color: #fff"]:not(.badge):not(.badge *):not(.btn):not(.btn *):not(.user-avatar-pill):not(.brand-logo-icon):not(.brand-logo-icon *):not(.dock-highlight-icon *):not(.plan-radio-indicator *):not(.dash-topbar):not(.dash-topbar *):not(.dash-sidebar):not(.dash-sidebar *):not(.dash-drawer):not(.dash-drawer *):not(.dash-bottom-nav):not(.dash-bottom-nav *):not(.dash-on-marine):not(.dash-on-marine *):not(.admin-sidebar):not(.admin-sidebar *),
[data-theme="light"] [style*="color:white"]:not(.badge):not(.badge *):not(.btn):not(.btn *):not(.user-avatar-pill):not(.brand-logo-icon):not(.brand-logo-icon *):not(.dock-highlight-icon *):not(.plan-radio-indicator *):not(.dash-topbar):not(.dash-topbar *):not(.dash-sidebar):not(.dash-sidebar *):not(.dash-drawer):not(.dash-drawer *):not(.dash-bottom-nav):not(.dash-bottom-nav *):not(.dash-on-marine):not(.dash-on-marine *):not(.admin-sidebar):not(.admin-sidebar *),
[data-theme="light"] [style*="color: white"]:not(.badge):not(.badge *):not(.btn):not(.btn *):not(.user-avatar-pill):not(.brand-logo-icon):not(.brand-logo-icon *):not(.dock-highlight-icon *):not(.plan-radio-indicator *):not(.dash-topbar):not(.dash-topbar *):not(.dash-sidebar):not(.dash-sidebar *):not(.dash-drawer):not(.dash-drawer *):not(.dash-bottom-nav):not(.dash-bottom-nav *):not(.dash-on-marine):not(.dash-on-marine *):not(.admin-sidebar):not(.admin-sidebar *) {
  color: #0f172a !important;
}

[data-theme="light"] .btn-primary,
[data-theme="light"] .btn-success,
[data-theme="light"] .btn-danger,
[data-theme="light"] .action-btn-green,
[data-theme="light"] .action-btn-red,
[data-theme="light"] .btn-primary *,
[data-theme="light"] .btn-success *,
[data-theme="light"] .btn-danger *,
[data-theme="light"] .user-avatar-pill,
[data-theme="light"] .brand-logo-icon,
[data-theme="light"] .brand-logo-icon *,
[data-theme="light"] .dock-highlight-icon,
[data-theme="light"] .dock-highlight-icon * {
  /* Dark ink on gold/coloured fills: white was only 2.19:1 */
  color: #1a1205 !important;
}

[data-theme="light"] .mobile-theme-pill.active {
  background: var(--primary) !important;
  color: #1a1205 !important;
  border-color: var(--primary) !important;
}

[data-theme="light"] .site-footer {
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  box-shadow: none;
}

[data-theme="light"] .admin-sidebar {
  background: #16264a;
  border-right: 1px solid rgba(227, 163, 58, 0.22);
  box-shadow: 4px 0 24px rgba(22, 38, 74, 0.12);
  color: #f8fafc;
}

[data-theme="light"] .admin-main {
  background: var(--bg-main);
}

/* ==========================================================================
   RESET & GLOBAL CANVAS
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Hide scrollbars everywhere — scrolling still works */
* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
*::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
  background: transparent;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-main);
  background-color: var(--bg-deep);
  color: var(--text-main);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-main);
  line-height: 1.65;
  letter-spacing: -0.012em;
  background-color: var(--bg-deep);
  background-image: radial-gradient(900px circle at 50% 0%, rgba(227, 163, 58, 0.07), transparent 68%),
                    linear-gradient(180deg, rgba(22, 38, 74, 0.04), transparent 40%);
  background-attachment: fixed;
  color: var(--text-main);
}

[dir="rtl"], [dir="rtl"] body {
  font-family: var(--font-arabic) !important;
  line-height: 1.75;
  letter-spacing: normal;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

img {
  max-width: 100%;
  display: block;
}

/* Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Announcement Bar — marine institutional strip */
.announcement-bar {
  background: linear-gradient(90deg, #0f1a33, #16264a 45%, #1c2f5a);
  color: #ffffff;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  letter-spacing: -0.01em;
  border-bottom: 2px solid var(--amber);
}

/* Sticky Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-fast);
}

[data-theme="light"] .site-header {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 0 rgba(22, 38, 74, 0.04);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 1.5rem;
}

/* Brand Logo */
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.brand-logo-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: linear-gradient(145deg, #16264a 0%, #1c2f5a 55%, #e3a33a 160%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(227, 163, 58, 0.35);
}

.brand-text {
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: #ffffff;
  color: #ffffff;
  font-weight: 800;
}

/* ==========================================================================
   FLAT SEARCH BAR
   ========================================================================== */
.search-container {
  flex: 1;
  max-width: 440px;
  position: relative;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  padding: 0.55rem 1.25rem;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-xs);
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: var(--shadow-focus);
}

.search-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 0.92rem;
  width: 100%;
  margin-left: 0.75rem;
  font-family: inherit;
}

[dir="rtl"] .search-input {
  margin-left: 0;
  margin-right: 0.75rem;
}

.search-input::placeholder {
  color: var(--text-dim);
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 380px;
  overflow-y: auto;
  z-index: 1100;
  display: none;
}

.autocomplete-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-fast);
  cursor: pointer;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover {
  background: var(--bg-surface-hover);
}

.autocomplete-logo {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: contain;
  background: var(--bg-surface-elevated);
  padding: 4px;
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dropdown-trigger {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 38px;
  white-space: nowrap !important;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-fast);
}

.dropdown-trigger:hover {
  border-color: var(--primary);
  color: var(--text-primary);
  background: var(--bg-surface-hover);
}

.header-select-wrap {
  position: relative;
  display: inline-block;
}

.header-select {
  appearance: none !important;
  -webkit-appearance: none !important;
  cursor: pointer;
  padding-inline-end: 1.6rem !important;
  padding-inline-start: 0.85rem !important;
}

.header-select-arrow {
  position: absolute;
  inset-inline-end: 6px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 1rem;
  color: var(--text-muted);
}

/* User Dropdown Component */
.user-dropdown-container {
  position: relative;
  display: inline-block;
}

.user-dropdown-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.85rem 0.35rem 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 40px;
  white-space: nowrap !important;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-fast);
}

.user-dropdown-btn:hover {
  border-color: var(--primary);
  background: var(--bg-surface-hover);
}

.user-avatar-pill {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #c98c28);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 250px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem 0;
  z-index: 1200;
  display: none;
}

[dir="rtl"] .user-dropdown-menu {
  right: auto;
  left: 0;
}

.user-dropdown-menu.show {
  display: block;
}

.user-menu-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 600;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.user-menu-item:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.user-menu-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 0.4rem 0;
}

/* ==========================================================================
   FLAT BUTTONS & CONTROLS
   ========================================================================== */
.btn, .btn-primary, .btn-outline, .btn-success, .btn-copy, .chip, .badge, .action-btn-green, .action-btn-red {
  white-space: nowrap !important;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.65rem 1.45rem;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  text-align: center;
  box-shadow: var(--shadow-xs);
  user-select: none;
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn-primary {
  background: var(--primary);
  color: #ffffff !important;
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.btn-outline {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary-light);
  background: var(--bg-surface-hover);
}

.btn-sm {
  min-height: 36px;
  padding: 0.45rem 1.05rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
  gap: 0.4rem;
}

.btn-lg {
  min-height: 52px;
  padding: 0.9rem 2.2rem;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
  gap: 0.65rem;
}

.btn-success {
  background: #10b981;
  color: #ffffff !important;
  border-color: #10b981;
}

.btn-success:hover {
  background: #059669;
  border-color: #059669;
}

/* Action Buttons */
.action-btn-green {
  background: #10b981;
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.25rem;
  font-weight: 700;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.action-btn-green:hover {
  background: #059669;
}

.action-btn-red {
  background: #ef4444;
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1.25rem;
  font-weight: 700;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.action-btn-red:hover {
  background: #dc2626;
}

.btn-icon-eye {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--primary-light);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon-eye:hover {
  background: var(--primary-container);
  border-color: var(--primary);
  color: #fff;
}

/* ==========================================================================
   FLAT CARDS & SURFACES
   ========================================================================== */
.surface-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.surface-card-elevated {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2rem 2.25rem;
  box-shadow: var(--shadow-md);
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   MARKETPLACE HERO & HEADER SECTION
   ========================================================================== */
.hero-section {
  padding: 4.5rem 0 3.5rem;
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-container);
  border: 1px solid var(--primary-border);
  color: var(--primary-light);
  padding: 0.45rem 1.25rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 18px -6px rgba(227, 163, 58, 0.35);
}

[data-theme="light"] .hero-tag {
  color: #7a4a06;
  background: rgba(227, 163, 58, 0.1);
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.18;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: 1.12rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 680px;
  margin: 0 auto 2.25rem;
}

/* Trust Row (4 Pillars) */
.trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-secondary);
  box-shadow: var(--shadow-xs);
}

.trust-item span:first-child {
  color: var(--primary-light);
  font-size: 1.15rem;
}

/* ==========================================================================
   MARKETPLACE TOOLBAR & CATEGORY CHIPS
   ========================================================================== */
.marketplace-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.category-chips-bar {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding: 0.25rem 0;
  scrollbar-width: none;
}

.category-chips-bar::-webkit-scrollbar {
  display: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-xs);
}

.chip:hover {
  border-color: var(--primary);
  color: var(--text-primary);
  background: var(--bg-surface-hover);
}

.chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff !important;
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   MARKETPLACE PRODUCT CARDS (HIGH-CONVERSION E-COMMERCE DESIGN)
   ========================================================================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
  margin-bottom: 4rem;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.product-card:hover {
  border-color: rgba(227, 163, 58, 0.45);
  transform: translateY(-5px);
  box-shadow: 0 16px 36px -8px rgba(22, 38, 74, 0.18), 0 0 0 1px rgba(227, 163, 58, 0.28);
}

.product-card-header {
  padding: 1.5rem 1.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-logo-wrap {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.product-card:hover .product-logo-wrap {
  transform: scale(1.06);
  border-color: rgba(227, 163, 58, 0.45);
}

.product-logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.like-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-dim);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.like-btn:hover, .like-btn.liked {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}

.product-body {
  padding: 0.5rem 1.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-meta-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.product-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.45rem;
  color: var(--text-primary);
}

.product-title a:hover {
  color: var(--primary-light);
}

.product-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
  flex: 1;
}

.product-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-price-box .price-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.product-price-box .price-val {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.product-price-box .old-price {
  font-size: 0.88rem;
  color: var(--text-dim);
  text-decoration: line-through;
  margin-left: 0.4rem;
}

/* ==========================================================================
   FLAT BADGES
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-accent,
.badge-purple {
  background: var(--primary-container);
  color: var(--primary-light);
  border: 1px solid var(--primary-border);
}

[data-theme="light"] .badge-accent,
[data-theme="light"] .badge-purple {
  color: #c98c28;
  background: rgba(227, 163, 58, 0.12);
}

.badge-stock-in {
  background: var(--status-success-bg);
  color: var(--status-success);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-stock-out {
  background: var(--status-danger-bg);
  color: var(--status-danger);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge-pending {
  background: var(--status-warning-bg);
  color: var(--status-warning);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

/* ==========================================================================
   FLAT FORM INPUTS & RECESSED FIELDS
   ========================================================================== */
.form-group {
  margin-bottom: 1.35rem;
}

.form-label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
  color: var(--text-secondary);
}

.form-input, .form-select, .form-textarea, .form-control {
  width: 100%;
  padding: 0.8rem 1.15rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-xs);
}

.form-input:focus, .form-select:focus, .form-textarea:focus, .form-control:focus {
  border-color: var(--primary);
  box-shadow: var(--shadow-focus);
}

/* Logical Input with Icon & Password Toggle */
.input-with-icon {
  position: relative;
  width: 100%;
}

.input-with-icon .input-icon-start {
  position: absolute;
  inset-inline-start: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.2rem;
  pointer-events: none;
}

.input-with-icon .input-icon-end {
  position: absolute;
  inset-inline-end: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
}

.input-with-icon .form-input-start-icon {
  width: 100%;
  padding-inline-start: 2.5rem !important;
  padding-inline-end: 1rem !important;
}

.input-with-icon .form-input-both-icons {
  width: 100%;
  padding-inline-start: 2.5rem !important;
  padding-inline-end: 2.75rem !important;
}

/* Custom Select Dropdowns */
.form-select, select.dropdown-trigger {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%237c3aed'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.25rem;
  padding-right: 2.75rem !important;
  cursor: pointer;
  min-height: 44px;
}

[dir="rtl"] .form-select, [dir="rtl"] select.dropdown-trigger {
  background-position: left 1rem center;
  padding-right: 1.15rem !important;
  padding-left: 2.75rem !important;
}

.form-select option, select.dropdown-trigger option {
  background-color: var(--bg-surface-elevated);
  color: var(--text-primary);
  padding: 0.6rem 0.8rem;
  font-size: 0.92rem;
}

[data-theme="light"] .form-select option, 
[data-theme="light"] select.dropdown-trigger option {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

/* Payment Gateway Info Box */
.payment-info-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow-sm);
}

.copy-input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.95rem;
  margin-top: 0.4rem;
}

.copy-text {
  font-family: var(--font-mono);
  font-size: 0.96rem;
  color: var(--primary-light);
  flex: 1;
  word-break: break-all;
}

.credentials-content {
  word-break: break-all;
  overflow-wrap: anywhere;
  max-width: 100%;
}

.btn-copy {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--primary-light);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-fast);
}

.btn-copy:hover {
  border-color: var(--primary);
  background: var(--primary-container);
  color: #fff;
}

/* ==========================================================================
   DATA TABLES
   ========================================================================== */
.data-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

[dir="rtl"] .data-table {
  text-align: right;
}

.data-table th {
  padding: 0.95rem 1.25rem;
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.data-table td {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.data-table tbody tr:hover {
  background: var(--bg-surface-hover);
}

@media (max-width: 768px) {
  .data-table th {
    padding: 0.75rem 0.85rem;
    font-size: 0.75rem;
  }
  .data-table td {
    padding: 0.75rem 0.85rem;
    font-size: 0.84rem;
  }
}

@media (max-width: 480px) {
  .data-table th {
    padding: 0.6rem 0.5rem;
    font-size: 0.7rem;
  }
  .data-table td {
    padding: 0.65rem 0.5rem;
    font-size: 0.78rem;
  }
}

/* ==========================================================================
   MODAL WINDOWS & ZOOM
   ========================================================================== */
.proof-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.25rem;
  box-shadow: var(--shadow-lg);
  position: relative;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  margin-top: auto;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
  color: var(--text-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.88rem;
}

.footer-links a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ==========================================================================
   MOBILE HAMBURGER BUTTON & RETRACTABLE DRAWER
   ========================================================================== */

/* Hamburger Button */
.mobile-hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 40px;
  height: 40px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 9px;
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 1010;
}

.mobile-hamburger-btn:hover {
  border-color: var(--primary);
  background: var(--bg-surface-hover);
}

.mobile-hamburger-btn .bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-normal);
  transform-origin: center;
}

.mobile-hamburger-btn.active .bar-1 {
  transform: translateY(6px) rotate(45deg);
}

.mobile-hamburger-btn.active .bar-2 {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-hamburger-btn.active .bar-3 {
  transform: translateY(-6px) rotate(-45deg);
}

/* Retractable Sidebar Drawer Backdrop */
.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
  z-index: 2000;
}

.mobile-drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* Retractable Sidebar Drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(340px, 86vw);
  background: var(--bg-surface);
  border-right: 1px solid var(--border-color);
  box-shadow: 10px 0 35px rgba(0, 0, 0, 0.4);
  transform: translateX(-100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2010;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* RTL Support for Retractable Drawer */
[dir="rtl"] .mobile-drawer {
  left: auto;
  right: 0;
  border-right: none;
  border-left: 1px solid var(--border-color);
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.4);
  transform: translateX(100%);
}

.mobile-drawer.active {
  transform: translateX(0);
}

.mobile-drawer-inner {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.25rem 2rem;
  scrollbar-width: thin;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.25rem;
}

.mobile-drawer-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mobile-drawer-close:hover {
  color: var(--text-primary);
  border-color: var(--primary);
}

/* Drawer User & Quick Auth */
.mobile-drawer-auth {
  margin-bottom: 1.25rem;
}

.drawer-user-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.drawer-auth-buttons {
  display: flex;
  gap: 0.65rem;
}

/* Drawer Search */
.mobile-drawer-search {
  margin-bottom: 1.25rem;
}

/* Switcher Buttons in Drawer */
.mobile-drawer-switchers {
  padding: 0.85rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
}

.switcher-group .switcher-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.switcher-pills {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.switcher-pill {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.switcher-pill.active, .switcher-pill:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

/* Drawer Nav links */
.mobile-drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  flex: 1;
}

.drawer-nav-section {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.drawer-nav-title {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.75rem 0.45rem;
}

.drawer-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.drawer-nav-link:hover, .drawer-nav-link.active {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.drawer-nav-link.active {
  background: var(--primary-container);
  color: var(--primary-light);
}

.drawer-nav-link .material-symbols-outlined {
  font-size: 1.25rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.drawer-nav-link:hover .material-symbols-outlined,
.drawer-nav-link.active .material-symbols-outlined {
  color: var(--primary-light);
}

.mobile-drawer-footer {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.drawer-support-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.drawer-support-btn.whatsapp-btn {
  background: #25d366;
  color: #ffffff;
}

.drawer-support-btn.whatsapp-btn:hover {
  background: #20bd5a;
}

/* ==========================================================================
   NATIVE MOBILE BOTTOM NAVIGATION DOCK
   ========================================================================== */
.mobile-bottom-dock {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
  padding: 0.4rem 0.5rem calc(0.4rem + env(safe-area-inset-bottom, 0px));
  z-index: 990;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.25);
}

.mobile-dock-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  max-width: 500px;
  margin: 0 auto;
}

.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0.4rem 0.6rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  min-width: 54px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.dock-item:hover, .dock-item.active {
  color: var(--primary-light);
}

.dock-item .material-symbols-outlined {
  font-size: 1.35rem;
}

.dock-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.dock-whatsapp .dock-highlight-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.4);
}

/* ==========================================================================
   PRODUCT DETAIL INTERACTIVE & RESPONSIVE COMPONENTS
   ========================================================================== */
.interactive-plan-card:hover {
  border-color: var(--primary-light) !important;
}

.interactive-plan-card.selected {
  border-color: var(--primary) !important;
  background: var(--primary-container) !important;
}

.interactive-plan-card.selected .plan-radio-indicator {
  border-color: var(--primary) !important;
}

.interactive-plan-card.selected .plan-radio-dot {
  background: var(--primary) !important;
}

/* Floating Mobile Sticky Product Checkout Bar */
.mobile-sticky-product-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  padding: 0.65rem 1rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
  z-index: 980;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.2);
  transform: translateY(120%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-sticky-product-bar.visible {
  transform: translateY(0);
}

.mobile-sticky-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

.mobile-sticky-info {
  min-width: 0;
  flex: 1;
}

.mobile-sticky-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-sticky-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary-light);
}

/* ==========================================================================
   CORE LEGAL & CONTACT COMPONENTS
   ========================================================================== */
.contact-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: start;
}

.faq-card summary {
  list-style: none;
}

.faq-card summary::-webkit-details-marker {
  display: none;
}

.faq-card summary:hover {
  color: var(--primary-light) !important;
}

.faq-card[open] {
  border-color: var(--primary-border) !important;
  box-shadow: var(--shadow-sm);
}

.faq-card[open] .faq-chevron {
  transform: rotate(180deg);
  color: var(--primary-light) !important;
}

/* ==========================================================================
   COMPREHENSIVE RESPONSIVE DESIGN (DESKTOP, IPAD, TABLET, IPHONE, ANDROID)
   100% RESPONSIVE ACROSS ALL SCREEN SIZES (280px - 1920px+)
   ========================================================================== */

/* Universal Responsive Guardrails */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
}

img, svg, video, canvas, audio {
  max-width: 100%;
  height: auto;
}

pre, code {
  white-space: pre-wrap;
  word-break: break-word;
}

table {
  max-width: 100%;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Touch input optimization to prevent iOS Safari auto-zoom */
@media (max-width: 768px) {
  input, select, textarea {
    font-size: 16px !important;
  }
}

/* Large Tablets & Small Laptops (<= 1024px, e.g. iPad Pro, iPad Air, 1024x768) */
@media (max-width: 1024px) {
  .mobile-hamburger-btn {
    display: flex;
  }
  .desktop-only-auth {
    display: none !important;
  }
  .search-container {
    display: none;
  }
  .product-detail-layout {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  .product-sidebar-column {
    position: static !important;
    top: auto !important;
  }
  .product-features-grid {
    grid-template-columns: 1fr 1fr;
  }
  .trust-row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }
}

/* Checkout, Order Detail & Dispute Responsive Layouts */
.checkout-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: start;
}

.checkout-summary-col {
  position: sticky;
  top: 90px;
}

.order-detail-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2rem;
  align-items: start;
}

.refund-calc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

/* Medium Tablets & Phablets (<= 900px, e.g. iPad, Android Tablets) */
@media (max-width: 900px) {
  .checkout-layout {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  .checkout-summary-col {
    position: static !important;
    top: auto !important;
  }
  .order-detail-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  .contact-layout {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  .hero-title {
    font-size: 2.2rem;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .nav-inner {
    height: 64px;
    gap: 1rem;
  }
  .mobile-sticky-product-bar {
    display: block;
  }
  .category-chips-bar {
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
  }
  .category-chips-bar::-webkit-scrollbar {
    display: none;
  }
}

/* Phablets & Switcher breakpoint (<= 768px) */
@media (max-width: 768px) {
  .desktop-only-switchers {
    display: none !important;
  }
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Handheld Smartphones (<= 640px, e.g. iPhone 16/15/14/13/SE, Galaxy S24, Pixel) */
@media (max-width: 640px) {
  body {
    padding-bottom: 74px; /* Space for mobile bottom dock */
  }
  body.admin-body {
    padding-bottom: 0 !important;
  }
  .mobile-bottom-dock {
    display: block;
  }
  .mobile-sticky-product-bar {
    bottom: calc(58px + env(safe-area-inset-bottom, 0px));
    z-index: 1050;
  }
  .hero-title {
    font-size: 1.85rem;
    line-height: 1.25;
  }
  .hero-subtitle {
    font-size: 0.95rem;
    line-height: 1.55;
  }
  .hero-section {
    padding: 2.5rem 1rem 2rem;
  }
  .trust-row {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
  .product-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .product-hero-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 1rem !important;
  }
  .product-features-grid {
    grid-template-columns: 1fr !important;
  }
  .marketplace-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .how-it-works-section {
    padding: 2rem 1.25rem !important;
  }
  .steps-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }
  .payment-gateways-banner {
    padding: 1.5rem 1.25rem !important;
    flex-direction: column;
    align-items: flex-start !important;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
  .surface-card {
    padding: 1.25rem 1rem !important;
  }
  .surface-card-elevated {
    padding: 1.5rem 1.25rem !important;
  }
  .auth-card {
    padding: 1.5rem 1.25rem !important;
  }
}

@media (max-width: 500px) {
  .refund-calc-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
}

/* Admin Mobile Responsiveness */
.admin-mobile-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 1.25rem;
  background: #0d091e;
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.admin-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 2400;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.admin-sidebar-toggle-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
}

/* Horizontal scrolling chip lists */
.chip-scroll-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  flex-wrap: nowrap;
  padding-bottom: 0.35rem;
  scrollbar-width: none;
}
.chip-scroll-bar::-webkit-scrollbar {
  display: none;
}

/* RTL Symmetric Support for Admin Dashboard */
[dir="rtl"] .dashboard-layout {
  grid-template-columns: 1fr 260px;
}

[dir="rtl"] .admin-sidebar {
  border-right: none;
  border-left: 1px solid var(--border-subtle);
}

[dir="rtl"] .admin-nav-item.active {
  border-left: none;
  border-right: 3px solid var(--primary);
}

[dir="rtl"] .admin-nav-item .badge {
  margin-left: 0 !important;
  margin-right: auto !important;
}

@media (max-width: 900px) {
  [dir="rtl"] .admin-sidebar {
    left: auto !important;
    right: 0 !important;
    transform: translateX(100%) !important;
    box-shadow: -10px 0 35px rgba(0, 0, 0, 0.6) !important;
  }
  [dir="rtl"] .admin-sidebar.active {
    transform: translateX(0) !important;
  }
}

/* Dashboard & Form Multi-Column Responsive Utilities */
.grid-2-responsive {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.grid-3-responsive {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.modal-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.modal-decision-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.order-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.stats-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 900px) {
  .stats-split-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
}

@media (max-width: 768px) {
  .grid-2-responsive,
  .grid-3-responsive,
  .modal-split-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
}

@media (max-width: 640px) {
  .modal-box {
    padding: 1.25rem 1rem !important;
    border-radius: var(--radius-md) !important;
  }
  .modal-overlay,
  .proof-modal-overlay {
    padding: 0.5rem !important;
  }
  .modal-header {
    padding: 1rem 1.25rem !important;
  }
  .modal-body {
    padding: 1rem 0.85rem !important;
  }
}

@media (max-width: 500px) {
  .modal-decision-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 400px) {
  .order-meta-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Small Smartphones (<= 380px, e.g. iPhone SE 2nd/3rd gen, Galaxy A series) */
@media (max-width: 380px) {
  .hero-title {
    font-size: 1.6rem;
  }
  .brand-text {
    font-size: 1.15rem;
  }
  .brand-logo-icon {
    width: 32px;
    height: 32px;
  }
  .product-price-headline {
    font-size: 1.85rem !important;
  }
  .mobile-dock-inner .dock-label {
    font-size: 0.68rem;
  }
}

/* Ultra-Compact Screens (<= 320px, e.g. Galaxy Fold cover screen, iPhone 5/SE 1st gen) */
@media (max-width: 320px) {
  .hero-title {
    font-size: 1.4rem !important;
    line-height: 1.2 !important;
  }
  .hero-subtitle {
    font-size: 0.85rem !important;
  }
  .brand-text {
    font-size: 1rem !important;
  }
  .brand-logo-icon {
    width: 28px !important;
    height: 28px !important;
  }
  .container {
    padding-left: 0.65rem !important;
    padding-right: 0.65rem !important;
  }
  .surface-card {
    padding: 1rem 0.65rem !important;
  }
  .interactive-plan-card {
    padding: 0.6rem 0.65rem !important;
  }
  .mobile-dock-inner .dock-label {
    font-size: 0.6rem !important;
  }
}

/* ==========================================================================
   ADMIN DASHBOARD MODERN EXTENSIONS (MOBILE TICKETS & TOASTS)
   ========================================================================== */
.admin-toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 380px;
  width: calc(100% - 3rem);
  pointer-events: none;
}
[dir="rtl"] .admin-toast-container {
  right: auto;
  left: 1.5rem;
}
.admin-toast {
  pointer-events: auto;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  animation: slideInToast 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.3s ease;
}
.admin-toast.success { border-left: 4px solid #10b981; }
.admin-toast.error { border-left: 4px solid #ef4444; }
.admin-toast.info { border-left: 4px solid var(--primary); }
[dir="rtl"] .admin-toast.success { border-left: 1px solid var(--border-color); border-right: 4px solid #10b981; }
[dir="rtl"] .admin-toast.error { border-left: 1px solid var(--border-color); border-right: 4px solid #ef4444; }
[dir="rtl"] .admin-toast.info { border-left: 1px solid var(--border-color); border-right: 4px solid var(--primary); }

@keyframes slideInToast {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

[data-theme="light"] .admin-sidebar {
  background: #16264a !important;
  border-color: rgba(227, 163, 58, 0.22) !important;
  color: #f8fafc !important;
}
[data-theme="light"] .admin-main {
  background: #f8fafc !important;
}
[data-theme="light"] .admin-mobile-topbar {
  background: #16264a !important;
  border-color: rgba(227, 163, 58, 0.22) !important;
  color: #ffffff !important;
}
[data-theme="light"] .admin-nav-item {
  color: rgba(248, 250, 252, 0.78) !important;
}
[data-theme="light"] .admin-nav-item:hover {
  background: rgba(227, 163, 58, 0.14) !important;
  color: #ffffff !important;
}
[data-theme="light"] .admin-nav-item.active {
  background: rgba(227, 163, 58, 0.18) !important;
  color: #e3a33a !important;
  border-left-color: #e3a33a !important;
}
[data-theme="light"] [dir="rtl"] .admin-nav-item.active {
  border-right-color: #e3a33a !important;
}
[data-theme="light"] .admin-sidebar .brand-text {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
[data-theme="light"] .stat-card,
[data-theme="light"] .data-table-wrap,
[data-theme="light"] .admin-ticket-card,
[data-theme="light"] .inquiry-card,
[data-theme="light"] .stock-card,
[data-theme="light"] .listing-card {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}
[data-theme="light"] .data-table th {
  background: #f8fafc !important;
  color: #64748b !important;
  border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}
[data-theme="light"] .data-table td {
  border-bottom-color: rgba(0, 0, 0, 0.05) !important;
  color: #1e293b !important;
}

/* ==========================================================================
   USER DASHBOARD — mobile-first order cards (FNI palette)
   ========================================================================== */
.user-order-cards {
  display: grid;
  gap: 0.75rem;
}
.user-order-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: var(--shadow-xs);
}
[data-theme="light"] .user-order-card {
  background: #ffffff;
  border-color: #e2e8f0;
}
.chip-scroll-bar {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.chip-scroll-bar::-webkit-scrollbar { display: none; }

@media (min-width: 901px) {
  .user-dash {
    padding-top: 2.5rem !important;
  }
  .user-order-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}



/* ==========================================================================
   WCAG AA contrast fixes for the light theme (gold accents on white)
   ========================================================================== */
[data-theme="light"] .chip.active,
[data-theme="light"] .chip.active * {
  color: #1a1205 !important;
}
[data-theme="light"] .badge-accent,
[data-theme="light"] .badge-purple,
[data-theme="light"] .badge-pending {
  color: #7a4a06;
}

/* ==========================================================================
   WCAG AA: dark ink on gold/coloured fills applies to BOTH light & dark themes
   (white on #e3a33a is only 2.19:1)
   ========================================================================== */
.chip.active,
.chip.active *,
.btn-primary,
.btn-primary *,
.mobile-theme-pill.active {
  color: #1a1205 !important;
}
[data-theme="light"] {
  --wm1: #8f5b0c;
  --wm2: #0f7a5a;
  --wm3: #0e6f8c;
}

/* ==========================================================================
   Accessibility, consent UI and error/focus states (WCAG 2.2 AA)
   ========================================================================== */
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 3000;
  background: #ffffff; color: #16264a; padding: 0.7rem 1.1rem;
  border: 2px solid #8f5b0c; border-radius: 10px; font-weight: 800;
  text-decoration: none; transition: top 0.15s ease;
}
.skip-link:focus { top: 1rem; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--primary-light, #8f5b0c);
  outline-offset: 2px;
  border-radius: 4px;
}
[data-theme="dark"] :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline-color: #f0b85a;
}
input::placeholder, textarea::placeholder { color: var(--text-muted) !important; opacity: 1; }
input:disabled, select:disabled, textarea:disabled, button:disabled { opacity: 0.75; cursor: not-allowed; }
input[aria-invalid="true"], .form-input:user-invalid, .form-textarea:user-invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 2px rgba(239,68,68,0.18);
}
/* Status is never colour-only: add a textual marker as well. */
.alert-error::before { content: "⚠ "; font-weight: 800; }
.alert-success::before { content: "✓ "; font-weight: 800; }
.alert-info::before { content: "ℹ "; font-weight: 800; }
/* Links inside text blocks must be distinguishable without relying on colour. */
p a:not(.btn), li a:not(.btn), label a:not(.btn), td a:not(.btn) {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---- Cookie consent banner -------------------------------------------- */
.cookie-banner {
  position: fixed; inset-inline: 1rem; bottom: 1rem; z-index: 2500;
  max-width: 900px; margin-inline: auto;
  background: var(--bg-card, #ffffff); color: var(--text-primary, #16264a);
  border: 1px solid var(--border-color, #e2e8f0); border-radius: 18px;
  box-shadow: 0 18px 50px rgba(10,20,40,0.28);
  max-height: min(80vh, 640px); overflow: auto;
}
.cookie-banner-inner { padding: 1.35rem 1.5rem; }
.cookie-banner h2 { font-size: 1.05rem; font-weight: 800; margin: 0 0 0.5rem; color: var(--text-primary); }
.cookie-banner p { font-size: 0.86rem; line-height: 1.65; color: var(--text-secondary); margin: 0 0 0.75rem; }
.cookie-banner a { color: var(--primary-light); text-decoration: underline; font-weight: 700; }
.cookie-consent-version { font-size: 0.74rem !important; color: var(--text-muted) !important; margin-bottom: 0 !important; }
.cookie-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.9rem; }
.cookie-actions .btn { min-height: 44px; font-size: 0.86rem; padding: 0.6rem 1rem; }
.cookie-status { margin: 0.6rem 0 0 !important; font-size: 0.8rem !important; color: #0f7a5a !important; font-weight: 700; }
.cookie-customize { margin-top: 0.9rem; padding: 0.9rem 1rem; background: var(--bg-surface-elevated); border: 1px solid var(--border-color); border-radius: 12px; }
.cookie-option { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.84rem; color: var(--text-secondary); line-height: 1.55; margin-bottom: 0.55rem; cursor: pointer; }
.cookie-option input { margin-top: 0.25rem; flex-shrink: 0; width: 18px; height: 18px; }
.cookie-no-trackers { font-size: 0.78rem !important; color: var(--text-muted) !important; margin: 0.5rem 0 0 !important; }
.cookie-prefs-link { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; font: inherit; cursor: pointer; }
.cookie-prefs-link:focus-visible { outline: 3px solid var(--primary-light); outline-offset: 3px; }

@media (max-width: 640px) {
  .cookie-banner { inset-inline: 0.5rem; bottom: 0.5rem; }
  .cookie-banner-inner { padding: 1.1rem; }
  .cookie-actions .btn { flex: 1 1 auto; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
