/* =========================================================
   HIWIN 站点导航（重设计版）
   依赖：head.php 中在 product.css 之后加载
   结构：template/nav.php
   ========================================================= */

/* ---------- 头部容器（继承 product.css 的 fixed 定位，覆盖其阴影） ---------- */
#c_static_001-hw85007269761.hw-header {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    z-index: 999;
    background: #fff;
    box-shadow: none;
    border-bottom: 1px solid #eef1ef;
    transition: box-shadow .3s ease, border-color .3s ease;
}
#c_static_001-hw85007269761.hw-header.hw-scrolled {
    box-shadow: 0 4px 18px rgba(0, 0, 0, .08);
    border-bottom-color: transparent;
}
#c_static_001-hw85007269761.hw-header .hw-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ---------- Logo ---------- */
#c_static_001-hw85007269761.hw-header .hw-logo {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}
#c_static_001-hw85007269761.hw-header .hw-logo img {
    height: 40px;
    width: auto;
    display: block;
}

/* ---------- 一级菜单 ---------- */
#c_static_001-hw85007269761.hw-header .hw-menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}
#c_static_001-hw85007269761.hw-header .hw-item {
    position: relative;
}
#c_static_001-hw85007269761.hw-header .hw-link {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 100px;
    padding: 0 20px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    position: relative;
    transition: color .25s ease;
    white-space: nowrap;
}
/* 绿色下划线动效 */
#c_static_001-hw85007269761.hw-header .hw-link::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 22px;
    width: 0;
    height: 3px;
    border-radius: 2px;
    background: #009844;
    transform: translateX(-50%);
    transition: width .28s ease;
}
#c_static_001-hw85007269761.hw-header .hw-link:hover,
#c_static_001-hw85007269761.hw-header .hw-item.hw-active > .hw-link {
    color: #009844;
}
#c_static_001-hw85007269761.hw-header .hw-link:hover::after,
#c_static_001-hw85007269761.hw-header .hw-item.hw-active > .hw-link::after {
    width: calc(100% - 40px);
}
/* 下拉箭头 */
#c_static_001-hw85007269761.hw-header .hw-caret {
    color: #b5b5b5;
    margin-top: 2px;
    transition: transform .28s ease, color .25s ease;
}
#c_static_001-hw85007269761.hw-header .hw-item:hover > .hw-link .hw-caret {
    transform: rotate(180deg);
    color: #009844;
}

/* ---------- 下拉面板 ---------- */
#c_static_001-hw85007269761.hw-header .hw-drop {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translate(-50%, 12px);
    min-width: 230px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 12px 36px rgba(20, 40, 30, .14);
    border: 1px solid #f0f3f1;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .28s ease, transform .28s ease, visibility .28s;
    z-index: 100;
}
/* 悬停桥：防止鼠标移向面板时出现空隙 */
#c_static_001-hw85007269761.hw-header .hw-has-sub::after {
    content: '';
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    height: 14px;
    display: none;
}
#c_static_001-hw85007269761.hw-header .hw-item:hover::after {
    display: block;
}
#c_static_001-hw85007269761.hw-header .hw-item:hover > .hw-drop {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}
#c_static_001-hw85007269761.hw-header .hw-drop ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ---------- 产品中心：双列大面板 ---------- */
#c_static_001-hw85007269761.hw-header .hw-drop-mega {
    min-width: 470px;
    padding: 14px 10px;
}
#c_static_001-hw85007269761.hw-header .hw-drop-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 4px;
}

/* ---------- 下拉子项 ---------- */
#c_static_001-hw85007269761.hw-header .hw-drop-item a {
    display: block;
    padding: 0 22px;
    line-height: 42px;
    font-size: 14px;
    color: #555;
    text-decoration: none;
    border-radius: 6px;
    position: relative;
    transition: color .2s ease, background-color .2s ease, padding-left .2s ease;
    white-space: nowrap;
}
#c_static_001-hw85007269761.hw-header .hw-drop-item a::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #009844;
    transform: translateY(-50%) scale(0);
    transition: transform .2s ease;
}
#c_static_001-hw85007269761.hw-header .hw-drop-item a:hover {
    color: #009844;
    background: #f3faf6;
    padding-left: 30px;
}
#c_static_001-hw85007269761.hw-header .hw-drop-item a:hover::before {
    transform: translateY(-50%) scale(1);
}
/* 外链标记 */
#c_static_001-hw85007269761.hw-header .hw-drop-item.hw-ext a::after {
    content: '↗';
    font-size: 12px;
    color: #b9c4be;
    margin-left: 6px;
}

/* ---------- 汉堡按钮（桌面隐藏） ---------- */
#c_static_001-hw85007269761.hw-header .hw-burger {
    display: none;
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    padding: 8px;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}
#c_static_001-hw85007269761.hw-header .hw-burger span {
    display: block;
    width: 24px;
    height: 2px;
    border-radius: 2px;
    background: #333;
    transition: transform .3s ease, opacity .3s ease;
}
#c_static_001-hw85007269761.hw-header .hw-mask {
    display: none;
}

