/* =====================================================================
   MaReebio 枫荻生物 · 移动端适配 mobile.css
   仅在小屏（手机/平板）生效，核心目标：无横向溢出、内容不被裁剪、
   导航可用、详情页 tab 可操作。
   断点：991px（平板/手机）、767px（手机）、480px（小屏手机）
   ===================================================================== */

/* ============ 1. 全局基础（≤991px） ============ */
@media (max-width: 991px) {
    html, body {
        max-width: 100%;
        overflow-x: hidden;
        -webkit-text-size-adjust: 100%;
    }
    /* 移除 Google Fonts 后，移动端用系统中英文字体栈（中文更美观） */
    body {
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                     "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    }
    /* 兜底：媒体/表格/代码块不撑破容器 */
    img, video, svg, canvas, iframe, table, pre {
        max-width: 100%;
    }
    img { height: auto; }
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
    /* 模板横向滚动条相关容器兜底 */
    .slick-track { max-width: none; }
}

/* ============ 2. 顶部橙色信息栏（≤767px） ============ */
@media (max-width: 767px) {
    .hisfull-header-top {
        display: block !important;
        padding: 10px 0;
    }
    .hisfull-header-top .top-address p {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        line-height: 1.5;
    }
    .hisfull-header-top .top-address p span,
    .hisfull-header-top .top-address p a {
        margin-right: 0;
        font-size: 13px;
        color: #fff;
    }
    .hisfull-header-top .top-address p span i,
    .hisfull-header-top .top-address p a i {
        font-size: 14px;
        margin-right: 6px;
    }
    /* 顶部右侧标语：手机上隐藏，避免与地址拥挤 */
    .hisfull-header-top .top-right-menu,
    .hisfull-header-top .top-slogan {
        display: none !important;
    }
}

/* ============ 3. 首页 Banner 轮播（≤767px） ============ */
@media (max-width: 767px) {
    /* 修复 .slide-img 高度被 flex 压缩为 0 的问题 */
    .witr_ds_content_area.slide-flex { height: auto !important; }
    .slide-flex-inner { flex-direction: column; }
    .slide-text {
        flex: none;
        padding: 28px 20px 20px;
    }
    .slide-brand { font-size: 16px; margin-bottom: 12px; }
    .slide-title {
        font-size: 21px !important;
        line-height: 1.45 !important;
        margin-bottom: 20px !important;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    .slide-img {
        flex: 0 0 220px !important;
        height: 220px !important;
        width: 100%;
        background-size: contain;
    }
    .witr_btn { padding: 11px 26px; font-size: 15px; }
}

/* ============ 4. 产品详情页（≤767px） ============ */
@media (max-width: 767px) {
    .hisfull_detail_area { padding: 40px 0 60px; }

    /* 头部 */
    .detail-head { margin-bottom: 24px; }
    .detail-head h2 { font-size: 20px; line-height: 1.4; }
    .detail-head .detail-catno { font-size: 13px; }

    /* 主图区 */
    .detail-imgbox { padding: 14px; margin-bottom: 22px; }
    .img-arrow { width: 34px; height: 34px; font-size: 16px; }
    .detail-img-nav { font-size: 13px; padding: 3px 12px; }

    /* 右侧信息卡：缩小内边距，腾出内容宽度 */
    .detail-info { padding: 18px 16px; }
    .detail-params { width: 100%; table-layout: auto; }
    .detail-params td {
        padding: 10px 4px;
        font-size: 13px;
        vertical-align: top;
        word-break: break-word;
    }
    .detail-params td.k {
        width: 78px;
        flex: none;
        white-space: nowrap;
    }
    .detail-params td.v { width: auto; }
    .detail-params td.v.price {
        font-size: 13px;
        line-height: 1.7;
        white-space: normal;
        word-break: break-word;
    }

    /* 底部按钮：等宽并排，不被裁剪 */
    .detail-btns {
        display: flex;
        gap: 10px;
        margin-top: 20px;
        width: 100%;
    }
    .detail-btns .btn-consult,
    .detail-btns .btn-app {
        flex: 1 1 0;
        min-width: 0;
        padding: 12px 6px;
        font-size: 14px;
        letter-spacing: 1px;
        text-align: center;
    }

    /* —— Tab 栏：4 个主 tab 等宽一行，说明书/CoA 第二行等宽并排 —— */
    .detail-tabs {
        display: flex;
        flex-wrap: wrap;
        align-items: stretch;
        overflow-x: visible;
        margin-top: 30px !important;
        padding-bottom: 0;
        border-bottom: none !important;
    }
    .detail-tabs > .tab-btn:not(.tab-doc-btn) {
        flex: 1 1 25%;
        width: auto;
        height: auto;
        padding: 12px 2px;
        font-size: 14px;
        letter-spacing: 0;
        text-align: center;
        white-space: nowrap;
        writing-mode: horizontal-tb;
        -webkit-writing-mode: horizontal-tb;
        border-bottom: 2px solid #123a6b;
    }
    .detail-tabs > .tab-btn:not(.tab-doc-btn).active::after {
        left: 0; right: 0; bottom: -2px; height: 2px;
        background: #123a6b;
    }
    .detail-tabs > .tab-doc-btn {
        flex: 1 1 calc(50% - 6px);
        align-self: auto;
        margin: 12px 0 0;
        padding: 10px 4px !important;
        font-size: 13px;
        text-align: center;
        white-space: nowrap;
    }
    .detail-tabs > .tab-doc-btn + .tab-doc-btn {
        margin-left: 12px;
    }

    /* Tab 面板 */
    .tab-panel { padding: 20px 2px 8px; }

    /* 字段列表 spec-list */
    .spec-list { border-radius: 8px; }
    .spec-row { padding: 14px 16px; }
    .spec-label { font-size: 14px; }
    .spec-value { font-size: 13px; line-height: 1.7; word-break: break-word; }

    /* 数据区：SDS + 活性图（已自动上下堆叠） */
    .data-two-col { grid-template-columns: 1fr; gap: 14px; }
    .data-two-col .data-fig-box {
        min-height: 0;
        padding: 12px;
    }
    .data-two-col .data-fig-box img {
        max-width: 100%;
        max-height: none;
        height: auto;
        width: auto;
    }
    .data-fig-title { font-size: 15px; }
    .data-fig-cap {
        font-size: 12px;
        line-height: 1.7;
        word-break: break-word;
        padding: 0 4px;
    }

    /* 相关产品：单列 */
    .related-list { grid-template-columns: 1fr; gap: 10px; }
}

/* ============ 5. 产品中心 service（≤767px） ============ */
@media (max-width: 767px) {
    /* 搜索框：input 可收缩，按钮不溢出 */
    .product-search-wrap { width: 100%; }
    .product-search-input {
        flex: 1 1 auto;
        min-width: 0;
        height: 48px;
        padding: 0 18px;
    }
    .product-search-btn {
        flex: 0 0 auto;
        width: auto;
        height: 48px;
        line-height: 48px;
        padding: 0 20px;
    }
    /* 搜索结果下拉：单列 */
    .product-search-dropdown {
        grid-template-columns: 1fr;
        right: 0;
        max-height: 360px;
    }
}

/* ============ 6. 产品应用 product-app 轮播卡片（≤767px） ============ */
@media (max-width: 767px) {
    .witr_cfeature9 .slick-slide {
        padding: 0 8px;
        box-sizing: border-box;
    }
    .witr_cfeature9 .sub-border-2 {
        width: 100%;
        padding: 0 16px;
        box-sizing: border-box;
    }
    .witr_cfeature9 .sub-item {
        width: 100%;
        padding: 18px 0;
        box-sizing: border-box;
    }
    .witr_cfeature9 .sub-item h3,
    .witr_cfeature9 .sub-item p,
    .witr_cfeature9 .sub-item .feature_btn {
        max-width: 100%;
        white-space: normal;
        word-break: break-word;
    }
    .witr_cfeature9 .sub-item p { font-size: 13px; line-height: 1.8; }
}

/* ============ 7. 联系页地图（≤767px）：缩小占位高度 ============ */
@media (max-width: 767px) {
    /* 抵消 .row 的负 margin，避免地图容器横向溢出 */
    .hisfull_map_area .container-fuled {
        padding-left: 15px;
        padding-right: 15px;
    }
    .hisfull_map_area .map_area { margin-bottom: 16px; }
    .hisfull_map_area .map_area iframe {
        height: 260px;
        background: #eef1f5;
    }
}

/* ============ 8. Footer 页脚（≤767px）：各列纵向堆叠 ============ */
@media (max-width: 767px) {
    .footer-middle .row {
        display: flex;
        flex-wrap: wrap;
        flex-direction: column;
    }
    .footer-middle .col-lg-4,
    .footer-middle .col-lg-3,
    .footer-middle .col-lg-2 {
        flex: 0 0 100%;
        max-width: 100%;
        padding-right: 15px;
        padding-left: 15px;
    }
    .footer-middle .widget_nav_menu .widget-title {
        margin-top: 34px !important;
        font-size: 18px !important;
    }
    /* 底部版权区居中 */
    .footer-bottom .copy-right-text p,
    .footer-bottom .footer-menu ul {
        text-align: center !important;
    }
    .footer-bottom .footer-menu { margin-top: 6px; }
}

/* ============ 8. 小屏手机微调（≤480px） ============ */
@media (max-width: 480px) {
    .slide-title { font-size: 19px !important; }
    .slide-img { flex-basis: 190px !important; height: 190px !important; }
    .detail-head h2 { font-size: 18px; }
    .detail-params td.k { width: 70px; }
    .detail-btns { flex-direction: row; }
    .detail-btns .btn-consult,
    .detail-btns .btn-app { font-size: 13px; padding: 11px 4px; }
}
