/* ==========================================================================
   顶部导航「产品与服务」下拉大菜单 · 腾讯云风格改版
   与 ProductsAndServices.html 的 tx-mega-* 结构配套
   ========================================================================== */

.tx-mega-bg {
    background: #fff !important;
    border-top: 1px solid #F2F3F5;
    box-shadow: 0 18px 40px rgba(16, 49, 102, .1) !important;
    padding: 0 !important;
}

.tx-mega-bg .CloseButtonMount {
    position: relative;
}

.tx-mega-bg .CloseButtonMount .menu-dropdown-close {
    top: 18px !important;
    right: 24px !important;
}

.tx-mega-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 26px 40px 26px !important;
    box-sizing: border-box;
}

.tx-mega {
    display: grid;
    grid-template-columns: 258px minmax(0, 1fr) 292px;
    gap: 30px;
    align-items: stretch;
}

/* ---------- 左侧分类 ---------- */
.tx-mega-rail {
    min-width: 0;
    border-right: 1px solid #F2F3F5;
    padding-right: 20px;
}

.tx-mega-rail-head {
    display: flex;
    align-items: baseline;
    gap: 5px;
    padding: 2px 12px 16px;
    border-bottom: 1px solid #F2F3F5;
    margin-bottom: 10px;
}

.tx-mega-rail-head span {
    font-size: 17px;
    font-weight: 600;
    color: #1D2129;
}

.tx-mega-rail-head b {
    font-size: 13px;
    font-weight: 600;
    color: #006EFF;
}

.tx-mega-rail-head em {
    font-style: normal;
    font-size: 12px;
    color: #86909C;
}

.tx-mega-rail-list {
    max-height: 520px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
}

.tx-mega-rail-list::-webkit-scrollbar {
    width: 4px;
}

.tx-mega-rail-list::-webkit-scrollbar-thumb {
    background: #D9DEE7;
    border-radius: 2px;
}

.tx-mega-rail-list::-webkit-scrollbar-track {
    background: transparent;
}

.tx-mega-cat {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: background .18s ease;
}

.tx-mega-cat::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    bottom: 9px;
    width: 3px;
    border-radius: 3px;
    background: transparent;
}

.tx-mega-cat:hover {
    background: #F7FAFF;
}

.tx-mega-cat.active {
    background: #F0F7FF;
}

.tx-mega-cat.active::before {
    background: #006EFF;
}

.tx-mega-cat-ico {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    color: #86909C;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tx-mega-cat-ico svg {
    width: 18px;
    height: 18px;
}

.tx-mega-cat.active .tx-mega-cat-ico {
    color: #006EFF;
}

.tx-mega-cat-name {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    color: #1D2129;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tx-mega-cat.active .tx-mega-cat-name {
    color: #006EFF;
    font-weight: 500;
}

.tx-mega-cat-num {
    flex: 0 0 auto;
    font-style: normal;
    font-size: 12px;
    color: #C0C6D0;
}

.tx-mega-cat.active .tx-mega-cat-num {
    color: #006EFF;
}

.tx-mega-hot {
    flex: 0 0 auto;
    font-style: normal;
    font-size: 10px;
    line-height: 16px;
    padding: 0 5px;
    border-radius: 3px;
    background: #FFF1EC;
    color: #FF5A2C;
    font-weight: 600;
}

/* ---------- 中间区 ---------- */
.tx-mega-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* 搜索框（复用模板 search 结构，重新皮肤） */
.tx-mega .Submenu-middle-search {
    padding: 0;
    margin: 0 0 20px;
}

