/* 标题栏基础样式（适配白色背景） */
#mainHeader {
    position: sticky;
    top: 0;
    z-index: 9999;
    background-color: white !important;
    /* 标题栏改为白色背景，不再透明 */
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    /* 更浅的阴影，更精致 */
}

/* 滚动后标题栏样式（轻微强化阴影） */
#mainHeader.scrolled {
    background-color: #ffffff !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05) !important;
}

/* 导航文字默认色 - 关键修改：固定为黑色 */
.nav-link {
    color: #1D2129 !important;
    /* 修改：从#165DFF改为黑色 */
    transition: color 0.3s ease !important;
}

.nav-link:hover {
    color: #165DFF !important;
    /* 深一点的蓝色，hover更明显 */
}

/* 移除滚动后颜色变化的样式，确保始终为黑色 */
/* #mainHeader.scrolled .nav-link {
    color: #1D2129 !important;
}
#mainHeader.scrolled .nav-link:hover {
    color: #165DFF !important;
} */

/* Logo文字样式 - 关键修改：固定为黑色 */
#logo-text {
    color: #1D2129 !important;
    /* 修改：从#165DFF改为黑色 */
    transition: color 0.3s ease !important;
    display: inline-block !important;
    font-weight: bold !important;
}

/* 移除滚动后Logo颜色变化 */
/* #mainHeader.scrolled #logo-text {
    color: #1D2129 !important;
} */

#logo-text:hover {
    color: #0F52D9 !important;
}

/* 以下原有样式全部保持不变 */
/* 通用布局样式（所有页面可能用到） */
.fixed-sidebar {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9998 !important;
}

.writing-vertical-lr {
    writing-mode: vertical-lr;
}

.scroll-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.scroll-container::-webkit-scrollbar {
    height: 8px;
    /* 滚动条高度 */
}

.scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    /* 滚动条轨道背景 */
    border-radius: 4px;
}

.scroll-container::-webkit-scrollbar-thumb {
    background: #165DFF;
    /* 滚动条滑块颜色（和主色一致） */
    border-radius: 4px;
}

.scroll-container::-webkit-scrollbar-thumb:hover {
    background: #0F52D9;
    /* 滑块hover颜色 */
}

/* 商城页专属样式（仅作用于shop-header类） */
header#mainHeader.shop-header {
    background-color: #ffffff !important;
}

header#mainHeader.shop-header .nav-link {
    color: #1D2129 !important;
}

header#mainHeader.shop-header #logo-text {
    color: #1D2129 !important;
}

header#mainHeader.shop-header #mobileMenuBtn {
    color: #1D2129 !important;
}

/* ========== 右侧固定客服栏（修复版） ========== */
.customer-service {
    position: fixed !important;
    right: 25px !important;
    bottom: 25px !important;
    z-index: 10000 !important;
    /* 最高层级 */
    width: 48px !important;
    height: 48px !important;
    margin: 0 !important;
    padding: 0 !important;
    cursor: pointer !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.3s ease !important;
    background: #165DFF !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid white !important;
}

/* 悬停效果 */
.customer-service:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25) !important;
    background: #0F52D9 !important;
}

/* 激活/点击效果 */
.customer-service:active {
    transform: scale(0.95) !important;
}

/* 客服图标样式 */
.service-img {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.service-img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* 悬浮提示框样式 */
.service-tooltip {
    position: absolute !important;
    right: 60px !important;
    /* 从75px改为60px，靠近按钮 */
    bottom: 0 !important;
    background: white !important;
    padding: 15px !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15) !important;
    width: 220px !important;
    z-index: 10001 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateX(10px) !important;
    transition: all 0.3s ease !important;
    border: 1px solid #e8e8e8 !important;
}

/* 添加箭头指向按钮 */
.service-tooltip::after {
    content: '';
    position: absolute !important;
    right: -8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 0 !important;
    height: 0 !important;
    border-top: 8px solid transparent !important;
    border-bottom: 8px solid transparent !important;
    border-left: 8px solid white !important;
}

