/* ═══════════════════════════════════════════════════════════════
   NEXORA App — Extended Styles
   Cross-browser & Mobile-first
   ═══════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════
   APP SHELL
   ══════════════════════════════════════════════════ */
.nxr-app {
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--font-sans-ar);
}
.nxr-app[dir="ltr"] {
  font-family: var(--font-sans-en);
}

/* ══════════════════════════════════════════════════
   BACKGROUND ORBS
   ══════════════════════════════════════════════════ */
.nxr-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  -webkit-filter: blur(80px);
}
.nxr-orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(99,102,241,0.14) 0%, transparent 70%);
  top: -200px; right: -100px;
}
.nxr-orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(139,92,246,0.10) 0%, transparent 70%);
  bottom: -100px; left: -100px;
}
.nxr-orb-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(6,182,212,0.08) 0%, transparent 70%);
  top: 40%; left: 50%; -webkit-transform: translateX(-50%); transform: translateX(-50%);
}

/* ══════════════════════════════════════════════════
   SECTIONS
   ══════════════════════════════════════════════════ */
.nxr-section {
  padding: 96px 0;
  position: relative;
  overflow: hidden;
}
@media (max-width: 768px) { .nxr-section { padding: 64px 0; } }
@media (max-width: 480px) { .nxr-section { padding: 48px 0; } }

/* ══════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  padding: 80px 0 60px;
  overflow: hidden;
  background: var(--bg-base);
  background-image: var(--gradient-mesh);
}

.hero-grid {
  display: -ms-grid; display: grid;
  -ms-grid-columns: 1fr 48px 1fr; grid-template-columns: 1fr 1fr;
  gap: 48px;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  min-height: 70vh;
}

.hero-eyebrow {
  display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--brand-subtle);
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: 9999px;
  font-size: 11px; font-weight: 700;
  color: var(--brand-secondary);
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  margin-bottom: 20px;
}

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

.hero-sub {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 520px;
  margin-bottom: 36px;
}

.hero-actions {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -ms-flex-wrap: wrap; flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
}

.hero-stats {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  gap: 32px;
  -ms-flex-wrap: wrap; flex-wrap: wrap;
  padding-top: 32px;
  border-top: 1px solid var(--border-subtle);
}

.hero-stat-val {
  font-size: 28px; font-weight: 800;
  color: var(--brand-secondary);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 4px;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  gap: 4px;
}

.hero-stat-lbl {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* Hero Visual */
.hero-visual {
  position: relative;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
  -ms-flex-direction: column; flex-direction: column;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  justify-items: center;
}

.hero-glow {
  position: absolute;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(99,102,241,0.22) 0%, transparent 70%);
  border-radius: 50%;
  top: 50%; left: 50%;
  -webkit-transform: translate(-50%,-50%);
  transform: translate(-50%,-50%);
  pointer-events: none;
  -webkit-filter: blur(40px);
  filter: blur(40px);
}

.hero-card-slider {
  width: 100%;
  max-width: 320px;
  overflow: hidden;
  border-radius: 20px;
  position: relative;
}

.hero-card-track {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  gap: 14px;
  -webkit-transition: -webkit-transform 0.5s cubic-bezier(0.25,0.46,0.45,0.94);
  transition: transform 0.5s cubic-bezier(0.25,0.46,0.45,0.94);
  will-change: transform;
}

.hero-card-dots {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  gap: 6px;
  margin-top: 16px;
}

.hcdot {
  width: 6px; height: 6px;
  border-radius: 9999px;
  background: var(--border-strong);
  -webkit-transition: all 0.3s; transition: all 0.3s;
  border: none;
  cursor: pointer;
  padding: 0;
}
.hcdot.active {
  width: 20px;
  background: var(--brand-primary);
  -webkit-box-shadow: 0 0 8px rgba(99,102,241,0.5);
  box-shadow: 0 0 8px rgba(99,102,241,0.5);
}

