/* ═══════════════════════════════════════════════════════════════
   NEXORA — Design System v2.0
   World-class unified visual identity
   Inspired by: Vercel · Linear · Stripe · Framer
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Cairo:wght@300;400;500;600;700;800;900&display=swap');

/* ══════════════════════════════════════════════════
   DESIGN TOKENS — Dark Mode (default)
   ══════════════════════════════════════════════════ */
:root {
  /* ── Backgrounds ── */
  --bg-base:      #080C14;
  --bg-subtle:    #0C1220;
  --bg-surface:   #0F1725;
  --bg-elevated:  #131D2E;
  --bg-overlay:   #172233;
  --bg-card:      #111926;
  --bg-card-hover:#141F30;
  --bg-input:     #0F1725;
  --bg-badge:     #1A2540;

  /* ── Borders ── */
  --border-subtle:  rgba(255,255,255,0.045);
  --border-default: rgba(255,255,255,0.08);
  --border-strong:  rgba(255,255,255,0.13);
  --border-focus:   rgba(99,102,241,0.6);

  /* ── Brand / Accent ── */
  --brand-primary:  #6366F1;
  --brand-secondary:#818CF8;
  --brand-tertiary: #A5B4FC;
  --brand-glow:     rgba(99,102,241,0.22);
  --brand-subtle:   rgba(99,102,241,0.08);

  /* ── Semantic Colors ── */
  --color-gold:    #F59E0B;
  --color-emerald: #10B981;
  --color-rose:    #F43F5E;
  --color-violet:  #8B5CF6;
  --color-cyan:    #06B6D4;
  --color-amber:   #F97316;

  /* ── Text ── */
  --text-primary:   #EEF2FF;
  --text-secondary: #8892B0;
  --text-tertiary:  #4A5568;
  --text-disabled:  #2D3748;
  --text-inverse:   #080C14;
  --text-on-brand:  #FFFFFF;

  /* ── Shadows ── */
  --shadow-xs:  0 1px 2px rgba(0,0,0,0.4);
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.45), 0 2px 4px rgba(0,0,0,0.3);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.5), 0 4px 8px rgba(0,0,0,0.3);
  --shadow-xl:  0 16px 48px rgba(0,0,0,0.55), 0 8px 16px rgba(0,0,0,0.35);
  --shadow-2xl: 0 24px 64px rgba(0,0,0,0.6), 0 12px 24px rgba(0,0,0,0.4);
  --shadow-brand: 0 4px 20px rgba(99,102,241,0.35);
  --shadow-brand-lg: 0 8px 40px rgba(99,102,241,0.4);

  /* ── Typography ── */
  --font-sans-en: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-sans-ar: 'Cairo', 'Segoe UI', system-ui, sans-serif;
  --font-mono:    'Fira Code', 'Cascadia Code', 'JetBrains Mono', monospace;

  /* ── Type Scale ── */
  --text-xs:   11px; --lh-xs:   16px;
  --text-sm:   13px; --lh-sm:   20px;
  --text-base: 15px; --lh-base: 24px;
  --text-md:   17px; --lh-md:   28px;
  --text-lg:   19px; --lh-lg:   30px;
  --text-xl:   22px; --lh-xl:   32px;
  --text-2xl:  26px; --lh-2xl:  36px;
  --text-3xl:  32px; --lh-3xl:  42px;
  --text-4xl:  40px; --lh-4xl:  52px;
  --text-5xl:  50px; --lh-5xl:  62px;
  --text-6xl:  64px; --lh-6xl:  78px;

  /* ── Spacing ── */
  --space-1: 4px;   --space-2: 8px;   --space-3: 12px;
  --space-4: 16px;  --space-5: 20px;  --space-6: 24px;
  --space-8: 32px;  --space-10: 40px; --space-12: 48px;
  --space-16: 64px; --space-20: 80px; --space-24: 96px;
  --space-32: 128px;

  /* ── Radius ── */
  --radius-xs:   4px;
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   14px;
  --radius-xl:   18px;
  --radius-2xl:  24px;
  --radius-3xl:  32px;
  --radius-full: 9999px;

  /* ── Motion ── */
  --ease-out:    cubic-bezier(0.0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-snap:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --dur-fast:    120ms;
  --dur-base:    200ms;
  --dur-slow:    350ms;
  --dur-slower:  500ms;

  /* ── Layout ── */
  --nav-height: 64px;
  --max-w-sm:   480px;
  --max-w-md:   768px;
  --max-w-lg:   1024px;
  --max-w-xl:   1280px;
  --max-w-2xl:  1440px;

  /* ── Gradients ── */
  --gradient-brand: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #A78BFA 100%);
  --gradient-gold:  linear-gradient(135deg, #F59E0B 0%, #F97316 100%);
  --gradient-mesh:  radial-gradient(ellipse at 20% 20%, rgba(99,102,241,0.12) 0%, transparent 50%),
                    radial-gradient(ellipse at 80% 80%, rgba(139,92,246,0.08) 0%, transparent 50%),
                    radial-gradient(ellipse at 50% 0%, rgba(6,182,212,0.06) 0%, transparent 40%);
  --gradient-hero-text: linear-gradient(135deg, #EEF2FF 0%, #C7D2FE 40%, #A5B4FC 100%);
}

/* ══════════════════════════════════════════════════
   LIGHT MODE TOKENS
   ══════════════════════════════════════════════════ */
[data-theme="light"] {
  --bg-base:      #FAFBFF;
  --bg-subtle:    #F4F6FF;
  --bg-surface:   #FFFFFF;
  --bg-elevated:  #FFFFFF;
  --bg-overlay:   #F0F3FF;
  --bg-card:      #FFFFFF;
  --bg-card-hover:#F7F9FF;
  --bg-input:     #FFFFFF;
  --bg-badge:     #EEF2FF;

  --border-subtle:  rgba(99,102,241,0.06);
  --border-default: rgba(99,102,241,0.10);
  --border-strong:  rgba(99,102,241,0.18);
  --border-focus:   rgba(99,102,241,0.5);

  --brand-glow:   rgba(99,102,241,0.12);
  --brand-subtle: rgba(99,102,241,0.06);

  --text-primary:   #0A0F1E;
  --text-secondary: #3D4A6B;
  --text-tertiary:  #7080A0;
  --text-disabled:  #A0AABF;
  --text-inverse:   #FFFFFF;

  --shadow-xs:  0 1px 2px rgba(99,102,241,0.06);
  --shadow-sm:  0 2px 8px rgba(99,102,241,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 16px rgba(99,102,241,0.1), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg:  0 8px 32px rgba(99,102,241,0.12), 0 4px 8px rgba(0,0,0,0.08);
  --shadow-xl:  0 16px 48px rgba(99,102,241,0.14), 0 8px 16px rgba(0,0,0,0.08);
  --shadow-2xl: 0 24px 64px rgba(99,102,241,0.16), 0 12px 24px rgba(0,0,0,0.08);
  --shadow-brand: 0 4px 20px rgba(99,102,241,0.25);
  --shadow-brand-lg: 0 8px 40px rgba(99,102,241,0.3);

  --gradient-mesh:  radial-gradient(ellipse at 20% 20%, rgba(99,102,241,0.07) 0%, transparent 50%),
                    radial-gradient(ellipse at 80% 80%, rgba(139,92,246,0.05) 0%, transparent 50%),
                    radial-gradient(ellipse at 50% 0%, rgba(6,182,212,0.04) 0%, transparent 40%);
  --gradient-hero-text: linear-gradient(135deg, #0A0F1E 0%, #3730A3 50%, #4338CA 100%);
}

/* ══════════════════════════════════════════════════
   BASE RESET & DOCUMENT
   ══════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0; padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  color-scheme: dark;
}

[data-theme="light"] { color-scheme: light; }

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans-en);
  font-size: var(--text-base);
  line-height: var(--lh-base);
  font-feature-settings: 'cv02','cv03','cv04','cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color var(--dur-slow) var(--ease-in-out),
              color var(--dur-slow) var(--ease-in-out);
}

body[dir="rtl"], body.rtl {
  font-family: var(--font-sans-ar);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--brand-primary); }

/* ── Selection ── */
::selection {
  background: rgba(99,102,241,0.2);
  color: var(--text-primary);
}

/* ── Focus ── */
:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ── Base elements ── */
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }
ul, ol { list-style: none; }

/* ══════════════════════════════════════════════════
   LAYOUT
   ══════════════════════════════════════════════════ */
.nxr-container {
  width: 100%;
  max-width: var(--max-w-xl);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.nxr-container-sm { max-width: var(--max-w-md); }
.nxr-container-lg { max-width: var(--max-w-2xl); }

@media (max-width: 640px) {
  .nxr-container { padding: 0 var(--space-4); }
}

/* ══════════════════════════════════════════════════
   NAVIGATION
   ══════════════════════════════════════════════════ */
.nxr-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 1000;
  transition: all var(--dur-base) var(--ease-in-out);
}

.nxr-nav::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(8,12,20,0.01);
  -webkit-backdrop-filter: blur(0px);
  backdrop-filter: blur(0px);
  border-bottom: 1px solid transparent;
  transition: all var(--dur-base) var(--ease-in-out);
}

[data-theme="light"] .nxr-nav::before {
  background: rgba(250,251,255,0.01);
}

.nxr-nav.scrolled::before {
  background: rgba(8,12,20,0.82);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border-bottom-color: var(--border-subtle);
}

[data-theme="light"] .nxr-nav.scrolled::before {
  background: rgba(250,251,255,0.88);
}

.nxr-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  position: relative;
}

/* Logo */
.nxr-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
  z-index: 1;
}

