/* Nuvorelix 4.7 · Navigation rebuilt from zero.
   These classes are intentionally independent from the legacy cm-* navbar. */

.nova-navbar{
  position:sticky;
  top:14px;
  z-index:1002;
  width:100%;
  margin:16px 0 22px;
  padding:0 18px;
  background:transparent;
}
.nova-navbar-shell{
  width:min(1280px,100%);
  min-height:72px;
  margin:0 auto;
  padding:9px 10px 9px 12px;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:18px;
  border:1px solid color-mix(in srgb,var(--c-line) 82%,transparent);
  border-radius:24px;
  background:color-mix(in srgb,var(--c-card) 88%,transparent);
  backdrop-filter:blur(18px) saturate(145%);
  -webkit-backdrop-filter:blur(18px) saturate(145%);
  box-shadow:0 16px 44px rgba(13,20,38,.09), inset 0 1px 0 rgba(255,255,255,.34);
}
.nova-brand{
  display:inline-flex;
  align-items:center;
  gap:10px;
  min-width:max-content;
  color:var(--c-text);
  text-decoration:none;
}
.nova-brand-mark{
  width:44px;
  height:44px;
  flex:0 0 44px;
  display:grid;
  place-items:center;
  border-radius:14px;
  background:linear-gradient(145deg,#1a2949,#111b34 62%,#6454ed);
  color:#fff;
  font:800 15px/1 'IBM Plex Mono',monospace;
  box-shadow:0 10px 24px rgba(38,49,88,.18);
}
.nova-brand-copy{display:grid;gap:1px;line-height:1.1}
.nova-brand-copy strong{font-size:16px;letter-spacing:-.45px;color:var(--c-text)}
.nova-brand-copy small{font-size:9px;letter-spacing:.02em;color:var(--c-soft);white-space:nowrap}

.nova-desktop-links{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:3px;
  min-width:0;
}
.nova-desktop-links a{
  min-height:42px;
  display:inline-flex;
  align-items:center;
  padding:0 12px;
  border-radius:14px;
  color:var(--c-muted);
  text-decoration:none;
  font-size:12.5px;
  font-weight:750;
  transition:background .18s ease,color .18s ease,transform .18s ease;
}
.nova-desktop-links a:hover{background:var(--c-card-2);color:var(--c-text);transform:translateY(-1px)}
.nova-desktop-links a.active{
  color:var(--c-text);
  background:color-mix(in srgb,var(--c-primary) 10%,var(--c-card));
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--c-primary) 12%,transparent);
}

