/* ====================================================================
 * Header 组件样式 - 命名空间隔离版本
 * ====================================================================
 * 文件路径：includes/components/header/header.css
 * 修改日期：2025-01-XX
 * 
 * 【重要说明】
 * 1. 所有选择器都使用 .site-header 命名空间前缀
 * 2. 确保 Header 样式独立，不受 Main 内容区域影响
 * 3. 保持向后兼容（可选）
 * ==================================================================== */

/* ========== Header 命名空间容器 ========== */
.site-header {
    position: relative;
    z-index: 1000;
}

/* ========== Header ========== */
.site-header .navbar {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    padding: 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

/* 桌面端/平板端导航栏 - 固定定位（关键修复：将 sticky 放在这里，而不是 .navbar） */
.site-header .navbar-desktop-tablet {
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* 导航栏滚动效果 */
.site-header .navbar-scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    background: rgba(255, 255, 255, 0.98);
}

/* 导航栏容器 - 三栏布局 */
.site-header .navbar-container {
    width: 100%;
    margin: 0;
    padding: 0 1.25rem; /* 进一步减少左右 padding，让两端更靠边 */
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: auto;
    min-height: 72px;
    /* overflow-x: hidden;  */
    position: relative; /* 为绝对定位的子元素提供定位上下文 */
}

/* 左侧 Logo 区域 - 靠最左边 */
.site-header .navbar-brand-section {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    margin-right: 2rem; /* 与中间导航的间距 */
    min-width: 0; /* 允许 flex 子元素缩小 */
    flex-shrink: 1; /* 允许在空间不足时缩小 */
}

.site-header .navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    transition: all var(--transition-smooth);
    gap: 0.75rem; /* Logo和文字之间的间距 */
}

/* Logo图片样式 - 固定50x50px显示 */
.site-header .navbar-logo {
    width: 50px;
    height: 50px;
    object-fit: contain; /* 保持比例，不裁剪，适应50x50区域 */
    object-position: center; /* 居中显示 */
    flex-shrink: 0; /* 防止被压缩 */
    transition: all var(--transition-smooth);
}

/* Logo文字样式（如果保留文字） */
.site-header .navbar-brand-text {
    white-space: nowrap; /* 防止文字换行 */
}

/* 悬停效果 */
.site-header .navbar-brand:hover {
    color: var(--primary-color);
    transform: translateX(2px);
}

.site-header .navbar-brand:hover .navbar-logo {
    transform: scale(1.05); /* 轻微放大效果 */
    opacity: 0.9;
}

/* 中间导航菜单区域 */
.site-header .navbar-nav-section {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 2rem; /* 左右留白，给中间导航更多空间 */
    min-width: 0; /* 关键：允许 flex 子元素缩小 */
    overflow: hidden; /* 防止内容溢出 */
}

.site-header .navbar-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem; /* 增加菜单项之间的间距，从 0.5rem 改为 1rem */
    list-style: none;
    margin: 0;
    padding: 0;
    min-width: 0; /* 允许缩小 */
    flex-wrap: nowrap; /* 防止换行 */
}

.site-header .nav-item {
    position: relative;
    animation: fadeInDown 0.5s ease-out;
    animation-fill-mode: both;
    flex-shrink: 1; /* 允许菜单项在空间不足时缩小 */
    min-width: 0; /* 允许缩小 */
}

.site-header .nav-item:nth-child(1) { animation-delay: 0.1s; }
.site-header .nav-item:nth-child(2) { animation-delay: 0.15s; }
.site-header .nav-item:nth-child(3) { animation-delay: 0.2s; }
.site-header .nav-item:nth-child(4) { animation-delay: 0.25s; }
.site-header .nav-item:nth-child(5) { animation-delay: 0.3s; }
.site-header .nav-item:nth-child(6) { animation-delay: 0.35s; }
.site-header .nav-item:nth-child(7) { animation-delay: 0.4s; }
.site-header .nav-item:nth-child(8) { animation-delay: 0.45s; }

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.site-header .nav-link {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1rem; /* 16px，更易读 */
    letter-spacing: 0.01em; /* 微调间距，提升可读性 */
    line-height: 1.5; /* 1.5倍行高，舒适阅读 */
    padding: 0.75rem 1.5rem; /* 增加左右内边距，从 1.25rem 改为 1.5rem */
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: block;
    text-decoration: none;
    white-space: nowrap; /* 防止文字换行 */
    overflow: hidden; /* 添加文本溢出处理 */
    text-overflow: ellipsis; /* 文本溢出时显示省略号 */
    max-width: 100%; /* 确保不超过父容器 */
    /* 字体渲染优化 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* 悬停效果 */
.site-header .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, var(--primary-rgba-10) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 8px;
    pointer-events: none;
}

.site-header .nav-link:hover {
    color: var(--primary-color);
    background: var(--primary-rgba-08);
    transform: translateY(-1px);
    font-weight: 600; /* 悬停时字体加粗，与激活状态一致 */
    letter-spacing: 0.015em; /* hover 时稍微增加间距 */
}

.site-header .nav-link:hover::before {
    opacity: 1;
}

/* 悬停状态下划线动画（与激活状态样式一致） */
.site-header .nav-link:hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
    animation: slideIn 0.3s ease-out;
}

/* 激活状态 */
.site-header .nav-link.active {
    color: var(--primary-color);
    font-weight: 600;
    letter-spacing: 0.015em; /* 激活状态稍微增加间距 */
}

/* 激活状态下划线动画 */
.site-header .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
    animation: slideIn 0.3s ease-out;
}

/* 当导航栏被悬停时，隐藏未被悬停的激活状态下划线 */
.site-header .navbar-nav:hover .nav-link.active:not(:hover)::after {
    opacity: 0;
    transition: opacity 0.3s ease;
}

@keyframes slideIn {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 60%;
        opacity: 1;
    }
}

/* ====================================================================
 * 导航栏子菜单样式（3D打印机子菜单）
 * ====================================================================
 * 功能：实现类似拓竹网站的图片式子菜单
 * 特点：
 *   - 悬停显示，图片网格布局
 *   - 响应式设计，适配不同屏幕尺寸
 *   - SEO优化，语义化HTML标签
 *   - 美观的动画效果
 * ==================================================================== */

/* ========== 有子菜单的菜单项 ========== */
/* 注释掉：此规则被第420行的 position: relative 覆盖，实际无效
.site-header .site-header .nav-item.has-submenu {
    position: static; 
}
*/

/* 有子菜单的菜单链接  主要设置的是 菜单名和箭头 */
.site-header .nav-link-with-submenu {
    cursor: default; /* 有子菜单时不显示手型光标 */
    pointer-events: auto;
    display: flex;
    align-items: center;/* 垂直居中 , 其实就是 水平方向上在一条直线*/
    gap: 0.25rem;
}