/* 悬停时显示提示框 */
.customer-service:hover .service-tooltip {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(0) !important;
}

/* 提示框按钮样式 */
.tooltip-btn {
    display: block !important;
    background: #165DFF !important;
    color: white !important;
    padding: 10px 0 !important;
    border-radius: 6px !important;
    text-align: center !important;
    margin-top: 10px !important;
    width: 100% !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    font-size: 15px !important;
    transition: background 0.3s ease !important;
    border: none !important;
    cursor: pointer !important;
}

.tooltip-btn:hover {
    background: #0e4bdb !important;
}

/* 提示框文字样式 */
.tooltip-time {
    margin: 0 0 10px 0 !important;
    color: #666 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    text-align: center !important;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .customer-service {
        right: 18px !important;
        bottom: 18px !important;
        width: 42px !important;
        height: 42px !important;
    }

    .service-tooltip {
        right: 55px !important;
        width: 200px !important;
        padding: 12px !important;
        bottom: -5px !important;
    }

    .tooltip-btn {
        padding: 8px 0 !important;
        font-size: 14px !important;
    }

    .tooltip-time {
        font-size: 13px !important;
    }
}

/* 小屏幕进一步优化 */
@media (max-width: 480px) {
    .customer-service {
        right: 15px !important;
        bottom: 15px !important;
        width: 40px !important;
        height: 40px !important;
        border: 1px solid white !important;
    }

    .service-tooltip {
        right: 50px !important;
        width: 180px !important;
        padding: 10px !important;
    }
}

/* 确保客服按钮在触摸设备上容易点击 */
@media (hover: none) and (pointer: coarse) {
    .customer-service {
        min-width: 44px !important;
        /* iOS推荐的最小触摸尺寸 */
        min-height: 44px !important;
    }

    /* 在触摸设备上，点击时立即显示提示框 */
    .customer-service.touch-active .service-tooltip {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateX(0) !important;
    }
}

/* ========== 客服微信弹窗样式（全局共用） ========== */
/* 1. 遮罩层：全屏半透明，居中显示弹窗 */
.service-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    /* 半透明黑色遮罩 */
    z-index: 99999;
    /* 最高层级，确保不被遮挡 */
    display: none;
    /* 默认隐藏 */
    justify-content: center;
    align-items: center;
    padding: 20px;
    /* 移动端左右留白 */
}

/* 2. 弹窗主体：渐变背景+圆角+阴影 */
.service-modal {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f7ff 50%, #d1eaff 100%);
    /* 清新蓝渐变 */
    border-radius: 20px;
    /* 大圆角更美观 */
    box-shadow: 0 15px 40px rgba(22, 93, 255, 0.25);
    /* 柔和阴影 */
    width: 100%;
    max-width: 420px;
    /* PC端最大宽度 */
    padding: 30px 25px;
    position: relative;
    text-align: center;
    border: 1px solid #e8f4ff;
    /* 浅边框增加层次感 */
}

/* 3. 关闭按钮：圆形悬浮效果 */
.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    /* 平滑过渡 */
    font-weight: bold;
}

.modal-close:hover {
    background: #165DFF;
    /* 主色背景 */
    color: white;
    transform: scale(1.1);
    /* 轻微放大 */
}

