/* ========== 移动端头部适配样式（仅在小于1200px时生效） ========== */

/* 大屏幕下隐藏移动端元素 - 确保PC端不受影响 */
@media (min-width: 1201px) {
    .mobile-menu-btn,
    .mobile-left-section,
    .mobile-logo-link,
    .mobile-logo,
    .nav-right,
    .nav-menu-mobile,
    .search-box-mobile,
    .overlay {
        display: none !important;
    }
}

/* 移动端样式 */
@media (max-width: 1200px) {
    /* 头部容器调整 - 左侧：菜单+logo，右侧：搜索等 */
    .header .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 15px;
        position: relative;
        width: 100%;
        box-sizing: border-box;
        height: 60px;
    }

    /* 隐藏PC端导航 */
    .nav {
        display: none;
    }

    /* 移动端左侧：菜单按钮 + logo */
    .mobile-left-section {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    /* Logo样式 */
    .mobile-logo {
        width: 70px;
        height: auto;
        display: block;
    }

    .mobile-logo-link {
        display: block;
        line-height: 1;
    }

    /* 汉堡菜单按钮 */
    .mobile-menu-btn {
        width: 28px;
        height: 20px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        cursor: pointer;
        z-index: 200;
        position: relative;
        flex-shrink: 0;
    }

    .mobile-menu-btn span {
        display: block;
        width: 100%;
        height: 3px;
        background: #333;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    /* 移动端右侧区域 */
    .nav-right {
        display: flex;
        align-items: center;
        gap: 10px;
        position: relative;
        flex-shrink: 0;
    }

    .search-icon-mobile {
        width: 20px;
        height: 20px;
        cursor: pointer;
    }

    .tel-link-mobile {
        display: flex;
        align-items: center;
        gap: 3px;
        text-decoration: none;
    }

    .tel-icon-mobile {
        width: 18px;
        height: 18px;
    }

    .tel-text-mobile {
        font-size: 11px;
        color: #333;
        font-weight: 500;
        white-space: nowrap;
    }

    .back-mobile {
        font-size: 11px;
        color: #fff;
        background: #cd1e1e;
        padding: 5px 10px;
        border-radius: 4px;
        white-space: nowrap;
    }

    /* 遮罩层 */
    .overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 150;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .overlay.show {
        opacity: 1;
        visibility: visible;
    }

    /* 移动端导航菜单 */
    .nav-menu-mobile {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        max-width: 320px;
        height: 100%;
        background: #fff;
        z-index: 200;
        overflow-y: auto;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        display: block;
    }

    .nav-menu-mobile.show {
        left: 0;
    }

    /* 菜单头部 */
    .menu-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 15px 20px;
        border-bottom: 1px solid #eee;
        background: #f9f9f9;
    }

    .menu-logo {
        width: 80px;
        height: auto;
    }

    .menu-close {
        font-size: 32px;
        color: #666;
        cursor: pointer;
        line-height: 1;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* 菜单列表 */
    .menu-list {
        padding: 0;
        margin: 0;
        background: #fff;
    }

    .menu-item {
        border-bottom: 1px solid #f0f0f0;
    }

    .menu-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 15px 20px;
        font-size: 16px;
        color: #333;
        font-weight: 500;
    }

    .menu-arrow {
        font-size: 16px;
        color: #999;
        transition: transform 0.3s ease;
        padding: 10px 15px;
        margin: -10px -15px;
        cursor: pointer;
        display: inline-block;
    }

    .menu-item.has-submenu.open .menu-arrow {
        transform: rotate(180deg);
    }

    /* 子菜单 */
    .submenu {
        display: none;
        background: #f8f8f8;
        padding: 0;
        margin: 0;
    }

    .menu-item.has-submenu.open .submenu {
        display: block;
    }

    .submenu-title {
        padding: 12px 20px 8px 30px;
        font-size: 14px;
        color: #BD0F0F;
        font-weight: 600;
    }

    .submenu li {
        padding: 0;
    }

    .submenu li a {
        display: block;
        padding: 10px 20px 10px 40px;
        font-size: 14px;
        color: #666;
    }

    /* 联系方式 */
    .menu-contact {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 20px;
        background: #f5f5f5;
        border-bottom: none;
    }

    .menu-contact img {
        width: 20px;
        height: 20px;
        display: inline-block;
    }

    .menu-contact span {
        font-size: 18px;
        color: #BD0F0F;
        font-weight: 600;
    }

    /* 移动端搜索弹框 */
    .search-box-mobile {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #fff;
        z-index: 300;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        display: block;
    }

    .search-box-mobile.show {
        transform: translateY(0);
    }

    .search-header {
        display: flex;
        justify-content: flex-end;
        padding: 15px 20px;
        border-bottom: 1px solid #eee;
    }

    .search-close {
        font-size: 36px;
        color: #666;
        cursor: pointer;
        line-height: 1;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .search-content {
        display: flex;
        gap: 10px;
        padding: 20px;
    }

    .search-content input {
        flex: 1;
        height: 45px;
        padding: 0 15px;
        border: 1px solid #ddd;
        border-radius: 8px;
        font-size: 15px;
        outline: none;
    }

    .search-btn {
        width: 80px;
        height: 45px;
        background: #BD0F0F;
        color: #fff;
        border: none;
        border-radius: 8px;
        font-size: 15px;
        cursor: pointer;
    }

    .search-suggest {
        padding: 0 20px;
    }

    .search-suggest h3 {
        font-size: 16px;
        color: #333;
        margin-bottom: 15px;
        padding-left: 5px;
        border-left: 3px solid #BD0F0F;
    }

    .search-suggest ul {
        padding: 0;
        margin: 0;
    }

    .search-suggest li {
        margin-bottom: 12px;
    }

    .search-suggest li a {
        display: block;
        padding: 10px 15px;
        background: #f8f8f8;
        border-radius: 6px;
        font-size: 14px;
        color: #666;
    }
}
