/* ===============================
   NAV / HEADER
   =============================== */

:root {
  --header-h: 58px;
}

/* ── Site header wrapper ── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(8, 12, 22, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Scrolled state — slightly more opaque */
.site-header.scrolled {
  background: rgba(8, 12, 22, 0.98);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

/* Push page content below fixed header */
body {
  padding-top: var(--header-h);
}

/* ── Nav container ── */
.nav {
  max-width: 1050px;
  margin-left: 32px;
  margin-right: auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  min-height: var(--header-h);
  padding: 0;
}

/* ── Logo ── */
.logo a {
  display: inline-flex;
  align-items: center;
}

.logo img {
  height: 48px;
  width: auto;
  display: block;
}

/* ── Main nav ── */
.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-item {
  position: relative;
  height: 48px;
  display: flex;
  align-items: center;
}

/* ── Nav links ── */
.nav-link {
  color: #d1d7e0;
  font-weight: 630;
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s ease;
}

button.nav-link {
  background: transparent;
  border: none;
  font: inherit;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 630;
  font-size: 0.90rem;
  line-height: 1;
  text-align: left;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  transition: color 0.2s ease;
}

button.nav-link:focus-visible {
  outline: 2px solid #62e6a5;
  outline-offset: 4px;
}

.nav-link:hover {
  color: #00D084;
}

/* ── Chevron / caret ── */
.nav-with-caret {
  gap: 0.45rem;
}

.nav-caret {
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-top: -2px;
  opacity: 0.75;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.has-mega:hover .nav-caret {
  transform: rotate(-180deg);
  opacity: 1;
}

/* ── Mega menu open state ── */
.has-mega.open > .nav-link,
.has-mega.mega-open > .nav-link {
  color: #62e6a5;
  background: rgba(98, 230, 165, 0.08);
  border-radius: 6px;
  padding: 4px 8px;
}

.has-mega:not(.open):not(.mega-open) > .nav-link {
  background: transparent;
}

/* ── Hamburger (hidden desktop) ── */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 24px;
  margin: 6px 0;
  background: #fff;
  border-radius: 2px;
}

.nav-overlay {
  display: none;
}

/* ── Desktop ── */
@media (min-width: 1025px) {
  .main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
  }
}

/* ── Mobile / Tablet ── */
@media (max-width: 1024px) {

  .nav {
    margin-left: 0 !important;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: var(--header-h);
  }

  .nav-toggle {
    display: flex !important;
    position: relative;
    z-index: 2100;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    cursor: pointer;
    margin-right: -10px;
  }

  .nav-toggle span {
    transition: all 0.3s ease-in-out;
    position: absolute;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
  }

  .nav-toggle span:nth-child(1) { transform: translateY(-8px); }
  .nav-toggle span:nth-child(2) { opacity: 1; }
  .nav-toggle span:nth-child(3) { transform: translateY(8px); }

  .nav-toggle.is-active span:nth-child(1) { transform: translateY(0) rotate(45deg); }
  .nav-toggle.is-active span:nth-child(2) { opacity: 0; transform: translateX(-10px); }
  .nav-toggle.is-active span:nth-child(3) { transform: translateY(0) rotate(-45deg); }

  /* Drawer */
  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    width: 100vw;
    height: calc(100vh - var(--header-h));
    background: #080c16;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 2000;
    overflow-y: auto;
  }

  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-item {
    width: 100%;
    height: auto;
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-link {
    width: 100%;
    padding: 18px 0;
    margin-left: 0 !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    color: white;
  }

  .nav-link .nav-caret {
    display: block !important;
    border-color: #ffffff;
    opacity: 1;
    transition: transform 0.3s ease;
  }

  .nav-item.open > .nav-link .nav-caret {
    transform: rotate(-135deg);
    border-color: #62e6a5;
  }

  .nav-item:not(.open) > .nav-link .nav-caret {
    transform: rotate(45deg);
    border-color: #ffffff;
  }

  .nav-item:not(.open) > .nav-link {
    color: #ffffff !important;
    background: transparent !important;
  }

  /* Mobile mega menu */
  .mega-menu {
    position: static;
    display: none;
    width: 100%;
    padding-bottom: 20px;
  }

  .nav-item.open > .mega-menu { display: block; }

  .mega-inner {
    display: flex;
    flex-direction: column;
    padding-left: 15px;
  }

  .mega-left {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .has-mega.open > .nav-link {
    color: #62e6a5 !important;
    background: transparent !important;
  }

  .mega-tab {
    width: 100%;
    text-align: left;
    padding: 12px 0;
    background: transparent;
    border: none;
    color: white;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
  }

  .mega-content { width: 100%; margin-top: 15px; }
  .mega-panel { display: none; }
  .mega-panel.active { display: block; }

  .product-grid,
  .mega-tiles {
    display: flex;
    flex-direction: column;
    gap: 15px;
  }

  .nav-overlay { display: none !important; }
}

@media (max-width: 860px) {
  .main-nav { gap: 1.25rem; }
}


nav a {
  margin-left: 2rem;
  color: #d1d7e0;
  text-decoration: none;
  font-size: 0.95rem;
}
