/* ===== 线性图标统一样式 ===== */
.icon-line {
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.35em;
}

.icon-line-lg {
    width: 1.2rem;
    height: 1.2rem;
    display: inline-block;
    vertical-align: middle;
}

/* ========================================
   卫木科技 - 工业高级感官网
   设计风格：深色工业风 | 全屏滚动 | 极简大气
   ======================================== */

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== 主题色变量体系 ===== */
:root,
[data-theme="dark"] {
    /* 背景 */
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --bg-card: #161616;
    --bg-modal: #1a1a1c;

    /* 导航栏 */
    --nav-bg: rgba(51, 51, 51, 0.3);
    --nav-bg-scrolled: rgba(18, 18, 18, 0.97);

    /* 文字 */
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-tertiary: #666666;

    /* 强调色 - 能量绿 */
    --accent: #00ff88;
    --accent-dim: #00cc6a;
    --accent-glow: rgba(0, 255, 136, 0.15);
    /* 全站按钮统一圆角 */
    --btn-radius: 8px;

    /* 辅助色 */
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(0, 255, 136, 0.3);

    /* 工具栏 */
    --toolbar-bg: rgba(22, 22, 22, 0.85);
    --toolbar-border: rgba(255, 255, 255, 0.1);
    --toolbar-icon-color: rgba(255, 255, 255, 0.5);
    --toolbar-icon-hover-bg: rgba(255, 255, 255, 0.08);
    --toolbar-icon-hover-color: rgba(255, 255, 255, 0.85);

    /* 弹框 */
    --bubble-bg: #222;
    --bubble-text: #fff;
    --bubble-border: rgba(255, 255, 255, 0.12);
    --bubble-option-hover: rgba(255, 255, 255, 0.06);
    --bubble-option-active: rgba(0, 255, 136, 0.12);

    /* 尺寸 */
    --nav-height: 64px;
    --max-width: 1400px;

    /* 过渡 */
    --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-slow: 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);

    /* 弹层遮罩（随主题变化，亮色下为浅色而非黑色） */
    --overlay-bg: rgba(0, 0, 0, 0.65);
}

[data-theme="light"] {
    /* 背景 */
    --bg-primary: #f2f3f5;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e8e9ed;
    --bg-card: #ffffff;
    --bg-modal: #ffffff;

    /* 导航栏 */
    --nav-bg: rgba(255, 255, 255, 0.65);
    --nav-bg-scrolled: rgba(255, 255, 255, 0.95);

    /* 文字 */
    --text-primary: #1a1a2e;
    --text-secondary: #5a5a72;
    --text-tertiary: #999aab;

    /* 强调色 - 深翠绿（亮色底需要更深才有对比度） */
    --accent: #00a854;
    --accent-dim: #008a44;
    --accent-glow: rgba(0, 168, 84, 0.1);

    /* 辅助色 */
    --border: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 168, 84, 0.3);

    /* 工具栏 */
    --toolbar-bg: rgba(255, 255, 255, 0.9);
    --toolbar-border: rgba(0, 0, 0, 0.1);
    --toolbar-icon-color: rgba(0, 0, 0, 0.45);
    --toolbar-icon-hover-bg: rgba(0, 0, 0, 0.05);
    --toolbar-icon-hover-color: rgba(0, 0, 0, 0.75);

    /* 弹框 */
    --bubble-bg: #ffffff;
    --bubble-text: #1a1a2e;
    --bubble-border: rgba(0, 0, 0, 0.1);
    --bubble-option-hover: rgba(0, 0, 0, 0.04);
    --bubble-option-active: rgba(0, 168, 84, 0.1);

    /* 弹层遮罩（亮色下为浅色磨砂，避免闪现黑色） */
    --overlay-bg: rgba(255, 255, 255, 0.6);
}

/* 全局过渡：主题切换平滑 */
body {
    transition: background 0.35s ease, color 0.35s ease;
}

/* 翻译加载遮罩：首屏/切换语言时，用当前主题背景盖住尚未翻译的中文，
   避免“闪现中文”与“亮色下闪现黑背景”。由 <head> 内联脚本添加 .i18n-loading，
   翻译系统首次 apply() 后移除。pointer-events:none 确保即使残留也不挡操作。 */