/* =========================================================
   移动端 ≤768px
   ========================================================= */
@media screen and (max-width: 768px) {
    #c_static_001-hw85007269761.hw-header .hw-wrap {
        height: 60px;
        padding: 0 16px;
    }
    #c_static_001-hw85007269761.hw-header .hw-logo img {
        height: 30px;
    }
    #c_static_001-hw85007269761.hw-header .hw-burger {
        display: flex;
    }
    /* 汉堡变叉 */
    #c_static_001-hw85007269761.hw-header.hw-open .hw-burger span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    #c_static_001-hw85007269761.hw-header.hw-open .hw-burger span:nth-child(2) {
        opacity: 0;
    }
    #c_static_001-hw85007269761.hw-header.hw-open .hw-burger span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* 菜单变为抽屉 */
    #c_static_001-hw85007269761.hw-header .hw-nav {
        position: fixed;
        left: 0;
        top: 60px;
        width: 100%;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
        background: #fff;
        transform: translateX(100%);
        transition: transform .3s ease;
        box-shadow: 0 12px 24px rgba(0, 0, 0, .1);
    }
    #c_static_001-hw85007269761.hw-header.hw-open .hw-nav {
        transform: translateX(0);
    }
    #c_static_001-hw85007269761.hw-header .hw-menu {
        display: block;
        padding: 6px 0 20px;
    }
    #c_static_001-hw85007269761.hw-header .hw-item {
        border-bottom: 1px solid #f2f4f3;
    }
    #c_static_001-hw85007269761.hw-header .hw-link {
        height: 52px;
        padding: 0 20px;
        font-size: 15px;
        justify-content: space-between;
    }
    #c_static_001-hw85007269761.hw-header .hw-link::after {
        display: none;
    }
    #c_static_001-hw85007269761.hw-header .hw-item.hw-active > .hw-link {
        color: #009844;
        font-weight: 600;
    }
    #c_static_001-hw85007269761.hw-header .hw-has-sub::after {
        display: none;
    }
    /* 子菜单手风琴 */
    #c_static_001-hw85007269761.hw-header .hw-drop {
        position: static;
        transform: none;
        min-width: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
        opacity: 1;
        visibility: visible;
        display: none;
        background: #f8fbf9;
        transition: none;
    }
    #c_static_001-hw85007269761.hw-header .hw-item:hover > .hw-drop {
        display: none; /* 移动端禁用悬停展开，由 JS 手风琴控制 */
    }
    #c_static_001-hw85007269761.hw-header .hw-expanded > .hw-drop {
        display: block;
    }
    #c_static_001-hw85007269761.hw-header .hw-drop-mega {
        min-width: 0;
        padding: 0;
    }
    #c_static_001-hw85007269761.hw-header .hw-drop-grid {
        display: block;
    }
    #c_static_001-hw85007269761.hw-header .hw-drop-item a {
        line-height: 46px;
        padding: 0 32px;
        border-radius: 0;
    }
    #c_static_001-hw85007269761.hw-header .hw-drop-item a::before {
        left: 20px;
    }
    #c_static_001-hw85007269761.hw-header .hw-drop-item a:hover {
        padding-left: 38px;
    }
    /* 展开时箭头旋转 */
    #c_static_001-hw85007269761.hw-header .hw-expanded > .hw-link .hw-caret {
        transform: rotate(180deg);
    }

    /* 遮罩 */
    #c_static_001-hw85007269761.hw-header .hw-mask {
        display: block;
        position: fixed;
        left: 0;
        top: 60px;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, .4);
        opacity: 0;
        visibility: hidden;
        transition: opacity .3s ease, visibility .3s;
        z-index: -1;
    }
    #c_static_001-hw85007269761.hw-header.hw-open .hw-mask {
        opacity: 1;
        visibility: visible;
    }
}

/* 菜单打开时锁定页面滚动 */
html.hw-lock {
    overflow: hidden;
}

/* 分类横滑导航（.fsh_box_nav1）：原生横向滚动，隐藏滚动条（替代 Swiper） */
.fsh_box_nav1 {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.fsh_box_nav1::-webkit-scrollbar {
    display: none;
}

/* 首页轮播左右箭头（原生实现，替代 swiper-icons 字体） */
.e_bannerA-1 .hw-banner-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1002;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.28);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: background 0.3s, opacity 0.3s;
}

.e_bannerA-1:hover .hw-banner-nav,
.e_bannerA-1 .hw-banner-nav:focus-visible {
    opacity: 1;
    pointer-events: auto;
}

.e_bannerA-1 .hw-banner-nav:hover {
    background: rgba(0, 152, 68, 0.9);
}