/* 向下箭头图标 */
.site-header .submenu-arrow {
    font-size: 0.75rem;
    margin-left: 0.25rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

/* 悬停时箭头向上旋转 */
.site-header .nav-item.has-submenu:hover .submenu-arrow {
    transform: rotate(180deg);
}

/* ====================================================================
 * 关键修复：创建连接桥填充菜单项和子菜单之间的间隙
 * ====================================================================
 * 问题：菜单项和子菜单之间有12px的间隙，鼠标经过时hover状态中断
 * 解决：使用::after伪元素创建不可见的连接区域，保持hover状态
 * 原理：在菜单项下方创建一个透明的连接区域，填充12px的间隙
 * ==================================================================== */
.site-header .nav-item.has-submenu {
    position: relative; /* 改为relative，让::after可以相对于它定位 */
}

/* ====================================================================
 * 连接桥：填充菜单项和子菜单之间的间隙，保持 hover 状态
 * ====================================================================
 * 功能：在菜单项和子菜单之间创建透明的连接区域，避免鼠标移动时 hover 状态中断
 * 修改说明：使用 JS 设置的 CSS 变量，使每个菜单项的桥独立定位，避免 90vw 过宽和重叠
 * ==================================================================== */
.site-header .nav-item.has-submenu::after {
    content: '';
    position: fixed !important;
    top: var(--bridge-top, 72px) !important;
    left: var(--bridge-left, 0) !important;
    width: var(--bridge-width, 60px) !important;
    height: 12px !important;
    transform: none !important;
    max-width: 150px !important; /* 防止单桥过宽导致误触发 */
    background: transparent;
    z-index: 999;
    pointer-events: none; /* 默认不接收事件，仅当子菜单已展开时激活 */
    opacity: 0;
}

/* 仅当该菜单项的子菜单已展开时，桥才接收鼠标事件，保持从菜单到子菜单的平滑过渡 */
.site-header .nav-item.has-submenu.submenu-active::after {
    pointer-events: auto;
}

/* 平板和移动端：隐藏连接桥（因为子菜单已隐藏） */
@media (max-width: 1199.98px) {
    .site-header .nav-item.has-submenu::after {
        display: none;
    }
}

/* ====================================================================
 * 子菜单容器（优化版：使用 fixed 定位，相对于视口居中显示）
 * ====================================================================
 * 修改说明：
 *   1. 将 position: absolute 改为 position: fixed，相对于视口定位
 *   2. 使用 left: 50% + transform: translateX(-50%) 实现水平居中
 *   3. 移除 CSS :hover 规则，改为 JavaScript 控制的 .show 类
 *   4. 不受 .navbar 的 backdrop-filter 影响，定位更准确
 * 
 * SEO优化：
 *   - 使用 visibility: hidden 而不是 display: none，确保内容可被搜索引擎读取
 *   - 子菜单内容在HTML中，搜索引擎可正常抓取和索引
 * ==================================================================== */
.site-header .nav-submenu {
    position: fixed !important; /* 相对于视口定位，不受 backdrop-filter 影响 */
    top: var(--header-nav-bottom, 72px) !important; /* 由 JS 按单行/两行布局设置 */
    left: 50% !important; /* 从视口中心开始 */
    transform: translateX(-50%) translateY(-10px) !important; /* 向左移动自身宽度的一半，实现居中 */
    width: 90vw; /* 占据视口宽度的90%，保持左右留白 */
    max-width: 90vw; /* 最大宽度也是90vw，保持一致 */
    /* 背景：浅色渐变，与页面背景区分但保持和谐 */
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.98) 0%, 
        rgba(248, 250, 252, 0.95) 100%);
    /* 边框：顶部细边框 + 优化阴影，顶部无圆角，仅底部圆角 */
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0 0 16px 16px; /* 仅底部圆角，顶部左右两个角无圆角 */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12),
                0 2px 8px rgba(0, 0, 0, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 0.9); /* 内阴影增加质感 */
    padding: 2rem;
    padding-right: calc(2rem - 8px); /* 右侧padding减少，为滚动条留出空间，避免影响右下角圆角 */
    opacity: 0;
    visibility: hidden; /* SEO优化：使用 visibility 而不是 display，确保搜索引擎可读取内容 */
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    /* 滚动设置：提前设置，避免在后面的样式中重复定义 */
    max-height: 60vh; /* 基础高度：最大高度不超过视口高度的60%（适合大多数屏幕） */
    overflow-y: auto; /* 内容过多时可滚动 */
    overscroll-behavior: contain; /* 子菜单滚动到底/顶时，不把滚动传递给主页面 */
}

/* 子菜单显示状态（由 JavaScript 控制，添加 .show 类） */
.site-header .nav-submenu.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0) !important;
}

/* ========== 子菜单内容容器 ========== */
.site-header .submenu-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ========== 品牌分组 ========== */
.site-header .submenu-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* 品牌标题 */
.site-header .submenu-brand-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    padding-bottom: 0.75rem;
    position: relative;
    border-bottom: none; /* 移除原边框，使用装饰性分隔线 */
    /* SEO：确保标题清晰可见 */
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 装饰性分隔线：左侧品牌色条 + 右侧渐变线 */
.site-header .submenu-brand-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, 
        var(--primary-color) 0%, 
        var(--primary-color) 60px, /* 左侧60px品牌色 */
        var(--primary-rgba-20) 60px, 
        var(--primary-rgba-20) 100%);
    border-radius: 1px;
}

/* ========== 产品网格 ========== */
.site-header .submenu-products {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4列网格 */
    gap: 1rem;
}

/* ========== 产品项 ========== */
.site-header .submenu-product-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    padding: 0.75rem;
    background: transparent;
    position: relative;
}

/* 悬停时的渐变遮罩 */
.site-header .submenu-product-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        var(--primary-rgba-08) 0%, 
        transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
    pointer-events: none;
    z-index: 0;
}

/* 悬停效果增强 */
.site-header .submenu-product-item:hover {
    background: var(--primary-rgba-08);
    transform: translateY(-6px) scale(1.02); /* 增加缩放效果 */
    text-decoration: none;
    color: var(--primary-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15),
                0 4px 12px rgba(0, 0, 0, 0.1),
                0 0 0 1px var(--primary-rgba-10); /* 添加边框效果 */
    z-index: 1;
}

.site-header .submenu-product-item:hover::before {
    opacity: 1;
}

/* 点击效果 */
.site-header .submenu-product-item:active {
    transform: translateY(-2px) scale(0.98); /* 按下效果 */
    transition: transform 0.1s ease;
}

.site-header .submenu-product-item:active .submenu-product-image img {
    transform: scale(1.02); /* 点击时图片稍微缩小 */
}

/* 选中状态样式（可选，用于当前页面） */
.site-header .submenu-product-item.active {
    background: var(--primary-rgba-10);
    border: 2px solid var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15),
                0 0 0 3px var(--primary-rgba-10); /* 外发光效果 */
}

.site-header .submenu-product-item.active .site-header .submenu-product-image {
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}

.site-header .submenu-product-item.active .site-header .submenu-product-name {
    color: var(--primary-color);
    font-weight: 600;
}

/* ====================================================================
 * 产品图片容器（优化版：缩小显示尺寸，提高视觉舒适度）
 * ====================================================================
 * 功能：控制产品图片的显示尺寸
 * 特点：
 *   - 限制最大宽度，缩小显示尺寸到原来的3/4左右
 *   - 保持4:3宽高比，无论原始图片尺寸如何
 *   - 图片居中显示，视觉效果更好
 *   - 响应式适配，不同屏幕自动调整（在媒体查询中覆盖）
 * ==================================================================== */
