/* ==============================
   Header
================================= */

header.current {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 9999;
}

header {
    width: 100%;
    padding: 15px 0;
    color: #fff;
    background: #0035cd;
    border-radius: 0 0 30px 30px;
    position: relative;
    z-index: 9999;
    transition: all .25s ease;
}

header .container {
    position: relative;
}

header .logo {
   width: 260px;
    height: 43px;
    flex-shrink: 0;
}

header .logo a {
    display: block;
    width: 260px;
    height: 43px;
    background: url(../images/logo.png) no-repeat center;
    background-size: contain;
    transition: all .25s ease;
}

header nav {
    flex: 1;
    padding-left: 35px;
}

header nav > ul {
    align-items: center;
}

header nav > ul > li {
    position: relative;
}

header nav > ul > li > a {
    display: block;
    color: #fff;
    font-size: 1rem;
    line-height: 46px;
    padding: 0 15px;
    border-radius: 24px;
    transition: all .25s ease;
    white-space: nowrap;
}

header nav > ul > li:hover > a,
header nav > ul > li.active > a {
    background: rgba(255,255,255,.16);
    color: #fff;
}

header .header-search {
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255,255,255,.9);
    border-radius: 50%;
    cursor: pointer;
    text-align: center;
    color: #fff;
    flex-shrink: 0;
    transition: all .25s ease;
}

header .header-search i {
    font-size: 1.2rem;
    line-height: 44px;
}

header .header-search:hover {
    background: #fff;
    color: #0035cd;
}

.mobile-menu-btn {
    display: none;
}


/* ==============================
   Header Hover 变白效果
================================= */

header:hover {
    background: #fff;
    color: #00111f;
    border-radius: 0;
    box-shadow: 0 8px 28px rgba(0,0,0,.08);
}

header:hover nav > ul > li > a {
    color: #00111f;
}

header:hover nav > ul > li:hover > a,
header:hover nav > ul > li.active > a {
    background: #f2f4f8;
    color: #0035cd;
}

header:hover .header-search {
    border-color: #00111f;
    color: #00111f;
}

header:hover .header-search:hover {
    background: #0035cd;
    border-color: #0035cd;
    color: #fff;
}

header:hover .logo a {
    background-image: url(../images/logo1.png);
}


/* ==============================
   Mega Common
   全屏下拉
================================= */

.has-mega {
    position: relative;
}

header nav > ul > li.has-mega::after {
    content: "";
    position: absolute;
    left: 0;
    top: 46px;
    width: 100%;
    height: 35px;
    background: transparent;
    display: block;
}

.mega-menu {
    position: fixed;
    left: 0;
    top: 76px;
    width: 100vw;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: none;
    transition: opacity .2s ease, visibility .2s ease;
    z-index: 9998;
    background: transparent;
}

.mega-menu::before {
    content: "";
    position: absolute;
    left: 0;
    top: -30px;
    width: 100%;
    height: 30px;
    background: transparent;
}

.has-mega:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mega-menu a {
    text-decoration: none;
}


/* ==============================
   Product Mega
   产品三级全屏下拉
================================= */

.product-mega {
    background: #f4f5f7;
    border-radius: 0 0 30px 30px;
    box-shadow: 0 24px 60px rgba(0,0,0,.16);
    overflow: hidden;
}

.product-mega-inner {
    display: grid;
    grid-template-columns: 290px 270px 1fr;
    max-width: 1360px;
    margin: 0 auto;
    background: #f4f5f7;
}

.product-mega-left {
    padding: 32px 34px;
    background: #fff;
}

.product-mega-left a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #00111f;
    font-size: 16px;
    line-height: 24px;
    font-weight: 600;
    padding: 13px 0;
    border-bottom: 1px solid transparent;
    transition: all .2s ease;
}

.product-mega-left a span {
    color: #00111f;
    font-weight: 400;
}

.product-mega-left a:hover,
.product-mega-left a.active {
    color: #0035cd;
    border-bottom-color: #0035cd;
}

.product-mega-left a:hover span,
.product-mega-left a.active span {
    color: #0035cd;
}

