#navbar-root {
    position: relative;
    /* 普通页面保持原有布局；详情页桌面端在下方规则中建立固定交互层。 */
    z-index: 1040;
}

.navbar-scroll {
    position: relative;
    z-index: 1040;
    pointer-events: auto;
    transition:
        height 0.35s ease,
        background-color 0.35s ease,
        box-shadow 0.35s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.navbar-scroll.navbar-expand-lg {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    height: 136px;
    padding: 0;
}

.navbar-company-header {
    flex: 0 0 56px;
    width: 100%;
    height: 56px;
    overflow: visible;
    position: relative;
    z-index: 2;
    transition:
        flex-basis 0.35s ease,
        height 0.35s ease,
        opacity 0.35s ease;
}

.nav-simple > .container-fluid1 {
    flex: 0 0 80px;
    width: 100%;
    height: 60px;
    position: relative;
    z-index: 2001;
    pointer-events: auto;
    overflow: visible;
    transition:
        flex-basis 0.35s ease,
        height 0.35s ease;
}

.navbar-brand-info {
    position: relative;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
    padding: 0rem 4.3rem;
}

.navbar-company-logo-link {
    display: inline-flex;
    align-items: center;
    height: 60px;
    margin: 10px 0px;
    overflow: visible;
    transition:
        opacity 0.35s ease,
        max-width 0.35s ease,
        margin 0.35s ease;
    max-width: 200px;
}

.navbar-company-logo-link img {
    display: block;
    width: auto;
    height: 50px;
    object-fit: contain;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.navbar-company-name {
    position: absolute;
    max-width: calc(100% - 280px);
    overflow: hidden;
    color: #1f2937;
    font-size: 26px;
    font-weight: 600;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    left: 50%;
    transform: translateX(-50%);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

/* 滚动后：菜单行中间显示公司名 */
.navbar-company-name-bar {
    max-width: min(420px, 36vw);
    overflow: hidden;
    color: #1f2937;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition:
        opacity 0.35s ease,
        transform 0.35s ease,
        visibility 0.35s ease;
    pointer-events: none;
}

/* 普通页面滚动后的半透明导航背景。 */
.navbar-scroll.navbar-scrolled {
    background-color: rgba(255, 255, 255, 0.65) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* 详情页滚动收缩后使用不透明背景，不套用普通页面的半透明效果。 */
.navbar-scroll.navbar-scroll-enabled.navbar-scrolled {
    padding: 0;
    overflow: visible;
    isolation: isolate;
    background: #ffffff !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.navbar-scroll.navbar-scroll-enabled.navbar-scrolled.navbar-expand-lg {
    height: 40px;
}

.navbar-scroll.navbar-scroll-enabled.navbar-scrolled .navbar-company-header {
    /* 收缩后完全移除已隐藏头部，避免透明层覆盖菜单点击区域。 */
    display: none;
}

.navbar-scroll.navbar-scroll-enabled.navbar-scrolled .navbar-company-logo-link {
    opacity: 0;
    max-width: 0;
    margin: 0;
}

.navbar-scroll.navbar-scroll-enabled.navbar-scrolled .navbar-company-name {
    opacity: 0;
    transform: translateX(-50%) translateY(-8px);
}

.navbar-scroll.navbar-scroll-enabled.navbar-scrolled > .container-fluid1 {
    flex: 1 1 auto;
    height: 40px;
    z-index: 2147483647;
    pointer-events: auto;
}

.navbar-scroll.navbar-scroll-enabled.navbar-scrolled .desktop-layout {
    position: relative;
    z-index: 2147483647;
    height: 40px;
    pointer-events: auto;
}

.navbar-scroll.navbar-scroll-enabled.navbar-scrolled .navbar-col,
.navbar-scroll.navbar-scroll-enabled.navbar-scrolled .nav-item,
.navbar-scroll.navbar-scroll-enabled.navbar-scrolled .nav-link {
    position: relative;
    z-index: 2147483647;
    pointer-events: auto;
}

/* 详情页收缩后，下拉菜单紧贴导航底部，避免移入菜单时产生空隙。 */
.navbar-scroll.navbar-scroll-enabled.navbar-scrolled .custom-hover-menu {
    /* 该菜单相对 container-fluid1 定位；container 本身已经位于导航底部。 */
    top: 100%;
    --products-menu-top-offset: 8px;
}

/* 详情页滚动后打开 Products 时也保持不透明背景。 */
.navbar-scroll.navbar-scroll-enabled.navbar-scrolled.navbar-menu-active {
    background: #ffffff !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* 吸顶状态下，Products 激活即强制显示下拉分类。 */
.navbar-scroll.navbar-scroll-enabled.navbar-scrolled.navbar-menu-active .custom-hover-menu {
    display: block !important;
    top: 100%;
    pointer-events: auto;
}

.navbar-scroll.navbar-scroll-enabled.navbar-scrolled .custom-hover-menu::before {
    top: -8px;
    height: 8px;
}

/* detail 页收缩后，下拉分类与导航左侧起点对齐。 */
.navbar-scroll.navbar-scroll-enabled.navbar-scrolled .level1-menu,
.navbar-scroll.navbar-scroll-enabled.navbar-scrolled .level2-menu {
    padding-left: calc(1rem + 8px);
    padding-right: 1rem;
}

.navbar-scroll.navbar-scroll-enabled.navbar-scrolled .navbar-company-name-bar {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    /* 公司名称只展示，不能阻挡左右菜单的命中区域。 */
    pointer-events: none;
    font-size: 14px;
    line-height: 1;
}

.navbar-scroll.navbar-scroll-enabled.navbar-scrolled .nav-link {
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
    font-size: 14px;
    line-height: 1.2;
}

.navbar-scroll.navbar-scroll-enabled.navbar-scrolled.nav-custom-1 {
    height: 40px;
}

.navbar-scroll.navbar-menu-active {
    overflow: visible;
    background-color: #ffffff !important;
    box-shadow: none;
}

.navbar-scroll.navbar-search-active {
    overflow: visible;
    background-color: #ffffff !important;
}

.custom-hover-menu.navbar-scrolled {
    background-color: rgba(255, 255, 255) !important;
    box-shadow: none;
}

.navbar-fixed-top {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    /* 固定导航必须高于详情页所有内容，保证吸顶后仍可点击。 */
    z-index: 2147483647;
}

.nav-custom-1 {
    background-color: white;
    height: auto;
    transition: height 0.35s ease;
}

.nav-simple .com-info {
    display: flex;
    align-items: start;
    width: 100%;
    height: 80px;
}

.nav-simple .desktop-layout {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    height: 100%;
    column-gap: 1rem;
}

.navbar-col-left {
    justify-self: start;
    min-width: 0;
}

.navbar-col-center {
    justify-self: center;
    min-width: 0;
}

.navbar-col-right {
    justify-self: end;
    min-width: 0;
}

.nav-simple .nav-link {
    white-space: nowrap;
}

.nav-simple .left-menu-desktop {
    display: flex;
    gap: 2rem;
    margin-left: 4rem;
}

.nav-simple .right-menu-desktop {
    display: flex;
    gap: 2rem;
    margin-right: 4rem;
}

.navbar-scroll.navbar-scroll-enabled.navbar-scrolled .left-menu-desktop {
    margin-left: 2rem;
}

.navbar-scroll.navbar-scroll-enabled.navbar-scrolled .right-menu-desktop {
    margin-right: 2rem;
}

.nav-simple .logo-desktop {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.navbar {
    margin-bottom: 0 !important;
    border-radius: 0 !important;
}

.nav-custom-1 *:focus,
.nav-custom-1 *:focus-visible,
.nav-custom-1 .nav-link:focus,
.nav-custom-1 .nav-link:focus-visible,
.nav-custom-1 .dropdown-toggle:focus,
.nav-custom-1 .dropdown-toggle:focus-visible,
.nav-custom-1 .navbar-toggler:focus,
.nav-custom-1 .navbar-toggler:focus-visible,
.nav-custom-1 button:focus,
.nav-custom-1 button:focus-visible,
.nav-custom-1 input:focus,
.nav-custom-1 input:focus-visible,
.nav-custom-1 a:focus,
.nav-custom-1 a:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    border-color: transparent !important;
}

.top-nav .nav-link {
    white-space: nowrap;
}

.top-nav .nav-link:hover {
    color: #f5bb65;
}

.top-nav .nav-link.active {
    color: #f5bb65;
}

.search-menu-item {
    position: relative;
}

.search-panel {
    display: none;
    position: absolute;
    top: calc(100% + 35px);
    right: -10px;
    z-index: 1050;
    width: 600px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(245, 187, 101, 0.35);
    border-radius: 12px;
    gap: 14px;
}

.search-panel::before {
    content: "";
    position: absolute;
    top: -34px;
    right: 0;
    width: 100%;
    height: 34px;
}

.search-panel::after {
    content: "";
    position: absolute;
    top: -10px;
    right: 38px;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid rgba(245, 187, 101, 0.35);
    border-left: 1px solid rgba(245, 187, 101, 0.35);
    transform: rotate(45deg);
}

.search-menu-item.search-open .search-panel {
    display: flex;
}

.search-field-group {
    display: flex;
    flex: 1;
    min-width: 0;
}

.search-panel .form-control {
    min-width: 0;
    height: 42px;
    border: 1px solid #e6e1d8;
    border-right: 0;
    border-radius: 8px 0 0 8px;
    color: #333333;
    box-shadow: none;
}

.search-panel .form-control:focus {
    border-color: #f5bb65 !important;
}

.search-submit-btn {
    width: 46px;
    height: 42px;
    flex: 0 0 46px;
    color: #ffffff;
    background-color: #f5bb65;
    border: 1px solid #f5bb65;
    border-radius: 0 8px 8px 0;
    transition: all 0.2s ease;
}

.search-submit-btn:hover {
    color: #ffffff;
    background-color: #e6a94d;
    border-color: #e6a94d;
    transform: translateY(-1px);
}

.left-menu-desktop .dropdown,
.left-menu-desktop .nav-item.dropdown {
    position: static !important;
}

.custom-hover-menu {
    --products-menu-row-height: 24px;
    /* 普通导航：Products、一级、二级文字中心均相隔 45px。 */
    --products-menu-top-offset: 5px;
    --products-menu-row-gap: 21px;
    display: none;
    position: absolute;
    top: 85%;
    left: 0;
    width: 100%;
    background: white;
    /* 第一层菜单下方保留固定留白；展开子菜单时由下方规则覆盖为更大的留白。 */
    padding: var(--products-menu-top-offset) 15px 20px;
    color: black;
    z-index: 1050;
    pointer-events: auto;
    box-sizing: border-box;
    box-shadow: none;
}

.custom-hover-menu.has-level3 {
    /* 展开子菜单后，底部留白与每两级文字的 45px 中心距一致。 */
    padding-bottom: 33px;
}

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

.level1-menu {
    display: flex;
    align-items: center;
    min-height: var(--products-menu-row-height);
    justify-content: flex-start;
    list-style: none;
    padding: 0 3.5rem;
    margin: 0;
    gap: 50px;
}

.level1-item {
    display: flex;
    align-items: center;
    min-height: var(--products-menu-row-height);
    cursor: pointer;
    font-size: 16px;
    line-height: var(--products-menu-row-height);
    color: #333;
    transition: color 0.2s;
    white-space: nowrap;
    position: relative;
}

.custom-hover-menu > .level2-container {
    display: none;
    margin-top: var(--products-menu-row-gap);
    padding-top: 0;
}

.custom-hover-menu.has-level3 > .level2-container {
    display: block;
}

.level1-item:hover,
.level1-item.active {
    color: #f5bb65;
}

.level1-item > a,
.level1-item > a:visited,
.level2-item a,
.level2-item a:visited {
    color: inherit;
    text-decoration: none;
}

.level1-item:hover > a,
.level1-item.active > a,
.level2-item:hover a,
.level2-item.active a {
    color: #f5bb65;
    text-decoration: none;
}

.level2-menu {
    display: flex;
    align-items: center;
    min-height: var(--products-menu-row-height);
    justify-content: flex-start;
    list-style: none;
    padding: 0 3.5rem;
    margin: 0;
    gap: 40px;
}

.level2-item {
    display: flex;
    align-items: center;
    min-height: var(--products-menu-row-height);
    cursor: pointer;
    font-size: 14px;
    line-height: var(--products-menu-row-height);
    color: black;
    transition: color 0.2s;
    white-space: nowrap;
    position: relative;
}

.level2-item:hover,
.level2-item.active {
    color: #f5bb65;
}

.container-fluid1 {
    padding: 0 !important;
}

/* 固定导航高度占位：首页轮播等首屏内容可用 */
.carousel {
    margin-top: 136px !important;
}

@media (max-width: 1450px) {
    .nav-simple .left-menu-desktop {
        display: flex;
        gap: 0.5rem;
        margin-left: 1rem;
    }

    .nav-simple .right-menu-desktop {
        display: flex;
        gap: 0.5rem;
        margin-right: 1rem;
    }

    .navbar-company-name-bar {
        max-width: min(320px, 30vw);
        font-size: 16px;
    }

    .carousel {
        margin-top: 136px !important;
    }
}

@media (max-width: 992px) {
    #nav-logo {
        display: none;
    }

    .navbar-scroll.navbar-expand-lg {
        height: 100%;
        padding: 0;
    }

    .navbar-company-header {
        flex-basis: 52px;
        height: 52px;
    }

    .nav-simple > .container-fluid1 {
        flex-basis: auto;
        height: auto;
    }

    .navbar-brand-info {
        height: 52px;
        padding: 0 1rem;
    }

    .navbar-company-logo-link {
        width: 88px;
        height: 36px;
    }

    .navbar-company-logo-link img {
        max-width: 88px;
        max-height: 36px;
    }

    .navbar-company-name {
        max-width: calc(100% - 130px);
        font-size: 16px;
    }

    .navbar-fixed-top {
        position: relative;
        top: auto;
        z-index: 1030;
    }

    .nav-simple .desktop-layout {
        display: none;
    }

    .nav-simple .mobile-layout {
        display: flex !important;
        justify-content: space-between;
        align-items: flex-start;
        width: 100%;
        padding: 1rem 1rem;
    }

    .nav-simple .left-menu-mobile {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .nav-simple .logo-mobile {
        align-self: center;
        margin-left: auto;
    }

    .nav-simple .right-menu-desktop {
        display: none;
    }

    .navbar-scroll.navbar-scroll-enabled.navbar-scrolled .navbar-company-header,
    .navbar-scroll.navbar-scroll-enabled.navbar-scrolled .navbar-company-name-bar {
        display: none;
    }

    .navbar-scroll.navbar-scroll-enabled.navbar-scrolled.navbar-expand-lg {
        height: auto;
    }

    .nav-custom-1 {
        background-color: white;
        height: auto;
    }

    .carousel {
        margin-top: 0 !important;
    }
}

@media (min-width: 993px) {
    .nav-simple .mobile-layout {
        display: none !important;
    }

    /* detail 页吸顶后由根节点承载固定层，避免详情内容覆盖导航的点击区域。 */
    #navbar-root[data-navbar-page="detail"] {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        z-index: 2147483647;
        pointer-events: none;
    }

    #navbar-root[data-navbar-page="detail"] > .navbar.navbar-fixed-top {
        position: relative;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        width: 100%;
        z-index: 1;
        pointer-events: auto;
    }
}