/* Responsive Hero */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    -ms-grid-columns: 1fr;
    gap: 40px;
    min-height: auto;
    text-align: center;
  }
  .hero-sub { max-width: 100%; }
  .hero-actions { -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; }
  .hero-stats { -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; }
  .hero-visual { order: -1; }
}
@media (max-width: 480px) {
  .hero { padding: 80px 0 40px; }
  .hero-stats { gap: 20px; }
  .hero-stat-val { font-size: 22px; }
}

/* ══════════════════════════════════════════════════
   STATS STRIP
   ══════════════════════════════════════════════════ */
.stats-strip {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 32px 0;
}

.stats-strip-grid {
  display: -ms-grid; display: grid;
  -ms-grid-columns: 1fr 1fr 1fr 1fr; grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stats-strip-val {
  font-size: 36px; font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 6px;
}

.stats-strip-lbl {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 500;
}

@media (max-width: 768px) {
  .stats-strip-grid { grid-template-columns: repeat(2, 1fr); -ms-grid-columns: 1fr 1fr; }
  .stats-strip-val { font-size: 28px; }
}
@media (max-width: 480px) {
  .stats-strip-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .stats-strip-val { font-size: 24px; }
}

/* ══════════════════════════════════════════════════
   PRODUCTS SECTION TOOLBAR
   ══════════════════════════════════════════════════ */
.nxr-products-toolbar {
  margin-bottom: 32px;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
  -ms-flex-direction: column; flex-direction: column;
  gap: 16px;
}

.nxr-category-tabs {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -ms-flex-wrap: wrap; flex-wrap: wrap;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 4px;
}
.nxr-category-tabs::-webkit-scrollbar { display: none; }

.nxr-products-controls {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -ms-flex-wrap: wrap; flex-wrap: wrap;
  gap: 10px;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
}

.nxr-search-wrap {
  position: relative;
  -webkit-box-flex: 1; -ms-flex: 1; flex: 1;
  min-width: 200px;
}

.nxr-search-icon {
  position: absolute;
  top: 50%; -webkit-transform: translateY(-50%); transform: translateY(-50%);
  inset-inline-start: 12px;
  color: var(--text-tertiary);
  pointer-events: none;
}

.nxr-search {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: 9999px;
  padding: 9px 13px 9px 38px;
  font-size: 14px;
  color: var(--text-primary);
  -webkit-transition: border-color 0.15s, -webkit-box-shadow 0.15s;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}
body[dir="rtl"] .nxr-search { padding: 9px 38px 9px 13px; }
.nxr-search::-webkit-search-cancel-button { display: none; }
.nxr-search::placeholder { color: var(--text-tertiary); }
.nxr-search:focus {
  border-color: var(--brand-primary);
  -webkit-box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

@media (max-width: 600px) {
  .nxr-products-controls { -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; }
  .nxr-search-wrap { min-width: 100%; }
}

/* ══════════════════════════════════════════════════
   PRODUCT CARD — CUSTOM FIELDS
   ══════════════════════════════════════════════════ */
.nxr-product-name {
  font-size: 16px; font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

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

.nxr-product-meta {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-tertiary);
}

.nxr-product-views {
  display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  gap: 4px;
}

.nxr-product-price {
  font-size: 18px; font-weight: 800;
  color: var(--brand-secondary);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.nxr-product-actions {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  gap: 6px;
  -ms-flex-wrap: wrap; flex-wrap: wrap;
}

/* ── Cart Image ── */
.nxr-cart-img {
  width: 56px; height: 56px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-elevated);
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  -webkit-box-flex: 0; -ms-flex-negative: 0; flex-shrink: 0;
  font-weight: 700; font-size: 20px;
  color: var(--brand-primary);
}
.nxr-cart-img img { width: 100%; height: 100%; object-fit: cover; }
.nxr-cart-img-placeholder {
  width: 100%; height: 100%;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  background: var(--bg-elevated);
  color: var(--brand-primary);
  font-size: 20px; font-weight: 800;
}

/* ══════════════════════════════════════════════════
   MODAL OVERLAY (Custom — replaces backdrop)
   ══════════════════════════════════════════════════ */
.nxr-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(4,7,15,0.72);
  z-index: 2000;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  padding: 16px;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  -webkit-animation: fadeIn 0.2s ease-out;
  animation: fadeIn 0.2s ease-out;
  overflow-y: auto;
}

.nxr-modal-overlay .nxr-modal {
  position: relative;
  width: 100%; max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  -webkit-animation: scaleIn 0.25s cubic-bezier(0.34,1.56,0.64,1);
  animation: scaleIn 0.25s cubic-bezier(0.34,1.56,0.64,1);
  -webkit-overflow-scrolling: touch;
}

.nxr-modal-overlay .nxr-modal-header {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start;
  -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  border-radius: 24px 24px 0 0;
  position: -webkit-sticky; position: sticky;
  top: 0; z-index: 1;
}

.nxr-form-grid {
  display: -ms-grid; display: grid;
  -ms-grid-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 520px) {
  .nxr-form-grid { grid-template-columns: 1fr; -ms-grid-columns: 1fr; }
}

.nxr-field {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
  -ms-flex-direction: column; flex-direction: column;
  gap: 5px;
}

.nxr-modal-overlay form {
  padding: 20px 24px;
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
  -ms-flex-direction: column; flex-direction: column;
  gap: 0;
}

.nxr-modal-overlay .nxr-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  display: -webkit-box; display: -ms-flexbox; display: flex;
  gap: 10px;
  -webkit-box-pack: end; -ms-flex-pack: end; justify-content: flex-end;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
}
body[dir="rtl"] .nxr-modal-overlay .nxr-modal-footer {
  -webkit-box-pack: start; -ms-flex-pack: start; justify-content: flex-start;
}

