/* ============================================
   stonestand.com 移动端响应式样式
   覆盖默认 PC 端固定宽度布局
   ============================================ */

/* === 全局基础修复 === */
img {
    max-width: 100%;
    height: auto;
}
table {
    max-width: 100%;
    display: block;
    overflow-x: auto;
}
iframe {
    max-width: 100%;
}

/* === 平板竖屏 & 手机 (≤991px) === */
@media (max-width: 991px) {
    /* 容器宽度自适应 */
    .container,
    .nav-wrap > .container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* 所有 col-md-* 改为全宽 */
    .col-md-1, .col-md-2, .col-md-3, .col-md-4,
    .col-md-5, .col-md-6, .col-md-7, .col-md-8,
    .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
        width: 100% !important;
        float: none !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    .row {
        margin-left: -10px !important;
        margin-right: -10px !important;
    }

    /* === 顶部信息栏 === */
    .top-bar {
        padding: 5px 0;
        font-size: 12px;
        text-align: center;
    }
    .top-bar .container {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .top-bar ul.left,
    .top-bar ul.right {
        float: none !important;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        padding: 3px 0;
    }
    .top-bar ul.left li,
    .top-bar ul.right li {
        float: none !important;
        display: inline-block;
        font-size: 11px;
        line-height: 1.5;
        white-space: nowrap;
    }
    .top-bar .social {
        display: flex;
        gap: 10px;
    }
    .top-bar .social li a {
        font-size: 14px;
        padding: 4px;
    }
    .top-bar span.close {
        display: none;
    }
    /* 工作时间、Skype、邮箱在手机上隐藏部分信息保持简洁 */
    .top-bar ul.right li.widget_anpstext {
        font-size: 11px;
    }
}

/* === 手机横屏 & 竖屏 (≤767px) === */
@media (max-width: 767px) {
    /* 顶部栏精简：只显示社交图标 + 中文版链接 */
    .top-bar ul.left {
        gap: 6px;
    }
    .top-bar ul.right li:nth-child(1),
    .top-bar ul.right li:nth-child(3) {
        display: none !important;
    }
    .top-bar ul.right li:nth-child(2) {
        display: inline-block;
    }
    .top-bar ul.right {
        font-size: 10px;
    }

    /* === 导航栏 === */
    .site-header {
        position: relative;
    }
    .nav-wrap {
        padding: 8px 0;
    }
    .site-logo {
        float: left;
        max-width: 60%;
    }
    .site-logo img {
        width: auto !important;
        height: auto !important;
        max-width: 180px !important;
        max-height: 50px !important;
    }
    .site-logo a {
        display: block;
    }

    /* 汉堡菜单按钮 */
    .navbar-toggle {
        display: block !important;
        float: right;
        margin: 8px 10px 0 0;
        padding: 9px 10px;
        background: #333;
        border: 1px solid #555;
        border-radius: 4px;
        cursor: pointer;
        position: relative;
        z-index: 1001;
    }
    .navbar-toggle .icon-bar {
        display: block;
        width: 22px;
        height: 2px;
        background: #fff;
        margin: 5px 0;
        border-radius: 1px;
    }

    /* 主导航 - 默认隐藏，点击展开 */
    .site-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        z-index: 1000;
        box-shadow: 0 5px 15px rgba(0,0,0,0.15);
        max-height: 70vh;
        overflow-y: auto;
    }
    .site-navigation.open {
        display: block !important;
    }
    .site-navigation > ul {
        display: block !important;
        width: 100%;
        padding: 0;
        margin: 0;
    }
    .site-navigation > ul > li {
        display: block !important;
        float: none !important;
        border-bottom: 1px solid #eee;
    }
    .site-navigation > ul > li > a {
        display: block;
        padding: 12px 20px;
        font-size: 14px;
        font-weight: 600;
        color: #333;
        text-decoration: none;
    }
    .site-navigation > ul > li > a:hover {
        background: #f5f5f5;
        color: #e67e22;
    }

    /* 有子菜单的项 - 加展开箭头 */
    .site-navigation .menu-item-has-children > a {
        position: relative;
    }
    .site-navigation .menu-item-has-children > a::after {
        content: '\f107';
        font-family: FontAwesome;
        float: right;
        font-size: 16px;
        transition: transform 0.3s;
    }
    .site-navigation .menu-item-has-children.open > a::after {
        transform: rotate(180deg);
    }

    /* 子菜单 - 默认隐藏，点击展开 */
    .site-navigation .sub-menu {
        display: none;
        background: #f9f9f9;
        padding: 0;
        margin: 0;
    }
    .site-navigation .menu-item-has-children.open > .sub-menu {
        display: block !important;
    }
    .site-navigation .sub-menu li {
        display: block !important;
    }
    .site-navigation .sub-menu li a {
        display: block;
        padding: 10px 20px 10px 30px;
        font-size: 13px;
        color: #555;
        border-top: 1px solid #eee;
    }
    .site-navigation .sub-menu .menu-item-has-children > a::after {
        font-size: 14px;
    }
    .site-navigation .sub-menu .sub-menu li a {
        padding-left: 40px;
        font-size: 12px;
    }
    /* 三级子菜单 */
    .site-navigation .sub-menu .sub-menu {
        background: #f0f0f0;
    }

    /* 搜索按钮 */
    button.fa-search.mobile {
        display: block !important;
        float: right;
        margin: 8px 5px 0 0;
        padding: 8px 10px;
        background: transparent;
        border: none;
        font-size: 18px;
        color: #333;
        cursor: pointer;
    }

    /* 桌面搜索按钮隐藏 */
    button.fa-search.desktop {
        display: none !important;
    }

    /* sticky logo */
    .logo-wrap.table.absolute {
        display: none !important;
    }

    /* === 轮播图 (Revolution Slider) === */
    .rev_slider_wrapper {
        max-height: 250px !important;
    }
    #rev_slider_1_1,
    .rev_slider {
        max-height: 250px !important;
        height: 250px !important;
    }
    .rev_slider ul li img {
        object-fit: cover;
        min-height: 200px;
    }
    .tp-bannertimer {
        display: none !important;
    }

    /* === 首页特色区域 === */
    .vc_custom_1436427235666 {
        margin-top: 0 !important;
        margin-bottom: 20px !important;
        padding: 20px 15px !important;
    }
    .vc_custom_1436427235666 h3 {
        font-size: 13px !important;
        line-height: 1.6 !important;
        text-align: center !important;
    }
    .vc_custom_1418808445132 {
        margin-top: 0 !important;
    }
    #custom-id-0.btn {
        display: block;
        width: 80%;
        margin: 15px auto;
        text-align: center;
        font-size: 14px;
        padding: 10px;
    }

    /* === Our service tenet === */
    .home-left-headng h3 {
        font-size: 18px !important;
    }
    .home-left-headng p {
        font-size: 13px;
        line-height: 1.7;
    }

    /* === 三个特性卡片 (client/exhibition/factory) === */
    .home-text-icon .col-md-4 {
        margin-bottom: 15px;
    }
    .home-text-icon .wpb_wrapper a {
        display: block;
        padding: 15px;
        font-size: 13px;
        line-height: 1.6;
    }
    .home-text-icon .wpb_wrapper i {
        font-size: 24px;
    }
    .home-text-icon .wpb_wrapper span {
        display: block;
        font-size: 15px;
        font-weight: 700;
        margin: 5px 0;
    }

    /* === FEATURED PRODUCTS === */
    .vc_custom_1418644713059 {
        padding: 20px 10px !important;
    }
    .vc_custom_1418644713059 h3 {
        font-size: 16px !important;
    }
    .recentportfolio {
        display: flex;
        flex-wrap: wrap;
        gap: 2%;
    }
    .recentportfolio li.item {
        width: 48% !important;
        margin-bottom: 10px;
    }
    .recentportfolio li.item .item-hover {
        height: 120px !important;
    }
    .recentportfolio li.item .item-info .headline h3 {
        font-size: 12px !important;
        line-height: 1.4;
    }
    .recentportfolio li.item .item-img img {
        width: 100%;
        height: auto;
    }

    /* === Recently Products (VC Grid) === */
    .vc_custom_1418034361637 {
        padding-top: 20px !important;
    }
    .vc_grid-container .vc_col-sm-6 {
        width: 100% !important;
        float: none !important;
    }
    .vc_grid-item .vc_gitem_row {
        display: flex;
        flex-direction: column;
    }
    .vc_grid-item .vc_gitem-col {
        width: 100% !important;
        padding: 5px 10px !important;
    }
    .vc_grid-item img {
        max-width: 100% !important;
        height: auto !important;
    }
    .vc_grid-item h4 {
        font-size: 14px !important;
        margin-top: 10px;
    }
    .vc_grid-item p {
        font-size: 12px;
        line-height: 1.5;
    }
    .vc_separator h2 {
        font-size: 16px !important;
    }

    /* === Why Us 侧边栏 === */
    .col-md-4 .vc_empty_space {
        height: 20px !important;
    }
    .col-md-4 .vc_single_image-wrapper img {
        max-width: 100%;
        height: auto;
    }
    .list.circle-arrow {
        padding-left: 20px;
    }
    .list.circle-arrow li {
        font-size: 12px;
        line-height: 1.6;
        margin-bottom: 8px;
    }

    /* === 视差横幅 (FROM IDEA...) === */
    .vc_custom_1416838757982 {
        margin-top: 20px !important;
        padding: 30px 15px !important;
    }
    #constructionsite {
        padding: 40px 15px !important;
        background-size: cover !important;
        background-position: center !important;
    }
    #constructionsite .text p {
        font-size: 18px !important;
    }
    #custom-id-1.btn {
        font-size: 13px;
        padding: 8px 20px;
    }

    /* === 客户信任区域 === */
    .vc_custom_1418039236500 {
        padding-top: 20px !important;
    }
    .vc_custom_1418039236500 h3 {
        font-size: 14px !important;
    }

    /* === 页脚 === */
    .site-footer .col-md-3 {
        width: 100% !important;
        margin-bottom: 20px;
    }
    .site-footer .widget-title {
        font-size: 14px;
        margin-bottom: 10px;
    }
    .site-footer .textwidget {
        font-size: 12px;
        line-height: 1.6;
    }
    .site-footer .textwidget p {
        margin-bottom: 5px;
        font-size: 12px;
    }
    .site-footer img {
        max-width: 140px !important;
        height: auto !important;
    }

    /* 友链区域在手机上隐藏 */
    .site-footer .col-md-3:nth-child(2) {
        display: none;
    }

    /* Copyright */
    .copyright-footer {
        text-align: center;
        font-size: 11px;
        padding: 15px 10px;
    }
    .copyright-footer .textwidget {
        font-size: 11px;
    }

    /* === 客服浮动面板 === */
    #cmsFloatPanel {
        right: 5px !important;
        bottom: 60px !important;
        z-index: 999;
    }
    #cmsFloatPanel .ctrolPanel a {
        width: 35px;
        height: 35px;
        margin-bottom: 3px;
        font-size: 10px;
    }
    #cmsFloatPanel .servicePanel,
    #cmsFloatPanel .messagePanel,
    #cmsFloatPanel .qrcodePanel {
        width: 250px !important;
    }

    /* === 回到顶部按钮 === */
    #scrolltop {
        right: 10px;
        bottom: 15px;
    }
    #scrolltop a {
        width: 36px;
        height: 36px;
        line-height: 36px;
        font-size: 18px;
    }

    /* === 产品列表页 === */
    .product-list .col-md-3,
    .product-list .col-md-4,
    .product-list .col-sm-6,
    .product-grid .col-md-3,
    .product-grid .col-md-4 {
        width: 48% !important;
        float: left !important;
        margin: 1% !important;
    }
    .product-list .product-item,
    .product-grid .product-item {
        margin-bottom: 10px;
    }
    .product-list .product-item img,
    .product-grid .product-item img {
        width: 100%;
        height: auto;
    }
    .product-list .product-item h3,
    .product-grid .product-item h3 {
        font-size: 12px;
    }

    /* === 产品详情页 === */
    .product-detail .col-md-6 {
        width: 100% !important;
        float: none !important;
    }
    .product-detail h1 {
        font-size: 16px;
    }
    .product-detail .product-image img {
        max-width: 100%;
        height: auto;
    }

    /* === 内页通用 === */
    .page-content h1,
    .page-content h2,
    .entry-title {
        font-size: 18px !important;
        line-height: 1.4;
    }
    .page-content h3 {
        font-size: 15px !important;
    }
    .page-content p,
    .page-content li {
        font-size: 13px;
        line-height: 1.7;
    }

    /* === 面包屑 === */
    .breadcrumb {
        font-size: 12px;
        padding: 10px 0;
    }

    /* === 按钮最小触摸区域 === */
    a.btn, button, .navbar-toggle, 
    .site-navigation a,
    #cmsFloatPanel a {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    a.btn {
        min-height: 40px;
        padding: 8px 18px;
    }
    .site-navigation a {
        min-height: 44px;
    }

    /* === 表单 === */
    input, textarea, select {
        font-size: 16px !important; /* 防止 iOS 缩放 */
        max-width: 100%;
        box-sizing: border-box;
    }

    /* === 间距优化 === */
    section.container {
        padding-left: 10px;
        padding-right: 10px;
    }
    section {
        margin-bottom: 15px;
    }

    /* 隐藏 PC 端 sticky header holder */
    .sticky-holder {
        display: none !important;
    }

    /* 搜索弹窗适配 */
    .site-search .container {
        padding: 10px;
    }
    .site-search input {
        font-size: 16px;
        padding: 10px;
    }
}