html.i18n-loading::before {
    content: '';
    position: fixed;
    inset: 0;
    /* 低于 navbar 的 2147483647（z-index 上限即此值），使导航栏在 TAB 切换/整页刷新时
       始终绘制在遮罩之上、绝不“先消失再出现”；遮罩仅覆盖内容区。 */
    z-index: 2147483646;
    background: var(--bg-primary);
    pointer-events: none;
}

/* 批量继承过渡，避免逐个声明 */
.navbar,
.nav-menu a,
.lang-switch,
.footer,
.product-card,
.catalog-sidebar,
.ops-modal,
.section-card,
.card-glass,
.cta-section {
    transition: background 0.35s ease, border-color 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-dim);
}

/* ===== 选中文本 ===== */
::selection {
    background: var(--accent);
    color: var(--bg-primary);
}

/* ===== 导航栏 - 参考高端工业风 ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: calc(100% - 100px);
    height: 64px;
    /* 必须高于全屏 Loading 遮罩(z=2147483646)。注意：z-index 上限即 2147483647，
       故此处写 2147483648 会被浏览器钳制为该上限；遮罩取 2147483646 确保导航栏严格在上。
       导航栏在整页 TAB 切换(整页 reload)期间始终可见、不被遮罩盖住而“先消失再出现”；
       导航栏文案由 navbar-pretranslate.js 在首屏绘制前同步翻好，故提到遮罩之上也不会闪现中文。 */
    z-index: 2147483648;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    /* 初始悬浮态：#333333半透明 + 磨砂玻璃效果 + 圆角 + 微投影 + 左右margin */
    background: var(--nav-bg);
    -webkit-backdrop-filter: blur(12px) saturate(1.4);
    backdrop-filter: blur(12px) saturate(1.4);
    border-radius: 14px;
    margin: 20px 50px 0 50px;
    border-bottom: none;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                margin 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                border-radius 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s ease;
}

/* 滚动后状态：全宽贴顶 + 无圆角 */
.navbar.scrolled {
    width: 100%;
    margin: 0;
    border-radius: 0;
    background: var(--nav-bg-scrolled);
}

/* 首屏加载期间禁用导航栏入场动画：避免 loading 遮罩揭开瞬间导航栏背景/尺寸仍在过渡，
   造成“导航背景闪”。body.loaded 由 translation-system.js 在揭开遮罩时添加，之后 hover/scroll 过渡恢复正常 */
body:not(.loaded) .navbar { transition: none !important; }

/* 左：Logo - 参考图 V 图标风格 */
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    flex-shrink: 0;
}

.nav-logo .logo-mark {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    border-radius: 2px;
}

.nav-logo .logo-text-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-logo .logo-text-group .dot-icon {
    font-size: 0.65rem;
    color: var(--text-tertiary);
    opacity: 0.5;
}

/* 中：菜单 - 带分隔符 */
.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-menu li {
    display: flex;
    align-items: center;
}

/* 菜单项之间的分隔符 */
.nav-menu li:not(:last-child)::after {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-tertiary);
    opacity: 0.4;
    margin: 0 28px;
    transition: background 0.3s ease;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    position: relative;
    transition: color 0.3s ease;
    padding: 8px 0;
    white-space: nowrap;
}

/* 下划线激活态 */
.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--text-primary);
    transition: width 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--text-primary);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

/* 分隔符hover效果 */
.nav-menu li:hover::after {
    opacity: 0.7;
}

/* ===== 导航二级下拉菜单 ===== */
.nav-menu li.has-dropdown {
    position: relative;
}

.nav-menu li.has-dropdown > a::before {
    content: '\25BE';
    font-size: 0.6rem;
    margin-left: 4px;
    opacity: 0.5;
    order: 1;
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--bg-card);
    -webkit-backdrop-filter: blur(12px) saturate(1.4);
    backdrop-filter: blur(12px) saturate(1.4);
    border-radius: 10px;
    min-width: 180px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
}

.nav-menu li.has-dropdown:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.nav-dropdown a::after {
    display: none;
}

.nav-dropdown a:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.nav-dropdown a .dd-icon {
    font-size: 0.9rem;
    opacity: 0.6;
}

/* 右侧区域 */
.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

/* 语言切换器 */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: 1px solid var(--border);
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 3px;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    font-family: inherit;
}

.lang-switch:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.lang-switch .lang-icon {
    font-size: 0.8rem;
    line-height: 1;
    color: var(--accent);
    display: inline-flex;
}