.nxr-logo-icon {
  width: 36px; height: 36px;
  background: var(--gradient-brand);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-brand);
  flex-shrink: 0;
}

.nxr-logo-icon::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 60%);
}

.nxr-logo-icon svg {
  width: 18px; height: 18px;
  fill: none;
  stroke: white;
  stroke-width: 2;
  position: relative;
}

.nxr-logo-text { display: flex; flex-direction: column; gap: 1px; }
.nxr-logo-name {
  font-size: 15px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-primary);
  line-height: 1;
}
.nxr-logo-tagline {
  font-size: 10px; font-weight: 400;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
  line-height: 1;
}

/* Nav Links */
.nxr-nav-links {
  display: flex; align-items: center; gap: 2px;
  z-index: 1;
}

.nxr-nav-link {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--dur-fast), background var(--dur-fast);
  white-space: nowrap;
}

.nxr-nav-link:hover { color: var(--text-primary); background: var(--bg-elevated); }
.nxr-nav-link.active { color: var(--brand-secondary); }

/* Nav Actions */
.nxr-nav-actions {
  display: flex; align-items: center; gap: var(--space-2);
  z-index: 1;
}

/* Theme Toggle */
.nxr-theme-btn {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  font-size: 16px;
  transition: all var(--dur-fast);
  cursor: pointer;
}

