/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: flex;
  justify-content: center;
}

.navbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 90%;
}

.navbar-left {
  display: flex;
  align-items: center;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  margin-right: 40px;
}

.menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu-item {
  color: #191a24;
  cursor: pointer;
  display: block;
  font-size: 14px;
  line-height: 60px;
  padding: 0 12px;
}

.menu-item span {
  position: relative;
  display: inline-block;
}

.menu-item span::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #007bff;
  transition: width 0.3s ease;
}

.menu-item:hover span::after,
.menu-item.active span::after {
  width: 100%;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-text {
  cursor: pointer;
  color: #191a24;
  display: block;
  font-size: 14px;
  line-height: 60px;
  white-space: nowrap;
}

.nav-text:hover {
  color: #007bff;
}

.nav-button {
  padding: 8px 16px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.nav-button:hover {
  background-color: #0056b3;
}

/* 下拉面板样式 */
.dropdown-panel {
  position: fixed;
  top: 70px;
  left: 5%;
  width: 90%;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: none;
  z-index: 999;
}

.dropdown-panel.show {
  display: block;
}

.dropdown-content {
  position: relative;
  display: flex;
  padding: 20px;
  max-height: 400px;
}

.close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  font-size: 36px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
}

.close-button:hover {
  color: #333;
}

/* 一级分类样式 */
.primary-category {
  width: 200px;
  padding-right: 20px;
  border-right: 1px solid #eee;
  overflow-y: auto;
}

.category-group {
  display: none;
}

.category-group.active {
  display: block;
}

.primary-item {
  padding: 10px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.primary-item span {
  position: relative;
  display: inline-block;
}

.primary-item span::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #007bff;
  transition: width 0.3s ease;
}

.primary-item:hover span::after,
.primary-item.active span::after {
  width: 100%;
}

/* 二级分类样式 */
.secondary-category {
  flex: 1;
  padding-left: 20px;
  overflow-y: auto;
}

.product-list {
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.product-list.active {
  display: grid;
}

.product-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.secondary-title {
  font-weight: bold;
  color: #007bff;
  margin-bottom: 10px;
}

.product-item {
  color: #091221;
  cursor: pointer;
  line-height: 22px;
  position: relative;
  transition: color 0.3s ease-out;
}

.product-item:hover {
  color: #007bff;
}

/* 自定义滚动条样式 */
.primary-category::-webkit-scrollbar,
.secondary-category::-webkit-scrollbar {
  width: 6px;
}

.primary-category::-webkit-scrollbar-track,
.secondary-category::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.primary-category::-webkit-scrollbar-thumb,
.secondary-category::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}

.primary-category::-webkit-scrollbar-thumb:hover,
.secondary-category::-webkit-scrollbar-thumb:hover {
  background: #555;
}