@media (max-width: 480px) {
  .nxr-modal-overlay { padding: 0; -webkit-box-align: end; -ms-flex-align: end; align-items: flex-end; }
  .nxr-modal-overlay .nxr-modal { max-height: 95vh; border-radius: 20px 20px 0 0; max-width: 100%; }
  .nxr-modal-overlay .nxr-modal-footer { -webkit-box-orient: vertical; -webkit-box-direction: reverse; -ms-flex-direction: column-reverse; flex-direction: column-reverse; }
  .nxr-modal-overlay .nxr-modal-footer .nxr-btn { width: 100%; }
}

/* ══════════════════════════════════════════════════
   CART DRAWER (Class-based, RTL aware)
   ══════════════════════════════════════════════════ */
.nxr-overlay {
  position: fixed; inset: 0;
  background: rgba(4,6,12,0.6);
  z-index: 1199;
  opacity: 0; pointer-events: none;
  -webkit-transition: opacity 0.3s; transition: opacity 0.3s;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.nxr-overlay.open { opacity: 1; pointer-events: all; }

/* Drawer — LTR: slides from right */
.nxr-drawer {
  position: fixed;
  top: 0; bottom: 0; right: 0;
  width: min(420px, 100vw);
  background: var(--bg-surface);
  border-left: 1px solid var(--border-default);
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal;
  -ms-flex-direction: column; flex-direction: column;
  -webkit-box-shadow: var(--shadow-2xl); box-shadow: var(--shadow-2xl);
  z-index: 1200;
  -webkit-transform: translateX(100%); transform: translateX(100%);
  -webkit-transition: -webkit-transform 0.35s cubic-bezier(0.25,0.46,0.45,0.94);
  transition: transform 0.35s cubic-bezier(0.25,0.46,0.45,0.94);
  overflow: hidden;
}
/* Drawer — RTL: slides from left */
[dir="rtl"] .nxr-drawer {
  right: auto; left: 0;
  border-left: none;
  border-right: 1px solid var(--border-default);
  -webkit-transform: translateX(-100%); transform: translateX(-100%);
}
.nxr-drawer.open {
  -webkit-transform: translateX(0); transform: translateX(0);
}

.nxr-drawer-header {
  display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  -webkit-box-flex: 0; -ms-flex-negative: 0; flex-shrink: 0;
  background: var(--bg-elevated);
}

.nxr-drawer-body {
  -webkit-box-flex: 1; -ms-flex: 1; flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 20px;
}

.nxr-drawer-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border-subtle);
  -webkit-box-flex: 0; -ms-flex-negative: 0; flex-shrink: 0;
  background: var(--bg-elevated);
}