.lang-switch .lang-label {
    text-transform: uppercase;
}

.lang-switch .lang-arrow {
    font-size: 0.6rem;
    transition: transform 0.3s ease;
}

/* CTA按钮 - 参考图实心填充风格 */
.nav-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 22px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-decoration: none;
    /* 参考图橙色实心按钮 → 改为品牌绿 */
    background: var(--accent);
    color: var(--bg-primary);
    border: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    cursor: pointer;
    border-radius: var(--btn-radius);
}

.nav-cta-btn:hover {
    background: var(--accent-dim);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.nav-cta-btn .arrow {
    transition: transform 0.3s ease;
    font-size: 0.85rem;
}

.nav-cta-btn:hover .arrow {
    transform: translateX(3px);
}

/* 汉堡菜单 */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 8px;
}

.nav-toggle span {
    width: 22px;
    height: 1.5px;
    background: var(--text-primary);
    transition: var(--transition);
    border-radius: 1px;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* ===== 通用 Section ===== */
section {
    position: relative;
    min-height: 100vh;
    padding: var(--nav-height) 5% 40px;
    overflow-x: hidden;
}

.section-container {
    max-width: var(--max-width);
    width: 100%;
    margin: 0 auto;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.section-label::before {
    content: '';
    width: 30px;
    height: 1px;
    background: var(--accent);
}

.section-title {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 50px;
    line-height: 1.7;
}

/* ===== 动画工具类 ===== */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* 延迟 */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border-radius: var(--btn-radius);
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: var(--accent-dim);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--accent-glow);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn .arrow {
    transition: transform 0.3s ease;
}

.btn:hover .arrow {
    transform: translateX(4px);
}

/* ===== 网格背景装饰 ===== */
.grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

/* ===== 光晕装饰 ===== */
.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    opacity: 0.3;
}

.glow-green {
    background: var(--accent);
}

/* ===== 页脚 ===== */
.footer {
    background: var(--bg-secondary);
    padding: 60px 5% 30px;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand {
    max-width: 300px;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 16px;
    line-height: 1.7;
}

.footer-col h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    letter-spacing: 0.05em;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--accent);
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 0 auto;
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-tertiary);
    font-size: 0.8rem;
}

/* ===== 数字计数器 ===== */
.counter {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0 20px;
        height: 60px;
    }

    .nav-logo .logo-mark {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    .nav-logo .logo-text-group .dot-icon {
        display: none;
    }

    /* 移动端隐藏语言切换和CTA */
    .lang-switch,
    .nav-cta-btn {
        display: none;
    }

    .nav-menu {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        height: calc(100vh - 60px);
        background: var(--bg-primary);
        flex-direction: column;
        justify-content: center;
        gap: 0;
        transform: translateX(100%);
        transition: transform 0.4s ease;
        left: auto;
        right: 0;
        transform: none;
    }

    .nav-menu.active {
        display: flex;
    }

    /* 覆盖移动端菜单样式 */
    .nav-menu {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        height: calc(100vh - 60px);
        background: rgba(10, 10, 10, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 32px;
        transform: translateX(100%);
        transition: transform 0.4s ease;
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-menu li::after {
        display: none !important;
    }

    .nav-menu a {
        font-size: 1.1rem;
        letter-spacing: 0.06em;
    }

    .nav-toggle {
        display: flex;
    }

    section {
        padding: 80px 20px 40px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* ===== 右侧固定工具栏 ===== */
.site-toolbar {
    position: fixed;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 99900;
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--toolbar-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 6px;
}

.toolbar-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--toolbar-icon-color);
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    transition: all 0.2s ease;
}

.toolbar-btn:hover {
    background: var(--toolbar-icon-hover-bg);
    color: var(--toolbar-icon-hover-color);
}

.toolbar-btn svg {
    width: 20px;
    height: 20px;
}

/* 主题按钮激活态 */
.toolbar-btn.theme-active {
    color: var(--accent);
}

/* 运维按钮激活态 */
.toolbar-btn.ops-active {
    color: var(--accent);
    box-shadow: inset 0 0 0 1px var(--accent);
}

/* 工具栏分割线 */

/* ===== 主题切换气泡弹框 ===== */
.theme-popup {
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--bubble-bg);
    border-radius: 8px;
    padding: 4px;
    min-width: 120px;
    z-index: 99901;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.theme-popup.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* 气泡箭头（指向右侧图标） */
.theme-popup::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: var(--bubble-border);
}

.theme-popup::before {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%) translateX(1px);
    border: 5px solid transparent;
    border-left-color: var(--bubble-bg);
    z-index: 1;
}

