/* ============================================================
   eVehicle — NX DESIGN SYSTEM (core)
   The new storefront shell, loaded on every page:
   tokens, buttons, header, mega menu, drawers, search,
   mini-cart, product card, footer and scroll reveals.
   Prefix: nx-  (keeps it clear of the legacy ev-* styles in
   common.css, which older page templates still use).
   Breakpoints follow the theme standard: 1024 / 768 / 600 / 480.
   ============================================================ */

:root {
  --nx-ink:          #050d0a;
  --nx-ink-2:        #0a1612;
  --nx-ink-3:        #10201a;
  --nx-ink-4:        #183029;
  --nx-emerald:      #00c896;
  --nx-emerald-600:  #00a57c;
  --nx-emerald-700:  #007a5c;
  --nx-mint:         #7dffd6;
  --nx-volt:         #d9ff4a;

  --nx-bg:           #f3f6f4;
  --nx-surface:      #ffffff;
  --nx-text:         #0a1411;
  --nx-muted:        #56675f;
  --nx-line:         #e1e9e4;

  --nx-on-dark:        #eaf4f0;
  --nx-on-dark-muted:  rgba(234, 244, 240, .64);
  --nx-line-dark:      rgba(255, 255, 255, .09);

  --nx-r-sm: 10px;
  --nx-r:    16px;
  --nx-r-lg: 24px;
  --nx-r-xl: 32px;

  --nx-shadow:    0 12px 32px -14px rgba(5, 13, 10, .28);
  --nx-shadow-lg: 0 32px 64px -24px rgba(5, 13, 10, .42);

  --nx-font-display: 'Sora', 'Inter', system-ui, sans-serif;
  --nx-font:         'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --nx-ease:         cubic-bezier(.2, .8, .2, 1);
  --nx-container:    1320px;
}

/* Fallback until JS measures the real header (topbar + header). */
body.nx-shell { --header-height: 108px; }
@media (max-width: 600px) { body.nx-shell { --header-height: 98px; } }

body.nx-lock { overflow: hidden; }

.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
  position: absolute !important; word-wrap: normal !important;
}

.nx-container {
  width: 100%;
  max-width: var(--nx-container);
  margin-inline: auto;
  padding-inline: 24px;
}
@media (max-width: 768px) { .nx-container { padding-inline: 16px; } }

.nx-skip {
  position: fixed; top: 12px; left: 12px; z-index: 2000;
  padding: 10px 16px; border-radius: 999px;
  background: var(--nx-emerald); color: var(--nx-ink); font: 600 .9rem var(--nx-font);
  transform: translateY(-160%); transition: transform .25s var(--nx-ease);
}
.nx-skip:focus { transform: none; }

:where(.nx-header-wrap, .nx-drawer, .nx-cart-drawer, .nx-search, .nx-footer, .nx-page) :focus-visible {
  outline: 2px solid var(--nx-emerald);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ============================================================
   TYPOGRAPHY HELPERS
   ============================================================ */
.nx-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 .74rem/1 var(--nx-font);
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--nx-emerald-700);
}
.nx-eyebrow::before {
  content: ''; width: 20px; height: 2px; border-radius: 2px; background: currentColor;
}
.nx-on-dark .nx-eyebrow, .nx-eyebrow.is-light { color: var(--nx-emerald); }