.tx-mega .Submenu-middle-search-flex {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tx-mega .Submenu-middle-search-box {
    flex: 1;
    min-width: 0;
    background: #F5F7FA;
    border: 1px solid #E5E6EB;
    border-radius: 8px;
    height: 46px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    transition: all .2s ease;
}

.tx-mega .Submenu-middle-search-box:hover,
.tx-mega .Submenu-middle-search-box:focus-within {
    background: #fff;
    border-color: #006EFF;
}

.tx-mega .Submenu-middle-search-box-left {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.tx-mega .Submenu-middle-search-icon {
    font-size: 18px;
    color: #86909C;
}

.tx-mega .Submenu-middle-search-text {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 14px;
    color: #1D2129;
}

.tx-mega .Submenu-middle-search-text::placeholder {
    color: #86909C;
}

.tx-mega .Submenu-middle-search-content {
    flex: 0 0 auto;
}

.tx-mega .search-right-content {
    display: flex;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tx-mega .search-right-content-text {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 14px;
    border-radius: 6px;
    border: 1px solid #E5E6EB;
    background: #fff;
    font-size: 13px;
    color: #4E5969;
    transition: all .18s ease;
    white-space: nowrap;
}

.tx-mega .search-right-content-text:hover {
    color: #006EFF;
    border-color: #006EFF;
    background: #F7FAFF;
}

/* 区块标题 */
.tx-mega-sec-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.tx-mega-sec-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #1D2129;
}

.tx-mega-sec-dot {
    width: 3px;
    height: 14px;
    border-radius: 2px;
    background: #006EFF;
}

.tx-mega-sec-count {
    font-size: 12px;
    font-weight: 400;
    color: #86909C;
    margin-left: 2px;
}

.tx-mega-sec-more {
    font-size: 12.5px;
    color: #86909C;
    transition: color .18s ease;
    white-space: nowrap;
}

.tx-mega-sec-more:hover {
    color: #006EFF;
}

/* 产品面板 / 网格 */
.tx-mega-panels {
    flex: 1;
    min-height: 0;
    max-height: 336px;
    overflow-y: auto;
    padding-right: 4px;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 94%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, #000 94%, transparent 100%);
}

.tx-mega-panels::-webkit-scrollbar {
    width: 4px;
}

.tx-mega-panels::-webkit-scrollbar-thumb {
    background: #D9DEE7;
    border-radius: 2px;
}

.tx-mega-panels::-webkit-scrollbar-track {
    background: transparent;
}

.tx-mega-panel {
    display: none;
}

.tx-mega-panel.active {
    display: block;
}

.tx-mega-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px 12px;
}

.tx-mega-prod {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    min-width: 0;
    transition: background .18s ease;
}

.tx-mega-prod:hover {
    background: #F5F9FF;
}

.tx-mega-prod-ico {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 7px;
    background: #EEF5FF;
    color: #006EFF;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.tx-mega-prod-ico svg {
    width: 17px;
    height: 17px;
}

.tx-mega-prod-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tx-mega-prod-title {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.tx-mega-prod-title b {
    font-size: 13.5px;
    font-weight: 500;
    color: #1D2129;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tx-mega-prod-title em {
    flex: 0 0 auto;
    font-style: normal;
    font-size: 9.5px;
    line-height: 15px;
    padding: 0 4px;
    border-radius: 3px;
    background: #FFF1EC;
    color: #FF5A2C;
    font-weight: 600;
    text-transform: uppercase;
}

.tx-mega-prod-desc {
    font-size: 11.5px;
    color: #9AA3AE;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 按场景选型 */
.tx-mega-scenes {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #F2F3F5;
}

.tx-mega-scene-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

.tx-mega-scene {
    background: #F7F8FA;
    border-radius: 8px;
    padding: 11px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    transition: all .18s ease;
}

.tx-mega-scene b {
    font-size: 13px;
    font-weight: 600;
    color: #1D2129;
}

.tx-mega-scene span {
    font-size: 11px;
    color: #9AA3AE;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tx-mega-scene:hover {
    background: #F0F7FF;
    transform: translateY(-1px);
}

.tx-mega-scene:hover b {
    color: #006EFF;
}

/* ---------- 右侧推荐 ---------- */
.tx-mega-side {
    min-width: 0;
    display: flex;
    flex-direction: column;
    border-left: 1px solid #F2F3F5;
    padding-left: 24px;
}

.tx-mega-promo {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 12px;
    padding: 20px;
    background:
        radial-gradient(280px 180px at 88% 8%, rgba(0, 110, 255, .22), transparent 62%),
        linear-gradient(135deg, #EAF2FF 0%, #F5F9FF 60%, #E8F3FF 100%);
    border: 1px solid #E2EEFF;
    min-height: 158px;
    transition: box-shadow .2s ease;
}

.tx-mega-promo:hover {
    box-shadow: 0 12px 28px rgba(0, 82, 217, .12);
}

.tx-mega-promo-tag {
    align-self: flex-start;
    font-size: 10px;
    line-height: 17px;
    padding: 0 6px;
    border-radius: 3px;
    background: #006EFF;
    color: #fff;
    font-weight: 600;
    margin-bottom: 10px;
}

.tx-mega-promo b {
    font-size: 18px;
    font-weight: 600;
    color: #0B1A33;
    letter-spacing: -.2px;
}

.tx-mega-promo p {
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 1.7;
    color: #5E6A7A;
}

.tx-mega-promo-link {
    margin-top: 10px;
    font-size: 12.5px;
    font-weight: 500;
    color: #006EFF;
}

.tx-mega-promo-art {
    position: absolute;
    right: 14px;
    top: 20px;
    width: 92px;
    height: 118px;
    pointer-events: none;
}

.tx-mega-promo-art i {
    position: absolute;
    right: 0;
    height: 10px;
    border-radius: 3px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 82, 217, .12);
}

.tx-mega-promo-art i:nth-child(1) {
    top: 0;
    width: 86px;
}

.tx-mega-promo-art i:nth-child(2) {
    top: 22px;
    width: 64px;
}

.tx-mega-promo-art i:nth-child(3) {
    top: 44px;
    width: 78px;
}

.tx-mega-news {
    margin-top: 22px;
}

.tx-mega-news-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.tx-mega-news-head b {
    font-size: 14px;
    font-weight: 600;
    color: #1D2129;
}

.tx-mega-news-head a {
    color: #C0C6D0;
    font-size: 16px;
    line-height: 1;
}

.tx-mega-news-head a:hover {
    color: #006EFF;
}

.tx-mega-news-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tx-mega-news-list a {
    font-size: 12.5px;
    color: #4E5969;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tx-mega-news-list a:hover {
    color: #006EFF;
}

.tx-mega-news-empty {
    margin: 0;
    font-size: 12.5px;
    color: #9AA3AE;
}

.tx-mega-links {
    margin-top: auto;
    padding-top: 24px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.tx-mega-links a {
    display: flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 10px;
    border-radius: 6px;
    border: 1px solid #E5E6EB;
    background: #fff;
    font-size: 12.5px;
    color: #4E5969;
    transition: all .18s ease;
}

.tx-mega-links a svg {
    width: 15px;
    height: 15px;
    color: #86909C;
}

.tx-mega-links a:hover {
    color: #006EFF;
    border-color: #006EFF;
    background: #F7FAFF;
}

.tx-mega-links a:hover svg {
    color: #006EFF;
}

/* 关闭按钮（旧模板注入） */
.tx-mega-bg .Submenu-background .menu-dropdown-close {
    opacity: .6;
}

/* ---------- 覆盖旧版搜索区样式 ---------- */
.tx-mega-bg .tx-mega-container .tx-mega .Submenu-middle-search-flex {
    width: 100% !important;
    align-items: center !important;
    gap: 14px !important;
    display: flex !important;
}

.tx-mega-bg .tx-mega-container .tx-mega .Submenu-middle-search-box {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
}

.tx-mega-bg .tx-mega-container .tx-mega .Submenu-middle-search-box-left {
    width: 100% !important;
    padding: 0 !important;
    justify-content: flex-start !important;
}

.tx-mega-bg .tx-mega-container .tx-mega .Submenu-middle-search-text {
    width: 100% !important;
    font-size: 14px !important;
    line-height: normal !important;
    height: auto !important;
    border: 0 !important;
}

.tx-mega-bg .tx-mega-container .tx-mega .Submenu-middle-search-icon {
    font-size: 18px !important;
    margin-right: 2px !important;
    color: #86909C !important;
}

.tx-mega-bg .tx-mega-container .tx-mega .Submenu-middle-search-content {
    flex: 0 0 auto !important;
    width: auto !important;
}

.tx-mega-bg .tx-mega-container .tx-mega .search-right-content {
    margin-left: 0 !important;
    gap: 8px !important;
    align-items: center !important;
}

.tx-mega-bg .tx-mega-container .tx-mega .search-right-content li {
    margin-left: 0 !important;
    padding: 0 !important;
    background: none !important;
    border-radius: 6px !important;
    line-height: normal !important;
}

.tx-mega-bg .tx-mega-container .tx-mega .search-right-content li:hover {
    background: none !important;
}

/* 隐藏旧版关闭按钮，保持腾讯云式菜单观感 */
.menu-dropdown-container .menu-dropdown-close {
    display: none !important;
}

/* 右侧促销卡装饰条位置调整，避免压字 */
.tx-mega-promo b,
.tx-mega-promo p {
    max-width: 165px;
}

.tx-mega-promo-art {
    top: auto !important;
    bottom: 16px;
    right: 14px;
    height: 66px;
    opacity: .9;
}

.tx-mega-promo-art i:nth-child(1) {
    right: 0;
    width: 78px;
}

.tx-mega-promo-art i:nth-child(2) {
    top: 22px;
    width: 56px;
}

.tx-mega-promo-art i:nth-child(3) {
    top: 44px;
    width: 40px;
    opacity: .7;
}

/* 左侧分类滚动指示 */
.tx-mega-bg .tx-mega-container .tx-mega .tx-mega-rail-list {
    max-height: 482px;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 94%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, #000 94%, transparent 100%);
}

/* ---------- 关掉旧菜单遗留的展开动画/宽度限制 ---------- */
.menu-dropdown-container .Submenu-background.tx-mega-bg {
    width: 100%;
}

/* 覆盖旧版菜单容器写死的高度 */
.tx-mega-bg .tx-mega-container {
    min-height: 0 !important;
    height: auto !important;
}

/* 导航层级高于右侧悬浮客服，避免大菜单被遮挡 */
.nav-layoutcontainer {
    z-index: 1001 !important;
}

/* ==========================================================================
   其他导航下拉（解决方案 / 生态合作 / 支持与服务 / 了解我们）
   与产品大菜单共用同一套视觉语言
   ========================================================================== */
.tx-sub-bg {
    background: #fff !important;
    border-top: 1px solid #F2F3F5;
    box-shadow: 0 18px 40px rgba(16, 49, 102, .1) !important;
    padding: 0 !important;
}

.tx-sub-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 26px 40px !important;
    box-sizing: border-box;
    min-height: 0 !important;
    height: auto !important;
}

.tx-sub {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 292px;
    gap: 30px;
    align-items: start;
}

.tx-sub-main {
    min-width: 0;
}

.tx-sub-head {
    padding: 2px 2px 16px;
    border-bottom: 1px solid #F2F3F5;
    margin-bottom: 14px;
}

.tx-sub-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #006EFF;
}

.tx-sub-eyebrow::before {
    content: "";
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: #006EFF;
}

.tx-sub-desc {
    margin: 10px 0 0;
    font-size: 13px;
    line-height: 1.7;
    color: #86909C;
}

.tx-sub-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
}

.tx-sub-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid #E5E6EB;
    background: #fff;
    font-size: 13px;
    color: #4E5969;
    cursor: pointer;
    transition: all .18s ease;
    white-space: nowrap;
}