.theme-popup-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    background: transparent;
    color: var(--bubble-text);
    font-size: 0.82rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease;
    text-align: left;
    white-space: nowrap;
}

.theme-popup-item:hover {
    background: var(--bubble-option-hover);
}

.theme-popup-item.active {
    background: var(--bubble-option-active);
    color: var(--accent);
    font-weight: 600;
}

.theme-popup-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.7;
}

.theme-popup-item.active svg {
    opacity: 1;
    color: var(--accent);
}

/* ===== 运维模式系统 ===== */

/* 运维气泡 —— 左侧显示（工具栏在右侧） */
.ops-bubble {
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent);
    color: #000;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    z-index: 10001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.ops-bubble.show {
    opacity: 1;
}

/* 气泡箭头：指向右侧 */
.ops-bubble::before {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left-color: var(--accent);
}

/* 运维弹框 */
.ops-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--overlay-bg);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
}

.ops-modal-overlay.show {
    display: flex;
}

.ops-modal {
    background: var(--bg-modal);
    border-radius: 12px;
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
}

.ops-modal-header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ops-modal-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.ops-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.ops-modal-close:hover {
    color: var(--text-primary);
}

.ops-modal-body {
    padding: 24px;
}

.ops-modal-footer {
    padding: 16px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 运维表单元素 */
.ops-modal input[type="password"],
.ops-modal input[type="text"],
.ops-modal textarea {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px 14px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.ops-modal textarea {
    resize: vertical;
    min-height: 80px;
}

/* 站点配置面板 */
.ops-config-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}
.ops-config-row label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.ops-config-hint {
    font-size: 0.78rem;
    line-height: 1.55;
    color: var(--text-tertiary);
    margin: 0;
}

.ops-modal input:focus,
.ops-modal textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.ops-error {
    color: #ff4444;
    font-size: 0.8rem;
    margin-top: 8px;
    display: none;
}

.ops-error.show {
    display: block;
}

.ops-btn-cancel {
    padding: 8px 20px;
    border: 1px solid var(--border);
    border-radius: var(--btn-radius);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.2s;
}

.ops-btn-cancel:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.ops-btn-save {
    padding: 8px 20px;
    border: none;
    border-radius: var(--btn-radius);
    background: var(--accent);
    color: #000;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.2s;
}

.ops-btn-save:hover {
    background: var(--accent-dim);
}

/* ===== 内容注册表面板 ===== */
.ops-trans-modal { max-width: 880px; width: 92%; max-height: 86vh; display: flex; flex-direction: column; }
.ops-trans-actions { display: flex; justify-content: flex-end; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.ops-trans-hint { color: var(--text-secondary); font-size: 0.82rem; line-height: 1.5; margin: 0 0 14px; }
#opsTransBtn { display: none; }
body.ops-mode #opsTransBtn { display: flex; }
#opsConfigBtn { display: none; }
body.ops-mode #opsConfigBtn { display: flex; }
.ops-trans-search { margin-bottom: 14px; }
.ops-trans-search input { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-input, #16181d); color: var(--text-primary); font-size: 0.9rem; font-family: inherit; }
.ops-trans-search input:focus { outline: none; border-color: var(--accent); }
.ops-trans-list { overflow-y: auto; padding-right: 6px; }
.ops-trans-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 10px; background: rgba(255,255,255,0.02); }
.ops-trans-src { flex: 0 0 190px; font-weight: 600; color: var(--text-primary); word-break: break-all; padding-top: 4px; font-size: 0.9rem; }
.ops-trans-inputs { flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ops-trans-cell { display: flex; flex-direction: column; gap: 3px; }
.ops-trans-cell label { font-size: 0.7rem; color: var(--text-secondary); }
.ops-trans-cell input { padding: 6px 8px; border: 1px solid var(--border); border-radius: 5px; background: var(--bg-input, #16181d); color: var(--text-primary); font-size: 0.85rem; font-family: inherit; }
.ops-trans-cell input:focus { outline: none; border-color: var(--accent); }
.ops-trans-apply { flex: 0 0 auto; padding: 6px 14px; border: none; border-radius: var(--btn-radius); background: var(--accent); color: #000; font-weight: 600; cursor: pointer; align-self: center; }
.ops-trans-apply:hover { background: var(--accent-dim); }

/* ===== Tippy.js 运维编辑气泡主题 ===== */
.tippy-box[data-theme~='ops'] {
    background: var(--accent);
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.tippy-box[data-theme~='ops']:hover {
    transform: scale(1.1);
}

.tippy-box[data-theme~='ops'] > .tippy-content {
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tippy-box[data-theme~='ops'] .ops-edit-icon-btn {
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.tippy-box[data-theme~='ops'] .ops-edit-icon-btn svg {
    width: 18px;
    height: 18px;
}

.tippy-box[data-theme~='ops'] > .tippy-arrow {
    color: var(--accent);
    transform: scale(1.3);
}

/* 媒体预览 */
.ops-media-preview {
    width: 100%;
    min-height: 120px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ops-media-preview img,
.ops-media-preview video {
    width: 100%;
    display: block;
    max-height: 300px;
    object-fit: contain;
}

.ops-upload-area {
    text-align: center;
    padding: 20px;
    border-radius: 8px;
}

.ops-upload-btn {
    padding: 10px 24px;
    border: 1px solid var(--border-hover);
    border-radius: 6px;
    background: var(--accent-glow);
    color: var(--accent);
    cursor: pointer;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.2s;
}

.ops-upload-btn:hover {
    background: rgba(0, 255, 136, 0.1);
    border-color: var(--accent);
}

/* ===== 语言选择面板（参考 Sungrow 全屏区域结构） ===== */
.lang-panel-overlay {
    position: fixed;
    inset: 0;
    z-index: 100100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.lang-panel-overlay.show {
    opacity: 1;
    visibility: visible;
}

.lang-panel-backdrop {
    position: absolute;
    inset: 0;
    background: var(--overlay-bg);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.lang-panel-container {
    position: relative;
    width: 92%;
    max-width: 1200px;
    max-height: 88vh;
    background: var(--bg-card);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.35s ease;
}

.lang-panel-overlay.show .lang-panel-container {
    transform: translateY(0);
}

.lang-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 28px;
    flex-shrink: 0;
}

.lang-panel-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.lang-panel-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.lang-panel-close:hover {
    color: var(--text-primary);
    background: var(--toolbar-icon-hover-bg);
}

.lang-panel-body {
    padding: 28px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 28px;
}

.lang-panel-group {
    min-width: 0;
}

.lang-panel-region {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 14px 0;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.lang-panel-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lang-panel-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.lang-panel-item:hover {
    background: var(--bubble-option-hover);
    color: var(--text-primary);
}

.lang-panel-item.active {
    background: var(--bubble-option-active);
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
}

.lp-flag {
    width: 20px;
    height: 15px;
    flex-shrink: 0;
    border-radius: 2px;
    object-fit: cover;
}

/* ===== RTL 语言（阿拉伯语/希伯来语等）：文字右对齐，布局不翻转 ===== */
/* 仅让文字右对齐，栏位顺序保持 LTR（不换位置） */

body[data-rtl="true"] {
    direction: ltr;
}

body[data-rtl="true"] h1,
body[data-rtl="true"] h2,
body[data-rtl="true"] h3,
body[data-rtl="true"] h4,
body[data-rtl="true"] h5,
body[data-rtl="true"] h6,
body[data-rtl="true"] p,
body[data-rtl="true"] td,
body[data-rtl="true"] th,
body[data-rtl="true"] label,
body[data-rtl="true"] dd,
body[data-rtl="true"] blockquote,
body[data-rtl="true"] figcaption,
body[data-rtl="true"] .section-title,
body[data-rtl="true"] .desc,
body[data-rtl="true"] .detail-text,
body[data-rtl="true"] .card-text,
body[data-rtl="true"] .hero-sub,
body[data-rtl="true"] .product-card-body,
body[data-rtl="true"] .feature-text,
body[data-rtl="true"] .spec-item,
body[data-rtl="true"] .dl-name,
body[data-rtl="true"] .form-desc,
body[data-rtl="true"] .form-note,
body[data-rtl="true"] .office-info {
    text-align: right;
}

body[data-rtl="true"] input,
body[data-rtl="true"] textarea,
body[data-rtl="true"] select {
    text-align: right;
}

/* 语言选择面板本身保持 LTR（国旗与列表对齐不被打乱） */
.lang-panel-overlay,
.lang-panel-container,
.lang-panel-body,
.lang-panel-item,
.lang-panel-header {
    direction: ltr !important;
}

/* 移动端语言面板 */
@media (max-width: 1100px) {
    .lang-panel-body {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .site-toolbar {
        right: 8px;
        border-radius: 5px;
    }
    .toolbar-btn {
        width: 32px;
        height: 32px;
    }
    .toolbar-btn svg {
        width: 16px;
        height: 16px;
    }
    .theme-popup {
        right: calc(100% + 6px);
    }
    .ops-bubble {
        right: calc(100% + 6px);
    }
    .lang-panel-body {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 20px;
    }
    .lang-panel-header {
        padding: 18px 20px;
    }
    .lang-panel-container {
        width: 96%;
        max-height: 92vh;
    }
}

@media (max-width: 480px) {
    .lang-panel-body {
        grid-template-columns: 1fr;
    }
}

/* ===== 运维模式：产品列表增删按钮 ===== */

/* 产品卡片删除按钮（右下角方形图标） */
/* 默认隐藏，仅在 body.ops-mode 时显示 */
.pc-del-btn {
    display: none;
}
body.ops-mode .pc-del-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(255, 80, 80, 0.3);
    border-radius: 4px;
    background: rgba(255, 80, 80, 0.1);
    color: rgba(255, 80, 80, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s;
    z-index: 10;
}

body.ops-mode .pc-del-btn:hover {
    background: rgba(255, 80, 80, 0.25);
    border-color: rgba(255, 80, 80, 0.6);
    color: #ff5050;
}

body.ops-mode .pc-del-btn svg {
    width: 14px;
    height: 14px;
}

/* 添加产品卡片：默认隐藏 */
.product-add-card {
    display: none;
}
body.ops-mode .product-add-card {
    display: block;
    cursor: pointer;
    border: 1px dashed rgba(0, 255, 136, 0.25) !important;
    background: rgba(0, 255, 136, 0.02) !important;
    transition: all 0.3s;
}

body.ops-mode .product-add-card:hover {
    border-color: var(--border-hover) !important;
    background: var(--accent-glow) !important;
}

/* 运维模式下产品卡片相对定位（供绝对定位的删除按钮） */
body.ops-mode .product-card {
    position: relative;
}

.add-card-img {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-glow);
}

.add-card-img svg {
    opacity: 0.4;
    color: var(--accent);
    transition: opacity 0.3s;
}

.product-add-card:hover .add-card-img svg {
    opacity: 0.7;
}

/* ===== 运维模式：侧边栏分类增删 ===== */

/* 侧边栏子项行（包含菜单项+删除按钮） */
.sidebar-submenu-row {
    position: relative;
}

/* 分类删除按钮：默认隐藏，hover 滑入 */
.cat-del-btn {
    display: none;
}
body.ops-mode .ops-cat-row:hover .cat-del-btn {
    display: flex;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: 1px solid rgba(255, 80, 80, 0.3);
    border-radius: 3px;
    background: rgba(255, 80, 80, 0.1);
    color: rgba(255, 80, 80, 0.7);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s;
    z-index: 5;
}
body.ops-mode .ops-cat-row:hover .cat-del-btn:hover {
    background: rgba(255, 80, 80, 0.25);
    border-color: rgba(255, 80, 80, 0.6);
    color: #ff5050;
}
body.ops-mode .cat-del-btn svg {
    width: 12px;
    height: 12px;
}

/* 添加分类按钮 */
.cat-add-btn {
    display: none;
}
body.ops-mode .cat-add-btn {
    display: block;
    width: 100%;
    padding: 8px 18px 8px 30px;
    font-size: 0.8rem;
    color: rgba(0, 255, 136, 0.6);
    background: none;
    border: none;
    border-top: 1px solid rgba(255,255,255,0.04);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: all 0.2s ease;
}
body.ops-mode .cat-add-btn:hover {
    color: var(--accent);
    background: rgba(0, 255, 136, 0.04);
}