.nxr-theme-btn:hover {
  background: var(--bg-overlay);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

/* Language Toggle */
.nxr-lang {
  display: flex;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 2px;
}

.nxr-lang-btn {
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  font-size: 11px; font-weight: 600;
  color: var(--text-tertiary);
  transition: all var(--dur-fast);
  letter-spacing: 0.04em;
  cursor: pointer;
}

.nxr-lang-btn.active {
  background: var(--brand-primary);
  color: var(--text-on-brand);
  box-shadow: 0 1px 6px rgba(99,102,241,0.4);
}

/* CTA Button in Nav */
.nxr-nav-cta {
  padding: 7px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm); font-weight: 600;
  color: var(--text-primary);
  transition: all var(--dur-fast);
  white-space: nowrap;
}

.nxr-nav-cta:hover {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: white;
  box-shadow: var(--shadow-brand);
}

/* Hamburger */
.nxr-hamburger {
  display: none;
  width: 34px; height: 34px;
  flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  transition: background var(--dur-fast);
  cursor: pointer;
}

.nxr-hamburger:hover { background: var(--bg-overlay); }

.nxr-hamburger span {
  display: block; width: 16px; height: 1.5px;
  background: var(--text-secondary);
  border-radius: var(--radius-full);
  transition: all var(--dur-base) var(--ease-in-out);
}

.nxr-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nxr-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nxr-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile Nav */
.nxr-mobile-nav {
  position: fixed;
  top: var(--nav-height); left: 0; right: 0;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-default);
  padding: var(--space-3) var(--space-4) var(--space-5);
  z-index: 999;
  display: none;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity var(--dur-base), transform var(--dur-base);
  box-shadow: var(--shadow-lg);
}

.nxr-mobile-nav.open {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.nxr-mobile-nav .nxr-nav-link {
  padding: 10px 12px;
  font-size: var(--text-base);
  border-radius: var(--radius-md);
}

.nxr-mobile-nav-footer {
  display: flex; align-items: center; gap: var(--space-3);
  padding-top: var(--space-4);
  margin-top: var(--space-2);
  border-top: 1px solid var(--border-subtle);
}

@media (max-width: 768px) {
  .nxr-nav-links { display: none; }
  .nxr-hamburger { display: flex; }
  .nxr-nav-cta { display: none; }
}

/* ══════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════ */
.nxr-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--space-2);
  border-radius: var(--radius-md);
  font-size: var(--text-sm); font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--dur-base) var(--ease-in-out);
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  padding: 9px 18px;
  line-height: 1;
}

.nxr-btn:active { transform: scale(0.97); }

/* Primary */
.nxr-btn-primary {
  background: var(--gradient-brand);
  color: white;
  box-shadow: var(--shadow-brand), inset 0 1px 0 rgba(255,255,255,0.15);
}
.nxr-btn-primary:hover {
  box-shadow: var(--shadow-brand-lg), inset 0 1px 0 rgba(255,255,255,0.2);
  transform: translateY(-1px);
}

/* Secondary */
.nxr-btn-secondary {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
  color: var(--text-primary);
  box-shadow: var(--shadow-xs);
}
.nxr-btn-secondary:hover {
  background: var(--bg-overlay);
  border-color: var(--brand-primary);
  color: var(--brand-secondary);
  transform: translateY(-1px);
}

/* Ghost */
.nxr-btn-ghost {
  background: transparent;
  border-color: var(--border-default);
  color: var(--text-secondary);
}
.nxr-btn-ghost:hover {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

/* Danger */
.nxr-btn-danger {
  background: rgba(244,63,94,0.08);
  border-color: rgba(244,63,94,0.2);
  color: var(--color-rose);
}
.nxr-btn-danger:hover {
  background: rgba(244,63,94,0.14);
  border-color: var(--color-rose);
}

/* Gold */
.nxr-btn-gold {
  background: var(--gradient-gold);
  color: #0A0F1E;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(245,158,11,0.3);
}
.nxr-btn-gold:hover {
  box-shadow: 0 6px 30px rgba(245,158,11,0.4);
  transform: translateY(-1px);
}

/* Sizes */
.nxr-btn-xs  { padding: 5px 10px; font-size: var(--text-xs); border-radius: var(--radius-sm); }
.nxr-btn-sm  { padding: 7px 14px; font-size: var(--text-sm); }
.nxr-btn-lg  { padding: 12px 24px; font-size: var(--text-base); border-radius: var(--radius-lg); }
.nxr-btn-xl  { padding: 15px 32px; font-size: var(--text-md); border-radius: var(--radius-lg); }
.nxr-btn-2xl { padding: 18px 40px; font-size: var(--text-lg); border-radius: var(--radius-xl); font-weight: 700; }
.nxr-btn-icon { padding: 8px; border-radius: var(--radius-sm); aspect-ratio: 1; }
.nxr-btn-full { width: 100%; justify-content: center; }

/* ══════════════════════════════════════════════════
   CARDS
   ══════════════════════════════════════════════════ */
.nxr-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--dur-slow) var(--ease-in-out);
  box-shadow: var(--shadow-sm);
}

