/* TOPBAR */
.topbar {
  background: var(--nova);
  color: rgba(255,255,255,.5);
  font-size: .67rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  padding: 7px 0;
  text-align: center;
}
.topbar strong { color: #fff; }
.topbar a { color: rgba(255,255,255,.8); text-decoration: none; }
.topbar a:hover { color: #fff; }
.topbar .sp { color: rgba(255,255,255,.2); margin: 0 10px; }

/* NAV */
nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--dark);
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.nav-r1 {
  display: flex;
  align-items: center;
  height: 62px;
  gap: 20px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  flex-shrink: 0;
}
.nlm {
  width: 30px;
  height: 30px;
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: .7rem;
  font-weight: 600;
}
.nlt {
  font-family: "Instrument Serif", serif;
  font-size: 1.1rem;
  color: #fff;
}
.nlt em { font-style: italic; color: var(--red); }

/* Search */
.nav-search { flex: 1; max-width: 560px; position: relative; }

.nsi {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  transition: border-color .2s, background .2s;
}
.nsi:focus-within {
  border-color: rgba(192,39,45,.6);
  background: rgba(255,255,255,.1);
}

.nsc {
  border: none;
  background: transparent;
  font-family: "Geist", sans-serif;
  font-size: .73rem;
  color: rgba(255,255,255,.6);
  padding: 0 22px 0 10px;
  height: 38px;
  border-right: 1px solid rgba(255,255,255,.1);
  cursor: pointer;
  outline: none;
  flex: 0;
  -webkit-appearance: none;
  min-width: 84px;
}
.nsc option { background: #1e2330; color: #fff; }

.nsinput {
  flex: 1;
  border: none;
  background: transparent;
  font-family: "Geist", sans-serif;
  font-size: .83rem;
  color: #fff;
  padding: 0 12px;
  height: 38px;
  outline: none;
}
.nsinput::placeholder { color: rgba(255,255,255,.28); }

.nsbtn {
  background: var(--red);
  border: none;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s;
  flex-shrink: 0;
}
.nsbtn:hover { background: var(--red-lt); }

/* Nav actions */
.nav-acts {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.nav-lnk {
  font-size: .76rem;
  font-weight: 500;
  color: rgba(255,255,255,.45);
  text-decoration: none;
  transition: color .2s;
  white-space: nowrap;
}
.nav-lnk:hover { color: #fff; }

.nav-rfq {
  background: var(--red);
  color: #fff;
  font-size: .73rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 9px 17px;
  text-decoration: none;
  transition: background .2s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
}
.nav-rfq:hover { background: var(--red-lt); }

.rfq-badge {
  background: #fff;
  color: var(--red);
  font-size: .6rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Category bar */
.nav-r2 {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-top: 1px solid rgba(255,255,255,.07);
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-r2::-webkit-scrollbar { display: none; }

.nc {
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .05em;
  color: rgba(255,255,255,.45);
  text-decoration: none;
  padding: 9px 14px;
  white-space: nowrap;
  border-right: 1px solid rgba(255,255,255,.06);
  transition: color .2s, background .2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nc:hover {
  color: rgba(255,255,255,.85);
  background: rgba(255,255,255,.05);
}
.nc.all {
  color: rgba(255,255,255,.55);
  border-right: 1px solid rgba(255,255,255,.1);
}
.nc.all:hover {
  color: #fff;
  background: rgba(255,255,255,.06);
}

/* active state — white on red */
.nc.active {
  background: var(--red);
  color: #fff !important;
  border-right-color: var(--red-dk);
}
.nc.active:hover {
  background: var(--red-lt);
  color: #fff;
}

/* mobile menu active */
.mm-link.active {
  color: #fff;
  background: var(--red);
  padding-left: 20px;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: rgba(255,255,255,.6);
  flex-shrink: 0;
}
.nav-hamburger:hover { color: #fff; }

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--dark);
  z-index: 500;
  flex-direction: column;
  overflow-y: auto;
}
.mobile-menu.open { display: flex; }

.mm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}
.mm-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}
.mm-close {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,.5);
  padding: 6px;
}
.mm-close:hover { color: #fff; }

.mm-search {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}

.mm-links { flex: 1; padding: 8px 0; }

.mm-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  font-size: .88rem;
  color: rgba(255,255,255,.6);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.05);
  font-weight: 500;
  transition: background .15s, color .15s;
}
.mm-link:hover { background: rgba(255,255,255,.05); color: #fff; }


.mm-divider {
  height: 1px;
  background: rgba(255,255,255,.07);
  margin: 6px 0;
}

.mm-rfq {
  padding: 16px 20px;
  flex-shrink: 0;
  border-top: 1px solid rgba(255,255,255,.07);
}
.mm-rfq a {
  display: block;
  background: var(--red);
  color: #fff;
  text-align: center;
  padding: 14px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .2s;
}
.mm-rfq a:hover { background: var(--red-lt); }

/* Responsive */
@media(max-width: 768px) {
  .nav-search { display: none; }
  .nav-acts { display: none; }
  .nav-hamburger { display: flex; }
  .nav-r2 { display: none; }
  .nav-r1 { height: 56px; }
}
/* nav-rfq button */
.nav-rfq {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--red);
  color: #fff;
  border: none;
  padding: 9px 18px;
  font-family: "Geist", sans-serif;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s;
  white-space: nowrap;
  position: relative;
}
.nav-rfq:hover { background: var(--red-lt); }

.rfq-badge {
  background: #fff;
  color: var(--red);
  font-size: .6rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mm-rfq {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.mm-rfq button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: var(--red);
  color: #fff;
  border: none;
  padding: 13px 18px;
  font-family: "Geist", sans-serif;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s;
}
.mm-rfq button:hover { background: var(--red-lt); }
.mm-rfq-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.4);
  font-size: .72rem;
  text-decoration: none;
  padding: 4px 0;
  transition: color .2s;
}
.mm-rfq-submit:hover { color: rgba(255,255,255,.7); }
.nav-lnk.active {
  color:white;        /* or #fff if your nav is dark */
  position: relative;
}

.nav-lnk.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--red);
}
/* ═══════════════════════════════════════════════════════════════
   Account Dropdown — Desktop
   prefix: nav-acct- / nad-
═══════════════════════════════════════════════════════════════ */