.product-mega-middle {
    padding: 32px 0;
    background: #f4f5f7;
    border-right: 1px solid #d9dde5;
}

.product-second-list {
    display: none;
    padding: 0 34px;
}

.product-second-list.active {
    display: block;
}

.product-second-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #00111f;
    font-size: 16px;
    line-height: 24px;
    padding: 10px 0;
    transition: all .2s ease;
}

.product-second-list a span {
    font-size: 20px;
}

.product-second-list a:hover,
.product-second-list a.active {
    color: #0035cd;
}

.product-mega-right {
    padding: 26px 38px 42px;
    background: #f4f5f7;
}

.product-third-box {
    display: none;
}

.product-third-box.active {
    display: block;
}

.product-overview {
    margin-bottom: 26px;
}

.product-overview a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 345px;
    min-height: 48px;
    padding: 0 24px;
    background: #00111f;
    color: #fff;
    border-radius: 28px;
    font-size: 17px;
    line-height: 22px;
    font-weight: 700;
    box-sizing: border-box;
}

.product-overview a span {
    color: #fff;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 168px);
    gap: 18px;
    max-width: none;
}

.product-card {
    width: 168px;
    min-height: 274px;
    background: #fff;
    border-radius: 18px;
    padding: 18px 18px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #00111f;
    box-shadow: 0 8px 22px rgba(0,0,0,.04);
    transition: all .25s ease;
    box-sizing: border-box;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0,53,205,.13);
}

.product-card img {
    width: 100%;
    height: 125px;
    object-fit: contain;
    margin-bottom: 14px;
}

.product-card strong {
    display: block;
    font-size: 18px;
    line-height: 21px;
    font-weight: 700;
    color: #00111f;
}

.product-card p {
    margin: 18px 0 0;
    color: #9aa3b2;
    font-size: 15px;
    line-height: 20px;
}

.product-card p span {
    margin-left: 8px;
    font-size: 18px;
}


/* ==============================
   Simple Mega
   普通栏目全屏下拉
================================= */

.simple-mega {
    background: #fff;
    border-radius: 0 0 30px 30px;
    box-shadow: 0 24px 60px rgba(0,0,0,.16);
    overflow: hidden;
}

.simple-mega-inner {
    display: grid;
    grid-template-columns: 1fr 430px;
    gap: 60px;
    max-width: 1360px;
    margin: 0 auto;
    padding: 42px 20px 52px;
    background: #fff;
}

.simple-mega-left {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    column-gap: 55px;
    row-gap: 2px;
}

.simple-mega-left a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #00111f;
    font-size: 16px;
    line-height: 24px;
    padding: 13px 0;
    border-bottom: 1px solid #edf0f5;
    transition: all .2s ease;
}

.simple-mega-left a span {
    color: #222e4d;
    font-size: 18px;
}

.simple-mega-left a:hover {
    color: #0035cd;
    border-bottom-color: #222e4d;
}

.simple-feature-card {
    display: block;
    position: relative;
    height: 250px;
    border-radius: 20px;
    overflow: hidden;
    background: #00111f;
}

.simple-feature-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .82;
    transition: all .35s ease;
}

.simple-feature-card:hover img {
    transform: scale(1.05);
    opacity: .65;
}

.simple-feature-card div {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 16px;
    background: rgba(255,255,255,.95);
    border-radius: 12px;
    padding: 16px 20px;
}

.simple-feature-card strong {
    display: block;
    color: #00111f;
    font-size: 17px;
    line-height: 24px;
}

.simple-feature-card p {
    margin: 4px 0 0;
    color: #6b7280;
    font-size: 14px;
}


/* ==============================
   Search Popup
================================= */

.search-mask {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all .25s ease;
}

.search-popup {
    position: fixed;
    left: 50%;
    top: 50%;
    width: min(760px, calc(100vw - 32px));
    background: #fff;
    border-radius: 28px;
    padding: 42px 42px 36px;
    transform: translate(-50%, -48%) scale(.96);
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: all .25s ease;
    box-shadow: 0 30px 80px rgba(0,0,0,.24);
    box-sizing: border-box;
}

