/* Common site header styles */
/* Header is position:fixed via JS; #site-header div serves as spacer */
.site-header-bar {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  /* position, top, left, right, z-index are set by JS */
}
.site-header-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #1e293b;
  flex-shrink: 0;
}
.site-header-brand img {
  border-radius: 8px;
}
.site-header-brand-name {
  font-weight: 700;
  font-size: 16px;
  color: #1e293b;
  line-height: 1.2;
}
.site-header-brand-sub {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.2;
}
.site-header-nav {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: center;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.site-header-nav::-webkit-scrollbar {
  display: none;
}
.site-header-nav a {
  color: #475569;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s;
  flex-shrink: 0;
}
.site-header-nav a:hover {
  color: #6c5ce7;
}
.site-header-nav a.nav-active {
  color: #6c5ce7;
  font-weight: 700;
}
.site-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

/* --- Locale switcher (简/繁/EN) --- */
.site-header-locale {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}
.site-header-locale button {
  min-width: 30px;
  padding: 4px 8px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.site-header-locale button:hover {
  color: #6c5ce7;
}
.site-header-locale button.is-active {
  background: #fff;
  color: #6c5ce7;
  box-shadow: 0 1px 3px rgba(108, 92, 231, 0.2);
}
.site-header-btn {
  padding: 6px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s;
  flex-shrink: 0;
}
.site-header-btn--outline {
  border: 1px solid #e2e8f0;
  color: #475569;
  background: #fff;
}
.site-header-btn--outline:hover {
  border-color: #6c5ce7;
  color: #6c5ce7;
}
.site-header-btn--cta {
  background: linear-gradient(135deg, #6c5ce7, #a855f7);
  color: #fff;
  border: none;
  font-weight: 600;
}
.site-header-btn--cta:hover {
  opacity: 0.9;
}
.site-header-menu-btn {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.site-header-menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: #475569;
  border-radius: 1px;
}
.site-header-drawer {
  display: none;
}

/* Mobile */
@media (max-width: 768px) {
  .site-header-bar {
    padding: 10px 16px;
  }
  .site-header-nav {
    display: none;
  }
  .site-header-actions {
    display: none;
  }
  .site-header-menu-btn {
    display: flex;
  }
  .site-header-drawer {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 24px;
    gap: 12px;
  }
  .site-header-drawer[hidden] {
    display: none;
  }
  .site-header-drawer a {
    color: #475569;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
  }
  .site-header-drawer a:last-child {
    border-bottom: none;
  }
}