/* Wrapper — relative so dropdown is positioned against it */
.nav-acct-wrap {
  position: relative;
}

/* Trigger button — inherits nav-lnk base styles */
.nav-acct-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  padding: 0;
}
.nav-acct-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font-size: .65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-acct-caret {
  transition: transform .2s;
  flex-shrink: 0;
  opacity: .6;
}
.nav-acct-btn[aria-expanded="true"] .nav-acct-caret { transform: rotate(180deg); }

/* Dropdown panel */
.nav-acct-drop {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 220px;
  background: var(--white);
  border: 1px solid var(--rule);
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  border-radius: 4px;
  padding: 6px 0;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity .18s, transform .18s;
}
.nav-acct-drop.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

/* Arrow pointer on dropdown */
.nav-acct-drop::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 18px;
  width: 12px;
  height: 12px;
  background: var(--white);
  border-left: 1px solid var(--rule);
  border-top: 1px solid var(--rule);
  transform: rotate(45deg);
}

/* Header row */
.nad-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px 10px;
}
.nad-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font-size: .8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nad-name {
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nad-email {
  font-size: .7rem;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

/* Divider */
.nad-divider {
  height: 1px;
  background: var(--rule);
  margin: 4px 0;
}

/* Menu items */
.nad-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  font-size: .82rem;
  color: var(--ink-2);
  text-decoration: none;
  transition: background .12s, color .12s;
  cursor: pointer;
}
.nad-item svg { flex-shrink: 0; color: var(--ink-3); transition: color .12s; }
.nad-item:hover { background: var(--bg); color: var(--ink); }
.nad-item:hover svg { color: var(--ink); }

/* Sign out — red tint */
.nad-signout { color: var(--red); }
.nad-signout svg { color: var(--red); }
.nad-signout:hover { background: #fef2f2; color: var(--red-dk); }


/* ═══════════════════════════════════════════════════════════════
   Mobile account expand — inside mdPanel1
═══════════════════════════════════════════════════════════════ */

.md-acct-toggle .md-acct-caret {
  margin-left: auto;
  transition: transform .2s;
}

.md-acct-sub {
  background: rgba(255,255,255,.04);
  border-left: 2px solid var(--red);
  margin: 0 0 0 16px;
}

/* Sub-rows inherit md-row base but slightly indented */
.md-acct-sub .md-row-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px 11px 14px;
  font-size: .84rem;
  color: rgba(255,255,255,.7);
  text-decoration: none;
  transition: color .15s, background .15s;
  cursor: pointer;
}
.md-acct-sub .md-row-sub svg { flex-shrink: 0; opacity: .6; }
.md-acct-sub .md-row-sub:hover { color: var(--white); background: rgba(255,255,255,.05); }
.md-acct-sub .md-row-sub:hover svg { opacity: 1; }

/* Sign out row in mobile */
.md-row-signout { color: rgba(255, 100, 100, .85) !important; }
.md-row-signout svg { opacity: 1 !important; color: rgba(255, 100, 100, .85); }
.md-row-signout:hover { color: #ff6464 !important; background: rgba(192,39,45,.12) !important; }