.site-header .submenu-product-image {
    width: 100%; /* 宽度100%，相对于父容器 */
    max-width: 240px; /* 限制最大宽度240px（约原来的2/3），进一步缩小显示尺寸 */
    aspect-ratio: 4 / 3; /* 保持4:3比例，无论原始图片尺寸如何 */
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem auto; /* 上下margin保持，左右auto居中 */
    position: relative;
    z-index: 1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 产品图片容器悬停效果 */
.site-header .submenu-product-item:hover .submenu-product-image {
    transform: scale(1.03); /* 容器也轻微放大 */
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* 产品图片 */
.site-header .submenu-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保持比例，覆盖整个区域 */
    object-position: center;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                filter 0.3s ease;
    display: block;
    border: 0; /* SEO：移除默认边框 */
}

/* 悬停时图片放大和滤镜效果 */
.site-header .submenu-product-item:hover .submenu-product-image img {
    transform: scale(1.08); /* 图片放大更多 */
    filter: brightness(1.05) saturate(1.1); /* 增加亮度和饱和度 */
}

/* ====================================================================
 * 产品名称（优化版：限制宽度，与图片宽度匹配）
 * ====================================================================
 * 功能：控制产品名称的显示样式
 * 特点：
 *   - 限制最大宽度，与图片宽度匹配，视觉更协调
 *   - 文字居中显示，保持美观
 *   - 响应式适配，不同屏幕自动调整（在媒体查询中覆盖）
 * ==================================================================== */
.site-header .submenu-product-name {
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.4;
    max-width: 240px; /* 限制名称最大宽度，与图片宽度匹配 */
    margin: 0 auto; /* 确保居中显示 */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    /* SEO：确保文字清晰可读 */
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.site-header .submenu-product-item:hover .submenu-product-name {
    color: var(--primary-color);
    font-weight: 600;
    transform: translateY(-2px); /* 名称也轻微上移 */
}

/* 隐藏结构化数据的meta标签（不影响显示） */
.site-header meta[itemprop] {
    display: none;
}

/* ========== 响应式样式 ========== */

/* 断点1：超大屏（≥1400px）- 完整显示，占据视口90%宽度 */
@media (min-width: 1400px) {
    .site-header .nav-submenu {
        width: 90vw; /* 占据视口宽度的90%，保持左右留白 */
        padding: 2.5rem;
        max-height: 65vh; /* 超大屏：65vh，充分利用大屏幕空间 */
    }
    
    .site-header .submenu-products {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.25rem;
    }
    
    /* 超大屏：图片和名称稍大一些，充分利用空间 */
    .site-header .submenu-product-image {
        max-width: 260px; /* 超大屏：260px（缩小后） */
    }
    
    .site-header .submenu-product-name {
        max-width: 260px; /* 超大屏：名称宽度与图片匹配 */
    }
}

/* 断点2：大屏（1200px - 1399px）- 占据视口90%宽度 */
@media (min-width: 1200px) and (max-width: 1399.98px) {
    .site-header .nav-submenu {
        width: 90vw; /* 占据视口宽度的90%，保持左右留白 */
        padding: 2rem;
        max-height: 60vh; /* 大屏：60vh（标准高度） */
    }
    
    .site-header .submenu-products {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
    
    /* 大屏：标准尺寸 */
    .site-header .submenu-product-image {
        max-width: 240px; /* 大屏：240px（标准，缩小后） */
    }
    
    .site-header .submenu-product-name {
        max-width: 240px; /* 大屏：名称宽度与图片匹配 */
    }
}

/* 断点3：平板端（宽）（1000px - 1199px）- 三明治菜单，3列布局，内联展开 */
@media (min-width: 1000px) and (max-width: 1199.98px) {
    .site-header .nav-submenu {
        position: static !important; /* 修改：从 fixed 改为 static，内联展开 */
        top: auto !important; /* 移除固定定位 */
        left: auto !important;
        right: auto !important;
        width: 100% !important; /* 修改：从 100vw 改为 100% */
        max-width: 100% !important;
        max-height: 0 !important; /* 初始高度为0，隐藏 */
        overflow: hidden !important; /* 隐藏溢出内容 */
        transform: none !important;
        border-radius: 0 !important; /* 移除圆角 */
        padding: 0 !important; /* 初始无内边距 */
        margin: 0 !important;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1; /* 修改：从 10000 改为 1 */
        background: rgba(255, 255, 255, 0.98);
        box-shadow: none !important;
    }
    
    .site-header .nav-submenu.show {
        max-height: 9999px !important; /* 修改：使用足够大的值，让子菜单内容完全展开，不限制高度 */
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        padding: 1.5rem !important; /* 展开时添加内边距 */
        transform: none !important; /* 确保平板端不使用居中变换 */
        overflow: visible !important; /* 修改：移除滚动条，让子菜单作为主菜单的一部分一起滚动 */
    }
    
    .site-header .submenu-products {
        grid-template-columns: repeat(3, 1fr) !important; /* 3列布局 */
        gap: 0.75rem;
    }
    
    /* 平板端（宽）：图片适中 */
    .site-header .submenu-product-image {
        max-width: 100% !important; /* 填满网格单元格 */
        aspect-ratio: 4 / 3;
    }
    
    .site-header .submenu-product-name {
        font-size: 0.875rem;
        max-width: 100%;
    }
}

/* 断点4：平板端（窄）（768px - 999px）- 三明治菜单，2列布局，内联展开 */
@media (min-width: 768px) and (max-width: 999.98px) {
    .site-header .nav-submenu {
        position: static !important; /* 修改：从 fixed 改为 static，内联展开 */
        top: auto !important; /* 移除固定定位 */
        left: auto !important;
        right: auto !important;
        width: 100% !important; /* 修改：从 100vw 改为 100% */
        max-width: 100% !important;
        max-height: 0 !important; /* 初始高度为0，隐藏 */
        overflow: hidden !important; /* 隐藏溢出内容 */
        transform: none !important;
        border-radius: 0 !important; /* 移除圆角 */
        padding: 0 !important; /* 初始无内边距 */
        margin: 0 !important;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1; /* 修改：从 10000 改为 1 */
        background: rgba(255, 255, 255, 0.98);
        box-shadow: none !important;
    }
    
    .site-header .nav-submenu.show {
        max-height: 9999px !important; /* 修改：使用足够大的值，让子菜单内容完全展开，不限制高度 */
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        padding: 1.25rem !important; /* 展开时添加内边距 */
        transform: none !important; /* 确保平板端（窄）不使用居中变换 */
        overflow: visible !important; /* 修改：移除滚动条，让子菜单作为主菜单的一部分一起滚动 */
    }
    
    .site-header .submenu-products {
        grid-template-columns: repeat(2, 1fr) !important; /* 2列布局 */
        gap: 0.75rem;
    }
    
    /* 平板端（窄）：图片适中 */
    .site-header .submenu-product-image {
        max-width: 100% !important; /* 填满网格单元格 */
        aspect-ratio: 4 / 3;
    }
    
    .site-header .submenu-product-name {
        font-size: 0.8125rem;
        max-width: 100%;
    }
}

/* ====================================================================
 * 移动端子菜单样式（≤767px）- 内联展开，2列布局
 * ====================================================================
 * 功能说明：
 *   - 移动端：图片缩小，每行2列
 *   - 子菜单在菜单项下方内联展开（不关闭抽屉菜单）
 *   - 使用 max-height 过渡实现展开/收起动画
 * ==================================================================== */
@media (max-width: 767.98px) {
    .site-header .nav-submenu {
        position: static !important; /* 修改：从 fixed 改为 static，内联展开 */
        width: 100% !important; /* 修改：从 100vw 改为 100% */
        max-width: 100% !important;
        height: auto !important; /* 修改：从 100vh 改为 auto */
        max-height: 0 !important; /* 初始高度为0，隐藏 */
        overflow: hidden !important; /* 隐藏溢出内容 */
        padding: 0 !important; /* 初始无内边距 */
        padding-top: 0 !important; /* 移除为关闭按钮预留的空间 */
        margin: 0 !important;
        border-radius: 0 !important;
        transform: none !important;
        opacity: 0; /* 初始透明 */
        visibility: hidden; /* 初始隐藏 */
        pointer-events: none;
        transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1; /* 修改：从 10000 改为 1，不需要最高层级 */
        background: rgba(255, 255, 255, 0.98);
        box-shadow: none !important; /* 移除阴影 */
    }
    
    .site-header .nav-submenu.show {
        max-height: 9999px !important; /* 修改：使用足够大的值，让子菜单内容完全展开，不限制高度 */
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        padding: 1rem !important; /* 展开时添加内边距 */
        transform: none !important; /* 确保移动端不使用居中变换 */
        overflow: visible !important; /* 修改：移除滚动条，让子菜单作为主菜单的一部分一起滚动 */
    }
    
    /* 移动端：子菜单内容容器 */
    .site-header .submenu-content {
        padding-top: 0; /* 已在外层设置 */
    }
    
    /* 移动端：产品网格 - 2列布局 */
    .site-header .submenu-products {
        grid-template-columns: repeat(2, 1fr) !important; /* 2列 */
        gap: 0.75rem; /* 缩小间距 */
    }
    
    /* 移动端：图片缩小 */
    .site-header .submenu-product-image {
        max-width: 100% !important; /* 填满网格单元格 */
        aspect-ratio: 4 / 3;
    }
    
    .site-header .submenu-product-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    /* 移动端：产品名称字体缩小 */
    .site-header .submenu-product-name {
        font-size: 0.75rem;
        max-width: 100%;
        line-height: 1.3;
    }
    
    /* 移动端：品牌标题样式调整 */
    .site-header .submenu-brand-title {
        font-size: 1rem;
        padding-bottom: 0.5rem;
        margin-bottom: 0.75rem;
    }
    
    /* ========== 修复：禁用移动端hover效果，避免触摸时误触发 ========== */
    /* 问题：移动端滚动或触摸时，手指经过链接会触发hover效果，导致第一个选项看起来被"选中" */
    /* 解决：在移动端完全禁用hover效果，只保留点击效果 */
    
    /* 禁用产品项的hover效果 */
    .site-header .submenu-product-item:hover {
        background: transparent !important;
        transform: none !important;
        box-shadow: none !important;
        color: var(--text-primary) !important;
    }
    
    .site-header .submenu-product-item:hover::before {
        opacity: 0 !important;
    }
    
    .site-header .submenu-product-item:hover .submenu-product-image {
        transform: none !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    }
    
    .site-header .submenu-product-item:hover .submenu-product-image img {
        transform: none !important;
        filter: none !important;
    }
    
    .site-header .submenu-product-item:hover .submenu-product-name {
        color: var(--text-primary) !important;
        font-weight: 500 !important;
        transform: none !important;
    }
    
    /* 禁用移动端链接点击高亮和优化触摸行为 */
    /* 问题：移动端触摸链接时，浏览器会显示点击高亮和URL预览，影响用户体验 */
    /* 解决：禁用点击高亮，优化触摸响应，减少URL预览触发 */
    .site-header .submenu-product-item {
        -webkit-tap-highlight-color: transparent; /* 禁用iOS Safari点击高亮 */
        
        touch-action: manipulation; /* 优化触摸响应，减少延迟和预览触发 */
    }
}

/* ====================================================================
 * 子菜单关闭按钮样式（移动端和平板端）
 * ====================================================================
 * 注意：改为内联展开方式后，不再需要关闭按钮
 * ==================================================================== */
.site-header .nav-submenu-close {
    display: none !important; /* 修改：完全隐藏关闭按钮 */
}

/* 桌面端隐藏关闭按钮（保持不变） */
@media (min-width: 1200px) {
    .site-header .nav-submenu-close {
        display: none;
    }
}

/* ====================================================================
 * 子菜单箭头旋转动画
 * ==================================================================== */
/* 移动端和平板端：箭头旋转动画 */
@media (max-width: 1199.98px) {
    .site-header .drawer-nav-item .bi-chevron-down,
    .site-header .tablet-nav-item .bi-chevron-down {
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

/* 更精确的选择器：当菜单项的子菜单显示时，旋转箭头 */
.site-header .drawer-nav-item-has-submenu.active .bi-chevron-down,
.site-header .tablet-nav-item-has-submenu.active .bi-chevron-down {
    transform: rotate(180deg);
}

/* ====================================================================
 * 创客教室子菜单特定样式
 * ====================================================================
 * 说明：
 *   - 子菜单只有2张图片，使用2列布局并居中显示
 *   - 限制最大宽度，使内容更集中美观
 *   - 响应式适配不同屏幕尺寸
 * ==================================================================== */
/* ====================================================================
 * 创客教室子菜单样式（统一4列网格，左对齐）
 * ====================================================================
 * 功能说明：统一使用4列网格布局，图片自动从左排列
 *    - 无论图片数量多少（1、2、3、4+），都无需修改CSS
 *    - 图片自动左对齐，超过4张自动换行
 * 修改日期：2024年
 * ==================================================================== */
.site-header #submenu-3dprint-makerspace .submenu-products {
    grid-template-columns: repeat(4, 1fr); /* 统一4列网格，左对齐 */
}

/* 响应式调整：超大屏 */
@media (min-width: 1400px) {
    .site-header #submenu-3dprint-makerspace .submenu-products {
        grid-template-columns: repeat(4, 1fr); /* 统一4列 */
        gap: 2rem; /* 增加间距 */
    }
}

/* 响应式调整：大屏 */
@media (min-width: 1200px) and (max-width: 1399.98px) {
    .site-header #submenu-3dprint-makerspace .submenu-products {
        grid-template-columns: repeat(4, 1fr); /* 统一4列 */
        gap: 2rem;
    }
}

/* 响应式调整：中等屏幕 */
@media (min-width: 1000px) and (max-width: 1199.98px) {
    .site-header #submenu-3dprint-makerspace .submenu-products {
        grid-template-columns: repeat(4, 1fr); /* 统一4列 */
        gap: 1.5rem;
    }
}

/* 响应式调整：小屏幕 */
@media (min-width: 900px) and (max-width: 999.98px) {
    .site-header #submenu-3dprint-makerspace .submenu-products {
        grid-template-columns: repeat(4, 1fr); /* 统一4列 */
        gap: 1rem;
    }
}