.nxr-card:hover {
  border-color: var(--border-default);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

/* ── Product Card ── */
.nxr-product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  cursor: pointer;
  display: flex; flex-direction: column;
  transition: all var(--dur-slow) var(--ease-in-out);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.nxr-product-card::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(99,102,241,0) 0%, rgba(99,102,241,0) 100%);
  transition: background var(--dur-slow);
  pointer-events: none;
}

.nxr-product-card:hover {
  border-color: rgba(99,102,241,0.25);
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(99,102,241,0.12);
  transform: translateY(-6px);
}

.nxr-product-card:hover::after {
  background: linear-gradient(135deg, rgba(99,102,241,0.03) 0%, rgba(139,92,246,0.02) 100%);
}

.nxr-product-img {
  aspect-ratio: 16/9;
  background: var(--bg-subtle);
  overflow: hidden;
  position: relative;
}

.nxr-product-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}

.nxr-product-card:hover .nxr-product-img img {
  transform: scale(1.06);
}

.nxr-product-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-overlay) 100%);
  position: relative; overflow: hidden;
}

.nxr-product-img-placeholder::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(99,102,241,0.06) 0%, rgba(139,92,246,0.04) 100%);
}

.nxr-product-initial {
  font-size: 64px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.45;
  font-family: var(--font-display);
  position: relative;
  z-index: 1;
}

.nxr-cat-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--brand-primary);
  opacity: 0.6;
  flex-shrink: 0;
  display: inline-block;
}

.nxr-product-badges {
  position: absolute; top: var(--space-3);
  inset-inline-start: var(--space-3);
  display: flex; gap: var(--space-2);
  flex-wrap: wrap;
  z-index: 1;
}

.nxr-product-body {
  padding: var(--space-5);
  flex: 1;
  display: flex; flex-direction: column; gap: var(--space-3);
}

.nxr-product-category {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: var(--text-xs); font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: 0.04em; text-transform: uppercase;
}

.nxr-product-title {
  font-size: var(--text-md); font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nxr-product-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.nxr-product-tags {
  display: flex; flex-wrap: wrap; gap: var(--space-1);
}

.nxr-product-footer {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--border-subtle);
  gap: var(--space-3);
}

/* ── Price ── */
.nxr-price { display: flex; align-items: baseline; gap: 4px; }
.nxr-price-amount {
  font-size: var(--text-xl); font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.nxr-price-currency {
  font-size: var(--text-xs); font-weight: 500;
  color: var(--text-tertiary);
}
.nxr-price-free {
  font-size: var(--text-sm); font-weight: 700;
  color: var(--color-emerald);
  display: flex; align-items: center; gap: 4px;
}

/* ══════════════════════════════════════════════════
   BADGES & TAGS
   ══════════════════════════════════════════════════ */
.nxr-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs); font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  line-height: 1.5;
}

.nxr-badge-brand   { background: var(--brand-subtle); color: var(--brand-secondary); border: 1px solid rgba(99,102,241,0.2); }
.nxr-badge-gold    { background: rgba(245,158,11,0.12); color: #F59E0B; border: 1px solid rgba(245,158,11,0.25); }
.nxr-badge-hot     { background: rgba(244,63,94,0.1); color: var(--color-rose); border: 1px solid rgba(244,63,94,0.2); }
.nxr-badge-green   { background: rgba(16,185,129,0.1); color: var(--color-emerald); border: 1px solid rgba(16,185,129,0.2); }
.nxr-badge-muted   { background: var(--bg-badge); color: var(--text-secondary); border: 1px solid var(--border-default); }

.nxr-tag {
  display: inline-flex; align-items: center;
  padding: 2px 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  font-weight: 500;
  transition: all var(--dur-fast);
}

.nxr-tag:hover {
  border-color: var(--border-strong);
  color: var(--text-secondary);
}

/* ══════════════════════════════════════════════════
   STATUS PILLS
   ══════════════════════════════════════════════════ */
.nxr-status {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs); font-weight: 600;
  letter-spacing: 0.03em;
}

.nxr-status::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.nxr-status-new     { color: var(--brand-secondary); background: var(--brand-subtle); }
.nxr-status-replied { color: var(--color-emerald);   background: rgba(16,185,129,0.1); }
.nxr-status-closed  { color: var(--text-tertiary);   background: var(--bg-badge); }
.nxr-status-active  { color: var(--color-emerald);   background: rgba(16,185,129,0.1); }
.nxr-status-draft   { color: var(--color-gold);      background: rgba(245,158,11,0.1); }

