/* ===== 头部导航栏样式 ===== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
}

.header-top {
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
}

.header-top .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}

/* Logo 区域 */
.header-left {
  display: flex;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-primary), var(--color-mint));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary);
}

.logo-en {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-left: 4px;
}

/* 搜索框区域 */
.header-center {
  flex: 1;
  max-width: 480px;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-body);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 4px 8px;
  transition: all 0.3s ease;
}

.search-box:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(123,147,255,0.1);
  transform: translateY(-1px);
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 16px;
  font-size: var(--text-sm);
  outline: none;
  color: var(--text-primary);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-btn,
.voice-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg-card);
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 16px;
}

.search-btn:hover,
.voice-btn:hover {
  background: var(--color-primary);
  color: white;
  transform: scale(1.05);
}

/* 右侧操作区 */
.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.message-btn {
  position: relative;
  font-size: 22px;
  text-decoration: none;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.message-btn:hover {
  color: var(--color-primary);
}

.message-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--color-danger);
  color: white;
  font-size: 10px;
  min-width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  transition: background 0.2s ease;
}

.user-menu:hover {
  background: var(--bg-body);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--color-primary);
  object-fit: cover;
}

.user-name {
  font-size: var(--text-sm);
  color: var(--text-primary);
  font-weight: 500;
}

/* 登录注册按钮 */
.btn-login {
  padding: 10px 24px;
  font-size: var(--text-sm);
}

/* 二级分类导航 */
.header-nav {
  background: var(--bg-card);
}

.header-nav .container {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  gap: 8px;
  padding: 12px 0;
  width: 100%;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.nav-item:hover {
  background: rgba(123,147,255,0.08);
  color: var(--color-primary);
}

.nav-item.active {
  background: var(--color-primary);
  color: white;
}

.nav-icon {
  font-size: 16px;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.mobile-menu-btn span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* 响应式 */
@media (max-width: 992px) {
  .header-center {
    order: 3;
    max-width: 100%;
    flex-basis: 100%;
    padding-top: 12px;
  }

  .search-box {
    width: 100%;
  }

  .header-top .container {
    flex-wrap: wrap;
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: flex;
  }

  .nav-list {
    display: none;
  }

  .logo-en {
    display: none;
  }

  .user-name {
    display: none;
  }
}
