/* ============================================================
   mobile.css - 亿卓电子移动端响应式样式
   仅在小屏幕生效，不影响PC端排版
   ============================================================ */

/* ========== 平板及以下 (<=991px) ========== */
@media (max-width: 991px) {

    /* --- 汉堡菜单按钮 --- */
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        width: 44px;
        height: 44px;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 1001;
        padding: 0;
    }
    .mobile-menu-toggle span {
        display: block;
        width: 26px;
        height: 3px;
        background: #fff;
        border-radius: 2px;
        transition: all 0.3s ease;
        position: relative;
    }
    .mobile-menu-toggle span::before,
    .mobile-menu-toggle span::after {
        content: "";
        position: absolute;
        width: 26px;
        height: 3px;
        background: #fff;
        border-radius: 2px;
        transition: all 0.3s ease;
    }
    .mobile-menu-toggle span::before { top: -8px; }
    .mobile-menu-toggle span::after  { top:  8px; }

    /* 汉堡菜单激活状态（X形） */
    .mobile-menu-toggle.active span { background: transparent; }
    .mobile-menu-toggle.active span::before {
        top: 0;
        transform: rotate(45deg);
    }
    .mobile-menu-toggle.active span::after {
        top: 0;
        transform: rotate(-45deg);
    }

    /* --- 导航栏容器相对定位 --- */
    .main-menu-area {
        position: relative;
    }
    .main-menu-area .container {
        position: relative;
    }

    /* --- 移动端导航面板 --- */
    .mobile-nav-panel {
        display: block;
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        background: #2a2a2a;
        z-index: 9999;
        overflow-y: auto;
        transition: left 0.35s ease;
        -webkit-overflow-scrolling: touch;
        box-shadow: 2px 0 12px rgba(0,0,0,0.3);
    }
    .mobile-nav-panel.open {
        left: 0;
    }
    .mobile-nav-panel .mobile-nav-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 15px 20px;
        border-bottom: 1px solid #444;
    }
    .mobile-nav-panel .mobile-nav-header .mobile-logo {
        height: 36px;
    }
    .mobile-nav-panel .mobile-nav-close {
        width: 36px;
        height: 36px;
        background: transparent;
        border: none;
        color: #ccc;
        font-size: 24px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .mobile-nav-panel .mobile-nav-close:hover {
        color: #fff;
    }

    /* 移动端导航链接 */
    .mobile-nav-panel ul.mobile-nav-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    .mobile-nav-panel ul.mobile-nav-list > li {
        border-bottom: 1px solid #3a3a3a;
    }
    .mobile-nav-panel ul.mobile-nav-list > li > a {
        display: block;
        padding: 14px 20px;
        color: #ddd;
        font-size: 16px;
        font-family: "微软雅黑";
        text-decoration: none;
        transition: background 0.2s, color 0.2s;
    }
    .mobile-nav-panel ul.mobile-nav-list > li > a:hover,
    .mobile-nav-panel ul.mobile-nav-list > li.active > a {
        background: #1969fa;
        color: #fff;
    }

    /* 移动端子菜单 */
    .mobile-nav-panel ul.mobile-sub-list {
        list-style: none;
        padding: 0;
        margin: 0;
        background: #222;
    }
    .mobile-nav-panel ul.mobile-sub-list li a {
        display: block;
        padding: 10px 20px 10px 40px;
        color: #bbb;
        font-size: 14px;
        font-family: "微软雅黑";
        text-decoration: none;
    }
    .mobile-nav-panel ul.mobile-sub-list li a:hover {
        color: #fff;
        background: #333;
    }

    /* 移动端导航底部按钮区 */
    .mobile-nav-panel .mobile-nav-actions {
        padding: 20px;
        border-top: 1px solid #444;
    }
    .mobile-nav-panel .mobile-nav-actions a {
        display: block;
        padding: 12px 0;
        color: #fff;
        font-size: 15px;
        text-align: center;
        text-decoration: none;
        border: 1px solid #555;
        border-radius: 6px;
        margin-bottom: 10px;
        transition: background 0.2s;
    }
    .mobile-nav-panel .mobile-nav-actions a:hover {
        background: #1969fa;
        border-color: #1969fa;
    }

    /* 遮罩层 */
    .mobile-nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 9998;
    }
    .mobile-nav-overlay.show {
        display: block;
    }

    /* --- 隐藏桌面端导航菜单 --- */
    .main-menu {
        display: none !important;
    }

    /* --- 头部按钮隐藏 --- */
    .header-button {
        display: none !important;
    }

    /* --- 导航栏在移动端紧凑布局 --- */
    .main-menu-area .row {
        position: relative;
    }
    #sticky-header .main-menu-area .col-xl-12 {
        min-height: 50px;
        display: flex;
        align-items: center;
    }

    /* 移动端导航栏显示移动端logo和标题 */
    .mobile-nav-brand {
        display: block !important;
        color: #fff;
        font-size: 18px;
        font-weight: bold;
        font-family: "微软雅黑";
        text-decoration: none;
    }
    .mobile-nav-brand img {
        height: 32px;
    }

    /* --- 页脚 --- */
    .footer-area .footer-bg {
        padding-top: 40px !important;
        padding-bottom: 15px !important;
    }
    .footer-title {
        font-size: 18px;
        margin-bottom: 15px;
    }
    .footer-wrapper {
        margin-bottom: 20px;
    }
    .contact-link li {
        margin-bottom: 8px;
    }
    .contact-address-text h5,
    .contact-text h4 {
        font-size: 13px;
        line-height: 1.6;
    }
    .contact-company-text h4 {
        font-size: 14px;
    }
    .footer-area [style*="display:flex"] {
        flex-direction: column !important;
    }
    .footer-bottom-area {
        padding-top: 20px !important;
    }
    .footer-bg-bottom .row {
        text-align: center;
    }
    .footer-bg-bottom .copyright,
    .footer-bg-bottom .footer-bottem-text {
        text-align: center;
        margin-bottom: 8px;
    }
    .footer-bg-bottom .copyright p,
    .footer-bg-bottom .footer-bottem-text p {
        font-size: 12px;
    }

    /* --- 通用内容区域 --- */
    .body-content {
        overflow-x: hidden;
    }
    .body-content img {
        max-width: 100%;
        height: auto;
    }

    /* --- 关于我们区域 --- */
    .about-area {
        padding: 40px 0 !important;
    }
    .about-text p {
        font-size: 14px;
        line-height: 1.8;
        text-align: justify;
    }

    /* --- 服务区域 --- */
    .services-area {
        padding-bottom: 10px !important;
    }
    .services-wrapper {
        margin-bottom: 15px;
    }
    .services-text p {
        font-size: 13px;
    }
    .section-title h1 {
        font-size: 22px !important;
    }

    /* --- 产品计价区域 --- */
    .pricing-area {
        padding: 40px 0 !important;
    }
    .pricing-wrapper {
        margin-bottom: 20px;
    }
    .pricing-top-text h3 {
        font-size: 18px;
    }
    .pricing-menu ul li {
        font-size: 13px;
    }

    /* --- 返回顶按钮调整 --- */
    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 20px;
        bottom: 16px;
        right: 16px;
    }

    /* --- 产品展示页 --- */
    .widget {
        margin-bottom: 20px;
    }

    /* --- 通用标题字号适配 --- */
    h1 { font-size: 26px; }
    h2 { font-size: 22px; }
    h3 { font-size: 18px; }
    h4 { font-size: 16px; }

    .section-title h2 {
        font-size: 22px;
    }
    .section-title p {
        font-size: 14px;
    }

    /* --- 内容容器padding --- */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* ========== 手机 (<=767px) ========== */