/* ══════════════════════════════════════════════════
   SECTION HEADER
   ══════════════════════════════════════════════════ */
.nxr-section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-16);
}

.nxr-eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 5px 14px;
  background: var(--brand-subtle);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: var(--radius-full);
  font-size: var(--text-xs); font-weight: 700;
  color: var(--brand-secondary);
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: var(--space-5);
}

.nxr-section-title {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

.nxr-section-sub {
  font-size: var(--text-md);
  color: var(--text-secondary);
  line-height: 1.75;
}

.nxr-gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ══════════════════════════════════════════════════
   FORMS
   ══════════════════════════════════════════════════ */
.nxr-form-group { display: flex; flex-direction: column; gap: var(--space-2); }

.nxr-label {
  font-size: var(--text-sm); font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}
.nxr-label .req { color: var(--color-rose); margin-inline-start: 3px; }

.nxr-input,
.nxr-select,
.nxr-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 10px 13px;
  font-size: var(--text-sm);
  color: var(--text-primary);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast), background var(--dur-fast);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.nxr-input::placeholder, .nxr-textarea::placeholder { color: var(--text-tertiary); }

.nxr-input:hover, .nxr-select:hover, .nxr-textarea:hover {
  border-color: var(--border-strong);
}

.nxr-input:focus, .nxr-select:focus, .nxr-textarea:focus {
  border-color: var(--brand-primary);
  background: var(--bg-elevated);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

.nxr-input.error, .nxr-textarea.error {
  border-color: var(--color-rose);
  box-shadow: 0 0 0 3px rgba(244,63,94,0.1);
}

.nxr-textarea { resize: vertical; min-height: 96px; line-height: var(--lh-base); }

.nxr-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234A5568' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 34px;
  cursor: pointer;
}
body[dir="rtl"] .nxr-select { background-position: left 13px center; padding-right: 13px; padding-left: 34px; }

.nxr-field-error { font-size: var(--text-xs); color: var(--color-rose); margin-top: 2px; }

/* ══════════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════════ */
.nxr-backdrop {
  position: fixed; inset: 0;
  background: rgba(4,7,15,0.7);
  z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-4);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-in-out);
}

[data-theme="light"] .nxr-backdrop { background: rgba(10,15,30,0.5); }

.nxr-backdrop.open { opacity: 1; pointer-events: all; }

.nxr-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-2xl);
  width: 100%; max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-2xl);
  transform: scale(0.96) translateY(10px);
  transition: transform var(--dur-slow) var(--ease-spring);
}

.nxr-backdrop.open .nxr-modal { transform: scale(1) translateY(0); }

.nxr-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky; top: 0;
  background: var(--bg-surface);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  z-index: 1;
}

.nxr-modal-title { font-size: var(--text-lg); font-weight: 700; color: var(--text-primary); }

.nxr-modal-close {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-tertiary); font-size: 16px;
  transition: all var(--dur-fast);
  cursor: pointer;
}
.nxr-modal-close:hover { background: rgba(244,63,94,0.1); color: var(--color-rose); border-color: rgba(244,63,94,0.3); }

.nxr-modal-body { padding: var(--space-6); }
.nxr-modal-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border-subtle);
  display: flex; gap: var(--space-3); justify-content: flex-end;
}
body[dir="rtl"] .nxr-modal-footer { justify-content: flex-start; }

/* ══════════════════════════════════════════════════
   TOAST
   ══════════════════════════════════════════════════ */
.nxr-toast-wrap {
  position: fixed;
  bottom: var(--space-6); right: var(--space-6);
  z-index: 9999;
  display: flex; flex-direction: column;
  gap: var(--space-3); pointer-events: none;
}
body[dir="rtl"] .nxr-toast-wrap { right: auto; left: var(--space-6); }

.nxr-toast {
  display: flex; align-items: flex-start; gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm); font-weight: 500;
  color: var(--text-primary);
  box-shadow: var(--shadow-xl);
  pointer-events: all;
  animation: toastSlideIn var(--dur-slow) var(--ease-spring) forwards;
  min-width: 260px; max-width: 380px;
  line-height: var(--lh-sm);
}

.nxr-toast.success { border-color: rgba(16,185,129,0.35); }
.nxr-toast.error   { border-color: rgba(244,63,94,0.35); }
.nxr-toast.info    { border-color: rgba(99,102,241,0.35); }

.nxr-toast-dot {
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0; margin-top: 4px;
}
.success .nxr-toast-dot { background: var(--color-emerald); box-shadow: 0 0 8px rgba(16,185,129,0.6); }
.error   .nxr-toast-dot { background: var(--color-rose);    box-shadow: 0 0 8px rgba(244,63,94,0.6); }
.info    .nxr-toast-dot { background: var(--brand-primary); box-shadow: 0 0 8px rgba(99,102,241,0.6); }