.nova-desktop-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;min-width:max-content}
.nova-search-button,
.nova-cart-button,
.nova-theme-button,
.nova-login-button,
.nova-account>summary{
  min-height:44px;
  border:1px solid var(--c-line);
  border-radius:14px;
  background:color-mix(in srgb,var(--c-card) 94%,transparent);
  color:var(--c-text);
  box-shadow:none;
}
.nova-search-button,
.nova-cart-button{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:0 12px;
  text-decoration:none;
  font-size:12px;
  font-weight:760;
}
.nova-search-button{cursor:pointer;font-family:inherit}
.nova-search-button svg,
.nova-cart-button svg,
.nova-drawer-tools svg{
  width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;
}
.nova-search-button kbd{
  margin-left:2px;
  padding-left:8px;
  border-left:1px solid var(--c-line);
  color:var(--c-soft);
  background:none;
  font:600 9px/1 'IBM Plex Mono',monospace;
}
.nova-cart-button b{
  min-width:20px;height:20px;padding:0 5px;display:grid;place-items:center;border-radius:999px;
  background:var(--c-primary);color:#fff;font-size:9px;
}
.nova-theme-button{
  width:44px;padding:0;display:grid;place-items:center;cursor:pointer;font-size:14px;
}
.nova-login-button{
  padding:0 16px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;
  background:linear-gradient(135deg,var(--c-primary-2),var(--c-primary));color:#fff;border-color:transparent;font-size:12px;font-weight:800;
}
.nova-account{position:relative}
.nova-account>summary{
  min-width:128px;
  padding:0 10px;
  display:flex;
  align-items:center;
  gap:8px;
  list-style:none;
  cursor:pointer;
  font-size:12px;
  font-weight:780;
}
.nova-account>summary::-webkit-details-marker{display:none}
.nova-account>summary i{margin-left:auto;color:var(--c-soft);font-style:normal;font-size:10px}
.nova-avatar{
  width:28px;height:28px;flex:0 0 28px;display:grid;place-items:center;border-radius:10px;
  background:linear-gradient(135deg,var(--c-primary-2),var(--c-primary));color:#fff;font-size:10px;font-weight:900;
}
.nova-avatar.large{width:40px;height:40px;flex-basis:40px;border-radius:13px;font-size:13px}
.nova-account-popover{
  position:absolute;
  top:calc(100% + 10px);
  right:0;
  width:290px;
  padding:10px;
  display:grid;
  gap:4px;
  border:1px solid var(--c-line);
  border-radius:20px;
  background:var(--c-card);
  box-shadow:0 24px 68px rgba(11,17,32,.18);
  z-index:1010;
}
.nova-account-heading{display:flex;gap:10px;align-items:center;padding:10px 10px 13px;border-bottom:1px solid var(--c-line);margin-bottom:4px}
.nova-account-heading div{min-width:0;display:grid;gap:2px}
.nova-account-heading strong,.nova-account-heading small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nova-account-heading strong{font-size:12px}.nova-account-heading small{font-size:10px;color:var(--c-soft)}
.nova-account-popover>a{min-height:40px;padding:0 10px;border-radius:11px;display:flex;align-items:center;justify-content:space-between;color:var(--c-text);text-decoration:none;font-size:12px;font-weight:650}
.nova-account-popover>a:hover{background:var(--c-card-2)}
.nova-account-popover>a.danger{color:#d85d68}

.nova-menu-toggle{display:none}
.nova-mobile-overlay,.nova-mobile-drawer{display:none}

/* Tablet / mobile: one isolated overlay navigation. */
@media(max-width:1024px){
  .nova-navbar{
    top:12px;
    margin:16px 0 18px;
    padding:0 12px;
  }
  .nova-navbar-shell{
    min-height:64px;
    padding:8px 9px 8px 10px;
    grid-template-columns:minmax(0,1fr) auto;
    gap:10px;
    border-radius:20px;
  }
  .nova-brand-mark{width:40px;height:40px;flex-basis:40px;border-radius:13px;font-size:13px}
  .nova-brand-copy strong{font-size:15px}
  .nova-brand-copy small{display:none}
  .nova-desktop-links,.nova-desktop-actions{display:none!important}
  .nova-menu-toggle{
    width:48px;
    height:48px;
    padding:0;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:5px;
    border:1px solid var(--c-line);
    border-radius:16px;
    background:var(--c-card);
    color:var(--c-text);
    cursor:pointer;
    z-index:1007;
  }
  .nova-menu-toggle span{
    width:20px;
    height:2px;
    flex:0 0 2px;
    border-radius:999px;
    background:currentColor;
    transform-origin:center;
    transition:transform .24s cubic-bezier(.2,.8,.2,1),opacity .16s ease,width .16s ease;
  }
  .nova-menu-toggle.is-open span:nth-child(1){transform:translateY(7px) rotate(45deg)}
  .nova-menu-toggle.is-open span:nth-child(2){opacity:0;width:0}
  .nova-menu-toggle.is-open span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}

  .nova-mobile-overlay{
    position:fixed;
    inset:0;
    display:block;
    z-index:997;
    border:0;
    background:rgba(7,11,20,.48);
    opacity:0;
    pointer-events:none;
    transition:opacity .22s ease;
    backdrop-filter:blur(3px);
  }
  .nova-mobile-drawer{
    position:fixed;
    top:92px;
    right:12px;
    width:min(88vw,360px);
    max-height:calc(100dvh - 106px);
    display:grid;
    gap:16px;
    padding:18px;
    overflow:auto;
    overscroll-behavior:contain;
    z-index:1001;
    border:1px solid var(--c-line);
    border-radius:24px;
    background:color-mix(in srgb,var(--c-card) 96%,transparent);
    box-shadow:0 28px 80px rgba(7,11,24,.24);
    transform:translateX(calc(100% + 28px));
    opacity:0;
    pointer-events:none;
    transition:transform .26s cubic-bezier(.2,.8,.2,1),opacity .2s ease;
  }
  body.nova-menu-open{overflow:hidden!important}
  body.nova-menu-open .nova-mobile-overlay{opacity:1;pointer-events:auto}
  body.nova-menu-open .nova-mobile-drawer{transform:translateX(0);opacity:1;pointer-events:auto}
  body.nova-menu-open :is(.cm-mobile-dock,.cm-mobile-buybar,.cm-compare-tray){opacity:0!important;pointer-events:none!important;transform:translateY(120%)!important}

  .nova-drawer-intro{display:grid;gap:4px;padding:2px 2px 0}
  .nova-drawer-intro span{font-size:9px;letter-spacing:.16em;color:var(--c-primary-2);font-weight:850}
  .nova-drawer-intro strong{font-size:20px;letter-spacing:-.7px;color:var(--c-text)}
  .nova-mobile-links{display:grid;gap:7px}
  .nova-mobile-links a{
    min-height:50px;
    padding:0 14px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    border:1px solid transparent;
    border-radius:15px;
    color:var(--c-muted);
    text-decoration:none;
    background:var(--c-card-2);
    font-size:13px;
    font-weight:760;
  }
  .nova-mobile-links a i{font-style:normal;color:var(--c-soft);font-size:12px}
  .nova-mobile-links a.active{color:var(--c-text);background:color-mix(in srgb,var(--c-primary) 11%,var(--c-card));border-color:color-mix(in srgb,var(--c-primary) 18%,var(--c-line))}
  .nova-drawer-tools{display:grid;grid-template-columns:1fr 1fr 52px;gap:8px;padding-top:14px;border-top:1px solid var(--c-line)}
  .nova-drawer-tools>button,.nova-drawer-tools>a{
    min-width:0;
    min-height:54px;
    padding:9px 11px;
    border:1px solid var(--c-line);
    border-radius:16px;
    background:var(--c-card);
    color:var(--c-text);
    text-decoration:none;
    display:flex;
    align-items:center;
    gap:9px;
    font:inherit;
    text-align:left;
  }
  .nova-drawer-tools svg{flex:0 0 16px}
  .nova-drawer-tools>*>span{min-width:0;display:grid;gap:1px}
  .nova-drawer-tools strong{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .nova-drawer-tools small{font-size:8.5px;color:var(--c-soft);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .nova-drawer-cart{position:relative}
  .nova-drawer-cart>b{position:absolute;top:7px;right:7px;min-width:18px;height:18px;padding:0 4px;border-radius:999px;background:var(--c-primary);color:#fff;display:grid;place-items:center;font-size:8px}
  .nova-drawer-theme{width:52px!important;padding:0!important;justify-content:center!important}
  .nova-drawer-theme>span:not(.theme-icon){display:none!important}
  .nova-drawer-theme .theme-icon{font-size:14px}
  .nova-drawer-account{padding-top:14px;border-top:1px solid var(--c-line);display:grid;gap:10px}
  .nova-drawer-user{display:flex;align-items:center;gap:10px;min-width:0}
  .nova-drawer-user>div{display:grid;gap:2px;min-width:0}
  .nova-drawer-user strong,.nova-drawer-user small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .nova-drawer-user strong{font-size:12px}.nova-drawer-user small{font-size:9px;color:var(--c-soft)}
  .nova-drawer-account-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
  .nova-drawer-account-actions a,.nova-drawer-login,.nova-drawer-admin{
    min-height:42px;padding:0 10px;border-radius:13px;display:flex;align-items:center;justify-content:center;text-align:center;text-decoration:none;border:1px solid var(--c-line);background:var(--c-card-2);color:var(--c-text);font-size:10px;font-weight:760;
  }
  .nova-drawer-login{min-height:48px;justify-content:space-between;padding:0 14px;background:linear-gradient(135deg,var(--c-primary-2),var(--c-primary));border-color:transparent;color:#fff;font-size:12px}
  .nova-drawer-admin{font-size:10px}
}

@media(max-width:520px){
  .nova-navbar{margin-top:14px;padding-inline:10px}
  .nova-navbar-shell{min-height:62px;border-radius:19px}
  .nova-mobile-drawer{top:88px;right:10px;width:calc(100vw - 20px);max-height:calc(100dvh - 100px);border-radius:22px;padding:16px}
  .nova-drawer-tools{grid-template-columns:minmax(0,1fr) minmax(0,.72fr) 50px}
  .nova-drawer-search small,.nova-drawer-cart small{display:none}
  .nova-drawer-account-actions a{font-size:9.5px}
}

html[data-theme="dark"] .nova-navbar-shell,
html[data-theme="dark"] .nova-mobile-drawer{
  box-shadow:0 20px 54px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.04);
}

@media(prefers-reduced-motion:reduce){
  .nova-menu-toggle span,.nova-mobile-overlay,.nova-mobile-drawer,.nova-desktop-links a{transition:none!important}
}