/* === 手机竖屏 (≤479px) === */
@media (max-width: 479px) {
    /* 更小的字体 */
    body {
        font-size: 13px;
    }

    /* 顶部栏极简模式 */
    .top-bar ul.left {
        justify-content: center;
    }
    .top-bar ul.left li.widget_text {
        font-size: 10px;
    }
    .top-bar ul.right {
        display: none; /* 手机上完全隐藏工作时间/Skype/邮箱行 */
    }

    /* LOGO 更小 */
    .site-logo img {
        max-width: 140px !important;
        max-height: 40px !important;
    }

    /* 轮播图更矮 */
    .rev_slider_wrapper,
    #rev_slider_1_1,
    .rev_slider {
        max-height: 180px !important;
        height: 180px !important;
    }

    /* 产品网格 2 列 */
    .recentportfolio li.item {
        width: 48% !important;
    }
    .recentportfolio li.item .item-hover {
        height: 100px !important;
    }

    /* 按钮全宽 */
    #custom-id-0.btn, #custom-id-1.btn {
        width: 90%;
    }

    /* 页脚 - 更紧凑 */
    .site-footer {
        padding: 15px 0;
    }
    .site-footer .col-md-3 {
        margin-bottom: 15px;
    }
}

/* === 平板横屏 (768px-991px) === */
@media (min-width: 768px) and (max-width: 991px) {
    .container,
    .nav-wrap > .container {
        width: 750px !important;
        max-width: 100% !important;
    }
    .site-logo img {
        max-width: 220px !important;
        max-height: 70px !important;
    }
    .recentportfolio li.item {
        width: 31% !important;
    }
    .site-footer .col-md-3 {
        width: 50% !important;
        float: left !important;
    }
}

/* === iPad Pro / 小平板横屏 (992px-1199px) === */
@media (min-width: 992px) and (max-width: 1199px) {
    .container,
    .nav-wrap > .container {
        width: 970px !important;
        max-width: 100% !important;
    }
}
