/* Editorial header navigation & brand bar */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(to bottom, rgba(10, 14, 18, 0.58), transparent);
  transition: background var(--dur) var(--ease), border-color var(--dur) ease, box-shadow var(--dur) ease;
  border-bottom: 1px solid transparent;
}

.site-nav.scrolled {
  background: rgba(14, 35, 46, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.18);
}

body[data-brand="devaramane"] .site-nav.scrolled { background: rgba(46, 31, 8, 0.94); }
body[data-brand="udugore"] .site-nav.scrolled { background: rgba(13, 22, 54, 0.94); }

.nav-bar {
  height: var(--header-h);
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.menu-trigger {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: var(--r-sm);
}

.nav-brand-logo { display: flex; align-items: center; justify-content: center; }

.nav-brand-logo img {
  height: 32px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.nav-icon-wrap { position: relative; }

.nav-icon-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.88);
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease;
}

.nav-icon-btn:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.nav-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--brand-gold);
  color: #14120E;
  font-size: 9px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.nav-badge--wish { background: #C2413B; color: #fff; }

.nav-user-initial {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile brand segmented bar */
.brand-bar {
  height: var(--brand-bar-h);
  display: flex;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 14, 18, 0.45);
  backdrop-filter: blur(10px);
}

.brand-seg { display: flex; width: 100%; height: 100%; position: relative; }

.brand-seg::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 33.333%;
  height: 2px;
  background: var(--brand-gold);
  transition: left var(--dur) var(--ease);
  pointer-events: none;
}

.brand-seg[data-active-index="1"]::before { left: 33.333%; }
.brand-seg[data-active-index="2"]::before { left: 66.666%; }

.brand-seg__btn {
  flex: 1;
  position: relative;
  z-index: 1;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.68);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  transition: color var(--dur) ease;
}

.brand-seg__btn:last-child { border-right: none; }
.brand-seg__btn.active { color: #fff; font-weight: 700; }

/* Desktop navigation */
@media (min-width: 768px) {
  .brand-bar { display: none; }
  .nav-bar { padding: 0 40px; }

  .nav-pills {
    display: flex;
    align-items: center;
    gap: 20px;
  }

  .nav-pill {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.68);
    padding: 8px 0;
    position: relative;
    white-space: nowrap;
    transition: color 0.25s var(--ease);
  }

  .nav-pill::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1.5px;
    background: var(--brand-gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.28s var(--ease);
  }

  .nav-pill:hover { color: #fff; }
  .nav-pill.active { color: #fff; }
  .nav-pill.active::after { transform: scaleX(1); }

  .nav-brand-logo--center { position: absolute; left: 50%; transform: translateX(-50%); }

  .nav-right { display: flex; align-items: center; gap: 14px; margin-left: auto; }

  .nav-link {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
    padding: 6px 4px;
    transition: color 0.2s;
  }

  .nav-link:hover { color: #fff; }

  .nav-actions {
    display: flex;
    gap: 4px;
    margin-left: 8px;
    padding-left: 14px;
    border-left: 1px solid rgba(255, 255, 255, 0.18);
  }

  .nav-actions .nav-icon-btn { width: 34px; height: 34px; border: 1px solid transparent; }
  .nav-actions .nav-icon-btn:hover { border-color: rgba(255, 255, 255, 0.22); }
}