/* 4. 弹窗标题 */
.modal-title {
    font-size: 22px;
    font-weight: 700;
    color: #1D2129;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

/* 5. 弹窗说明文字 */
.modal-desc {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* 6. 二维码容器：白色背景+阴影突出 */
.qrcode-container {
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    display: inline-block;
    margin-bottom: 18px;
}

/* 7. 二维码图片：固定尺寸+防变形 */
.qrcode-img {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
    /* 轻微圆角 */
}

/* 8. 底部提示文字 */
.modal-footer {
    font-size: 14px;
    color: #888;
    margin-top: 5px;
    line-height: 1.5;
}

/* 9. 移动端适配（屏幕小于480px时） */
@media (max-width: 480px) {
    .service-modal {
        padding: 25px 20px;
    }

    .qrcode-img {
        width: 180px;
        height: 180px;
    }

    .modal-title {
        font-size: 18px;
    }

    .modal-desc {
        font-size: 14px;
    }

    .modal-close {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
}

/* 搜索弹窗样式 */
.search-modal-overlay {
    z-index: 9999 !important;
    /* 确保弹窗在最上层 */
}

.search-modal {
    position: relative;
    /* 为关闭按钮绝对定位做准备 */
}

.search-modal-close {
    cursor: pointer;
    font-size: 20px;
}

/* 适配移动端 */
@media (max-width: 768px) {
    .search-modal {
        width: 90% !important;
        padding: 1rem !important;
    }
}

/* 搜索按钮 hover 效果强化 */
#searchBtn:hover,
#mobileSearchBtn:hover {
    cursor: pointer;
}

/* 确保客服按钮在触摸设备上容易点击 */
@media (hover: none) and (pointer: coarse) {
    .customer-service {
        min-width: 44px !important;
        /* iOS推荐的最小触摸尺寸 */
        min-height: 44px !important;
    }

    /* 在触摸设备上，点击时立即显示提示框 */
    .customer-service.touch-active .service-tooltip {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateX(0) !important;
    }
}

/* ========== 搜索弹窗样式 ========== */
.search-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-in-out;
}

.search-modal {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease-out;
}

.search-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.search-modal-close:hover {
    background-color: #f5f5f5;
    color: #333;
}

.search-modal h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
    text-align: center;
}

#searchForm {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#searchInput {
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
}

#searchInput:focus {
    outline: none;
    border-color: #165DFF;
    box-shadow: 0 0 0 3px rgba(22, 93, 255, 0.1);
}

#searchForm button[type="submit"] {
    padding: 12px;
    background-color: #165DFF;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#searchForm button[type="submit"]:hover {
    background-color: #0e4cd3;
}

#searchForm button[type="submit"] i {
    margin-right: 8px;
}

.search-modal p.text-xs {
    margin-top: 15px;
    text-align: center;
    color: #666;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 移动端适配 */
@media (max-width: 640px) {
    .search-modal {
        padding: 20px;
        margin: 20px;
        width: calc(100% - 40px);
    }

    .search-modal h3 {
        font-size: 20px;
    }

    #searchInput {
        font-size: 16px;
        padding: 10px 14px;
    }

    #searchForm button[type="submit"] {
        padding: 10px;
        font-size: 16px;
    }
}

/* 确保首页标题栏不受其他样式影响 - 关键修改：固定为黑色 */
body.index-page #mainHeader,
body.index-page #mainHeader .nav-link,
body.index-page #mainHeader #logo-text {
    color: #1D2129 !important;
    /* 修改：从#165DFF改为黑色 */
}

/* 移除滚动后颜色变化 */
/* body.index-page #mainHeader.scrolled .nav-link,
body.index-page #mainHeader.scrolled #logo-text {
    color: #1D2129 !important;
} */

/* 确保解决方案标签可点击 */
.solution-tab {
    touch-action: manipulation;
    cursor: pointer;
}

.solution-tab:focus {
    outline: 2px solid #165DFF;
    outline-offset: 2px;
}

/* 防止其他样式覆盖 */
#image-wrapper .group {
    pointer-events: auto !important;
}

/* 下拉菜单通用 hover/选中样式 */
.dropdown-menu a {
    transition: all 0.3s ease !important;
}

.dropdown-menu a:hover {
    background-color: #F2F3F5 !important;
    color: #165DFF !important;
}

/* 导航当前页高亮通用样式 */
.nav-active {
    color: #165DFF !important;
    font-weight: 600 !important;
    border-bottom: 2px solid #165DFF !important;
}

/* 案例中心页面专属高亮 */
body .case-nav-active {
    color: #165DFF !important;
    font-weight: 600 !important;
    border-bottom: 2px solid #165DFF !important;
}