.nx-h2 {
  font: 700 clamp(1.9rem, 3.6vw, 3.1rem)/1.04 var(--nx-font-display);
  letter-spacing: -.04em;
  color: var(--nx-text);
  margin: 14px 0 0;
}
.nx-on-dark .nx-h2 { color: #fff; }
.nx-h2 em { font-style: normal; color: var(--nx-emerald-600); }
.nx-on-dark .nx-h2 em { color: var(--nx-emerald); }

.nx-lead {
  font: 400 1.04rem/1.7 var(--nx-font);
  color: var(--nx-muted);
  max-width: 56ch;
  margin: 14px 0 0;
}
.nx-on-dark .nx-lead { color: var(--nx-on-dark-muted); }

.nx-section { padding: clamp(64px, 9vw, 120px) 0; }
.nx-section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: clamp(28px, 4vw, 44px); flex-wrap: wrap;
}
.nx-link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 .92rem var(--nx-font); color: var(--nx-text);
  padding-bottom: 3px; border-bottom: 1.5px solid currentColor;
}
.nx-link-arrow i { transition: transform .3s var(--nx-ease); }
.nx-link-arrow:hover i { transform: translateX(4px); }
.nx-on-dark .nx-link-arrow { color: #fff; }

/* ============================================================
   BUTTONS
   ============================================================ */
.nx-btn {
  --b-bg: var(--nx-ink);
  --b-fg: #fff;
  --b-bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  height: 50px; padding: 0 24px;
  border-radius: 999px; border: 1px solid var(--b-bd);
  background: var(--b-bg); color: var(--b-fg);
  font: 600 .95rem/1 var(--nx-font); letter-spacing: -.01em;
  white-space: nowrap; cursor: pointer; text-decoration: none;
  transition: transform .25s var(--nx-ease), box-shadow .25s, background .25s, color .25s, border-color .25s;
}
.nx-btn:hover { transform: translateY(-2px); color: var(--b-fg); }
.nx-btn:active { transform: translateY(0); }
.nx-btn[disabled], .nx-btn.is-disabled { opacity: .5; pointer-events: none; }
.nx-btn-primary {
  --b-bg: var(--nx-emerald); --b-fg: var(--nx-ink);
  box-shadow: 0 10px 30px -10px rgba(0, 200, 150, .65);
}
.nx-btn-primary:hover { --b-bg: #1fe0ae; box-shadow: 0 18px 40px -12px rgba(0, 200, 150, .8); }
.nx-btn-dark:hover { --b-bg: var(--nx-ink-4); }
.nx-btn-glass {
  --b-bg: rgba(255, 255, 255, .07); --b-fg: #fff; --b-bd: rgba(255, 255, 255, .16);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.nx-btn-glass:hover { --b-bg: rgba(255, 255, 255, .14); }
.nx-btn-outline { --b-bg: transparent; --b-fg: var(--nx-text); --b-bd: var(--nx-line); }
.nx-btn-outline:hover { --b-bd: var(--nx-text); }
.nx-btn-sm { height: 42px; padding: 0 18px; font-size: .86rem; }
.nx-btn-block { width: 100%; }
/* States set by the shared add-to-cart handler in common.js */
.nx-btn.loading { opacity: .8; pointer-events: none; }
.nx-btn.in-cart { --b-bg: var(--nx-ink); --b-fg: #fff; box-shadow: none; }

/* ============================================================
   HEADER
   ============================================================ */
.nx-header-wrap {
  position: fixed; inset: 0 0 auto 0; z-index: 1000;
  transition: transform .45s var(--nx-ease);
}
.nx-header-wrap.is-scrolled { transform: translateY(calc(-1 * var(--nx-topbar-h, 0px))); }

/* Top bar */
.nx-topbar {
  height: 34px; overflow: hidden;
  background: var(--nx-emerald); color: var(--nx-ink);
  font: 600 .78rem/34px var(--nx-font); letter-spacing: .01em;
}
.nx-topbar-track {
  display: flex; gap: 56px; width: max-content;
  animation: nx-marquee 38s linear infinite;
}
.nx-topbar-track span { display: inline-flex; align-items: center; gap: 8px; }
.nx-topbar-track i { font-size: .8rem; }
.nx-topbar:hover .nx-topbar-track { animation-play-state: paused; }

/* Main bar */
.nx-header {
  position: relative;
  background: rgba(5, 13, 10, .95); /* near-solid: over white pages a lighter tint reads as grey */
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--nx-line-dark);
  color: var(--nx-on-dark);
  transition: background .4s var(--nx-ease), border-color .4s;
}
body.nx-home .nx-header-wrap:not(.is-scrolled):not(.is-menu-open) .nx-header {
  background: transparent; border-color: transparent;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.nx-header-in {
  display: flex; align-items: center; gap: 22px; height: 74px;
}

.nx-logo { display: inline-flex; align-items: center; flex-shrink: 0; line-height: 0; }
.nx-logo img { height: 30px; width: auto; max-width: 180px; display: block; object-fit: contain; }
.nx-logo-text { font: 800 1.45rem/1 var(--nx-font-display); letter-spacing: -.04em; color: #fff; }
.nx-logo-text span { color: var(--nx-emerald); }

/* Desktop nav */
.nx-nav { flex: 1; min-width: 0; }
.nx-nav > ul { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nx-nav-link {
  display: inline-flex; align-items: center; gap: 7px;
  height: 40px; padding: 0 15px; border-radius: 999px;
  font: 500 .93rem/1 var(--nx-font); color: var(--nx-on-dark-muted);
  background: transparent; border: 0; cursor: pointer;
  transition: color .2s, background .2s;
}
.nx-nav-link i { font-size: .62rem; transition: transform .3s var(--nx-ease); }
.nx-nav-link:hover, .nx-nav-link.is-active,
.nx-has-mega:hover > .nx-nav-link, .nx-has-mega.is-open > .nx-nav-link {
  color: #fff; background: rgba(255, 255, 255, .07);
}
.nx-has-mega:hover > .nx-nav-link i, .nx-has-mega.is-open > .nx-nav-link i { transform: rotate(180deg); }

/* Mega menu (positioned against .nx-header, spans full width) */
.nx-mega {
  position: absolute; left: 0; right: 0; top: 100%;
  background: rgba(5, 13, 10, .97);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--nx-line-dark);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .25s var(--nx-ease), transform .35s var(--nx-ease), visibility .25s;
}
.nx-mega::before { content: ''; position: absolute; left: 0; right: 0; top: -22px; height: 22px; }
.nx-has-mega:hover > .nx-mega,
.nx-has-mega:focus-within > .nx-mega,
.nx-has-mega.is-open > .nx-mega { opacity: 1; visibility: visible; transform: none; }
.nx-has-mega.is-closed > .nx-mega { opacity: 0; visibility: hidden; }
.nx-mega-in { display: grid; grid-template-columns: 1fr 320px; gap: 32px; padding-block: 28px 32px; }
.nx-mega-title {
  font: 600 .72rem/1 var(--nx-font); letter-spacing: .16em; text-transform: uppercase;
  color: var(--nx-on-dark-muted); margin: 0 0 16px;
}
.nx-mega-cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.nx-mega-cat {
  display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 14px;
  color: var(--nx-on-dark); transition: background .2s;
}
.nx-mega-cat:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nx-mega-cat-ico {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center;
  background: rgba(0, 200, 150, .12); color: var(--nx-emerald); font-size: 1.05rem;
  transition: background .25s, color .25s, transform .3s var(--nx-ease);
}
.nx-mega-cat:hover .nx-mega-cat-ico { background: var(--nx-emerald); color: var(--nx-ink); transform: rotate(-6deg); }
.nx-mega-cat strong { display: block; font: 600 .95rem/1.2 var(--nx-font); }
.nx-mega-cat small { display: block; font: 400 .78rem/1.3 var(--nx-font); color: var(--nx-on-dark-muted); margin-top: 3px; }
.nx-mega-all { margin-top: 18px; }

.nx-mega-feature {
  position: relative; overflow: hidden; border-radius: 20px; padding: 18px;
  background: radial-gradient(120% 100% at 100% 0%, rgba(0, 200, 150, .35), rgba(0, 200, 150, 0) 60%), var(--nx-ink-3);
  border: 1px solid var(--nx-line-dark); color: #fff; display: flex; flex-direction: column; gap: 12px;
}
.nx-mega-feature img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 12px; background: var(--nx-ink-4); }
.nx-mega-feature strong { font: 600 1rem/1.3 var(--nx-font-display); }
.nx-mega-feature .nx-mega-price { color: var(--nx-emerald); font: 700 .95rem var(--nx-font); }
.nx-mega-feature .nx-mega-price del { color: var(--nx-on-dark-muted); font-weight: 500; margin-right: 6px; }
.nx-mega-feature .nx-mega-price ins { text-decoration: none; }

.nx-mega-vehicles { display: flex; flex-wrap: wrap; gap: 10px; }
.nx-mega-vehicles a {
  display: inline-flex; align-items: baseline; gap: 8px; padding: 12px 16px; border-radius: 14px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--nx-line-dark); color: #fff;
  font: 600 .95rem var(--nx-font); transition: border-color .2s, background .2s;
}
.nx-mega-vehicles a small { color: var(--nx-emerald); font: 600 .7rem var(--nx-font); letter-spacing: .12em; text-transform: uppercase; }
.nx-mega-vehicles a:hover { border-color: rgba(0, 200, 150, .6); background: rgba(0, 200, 150, .08); }

/* Actions */
.nx-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nx-search-trigger {
  display: inline-flex; align-items: center; gap: 10px;
  height: 42px; min-width: 230px; padding: 0 8px 0 16px; margin-right: 6px;
  border-radius: 999px; border: 1px solid var(--nx-line-dark);
  background: rgba(255, 255, 255, .06); color: var(--nx-on-dark-muted);
  font: 500 .88rem/1 var(--nx-font); cursor: pointer;
  transition: border-color .2s, background .2s, color .2s;
}
.nx-search-trigger:hover { border-color: rgba(0, 200, 150, .5); color: #fff; }
.nx-search-trigger kbd {
  margin-left: auto; padding: 5px 8px; border-radius: 8px;
  background: rgba(255, 255, 255, .08); color: var(--nx-on-dark-muted);
  font: 600 .68rem/1 var(--nx-font); border: 0;
}
.nx-icon-btn {
  position: relative; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 999px; border: 0;
  background: transparent; color: var(--nx-on-dark); cursor: pointer; font-size: 1.05rem;
  transition: background .2s, color .2s;
}
.nx-icon-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nx-avatar {
  width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center;
  background: var(--nx-emerald); color: var(--nx-ink); font: 700 .8rem var(--nx-font);
}
.nx-cart-count {
  position: absolute; top: 3px; right: 1px;
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: var(--nx-emerald); color: var(--nx-ink);
  font: 700 .68rem/19px var(--nx-font); text-align: center;
  box-shadow: 0 0 0 2px var(--nx-ink);
}
.nx-cart-count[data-count="0"] { display: none; }
.nx-cart-count.is-bump { animation: nx-bump .6s var(--nx-ease); }

.nx-burger {
  display: none; width: 44px; height: 44px; border-radius: 999px; border: 0;
  background: transparent; cursor: pointer; place-items: center; margin-left: -10px;
}
.nx-burger span { display: block; width: 22px; height: 2px; border-radius: 2px; background: #fff; transition: transform .3s var(--nx-ease); }
.nx-burger span + span { margin-top: 6px; width: 15px; }
.nx-burger-lines { display: grid; }

@media (max-width: 1024px) {
  .nx-nav { display: none; }
  .nx-burger { display: grid; }
  .nx-header-in { gap: 10px; }
  .nx-search-trigger { min-width: 0; width: 44px; padding: 0; justify-content: center; margin-right: 0; border-color: transparent; background: transparent; color: var(--nx-on-dark); font-size: 1.05rem; }
  .nx-search-trigger span, .nx-search-trigger kbd { display: none; }
}
@media (max-width: 600px) {
  .nx-header-in { height: 64px; }
  .nx-logo img { height: 25px; }
  .nx-hide-sm { display: none !important; }
  .nx-icon-btn { width: 40px; height: 40px; }
}

/* ============================================================
   OVERLAYS — scrim, drawers
   ============================================================ */
.nx-scrim {
  position: fixed; inset: 0; z-index: 1090;
  background: rgba(5, 13, 10, .55);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s;
}
.nx-scrim.is-visible { opacity: 1; visibility: visible; }

/* Visibility flips instantly on open (so focus() works right away) and only
   after the slide-out finishes on close. */
.nx-drawer, .nx-cart-drawer {
  position: fixed; top: 0; bottom: 0; z-index: 1100;
  display: flex; flex-direction: column;
  visibility: hidden;
  transition: transform .5s var(--nx-ease), visibility 0s linear .5s;
}
.nx-drawer.is-open, .nx-cart-drawer.is-open { transform: none; visibility: visible; transition: transform .5s var(--nx-ease), visibility 0s; }

.nx-drawer {
  left: 0; width: min(88vw, 390px);
  background: var(--nx-ink); color: var(--nx-on-dark);
  transform: translateX(-102%);
}
.nx-cart-drawer {
  right: 0; width: min(94vw, 430px);
  background: var(--nx-surface); color: var(--nx-text);
  transform: translateX(102%);
  box-shadow: -30px 0 60px -30px rgba(5, 13, 10, .45);
}
.nx-drawer-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px 16px 22px; border-bottom: 1px solid var(--nx-line-dark);
}
.nx-cart-drawer .nx-drawer-head { border-color: var(--nx-line); }
.nx-drawer-title { font: 700 1.1rem/1 var(--nx-font-display); letter-spacing: -.02em; margin: 0; color: inherit; }
.nx-close {
  width: 42px; height: 42px; border-radius: 999px; border: 0; cursor: pointer;
  display: grid; place-items: center; font-size: 1.1rem;
  background: rgba(255, 255, 255, .06); color: inherit; transition: background .2s, transform .3s var(--nx-ease);
}
.nx-cart-drawer .nx-close { background: var(--nx-bg); }
.nx-close:hover { transform: rotate(90deg); }
.nx-drawer-body { flex: 1; overflow-y: auto; padding: 14px 14px 24px; overscroll-behavior: contain; }

.nx-drawer-search {
  display: flex; align-items: center; gap: 12px; width: 100%;
  height: 50px; padding: 0 18px; margin-bottom: 14px; border-radius: 14px;
  border: 1px solid var(--nx-line-dark); background: rgba(255, 255, 255, .05);
  color: var(--nx-on-dark-muted); font: 500 .95rem var(--nx-font); cursor: pointer; text-align: left;
}
.nx-drawer-nav { list-style: none; margin: 0; padding: 0; }
.nx-drawer-nav > li > a, .nx-drawer-nav > li > button {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 16px 10px; border: 0; border-bottom: 1px solid var(--nx-line-dark);
  background: none; color: #fff; cursor: pointer;
  font: 600 1.25rem/1 var(--nx-font-display); letter-spacing: -.02em; text-align: left;
}
.nx-drawer-nav > li > button i { font-size: .8rem; transition: transform .3s var(--nx-ease); color: var(--nx-on-dark-muted); }
.nx-drawer-nav > li.is-open > button i { transform: rotate(180deg); }
.nx-drawer-sub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--nx-ease); }
.nx-drawer-nav > li.is-open .nx-drawer-sub { grid-template-rows: 1fr; }
.nx-drawer-sub > div { overflow: hidden; }
.nx-drawer-sub a {
  display: flex; align-items: center; gap: 12px; padding: 12px 10px;
  color: var(--nx-on-dark-muted); font: 500 .98rem var(--nx-font);
}
.nx-drawer-sub a:hover { color: #fff; }
.nx-drawer-sub a i { width: 20px; color: var(--nx-emerald); }
.nx-drawer-foot { padding: 16px 18px 22px; border-top: 1px solid var(--nx-line-dark); display: grid; gap: 10px; }
.nx-drawer-foot small { color: var(--nx-on-dark-muted); font: 400 .8rem var(--nx-font); text-align: center; }

/* ── Mini cart (WooCommerce widget markup) ─────────────────── */
.nx-cart-drawer .widget_shopping_cart_content { display: flex; flex-direction: column; min-height: 100%; }
.nx-cart-drawer .woocommerce-mini-cart { list-style: none; margin: 0; padding: 0; flex: 1; }
.nx-cart-drawer .woocommerce-mini-cart-item {
  position: relative; display: grid; grid-template-columns: 72px 1fr; column-gap: 14px;
  padding: 14px 40px 14px 8px; border-bottom: 1px solid var(--nx-line);
  font: 500 .92rem/1.35 var(--nx-font);
}
.nx-cart-drawer .woocommerce-mini-cart-item > a:not(.remove) {
  display: contents; color: var(--nx-text); font-weight: 600;
}
.nx-cart-drawer .woocommerce-mini-cart-item img {
  grid-row: span 3; width: 72px; height: 72px; object-fit: cover; border-radius: 12px;
  background: var(--nx-bg); margin: 0;
}
.nx-cart-drawer .woocommerce-mini-cart-item .quantity { display: block; color: var(--nx-muted); font-size: .86rem; margin-top: 6px; }
.nx-cart-drawer .woocommerce-mini-cart-item .variation { font-size: .78rem; color: var(--nx-muted); margin: 4px 0 0; }
.nx-cart-drawer .woocommerce-mini-cart-item a.remove {
  position: absolute; top: 14px; right: 6px; width: 28px; height: 28px; border-radius: 999px;
  display: grid; place-items: center; background: var(--nx-bg); color: var(--nx-muted) !important;
  font-size: 1.1rem; line-height: 1; text-decoration: none; transition: background .2s, color .2s;
}
.nx-cart-drawer .woocommerce-mini-cart-item a.remove:hover { background: #fee2e2; color: #b91c1c !important; }
.nx-cart-drawer .woocommerce-mini-cart__total {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 0; padding: 18px 8px 6px; font: 600 1rem var(--nx-font); color: var(--nx-text);
  border-top: 1px solid var(--nx-line);
}
.nx-cart-drawer .woocommerce-mini-cart__total .amount { font: 700 1.25rem var(--nx-font-display); }
.nx-cart-drawer .woocommerce-mini-cart__buttons { display: grid; gap: 10px; margin: 0; padding: 14px 8px 4px; }
.nx-cart-drawer .woocommerce-mini-cart__buttons .button {
  display: flex; align-items: center; justify-content: center; height: 50px; border-radius: 999px;
  font: 600 .95rem var(--nx-font); text-decoration: none; transition: transform .25s var(--nx-ease), background .25s;
  background: var(--nx-bg); color: var(--nx-text); border: 1px solid var(--nx-line);
}
.nx-cart-drawer .woocommerce-mini-cart__buttons .button.checkout {
  background: var(--nx-emerald); color: var(--nx-ink); border-color: transparent;
  box-shadow: 0 10px 30px -10px rgba(0, 200, 150, .65);
}
.nx-cart-drawer .woocommerce-mini-cart__buttons .button:hover { transform: translateY(-2px); }
.nx-cart-drawer .woocommerce-mini-cart__empty-message {
  margin: auto 0; padding: 60px 20px 20px; text-align: center; color: var(--nx-muted); font: 500 .98rem var(--nx-font);
}
.nx-cart-drawer .woocommerce-mini-cart__empty-message::before {
  content: '\f290'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
  display: grid; place-items: center; width: 84px; height: 84px; margin: 0 auto 18px; border-radius: 999px;
  background: var(--nx-bg); color: var(--nx-emerald-600); font-size: 1.9rem;
}
.nx-cart-empty-cta { padding: 8px; }
.nx-cart-drawer .widget_shopping_cart_content:has(.woocommerce-mini-cart) + .nx-cart-empty-cta { display: none; }

/* ============================================================
   SEARCH OVERLAY
   ============================================================ */
.nx-search {
  position: fixed; inset: 0; z-index: 1200;
  display: flex; justify-content: center; align-items: flex-start;
  padding: max(10vh, 72px) 16px 16px;
  background: rgba(5, 13, 10, .72);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s linear .3s;
}
.nx-search.is-open { opacity: 1; visibility: visible; transition: opacity .3s, visibility 0s; }
.nx-search-panel {
  width: min(720px, 100%); max-height: calc(100vh - max(10vh, 72px) - 16px);
  display: flex; flex-direction: column;
  background: var(--nx-ink-2); color: var(--nx-on-dark);
  border: 1px solid var(--nx-line-dark); border-radius: var(--nx-r-lg);
  box-shadow: var(--nx-shadow-lg); overflow: hidden;
  transform: translateY(16px) scale(.98); transition: transform .45s var(--nx-ease);
}
.nx-search.is-open .nx-search-panel { transform: none; }
.nx-search-field { display: flex; align-items: center; gap: 14px; padding: 8px 10px 8px 22px; border-bottom: 1px solid var(--nx-line-dark); }
.nx-search-field > i { color: var(--nx-emerald); font-size: 1.1rem; }
.nx-search-field input {
  flex: 1; min-width: 0; height: 56px; border: 0; outline: 0; background: none;
  color: #fff; font: 500 1.15rem var(--nx-font);
}
.nx-search-field input::placeholder { color: rgba(234, 244, 240, .42); }
.nx-search-field input::-webkit-search-cancel-button { display: none; }
.nx-search-body { overflow-y: auto; padding: 14px; overscroll-behavior: contain; }
.nx-search-label {
  font: 600 .7rem/1 var(--nx-font); letter-spacing: .16em; text-transform: uppercase;
  color: var(--nx-on-dark-muted); margin: 8px 8px 12px;
}
.nx-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 8px 8px; }
.nx-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--nx-line-dark); background: rgba(255, 255, 255, .04);
  color: var(--nx-on-dark); font: 500 .86rem var(--nx-font); transition: border-color .2s, background .2s;
}
.nx-chip:hover { border-color: rgba(0, 200, 150, .6); background: rgba(0, 200, 150, .1); color: #fff; }
.nx-chip i { color: var(--nx-emerald); font-size: .8rem; }
.nx-sr-list { display: grid; gap: 2px; }
.nx-sr-item {
  display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 14px;
  color: var(--nx-on-dark); transition: background .15s;
}
.nx-sr-item:hover, .nx-sr-item.is-active { background: rgba(255, 255, 255, .07); color: #fff; }
.nx-sr-thumb {
  width: 52px; height: 52px; border-radius: 12px; flex-shrink: 0; object-fit: cover;
  background: var(--nx-ink-4); display: grid; place-items: center; color: var(--nx-emerald);
}
.nx-sr-text { flex: 1; min-width: 0; }
.nx-sr-title { display: block; font: 600 .95rem/1.3 var(--nx-font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx-sr-meta { display: block; font: 400 .8rem var(--nx-font); color: var(--nx-on-dark-muted); margin-top: 3px; }
.nx-sr-price { font: 700 .92rem var(--nx-font); color: var(--nx-emerald); white-space: nowrap; }
.nx-sr-empty { padding: 26px 12px; text-align: center; color: var(--nx-on-dark-muted); font: 500 .95rem var(--nx-font); }
.nx-sr-all {
  display: flex; align-items: center; justify-content: center; gap: 8px; margin: 8px 4px 2px; height: 46px;
  border-radius: 12px; background: rgba(0, 200, 150, .1); color: var(--nx-emerald); font: 600 .9rem var(--nx-font);
}
.nx-sr-all:hover { background: rgba(0, 200, 150, .18); color: var(--nx-mint); }
.nx-search-foot {
  display: flex; gap: 18px; padding: 12px 22px; border-top: 1px solid var(--nx-line-dark);
  color: var(--nx-on-dark-muted); font: 500 .76rem var(--nx-font);
}
.nx-search-foot kbd {
  display: inline-block; min-width: 22px; padding: 3px 6px; margin-right: 4px; border-radius: 6px;
  background: rgba(255, 255, 255, .08); font: 600 .7rem var(--nx-font); text-align: center; color: #fff;
}
.nx-spinner {
  width: 22px; height: 22px; border-radius: 999px; margin: 24px auto;
  border: 2px solid rgba(255, 255, 255, .12); border-top-color: var(--nx-emerald);
  animation: nx-spin .8s linear infinite;
}
@media (max-width: 600px) {
  .nx-search { padding: 0; }
  .nx-search-panel { width: 100%; max-height: 100vh; height: 100%; border-radius: 0; border: 0; }
  .nx-search-foot { display: none; }
}

/* ============================================================
   PRODUCT CARD — WooCommerce loop item (li.product.nx-pcard)
   Markup comes from the loop hooks in inc/woo-storefront.php.
   ============================================================ */
.nx-pcard {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  margin: 0; padding: 0; list-style: none; text-align: left;
  background: var(--nx-surface); border: 1px solid var(--nx-line); border-radius: 22px; overflow: hidden;
  transition: transform .45s var(--nx-ease), box-shadow .45s var(--nx-ease), border-color .3s;
}
.nx-pcard:hover { transform: translateY(-6px); box-shadow: 0 28px 50px -24px rgba(5, 13, 10, .38); border-color: transparent; }

/* Media */
.nx-pcard-media { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: #eef3f0; }
.nx-pcard-img { position: absolute; inset: 0; display: block; }
.nx-pcard-img img {
  position: absolute; inset: 0; width: 100% !important; height: 100% !important; max-width: none;
  margin: 0 !important; object-fit: cover; box-shadow: none !important;
  transition: transform .8s var(--nx-ease), opacity .5s ease;
}
.nx-pcard:hover .nx-pcard-img img { transform: scale(1.05); }
.nx-pcard-img .nx-pcard-alt { opacity: 0; }
.nx-pcard:hover .nx-pcard-img.has-alt .nx-pcard-alt { opacity: 1; }

.nx-pcard-badges { position: absolute; top: 12px; left: 12px; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.nx-badge {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px;
  background: var(--nx-ink); color: #fff; font: 700 .66rem/1 var(--nx-font); letter-spacing: .06em; text-transform: uppercase;
}
.nx-badge-sale { background: var(--nx-volt); color: var(--nx-ink); }
.nx-badge-new  { background: var(--nx-emerald); color: var(--nx-ink); }
.nx-badge-hot  { background: #ff6a3d; color: #fff; }
.nx-badge-out  { background: #fff; color: var(--nx-muted); border: 1px solid var(--nx-line); }

.nx-pcard-wish {
  position: absolute; top: 10px; right: 10px; z-index: 2; width: 40px; height: 40px; border-radius: 999px;
  display: grid; place-items: center; font-size: .98rem; cursor: pointer;
  background: rgba(255, 255, 255, .94); border: 1px solid var(--nx-line); color: var(--nx-text);
  transition: transform .3s var(--nx-ease), color .2s;
}
.nx-pcard-wish:hover { transform: scale(1.08); }
.nx-pcard-wish.active { color: #e11d48; }

.nx-pcard-quick {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 2;
  transform: translateY(calc(100% + 16px)); opacity: 0;
  transition: transform .45s var(--nx-ease), opacity .3s;
}
.nx-pcard:hover .nx-pcard-quick, .nx-pcard:focus-within .nx-pcard-quick { transform: none; opacity: 1; }
.nx-pcard-quick .button { width: 100%; height: 44px; margin: 0; line-height: 1; }
.nx-pcard-quick .button.loading { opacity: .85; pointer-events: none; }
.nx-pcard-quick .button.loading::after {
  content: ''; width: 14px; height: 14px; margin-left: 4px; border-radius: 50%;
  border: 2px solid rgba(5, 13, 10, .25); border-top-color: var(--nx-ink); animation: nx-spin .7s linear infinite;
}
.nx-pcard-quick .button.added::after { content: '\2713'; margin-left: 2px; font-weight: 800; }
.nx-pcard .added_to_cart { display: none !important; }

/* Body */
.nx-pcard-body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 16px 18px 18px; }
.nx-pcard-cat { font: 600 .7rem/1.2 var(--nx-font); letter-spacing: .12em; text-transform: uppercase; color: var(--nx-emerald-700); }
.nx-pcard-title {
  margin: 0 !important; padding: 0 !important; font: 600 1rem/1.35 var(--nx-font-display) !important; letter-spacing: -.01em; color: var(--nx-text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em;
}
.nx-pcard-title a { color: inherit; }
.nx-pcard-title a::after { content: ''; position: absolute; inset: 0; z-index: 1; } /* whole card clickable */

.nx-rating { display: flex; align-items: center; gap: 6px; font: 600 .8rem/1 var(--nx-font); color: var(--nx-text); }
.nx-stars {
  font-size: .86rem; letter-spacing: 1px; line-height: 1;
  background: linear-gradient(90deg, #f5b301 var(--r, 0%), #d5ded9 var(--r, 0%));
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
}
.nx-rating-count { color: var(--nx-muted); font-weight: 500; }

.nx-pcard-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-top: 2px; font: 700 1.08rem/1.2 var(--nx-font); color: var(--nx-text); }
.nx-pcard-price del { order: 2; color: var(--nx-muted); font-weight: 500; font-size: .84em; opacity: 1; }
.nx-pcard-price ins { order: 1; text-decoration: none; background: none; font-weight: 700; }
.nx-save {
  order: 3; display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px;
  background: #e5f8f0; color: var(--nx-emerald-700); font: 700 .7rem/1 var(--nx-font);
}
.nx-pcard-fits { margin: 2px 0 0; font: 500 .78rem/1.4 var(--nx-font); color: var(--nx-muted); }
.nx-pcard-fits span { font-weight: 700; color: var(--nx-text); margin-right: 2px; }
.nx-pcard-fits em { font-style: normal; font-weight: 600; color: var(--nx-emerald-700); }
.nx-stock {
  display: flex; align-items: center; gap: 7px; margin: auto 0 0; padding-top: 8px;
  font: 600 .76rem/1.2 var(--nx-font); color: var(--nx-emerald-700);
}
.nx-stock::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(0, 165, 124, .15); }
.nx-stock.is-low { color: #b45309; }
.nx-stock.is-out { color: var(--nx-muted); }

/* Touch screens: no hover, so the add button is always visible (compact). */
@media (hover: none), (max-width: 768px) {
  .nx-pcard-quick { left: 8px; right: 8px; bottom: 8px; transform: none; opacity: 1; }
  .nx-pcard-quick .button { height: 38px; font-size: .8rem; padding: 0 10px; }
  .nx-pcard:hover { transform: none; }
}
@media (max-width: 480px) {
  .nx-pcard-body { padding: 12px 12px 14px; gap: 5px; }
  .nx-pcard-title { font-size: .9rem !important; }
  .nx-pcard-price { font-size: .98rem; }
  .nx-pcard-wish { width: 34px; height: 34px; font-size: .85rem; }
}

/* ============================================================
   PRODUCT CAROUSEL — [ev_product_carousel] (WooCommerce ul.products inside)
   ============================================================ */
.nx-pcarousel { padding-top: clamp(48px, 7vw, 80px); }
.nx-pcarousel.is-dark {
  margin-top: clamp(48px, 7vw, 80px); padding-block: clamp(48px, 7vw, 88px);
  background: radial-gradient(60% 80% at 100% 0%, rgba(0, 200, 150, .22), transparent 65%), var(--nx-ink);
}
.nx-pcarousel.is-dark + .nx-pcarousel { padding-top: clamp(48px, 7vw, 80px); }
.nx-pc-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 24px; }
.nx-pc-actions { display: flex; align-items: center; gap: 8px; }
.nx-pc-actions .nx-link-arrow { margin-right: 10px; }
.nx-pc-btn {
  width: 46px; height: 46px; border-radius: 999px; display: grid; place-items: center; cursor: pointer;
  background: var(--nx-surface); border: 1px solid var(--nx-line); color: var(--nx-text);
  transition: background .25s, color .25s, border-color .25s, opacity .25s;
}
.nx-pc-btn:hover:not(:disabled) { background: var(--nx-ink); border-color: var(--nx-ink); color: #fff; }
.nx-pc-btn:disabled { opacity: .35; cursor: default; }
.is-dark .nx-pc-btn { background: rgba(255, 255, 255, .06); border-color: var(--nx-line-dark); color: #fff; }
.is-dark .nx-pc-btn:hover:not(:disabled) { background: var(--nx-emerald); color: var(--nx-ink); border-color: transparent; }

.nx-pc-track .woocommerce { margin: 0; }
.nx-pc-track ul.products {
  display: grid !important; grid-auto-flow: column; grid-template-columns: none !important;
  grid-auto-columns: calc((100% - 3 * 20px) / 4); gap: 20px;
  margin: 0 !important; padding: 6px 2px 26px !important; list-style: none;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; cursor: grab;
}
.nx-pc-track ul.products.is-dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }
.nx-pc-track ul.products.is-dragging a { pointer-events: none; }
.nx-pc-track ul.products::-webkit-scrollbar { display: none; }
.nx-pc-track ul.products::before, .nx-pc-track ul.products::after { display: none !important; content: none !important; }
.nx-pc-track ul.products li.product { float: none !important; width: auto !important; margin: 0 !important; clear: none !important; scroll-snap-align: start; }
.nx-pc-progress { height: 3px; border-radius: 3px; overflow: hidden; background: var(--nx-line); }
.nx-pc-progress span {
  display: block; height: 100%; width: var(--w, 25%); border-radius: 3px; background: var(--nx-ink);
  transform: translateX(var(--x, 0%)); transition: transform .15s linear, width .2s;
}
.is-dark .nx-pc-progress { background: rgba(255, 255, 255, .12); }
.is-dark .nx-pc-progress span { background: var(--nx-emerald); }
.nx-pc-empty { margin: 32px 0 0; padding: 16px 20px; border: 1px dashed #b8c6bf; border-radius: 14px; color: var(--nx-muted); font: 500 .86rem var(--nx-font); }

@media (max-width: 1024px) { .nx-pc-track ul.products { grid-auto-columns: calc((100% - 2 * 16px) / 3); gap: 16px; } }
@media (max-width: 768px)  {
  .nx-pc-track ul.products { grid-auto-columns: calc((100% - 12px) / 2.15); gap: 12px; }
  .nx-pc-btn { display: none; }
  .nx-pc-actions .nx-link-arrow { margin-right: 0; }
}
@media (max-width: 480px)  { .nx-pc-track ul.products { grid-auto-columns: 62%; } }

/* Mega menu: vehicle types */
.nx-mega-pad { padding-block: 28px 32px; }
.nx-mega-types { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.nx-mega-types a {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px 14px; border-radius: 16px;
  background: rgba(255, 255, 255, .03); border: 1px solid var(--nx-line-dark); color: #fff; font: 600 .86rem var(--nx-font);
  transition: border-color .2s, background .2s;
}
.nx-mega-types a:hover { border-color: rgba(0, 200, 150, .6); background: rgba(0, 200, 150, .08); color: #fff; }
.nx-mega-types .nx-vt-svg { width: 60px; height: 38px; color: var(--nx-emerald); }
.nx-drawer-sub a.nx-drawer-vt .nx-vt-svg { width: 34px; height: 22px; flex-shrink: 0; color: var(--nx-emerald); }

/* Broken image fallback (class added by nx-core.js) */
.nx-img-broken { position: relative; }
.nx-img-broken::after {
  content: '\f0e7'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
  font-size: 2.2rem; color: var(--nx-emerald-600);
  background: radial-gradient(120% 90% at 50% 10%, #f4fbf8, #dcebe4);
}


/* ============================================================
   FOOTER
   ============================================================ */
.nx-footer { position: relative; overflow: hidden; background: var(--nx-ink); color: var(--nx-on-dark-muted); isolation: isolate; }
.nx-footer::before {
  content: ''; position: absolute; z-index: -1; width: 900px; height: 900px; left: 50%; top: -520px;
  transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 200, 150, .18), rgba(0, 200, 150, 0) 62%);
}
.nx-footer a { color: var(--nx-on-dark-muted); transition: color .2s; }
.nx-footer a:hover { color: #fff; }

.nx-footer-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
  padding: clamp(40px, 6vw, 64px) 0; border-bottom: 1px solid var(--nx-line-dark);
}
.nx-footer-cta h2 {
  margin: 0; max-width: 18ch; color: #fff;
  font: 700 clamp(2rem, 4.4vw, 3.6rem)/1 var(--nx-font-display); letter-spacing: -.045em;
}
.nx-footer-cta h2 em { font-style: normal; color: var(--nx-emerald); }
.nx-footer-cta p { margin: 12px 0 0; max-width: 46ch; color: var(--nx-on-dark-muted); font: 400 1rem/1.6 var(--nx-font); }
.nx-footer-cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.nx-footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1.4fr; gap: 40px;
  padding: clamp(48px, 7vw, 80px) 0 clamp(40px, 5vw, 56px);
}
.nx-footer-brand p { margin: 18px 0 22px; max-width: 34ch; font: 400 .94rem/1.7 var(--nx-font); color: var(--nx-on-dark-muted); }
.nx-footer h4 {
  margin: 0 0 18px; color: #fff;
  font: 600 .74rem/1 var(--nx-font); letter-spacing: .16em; text-transform: uppercase;
}
.nx-footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.nx-footer-links a { font: 500 .94rem var(--nx-font); }
.nx-social { display: flex; gap: 8px; }
.nx-social a {
  width: 42px; height: 42px; border-radius: 999px; display: grid; place-items: center;
  border: 1px solid var(--nx-line-dark); color: var(--nx-on-dark); transition: all .25s var(--nx-ease);
}
.nx-social a:hover { background: var(--nx-emerald); color: var(--nx-ink); border-color: transparent; transform: translateY(-3px); }
.nx-footer-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; font: 500 .92rem/1.5 var(--nx-font); }
.nx-footer-contact li { display: flex; gap: 12px; }
.nx-footer-contact i { color: var(--nx-emerald); margin-top: 4px; width: 16px; }

.nx-footer-word {
  margin: 0 0 -.16em; text-align: center; user-select: none; pointer-events: none;
  font: 800 clamp(4.5rem, 19vw, 17rem)/.85 var(--nx-font-display); letter-spacing: -.07em;
  color: transparent; -webkit-text-fill-color: transparent;
  background: linear-gradient(180deg, rgba(0, 200, 150, .22), rgba(0, 200, 150, .02) 75%);
  -webkit-background-clip: text; background-clip: text;
}
.nx-footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 22px 0 26px; border-top: 1px solid var(--nx-line-dark); font: 500 .84rem var(--nx-font);
}
.nx-footer-legal { display: flex; flex-wrap: wrap; gap: 18px; }
.nx-pay { display: flex; align-items: center; gap: 12px; font-size: 1.7rem; color: rgba(234, 244, 240, .5); }
.nx-credit { width: 100%; text-align: center; font-size: .76rem; color: rgba(234, 244, 240, .35); }

@media (max-width: 1024px) {
  .nx-footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .nx-footer-brand { grid-column: 1 / -1; }
  .nx-footer-contact-col { grid-column: span 3; }
}
@media (max-width: 600px) {
  .nx-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
  .nx-footer-contact-col { grid-column: 1 / -1; }
  .nx-footer-bottom { justify-content: center; text-align: center; }
}

/* ============================================================
   BACK TO TOP + TOASTS (legacy elements, restyled)
   ============================================================ */
body.nx-shell .back-to-top {
  background: var(--nx-ink); color: var(--nx-emerald); border: 1px solid var(--nx-line-dark);
  border-radius: 999px; box-shadow: var(--nx-shadow);
}
body.nx-shell .back-to-top:hover { background: var(--nx-emerald); color: var(--nx-ink); }

/* ============================================================
   SCROLL REVEAL + KEYFRAMES
   ============================================================ */
.nx-js [data-reveal] {
  opacity: 0; transform: translateY(28px);
  transition: opacity .9s var(--nx-ease), transform .9s var(--nx-ease);
  transition-delay: var(--d, 0s);
}
.nx-js [data-reveal].is-in { opacity: 1; transform: none; }

@keyframes nx-marquee { to { transform: translateX(-50%); } }
@keyframes nx-spin    { to { transform: rotate(360deg); } }
@keyframes nx-bump    { 0%, 100% { transform: scale(1); } 35% { transform: scale(1.45); } 60% { transform: scale(.9); } }

@media (prefers-reduced-motion: reduce) {
  .nx-js [data-reveal] { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}

/* Footer is always below the fold: render it only when it gets close. */
.nx-footer { content-visibility: auto; contain-intrinsic-size: auto 900px; }

/* ============================================================
   CURRENCY SWITCHER (flag dropdown — inc/multi-currency.php)
   ============================================================ */
.nx-fx { position: relative; }
.nx-fx > summary { list-style: none; }
.nx-fx > summary::-webkit-details-marker { display: none; }
.nx-fx-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; margin-right: 6px;
  border-radius: 999px; border: 1px solid var(--nx-line-dark); background: rgba(255, 255, 255, .06);
  color: var(--nx-on-dark); font: 600 .82rem/1 var(--nx-font); cursor: pointer; user-select: none;
  transition: border-color .2s, background .2s;
}
.nx-fx-btn:hover, .nx-fx[open] .nx-fx-btn { border-color: rgba(0, 200, 150, .55); background: rgba(255, 255, 255, .1); }
.nx-fx-btn .fa-chevron-down { font-size: .6rem; color: var(--nx-on-dark-muted); transition: transform .25s var(--nx-ease); }
.nx-fx[open] .nx-fx-btn .fa-chevron-down { transform: rotate(180deg); }
.nx-flag { width: 22px; height: 15px; flex-shrink: 0; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .18); overflow: hidden; }
.nx-fx-menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 1300; width: 260px; margin: 0; padding: 8px; list-style: none;
  background: var(--nx-ink-2); border: 1px solid var(--nx-line-dark); border-radius: 18px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7); animation: nx-fx-in .2s var(--nx-ease);
}
.nx-fx-menu a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  color: var(--nx-on-dark); font: 500 .9rem/1.2 var(--nx-font); transition: background .15s;
}
.nx-fx-menu a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nx-fx-menu a[aria-current="true"] { background: rgba(0, 200, 150, .14); color: #fff; }
.nx-fx-menu a[aria-current="true"]::after { content: '\2713'; margin-left: 6px; color: var(--nx-emerald); font-weight: 800; }
.nx-fx-name { flex: 1; min-width: 0; }
.nx-fx-sym { color: var(--nx-on-dark-muted); font-size: .78rem; font-weight: 600; white-space: nowrap; }
@keyframes nx-fx-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Mobile menu copy of the switcher: full width, opens upwards */
.nx-fx-drawer .nx-fx-btn { width: 100%; height: 48px; margin: 0; justify-content: flex-start; border-radius: 14px; }
.nx-fx-drawer .nx-fx-btn .fa-chevron-down { margin-left: auto; }
.nx-fx-drawer .nx-fx-menu { top: auto; bottom: calc(100% + 8px); left: 0; right: 0; width: auto; max-height: 50vh; overflow-y: auto; }

@media (max-width: 1024px) { .nx-header .nx-fx-btn { padding: 0 10px; margin-right: 0; } }
@media (max-width: 600px) {
  .nx-header .nx-fx-code, .nx-header .nx-fx-btn .fa-chevron-down { display: none; }
  .nx-header .nx-fx-btn { width: 40px; height: 40px; padding: 0; justify-content: center; border-color: transparent; background: transparent; }
  /* Anchor the menu to the header row (the header's backdrop-filter would re-anchor a fixed menu). */
  .nx-header-in { position: relative; }
  .nx-header .nx-fx { position: static; }
  .nx-header .nx-fx-menu { left: 12px; right: 12px; top: calc(100% + 6px); width: auto; }
}