/* ====================================================================
 * 支持子菜单特定样式（统一4列网格，左对齐）
 * ====================================================================
 * 功能说明：使用4列网格布局，图片自动从左排列
 *    - 资料下载、联系方式两个子菜单项
 *    - 无分类结构，与公司子菜单相同
 * 
 * 修改日期：2024年
 * ==================================================================== */
.site-header #submenu-support .submenu-products {
    grid-template-columns: repeat(4, 1fr); /* 4列网格，左对齐 */
}

/* 响应式调整：超大屏 */
@media (min-width: 1400px) {
    .site-header #submenu-support .submenu-products {
        grid-template-columns: repeat(4, 1fr); /* 统一4列 */
        gap: 2rem; /* 增加间距 */
    }
}

/* 响应式调整：大屏 */
@media (min-width: 1200px) and (max-width: 1399.98px) {
    .site-header #submenu-support .submenu-products {
        grid-template-columns: repeat(4, 1fr); /* 统一4列 */
        gap: 2rem;
    }
}

/* 响应式调整：中等屏幕 */
@media (min-width: 1000px) and (max-width: 1199.98px) {
    .site-header #submenu-support .submenu-products {
        grid-template-columns: repeat(4, 1fr); /* 统一4列 */
        gap: 1.5rem;
    }
}

/* 响应式调整：小屏幕 */
@media (min-width: 900px) and (max-width: 999.98px) {
    .site-header #submenu-support .submenu-products {
        grid-template-columns: repeat(4, 1fr); /* 统一4列 */
        gap: 1rem;
    }
}

/* ====================================================================
 * 公司子菜单特定样式（统一4列网格，左对齐）
 * ====================================================================
 * 功能说明：统一使用4列网格布局，图片自动从左排列
 *    - 无论图片数量多少（1、2、3、4+），都无需修改CSS
 *    - 图片自动左对齐，超过4张自动换行
 *    - 参考：submenu-3dprint-makerspace 样式
 * ==================================================================== */
.site-header #submenu-company .submenu-products {
    grid-template-columns: repeat(4, 1fr); /* 统一4列网格，左对齐 */
}

/* 响应式调整：超大屏 */
@media (min-width: 1400px) {
    .site-header #submenu-company .submenu-products {
        grid-template-columns: repeat(4, 1fr); /* 统一4列 */
        gap: 2rem; /* 增加间距 */
    }
}

/* 响应式调整：大屏 */
@media (min-width: 1200px) and (max-width: 1399.98px) {
    .site-header #submenu-company .submenu-products {
        grid-template-columns: repeat(4, 1fr); /* 统一4列 */
        gap: 2rem;
    }
}

/* 响应式调整：中等屏幕 */
@media (min-width: 1000px) and (max-width: 1199.98px) {
    .site-header #submenu-company .submenu-products {
        grid-template-columns: repeat(4, 1fr); /* 统一4列 */
        gap: 1.5rem;
    }
}

/* 响应式调整：小屏幕 */
@media (min-width: 900px) and (max-width: 999.98px) {
    .site-header #submenu-company .submenu-products {
        grid-template-columns: repeat(4, 1fr); /* 统一4列 */
        gap: 1rem;
    }
}

/* ====================================================================
 * 子菜单滚动条样式（优化版：加深颜色，优化位置，避免影响圆角）
 * ====================================================================
 * 功能：自定义滚动条样式，使其更美观且不影响容器圆角
 * 特点：
 *   - 滚动条颜色加深，提高可见度（从20%透明度提升到50%）
 *   - 滚动条位置优化，通过margin避免影响右下角圆角
 *   - 滚动条宽度适中（8px），不影响内容显示
 *   - hover状态颜色更深（70%透明度），提供更好的交互反馈
 * ==================================================================== */
.site-header .nav-submenu::-webkit-scrollbar {
    width: 8px; /* 稍微增加宽度，从6px改为8px，提高可见度 */
}

.site-header .nav-submenu::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05); /* 更明显的轨道背景，替代var(--bg-light) */
    border-radius: 4px;
    margin: 8px 0; /* 上下留白，避免滚动条影响圆角 */
    margin-right: 4px; /* 右侧留白，确保滚动条不贴边，不影响右下角圆角 */
}

.site-header .nav-submenu::-webkit-scrollbar-thumb {
    background: rgba(37, 99, 235, 0.5); /* 50%透明度，颜色更深，替代var(--primary-rgba-20) */
    border-radius: 4px;
    border: 1px solid rgba(37, 99, 235, 0.2); /* 添加边框，增强视觉效果 */
}