.search-popup.active,
.search-mask.active {
    opacity: 1;
    visibility: visible;
}

.search-popup.active {
    transform: translate(-50%, -50%) scale(1);
}

.search-popup-close {
    position: absolute;
    right: 20px;
    top: 18px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    text-align: center;
    cursor: pointer;
    color: #00111f;
    background: #f2f4f8;
    transition: all .25s ease;
}

.search-popup-close:hover {
    background: #0035cd;
    color: #fff;
}

.search-popup-close i {
    line-height: 36px;
}

.search-popup-box {
    width: 100%;
}

.search-popup-head {
    margin-bottom: 24px;
}

.search-popup-head span {
    display: inline-block;
    margin-bottom: 8px;
    color: #0035cd;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
}

.search-popup-head h3 {
    margin: 0 0 8px;
    color: #00111f;
    font-size: 34px;
    line-height: 1.25;
    font-weight: 800;
}

.search-popup-head p {
    margin: 0;
    color: #5b6472;
    font-size: 15px;
    line-height: 1.65;
}

.search-channel-filter {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.search-channel-option {
    height: 48px;
    border: 1px solid #d9dde8;
    border-radius: 16px;
    background: #f7f8fb;
    color: #1a2d4d;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all .25s ease;
}

.search-channel-option i {
    color: #0035cd;
    font-size: 15px;
    transition: all .25s ease;
}

.search-channel-option:hover {
    border-color: #0035cd;
    background: #eef3ff;
    color: #0035cd;
}

.search-channel-option.active {
    border-color: #0035cd;
    background: #0035cd;
    color: #fff;
    box-shadow: 0 10px 24px rgba(0,53,205,.22);
}

.search-channel-option.active i {
    color: #fff;
}

.search-popup-form {
    display: flex;
    border: 2px solid #0035cd;
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
    transition: all .25s ease;
}

.search-popup-form.error {
    border-color: #e23b3b;
    box-shadow: 0 0 0 4px rgba(226,59,59,.08);
}

.search-popup-form input {
    flex: 1;
    width: 100%;
    height: 58px;
    border: 0;
    outline: none;
    padding: 0 24px;
    font-size: 16px;
    color: #00111f;
    box-sizing: border-box;
}

.search-popup-form input::placeholder {
    color: #9aa3b2;
}

.search-popup-form button {
    width: 76px;
    height: 58px;
    border: 0;
    background: #0035cd;
    color: #fff;
    cursor: pointer;
    font-size: 20px;
    flex-shrink: 0;
    transition: all .25s ease;
}

.search-popup-form button:hover {
    background: #222e4d;
}

.search-popup-message {
    display: none;
    margin-top: 10px;
    color: #e23b3b;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 600;
}

.search-popup-message.show {
    display: block;
}

.search-popup-note {
    margin-top: 18px;
    padding: 14px 16px;
    background: #f3f6ff;
    border-radius: 14px;
    color: #5b6472;
    font-size: 13px;
    line-height: 1.65;
}


/* ==============================
   Mobile <= 768px
================================= */

@media screen and (max-width: 768px) {

    html,
    body {
        width: 100%;
        overflow-x: hidden;
    }

    header,
    header:hover {
        width: 100%;
        padding: 8px 0;
        background: #0035cd !important;
        color: #fff !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        z-index: 9999;
    }

    header .container {
        width: 100%;
        padding: 0 14px;
        box-sizing: border-box;
        display: flex !important;
        align-items: center;
        justify-content: space-between;
    }

    header .logo {
        width: 128px;
        height: 46px;
        flex-shrink: 0;
    }

    header .logo a {
        display: block;
        width: 128px;
        height: 46px;
        background: url(../images/logo.png) no-repeat center;
        background-size: contain;
        filter: none !important;
    }

    header:hover .logo a {
        background-image: url(../images/logo.png) !important;
        filter: none !important;
    }

    header .header-search,
    header:hover .header-search {
        width: 42px;
        height: 42px;
        margin-left: auto;
        margin-right: 8px;
        border: 1px solid rgba(255,255,255,.85) !important;
        border-radius: 50%;
        color: #fff !important;
        background: transparent !important;
        flex-shrink: 0;
        order: 2;
    }

    header .header-search i {
        line-height: 40px;
        font-size: 18px;
    }

    .mobile-menu-btn {
        display: block;
        width: 42px;
        height: 42px;
        border: 1px solid rgba(255,255,255,.85);
        border-radius: 50%;
        color: #fff;
        text-align: center;
        cursor: pointer;
        flex-shrink: 0;
        order: 3;
    }

    .mobile-menu-btn i {
        line-height: 40px;
        font-size: 20px;
    }

    header nav {
        position: fixed;
        left: 0;
        top: 62px;
        width: 100%;
        max-height: calc(100vh - 62px);
        overflow-y: auto;
        background: #0035cd;
        padding: 12px 22px 28px;
        box-sizing: border-box;
        display: none;
        z-index: 9998;
        box-shadow: 0 18px 40px rgba(0,0,0,.18);
    }

    header nav.active {
        display: block;
    }

    header nav > ul,
    header nav > ul.flex {
        display: block !important;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    header nav > ul > li {
        display: block !important;
        width: 100%;
        margin: 0;
        padding: 0;
        border-bottom: 1px solid rgba(255,255,255,.18);
    }

    header nav > ul > li > a,
    header:hover nav > ul > li > a {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        height: auto;
        line-height: 48px;
        padding: 0;
        margin: 0;
        border-radius: 0;
        color: #fff !important;
        background: transparent !important;
        font-size: 16px;
        white-space: normal;
        box-sizing: border-box;
    }

    header nav > ul > li:hover > a,
    header nav > ul > li.active > a,
    header:hover nav > ul > li:hover > a,
    header:hover nav > ul > li.active > a {
        color: #fff !important;
        background: transparent !important;
    }

    header nav > ul > li.has-mega::after,
    .mega-menu::before {
        display: none !important;
    }

    .mega-menu {
        position: static !important;
        left: auto;
        top: auto;
        width: 100%;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
        display: none;
        margin: 0 0 14px;
        padding: 0;
        background: transparent;
        box-shadow: none;
        border-radius: 16px;
    }

    .has-mega.mobile-open .mega-menu {
        display: block;
    }

    .product-mega {
        width: 100%;
        background: #f4f5f7;
        border-radius: 16px;
        box-shadow: none;
        overflow: hidden;
    }

    .product-mega-inner {
        display: block;
        width: 100%;
        max-width: none;
        min-height: auto;
        margin: 0;
        background: #f4f5f7;
    }

    .product-mega-left,
    .product-mega-middle,
    .product-mega-right {
        width: 100%;
        padding: 16px;
        box-sizing: border-box;
    }

    .product-mega-left {
        background: #fff;
    }

    .product-mega-middle {
        background: #f4f5f7;
        border-right: 0;
        border-top: 1px solid #e2e6ee;
    }

    .product-mega-right {
        background: #f4f5f7;
        border-top: 1px solid #e2e6ee;
    }

    .product-mega-left a,
    .product-second-list a {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        color: #00111f !important;
        font-size: 15px;
        line-height: 22px;
        padding: 11px 0;
        background: transparent !important;
    }

    .product-mega-left a.active,
    .product-second-list a.active {
        color: #0035cd !important;
    }

    .product-second-list {
        display: none;
        padding: 0;
    }

    .product-second-list.active {
        display: block;
    }

    .product-third-box {
        display: none;
    }

    .product-third-box.active {
        display: block;
    }

    .product-overview {
        margin-bottom: 16px;
    }

    .product-overview a {
        width: 100%;
        min-width: 0;
        min-height: 44px;
        height: auto;
        padding: 11px 18px;
        font-size: 15px;
        line-height: 20px;
        box-sizing: border-box;
    }

    .product-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        max-width: none;
    }

    .product-card {
        width: 100%;
        min-height: 190px;
        padding: 14px;
        border-radius: 14px;
        box-sizing: border-box;
    }

    .product-card img {
        width: 100%;
        height: 92px;
        object-fit: contain;
        margin-bottom: 10px;
    }

    .product-card strong {
        font-size: 14px;
        line-height: 18px;
    }

    .product-card p {
        font-size: 13px;
        margin-top: 8px;
    }

    .simple-mega {
        width: 100%;
        background: #fff;
        border-radius: 16px;
        box-shadow: none;
        overflow: hidden;
    }

    .simple-mega-inner {
        display: block;
        max-width: none;
        margin: 0;
        padding: 16px;
        background: #fff;
        box-sizing: border-box;
    }

    .simple-mega-left {
        display: block;
    }

    .simple-mega-left a {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        color: #00111f !important;
        font-size: 15px;
        line-height: 22px;
        padding: 11px 0;
        background: transparent !important;
    }

    .simple-feature-card {
        height: 170px;
        margin-top: 16px;
        border-radius: 14px;
    }

    .simple-feature-card div {
        left: 12px;
        right: 12px;
        bottom: 12px;
        padding: 12px 14px;
    }

    .simple-feature-card strong {
        font-size: 15px;
    }

    .simple-feature-card p {
        font-size: 13px;
    }

    .search-popup {
        width: calc(100vw - 28px);
        padding: 34px 18px 24px;
        border-radius: 20px;
        box-sizing: border-box;
    }

    .search-popup-close {
        right: 14px;
        top: 14px;
        width: 34px;
        height: 34px;
    }

    .search-popup-close i {
        line-height: 34px;
    }

    .search-popup-head {
        margin-bottom: 20px;
        padding-right: 34px;
    }

    .search-popup-head h3 {
        font-size: 26px;
        line-height: 1.25;
    }

    .search-popup-head p {
        font-size: 14px;
    }

    .search-channel-filter {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-bottom: 16px;
    }

    .search-channel-option {
        height: 44px;
        border-radius: 14px;
        font-size: 13px;
    }

    .search-popup-form input {
        height: 52px;
        padding: 0 16px;
        font-size: 14px;
    }

    .search-popup-form button {
        width: 58px;
        height: 52px;
        font-size: 18px;
    }

    .search-popup-note {
        margin-top: 14px;
        padding: 12px 14px;
        font-size: 12px;
    }
}


/* ==============================
   Product Mega 修复：标题溢出
   放在 header.css 最底部
================================= */

.product-mega-right {
    min-width: 0;
    overflow: hidden;
}

/* 顶部黑色 Overview 按钮防止超出右侧 */
.product-overview a {
    max-width: 100%;
    min-width: 0;
    width: auto;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    box-sizing: border-box;
}

/* 产品卡片不要写死 168px，否则右侧空间小时会挤爆 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 168px));
    gap: 18px;
    max-width: 760px;
    overflow: hidden;
}

/* 卡片高度固定，内容内部控制 */
.product-card {
    width: 168px;
    height: 280px;
    min-height: 280px;
    padding: 18px 18px 20px;
    box-sizing: border-box;
    overflow: hidden;
}

/* 图片区域固定 */
.product-card img {
    width: 100%;
    height: 126px;
    object-fit: contain;
    margin-bottom: 14px;
    flex-shrink: 0;
}

/* 标题最多显示 3 行，超出隐藏 */
.product-card strong {
    display: -webkit-box;
    height: 63px;
    max-height: 63px;
    font-size: 14px;
    line-height: 21px;
    color: #00111f;
    overflow: hidden;
    word-break: break-word;
    overflow-wrap: anywhere;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* View 固定在底部 */
.product-card p {
    margin: auto 0 0;
    color: #9aa3b2;
    font-size: 15px;
    line-height: 20px;
    flex-shrink: 0;
}

.product-card p span {
    margin-left: 8px;
    font-size: 18px;
}


/* ==============================
   小屏桌面宽度修复
   防止右侧按钮和卡片被挤出
================================= */

@media screen and (max-width: 1200px) and (min-width: 769px) {

    .product-mega-inner {
        grid-template-columns: 290px 270px minmax(0, 1fr);
    }

    .product-mega-right {
        padding: 26px 28px 42px;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(168px, 168px));
        max-width: 100%;
    }

    .product-overview a {
        font-size: 16px;
        line-height: 21px;
        padding: 12px 22px;
    }
}