/* ══════════════════════════════════════════════════
   CTA SECTION
   ══════════════════════════════════════════════════ */
.nxr-cta-section {
  padding: 96px 0;
  position: relative;
  overflow: hidden;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-subtle);
}

.nxr-cta-inner {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
  position: relative; z-index: 1;
}

.nxr-cta-title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.nxr-cta-sub {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 40px;
}

.nxr-cta-actions {
  display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex;
  -ms-flex-wrap: wrap; flex-wrap: wrap;
  gap: 12px;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
}

@media (max-width: 480px) {
  .nxr-cta-section { padding: 60px 0; }
  .nxr-cta-actions { -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; width: 100%; }
  .nxr-cta-actions .nxr-btn { width: 100%; }
}

/* ══════════════════════════════════════════════════
   BADGE ALIASES
   ══════════════════════════════════════════════════ */
.nxr-badge-danger  { background: rgba(244,63,94,0.1); color: #F43F5E; border: 1px solid rgba(244,63,94,0.2); }
.nxr-badge-success { background: rgba(16,185,129,0.1); color: #10B981; border: 1px solid rgba(16,185,129,0.2); }
.nxr-badge-purple  { background: rgba(139,92,246,0.12); color: #8B5CF6; border: 1px solid rgba(139,92,246,0.25); }
.nxr-badge-gold    { background: rgba(245,158,11,0.12); color: #F59E0B; border: 1px solid rgba(245,158,11,0.25); }

/* ══════════════════════════════════════════════════
   FOOTER RESPONSIVE
   ══════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .nxr-footer-grid { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 480px) {
  .nxr-footer-grid { grid-template-columns: 1fr !important; gap: 32px !important; }
}

/* ══════════════════════════════════════════════════
   MOBILE NAV RESPONSIVE
   ══════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .nxr-mobile-nav-footer {
    -ms-flex-wrap: wrap; flex-wrap: wrap;
    gap: 8px;
  }
}

/* ══════════════════════════════════════════════════
   LANGUAGE: LTR (English) overrides
   ══════════════════════════════════════════════════ */
[dir="ltr"] .nxr-section-header,
[dir="ltr"] .nxr-cta-inner {
  text-align: center;
}
[dir="ltr"] .nxr-select {
  background-position: right 13px center;
  padding-right: 34px;
  padding-left: 13px;
}

/* ══════════════════════════════════════════════════
   KEYFRAMES
   ══════════════════════════════════════════════════ */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; -webkit-transform: scale(0.93) translateY(12px); transform: scale(0.93) translateY(12px); }
  to   { opacity: 1; -webkit-transform: scale(1) translateY(0);      transform: scale(1) translateY(0); }
}
@keyframes spin {
  to { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}

/* ══════════════════════════════════════════════════
   CROSS-BROWSER FIXES
   ══════════════════════════════════════════════════ */

/* Firefox scrollbar */
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.12) transparent; }

/* IE11 flex gap fallback */
@supports not (gap: 10px) {
  .nxr-nav-actions > * + * { margin-inline-start: 8px; }
  .hero-actions > * + *    { margin-inline-start: 12px; }
}

/* Safe area (iOS notch) */
@supports (padding: env(safe-area-inset-bottom)) {
  .nxr-drawer-footer {
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }
  .nxr-mobile-nav {
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }
}

/* Backdrop filter fallback */
@supports not (backdrop-filter: blur(1px)) {
  .nxr-nav.scrolled::before { background: rgba(8,12,20,0.96) !important; }
  .nxr-modal-overlay { background: rgba(4,7,15,0.92) !important; }
  .nxr-overlay { background: rgba(4,6,12,0.85) !important; }
}

/* Touch target minimum */
@media (pointer: coarse) {
  .nxr-btn-sm { min-height: 40px; }
  .nxr-tab    { min-height: 40px; }
  .nxr-nav-link { min-height: 44px; display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; }
}

/* High contrast mode */
@media (forced-colors: active) {
  .nxr-btn-primary { border: 2px solid ButtonText; }
  .nxr-badge { border: 1px solid ButtonText; }
}

/* ══════════════════════════════════════════════════
   SMALL SCREEN (≤360px) — ultra-small phones
   ══════════════════════════════════════════════════ */
@media (max-width: 360px) {
  .nxr-container { padding: 0 12px; }
  .hero-title { font-size: 28px; }
  .nxr-section-title { font-size: 24px; }
  .stats-strip-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stats-strip-val { font-size: 20px; }
  .nxr-btn-lg { padding: 10px 18px; font-size: 14px; }
  .nxr-tab { padding: 6px 10px; font-size: 12px; }
}

/* ══════════════════════════════════════════════════
   NAVBAR ICON BUTTONS (Cart / Wishlist)
   ══════════════════════════════════════════════════ */
.nxr-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--dur-fast);
  flex-shrink: 0;
}

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

