/* ============================================
   手机端错位修复样式
   文件名：xgapi_mobile_fix.css
   用途：修复所有页面在手机端的错位问题
   ============================================ */

/* 基础移动端修复 */
@media (max-width: 768px) {
    /* 容器修复 */
    .container {
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* 表格横向滚动 */
    .table,
    .layui-table,
    .server-area table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
    
    .table thead,
    .table tbody,
    .table tr,
    .layui-table thead,
    .layui-table tbody,
    .layui-table tr {
        display: table;
        width: 100%;
        table-layout: fixed;
    }
    
    /* 表格单元格修复 */
    .table th,
    .table td,
    .layui-table th,
    .layui-table td {
        min-width: 80px;
        padding: 8px 5px;
        font-size: 12px;
        word-break: break-word;
        white-space: normal;
    }
    
    /* 产品表格特殊处理 */
    .product-table .layui-table {
        font-size: 11px;
    }
    
    .product-table .layui-table th,
    .product-table .layui-table td {
        padding: 8px 4px;
        font-size: 11px;
    }
    
    /* 价格单元格在移动端 */
    .product-table .layui-table td.price-cell {
        width: auto !important;
        min-width: 150px !important;
        max-width: 100% !important;
    }
    
    .product-table .layui-table td.price-cell .layui-col-xs4 {
        width: 50% !important;
        float: left;
        padding: 2px !important;
        font-size: 10px;
    }
    
    /* 产品名称列在移动端 */
    .product-table .layui-table th:first-child,
    .product-table .layui-table td:first-child {
        min-width: 120px !important;
        width: 120px !important;
        white-space: normal;
        word-break: break-all;
    }
    
    /* Layui栅格系统修复 */
    .layui-row {
        margin-left: 0;
        margin-right: 0;
    }
    
    .layui-col-md4,
    .layui-col-md8,
    .layui-col-lg3,
    .layui-col-lg9 {
        width: 100% !important;
        float: none;
        margin-bottom: 20px;
    }
    
    /* 地区按钮容器修复 */
    .province-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .province-container .region-btn.province {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 100% !important;
        margin: 5px 0;
    }
    
    /* 城市按钮修复 */
    .region-btn.city {
        width: 100% !important;
        margin: 5px 0 !important;
    }
    
    /* 标签按钮修复 */
    .tag-price {
        width: 100%;
        margin: 5px 0;
        justify-content: center;
    }
    
    /* 卡片修复 */
    .layui-card-body {
        padding: 15px !important;
    }
    
    /* 购买区域修复 */
    .buy-section {
        padding: 20px 15px !important;
    }
    
    .buy-section .layui-btn-lg {
        width: 100% !important;
        max-width: 100%;
    }
    
    /* 表单修复 */
    .layui-form .layui-form-item {
        margin-bottom: 15px;
    }
    
    .layui-form .layui-input,
    .layui-form .layui-select,
    .layui-form .layui-textarea {
        width: 100%;
        box-sizing: border-box;
    }
    
    /* 导航栏修复 */
    .navbar-nav {
        width: 100%;
    }
    
    .navbar-nav .nav-item {
        width: 100%;
    }
    
    .navbar-nav .nav-link {
        width: 100%;
        text-align: left;
        padding: 12px 15px !important;
    }
    
    /* 头部按钮修复 */
    .header-action {
        width: 100%;
        margin-left: 0 !important;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .btn-header {
        width: 100%;
        justify-content: center;
    }
    
    /* 客服浮动按钮修复 */
    .right_fix {
        right: 10px !important;
        bottom: 10px !important;
        width: 50px !important;
        height: 50px !important;
        font-size: 10px !important;
    }
    
    .right_fix img {
        width: 30px !important;
        height: 30px !important;
    }
    
    .zixun_show {
        right: 10px !important;
        bottom: 70px !important;
        width: 200px !important;
        max-width: calc(100vw - 20px);
        font-size: 12px;
        padding: 10px;
    }
    
    /* 关于我们页面修复 */
    .about-sidebar {
        margin-bottom: 30px;
    }
    
    .about-content-area {
        width: 100%;
    }
    
    /* 帮助中心修复 */
    .help-category-list,
    .help-article-list {
        width: 100%;
    }
    
    /* 软件中心修复 */
    .software-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    .software-card {
        width: 100%;
    }
    
    /* 首页轮播图修复 */
    .swiper-container,
    .swiper-wrapper {
        width: 100%;
        overflow: hidden;
    }
    
    .swiper-slide {
        width: 100%;
    }
    
    /* 页脚修复 */
    .footer-widget {
        margin-bottom: 30px;
    }
    
    .footer-company-info {
        flex-direction: column;
    }
    
    .info-single-item {
        width: 100% !important;
        margin-bottom: 20px;
    }
    
    /* 通用修复 */
    .row {
        margin-left: -15px;
        margin-right: -15px;
    }
    
    .row > [class*="col-"] {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* 防止水平滚动 */
    body {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    html {
        overflow-x: hidden;
    }
    
    /* 图片响应式 */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* 按钮组修复 */
    .btn-group {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%;
        margin: 5px 0;
    }
}

/* 小屏幕手机修复 */
@media (max-width: 575px) {
    /* 表格进一步优化 */
    .table th,
    .table td,
    .layui-table th,
    .layui-table td {
        padding: 6px 3px;
        font-size: 11px;
    }
    
    /* 产品表格更小字体 */
    .product-table .layui-table {
        font-size: 10px;
    }
    
    .product-table .layui-table th,
    .product-table .layui-table td {
        padding: 6px 3px;
        font-size: 10px;
    }
    
    .product-table .layui-table td.price-cell .layui-col-xs4 {
        font-size: 9px;
    }
    
    /* 标题修复 */
    h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    h3 {
        font-size: 18px;
    }
    
    /* 卡片内边距减小 */
    .layui-card-body {
        padding: 12px !important;
    }
    
    /* 按钮字体 */
    .btn,
    .layui-btn {
        font-size: 14px;
        padding: 8px 16px;
    }
    
    /* 表单元素 */
    input,
    textarea,
    select {
        font-size: 14px;
    }
}

/* 超小屏幕修复 */
@media (max-width: 375px) {
    .table th,
    .table td,
    .layui-table th,
    .layui-table td {
        padding: 5px 2px;
        font-size: 10px;
    }
    
    .product-table .layui-table {
        font-size: 9px;
    }
    
    .product-table .layui-table th,
    .product-table .layui-table td {
        padding: 5px 2px;
        font-size: 9px;
    }
}