.nxr-toast-msg { flex: 1; }
.nxr-toast.hiding { animation: toastSlideOut var(--dur-base) var(--ease-in-out) forwards; }

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(20px) scale(0.94); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastSlideOut {
  to { opacity: 0; transform: translateX(20px) scale(0.94); }
}
body[dir="rtl"] .nxr-toast { animation-name: toastSlideInRtl; }
body[dir="rtl"] .nxr-toast.hiding { animation-name: toastSlideOut; }
@keyframes toastSlideInRtl {
  from { opacity: 0; transform: translateX(-20px) scale(0.94); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

/* ══════════════════════════════════════════════════
   STAT CARD
   ══════════════════════════════════════════════════ */
.nxr-stat {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  position: relative; overflow: hidden;
  transition: all var(--dur-base) var(--ease-in-out);
}

.nxr-stat::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--stat-accent, var(--gradient-brand));
}

.nxr-stat:hover {
  transform: translateY(-2px);
  border-color: var(--border-default);
  box-shadow: var(--shadow-md);
}

.nxr-stat-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  background: var(--stat-icon-bg, var(--brand-subtle));
  margin-bottom: var(--space-4);
  color: var(--brand-primary);
}

.nxr-stat-value {
  font-size: var(--text-3xl); font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: var(--space-2);
}

.nxr-stat-label {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  font-weight: 500;
}

/* ══════════════════════════════════════════════════
   TABLE
   ══════════════════════════════════════════════════ */
.nxr-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  background: var(--bg-card);
}

.nxr-table {
  width: 100%; border-collapse: collapse;
  font-size: var(--text-sm);
}

.nxr-table th {
  padding: var(--space-3) var(--space-5);
  text-align: start;
  font-size: var(--text-xs); font-weight: 700;
  color: var(--text-tertiary);
  letter-spacing: 0.06em; text-transform: uppercase;
  border-bottom: 1px solid var(--border-default);
  white-space: nowrap;
  background: var(--bg-elevated);
}

.nxr-table td {
  padding: var(--space-4) var(--space-5);
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.nxr-table tr:last-child td { border-bottom: none; }
.nxr-table tr:hover td { background: rgba(99,102,241,0.02); }

/* ══════════════════════════════════════════════════
   FILTER TABS
   ══════════════════════════════════════════════════ */
.nxr-tabs {
  display: flex; align-items: center; gap: var(--space-2);
  flex-wrap: wrap;
}

.nxr-tab {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm); font-weight: 600;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--dur-fast);
  white-space: nowrap;
}

.nxr-tab:hover { border-color: var(--border-strong); color: var(--text-secondary); }

.nxr-tab.active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: white;
  box-shadow: 0 2px 10px rgba(99,102,241,0.35);
}

.nxr-tab-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: rgba(255,255,255,0.18);
  border-radius: var(--radius-full);
  font-size: 10px; font-weight: 700;
  line-height: 1;
}

.nxr-tab:not(.active) .nxr-tab-count {
  background: var(--bg-overlay);
  color: var(--text-tertiary);
}

/* ══════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════ */
.nxr-footer {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-16) 0 var(--space-10);
}

.nxr-footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

.nxr-footer-brand-desc {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  margin-top: var(--space-4);
  line-height: 1.8;
  max-width: 280px;
}

.nxr-footer-col-title {
  font-size: var(--text-xs); font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: var(--space-5);
}

.nxr-footer-links { display: flex; flex-direction: column; gap: var(--space-3); }
.nxr-footer-link {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  transition: color var(--dur-fast);
}
.nxr-footer-link:hover { color: var(--brand-secondary); }

.nxr-footer-bottom {
  display: flex; align-items: center;
  justify-content: space-between;
  gap: var(--space-4); flex-wrap: wrap;
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-subtle);
}

.nxr-footer-copy {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

/* ══════════════════════════════════════════════════
   LOADING STATES
   ══════════════════════════════════════════════════ */
.nxr-spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--brand-primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  flex-shrink: 0;
}
.nxr-spinner-lg { width: 40px; height: 40px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

.nxr-skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-elevated) 0%,
    var(--bg-overlay) 50%,
    var(--bg-elevated) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.nxr-empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: var(--space-4);
  padding: var(--space-24) var(--space-6);
  text-align: center;
}
.nxr-empty-icon { font-size: 52px; opacity: 0.35; }
.nxr-empty-title { font-size: var(--text-lg); font-weight: 700; color: var(--text-secondary); }
.nxr-empty-sub   { font-size: var(--text-sm); color: var(--text-tertiary); max-width: 280px; line-height: 1.7; }

/* ══════════════════════════════════════════════════
   DIVIDERS
   ══════════════════════════════════════════════════ */
.nxr-divider { height: 1px; background: var(--border-subtle); margin: var(--space-6) 0; }

/* ══════════════════════════════════════════════════
   GRIDS
   ══════════════════════════════════════════════════ */
.nxr-grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: var(--space-6); }
.nxr-grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--space-6); }
.nxr-grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: var(--space-6); }

.nxr-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-6);
}