.nxr-icon-btn-wish { color: var(--color-rose); border-color: rgba(244,63,94,0.22); background: rgba(244,63,94,0.06); }
.nxr-icon-btn-wish:hover { background: rgba(244,63,94,0.12); border-color: rgba(244,63,94,0.35); }
.nxr-icon-btn-cart { color: var(--brand-primary); border-color: rgba(99,102,241,0.22); background: rgba(99,102,241,0.06); }
.nxr-icon-btn-cart:hover { background: rgba(99,102,241,0.12); border-color: rgba(99,102,241,0.35); }

.nxr-icon-badge {
  position: absolute;
  top: -6px;
  inset-inline-end: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9999px;
  color: white;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 2px solid var(--bg-surface);
  animation: scaleIn 0.2s var(--ease-spring);
}

/* ══════════════════════════════════════════════════
   STATS STRIP — Enhanced Icons Layout
   ══════════════════════════════════════════════════ */
.stats-strip-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
}

/* ══════════════════════════════════════════════════
   COMMAND BAR (Unified Search + Filter)
   ══════════════════════════════════════════════════ */
.nxr-cmd-bar {
  margin-bottom: 36px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  position: relative;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}

.nxr-cmd-bar:focus-within {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg), 0 0 0 3px var(--brand-glow);
}

.nxr-cmd-row {
  display: flex;
  align-items: center;
  height: 54px;
  padding: 0 6px 0 0;
  gap: 0;
}

/* Search area */
.nxr-cmd-search-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  height: 100%;
  cursor: text;
  min-width: 0;
}

.nxr-cmd-search-icon {
  color: var(--text-tertiary);
  flex-shrink: 0;
  transition: color var(--dur-fast);
}

.nxr-cmd-search-wrap:focus-within .nxr-cmd-search-icon {
  color: var(--brand-primary);
}

.nxr-cmd-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  outline: none;
  font-family: inherit;
  min-width: 0;
  -webkit-appearance: none;
  appearance: none;
}

.nxr-cmd-input::placeholder {
  color: var(--text-tertiary);
  font-weight: 400;
}

.nxr-cmd-input::-webkit-search-cancel-button { display: none; }

.nxr-cmd-clear {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--dur-fast);
  flex-shrink: 0;
}

.nxr-cmd-clear:hover {
  background: var(--bg-overlay);
  color: var(--text-primary);
}

.nxr-cmd-kbd {
  display: inline-flex; align-items: center;
  padding: 2px 7px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  font-size: 11px; font-weight: 600;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  flex-shrink: 0;
  white-space: nowrap;
}

/* Vertical divider */
.nxr-cmd-divider {
  width: 1px;
  height: 28px;
  background: var(--border-default);
  flex-shrink: 0;
  margin: 0 4px;
}

/* Filter button */
.nxr-cmd-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid var(--border-default);
  font-size: 13px; font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--dur-fast);
  white-space: nowrap;
  flex-shrink: 0;
  font-family: inherit;
  margin-inline-end: 4px;
}

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

.nxr-cmd-btn.active {
  background: var(--brand-subtle);
  border-color: rgba(99,102,241,0.3);
  color: var(--brand-primary);
}