@media (max-width: 767px) {

    /* --- 轮播图高度适配 --- */
    .zy-carousel-index,
    .carousel-inner > .carousel-item {
        height: auto !important;
        min-height: 280px;
    }
    .carousel-item {
        padding: 30px 0 !important;
    }
    .slider-content {
        padding: 20px 0 !important;
    }
    .slider-content .agency {
        font-size: 14px !important;
    }
    .slider-content h1 {
        font-size: 20px !important;
        line-height: 1.4 !important;
    }
    .slider-content span {
        font-size: 13px !important;
        line-height: 1.6 !important;
    }
    .slider-button .btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    .slider-button .btn .btn-text {
        font-size: 13px !important;
    }
    .slider-button .slider-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    .carousel-control-prev,
    .carousel-control-next {
        width: 8%;
    }

    /* --- 快速计价模块 --- */
    .quick-quote-module h3 {
        font-size: 16px;
    }
    .quick-quote-module .form-control {
        font-size: 14px;
    }

    /* --- 视频/工厂展示区域 --- */
    .machine-main {
        height: auto !important;
        min-height: 500px;
        padding-bottom: 30px;
    }
    .machine-desc {
        height: auto !important;
        padding-top: 50px !important;
        padding-bottom: 20px;
    }
    .machine-desc .__title {
        font-size: 22px !important;
        line-height: 1.4 !important;
        margin-bottom: 30px !important;
    }
    .machine-desc .__desc {
        font-size: 14px !important;
        padding: 0 15px;
    }
    .machine-list {
        width: 100% !important;
        padding: 0 15px 50px !important;
    }
    .machine-list .swiper-slide,
    .machine-list img {
        width: 140px !important;
    }
    .machine-list img {
        height: 90px !important;
    }
    .machine-list .swiper-slide .title {
        font-size: 12px;
    }
    .machine-list .swiper-button-next,
    .machine-list .swiper-button-prev {
        top: 50px;
    }

    /* --- 产品卡片 --- */
    .pricing-wrapper {
        max-width: 350px;
        margin-left: auto;
        margin-right: auto;
    }

    /* --- 订单相关区域 --- */
    .orders {
        width: 100% !important;
        position: relative !important;
        height: auto !important;
    }
    .latest-orders {
        height: auto !important;
    }
    .orders-fabrication {
        height: auto !important;
    }
    .orders-tab {
        width: 100% !important;
        position: relative !important;
    }

    /* --- 内容页通用表格适配 --- */
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    table {
        max-width: 100%;
    }

    /* --- FAQ/文章页 --- */
    .blog-area,
    .faq-area {
        padding: 20px 0;
    }
}