/* ══════════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════════ */
@keyframes fadeUp   { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn   { from { opacity:0; } to { opacity:1; } }
@keyframes scaleIn  { from { opacity:0; transform:scale(0.94); } to { opacity:1; transform:scale(1); } }
@keyframes slideInRight { from { opacity:0; transform:translateX(16px); } to { opacity:1; transform:translateX(0); } }

.anim-up   { animation: fadeUp   var(--dur-slow) var(--ease-out) forwards; }
.anim-in   { animation: fadeIn   var(--dur-slow) var(--ease-out) forwards; }
.anim-scale{ animation: scaleIn  var(--dur-slow) var(--ease-spring) forwards; }

.d0  { animation-delay: 0ms;    opacity:0; }
.d1  { animation-delay: 80ms;   opacity:0; }
.d2  { animation-delay: 160ms;  opacity:0; }
.d3  { animation-delay: 240ms;  opacity:0; }
.d4  { animation-delay: 320ms;  opacity:0; }
.d5  { animation-delay: 400ms;  opacity:0; }
.d6  { animation-delay: 480ms;  opacity:0; }

/* ══════════════════════════════════════════════════
   UTILITIES
   ══════════════════════════════════════════════════ */
.pt-nav     { padding-top: var(--nav-height); }
.text-center{ text-align: center; }
.text-start { text-align: start; }
.hidden     { display: none !important; }
.sr-only    { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }

/* ══════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .nxr-grid-4  { grid-template-columns: repeat(2,1fr); }
  .nxr-footer-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  .nxr-grid-3  { grid-template-columns: repeat(2,1fr); }
  .nxr-grid-2  { grid-template-columns: 1fr; }
  .nxr-products-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}
@media (max-width: 640px) {
  .nxr-grid-3, .nxr-grid-4 { grid-template-columns: 1fr; }
  .nxr-products-grid { grid-template-columns: 1fr; }
  .nxr-footer-grid   { grid-template-columns: 1fr; }
  .nxr-modal-footer  { flex-direction: column-reverse; }
  .nxr-modal-footer .nxr-btn { width: 100%; }
  .nxr-toast-wrap    { left: var(--space-4); right: var(--space-4); }
  .nxr-toast         { min-width: unset; max-width: 100%; }
}

/* ══════════════════════════════════════════════════
   ACCESSIBILITY & COMPATIBILITY
   ══════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
@media print { .nxr-nav, .nxr-footer, .nxr-toast-wrap { display: none; } }

/* ══════════════════════════════════════════════════
   NAV ICON BUTTON & BADGE
   ══════════════════════════════════════════════════ */
.nxr-nav-icon-btn {
  position: relative;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  transition: all var(--dur-fast);
  cursor: pointer;
  flex-shrink: 0;
}
.nxr-nav-icon-btn:hover {
  background: var(--bg-overlay);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.nxr-nav-badge {
  position: absolute;
  top: -5px; inset-inline-end: -5px;
  min-width: 17px; height: 17px; padding: 0 4px;
  background: var(--brand-primary);
  color: white;
  border-radius: var(--radius-full);
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
  box-shadow: 0 0 0 2px var(--bg-base);
  pointer-events: none;
}

/* ══════════════════════════════════════════════════
   WISHLIST BUTTON ON CARD
   ══════════════════════════════════════════════════ */
.nxr-wish-btn {
  position: absolute;
  top: var(--space-3); inset-inline-end: var(--space-3);
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full);
  background: rgba(8,12,20,0.7);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--dur-fast);
  z-index: 2;
  flex-shrink: 0;
}
.nxr-wish-btn:hover { color: var(--color-rose); border-color: rgba(244,63,94,0.3); }
.nxr-wish-btn.wished { color: var(--color-rose); border-color: rgba(244,63,94,0.35); background: rgba(244,63,94,0.12); }

[data-theme="light"] .nxr-wish-btn {
  background: rgba(255,255,255,0.82);
  border-color: rgba(0,0,0,0.08);
}

/* ══════════════════════════════════════════════════
   SORT SELECT
   ══════════════════════════════════════════════════ */
.nxr-sort-wrap {
  position: relative;
  flex-shrink: 0;
}
.nxr-sort-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  padding: 9px 36px 9px 14px;
  font-size: var(--text-sm); font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  outline: none;
  font-family: inherit;
  transition: all var(--dur-fast);
  min-width: 160px;
}
body[dir="rtl"] .nxr-sort-select { padding: 9px 14px 9px 36px; }
.nxr-sort-select:focus {
  border-color: var(--brand-primary);
  color: var(--text-primary);
  box-shadow: 0 0 0 3px var(--brand-glow);
}
.nxr-sort-icon {
  position: absolute; top: 50%; transform: translateY(-50%);
  inset-inline-end: 12px;
  pointer-events: none;
  color: var(--text-tertiary);
  display: flex; align-items: center;
}

/* ══════════════════════════════════════════════════
   VIEW TOGGLE (Grid/List)
   ══════════════════════════════════════════════════ */
.nxr-view-toggle {
  display: flex;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 3px; gap: 2px;
  flex-shrink: 0;
}
.nxr-view-btn {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-xs);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--dur-fast);
}
.nxr-view-btn.active {
  background: var(--brand-primary);
  color: white;
  box-shadow: 0 1px 6px rgba(99,102,241,0.4);
}
.nxr-view-btn:hover:not(.active) { color: var(--text-secondary); background: var(--bg-overlay); }

