/* ==========================================================================
   网站装修 header 模块样式 (header 模式, 主题模版 id=1 电子科技)
   基于 ueeshop t331 ly_header_59; 作用域 .ly_header
   颜色/字号等配置相关样式由模板内联 <style> 注入 CSS 变量
   ========================================================================== */

.ly_header {
    width: 100%;
    z-index: 1;
    box-sizing: border-box;
    background-color: var(--ThemesHeaderBgColor, #2F2622);
}

.ly_header .headerFixed {
    width: 100%;
}

/* PC端/移动端 页首固定在顶部(pcSticky/mobileSticky 开启时)
   sticky 放在 .ly_header(父 main.deco-page 高度=整页, 有滚动空间);
   若放 .headerFixed(父 .ly_header 高度=自身), sticky 无空间会随父移出 */
@media screen and (min-width: 1001px) {
    .ly_header.sticky-pc {
        position: sticky;
        top: 0;
        z-index: 100;
    }
}
@media screen and (max-width: 1000px) {
    .ly_header.sticky-mobile {
        position: sticky;
        top: 0;
        z-index: 100;
    }
}

.ly_header .wide {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-sizing: border-box;
}

/* ===== 公告栏 ===== */
.ly_header .deco-header-announcement {
    width: 100%;
    text-align: center;
    padding: 10px 0;
    line-height: 1.5;
}
.ly_header .deco-header-announcement .wide {
    width: 100%;
    gap: 20px;
}

/* 公告栏只有一个子元素(如只显示正文)时居中; 多元素时 space-between 两端对齐 */
.ly_header .deco-header-announcement .wide > *:only-child {
    margin: 0 auto;
}
.ly_header .deco-header-announcement .ann-contact,
.ly_header .deco-header-announcement .ann-social {
    white-space: nowrap;
}
/* 联系方式: 邮箱/电话 图标+文字 横向排列 */
.ly_header .deco-header-announcement .ann-contact {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.ly_header .deco-header-announcement .ann-contact .ann-contact-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
}
.ly_header .deco-header-announcement .ann-contact .ann-contact-item:hover span {
    text-decoration: underline;
}
.ly_header .deco-header-announcement .ann-contact .ann-contact-icon {
    flex-shrink: 0;
}
/* 公告栏社交媒体图标(全局配置 social 组; socialOfficialColor 控彩色/黑白; 有地址才显示; 悬停上移) */
.ly_header .deco-header-announcement .ann-social .deco-social-icons { display: inline-flex; align-items: center; gap: 8px; height: 30px; }
.ly_header .deco-header-announcement .ann-social .deco-social-link { display: inline-flex; transition: transform 0.2s ease; }
.ly_header .deco-header-announcement .ann-social .deco-social-link:hover { transform: translateY(-3px); }
.ly_header .deco-header-announcement .ann-social .deco-social-link { color: inherit; }
.ly_header .deco-header-announcement .ann-social .deco-social-icon-bg { width: 20px; height: 20px; line-height: 20px; background-size: contain; background-repeat: no-repeat; background-position: center; }

/* PC 端公告栏布局(6 种单行排列, 用 flex order 控制 contact/text/social 顺序) */
.ly_header .pc_layout_onects .ann-contact { order: 1; } .ly_header .pc_layout_onects .ann-text { order: 2; } .ly_header .pc_layout_onects .ann-social { order: 3; }
.ly_header .pc_layout_onestc .ann-social { order: 1; } .ly_header .pc_layout_onestc .ann-text { order: 2; } .ly_header .pc_layout_onestc .ann-contact { order: 3; }
.ly_header .pc_layout_onecst .ann-contact { order: 1; } .ly_header .pc_layout_onecst .ann-social { order: 2; } .ly_header .pc_layout_onecst .ann-text { order: 3; }
.ly_header .pc_layout_onesct .ann-social { order: 1; } .ly_header .pc_layout_onesct .ann-contact { order: 2; } .ly_header .pc_layout_onesct .ann-text { order: 3; }
.ly_header .pc_layout_onetcs .ann-text { order: 1; } .ly_header .pc_layout_onetcs .ann-contact { order: 2; } .ly_header .pc_layout_onetcs .ann-social { order: 3; }
.ly_header .pc_layout_onetsc .ann-text { order: 1; } .ly_header .pc_layout_onetsc .ann-social { order: 2; } .ly_header .pc_layout_onetsc .ann-contact { order: 3; }

/* ===== LOGO ===== */
.ly_header .logo {
    padding: 10px 0;
    flex-shrink: 0;
}
.ly_header .logo a {
    display: block;
    text-decoration: none;
}
.ly_header .logo img {
    max-width: 100%;
    height: auto;
    display: block;
}
.ly_header .logo .logo-text.logo-image-fallback { display: none; }
.ly_header .logo .logo-text {
    display: inline-block;
    font-family: 'Poppins-Regular', 'Helvetica Neue', Arial, sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 1px;
    line-height: 1.2;
}

/* ===== 导航 ===== */
.ly_header .nav {
    margin-left: 12%;
    padding: 14px 0;
    flex: 1;
    min-width: 0;
}
.ly_header .nav ul.default_nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}
.ly_header .nav ul.default_nav li {
    padding: 10px 0;
    list-style: none;
}
.ly_header .nav ul.default_nav li > a {
    display: block;
    text-decoration: none;
    color: var(--ThemesNavTextColor, #ffffff);
    font-family: var(--ThemesNavFont, 'Poppins-Regular');
    transition: color 0.2s ease;
}
.ly_header .nav ul.default_nav li > a:hover {
    text-decoration: none;
    color: var(--ThemesNavTextHoverColor, #ffffff);
}

/* ===== 工具区 ===== */
.ly_header .tool {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.ly_header .tool a {
    text-decoration: none;
}
.ly_header .tool a:hover {
    text-decoration: none;
}
.ly_header .tool svg {
    display: block;
}
.ly_header .tool .tool_search {
    padding: 0 12px;
    cursor: pointer;
}
.ly_header .tool .tool_search a {
    display: block;
}
.ly_header .tool .tool_language {
    padding: 0 12px;
    cursor: pointer;
    line-height: 25px;
}
.ly_header .tool .tool_language dl {
    margin: 0;
}
.ly_header .tool .tool_language dt {
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 4px;
}
.ly_header .tool .tool_user {
    display: block;
    padding: 0 12px;
    cursor: pointer;
}
.ly_header .tool .tool_user .tool_member_entrance {
    display: block;
}
.ly_header .tool .tool_inquiry {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
}
.ly_header .tool .tool_inquiry .tool_inquiry_icon {
    display: block;
    padding: 0 10px;
}
.ly_header .tool .tool_inquiry .list_numner {
    display: flex;
    padding: 0 8px;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    border-radius: 18px;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}
.ly_header .tool .tool_inquiry_btn {
    margin-left: 12px;
}
.ly_header .tool .tool_inquiry_btn a {
    display: inline-block;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
}
.ly_header .tool .tool_menu {
    display: none;
    color: var(--ThemesHeaderIconColor, #ffffff);
    font-size: 26px;
    margin: 0 10px;
    cursor: pointer;
}

/* ===== 移动端 header (默认隐藏) ===== */
.ly_header .mobile_themes_global_header {
    display: none;
}
/* 移动端导航抽屉: PC 隐藏, 移动端点击 ajax_menu 展开 */
.mobile_nav_drawer {
    display: none;
}
.ly_header .mobile_themes_global_header .mobile_box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
}
.ly_header .mobile_themes_global_header .btn_menu {
    display: flex;
    align-items: center;
    gap: 20px;
}
.ly_header .mobile_themes_global_header .ajax_search,
.ly_header .mobile_themes_global_header .ajax_menu {
    cursor: pointer;
}

/* ===== 占位高度 ===== */
.ly_header .header_content_height {
    height: 0;
}

/* ===== 响应式 ===== */
@media screen and (max-width: 1000px) {
    /* 移动端 header 提升层级, 确保抽屉/遮罩不被其他模块遮挡;
       10000 高于客服 .deco-online-service(9999), 打开抽屉时盖住客服区域 */
    .ly_header {
        position: relative;
        z-index: 10000;
    }
    .ly_header .themes_global_header {
        display: none;
    }
    .ly_header .mobile_themes_global_header {
        display: block;
    }
    .ly_header .nav {
        display: none;
    }
    .ly_header .tool .tool_language {
        display: none;
    }
    .ly_header .tool .tool_user {
        display: none;
    }
    .ly_header .tool .tool_inquiry_btn {
        display: none;
    }
    .ly_header .tool .tool_menu {
        display: block;
        margin: 0;
    }
    .ly_header .tool .tool_search {
        padding: 0;
        margin: 0 20px;
    }

    /* 移动端公告栏布局: contact + social 在上, text 独占一行在下方 */
    .ly_header .deco-header-announcement .ann-text {
        width: 100%;
        order: 3;
    }
    .ly_header .deco-header-announcement .wide {
        gap: 12px;
        flex-wrap: wrap;
    }
    .ly_header .mobile_layout_two_rows_top_contact .wide { flex-direction: column; }
    .ly_header .mobile_layout_two_rows_top_contact .ann-contact { order: 1; }
    .ly_header .mobile_layout_two_rows_top_contact .ann-social { order: 2; }
    .ly_header .mobile_layout_two_rows_top_social .wide { flex-direction: column; }
    .ly_header .mobile_layout_two_rows_top_social .ann-social { order: 1; }
    .ly_header .mobile_layout_two_rows_top_social .ann-contact { order: 2; }
    .ly_header .mobile_layout_one_row_contact_left .wide { flex-direction: row; }
    .ly_header .mobile_layout_one_row_contact_left .ann-contact { order: 1; }
    .ly_header .mobile_layout_one_row_contact_left .ann-social { order: 2; }
    .ly_header .mobile_layout_one_row_contact_right .wide { flex-direction: row; }
    .ly_header .mobile_layout_one_row_contact_right .ann-social { order: 1; }
    .ly_header .mobile_layout_one_row_contact_right .ann-contact { order: 2; }

    /* 移动端导航遮罩(点击关闭抽屉) */
    .mobile_nav_mask {
        display: block;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 9998;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease;
    }
    .mobile_nav_mask.open {
        opacity: 1;
        visibility: visible;
    }
    /* 移动端导航抽屉(侧边滑出, 参考 ueeshop fixed_nav_pop_center) */
    .mobile_nav_drawer {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        width: 80%;
        max-width: 300px;
        height: 100%;
        background-color: #ffffff;
        z-index: 9999;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        box-shadow: -2px 0 8px rgba(0, 0, 0, 0.2);
    }
    .mobile_nav_drawer.open {
        transform: translateX(0);
    }
    .mobile_nav_drawer .box_top {
        display: flex;
        justify-content: flex-end;
        padding: 15px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
    .mobile_nav_drawer .box_top .close {
        cursor: pointer;
        display: flex;
        align-items: center;
    }
    .mobile_nav_drawer .box_center {
        padding: 0 20px;
    }
    .mobile_nav_drawer .menu_item {
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
    .mobile_nav_drawer .menu_item:last-of-type {
        border-bottom: none;
    }
    .mobile_nav_drawer .menu_title > a {
        display: block;
        padding: 14px 0;
        color: #333333;
        font-family: var(--ThemesNavFont, 'Poppins-Regular');
        text-decoration: none;
    }
    .mobile_nav_drawer .box_top .close svg {
        fill: #333333;
    }
    /* 语言切换(language_box) */
    .mobile_nav_drawer .language_box {
        position: relative;
        padding: 14px 0;
        margin-top: 20px;
    }
    .mobile_nav_drawer .language_title {
        display: flex;
        align-items: center;
        gap: 6px;
        color: #333333;
        cursor: pointer;
        padding: 10px 12px;
        border: 1px solid rgba(0, 0, 0, 0.15);
        border-radius: 4px;
    }
    .mobile_nav_drawer .language_title .lang_name {
        flex: 1;
    }
        /* 询盘按钮 */
    .mobile_nav_drawer .drawer_inquiry_btn {
        display: block;
        margin: 20px 0;
        padding: 10px 20px;
        text-align: center;
        text-decoration: none;
        font-family: var(--ThemesNavFont, 'Poppins-Regular');
    }
    /* 登录 */
    .mobile_nav_drawer .drawer_account {
        margin-top: auto;
        padding: 14px 20px;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }
    .mobile_nav_drawer .drawer_account a {
        display: flex;
        align-items: center;
        gap: 6px;
        color: #333333;
        text-decoration: none;
        font-size: 14px;
    }
}

/* 编辑态描边(hover/选中)与 cursor 统一在 editor.css 的 .deco-module::before 覆盖层里,
   本文件不再重复一套 outline: outline 会被模块内贴边的元素盖住一段。 */

/* ===== 内部元素编辑态交互提示 ===== */
.deco-edit-mode .ly_header .logo,
.deco-edit-mode .ly_header .nav li,
.deco-edit-mode .ly_header .tool_search,
.deco-edit-mode .ly_header .tool_language,
.deco-edit-mode .ly_header .tool_user,
.deco-edit-mode .ly_header .tool_inquiry,
.deco-edit-mode .ly_header .tool_inquiry_btn {
    cursor: pointer;
}

/* ===== 配置化导航：下拉子菜单与 mega menu ===== */
.ly_header .nav ul.default_nav li {
    position: relative;
}
.ly_header .nav ul.default_nav li.has-children > a::after {
    content: none;
}
.ly_header .nav ul.sub_nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    border-radius: 4px;
    padding: 8px 0;
    margin: 0;
    list-style: none;
    z-index: 100;
}
.ly_header .nav ul.default_nav li:hover > ul.sub_nav {
    display: block;
}
.ly_header .nav ul.sub_nav li {
    padding: 0;
}
.ly_header .nav ul.sub_nav li > a {
    display: block;
    padding: 8px 16px;
    color: var(--ThemesNavLevel2TextColor, #2F2622);
    white-space: nowrap;
}
.ly_header .nav ul.sub_nav li > a:hover {
    color: var(--ThemesNavLevel2TextHoverColor, #2F2622);
    background: rgba(0,0,0,0.04);
}

/* text_only 多级级联下拉 (flyout) */
.ly_header .nav .flyout {
    display: none;
    position: absolute;
    min-width: 180px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    border-radius: 4px;
    padding: 8px 0;
    margin: 0;
    list-style: none;
    z-index: 100;
}
.ly_header .nav ul.default_nav > li:hover > .flyout {
    display: block;
    top: 100%;
    left: 0;
}
/* 一级与下拉菜单间距(dropdownGap)的 hover 桥接: 透明伪元素填满间距空隙,
   鼠标下移经过空隙时仍处于 li 后代区域, 保持 li:hover, 避免下拉提前关闭 */
.ly_header .nav ul.default_nav > li > .flyout::before,
.ly_header .nav ul.default_nav > li > .product_mega_menu::before {
    content: '';
    position: absolute;
    top: calc(-1 * var(--dropdownGap, 10px));
    left: 0;
    right: 0;
    height: var(--dropdownGap, 10px);
}
.ly_header .nav .flyout li.has-sub > .flyout {
    top: 0;
    left: 100%;
}
.ly_header .nav .flyout li.has-sub:hover > .flyout {
    display: block;
}
.ly_header .nav ul.flyout li {
    position: relative;
    padding: 0;
}
.ly_header .nav .flyout li > a {
    display: block;
    position: relative;
    padding: 8px 28px 8px 16px;
    white-space: nowrap;
}
.ly_header .nav .flyout .flyout-arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
}
.ly_header .nav .flyout .flyout-arrow svg {
    width: 0.9em;
    height: 0.9em;
    display: block;
}
.ly_header .nav .flyout.flyout-level-2 li > a { color: var(--ThemesNavLevel2TextColor, #2F2622); font-size: var(--ThemesNavLevel2FontSize, 14px); }
.ly_header .nav .flyout.flyout-level-2 li > a:hover { color: var(--ThemesNavLevel2TextHoverColor, #2F2622); background: rgba(0,0,0,0.04); }
.ly_header .nav .flyout.flyout-level-3 li > a { color: var(--ThemesNavLevel3TextColor, #2F2622); font-size: var(--ThemesNavLevel3FontSize, 14px); }
.ly_header .nav .flyout.flyout-level-3 li > a:hover { color: var(--ThemesNavLevel3TextHoverColor, #2F2622); background: rgba(0,0,0,0.04); }
.ly_header .nav .flyout.flyout-level-4 li > a { color: var(--ThemesNavLevel4TextColor, #2F2622); font-size: var(--ThemesNavLevel4FontSize, 14px); }
.ly_header .nav .flyout.flyout-level-4 li > a:hover { color: var(--ThemesNavLevel4TextHoverColor, #2F2622); background: rgba(0,0,0,0.04); }

/* 商品 mega menu */
.ly_header .nav .product_mega_menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    border-radius: 4px;
    padding: 20px;
    z-index: 100;
}
.ly_header .nav ul.default_nav li:hover > .product_mega_menu {
    display: flex;
}
.ly_header .nav .product_mega_menu.mega-style-left {
    min-width: 600px;
    gap: 30px;
}
.ly_header .nav .product_mega_menu.mega-style-top {
    min-width: 500px;
    flex-direction: column;
    gap: 20px;
}
.ly_header .nav .product_mega_menu .mega_sub_nav {
    list-style: none;
    margin: 0;
    padding: 0;
    min-width: 160px;
}
.ly_header .nav .product_mega_menu .mega_sub_nav li > a {
    display: block;
    padding: 6px 0;
    color: var(--ThemesNavLevel2TextColor, #2F2622);
}
.ly_header .nav .product_mega_menu .mega_images {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.ly_header .nav .product_mega_menu.mega-style-top .mega_images {
    order: -1;
}
.ly_header .nav .product_mega_menu .mega_images a {
    display: block;
    width: 180px;
}
.ly_header .nav .product_mega_menu .mega_images img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 4px;
}

/* 左右分栏联动 mega menu (split_link_grid) */
.ly_header .nav .mega_split_menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 720px;
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    border-radius: 4px;
    z-index: 100;
}
.ly_header .nav ul.default_nav li:hover > .mega_split_menu {
    display: flex;
}
.ly_header .nav .mega_split_left {
    list-style: none;
    margin: 0;
    padding: 12px 0;
    width: 180px;
    background: #f5f7fa;
    border-right: 1px solid #eef0f3;
    border-radius: 4px 0 0 4px;
}
.ly_header .nav .mega_split_left > li {
    position: relative;
}
.ly_header .nav .mega_split_left > li > a {
    display: block;
    padding: 10px 18px;
    color: var(--ThemesNavLevel2TextColor, #2F2622);
    cursor: pointer;
    white-space: nowrap;
}
.ly_header .nav .mega_split_left > li:hover > a {
    background: rgba(0,0,0,0.04);
}
.ly_header .nav .mega_split_left > li.active > a {
    color: var(--ThemesNavLevel2TextHoverColor, #2F2622);
    font-weight: 600;
    background: #ffffff;
}
.ly_header .nav .mega_split_left > li.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--ThemesNavLevel2TextHoverColor, #22c55e);
}
.ly_header .nav .mega_split_right {
    flex: 1;
    padding: 20px 24px;
    min-width: 0;
}
.ly_header .nav .mega_split_panel {
    display: none;
}
.ly_header .nav .mega_split_panel.active {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px 20px;
}
.ly_header .nav .mega_split_panel .mega_col {
    min-width: 0;
}
.ly_header .nav .mega_split_panel .mega_col_title {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ThemesNavLevel3TextColor, #2F2622);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ly_header .nav .mega_split_panel .mega_col_items {
    list-style: none;
    margin: 0;
    padding: 0;
}
.ly_header .nav .mega_split_panel .mega_col_items li > a {
    display: block;
    padding: 5px 0;
    font-size: 13px;
    color: var(--ThemesNavLevel4TextColor, #59616e);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ly_header .nav .mega_split_panel .mega_col_items li > a:hover {
    color: var(--ThemesNavLevel4TextHoverColor, #2F2622);
}
.ly_header .nav .mega_split_panel .mega_empty {
    grid-column: 1 / -1;
    padding: 20px 0;
    color: #909399;
    font-size: 13px;
    text-align: center;
}

/* 移动端抽屉菜单下钻树:
   每层 .menu_level 默认隐藏, 当前层 .is-active 显示;
   父菜单行右侧 .menu_more(>) 点击下钻, 树底部 .menu_back 返回上一级 */
.mobile_nav_drawer .menu_level {
    display: none;
}
.mobile_nav_drawer .menu_level.is-active {
    display: block;
}
.mobile_nav_drawer .menu_title {
    display: flex;
    align-items: center;
}
.mobile_nav_drawer .menu_title > a {
    flex: 1;
}
.mobile_nav_drawer .menu_more {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    min-width: 44px;
    color: #999999;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    user-select: none;
}
.mobile_nav_drawer .menu_back {
    display: none;
    margin-top: 14px;
    padding: 12px 0;
    text-align: center;
    color: #333333;
    font-size: 14px;
    text-decoration: none;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.mobile_nav_drawer .menu_back.is-visible {
    display: block;
}

/* ===== 语言切换下拉(PC 图标下 / 移动端抽屉内) ===== */
.lang_dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 200;
    min-width: 130px;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    background: #ffffff;
    border: 1px solid #e5e9ef;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.lang_dropdown.is-open { display: block; }
.lang_dropdown li { margin: 0; }
.lang_dropdown__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    color: #333333;
    font-size: 14px;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s, color .15s;
}
.lang_dropdown__item:hover { background: #f5f7fa; color: #3165ff; }
.lang_dropdown__item.is-current { color: #3165ff; background: #f2f5ff; font-weight: 600; }
/* PC 语言图标需要定位上下文 */
.ly_header .tool .tool_language { position: relative; }
/* 移动端抽屉内的语言下拉: 宽度与语言框一致(left:0 + right:0 撑满) */
.mobile_nav_drawer .lang_dropdown {
    top: 100%;
    left: 0;
    right: 0;
    min-width: 0;
    border-radius: 4px;
    box-sizing: border-box;
}

.ly_header .tool_language { cursor: pointer; }
.mobile_nav_drawer .language_title { cursor: pointer; }

/* ===== 语言切换弹窗(switchEffect=fullscreen): 全屏遮罩 + 居中面板 =====
   弹窗移到 body 后仍需盖过 header(移动端 z-index 10000) */
.deco_lang_modal {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: none;
}
.deco_lang_modal.is-open { display: block; }
.deco_lang_modal__mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}
.deco_lang_modal__panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    width: min(560px, calc(100vw - 48px));
    max-height: min(70vh, 640px);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}
.deco_lang_modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #eef1f5;
}
.deco_lang_modal__title {
    color: #1d2129;
    font-size: 18px;
    font-weight: 600;
}
.deco_lang_modal__close {
    padding: 0 2px;
    border: 0;
    background: transparent;
    color: #86909c;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}
.deco_lang_modal__close:hover { color: #1d2129; }
.deco_lang_modal__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 24px;
    overflow-y: auto;
}
.deco_lang_modal__item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 52px;
    border: 1px solid #e5e9ef;
    border-radius: 8px;
    color: #333;
    font-size: 14px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
}
.deco_lang_modal__item:hover {
    border-color: #3165ff;
    color: #3165ff;
}
.deco_lang_modal__item.is-current {
    border-color: #3165ff;
    background: #f2f5ff;
    color: #3165ff;
    font-weight: 600;
}
@media (max-width: 640px) {
    .deco_lang_modal__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ===== 搜索区域 =====
   三种形态共用一套搜索框/历史/热门样式; modal 与 expand 打开时移到 body,
   z-index 与语言弹窗同级(10001), 盖过客服(9999)与 header 组(10000) */
/* 搜索框 */
.deco_search_modal .search_form,
.deco_search_expand__bar .search_form,
.mobile_search_drawer .search_form {
    display: flex;
    align-items: center;
}
.search_input {
    flex: 1;
    box-sizing: border-box;
    height: 40px;
    padding: 0 16px;
    border: 1px solid #dddddd;
    border-right: none;
    border-radius: 4px 0 0 4px;
    background: #ffffff;
    color: #333333;
    font-size: 14px;
    outline: none;
}
.search_input::placeholder { color: #999999; }
.search_submit {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 52px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 0 4px 4px 0;
    background: #333333;
    cursor: pointer;
}
.search_submit:hover { opacity: 0.85; }
/* 历史/热门区 */
.search_sections { margin-top: 24px; }
.search_section { margin-bottom: 20px; }
.search_section:last-child { margin-bottom: 0; }
/* 无数据时整体隐藏(热门区空态走这里); 历史区例外, 见下方 is-empty 覆盖 */
.search_section.is-empty { display: none; }
/* 历史区空态: 不隐藏整个区, 显示区标题 + 淡提示, 让用户知道历史搜索已开启 */
.search_section_history.is-empty { display: block; }
.search_words_empty {
    display: none;
    padding: 4px 0;
    color: #999999;
    font-size: 12px;
}
.search_section_history.is-empty .search_words_empty { display: block; }
.search_section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.search_section__title {
    color: #333333;
    font-size: 14px;
    font-weight: 600;
}
.search_history_clear {
    color: #999999;
    font-size: 12px;
}
.search_history_clear:hover { color: #333333; }
.search_words {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.search_word {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 16px;
    background: #f5f5f5;
    color: #555555;
    font-size: 12px;
    cursor: pointer;
}
.search_word:hover {
    background: #71422D;
    color: #ffffff;
}

/* 全屏弹出(pcSearchStyle=fullscreen): 顶部居中面板, 打开时移到 body */
.deco_search_modal {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: none;
}
.deco_search_modal.open { display: block; }
.deco_search_modal__mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}
.deco_search_modal__panel {
    position: relative;
    box-sizing: border-box;
    width: min(620px, calc(100vw - 40px));
    margin: 120px auto 0;
    padding: 40px;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
}
.deco_search_modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    cursor: pointer;
}
.deco_search_modal__close:hover { opacity: 0.6; }

/* 向下展开(pcSearchStyle=expand): 移到 body 后 fixed, bar 顶部由 JS 对齐到 header 底部 */
.deco_search_expand {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: none;
    pointer-events: none;
}
.deco_search_expand.open { display: block; }
.deco_search_expand__mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    pointer-events: auto;
}
.deco_search_expand__bar {
    position: absolute;
    left: 0;
    right: 0;
    box-sizing: border-box;
    padding: 24px 20px;
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    pointer-events: auto;
}
.deco_search_expand__bar .search_form {
    width: min(720px, 100%);
    margin: 0 auto;
}
.deco_search_expand__bar .search_sections {
    width: min(720px, 100%);
    margin: 16px auto 0;
}

/* 移动端搜索抽屉(点击 ajax_search, 右侧滑出, 与导航抽屉互斥) */
/* PC 端默认隐藏: 抽屉布局/显隐样式全在下方移动端媒体查询内, 不加这条则 PC 端
   元素裸露成普通 div 直接显示在页首下方(同 .mobile_nav_drawer 的 PC 端处理) */
.mobile_search_drawer {
    display: none;
}
@media (max-width: 1000px) {
    .mobile_search_drawer {
        position: fixed;
        top: 0;
        right: 0;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
        width: 80%;
        max-width: 300px;
        height: 100%;
        background: #ffffff;
        z-index: 10001;
        box-shadow: -2px 0 8px rgba(0, 0, 0, 0.2);
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }
    .mobile_search_drawer.open { transform: translateX(0); }
    .mobile_search_drawer__top {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 14px 14px 14px 16px;
        border-bottom: 1px solid #f0f0f0;
    }
    .mobile_search_drawer__top .search_form { flex: 1; }
    .mobile_search_drawer .search_input { height: 36px; }
    .mobile_search_drawer .search_submit { width: 46px; height: 36px; }
    .mobile_search_drawer__close {
        display: flex;
        flex-shrink: 0;
        cursor: pointer;
    }
    .mobile_search_drawer__body {
        flex: 1;
        overflow-y: auto;
        padding: 16px;
    }
    .mobile_search_drawer .search_sections { margin-top: 4px; }
}

/* ===== 语言切换小国旗(iconStyle=flag) =====
   复用 country-flags.css 的 sprite 定位(每旗格 64x38, icon_flag_big 定位),
   用 transform scale 缩至约 20x12, 不改 background-position。
   外层 .deco-lang-flag-box 定占位尺寸并裁掉缩放后的空隙,
   内层保持 sprite 原始尺寸供缩放(display:block 覆盖 sprite 的 inline-block)。 */
.deco-lang-flag-box {
    display: inline-block;
    flex-shrink: 0;
    width: 20px;
    height: 12px;
    overflow: hidden;
    vertical-align: middle;
}
.deco-lang-flag-box .deco-lang-flag {
    display: block;
    width: 64px;
    height: 38px;
    transform: scale(0.3125);
    transform-origin: 0 0;
}