.site-header .nav-submenu::-webkit-scrollbar-thumb:hover {
    background: rgba(37, 99, 235, 0.7); /* 70%透明度，hover时更深，替代var(--primary-rgba-30) */
    border-color: rgba(37, 99, 235, 0.4); /* hover时边框颜色也加深 */
}

/* 右侧操作区域 - 靠最右边 */
.site-header .navbar-actions-section {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    margin-left: 2rem; /* 与中间导航的间距 */
    min-width: 0; /* 允许 flex 子元素缩小 */
    flex-shrink: 0; /* 右侧按钮区域尽量不缩小 */
}

/* 超宽屏幕优化 */
@media (min-width: 1400px) {
    .navbar-container {
        padding: 0 2rem; /* 超宽屏幕稍微增加一点 padding */
    }
}

.site-header .navbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}


/* ========== 语言切换下拉菜单 - 优化版 ========== */
.site-header .lang-switcher {
    position: relative;
    z-index: 1000;
}

.site-header .lang-switcher-btn {
    /* 尺寸和内边距 - 与登录和购物车按钮高度一致 */
    padding: 0.625rem 0.75rem;                /* 垂直内边距与登录/购物车一致 */
    min-width: 85px;                          /* 减小最小宽度 */
    
    /* 边框 - 更明显 */
    border: 1.5px solid rgba(0, 0, 0, 0.15);   /* 更深的边框颜色，与登录按钮边框宽度一致 */
    background: rgba(255, 255, 255, 0.95);      /* 半透明白色背景 */
    
    /* 文字样式 - 与登录和购物车按钮一致 */
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;                        /* 与登录/购物车按钮字体大小一致 */
    line-height: 1.5;                          /* 确保行高一致 */
    letter-spacing: 0.01em;                    /* 微调字母间距 */
    
    /* 布局 */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;                            /* 减小图标和文字之间的间距 */
    
    /* 样式 */
    border-radius: 8px;                       /* 稍微减小圆角 */
    cursor: pointer;
    outline: none;
    text-decoration: none;
    
    /* 阴影 - 增加立体感 */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08),
                0 1px 2px rgba(0, 0, 0, 0.04);
    
    /* 动画 */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* 字体渲染优化 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    
    /* 毛玻璃效果（可选） */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Hover 状态 - 更明显的反馈 */
.site-header .lang-switcher-btn:hover,
.site-header .lang-switcher-btn:focus {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 1);       /* 完全不透明 */
    color: var(--primary-color);
    
    /* 增强阴影 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12),
                0 2px 4px rgba(0, 0, 0, 0.08),
                0 0 0 3px var(--primary-rgba-10); /* 外发光效果 */
    
    /* 动画效果 */
    transform: translateY(-2px) scale(1.02);  /* 上移并轻微放大 */
}

/* Active 状态（下拉菜单打开时） */
.site-header .lang-switcher-btn[aria-expanded="true"] {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 1);
    color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15),
                0 2px 6px rgba(0, 0, 0, 0.1),
                0 0 0 3px var(--primary-rgba-10);
}

/* 下拉箭头图标动画 */
.site-header .lang-switcher-btn .bi-chevron-down {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

/* 下拉菜单打开时，箭头旋转 180 度 */
.site-header .lang-switcher-btn[aria-expanded="true"] .bi-chevron-down {
    transform: rotate(180deg);
}

/* Focus 状态 - 无障碍优化 */
.site-header .lang-switcher-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12),
                0 2px 4px rgba(0, 0, 0, 0.08),
                0 0 0 3px var(--primary-rgba-10);
}

/* Active 状态（点击时） */
.site-header .lang-switcher-btn:active {
    transform: translateY(0) scale(0.98);     /* 按下效果 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.site-header .lang-switcher-btn::after {
    display: none !important;
}

/* 下拉菜单样式优化 */
.site-header .lang-dropdown-menu {
    min-width: 160px;                          /* 稍微增加宽度 */
    border-radius: 12px;                       /* 增加圆角 */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12),
                0 2px 8px rgba(0, 0, 0, 0.08); /* 增强阴影 */
    border: 1px solid rgba(0, 0, 0, 0.08);    /* 更精致的边框 */
    padding: 0.5rem 0;
    margin-top: 0.75rem;                      /* 增加与按钮的间距 */
    z-index: 1001;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    
    /* 下拉动画 */
    animation: dropdownFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.site-header .lang-dropdown-menu.show {
    display: block !important;
}

/* 下拉菜单项优化 */
.site-header .lang-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;                  /* 增加内边距 */
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    margin: 0.125rem 0.5rem;                  /* 左右留白 */
    font-size: 0.9375rem;                     /* 15px */
    letter-spacing: 0.01em;
}

.site-header .lang-item:hover {
    background: var(--primary-rgba-08);        /* 更明显的背景 */
    color: var(--primary-color);
    transform: translateX(4px);                /* 轻微右移 */
    padding-left: 1.5rem;                      /* 增加左内边距 */
}

.site-header .lang-item.active {
    background: var(--primary-rgba-10);
    color: var(--primary-color);
    font-weight: 600;
    border-left: 3px solid var(--primary-color); /* 左侧指示条 */
    padding-left: 1.125rem;                     /* 调整内边距 */
}

.site-header .lang-item.active .bi-check2 {
    color: var(--primary-color);
    animation: checkMarkFadeIn 0.3s ease-out;
}