.tx-sub-tab em {
    font-style: normal;
    font-size: 10px;
    line-height: 16px;
    padding: 0 5px;
    border-radius: 3px;
    background: #FFF1EC;
    color: #FF5A2C;
    font-weight: 600;
}

.tx-sub-tab:hover {
    color: #006EFF;
    border-color: #006EFF;
}

.tx-sub-tab.active {
    color: #fff;
    background: #006EFF;
    border-color: #006EFF;
    box-shadow: 0 8px 18px rgba(0, 110, 255, .2);
}

.tx-sub-tab.active em {
    background: rgba(255, 255, 255, .22);
    color: #fff;
}

.tx-sub-panel {
    display: none;
}

.tx-sub-panel.active {
    display: block;
}

.tx-sub-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 14px;
}

.tx-sub-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    min-width: 0;
    transition: background .18s ease;
}

.tx-sub-link:hover {
    background: #F7FAFF;
}

.tx-sub-ico {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: #EEF5FF;
    color: #006EFF;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tx-sub-ico svg {
    width: 19px;
    height: 19px;
}

.tx-sub-link-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.tx-sub-link-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #1D2129;
    min-width: 0;
}

.tx-sub-tag {
    flex: 0 0 auto;
    font-style: normal;
    font-size: 10px;
    line-height: 16px;
    padding: 0 5px;
    border-radius: 3px;
    background: #FFF1EC;
    color: #FF5A2C;
    font-weight: 600;
}

