/* 通用样式 */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
}

/* Logo 样式 */
.logo {
    text-align: center; /* 居中显示 */
    margin: 20px 0; /* 上下间距 */
}
/* Logo 图片 */
.logo-image {
    max-width: 200px; /* 设置最大宽度 */
    height: auto; /* 保持图片比例 */
}
/* 导航栏容器 */
.navbar {
    display: flex; /* 使用 flexbox 布局 */
    justify-content: space-between; /* 子元素两端对齐 */
    align-items: center; /* 垂直居中对齐 */
    padding: 0 20px; /* 添加左右内边距 */
    width: 100%; /* 确保占满父容器宽度 */
    box-sizing: border-box; /* 包括 padding 在内计算宽度 */
}

/* 导航链接 */
.nav-links {
    display: flex;
    gap: 20px; /* 设置菜单项之间的间隔 */
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #000000;
    font-size: 16px;
    padding: 5px 10px;
    position: relative; /* 为指示器和子菜单定位 */
    transition: color 0.3s ease;
    white-space: nowrap; /* 防止换行 */
}

.nav-links a:hover {
    color: #007bff;
}

/* 右侧功能区 */
.right-section {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap; /* 禁止换行 */
}

/* 搜索框 */
.search-box {
    display: flex;
    align-items: center;
    gap: 5px;
}

.search-box input {
    width: 200px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

/* 获取报价按钮 */
.quote-button {
    padding: 8px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.quote-button:hover {
    background-color: #0056b3;
}

/* 用户信息 */
.search-box,
.quote-button,
.user-info {
    display: flex;
    align-items: center;
}
/* 右侧功能区 */
.navbar .right-section {
    display: flex;
    align-items: center;
    gap: 20px; /* 设置固定间距 */
    flex-wrap: nowrap; /* 禁止换行 */
    padding: 0px 20px 10px 0px;
}
/* 用户信息 */
.user-info {
    display: flex;
    align-items: center;
}
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #ddd;
}

.user-level {
    font-size: 14px;
    color: #555;
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

 

/* 响应式样式 */
@media (max-width: 768px) {
    .nav-links {
        display: block;
    }

    .menu-toggle {
        display: block;
    }

    .right-section {
        justify-content: flex-end; /* 靠右对齐 */
        flex-wrap: nowrap; /* 禁止换行 */
    }

    .search-box input {
        width: 100%;
    }
}

/* 通用按钮样式 */
.search-button,
.quote-button {
    padding: 8px 15px;
    font-size: 14px;
    color:  #555;
    background-color: transparent; /* 设置为空心按钮 */
    border: 2px solid  #555; /* 边框颜色 */
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* 悬停效果 */
.search-button:hover,
.quote-button:hover {
    background-color:  #555; /* 悬停时填充背景 */
    color: white; /* 文字变为白色 */
}

/* 隐藏菜单 */
.hidden {
    display: none !important; /* 使用 !important 提高优先级 */
}

/* 移动端导航菜单 */
.mobile-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #ffffff;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: absolute; /* 绝对定位 */
    top: 50px; /* 距离顶部 */
    left: 0;
    right: 0;
    z-index: 1000;
}

.mobile-menu a {
    text-decoration: none;
    color: #000000;
    font-size: 16px;
    transition: color 0.3s ease;
}

.mobile-menu a:hover {
    color: #007bff;
}

/* 子菜单默认隐藏 */
.submenu { 
    position: absolute; /* 绝对定位，防止撑开父容器 */
    top: 100%; /* 子菜单显示在父菜单下方 */
    left: 0;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 10px;
    z-index: 1000;
    white-space: nowrap; /* 防止子菜单换行 */
}

 

/* 子菜单项样式 */
.submenu a {
    display: block;
    text-decoration: none;
    color: #000000;
    padding: 5px 10px;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.submenu a:hover {
    background-color: #f0f0f0;
}

/* 多层级子菜单 */
.menu-item {
    position: relative; /* 父菜单设置为相对定位 */
}

.submenu .menu-item .submenu {
    top: 0;
    left: 100%; /* 子菜单显示在右侧 */
}

/* 三角形指示器 */
.lastudioicon-right-arrow {
    margin-left: auto; /* 将图标推到最右边 */
    font-size: 14px; /* 设置图标大小 */
    color: #555; /* 图标颜色 */
    transition: transform 0.3s ease; /* 添加旋转动画 */
}
/* 图标旋转样式 */
.rotate {
    transform: rotate(90deg); /* 向右旋转 */
}

 
/* 鼠标悬停时链接样式 */
.menu-link:hover {
    color: #007bff;
}
/* 菜单链接 */
.menu-link {
    display: flex; /* 使用 flexbox 布局 */
    justify-content: space-between; /* 将文字和图标分开 */
    align-items: center; /* 垂直居中对齐 */
    text-decoration: none;
    color: #000000;
    font-size: 16px;
    padding: 5px 10px;
    position: relative; /* 为子菜单定位 */
    width: 100%; /* 确保链接占满父容器宽度 */
    box-sizing: border-box; /* 包括 padding 在内计算宽度 */
}