/* ============================================
   光构宝 - 响应式样式（全站）
   覆盖所有PC页面，适配平板和移动端
   ============================================ */

/* ============================================
   断点 1: 大屏 (1200px 及以下) —— 宽屏笔记本
   所有固定宽度容器 → max-width: 100%
   ============================================ */
@media (max-width: 1200px) {
    /* === 全局容器 === */
    .index_top,
    .gmt_box,
    .latest-purchase,
    .spot-container,
    .page-container,
    .information_box,
    .about-container,
    .row,
    .purchase_ul,
    .purchase-view,
    .details_container,
    .spotSearch-container,
    .article_list_cont,
    .article_view,
    .screen_box,
    .nearby_container,
    .shop-info,
    .shop_bottom,
    .product_wrap,
    .spot_wrap,
    .intro_wrap,
    .album,
    .video_wrap,
    .corplist,
    .breadcrumb,
    .search_wrap,
    .index_serach,
    .footer_main .bw_1190,
    .nav-box > div,
    .product_detail,
    .article_list_cont .top,
    .country-index {
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        box-sizing: border-box !important;
    }

    /* 特殊处理：有些容器不需要 width:100%（如 .row） */
    .row {
        width: auto !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .container1 {
        max-width: 100%;
    }

    /* === 顶部栏和导航 === */
    .topBar {
        max-width: 100% !important;
        width: auto !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        box-sizing: border-box !important;
    }

    .main-nav-inner {
        max-width: 100% !important;
        width: auto !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        box-sizing: border-box !important;
    }

    /* === 轮播区域 === */
    .banner {
        width: 100% !important;
    }

    .mySwiper .swiper-slide img {
        width: 100% !important;
        height: auto !important;
    }

    /* === banner 图片全宽 === */
    .banner_top img,
    .banner_bottom img,
    .swiper-slide img,
    img[width="1140"] {
        max-width: 100% !important;
        height: auto !important;
    }

    /* === 采购卡片容器 === */
    #cards {
        width: 100% !important;
    }

    /* === 产品搜索外层 === */
    .content_left,
    .content_right {
        box-sizing: border-box !important;
    }

    /* === 店铺导航 === */
    .nav-box > div {
        display: flex;
        flex-wrap: wrap;
    }

    /* === 页脚 === */
    .footer_main .bw_1190 {
        margin: 0 auto;
    }

    /* === 采购详情 === */
    .Separate_box {
        padding-right: 0 !important;
    }

    .offer_aa {
        position: static !important;
        width: auto !important;
        margin-top: 10px;
    }

    /* === 属性表格 === */
    .dlWrap {
        width: 100% !important;
    }

    /* === 店铺介绍顶部 === */
    .intro_top ul {
        width: 100% !important;
    }
}

/* ============================================
   断点 2: 平板 (992px 及以下)
   双栏布局 → 纵向堆叠
   ============================================ */
