/* 导航栏样式 */
.navbar {
  background-color: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar .container {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  margin-right: 40px;
}

.logo img {
  height: 40px;
}

.logo-text {
  font-size: 18px;
  font-weight: bold;
  color: var(--primary-color);
  margin-left: 10px;
}

.desktop-nav ul {
  display: flex;
  list-style: none;
}

.desktop-nav li {
  position: relative;
  margin-left: 30px;
}

.products-nav-item {
  position: relative;
}

.products-nav-item > a {
  position: relative;
  z-index: 10;
}

.nav-link {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  padding: 30px 0;
  display: block;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 20px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition);
}

.nav-link.active::after {
  width: 100%;
}

/* 下拉菜单样式 */
.dropdown-menu {
  position: absolute;
  top: 90px;
  left: 0;
  background-color: var(--white);
  box-shadow: var(--shadow);
  padding: 20px;
  border-radius: 4px;
  min-width: 800px;
  z-index: 10;
  transform: translateY(-10px);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
  display: flex;
}

.products-nav-item:hover .dropdown-menu {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.product-category {
  flex: 1;
  margin-right: 20px;
}

.product-category h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
  font-size: 16px;
}

.product-link {
  display: block;
  margin-bottom: 15px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease;
}

.product-link:hover {
  transform: translateX(5px);
}

.product-link h4 {
  font-size: 14px;
  margin-bottom: 5px;
}

.product-link p {
  color: var(--dark-gray);
  font-size: 12px;
}

/* 移动端菜单按钮 */
.mobile-menu-button {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  position: absolute;
  right: 20px;
}

.menu-icon {
  display: block;
  width: 24px;
  height: 3px;
  background-color: var(--text-color);
  position: relative;
  transition: var(--transition);
}

.menu-icon::before,
.menu-icon::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 3px;
  background-color: var(--text-color);
  left: 0;
  transition: var(--transition);
}

.menu-icon::before {
  top: -8px;
}

.menu-icon::after {
  bottom: -8px;
}

.mobile-menu-button.active .menu-icon {
  background-color: transparent;
}

.mobile-menu-button.active .menu-icon::before {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-button.active .menu-icon::after {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* 移动端导航 */
.mobile-nav {
  display: none;
  background-color: var(--white);
  box-shadow: var(--shadow);
  position: absolute;
  top: 80px;
  left: 0;
  right: 0;
  z-index: 99;
  transform: translateY(-20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  max-height: 0;
  overflow: hidden;
}

.mobile-nav.active {
  display: block;
  transform: translateY(0);
  opacity: 1;
  max-height: 500px;
  transition: transform 0.3s ease, opacity 0.3s ease, max-height 0.5s ease;
}

.mobile-nav ul {
  list-style: none;
}

.nav-link-mobile {
  display: block;
  color: var(--text-color);
  text-decoration: none;
  padding: 15px 20px;
  border-bottom: 1px solid var(--light-gray);
  transition: var(--transition);
}

.nav-link-mobile:hover,
.nav-link-mobile.active {
  color: var(--primary-color);
  background-color: var(--light-gray);
}