/* List View */
.nxr-products-list {
  display: flex; flex-direction: column; gap: var(--space-4);
}
.nxr-products-list .nxr-product-card {
  flex-direction: row;
  border-radius: var(--radius-lg);
}
.nxr-products-list .nxr-product-img {
  width: 180px; min-width: 180px;
  aspect-ratio: auto;
  height: 120px;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}
body[dir="rtl"] .nxr-products-list .nxr-product-img {
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}
.nxr-products-list .nxr-product-body { flex: 1; padding: var(--space-4); gap: var(--space-2); }
.nxr-products-list .nxr-product-footer { flex-direction: column; justify-content: center; padding: var(--space-4); gap: var(--space-3); min-width: 140px; }
.nxr-products-list .nxr-product-desc { -webkit-line-clamp: 2; }
@media (max-width: 640px) {
  .nxr-products-list .nxr-product-card { flex-direction: column; }
  .nxr-products-list .nxr-product-img { width: 100%; min-width: 0; height: auto; aspect-ratio: 16/9; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
}

/* ══════════════════════════════════════════════════
   DRAWER (Cart & Wishlist)
   ══════════════════════════════════════════════════ */
#nxr-cart-drawer,
#nxr-wish-drawer {
  position: fixed; inset: 0;
  z-index: 1200;
  display: flex;
  visibility: hidden;
}
#nxr-cart-drawer.open,
#nxr-wish-drawer.open {
  visibility: visible;
}

.nxr-drawer-overlay {
  position: absolute; inset: 0;
  background: rgba(4,6,12,0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity var(--dur-slow) var(--ease-in-out);
}
#nxr-cart-drawer.open .nxr-drawer-overlay,
#nxr-wish-drawer.open .nxr-drawer-overlay { opacity: 1; }

.nxr-drawer-panel {
  position: absolute;
  top: 0; bottom: 0;
  inset-inline-end: 0;
  width: min(420px, 100vw);
  background: var(--bg-surface);
  border-inline-start: 1px solid var(--border-default);
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-2xl);
  transform: translateX(100%);
  transition: transform var(--dur-slow) var(--ease-in-out);
  overflow: hidden;
}
body[dir="rtl"] .nxr-drawer-panel {
  inset-inline-end: 0;
  transform: translateX(-100%);
}
#nxr-cart-drawer.open .nxr-drawer-panel,
#nxr-wish-drawer.open .nxr-drawer-panel {
  transform: translateX(0);
}

.nxr-drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  background: var(--bg-elevated);
}
.nxr-drawer-title {
  font-size: var(--text-base); font-weight: 700;
  color: var(--text-primary);
}
.nxr-drawer-close {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  background: var(--bg-overlay);
  border: 1px solid var(--border-default);
  cursor: pointer;
  transition: all var(--dur-fast);
}
.nxr-drawer-close:hover { color: var(--text-primary); border-color: var(--border-strong); }

.nxr-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4) var(--space-5);
  display: flex; flex-direction: column; gap: var(--space-3);
}

.nxr-drawer-footer {
  padding: var(--space-5) var(--space-6);
  border-top: 1px solid var(--border-subtle);
  display: flex; flex-direction: column; gap: var(--space-3);
  background: var(--bg-elevated);
  flex-shrink: 0;
}

.nxr-drawer-empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: var(--space-5); text-align: center;
  padding: var(--space-20) var(--space-6);
  flex: 1;
}
.nxr-drawer-empty-title {
  font-size: var(--text-base); font-weight: 600;
  color: var(--text-tertiary);
}

/* ── Cart Item ── */
.nxr-cart-item {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-4);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: border-color var(--dur-fast);
}
.nxr-cart-item:hover { border-color: var(--border-default); }

.nxr-cart-item-img {
  width: 56px; height: 56px; flex-shrink: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-elevated);
  display: flex; align-items: center; justify-content: center;
}
.nxr-cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.nxr-cart-item-initial {
  font-size: 22px; font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; opacity: 0.6;
}

.nxr-cart-item-info { flex: 1; min-width: 0; }
.nxr-cart-item-name {
  font-size: var(--text-sm); font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 4px;
}
.nxr-cart-item-price {
  font-size: var(--text-sm); font-weight: 700;
  color: var(--brand-secondary);
}

.nxr-cart-item-controls {
  display: flex; align-items: center; gap: var(--space-2);
  flex-shrink: 0;
}
.nxr-qty-btn {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-xs);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--dur-fast);
}
.nxr-qty-btn:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.nxr-qty-val {
  font-size: var(--text-sm); font-weight: 700;
  color: var(--text-primary); min-width: 18px; text-align: center;
}
.nxr-cart-remove {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-xs);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--dur-fast);
  border: 1px solid transparent;
}
.nxr-cart-remove:hover { color: var(--color-rose); border-color: rgba(244,63,94,0.25); background: rgba(244,63,94,0.06); }

.nxr-cart-total {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}