@media (max-width: 992px) {
    /* === 首页三栏 → 单栏 === */
    .index_top {
        flex-direction: column;
    }

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

    .menu {
        width: 100% !important;
        height: auto !important;
        max-height: 300px;
    }

    .banner {
        width: 100% !important;
        height: auto !important;
        margin: 10px 0;
    }

    .mySwiper {
        height: 200px !important;
    }

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

    /* === 采购卡片 3列→2列 === */
    #cards {
        grid-template-columns: repeat(2, 1fr) !important;
    }

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

    /* === 最新采购 === */
    .latest-purchase {
        flex-direction: column;
    }

    .latest-purchase .card_container {
        width: 100% !important;
    }

    .form-container {
        width: 100% !important;
    }

    /* === 产品搜索：左910px+右210px → 纵向堆叠 === */
    .content_left {
        width: 100% !important;
        float: none !important;
    }

    .content_right {
        width: 100% !important;
        float: none !important;
        margin-top: 20px;
    }

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

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

    /* === 采购详情：左910px+右210px → 纵向 === */
    .details-left {
        width: 100% !important;
        float: none !important;
    }

    .details-right {
        width: 100% !important;
        float: none !important;
        margin-top: 20px;
    }

    /* === 产品详情：左右布局 → 纵向 === */
    .detail_top {
        flex-direction: column;
    }

    .imgWrap {
        margin-right: 0 !important;
        margin-bottom: 20px;
    }

    .bigImg {
        width: 100% !important;
    }

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

    .imgList {
        width: 100% !important;
        margin: 0 !important;
    }

    .detail_bot {
        flex-direction: column;
    }

    .shop_left {
        width: 100% !important;
        margin-right: 0 !important;
        margin-bottom: 20px;
    }

    .shop_right {
        width: 100% !important;
    }

    /* === 信息区域单栏 === */
    .information_box {
        flex-direction: column;
        gap: 20px;
    }

    .information_left {
        width: 100% !important;
    }

    /* === 双栏页面容器 === */
    .page-container {
        grid-template-columns: 1fr !important;
    }

    /* === 新闻/文章列表 === */
    .article_list_cont .top {
        flex-direction: column;
    }

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

    .article_list_cont .bot {
        grid-template-columns: 1fr !important;
    }

    .article_content {
        flex-direction: column;
    }

    .article_content .article_left {
        width: 100% !important;
    }

    .article_content .article_right {
        width: 100% !important;
    }

    /* === 关于我们 === */
    .about-container {
        flex-direction: column;
    }

    .about-left {
        width: 100% !important;
    }

    .about-right {
        margin-left: 0 !important;
        margin-top: 20px;
    }

    .about-right .contact {
        grid-template-columns: 1fr !important;
    }

    .about-right .contact .item {
        border-right: none !important;
        border-bottom: 1px solid #ededed;
        padding-bottom: 15px;
    }

    /* === 产品推荐 5列→3列 === */
    .detail_mid ul {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .product-item-img {
        width: 100% !important;
    }

    .product-item-img img {
        width: 100% !important;
        height: auto !important;
    }

    /* === 店铺产品/现货 === */
    .shop_bottom {
        flex-direction: column;
    }

    .shop_bottom .left,
    .shop_bottom .right {
        width: 100% !important;
    }

    /* === 现货表格横向滚动 === */
    .spot-container .spotList,
    .spotSearch-container .spotList,
    .spot_wrap .spotList {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .spot-container .spotList table,
    .spotSearch-container .spotList table,
    .spot_wrap .spotList table {
        width: 100% !important;
        min-width: 800px;
    }

    /* === 排序栏 (attribute) === */
    .attribute {
        padding: 0 20px !important;
    }

    .sort_ul {
        position: static !important;
        float: left;
    }

    .flip_box {
        position: static !important;
        float: right;
    }

    /* === 厂家列表 === */
    .corplist .corpinfo {
        width: 100% !important;
        float: none !important;
        margin: 20px !important;
        box-sizing: border-box;
    }

    /* === 店铺信息 === */
    .shop-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .shop-info-left {
        flex-direction: column;
        align-items: center;
    }

    .shop-info-left .tt {
        margin: 10px 0 0 0;
    }

    .shop-info-right {
        margin-top: 15px;
    }

    /* === 页脚 5列→2列 === */
    .footer_main .footer_top {
        padding-right: 0 !important;
        min-height: auto !important;
    }

    .footer_main .footer_ul li {
        width: 50% !important;
        margin-bottom: 15px;
    }

    .footer_main .footer_service {
        position: static !important;
        width: 100% !important;
        height: auto !important;
        margin-top: 20px;
    }

    .footer_main .footer_weChat {
        position: static !important;
        margin-top: 20px;
        text-align: center;
    }

    /* === 视频 padding === */
    .video_wrap {
        padding: 0 20px !important;
    }

    /* === 采购详情报价区域 === */
    .Separate_box {
        padding-right: 0 !important;
        min-height: auto !important;
    }

    .offer_aa {
        position: static !important;
        margin: 15px 0;
    }

    /* === 采购表格 td 宽度 === */
    .details_table table td[style*="width"] {
        width: auto !important;
    }
}

/* ============================================
   断点 3: 手机 (768px 及以下)
   搜索栏、导航、卡片、表格全面适配
   ============================================ */
@media (max-width: 768px) {
    /* === 头部搜索栏 === */
    .index_serach {
        flex-direction: column;
        height: auto !important;
        padding: 10px 0;
    }

    .logo_wrap {
        width: 100% !important;
        height: auto !important;
        line-height: normal !important;
        text-align: center;
    }

    .logo_wrap img {
        max-width: 150px;
        height: auto;
    }

    .search_wrap {
        padding-top: 10px !important;
    }

    .search_show .searchkuang {
        width: 60% !important;
    }

    .phone_warp {
        width: 100% !important;
        height: auto !important;
        line-height: normal !important;
        justify-content: center;
        padding: 10px 0;
    }

    .phone_warp .phone {
        font-size: 22px !important;
    }

    /* === 首页顶部栏 === */
    .topBar {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }

    /* === 首页右侧功能图标 === */
    .right_nav li {
        width: 33.3% !important;
    }

    /* === 采购卡片 → 1列 === */
    #cards {
        grid-template-columns: 1fr !important;
    }

    /* === 现货查询表格小屏滚动 === */
    .spot-container .spotList table,
    .spotSearch-container .spotList table,
    .spot_wrap .spotList table {
        min-width: 600px;
        font-size: 12px;
    }

    .spot-container .spotList th,
    .spot-container .spotList td,
    .spotSearch-container .spotList th,
    .spotSearch-container .spotList td,
    .spot_wrap .spotList th,
    .spot_wrap .spotList td {
        padding: 5px 3px !important;
    }

    /* === 产品推荐 2列 === */
    .detail_mid ul {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .product-item-img {
        width: 100% !important;
    }

    .product-item-img img {
        width: 100% !important;
        height: auto !important;
    }

    /* === 产品详情参数表 === */
    .extension_dl dt,
    .extension_dl dd {
        width: 50% !important;
    }

    .product_right .product_dd dl {
        width: 100% !important;
        padding-left: 0 !important;
    }

    /* === dlWrap === */
    .dlWrap {
        width: 100% !important;
    }

    /* === 产品详情电话 === */
    .phone-info {
        position: static !important;
        transform: none !important;
        margin-top: 15px;
    }

    .phone-info .phone {
        font-size: 24px !important;
    }

    /* === 新闻/文章Tab导航 === */
    .nav-box .item {
        width: auto !important;
        padding: 0 10px !important;
        font-size: 14px !important;
    }

    /* === 搜索筛选框 === */
    .screen_box {
        flex-direction: column;
        height: auto !important;
        line-height: normal !important;
        padding: 10px !important;
        align-items: flex-start !important;
    }

    .screen_item {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 8px;
        width: 100%;
    }

    .screen_option,
    .screen_option1 {
        width: 100% !important;
        box-sizing: border-box;
    }

    .screen_btn {
        width: 100% !important;
    }

    /* === 排序栏 === */
    .attribute {
        height: auto !important;
        padding: 10px !important;
        overflow: hidden;
    }

    .sort_ul {
        position: static !important;
        float: left;
    }

    .flip_box {
        position: static !important;
        float: right;
    }

    /* === 页脚单列 === */
    .footer_main .footer_ul li {
        width: 100% !important;
    }

    /* === 侧边栏菜单 === */
    .sidebar .menu-dialog {
        left: 0 !important;
        width: 100% !important;
        min-width: auto !important;
    }

    /* === 浮动广告 === */
    .ad-content {
        width: 95% !important;
    }

    /* === 店铺信息 === */
    .shop-info {
        padding: 10px !important;
    }

    .shop-info-right .phone {
        font-size: 24px !important;
    }

    .tt text {
        max-width: 100% !important;
    }

    /* === 固定宽度表格列改用相对宽度 === */
    .col-fixed300,
    .col-fixed180,
    .col-fixed120 {
        max-width: none !important;
        width: auto !important;
    }

    /* === 采购详情 === */
    .offer_aa {
        position: static !important;
        width: 100% !important;
        text-align: center !important;
        padding: 10px 0 !important;
    }

    .offer_aa .a {
        margin: 10px auto;
    }

    /* === 产品搜索列表 === */
    .screen1_li {
        padding: 5px 10px !important;
    }

    /* === 视频区域 === */
    .video_wrap {
        padding: 0 10px !important;
    }

    /* === 店铺产品grid === */
    .product_right .category-list ul,
    .product_right .product-grid ul {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* === 触摸优化 === */
    button,
    .btn,
    [role="button"],
    a.button {
        min-height: 44px;
    }

    input,
    select,
    textarea {
        font-size: 16px !important;
    }

    /* === 采购报价 td === */
    table td[style*="width:220px"],
    table td[style*="width: 220px"] {
        width: auto !important;
        display: block;
    }
}

/* ============================================
   断点 4: 小屏手机 (576px 及以下)
   导航横向滚动、产品单列、次要元素隐藏
   ============================================ */
@media (max-width: 576px) {
    /* === Nav 标签横向滚动 === */
    .nav-box {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .nav-box > div {
        display: flex;
        flex-wrap: nowrap;
    }

    .nav-box .item {
        flex-shrink: 0;
        font-size: 13px !important;
    }

    /* === 产品推荐 1列 === */
    .detail_mid ul {
        grid-template-columns: 1fr !important;
    }

    /* === 搜索栏宽度 === */
    .search_show .searchkuang {
        width: 55% !important;
    }

    .search_show .searchBtn {
        width: 25% !important;
    }

    .search_show a {
        width: 20% !important;
        font-size: 13px !important;
    }

    /* === 页脚文字 === */
    .footer_main {
        font-size: 13px;
    }

    .footer_main .t {
        font-size: 13px !important;
    }

    /* === 采购表格 === */
    .spot-container .spotList table,
    .spotSearch-container .spotList table {
        min-width: 500px;
        font-size: 11px;
    }

    /* === 隐藏次要元素 === */
    .banner_bottom {
        display: none;
    }

    /* === 店铺产品grid → 单列 === */
    .product_right .category-list ul,
    .product_right .product-grid ul {
        grid-template-columns: 1fr !important;
    }

    /* === 厂家列表 === */
    .corplist .corpinfo {
        margin: 15px !important;
    }

    .corplist .corpinfo h3 {
        font-size: 15px;
    }

    /* === 图片列表小屏 === */
    .imgList {
        overflow-x: auto;
    }

    /* === 产品详情 === */
    .product_right .title {
        font-size: 18px;
    }

    .product_right .product_dd .price span {
        font-size: 24px;
    }
}
