:root {
  --city-header-height: 60px;
}

.city-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}

.top-nav.city-header {
  --city-header-right-inset: 1.5rem;
}

.city-header-inner {
  box-sizing: border-box;
  height: var(--city-header-height);
  padding: 0 var(--city-header-right-inset, 3.875rem) 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.city-header-start,
.city-header-links,
.city-switcher {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.city-header-start {
  gap: clamp(0.75rem, 3vw, 2rem);
  min-width: 0;
}

.city-header-start .nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  flex-shrink: 0;
}

.city-header-start .nav-brand-icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  color: #fff;
  background: #45545f;
}

.city-header-start .nav-brand-text {
  color: #64748b;
  font-size: 1.125rem;
  font-weight: 600;
}

.city-header-links,
.city-switcher {
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.city-switcher a {
  padding: 0.375rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  color: #475569;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.city-header-links a,
.city-header-links button {
  font-size: 14px !important;
}

.city-switcher a:hover,
.city-switcher a[aria-current="true"] {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

@media (max-width: 1040px) {
  .city-header-inner { padding-inline: 0.75rem; }
  .city-header-links a, .city-header-links button { padding-inline: 0.5rem !important; }

  .city-header-inner:has(.city-header-links) {
    --city-header-height: 96px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.25rem;
  }

  .city-header-start,
  .city-header-links {
    max-width: 100%;
  }

  .city-header-links {
    flex-shrink: 0;
    align-self: flex-end;
  }

  .top-nav + .map-shell {
    --city-header-height: 96px;
  }
}

@media (max-width: 360px) {
  .city-header-start .nav-brand-text { display: none; }
}