/* ========== 小手机 (<=575px) ========== */
@media (max-width: 575px) {

    .zy-carousel-index,
    .carousel-inner > .carousel-item {
        min-height: 220px;
    }
    .slider-content .agency {
        font-size: 12px !important;
    }
    .slider-content h1 {
        font-size: 17px !important;
    }
    .slider-button .btn .btn-text {
        font-size: 12px !important;
    }

    /* 导航面板窄屏调整 */
    .mobile-nav-panel {
        width: 260px;
        left: -260px;
    }

    .machine-desc .__title {
        font-size: 18px !important;
    }
}

/* ========== 通用内容页侧边栏适配 (<=991px) ========== */
@media (max-width: 991px) {
    /* 产品/关于/FAQ等内容页的左侧+右侧布局 */
    .about-text ul li h1 {
        font-size: 15px;
        line-height: 1.8;
        padding-left: 15px;
    }
    .about-text ul li p,
    .about-text ul li span {
        font-size: 14px;
        text-indent: 15px;
    }

    /* Banner区域 */
    .page-banner {
        min-height: 120px;
    }
    .page-banner h1 {
        font-size: 22px;
    }

    /* 工厂设备页 */
    .factory-show-body .box .item {
        display: block !important;
        overflow: visible !important;
    }
    .factory-show-body .box .item .side {
        width: 100% !important;
        float: none !important;
        margin-bottom: 20px;
    }
    .factory-show-body .box .item .list {
        width: 100% !important;
        float: none !important;
    }
    .factory-show-body .box .item .list ul li {
        width: 48% !important;
        margin-bottom: 10px;
    }
    .factory-show-body .box .item .list ul li .p-img {
        width: 100% !important;
        height: auto !important;
    }

    /* 制程能力页 */
    .animate-el .side-nav-box {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        width: 100% !important;
        float: none !important;
        margin-bottom: 20px;
    }
    .animate-el .side-nav-box a {
        display: inline-block;
        padding: 8px 12px;
        margin: 3px;
    }
    .table-box {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .table-box table {
        min-width: 600px;
    }
    .table-box table th .dt {
        width: auto !important;
        min-width: 120px;
    }
    .table-box table td {
        padding: 8px 12px;
    }

    /* PCB计价页 */
    .right-box {
        display: none !important;
    }
    .pcb-form-wrapper {
        overflow-x: auto;
    }
    .el-form-item .el-input,
    .el-form-item .el-select {
        max-width: 100% !important;
    }
    .el-form-item input[style*="width:"],
    .el-form-item .el-select[style*="width:"] {
        width: 100% !important;
        max-width: 280px;
    }
    .qty-grid .el-button {
        width: auto;
        min-width: 40px;
        padding: 5px 8px;
    }
}

/* ========== 手机端内容页进一步适配 (<=767px) ========== */
@media (max-width: 767px) {
    .factory-show-body .box .item .list ul li {
        width: 100% !important;
    }

    .table-box table {
        min-width: 500px;
        font-size: 13px;
    }

    /* 内容页Banner */
    .bannergg {
        font-size: 13px;
        line-height: 18px;
    }
    .bannergg span {
        font-size: 16px;
        line-height: 32px;
    }
}

/* ========== PC端隐藏移动端元素 (>991px) ========== */
@media (min-width: 992px) {
    .mobile-menu-toggle {
        display: none !important;
    }
    .mobile-nav-panel {
        display: none !important;
    }
    .mobile-nav-overlay {
        display: none !important;
    }
    .mobile-nav-brand {
        display: none !important;
    }
}