.nxr-cmd-btn.has-filters {
  border-color: rgba(99,102,241,0.3);
  color: var(--brand-primary);
}

.nxr-cmd-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: rgba(99,102,241,0.15);
  color: var(--brand-primary);
  border-radius: var(--radius-full);
  font-size: 10px; font-weight: 700;
  line-height: 1;
}

/* View toggle */
.nxr-cmd-view {
  display: flex;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 2px; gap: 1px;
  flex-shrink: 0;
  margin-inline-start: 4px;
  margin-inline-end: 4px;
}

.nxr-cmd-view-btn {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  color: var(--text-tertiary);
  cursor: pointer;
  border: none;
  background: transparent;
  transition: all var(--dur-fast);
}

.nxr-cmd-view-btn.active {
  background: var(--bg-surface);
  color: var(--brand-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.nxr-cmd-view-btn:hover:not(.active) {
  color: var(--text-secondary);
}

/* ── Filter Panel (Animated Slide Down) ── */
.nxr-filter-panel {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity    0.25s ease;
  opacity: 0;
}

.nxr-filter-panel.open {
  max-height: 480px;
  opacity: 1;
}

.nxr-filter-panel-inner {
  padding: 20px 20px 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.nxr-filter-group {}

.nxr-filter-group-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

/* Category Pills — 3 per row grid */
.nxr-filter-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.nxr-filter-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--dur-fast);
  font-family: inherit;
  text-align: start;
  white-space: nowrap;
  overflow: hidden;
}

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

.nxr-filter-pill.active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: white;
  font-weight: 700;
}

.nxr-filter-pill-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  background: var(--bg-overlay);
  color: var(--text-tertiary);
  flex-shrink: 0;
  line-height: 1;
}

.nxr-filter-pill.active .nxr-filter-pill-count {
  background: rgba(255,255,255,0.25);
  color: white;
}

@media (max-width: 640px) {
  .nxr-filter-pills { grid-template-columns: repeat(2, 1fr); }
}

/* Separator */
.nxr-filter-sep {
  height: 1px;
  background: var(--border-subtle);
}

/* Sort Options Grid */
.nxr-filter-sort-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 6px;
}

.nxr-filter-sort-opt {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--dur-fast);
  font-family: inherit;
  text-align: start;
}

.nxr-filter-sort-opt:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
  background: var(--bg-overlay);
}

.nxr-filter-sort-opt.active {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: var(--brand-subtle);
  font-weight: 600;
}

.nxr-filter-sort-radio {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all var(--dur-fast);
  color: white;
}

.nxr-filter-sort-opt.active .nxr-filter-sort-radio {
  border-color: var(--brand-primary);
  background: var(--brand-primary);
}

/* Panel Footer */
.nxr-filter-panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}

.nxr-filter-reset {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-tertiary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  transition: color var(--dur-fast);
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: transparent;
}

.nxr-filter-reset:hover:not(:disabled) {
  color: var(--color-rose);
  text-decoration-color: var(--color-rose);
}

.nxr-filter-reset:disabled {
  opacity: 0.4;
  cursor: default;
}

/* ── Active Chips Row ── */
.nxr-active-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 16px 12px;
  border-top: 1px solid var(--border-subtle);
  animation: fadeUp 0.2s ease-out both;
}

.nxr-active-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.nxr-active-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px 5px 12px;
  background: var(--brand-primary);
  border: 1px solid var(--brand-primary);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: white;
  animation: scaleIn 0.15s var(--ease-spring);
}

.nxr-active-chip-x {
  display: flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  color: white;
  cursor: pointer;
  border: none;
  transition: all var(--dur-fast);
  flex-shrink: 0;
}

.nxr-active-chip-x:hover {
  background: rgba(255,255,255,0.35);
}

.nxr-active-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nxr-results-count {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 500;
  white-space: nowrap;
}