.e_bannerA-1 .hw-banner-prev { left: 26px; }
.e_bannerA-1 .hw-banner-next { right: 26px; }

.e_bannerA-1 .hw-banner-nav::before {
    content: '';
    width: 14px;
    height: 14px;
    border-left: 3px solid #ffffff;
    border-bottom: 3px solid #ffffff;
}

.e_bannerA-1 .hw-banner-prev::before { transform: rotate(45deg) translate(2px, -2px); }
.e_bannerA-1 .hw-banner-next::before { transform: rotate(-135deg) translate(2px, -2px); }

@media screen and (max-width: 768px) {
    .e_bannerA-1 .hw-banner-nav {
        width: 34px;
        height: 34px;
        opacity: 1;
        pointer-events: auto;
    }

    .e_bannerA-1 .hw-banner-prev { left: 10px; }
    .e_bannerA-1 .hw-banner-next { right: 10px; }

    .e_bannerA-1 .hw-banner-nav::before {
        width: 10px;
        height: 10px;
        border-left-width: 2.5px;
        border-bottom-width: 2.5px;
    }
}

/* ============================================================
   产品分类横滑导航（.fsh_box_nav1）美化重写
   原 Swiper spaceBetween 间距 + 首尾禁用态全部原生还原并优化
   ============================================================ */

/* 项目间距：桌面 40px / 移动 20px（对齐原 Swiper 配置） */
#c_static_001_P_74266-hw96997168334 .fsh_box_nav1 .p_loopitem {
    margin-right: 40px;
}

#c_static_001_P_74266-hw96997168334 .fsh_box_nav1 .p_loopitem:last-child {
    margin-right: 0;
}

/* 长名称不换行（Torque Motor 回转工作台 等） */
#c_static_001_P_74266-hw96997168334 .fsh_box_nav1 .e_text-3 a {
    white-space: nowrap;
}

/* 链接 hover 轻微上浮 + 绿色过渡更柔和 */
#c_static_001_P_74266-hw96997168334 .fsh_box_nav1 .e_text-3 a {
    transition: color 0.3s;
}

/* 首尾禁用态按钮：不可点、灰色（配合 product.css 已有的 #c6c6c6 变色） */
#c_static_001_P_74266-hw96997168334 .btn_cc .swiper-button-disabled {
    pointer-events: none;
    cursor: default;
}

/* 两端滚动渐隐遮罩，提示还有更多分类 */
#c_static_001_P_74266-hw96997168334 .e_loop-2 > div {
    position: relative;
}

#c_static_001_P_74266-hw96997168334 .e_loop-2 > div::before,
#c_static_001_P_74266-hw96997168334 .e_loop-2 > div::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 1px;
    width: 36px;
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

#c_static_001_P_74266-hw96997168334 .e_loop-2 > div::before {
    left: 0;
    background: linear-gradient(to right, rgba(247, 249, 248, 0.95), rgba(247, 249, 248, 0));
}

#c_static_001_P_74266-hw96997168334 .e_loop-2 > div::after {
    right: 56px;
    background: linear-gradient(to left, rgba(247, 249, 248, 0.95), rgba(247, 249, 248, 0));
}

@media screen and (max-width: 768px) {
    #c_static_001_P_74266-hw96997168334 .fsh_box_nav1 .p_loopitem {
        margin-right: 20px;
    }
}

/* 渐隐遮罩显隐（由 JS 根据滚动位置切换 hw-fade-left / hw-fade-right） */
#c_static_001_P_74266-hw96997168334 .e_loop-2 > div.hw-fade-left::before {
    opacity: 1;
}

#c_static_001_P_74266-hw96997168334 .e_loop-2 > div.hw-fade-right::after {
    opacity: 1;
}

/* ============================================================
   桌面端分类导航全部显示：换行紧凑两行布局，隐藏翻页按钮
   （移动端 <769px 仍保留横向滑动 + 按钮）
   ============================================================ */
@media screen and (min-width: 769px) {
    #c_static_001_P_74266-hw96997168334 .fsh_box_nav1 .p_list {
        flex-wrap: wrap;
    }

    #c_static_001_P_74266-hw96997168334 .fsh_box_nav1 .p_loopitem {
        margin-right: 36px;
    }

    #c_static_001_P_74266-hw96997168334 .fsh_box_nav1 .e_text-3 a {
        line-height: 52px;
        font-size: 16px;
    }

    #c_static_001_P_74266-hw96997168334 .NavList_a1 {
        padding: 8px 0;
    }
}

/* 全部可见时：隐藏翻页按钮，导航占满整行（class 由 JS 依据是否可滚动切换） */
#c_static_001_P_74266-hw96997168334 .e_loop-2 > div.hw-all-visible .btn_cc {
    display: none;
}

#c_static_001_P_74266-hw96997168334 .e_loop-2 > div.hw-all-visible .NavList_a1 {
    width: 100%;
}
