/* 顶部导航栏 top-header：默认显示在最上方，滚动后自然消失 */
.top-header {
  width: 100%;
  height: 60px;
  background-color: #1a1a1a;
  color: white;
  position: relative;  /* ✅ 关键：改成 relative，让它能被滚动走 */
  z-index: 130000;
}

/* 顶部导航容器 */
.top-header .wrapper {
  max-width: 1200px;               /* 最大宽度 */
  width: 100%;
  margin: 0 auto;
  display: flex;                   /* Flex布局 */
  justify-content: space-between; /* 两端对齐 */
  align-items: center;            /* 垂直居中 */
  height: 100%;                   /* 高度继承 */
  padding: 0 20px;                /* 左右内边距 */
}

/* 左侧Logo */
.top-header .left .site-logo {
  height: 36px;
}

/* 右侧图标组 */
.right-icons {
  display: flex;
  align-items: center;
  gap: 20px;                      /* 图标之间间距 */
}

/* 图标通用样式 */
.icon-item {
  position: relative;
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* 图标图片样式 */
.icon-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  transition: transform 0.3s, opacity 0.3s;
}

/* 悬停放大、透明度降低 */
.icon-item:hover img {
  transform: scale(1.1);
  opacity: 0.85;
}

/* 商城按钮样式（蓝底+文字） */
.icon-item.store {
  width: auto;
  height: 40px;
  background-color: #0073e6;
  padding: 0 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-item.store img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.icon-item.store .label {
  font-size: 14px;
  color: white;
  font-weight: bold;
}

/* 下拉菜单 */
.dropdown {
  display: none;
  position: absolute;
  top: 110%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #222;
  border-radius: 4px;
  padding: 10px;
  z-index: 29999;
  min-width: 140px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  text-align: left;
}



/* 下拉链接样式 */
.dropdown a {
  display: block;
  color: #ccc;
  padding: 8px;
  text-decoration: none;
  font-size: 13px;
  transition: background-color 0.2s;
}

.dropdown a:hover {
  background-color: #333;
  color: #fff;
}

/* 搜索输入框弹窗 */
.search-box {
  display: none;
  position: absolute;
  top: 110%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #222;
  padding: 8px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 29999;
  width: 200px;
}

.search-box input[type="text"] {
  width: 100%;
  padding: 6px 10px;
  border: none;
  border-radius: 4px;
  background-color: #333;
  color: white;
  font-size: 13px;
}

/* 第二层导航栏 navbar：默认流式显示，滚动时吸顶 */
.navbar {
  position: relative;
  margin-top: 0px;  /* 初始状态用于避开 top-header */
  z-index: 999;
  background-color: rgba(0, 0, 0, 0.8);
  height: 60px;
  transition: all 0.3s ease;
}

.navbar.sticky {
  position: fixed;
  top: 0;
  margin-top: 0;  /* ✅ 重点：吸顶后去掉间距 */
  left: 0;
  width: 100%;
  z-index: 9999;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}



/* 导航栏内部布局 */
.navbar .wrapper {
  height: 100%;
  padding: 0 40px;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo */
.navbar .logo {
  font-size: 1.2em;
  font-weight: bold;
  color: white;
}

/* 菜单链接 */
.navbar .menu a {
  margin-left: 25px;
  text-decoration: none;
  color: white;
  font-size: 1em;
  transition: color 0.3s;
}

.navbar .menu a:hover {
  color: #ffdd88;
}