@keyframes checkMarkFadeIn {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* flag-icons：语言切换中国旗（类名来自 languages.flag_icon，如 fi-cn → .fi.fi-cn） */
.site-header .lang-dropdown-flag.fi {
    width: 1.65em;
    min-width: 1.65em;
    height: 1.1em;
    flex-shrink: 0;
    line-height: 1;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
    border-radius: 2px;
}

.site-header .lang-switcher-btn-flag.fi {
    width: 1.5em;
    min-width: 1.5em;
    height: 1em;
    flex-shrink: 0;
    line-height: 1;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
    border-radius: 2px;
}

.site-header .drawer-lang-switcher-flag.fi {
    width: 1.5rem;
    min-width: 1.5rem;
    height: 1rem;
    flex-shrink: 0;
    margin-right: 0.35rem;
    line-height: 1;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
    border-radius: 2px;
}

.site-header .drawer-lang-flag.fi {
    width: 1.65em;
    min-width: 1.65em;
    height: 1.1em;
    flex-shrink: 0;
    margin-right: 0.5rem;
    line-height: 1;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
    border-radius: 2px;
}

.site-header .drawer-lang-option .drawer-lang-label {
    flex: 1;
    text-align: left;
}

/* ========== 登录和购物车按钮 ========== */
.site-header .btn-login {
    padding: 0.625rem 1.5rem;
    border: 1.5px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.5;                          /* 确保行高一致 */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-block;
    vertical-align: middle;                     /* 确保垂直对齐 */
}

.site-header .btn-login:hover {
    background: var(--primary-color);
    color: var(--text-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

.site-header .btn-cart {
    padding: 0.625rem 1.25rem;
    background: var(--primary-color);
    color: var(--text-white);
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.5;                          /* 确保行高一致 */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-header .btn-cart:hover {
    background: var(--primary-hover);
    color: var(--text-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

.site-header .btn-cart i {
    transition: transform 0.3s ease;
}

.site-header .btn-cart:hover i {
    transform: scale(1.1) rotate(-5deg);
}

/* ========== 移动端折叠按钮 ========== */
.site-header .navbar-toggler {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    transition: all 0.3s ease;
}

.site-header .navbar-toggler:hover {
    border-color: var(--primary-color);
    background: var(--primary-rgba-05);
}

.site-header .navbar-toggler:focus {
    box-shadow: 0 0 0 3px var(--primary-rgba-10);
}

.site-header .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(31, 41, 55, 0.75)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ====================================================================
 * 导航栏响应式优化 - 三个断点设计
 * ====================================================================
 * 1. 大屏断点（≥1200px）：横向平铺，字体缩小，支持换行
 * 2. 平板断点（768px-1199px）：三明治按钮居中，下拉菜单
 * 3. 手机断点（≤767px）：保持现有移动端抽屉菜单
 * ==================================================================== */

/* ========== 工具类：显示/隐藏控制 ========== */
/* 仅桌面端显示 */
.site-header .desktop-only {
    display: block;
}

/* 仅平板端显示 */
.site-header .tablet-only {
    display: none;
}

/* ========== 中等大屏断点（1200px - 1599px）- 两行布局，菜单通栏居中 ========== */
@media (min-width: 1200px) and (max-width: 1599.98px) {
    .site-header .navbar-container {
        padding: 0 1.5rem 0.5rem;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        height: auto;
        min-height: 72px;
        row-gap: 0.25rem;
    }

    .site-header .navbar-brand-section {
        order: 1;
        margin-right: 1.5rem;
        flex: 0 0 auto;
        min-width: 0; /* 允许在必要时缩小 */
    }
    
    /* 中间导航菜单区域 - 第二行通栏居中 */
    .site-header .navbar-nav-section {
        order: 3;
        flex: 0 0 100%;
        display: flex !important; /* 强制横向显示 */
        flex-direction: row !important; /* 明确横向排列 */
        justify-content: center;
        align-items: center;
        padding: 0.25rem 1rem 0.25rem; /* 默认值，会被 JavaScript 动态优化覆盖 */
        min-width: 0;
        overflow: visible !important; /* 覆盖基础样式的 overflow: hidden */
    }
    
    .site-header .navbar-nav-section.desktop-only {
        display: flex !important; /* 确保 desktop-only 类也显示 */
    }
    
    .site-header .navbar-nav {
        display: flex !important; /* 强制横向显示 */
        flex-direction: row !important; /* 明确横向排列 */
        align-items: center;
        justify-content: center;
        gap: 0.5rem; /* 默认值，会被 JavaScript 动态优化覆盖 */
        list-style: none;
        margin: 0;
        padding: 0;
        flex-wrap: nowrap !important; /* 关键：不换行，所有菜单项在一行 */
        width: 100%;
        justify-content: center;
    }
    
    .site-header .nav-item {
        flex: 0 1 auto !important; /* 允许在空间不足时缩小 */
        position: relative;
        display: list-item; /* 保持列表项显示 */
        min-width: 0; /* 允许缩小 */
    }
    
    .site-header .nav-link {
        color: var(--text-primary);
        font-weight: 500;
        font-size: 1rem !important; /* 16px，更易读 */
        letter-spacing: 0.01em; /* 微调间距，提升可读性 */
        line-height: 1.5; /* 1.5倍行高，舒适阅读 */
        padding: 0.75rem clamp(0.75rem, 1.5vw, 1.25rem); /* 自适应 padding：最小值 0.75rem，最大值 1.25rem */
        border-radius: 8px;
        transition: all 0.3s ease;
        position: relative;
        display: flex !important; /* 使用 flex 布局，方便居中 */
        flex-direction: row !important; /* 确保横向 */
        align-items: center; /* 垂直居中 */
        justify-content: center; /* 水平居中 */
        text-decoration: none;
        white-space: normal; /* 允许文本换行 */
        text-align: center; /* 文本居中对齐 */
        min-height: 2.8rem; /* 最小高度，确保多行时对齐 */
        width: auto !important; /* 改为自适应宽度 */
        min-width: 100px; /* 最小宽度保证 */
        max-width: 140px; /* 最大宽度限制 */
        word-break: break-word; /* 允许单词内换行 */
        overflow-wrap: break-word; /* 长单词换行 */
        box-sizing: border-box; /* 包含 padding 和 border */
        /* 字体渲染优化 */
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-rendering: optimizeLegibility;
    }
    
    /* 悬停效果 */
    .site-header .nav-link:hover {
        color: var(--primary-color);
        background: var(--primary-rgba-08);
        transform: translateY(-1px);
        font-weight: 600; /* hover 时加粗 */
        letter-spacing: 0.015em; /* hover 时稍微增加间距 */
    }
    
    /* 激活状态 */
    .site-header .nav-link.active {
        color: var(--primary-color);
        font-weight: 600;
        letter-spacing: 0.015em; /* 激活状态稍微增加间距 */
    }
    
    .site-header .navbar-actions-section {
        order: 2;
        margin-left: auto;
        flex: 0 0 auto;
        min-width: 0; /* 允许在必要时缩小 */
    }
    
    /* 隐藏平板端三明治按钮 */
    .site-header .navbar-toggler-tablet {
        display: none !important;
    }
    
    /* 隐藏平板端下拉菜单 */
    .site-header .tablet-dropdown-menu {
        display: none !important;
    }
}

/* ========== 1400–1599px：两行布局下菜单尽量单行 ========== */
@media (min-width: 1400px) and (max-width: 1599.98px) {
    .site-header .navbar-nav {
        gap: 0.75rem;
    }

    .site-header .nav-link {
        white-space: nowrap;
        padding: 0.7rem 1rem;
        min-width: 0;
        max-width: none;
        word-break: normal;
        overflow-wrap: normal;
    }
}

/* ========== 超大屏断点（≥1600px）- 横向平铺，文字不换行 ========== */
@media (min-width: 1600px) {
    .site-header .navbar-container {
        padding: 0 2rem;
        display: flex !important;
        flex-direction: row !important;
    }
    
    .site-header .navbar-brand-section {
        margin-right: 2rem;
        flex: 0 0 auto;
    }
    
    /* 中间导航菜单区域 - 横向平铺，单行显示 */
    .site-header .navbar-nav-section {
        flex: 1;
        display: flex !important; /* 强制横向显示 */
        flex-direction: row !important; /* 明确横向排列 */
        justify-content: center;
        align-items: center;
        padding: 0 2rem; /* 默认值，会被 JavaScript 动态优化覆盖 */
        min-width: 0;
        overflow: visible !important; /* 覆盖基础样式的 overflow: hidden */
    }
    
    .site-header .navbar-nav-section.desktop-only {
        display: flex !important; /* 确保 desktop-only 类也显示 */
    }
    
    .site-header .navbar-nav {
        display: flex !important; /* 强制横向显示 */
        flex-direction: row !important; /* 明确横向排列 */
        align-items: center;
        justify-content: center;
        gap: 1rem; /* 默认值，会被 JavaScript 动态优化覆盖 */
        list-style: none;
        margin: 0;
        padding: 0;
        flex-wrap: nowrap !important; /* 关键：不换行，所有菜单项在一行 */
        width: 100%;
    }
    
    .site-header .nav-item {
        flex: 0 0 auto !important; /* 不伸缩，根据内容自适应 */
        position: relative;
        display: list-item; /* 保持列表项显示 */
    }
    
    .site-header .nav-link {
        color: var(--text-primary);
        font-weight: 500;
        font-size: 1rem !important; /* 16px，更易读 */
        letter-spacing: 0.01em; /* 微调间距，提升可读性 */
        line-height: 1.5; /* 1.5倍行高，舒适阅读 */
        padding: 0.75rem 1.25rem; /* 正常的 padding，可以稍微大一点 */
        border-radius: 8px;
        transition: all 0.3s ease;
        position: relative;
        display: flex !important; /* 使用 flex 布局，方便居中 */
        flex-direction: row !important; /* 确保横向 */
        align-items: center; /* 垂直居中 */
        justify-content: center; /* 水平居中 */
        text-decoration: none;
        white-space: nowrap !important; /* 关键：文字不换行 */
        text-align: center; /* 文本居中对齐 */
        min-height: auto; /* 不需要最小高度，单行显示 */
        width: auto !important; /* 宽度根据内容自适应 */
        max-width: none !important; /* 不限制最大宽度 */
        word-break: normal; /* 正常换行规则 */
        overflow-wrap: normal; /* 正常换行规则 */
        box-sizing: border-box; /* 包含 padding 和 border */
        /* 字体渲染优化 */
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-rendering: optimizeLegibility;
    }
    
    /* 悬停效果 */
    .site-header .nav-link:hover {
        color: var(--primary-color);
        background: var(--primary-rgba-08);
        transform: translateY(-1px);
        font-weight: 600; /* hover 时加粗 */
        letter-spacing: 0.015em; /* hover 时稍微增加间距 */
    }
    
    /* 激活状态 */
    .site-header .nav-link.active {
        color: var(--primary-color);
        font-weight: 600;
        letter-spacing: 0.015em; /* 激活状态稍微增加间距 */
    }
    
    .site-header .navbar-actions-section {
        margin-left: 2rem;
        flex: 0 0 auto;
    }
    
    /* 隐藏平板端三明治按钮 */
    .site-header .navbar-toggler-tablet {
        display: none !important;
    }
    
    /* 隐藏平板端下拉菜单 */
    .site-header .tablet-dropdown-menu {
        display: none !important;
    }
}

/* ========== ≥1600px 单行放不下时，由 JS 添加 nav-stacked 切两行 ========== */
@media (min-width: 1600px) {
    .site-header.nav-stacked .navbar-container {
        flex-wrap: wrap !important;
        height: auto;
        min-height: 72px;
        padding-bottom: 0.5rem;
        row-gap: 0.25rem;
    }

    .site-header.nav-stacked .navbar-brand-section {
        order: 1;
    }

    .site-header.nav-stacked .navbar-actions-section {
        order: 2;
        margin-left: auto;
    }

    .site-header.nav-stacked .navbar-nav-section {
        order: 3;
        flex: 0 0 100%;
        padding: 0.25rem 2rem 0.25rem;
    }

    .site-header.nav-stacked .navbar-nav {
        gap: 0.75rem;
    }
}

/* ========== 平板断点（768px - 1199px）- 三明治按钮 ========== */
@media (min-width: 768px) and (max-width: 1199.98px) {
    /* 显示平板端元素 */
    .site-header .tablet-only {
        display: block !important;
    }
    
    .site-header .navbar-container {
        padding: 0 1.5rem;
        justify-content: space-between;
        position: relative;
        align-items: center; /* 确保垂直居中 */
    }
    
    /* 使用三栏布局确保按钮真正居中 */
    .site-header .navbar-brand-section {
        flex: 1;
        display: flex;
        justify-content: flex-start;
        min-width: 0;
    }
    
    /* 隐藏桌面端导航菜单 */
    .site-header .navbar-nav-section.desktop-only {
        display: none !important;
    }
    
    /* 三明治按钮容器 - 使用 flexbox 居中 */
    .site-header .navbar-toggler-container {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1001;
    }
    
    /* 三明治按钮样式 */
    .site-header .navbar-toggler-tablet {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 50px;
        height: 50px;
        border: none;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 100%);
        border-radius: 14px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12),
                    0 1px 4px rgba(0, 0, 0, 0.08),
                    inset 0 1px 0 rgba(255, 255, 255, 0.9);
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
    
    .site-header .navbar-toggler-tablet:hover {
        background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.98) 100%);
        box-shadow: 0 5px 16px rgba(0, 0, 0, 0.18),
                    0 2px 8px rgba(0, 0, 0, 0.12),
                    inset 0 1px 0 rgba(255, 255, 255, 1);
        transform: translateY(-2px) scale(1.02);
    }
    
    .site-header .navbar-toggler-tablet:active {
        transform: translateY(0) scale(0.98);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15),
                    inset 0 1px 2px rgba(0, 0, 0, 0.1);
    }
    
    .site-header .navbar-toggler-tablet:focus {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
    
    /* 汉堡菜单图标 - 更粗的线条，更现代 */
    .site-header .navbar-toggler-tablet .hamburger-icon {
        display: flex;
        flex-direction: column;
        gap: 6px;
        width: 26px;
        height: 20px;
    }
    
    .site-header .navbar-toggler-tablet .hamburger-icon span {
        display: block;
        height: 3px;
        width: 100%;
        background: var(--text-primary);
        border-radius: 2px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        transform-origin: center;
    }
    
    /* 菜单打开时的动画 - 更流畅的 X 转换 */
    .site-header .navbar-toggler-tablet.active {
        background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.98) 100%);
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.22),
                    0 2px 10px rgba(0, 0, 0, 0.15),
                    inset 0 1px 0 rgba(255, 255, 255, 1);
        transform: translateY(0) scale(1); /* 确保居中状态 */
    }
    
    .site-header .navbar-toggler-tablet.active:hover {
        transform: translateY(-2px) scale(1.02); /* hover 时也保持居中 */
    }
    
    
    .site-header .navbar-toggler-tablet.active .hamburger-icon span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }
    
    .site-header .navbar-toggler-tablet.active .hamburger-icon span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }
    
    .site-header .navbar-toggler-tablet.active .hamburger-icon span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    .site-header .navbar-actions-section {
        margin-left: 0;
        flex: 1;
        display: flex;
        justify-content: flex-end;
    }
    
    /* 平板端下拉菜单 - 居中卡片式设计 */
    .site-header .tablet-dropdown-menu {
        display: block !important; /* 明确设置显示，确保菜单容器可见 */
        position: absolute;
        top: calc(100% + 12px); /* 与导航栏保持间距 */
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        max-width: 600px; /* 最大宽度限制，不占满全屏 */
        background: #fff;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12),
                    0 2px 8px rgba(0, 0, 0, 0.08);
        border-radius: 16px;
        border: 1px solid rgba(0, 0, 0, 0.06);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                    opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
        z-index: 1000;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }
    
    .site-header .tablet-dropdown-menu.active {
        max-height: calc(100vh - var(--header-nav-bottom, 72px) - 12px - 20px) !important; /* 导航栏底部由 JS 按单行/两行布局设置 */
        opacity: 1;
        display: block !important; /* 确保激活状态下显示 */
        transform: translateX(-50%) translateY(0);
        overflow-y: auto !important; /* 新增：允许父容器滚动，确保子菜单内容完全可见 */
    }
    
    .site-header .tablet-nav-list {
        list-style: none;
        margin: 0;
        padding: 0.75rem 0;
    }
    
    .site-header .tablet-nav-item {
        display: flex;
        align-items: center;
        padding: 1rem 1.5rem;
        margin: 0.25rem 0.75rem;
        color: var(--text-primary);
        text-decoration: none;
        font-size: 1rem;
        font-weight: 500;
        border-radius: 10px;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        border-left: none; /* 移除左侧边框 */
    }
    
    .site-header .tablet-nav-item::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 4px;
        height: 0;
        background: var(--primary-color);
        border-radius: 0 2px 2px 0;
        transition: height 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .site-header .tablet-nav-item:hover {
        background: var(--primary-rgba-08);
        color: var(--primary-color);
        transform: translateX(4px);
    }
    
    .site-header .tablet-nav-item:hover::before {
        height: 60%;
    }
    
    .site-header .tablet-nav-item.active {
        background: var(--primary-rgba-10);
        color: var(--primary-color);
        font-weight: 600;
    }
    
    .site-header .tablet-nav-item.active::before {
        height: 60%;
    }
    
    /* 隐藏移动端导航栏 */
    .site-header .navbar-mobile {
        display: none !important;
    }
}

