/**
 * 增强版手机适配修复 CSS
 * 修复 wanyang2008.com 在手机端的显示问题
 * 创建时间: 2026-05-09
 * 版本: 2.0 - 增强覆盖内联样式
 */

/* ===== 最高优先级：移除所有最小宽度限制 ===== */
html {
    min-width: auto !important;
    overflow-x: hidden !important;
}

body {
    min-width: auto !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

/* ===== 强制覆盖内联样式的所有容器 ===== */
[style*="min-width"] {
    min-width: auto !important;
}

[style*="min-width: 1200px"] {
    min-width: auto !important;
}

[style*="min-width:1230px"] {
    min-width: auto !important;
}

[style*="width: 89.58333%"] {
    width: 100% !important;
}

/* ===== 头部导航修复 - 最高优先级 ===== */
header .FixNav,
.FixNav,
.FixNav[style*="position: fixed"] {
    position: relative !important;
    min-width: auto !important;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    overflow: hidden !important;
}

header .FixedNAV,
.FixedNAV,
.FixedNAV[style*="min-width"] {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    min-width: auto !important;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    padding: 10px 15px !important;
    padding-right: 15px !important;
    box-sizing: border-box !important;
    position: relative !important;
}

.FixedNAV > img {
    height: 60px !important;
    width: auto !important;
    flex-shrink: 0;
}

.FixedNAV > nav {
    flex: 1;
    min-width: 200px;
    max-width: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.FixedNAV > nav::-webkit-scrollbar {
    display: none;
}

.FixedNAV .fixTab,
.fixTab {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 5px !important;
    white-space: nowrap !important;
    min-width: max-content !important;
}

.fixTab li {
    flex-shrink: 0 !important;
    font-size: 14px !important;
    margin: 0 5px !important;
    display: inline-block !important;
    width: auto !important;
    float: none !important;
}

.fixTab li a {
    padding: 6px 10px !important;
    white-space: nowrap !important;
    font-size: 13px !important;
    display: inline-block !important;
}

/* 右侧热线区域 */
.FixedNAV > div[style*="position: absolute"],
.FixedNAV > div[style*="right:"] {
    position: relative !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    min-width: auto !important;
    padding: 5px 10px !important;
    margin-top: 5px !important;
}

.FixedNAV > div[style*="position: absolute"] a,
.FixedNAV > div[style*="right:"] a {
    font-size: 12px !important;
    padding: 4px 8px !important;
}

/* ===== HERO Banner 修复 ===== */
.hero-banner,
[class*="hero"],
[class*="banner"] {
    width: 100% !important;
    max-width: 100vw !important;
    overflow: hidden !important;
}

.hero-banner .swiper-wrapper,
[class*="swiper-wrapper"] {
    display: flex !important;
}

.hero-banner .swiper-slide,
[class*="swiper-slide"] {
    width: 100% !important;
    height: auto !important;
    min-height: 250px !important;
    flex-shrink: 0 !important;
}

.hero-banner .swiper-slide img,
[class*="swiper-slide"] img {
    width: 100% !important;
    height: auto !important;
    max-height: 400px !important;
    object-fit: cover !important;
    display: block !important;
}

@media (min-width: 768px) {
    .hero-banner .swiper-slide,
    [class*="swiper-slide"] {
        min-height: 400px !important;
    }
}

@media (min-width: 1024px) {
    .hero-banner .swiper-slide,
    [class*="swiper-slide"] {
        min-height: 600px !important;
    }
}

/* Hero Stats 移动端适配 */
.hero-stats,
[class*="hero-stats"] {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 10px !important;
    width: 100% !important;
}

.hero-stat,
[class*="hero-stat"] {
    flex: 0 0 calc(50% - 10px) !important;
    min-width: 80px !important;
    text-align: center !important;
    padding: 5px !important;
}

@media (min-width: 480px) {
    .hero-stat {
        flex: 0 0 calc(25% - 10px) !important;
    }
}

/* ===== 通用图片和媒体修复 ===== */
img,
picture,
video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
}

img[style*="height: 90px"] {
    height: 60px !important;
    width: auto !important;
}

/* ===== Section 容器修复 ===== */
.wy-section,
[class*="section"],
[class*="Section"] {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.wy-container,
[class*="container"] {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    box-sizing: border-box !important;
}

@media (min-width: 768px) {
    .wy-container,
    [class*="container"] {
        max-width: 720px !important;
    }
}

@media (min-width: 1024px) {
    .wy-container,
    [class*="container"] {
        max-width: 960px !important;
    }
}

@media (min-width: 1230px) {
    .wy-container,
    [class*="container"] {
        max-width: 1200px !important;
    }
}

/* ===== 产品分类 Tabs ===== */
.cat-tabs,
[class*="cat-tabs"],
[class*="tabs"] {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 10px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

.cat-tab,
[class*="cat-tab"] {
    flex: 0 0 auto !important;
    min-width: 70px !important;
    padding: 8px 12px !important;
    text-align: center !important;
}

.cat-tab img,
[class*="cat-tab"] img {
    width: 35px !important;
    height: 35px !important;
    margin: 0 auto !important;
}

.cat-tab .cat-name,
[class*="cat-name"] {
    font-size: 11px !important;
    white-space: nowrap !important;
}

/* ===== 产品展示区 ===== */
.showcase-panel,
[class*="showcase"],
[class*="product-grid"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
    width: 100% !important;
}

.showcase-left,
.showcase-right,
[class*="showcase-left"],
[class*="showcase-right"] {
    width: 100% !important;
    flex: 1 !important;
}

.showcase-right,
[class*="showcase-right"] {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
}

@media (min-width: 768px) {
    .showcase-panel,
    [class*="showcase-panel"] {
        flex-direction: row !important;
    }

    .showcase-left {
        flex: 0 0 45% !important;
    }

    .showcase-right,
    [class*="showcase-right"] {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* ===== 联系表单 ===== */
.inquiry-form,
[class*="form"],
form {
    width: 100% !important;
    max-width: 100% !important;
}

.inquiry-row,
[class*="row"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
    margin-bottom: 10px !important;
}

.inquiry-field,
[class*="field"] {
    width: 100% !important;
    flex: 1 !important;
}

.inquiry-field input,
.inquiry-field select,
.inquiry-field textarea,
form input,
form select,
form textarea {
    width: 100% !important;
    min-height: 40px !important;
    padding: 8px 12px !important;
    box-sizing: border-box !important;
    font-size: 14px !important;
}

/* ===== 表格和列表 ===== */
table {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: auto !important;
    display: block !important;
    -webkit-overflow-scrolling: touch;
}

table th,
table td {
    padding: 8px !important;
    font-size: 13px !important;
    white-space: nowrap !important;
}

@media (max-width: 767px) {
    table {
        font-size: 12px !important;
    }

    table th,
    table td {
        padding: 5px !important;
        font-size: 11px !important;
    }
}

/* ===== FAQ / 问答区域 ===== */
.faq-item,
[class*="faq"],
[class*="question"] {
    width: 100% !important;
    margin-bottom: 10px !important;
}

/* ===== 页脚 Footer ===== */
footer,
.Footer,
[class*="footer"] {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    box-sizing: border-box !important;
}

/* ===== 弹窗和浮层 ===== */
.modal,
.popup,
[class*="modal"],
[class*="popup"],
[class*="Modal"],
[class*="Popup"] {
    width: 95% !important;
    max-width: 95% !important;
    left: 2.5% !important;
    margin-left: 0 !important;
    padding: 15px !important;
    box-sizing: border-box !important;
    overflow: auto !important;
    max-height: 90vh !important;
}

.modal img,
.popup img {
    max-width: 100% !important;
    height: auto !important;
}

/* ===== 通用 Section 间距 ===== */
section {
    margin-bottom: 20px !important;
}

/* ===== 隐藏不需要的元素（移动端） ===== */
@media (max-width: 767px) {
    .desktop-only,
    [class*="desktop-only"] {
        display: none !important;
    }

    .hide-mobile,
    [class*="hide-mobile"] {
        display: none !important;
    }
}

/* ===== 移动端优先的 flex 布局 ===== */
@media (max-width: 767px) {
    * {
        max-width: 100vw !important;
    }

    .clearfix::after {
        content: "";
        display: table;
        clear: both;
    }

    /* 修复浮动 */
    [class*="float"],
    [style*="float"] {
        float: none !important;
    }

    /* 居中对齐 */
    .text-center,
    [class*="center"] {
        text-align: center !important;
    }
}

/* ===== 修复 w1200 容器 ===== */
.w1200,
[class*="w1200"],
.wy-w1200 {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    box-sizing: border-box !important;
}

@media (min-width: 1230px) {
    .w1200,
    [class*="w1200"] {
        max-width: 1200px !important;
        margin: 0 auto !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* ===== 优化触摸体验 ===== */
button,
a,
[role="button"],
.clickable {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

/* 移除过渡动画（提升移动端性能） */
@media (max-width: 767px) {
    *,
    *::before,
    *::after {
        transition-duration: 0ms !important;
        animation-duration: 0ms !important;
    }
}

/* ===== 修复可能的 z-index 问题 ===== */
.FixNav {
    z-index: 999 !important;
}

/* ===== 安全覆盖：阻止所有溢出 ===== */
* {
    box-sizing: border-box;
}

html,
body,
header,
main,
footer,
section,
article,
div {
    overflow-x: hidden !important;
    max-width: 100vw !important;
}

/* ===== 最终防线：隐藏滚动条但保持功能 ===== */
::-webkit-scrollbar {
    width: 0;
    height: 0;
}
