/* =============================================
   BOUGH BUILT — Unified Navigation System
   Mobile-first nav styles
   ============================================= */

/* ─── Mobile Nav Toggle ───────────────────────── */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: var(--space-xs);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  transition: background 0.2s;
  flex-shrink: 0;
}

.nav-toggle:hover {
  background: rgba(255,255,255,0.05);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.nav-toggle--active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle--active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-toggle--active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ─── Cart Button in Nav ──────────────────────── */
.nav-cart-btn {
  position: relative;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 999px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-cart-btn:hover {
  color: var(--accent-gold);
  background: rgba(245, 166, 35, 0.06);
}

/* ─── Mobile Nav Menu States ──────────────────── */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(17, 17, 24, 0.98);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                padding 0.3s ease;
    gap: 0;
    z-index: 999;
  }

  .nav-menu--open {
    max-height: 480px;
    padding: var(--space-sm) 0;
  }

  .nav-menu .nav-link {
    display: block;
    padding: 12px var(--space-xl);
    font-size: 1rem;
    border-bottom: 1px solid rgba(42, 42, 56, 0.5);
    color: var(--text-secondary);
  }

  .nav-menu .nav-link:last-child {
    border-bottom: none;
  }

  .nav-menu .nav-link:hover,
  .nav-menu .nav-link.active {
    color: var(--accent-gold);
    background: rgba(245, 166, 35, 0.04);
  }

  .nav-menu .nav-link::after {
    display: none;
  }

  /* Desktop nav-inner layout on mobile stays the same */
  .nav-inner {
    padding: 0 var(--space-md);
  }
}

/* ─── Responsive Nav Tweaks ───────────────────── */
@media (max-width: 480px) {
  .site-nav .nav-logo {
    font-size: 1.1rem;
  }

  .site-nav .nav-logo-img {
    height: 20px;
    width: 20px;
  }

  .nav-cart-btn {
    font-size: 1.1rem;
    padding: 4px 6px;
  }
}
