/* ==========================================================================
   移动端样式（阶段 1 · 逐页改版）
   仅 <=768px 生效；桌面完全不受影响
   ========================================================================== */

.m-header,
.m-nav {
    display: none;
}

@media (max-width: 768px) {

    html,
    body {
        overflow-x: hidden;
        -webkit-text-size-adjust: 100%;
    }

    img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* ---------- 隐藏桌面端头部，启用移动头部 ---------- */
    .topad,
    .fd_top0,
    .fd_top1 {
        display: none !important;
    }

    .m-header {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 10px;
        background: #fff;
        border-bottom: 1px solid #f0f1f4;
        position: relative;
        z-index: 100;
    }

    .m-logo {
        flex: 0 0 auto;
    }

    .m-logo img {
        height: 30px !important;
        width: auto !important;
        max-width: none !important;
        display: block;
    }

    .m-search {
        flex: 1 1 auto;
        display: flex;
        min-width: 0;
        border: 1px solid #e5e7eb;
        border-radius: 999px;
        overflow: hidden;
        background: #f7f8fa;
    }

    .m-search input {
        flex: 1;
        min-width: 0;
        border: 0;
        background: transparent;
        padding: 7px 12px;
        font-size: 13px;
        outline: none;
    }

    .m-search button {
        border: 0;
        background: #111827;
        color: #fff;
        padding: 0 14px;
        font-size: 13px;
    }

    .m-cart {
        flex: 0 0 auto;
        font-size: 13px;
        color: #374151;
        text-decoration: none;
    }

    .m-nav {
        display: flex;
        gap: 16px;
        padding: 8px 12px;
        overflow-x: auto;
        white-space: nowrap;
        background: #fff;
        border-bottom: 1px solid #f0f1f4;
        -webkit-overflow-scrolling: touch;
    }

    .m-nav a {
        font-size: 13px;
        color: #4b5563;
        text-decoration: none;
    }

    .m-nav a:active {
        color: #4f46e5;
    }

    /* ---------- 通用容器 ---------- */
    .index_body,
    .index_body > div,
    .index_body .t,
    .index_top,
    .i_recommend,
    .i_top,
    .ipls,
    .ipl0,
    .hot_goods,
    .new_goods,
    .best_goods,
    .clear0,
    .block,
    .wrap,
    .web_body,
    .channel_page {
        width: auto !important;
        max-width: 100% !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
        box-sizing: border-box !important;
    }

    /* ---------- 首页 Banner ---------- */
    .cxjad_m,
    .cxjinfo {
        width: auto !important;
        max-width: 100% !important;
    }

    .cxjitem {
        height: 190px !important;
        background-size: cover !important;
        background-position: center center !important;
    }

    /* ---------- 首页常用入口 ---------- */
    .i_top .fw,
    .i_top ul {
        width: auto !important;
        display: flex;
        flex-wrap: wrap;
    }

    .i_top li {
        width: 20% !important;
        text-indent: 0 !important;
        line-height: 1.6 !important;
        font-size: 11px !important;
        padding: 6px 0;
    }

    /* 卡片内文字换行，避免 nowrap 撑破 */
    .goodsItem a,
    .goodsItem span,
    .goodsItem p {
        white-space: normal !important;
        word-break: break-word;
        overflow: hidden;
    }

    /* 首页轮播容器高度自适应，去掉 450px 空白 */
    .Tr_cs,
    .cxjinfo,
    .cxjad_m,
    .cxjad_m .TABLE_S {
        height: auto !important;
    }

    /* ---------- 商品卡片 ---------- */
    .goodsBox {
        width: auto !important;
        max-width: 100% !important;
        display: flex !important;
        flex-wrap: wrap;
        gap: 8px;
        padding: 0 !important;
    }

    .goodsItem {
        width: 48% !important;
        margin: 0 !important;
        padding: 8px !important;
        float: none !important;
        box-sizing: border-box;
    }

    .goodsItem .goodsimg {
        width: 100% !important;
        height: auto !important;
    }

    /* 商品网格子项统一两列（兼容不同区块结构） */
    .goodsBox > li,
    .goodsBox > div,
    .goodsBox > a {
        width: 48% !important;
        box-sizing: border-box;
        margin: 0 !important;
        float: none !important;
    }

    .goodsBox img {
        width: 100% !important;
        height: auto !important;
    }

    /* 价格/评价不换行崩字 */
    .goodsBox em,
    .goodsBox font,
    .goodsBox .price {
        white-space: normal !important;
        font-size: 13px !important;
    }

    /* 首页区块商品项（.prcitem 结构）两列 */
    .prcitem {
        width: 48% !important;
        float: none !important;
        display: inline-block;
        vertical-align: top;
        box-sizing: border-box;
        margin: 0 1% 12px 0 !important;
    }

    .prcitem_border {
        padding: 8px !important;
    }

    .prcitem .pic img {
        width: 100% !important;
        height: auto !important;
    }

    .prcitem .name a,
    .prcitem .prices em {
        white-space: normal !important;
        font-size: 13px !important;
        line-height: 1.5 !important;
    }

    .prcitem .name a {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* 热销/新品等区块两列 */
    .hot_goods .goodsItem,
    .new_goods .goodsItem,
    .best_goods .goodsItem {
        width: 48% !important;
        float: none !important;
        display: inline-block;
        vertical-align: top;
        box-sizing: border-box;
        margin: 0 1% 10px 0 !important;
    }

    .hot_goods .goodsItem img,
    .new_goods .goodsItem img,
    .best_goods .goodsItem img {
        width: 100% !important;
        height: auto !important;
    }

    /* ---------- 底部 ---------- */
    .footer,
    .abouts_width,
    .footer_info {
        width: auto !important;
        max-width: 100% !important;
        padding: 0 12px !important;
        box-sizing: border-box;
    }

    .footHelp {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px 8px;
        line-height: 2;
        font-size: 12px;
    }

    .footer_info {
        text-align: center;
        font-size: 12px;
        line-height: 1.9;
    }

    /* ---------- 宽表格 ---------- */
    .formCart_table,
    .formCart_table1 {
        display: block;
        overflow-x: auto;
    }
}
