/* =============================================
   MLAB 3D — navbar.css
   Separate file — linked in base.html
   place at: home/static/home/css/navbar.css
============================================= */

/* ── BASE NAVBAR ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  /* z-index: 9000; */
  padding: 0;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.navbar.scrolled {
  background: rgba(10, 11, 14, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* Inner row */
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* ── LOGO ── */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo-img {
  height: 44px;
  width: auto;
  object-fit: contain;
  display: block;
}
.logo-fallback {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-mark {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1E6FFF, #0F4FCC);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Orbitron', sans-serif;
  font-weight: 900; font-size: 1.1rem;
  color: #fff;
  box-shadow: 0 4px 16px rgba(30,111,255,0.45);
  flex-shrink: 0;
}
.logo-text    { display: flex; flex-direction: column; }
.logo-main    { font-family: 'Orbitron', sans-serif; font-size: 1rem; font-weight: 700; color: #F0F4FF; }
.logo-main em { color: #4D93FF; font-style: normal; }
.logo-sub     { font-size: 0.58rem; color: #7A8299; letter-spacing: 0.1em; }

/* ── CENTER LINKS (desktop) ── */
.nav-center {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  list-style: none;
  margin: 0; padding: 0;
  flex: 1;
  justify-content: center;
}
.nav-center li a {
  display: block;
  padding: 8px 12px;
  color: #C0C8D8;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.nav-center li a:hover {
  color: #F0F4FF;
  background: rgba(255,255,255,0.06);
}

/* ── RIGHT ACTIONS ── */
.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Ghost (Login) */
.nav-btn-ghost {
  display: inline-flex; align-items: center;
  padding: 8px 16px;
  border: 1px solid rgba(30,111,255,0.4);
  border-radius: 10px;
  color: #4D93FF;
  font-size: 0.84rem; font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
  background: rgba(30,111,255,0.08);
}
.nav-btn-ghost:hover {
  background: rgba(30,111,255,0.18);
  border-color: #1E6FFF;
  color: #fff;
}

/* Solid (Register) */
.nav-btn-solid {
  display: inline-flex; align-items: center;
  padding: 8px 16px;
  background: linear-gradient(135deg, #1E6FFF, #0F4FCC);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 0.84rem; font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
  box-shadow: 0 2px 12px rgba(30,111,255,0.35);
}
.nav-btn-solid:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(30,111,255,0.5);
}

/* ── USER PILL + DROPDOWN ── */
.nav-user {
  position: relative;
}
.nav-user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(30,111,255,0.1);
  border: 1px solid rgba(30,111,255,0.25);
  border-radius: 100px;
  padding: 5px 12px 5px 5px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.nav-user-pill:hover {
  background: rgba(30,111,255,0.2);
  border-color: #1E6FFF;
}
.nav-av {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1E6FFF, #0F4FCC);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem; font-weight: 700;
  color: #fff; flex-shrink: 0;
}
.nav-uname {
  font-size: 0.83rem; font-weight: 500; color: #F0F4FF;
  max-width: 80px; overflow: hidden; text-overflow: ellipsis;
}
.nav-caret {
  color: #7A8299;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.nav-user-pill[aria-expanded="true"] .nav-caret {
  transform: rotate(180deg);
}

/* Dropdown */
.nav-drop {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 230px;
  background: #0F1117;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.97);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 9999;
  overflow: hidden;
}
.nav-drop.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0) scale(1);
}
.drop-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 12px;
}
.drop-av {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1E6FFF, #0F4FCC);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.78rem; font-weight: 700;
  color: #fff; flex-shrink: 0;
}
.drop-name  { font-size: 0.88rem; font-weight: 600; color: #F0F4FF; margin: 0 0 2px; }
.drop-email { font-size: 0.72rem; color: #7A8299; margin: 0; word-break: break-all; }
.drop-sep   { height: 1px; background: rgba(255,255,255,0.08); margin: 0; }
.drop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  color: #C0C8D8;
  text-decoration: none;
  font-size: 0.85rem;
  transition: background 0.15s, color 0.15s;
}
.drop-item:hover { background: rgba(30,111,255,0.1); color: #fff; }
.drop-logout { color: #e63946 !important; }
.drop-logout:hover { background: rgba(230,57,70,0.1) !important; }

/* ── CART ── */
.nav-cart {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  background: rgba(30,111,255,0.1);
  border: 1px solid rgba(30,111,255,0.3);
  border-radius: 10px;
  color: #F0F4FF;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.nav-cart:hover { background: rgba(30,111,255,0.22); border-color: #1E6FFF; }
.nav-cart-count {
  position: absolute;
  top: -6px; right: -6px;
  min-width: 18px; height: 18px;
  background: #FF7A1A;
  color: #fff;
  font-size: 0.62rem; font-weight: 700;
  border-radius: 100px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

/* ── HAMBURGER (hidden on desktop) ── */
.nav-ham {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  width: 42px; height: 42px;
  align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nav-ham span {
  display: block;
  width: 20px; height: 2px;
  background: #F0F4FF;
  border-radius: 2px;
  transition: all 0.25s ease;
}
.nav-ham.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-ham.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-ham.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =============================================
   MOBILE OVERLAY
============================================= */
.mob-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(3px);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.mob-overlay.open {
  display: block;
  opacity: 1;
}

/* =============================================
   MOBILE DRAWER (slides in from right)
============================================= */
.mob-drawer {
  position: fixed;
  top: 0; right: 0;
  width: min(320px, 85vw);
  height: 100vh;
  background: #0F1117;
  border-left: 1px solid rgba(255,255,255,0.1);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}
.mob-drawer.open {
  transform: translateX(0);
}

/* Drawer header */
.mob-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.2rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.mob-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.mob-av {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1E6FFF, #0F4FCC);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.82rem; font-weight: 700;
  color: #fff; flex-shrink: 0;
}
.mob-uname  { font-size: 0.88rem; font-weight: 600; color: #F0F4FF; margin: 0 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mob-uemail { font-size: 0.72rem; color: #7A8299; margin: 0; word-break: break-all; }
.mob-logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

/* Close button */
.mob-close {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #7A8299;
  font-size: 1rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}
.mob-close:hover { background: rgba(255,255,255,0.12); color: #F0F4FF; }

/* Nav links inside drawer */
.mob-nav {
  padding: 0.75rem 0.75rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.mob-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  color: #C0C8D8;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.mob-link:hover { background: rgba(255,255,255,0.06); color: #F0F4FF; }
.mob-icon { font-size: 1.1rem; flex-shrink: 0; width: 22px; text-align: center; }
.mob-sep {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 6px 0;
}
.mob-logout { color: #e63946 !important; }
.mob-logout:hover { background: rgba(230,57,70,0.08) !important; }

/* Auth buttons inside drawer */
.mob-auth-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  padding: 0 2px;
}
.mob-btn-ghost {
  display: flex; align-items: center; justify-content: center;
  padding: 12px;
  border: 1px solid rgba(30,111,255,0.4);
  border-radius: 10px;
  color: #4D93FF;
  font-size: 0.88rem; font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  background: rgba(30,111,255,0.08);
}
.mob-btn-ghost:hover { background: rgba(30,111,255,0.18); color: #fff; }
.mob-btn-solid {
  display: flex; align-items: center; justify-content: center;
  padding: 12px;
  background: linear-gradient(135deg, #1E6FFF, #0F4FCC);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 0.88rem; font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 2px 12px rgba(30,111,255,0.35);
}
.mob-btn-solid:hover { transform: translateY(-1px); }

/* =============================================
   RESPONSIVE BREAKPOINTS
============================================= */

/* Tablet — tighten up center links */
@media (max-width: 1024px) {
  .nav-center li a { padding: 8px 8px; font-size: 0.82rem; }
}

/* Mobile — hide desktop items, show hamburger */
@media (max-width: 768px) {
  .nav-center     { display: none; }   /* hide desktop links */
  .nav-btn-ghost  { display: none; }   /* hide desktop login */
  .nav-btn-solid  { display: none; }   /* hide desktop register */
  .nav-user       { display: none; }   /* hide desktop user pill */
  .nav-ham        { display: flex; }   /* show hamburger */
}