/* ========== 手机断点（≤767px）- 保持现有移动端 ========== */
@media (max-width: 767.98px) {
    /* 隐藏桌面/平板导航栏 */
    .site-header .navbar.navbar-desktop-tablet {
        display: none !important;
    }
    
    /* 显示移动端导航栏（保持现有样式） */
    .site-header .navbar-mobile {
        display: block !important;
    }
    
    /* 隐藏桌面端和平板端元素 */
    .site-header .desktop-only,
    .site-header .tablet-only {
        display: none !important;
    }
}

/* ========== 移动端导航栏（仅移动端显示）========== */
@media (max-width: 768px) {
    /* 移动端导航栏容器 */
    .site-header .navbar-mobile {
        position: sticky;
        top: 0;
        z-index: 1000;
        background: #fff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    /* 顶部主栏 */
    .site-header .navbar-mobile-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.75rem 1rem;
        height: 56px;
    }
    
    /* Logo + 品牌名称 */
    .site-header .navbar-brand-mobile {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        text-decoration: none;
        color: var(--primary-color);
        flex: 1;
        min-width: 0;
    }
    
    .site-header .navbar-logo-mobile {
        width: 36px;
        height: 36px;
        object-fit: contain;
        flex-shrink: 0;
    }
    
    .site-header .navbar-brand-text-mobile {
        font-size: 1rem;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* 右侧操作按钮组 */
    .site-header .navbar-mobile-actions {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        flex-shrink: 0;
    }
    
    /* 操作按钮（购物车、菜单） */
    .site-header .navbar-action-btn {
        position: relative;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: none;
        background: transparent;
        color: var(--text-primary);
        font-size: 1.25rem;
        border-radius: 8px;
        transition: all 0.2s ease;
        text-decoration: none;
        cursor: pointer;
    }
    
    .site-header .navbar-action-btn:active {
        background: var(--primary-rgba-10);
        transform: scale(0.95);
    }
    
    /* 购物车徽章 */
    .site-header .cart-btn .badge {
        position: absolute;
        top: 4px;
        right: 4px;
        background: var(--warning-color, #F59E0B);
        color: #fff;
        font-size: 0.625rem;
        font-weight: 600;
        padding: 0.125rem 0.375rem;
        border-radius: 10px;
        min-width: 16px;
        text-align: center;
        line-height: 1.2;
    }
    
    /* 汉堡菜单图标 */
    .site-header .hamburger-icon {
        display: flex;
        flex-direction: column;
        gap: 4px;
        width: 20px;
    }
    
    .site-header .hamburger-icon span {
        display: block;
        height: 2px;
        width: 100%;
        background: var(--text-primary);
        border-radius: 2px;
        transition: all 0.3s ease;
    }
    
    /* 菜单打开时的动画 */
    .site-header .menu-toggle.active .hamburger-icon span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .site-header .menu-toggle.active .hamburger-icon span:nth-child(2) {
        opacity: 0;
    }
    
    .site-header .menu-toggle.active .hamburger-icon span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
    
    /* ========== 抽屉菜单 ========== */
    .site-header .mobile-drawer {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 2000;
        pointer-events: none;
        visibility: hidden;
        transition: visibility 0.3s ease;
    }
    
    .site-header .mobile-drawer.active {
        pointer-events: auto;
        visibility: visible;
    }
    
    /* 遮罩层 */
    .site-header .drawer-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .site-header .mobile-drawer.active .drawer-overlay {
        opacity: 1;
    }
    
    /* 抽屉内容 */
    .site-header .drawer-content {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 100%; /* 修改：从 85% 改为 100%，占满屏幕宽度 */
        max-width: 100%; /* 修改：从 320px 改为 100%，移除宽度限制 */
        background: #fff;
        box-shadow: -2px 0 12px rgba(0, 0, 0, 0.15);
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    
    .site-header .mobile-drawer.active .drawer-content {
        transform: translateX(0);
    }
    
    /* 抽屉头部 */
    .site-header .drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
        background: var(--bg-light);
    }
    
    .site-header .drawer-user-info {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        flex: 1;
    }
    
    .site-header .user-avatar {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        background: var(--primary-rgba-10);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 2rem;
        color: var(--primary-color);
        flex-shrink: 0;
    }
    
    .site-header .user-details {
        flex: 1;
        min-width: 0;
    }
    
    .site-header .user-login-link {
        display: block;
        font-size: 1rem;
        font-weight: 600;
        color: var(--primary-color);
        text-decoration: none;
        margin-bottom: 0.25rem;
    }
    
    .site-header .user-greeting {
        font-size: 0.75rem;
        color: var(--text-secondary);
        margin: 0;
    }
    
    .site-header .drawer-close {
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: none;
        background: transparent;
        color: var(--text-primary);
        font-size: 1.25rem;
        border-radius: 8px;
        transition: all 0.2s ease;
        cursor: pointer;
    }
    
    .site-header .drawer-close:active {
        background: var(--primary-rgba-10);
    }
    
    /* 导航菜单 */
    .site-header .drawer-nav {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior-y: contain; /* 防止滚动链：子菜单滚到底/顶时不会触发页面滚动 */
        -webkit-overflow-scrolling: touch; /* iOS 平滑滚动 */
        padding: 0.5rem 0;
    }
    
    .site-header .drawer-nav-list {
        list-style: none;
        margin: 0;
        padding: 0;
    }
    
    .site-header .drawer-nav-item {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 1rem 1.25rem;
        color: var(--text-primary);
        text-decoration: none;
        font-size: 1rem;
        transition: all 0.2s ease;
        border-left: 3px solid transparent;
    }
    
    .site-header .drawer-nav-item i {
        font-size: 1.25rem;
        width: 24px;
        text-align: center;
        color: var(--text-secondary);
    }
    
    .site-header .drawer-nav-item:hover,
    .site-header .drawer-nav-item.active {
        background: var(--primary-rgba-05);
        color: var(--primary-color);
        border-left-color: var(--primary-color);
    }
    
    .site-header .drawer-nav-item.active i {
        color: var(--primary-color);
    }
    
    /* ========== 语言选择器（顶部徽章 + 下拉展开）========== */
    
    /* 语言选择器包装器 */
    .site-header .drawer-lang-switcher-wrapper {
        list-style: none;
        margin: 0;
        padding: 0.75rem 1.25rem;
        position: relative;
    }
    
    /* 语言选择器按钮（徽章样式） */
    .site-header .drawer-lang-switcher-btn {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.875rem 1rem;
        background: #f8f9fa; /* 修改：浅灰色背景，区别于主色调 */
        border: 1px solid #e0e0e0; /* 修改：浅灰色细边框 */
        border-radius: 8px;
        color: var(--text-primary); /* 修改：使用普通文字颜色 */
        font-size: 0.9375rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s ease;
        outline: none;
    }
    
    .site-header .drawer-lang-switcher-btn:hover {
        background: #f0f0f0; /* 修改：悬停时稍微加深 */
        border-color: var(--primary-color); /* 修改：悬停时边框变为主色调 */
        color: var(--primary-color); /* 修改：悬停时文字变为主色调 */
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .site-header .drawer-lang-switcher-btn:active {
        transform: scale(0.98);
    }
    
    .site-header .drawer-lang-switcher-btn[aria-expanded="true"] {
        background: #f0f0f0; /* 修改：展开时稍微加深 */
        border-color: var(--primary-color); /* 修改：展开时边框变为主色调 */
        color: var(--primary-color); /* 修改：展开时文字变为主色调 */
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }
    
    .site-header .drawer-lang-switcher-btn i.bi-globe {
        font-size: 1.125rem;
        color: #6b7280; /* 修改：默认使用中性灰色 */
        transition: color 0.2s ease;
    }
    
    .site-header .drawer-lang-switcher-btn:hover i.bi-globe,
    .site-header .drawer-lang-switcher-btn[aria-expanded="true"] i.bi-globe {
        color: var(--primary-color); /* 悬停或展开时变为主色调 */
    }
    
    .site-header .lang-current-display {
        flex: 1;
        text-align: left;
    }
    
    .site-header .lang-chevron {
        font-size: 0.875rem;
        transition: transform 0.3s ease, color 0.2s ease;
        color: #6b7280; /* 修改：默认使用中性灰色 */
    }
    
    .site-header .drawer-lang-switcher-btn:hover .lang-chevron,
    .site-header .drawer-lang-switcher-btn[aria-expanded="true"] .lang-chevron {
        color: var(--primary-color); /* 悬停或展开时变为主色调 */
    }
    
    .site-header .drawer-lang-switcher-btn[aria-expanded="true"] .lang-chevron {
        transform: rotate(180deg);
    }
    
    /* 语言下拉菜单 */
    .site-header .drawer-lang-dropdown {
        display: none;
        list-style: none;
        margin: 0;
        padding: 0;
        background: #fff;
        border: 2px solid var(--primary-color);
        border-top: none;
        border-radius: 0 0 8px 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        overflow: hidden;
    }
    
    .site-header .drawer-lang-switcher-btn[aria-expanded="true"] + .drawer-lang-dropdown {
        display: block;
    }
    
    /* 语言选项 */
    .site-header .drawer-lang-option {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.875rem 1rem;
        color: var(--text-primary);
        text-decoration: none;
        font-size: 0.9375rem;
        transition: all 0.2s ease;
        border-bottom: 1px solid var(--border-color);
    }
    
    .site-header .drawer-lang-option:last-child {
        border-bottom: none;
    }
    
    .site-header .drawer-lang-option:hover {
        background: var(--primary-rgba-05);
        color: var(--primary-color);
    }
    
    .site-header .drawer-lang-option.active {
        background: var(--primary-rgba-10);
        color: var(--primary-color);
        font-weight: 600;
    }
    
    .site-header .drawer-lang-option.active .bi-check2 {
        color: var(--primary-color);
        font-size: 1rem;
    }
    
    /* 分隔线 */
    .site-header .drawer-nav-divider-li {
        list-style: none;
        margin: 0;
        padding: 0;
    }
    
    .site-header .drawer-nav-divider {
        height: 8px;
        background: var(--bg-light);
        margin: 0;
    }
}

/* ========== 桌面端/平板端隐藏移动端导航栏 ========== */
@media (min-width: 768px) {
    .site-header .navbar-mobile {
        display: none !important;
    }
}
