/* ============================================================
   JSEMI - responsive.css
   断点：≤1280 / ≤1024 / ≤768 / ≤480
   ============================================================ */

/* 移动端抽屉菜单（默认隐藏） */
.js-mobile-mask {
    position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5);
    z-index: 1100; opacity: 0; visibility: hidden; transition: var(--js-transition);
}
.js-mobile-mask.show { opacity: 1; visibility: visible; }
.js-mobile-menu {
    position: fixed; top: 0; right: 0; width: 80%; max-width: 360px;
    height: 100%; background: #fff; z-index: 1101;
    overflow-y: auto; transform: translateX(105%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
    display: flex; flex-direction: column;
}
.js-mobile-menu.show { transform: translateX(0); }
.js-mobile-search { margin-bottom: 20px; }
.js-mobile-search form { display: flex; }
.js-mobile-search input {
    flex: 1; padding: 10px 14px; border: 1px solid var(--js-border);
    border-radius: 4px 0 0 4px; outline: none; font-size: 14px;
}
.js-mobile-search button {
    padding: 0 16px; background: var(--js-steel); color: #fff;
    border-radius: 0 4px 4px 0;
}
.js-mobile-nav { display: flex; flex-direction: column; }
.js-mobile-nav > a {
    padding: 14px 0; font-size: 16px; color: var(--js-text-2); font-weight: 500;
    border-bottom: 1px solid var(--js-gray-bg);
}
.js-mobile-nav > a:hover, .js-mobile-nav > a.active { color: var(--js-steel); }
.js-mobile-haschild { position: relative; }
.js-mobile-haschild > a:first-child { display: flex; justify-content: space-between; align-items: center; padding-right: 52px; }
.js-mobile-sub-toggle {
    position: absolute; top: 0; right: 0;
    width: 48px; height: 48px;
    color: var(--js-navy);
}
.js-mobile-arrow { transition: var(--js-transition); }
.js-mobile-haschild.open .js-mobile-arrow { transform: rotate(45deg); }
.js-mobile-sub {
    max-height: 0; overflow: hidden; transition: max-height 0.3s;
    background: var(--js-gray-bg); border-radius: 4px; margin: 0 -8px;
}
.js-mobile-haschild.open .js-mobile-sub { max-height: 600px; padding: 8px; }
.js-mobile-sub a { display: block; padding: 8px 12px; font-size: 14px; color: var(--js-text-muted); }
.js-mobile-sub-title { font-weight: 600; color: var(--js-navy) !important; }
.js-mobile-cta {
    background: var(--js-steel); color: #fff !important;
    text-align: center; border-radius: 40px; margin-top: 18px;
    padding: 14px 20px;
    font-size: 16px; font-weight: 600;
    border-bottom: none !important;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    box-shadow: 0 4px 12px rgba(67, 124, 163, 0.32);
    transition: var(--js-transition);
}
.js-mobile-cta i { font-size: 15px; }
.js-mobile-cta:hover, .js-mobile-cta.active {
    background: var(--js-navy); box-shadow: 0 6px 18px rgba(29, 53, 70, 0.4);
    transform: translateY(-1px);
}
.js-mobile-lang { display: flex; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--js-gray-bg); }
.js-mobile-lang a { padding: 6px 14px; border: 1px solid var(--js-border); border-radius: 20px; font-size: 13px; }
.js-mobile-lang a.active { background: var(--js-steel); color: #fff; border-color: var(--js-steel); }

/* ---------- ≤1280 ---------- */
@media (max-width: 1280px) {
    .w1480 { width: 92%; }
    .js-home-new-grid { grid-template-columns: repeat(3, 1fr); }
    .js-home-news-grid { grid-template-columns: repeat(3, 1fr); }
    .js-megamenu-col { padding-left: 24px; padding-right: 24px; }
    .js-megamenu-stage { padding-top: 28px; }
}

/* ---------- ≤1024 ---------- */
@media (max-width: 1024px) {
    :root { --js-header-h: 64px; }
    .js-topbar { display: none; }
    .js-nav { display: none; }
    .js-search { display: none; }
    .js-menu-toggle { display: flex; }

    .js-section { padding: 50px 0; }
    .js-section-title { font-size: 26px; }
    .js-home-cats-grid,
    .js-home-apps-grid,
    .js-home-new-grid,
    .js-home-news-grid,
    .js-app-grid { grid-template-columns: repeat(2, 1fr); }
    .js-home-about-flex { flex-direction: column; }

    .js-footer-main { grid-template-columns: repeat(2, 1fr); gap: 30px; }
    .js-footer-company { grid-column: span 2; }

    /* 内页两栏 → 单栏 */
    .js-filter-wrap { flex-direction: column; }
    .js-filter-side { width: 100% !important; position: static !important; }

    .js-pcat-title { font-size: 28px; }
    .js-pcat-head { margin-bottom: 28px; }
    .js-pcat-search { min-width: 0; max-width: none; width: 100%; }
    .js-pcat-l1 { gap: 0; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
    .js-pcat-l1-item { flex: 0 0 auto; padding: 12px 16px 14px; font-size: 15px; }
    .js-pcat-l2 { gap: 8px; }
    .js-pcat-l2-item { padding: 8px 14px; font-size: 13px; }
    .js-pcat-l3 { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 20px 14px; }

    .js-plist-title { font-size: 24px; margin-bottom: 20px; }
    .js-quick-search { padding: 16px; }
    .js-quick-search-body { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; max-height: 520px; }
    .js-range-num { width: 58px; flex-basis: 58px; height: 32px; font-size: 12px; }
    .js-range-row { gap: 8px; }

    .js-pdetail-hero { padding: 28px 0 36px; }
    .js-pdetail-hero-inner { flex-direction: column; gap: 28px; }
    .js-pdetail-gallery { flex: none; width: min(100%, 480px); margin: 0 auto; }
    .js-pdetail-model { font-size: 26px; }
    .js-pdetail-body { padding: 28px 0 48px; }
    .js-pdetail-section { margin-bottom: 32px; }
    .js-pdetail-section > h3 { font-size: 18px; }
    .js-about-wrap { flex-direction: column; }
    .js-about-side { width: 100% !important; display: flex; overflow-x: auto; position: static !important; margin-bottom: 20px; }
    .js-about-side .side-title { flex: 0 0 auto; }
    .js-about-side a { flex: 0 0 auto; white-space: nowrap; }
    .js-about-main { width: 100%; }

    /* 产品详情：图集与信息自然堆叠，相关产品两列 */
    .js-prod-top { flex-direction: column; gap: 30px; }
    .js-prod-gallery { flex: none; width: min(100%, 560px); margin: 0 auto; }
    .js-related-grid { grid-template-columns: repeat(2, 1fr); }

    /* 关于子页内容网格 */
    .js-honor-wall { grid-template-columns: repeat(2, 1fr); }

    /* 搜索结果兼容旧网格 */
    .js-search-products-grid { grid-template-columns: repeat(2, 1fr); }

    /* 联系页双栏 → 单栏，取消表单吸顶 */
    .js-contact-row { grid-template-columns: 1fr; gap: 32px; }
    .js-contact-form-wrap { position: static; }

    /* 公司简介页：Hero 转单列，stats 转两列，办事处转两列 */
    .js-company-hero { padding: 50px 0; }
    .js-company-hero-flex { flex-direction: column; gap: 30px; }
    .js-company-hero-img { flex: none; width: 100%; }
    .js-company-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
    .js-company-offices-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- ≤768 ---------- */
@media (max-width: 768px) {
    body { font-size: 14px; }
    .w1480 { width: 94%; }
    .js-section { padding: 40px 0; }
    .js-section-head { margin-bottom: 30px; }
    .js-section-title { font-size: 22px; }
    .js-logo-text { font-size: 20px; }
    .js-logo-sub { font-size: 10px; }

    .js-home-banner { margin-top: calc(-1 * var(--js-header-h)); }
    .js-banner-title { font-size: 26px !important; }
    .js-banner-sub { font-size: 15px !important; }

    .js-home-cats-grid,
    .js-home-apps-grid,
    .js-home-new-grid,
    .js-home-news-grid,
    .js-app-grid { grid-template-columns: 1fr; gap: 16px; }

    /* 公司简介页：stats 与办事处转单列，收紧间距 */
    .js-company-stats { padding: 36px 0; }
    .js-company-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .js-company-stat-num { font-size: 34px; }
    .js-company-stat-num .plus { font-size: 22px; }
    .js-company-offices-grid { grid-template-columns: 1fr; }
    .js-company-title { font-size: 26px; }
    .js-company-hero { padding: 36px 0; }
    .js-company-cta { padding: 40px 0; }
    .js-company-cta-text h2 { font-size: 22px; }
    .js-company-cta-flex { flex-direction: column; align-items: flex-start; }

    /* 内页 Banner */
    .js-inner-banner { height: 200px; }
    .js-inner-banner-inner h1,
    .js-inner-banner-content h2 { font-size: 26px; }

    /* 应用卡片：触屏无 hover，遮罩始终显示关键信息 */
    .js-app-grid { gap: 20px; }
    .js-app-card-mask { opacity: 1; }
    .js-app-card-mask > i,
    .js-app-card-mask h3,
    .js-app-card-mask p,
    .js-app-card-more { transform: translateY(0); }
    .js-app-card-mask { background: linear-gradient(to top, rgba(29,53,70,0.92) 0%, rgba(29,53,70,0.45) 60%, rgba(29,53,70,0) 100%); justify-content: flex-end; padding-bottom: 24px; }
    .js-app-card-img::after { display: none; }

    .js-footer-main { grid-template-columns: 1fr; gap: 24px; padding: 40px 0 24px; }
    .js-footer-company { grid-column: span 1; }
    .js-footer-bottom p { font-size: 11px; line-height: 1.8; }

    /* 规格表横向滚动：滚动只发生在表格容器内，不撑宽页面 */
    .js-filter-main { width: 100%; max-width: 100%; }
    .js-spec-table-wrap { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .js-spec-table { min-width: 720px; }

    .js-quick-search-body { grid-template-columns: 1fr; gap: 16px; }
    .js-range-num { width: 64px; flex-basis: 64px; }

    /* 产品详情：收紧间距，参数与规格表保持可读 */
    .js-prod-wrap { padding: 30px 0 40px; }
    .js-prod-top { gap: 24px; margin-bottom: 30px; }
    .js-prod-info h1 { font-size: 23px; }
    .js-prod-params .row { gap: 14px; }
    .js-prod-params .row .lbl { width: 100px; flex: 0 0 100px; }
    .js-prod-params .row .val { min-width: 0; overflow-wrap: anywhere; }
    .js-prod-section { margin-top: 32px; }
    .js-prod-specs { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .js-prod-specs tbody { display: table; width: 100%; min-width: 520px; }
    .js-related-grid { gap: 16px; }

    /* 新闻列表 / 详情 */
    .js-news-tabs { flex-wrap: nowrap; overflow-x: auto; margin-bottom: 24px; -webkit-overflow-scrolling: touch; }
    .js-news-tabs a { flex: 0 0 auto; padding: 11px 18px; white-space: nowrap; }
    .js-news-item,
    .js-news-list-item { flex-direction: column; gap: 16px; padding: 18px; transform: none !important; }
    .js-news-item-img,
    .js-news-list-img { flex: none; width: 100%; }
    .js-news-item-body h3,
    .js-news-list-body h3 { font-size: 17px; }
    .js-article { width: 94%; padding: 32px 0; }
    .js-article-head h1 { font-size: 24px; }
    .js-article-cover { max-height: 420px; margin-bottom: 24px; }
    .js-article-nav { flex-direction: column; gap: 12px; }
    .js-article-nav a:last-child { text-align: right; }

    /* 关于子页 */
    .js-about-wrap { padding: 30px 0; }
    .js-about-side { margin-bottom: 0; }
    .js-about-main { padding: 28px 24px; }
    .js-about-main h2 { font-size: 22px; }
    .js-timeline::before { left: 58px; }
    .js-timeline-item { padding-left: 88px; padding-bottom: 28px; }
    .js-timeline-year { width: 58px; font-size: 16px; padding-right: 12px; }
    .js-timeline-item::after { left: 52px; width: 12px; height: 12px; }
    .js-honor-wall,
    .js-culture-list { grid-template-columns: 1fr; gap: 16px; }
    .js-culture-item { padding: 24px; }

    /* 搜索页 */
    .js-search-wrap { padding: 32px 0; }
    .js-search-box,
    .js-search-keyword { max-width: 100%; }
    .js-search-keyword { margin-bottom: 32px; }
    .js-search-block { margin-bottom: 42px; }
    .js-search-products-grid { grid-template-columns: 1fr; }

    /* 样品/表单双列堆叠 */
    .js-form-row { grid-template-columns: 1fr; gap: 0; }
    .js-form-row .form-group { margin-bottom: 18px; }
    .js-sample-form { padding: 24px; }
    /* 联系页：信息卡单列、表单字段堆叠、表单卡片收紧内边距 */
    .js-contact-cards { grid-template-columns: 1fr; }
    .js-contact-card:hover { transform: none; }
    .js-contact-form .js-form-row { grid-template-columns: 1fr; }
    .js-contact-form-wrap { padding: 24px; }
    .js-contact-offices { padding: 22px 20px 6px; }
    .js-office-item { gap: 12px; }
    .js-map { height: 220px; }

    /* 弹窗与 toast 不超出窄屏 */
    .js-wechat-modal { padding: 16px; align-items: flex-start; overflow-y: auto; }
    .js-wechat-modal-box { margin: auto 0; padding: 32px 24px 26px; max-height: calc(100dvh - 32px); }
    .js-wechat-qr,
    .js-wechat-qr img { width: min(200px, 100%); height: auto; }
    .js-toast { top: 18px; max-width: calc(100% - 32px); padding: 12px 18px; }

    .js-backtop { right: 16px; bottom: 24px; width: 40px; height: 40px; }

    /* 触控目标放大 */
    .js-nav-item a, .js-btn, button, input[type=submit] { min-height: 40px; }
    .js-product-card-body { padding: 14px; }
}

/* ---------- ≤480 ---------- */
@media (max-width: 480px) {
    .js-banner-content { padding: 0 16px; }
    .js-banner-title { font-size: 22px !important; }
    .js-footer-qr img { width: 76px; height: 76px; }

    .js-prod-actions { flex-direction: column; }
    .js-prod-actions .js-btn { width: 100%; justify-content: center; }
    .js-related-grid { grid-template-columns: 1fr; }
    .js-prod-thumbs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
    .js-prod-thumb { flex: 0 0 64px; width: 64px; height: 64px; }

    .js-about-main { padding: 24px 18px; }
    .js-company-stats-grid { grid-template-columns: 1fr; gap: 18px; }
    .js-company-nav a { padding: 14px 16px; }
    .js-company-nav a.active::after { left: 16px; right: 16px; }
    .js-company-cta-btns,
    .js-company-cta-btns .js-btn { width: 100%; }
    .js-company-cta-btns .js-btn { justify-content: center; }

    .js-search-box form { flex-direction: column; gap: 10px; }
    .js-search-box input,
    .js-search-box button { width: 100%; min-height: 44px; border: 1px solid var(--js-border); border-radius: var(--js-radius); }
    .js-search-box button { border-color: var(--js-steel); }
    .js-search-block-head .js-section-title { font-size: 22px; }

    .js-sample-form,
    .js-contact-form-wrap { padding: 22px 18px; }
    .js-contact-form .js-form-captcha { grid-template-columns: 1fr; }
    .js-contact-form .js-form-captcha img { width: auto; max-width: 100%; }
    .js-captcha-row .js-captcha-field { flex-direction: column; align-items: stretch; }
    .js-captcha-row .js-captcha-field img { align-self: flex-start; max-width: 100%; }
    .js-office-item { flex-direction: column; }
}

/* ---------- 产品选型工作台 ---------- */
@media (max-width: 1024px) {
    .js-page-product-list .js-inner-banner-content h1 { font-size: 34px; }
    .js-plist-categories { align-items: flex-start; }
    .js-plist-categories-label { padding-top: 9px; }
    .js-selector-workbench { padding: 20px 20px 0; }
    .js-selector-workbench .js-quick-search { margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px; }
    .js-spec-table--params .col-product { min-width: 286px; width: 286px; }
}

@media (max-width: 768px) {
    .js-page-product-list .js-inner-banner-content h1 { font-size: 28px; }
    .js-plist-wrap { padding-top: 20px; }
    .js-plist-categories { display: block; padding: 12px 14px; overflow: hidden; }
    .js-plist-categories-label { display: block; margin-bottom: 10px; padding: 0; }
    .js-plist-category-links { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
    .js-plist-category-links a { flex: 0 0 auto; min-height: 40px; }

    .js-selector-workbench { padding: 18px 16px 0; }
    .js-selector-head { align-items: center; margin-bottom: 15px; }
    .js-selector-heading h2 { font-size: 19px; }
    .js-selector-head .js-filter-count strong { font-size: 22px; }
    .js-selector-workbench .js-plist-toolbar { display: grid; grid-template-columns: 1fr; gap: 10px; padding-bottom: 16px; }
    .js-selector-workbench .js-filter-search { width: 100%; max-width: none; }
    .js-selector-workbench .js-filter-search input { min-width: 0; }
    .js-selector-workbench .js-filter-search button { min-width: 92px; padding: 0 14px; }
    .js-filter-toggle { width: 100%; min-height: 44px; }
    .js-selector-workbench .js-quick-search { margin-left: -16px; margin-right: -16px; padding: 17px 16px 18px; }
    .js-quick-search-head { align-items: flex-start; }
    .js-quick-search-body { max-height: none; }
    .js-quick-check { min-height: 44px; align-items: center; padding: 10px 8px; }
    .js-quick-check input { width: 18px; height: 18px; margin-top: 0; }
    .js-range-row { gap: 8px; }
    .js-range-value { flex-basis: 70px; }
    .js-range-value .js-range-num { height: 44px; }
    .js-range-track { height: 44px; }
    .js-range-input { height: 4px; }
    .js-range-input::-webkit-slider-thumb { width: 22px; height: 22px; }
    .js-range-input::-moz-range-thumb { width: 22px; height: 22px; }

    .js-table-scroll-hint { display: flex; }
    .js-spec-table-wrap::after {
        content: ''; position: sticky; display: block; float: right; right: 0; bottom: 0;
        width: 28px; height: 1px; pointer-events: none;
    }
    .js-spec-table { min-width: 980px; }
    .js-spec-table--params .col-product { min-width: 260px; width: 260px; }
    .js-spec-table--params thead .col-product,
    .js-spec-table--params tbody th.col-product {
        position: sticky; left: 0; z-index: 4; box-shadow: 8px 0 14px rgba(29,53,70,0.08);
    }
    .js-spec-table--params thead .col-product { z-index: 6; background: var(--js-navy); }
    .js-spec-table--params tbody th.col-product { background: #f6f9fb; }
    .js-product-identity .js-prod-thumb,
    .js-product-identity .js-prod-thumb-ph { flex-basis: 48px; width: 48px; height: 48px; }
    .js-product-name,
    .js-product-brief { max-width: 170px; }
    .js-spec-table .js-pdf-link { width: 44px; height: 44px; }
    .js-spec-table .js-row-sample { min-height: 44px; padding: 9px 15px; }
}

@media (max-width: 480px) {
    .js-selector-head { align-items: flex-start; }
    .js-selector-head .js-filter-count { padding-top: 2px; white-space: nowrap; }
    .js-selector-workbench .js-filter-search { display: grid; grid-template-columns: 1fr auto; }
    .js-selector-workbench .js-filter-search-ico { display: none; }
    .js-selector-workbench .js-filter-search input { padding-left: 13px; border-radius: var(--js-radius) 0 0 var(--js-radius); }
    .js-selector-workbench .js-filter-search button { min-width: 78px; padding: 0 10px; }
    .js-range-row { display: grid; grid-template-columns: 70px minmax(88px, 1fr) 70px; }
    .js-spec-table--params .col-product { min-width: 238px; width: 238px; }
    .js-product-brief { display: none; }
}

/* ---------- 无障碍：减弱动效 ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto !important; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0s !important;
        scroll-behavior: auto !important;
    }
    .js-banner-swiper .swiper-wrapper,
    .js-mobile-mask,
    .js-mobile-sub,
    .js-megamenu,
    .js-toast,
    .js-backtop,
    .js-news-item,
    .js-news-list-item,
    .js-contact-card,
    .js-nav-cta,
    .js-megamenu-chip,
    .js-megamenu-cta,
    .js-product-card-img::after,
    .js-home-cat::before,
    .js-app-card,
    .js-app-card-img > img,
    .js-app-card-mask,
    .js-app-card-mask > i,
    .js-app-card-mask h3,
    .js-app-card-mask p,
    .js-app-card-more,
    .js-app-card-more i {
        transform: none !important;
    }
    .js-mobile-menu { transform: translateX(105%) !important; }
    .js-mobile-menu.show { transform: translateX(0) !important; }
    .wow,
    .animated { animation: none !important; visibility: visible !important; }
}