.tx-sub-link-desc {
    font-size: 12px;
    color: #9AA3AE;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tx-sub-arrow {
    flex: 0 0 auto;
    font-size: 15px;
    color: #C9CDD4;
    transition: all .18s ease;
}

.tx-sub-link:hover .tx-sub-arrow {
    color: #006EFF;
    transform: translateX(3px);
}

.tx-sub-side {
    display: flex;
    flex-direction: column;
    border-left: 1px solid #F2F3F5;
    padding-left: 24px;
    min-height: 100%;
}

.tx-sub-side .tx-mega-promo {
    min-height: 150px;
}

.tx-sub-side .tx-mega-promo-art {
    display: none;
}

.tx-sub-promo-img {
    background-size: cover !important;
    background-position: center !important;
}

.tx-sub-promo-img b {
    max-width: 172px;
    color: #fff;
    font-size: 17px;
}

.tx-sub-promo-img p {
    color: rgba(255, 255, 255, .78);
}

.tx-sub-promo-img .tx-mega-promo-link {
    color: #fff;
}

.tx-sub-side .tx-mega-links {
    padding-top: 18px;
    margin-top: 0;
}

@media (max-width: 1440px) {
    .tx-sub-container {
        padding-left: 24px !important;
        padding-right: 24px !important;
    }

    .tx-sub {
        grid-template-columns: minmax(0, 1fr) 270px;
        gap: 24px;
    }
}

@media (max-width: 1200px) {
    .tx-sub {
        grid-template-columns: minmax(0, 1fr) 250px;
        gap: 18px;
    }
}

@media (max-width: 992px) {
    .tx-sub {
        grid-template-columns: 1fr;
    }

    .tx-sub-side {
        border-left: 0;
        border-top: 1px solid #F2F3F5;
        padding-left: 0;
        padding-top: 18px;
    }
}

@media (max-width: 1440px) {
    .tx-mega-container {
        padding-left: 24px !important;
        padding-right: 24px !important;
    }

    .tx-mega {
        grid-template-columns: 240px minmax(0, 1fr) 270px;
        gap: 24px;
    }
}

@media (max-width: 1200px) {
    .tx-mega {
        grid-template-columns: 220px minmax(0, 1fr) 250px;
        gap: 18px;
    }

    .tx-mega-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tx-mega-scene-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .tx-mega-side {
        display: none;
    }

    .tx-mega {
        grid-template-columns: 210px minmax(0, 1fr);
    }
}