.nxr-results-count strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* Responsive */
@media (max-width: 640px) {
  .nxr-cmd-kbd   { display: none; }
  .nxr-cmd-row   { height: 50px; }
  .nxr-filter-panel-inner { padding: 14px 12px 12px; gap: 14px; }
  .nxr-filter-sort-grid { grid-template-columns: 1fr 1fr; }
  .nxr-filter-pill { padding: 6px 6px; font-size: 12px; }
  .nxr-active-row { flex-direction: column; align-items: flex-start; }
  .nxr-active-meta { width: 100%; justify-content: space-between; }
}

@media (max-width: 400px) {
  .nxr-filter-sort-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════
   SEARCH CLEAR BUTTON
   ══════════════════════════════════════════════════ */
.nxr-search-clear-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  inset-inline-end: 10px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-overlay);
  border: 1px solid var(--border-subtle);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--dur-fast);
}

.nxr-search-clear-btn:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-default);
}

/* ══════════════════════════════════════════════════
   TOOLBAR META ROW (Results + Chips)
   ══════════════════════════════════════════════════ */
.nxr-toolbar-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  animation: fadeUp 0.25s ease-out both;
}

.nxr-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.nxr-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 12px;
  background: rgba(99,102,241,0.10);
  border: 1px solid rgba(99,102,241,0.22);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-secondary);
  transition: all var(--dur-fast);
}

.nxr-chip-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(99,102,241,0.15);
  color: var(--brand-secondary);
  cursor: pointer;
  transition: all var(--dur-fast);
  border: none;
  flex-shrink: 0;
}

.nxr-chip-remove:hover {
  background: rgba(99,102,241,0.3);
  color: white;
}

.nxr-results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.nxr-results-count {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.nxr-results-count strong {
  color: var(--text-primary);
  font-weight: 700;
}

.nxr-clear-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: white;
  background: var(--color-rose);
  border: 1px solid var(--color-rose);
  cursor: pointer;
  transition: all var(--dur-fast);
  font-family: inherit;
  white-space: nowrap;
}

.nxr-clear-all-btn:hover {
  background: #e11d48;
  border-color: #e11d48;
  box-shadow: 0 2px 8px rgba(244,63,94,0.35);
}

/* ══════════════════════════════════════════════════
   CLICKABLE TAG BUTTONS
   ══════════════════════════════════════════════════ */
.nxr-tag-btn {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  background: var(--bg-badge);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--dur-fast);
  white-space: nowrap;
  font-family: inherit;
}

.nxr-tag-btn:hover,
.nxr-tag-btn.active {
  background: rgba(99,102,241,0.10);
  border-color: rgba(99,102,241,0.22);
  color: var(--brand-secondary);
}

/* ══════════════════════════════════════════════════
   PRODUCT CARD ENTRANCE ANIMATION
   ══════════════════════════════════════════════════ */
@keyframes cardEnter {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.nxr-card-enter {
  animation: cardEnter 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.nxr-grid-animated,
.nxr-list-animated {
  animation: fadeIn 0.2s ease-out both;
}

/* ══════════════════════════════════════════════════
   ABOUT CARDS — Professional
   ══════════════════════════════════════════════════ */
.nxr-about-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 28px;
  transition: all var(--dur-slow) var(--ease-in-out);
  position: relative;
  overflow: hidden;
}

.nxr-about-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient-brand);
  opacity: 0;
  transition: opacity var(--dur-slow);
}

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

.nxr-about-card:hover::before {
  opacity: 1;
}

/* ══════════════════════════════════════════════════
   SECTION HEADER — Unified Style
   ══════════════════════════════════════════════════ */
.nxr-section-header {
  text-align: center;
  margin-bottom: 48px;
}

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

.nxr-section-title {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.nxr-section-sub {
  font-size: clamp(14px, 1.8vw, 17px);
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 580px;
  margin: 0 auto;
}

/* ══════════════════════════════════════════════════
   MODAL TITLE & CLOSE
   ══════════════════════════════════════════════════ */
.nxr-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

/* ══════════════════════════════════════════════════
   LIGHT MODE — scrollbar
   ══════════════════════════════════════════════════ */
[data-theme="light"] * {
  scrollbar-color: rgba(0,0,0,0.15) transparent;
}
