/* ==================== 移动端响应式样式 ==================== */

/* 汉堡菜单按钮 */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s;
}
.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ==================== 平板 (<=1024px) ==================== */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .about-container {
        gap: 40px;
    }
    .hero-content {
        gap: 40px;
    }
    .hero-card-stack {
        width: 340px;
        height: 300px;
    }
    .hero-card {
        width: 260px;
        padding: 22px;
    }
    .advantage-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    /* 导航栏 */
    .navbar {
        padding: 0 16px;
        height: 56px;
        width: 100%;
    }
    .nav-logo {
        font-size: 15px;
        gap: 8px;
    }
    .nav-logo .logo-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
        border-radius: 8px;
    }
    .nav-toggle {
        display: flex;
        flex-shrink: 0;
    }
    .nav-links {
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 0 16px;
        gap: 0;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition: max-height 0.3s ease, opacity 0.3s ease, visibility 0.3s;
        z-index: 999;
    }
    .nav-links.open {
        max-height: calc(100vh - 56px);
        opacity: 1;
        visibility: visible;
        padding: 8px 16px 16px;
        overflow-y: auto;
    }
    .nav-links a {
        padding: 12px 16px;
        font-size: 15px;
        border-radius: 8px;
        width: 100%;
    }
    .nav-contact-btn {
        display: none;
    }

    /* 下拉菜单 - 手机端改为展开式 */
    .nav-dropdown {
        width: 100%;
        position: static;
    }
    .nav-dropdown .dropdown-menu {
        position: static !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0;
        opacity: 1 !important;
        visibility: visible !important;
        max-height: 0;
        overflow: hidden;
        min-width: 0;
        width: 100%;
        border-radius: 8px;
        transition: max-height 0.3s ease;
        background: #f9f9f9;
        display: block;
    }
    .nav-dropdown.open .dropdown-menu {
        max-height: 500px;
        margin-top: 4px;
    }
    .nav-dropdown:hover .dropdown-menu {
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }
    .nav-dropdown > a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }
    .nav-dropdown > a::after {
        content: '';
        width: 8px;
        height: 8px;
        border-right: 2px solid #999;
        border-bottom: 2px solid #999;
        transform: rotate(45deg);
        transition: transform 0.3s;
        flex-shrink: 0;
        margin-left: 8px;
    }
    .nav-dropdown.open > a::after {
        transform: rotate(-135deg);
    }
    .dropdown-menu a {
        display: block;
        padding: 11px 16px 11px 24px;
        font-size: 14px;
        color: #666;
        border-radius: 0;
        border-left: 3px solid transparent;
    }
    .dropdown-menu a:hover,
    .dropdown-menu a.active {
        color: #667eea;
        background: #f0f2ff;
        border-left-color: #667eea;
    }
    /* 360子菜单前加分隔线 */
    .dropdown-sub {
        width: 100%;
        border-top: 1px solid #f0f0f0;
        margin-top: 4px;
        padding-top: 4px;
        position: static;
    }

    /* 二级子菜单 - 手机端改为展开式 */
    .dropdown-sub-menu {
        position: static !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0;
        opacity: 1 !important;
        visibility: visible !important;
        max-height: 0;
        overflow: hidden;
        min-width: 0;
        width: 100%;
        border-radius: 8px;
        margin-left: 0;
        transition: max-height 0.3s ease;
        background: #f3f3f3;
        display: block;
    }
    .dropdown-sub.open .dropdown-sub-menu {
        max-height: 300px;
        margin-top: 4px;
    }
    .dropdown-sub:hover > .dropdown-sub-menu {
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }
    .dropdown-sub > a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }
    .dropdown-sub > a::after {
        content: '';
        width: 7px;
        height: 7px;
        border-right: 2px solid #bbb;
        border-bottom: 2px solid #bbb;
        transform: rotate(45deg);
        transition: transform 0.3s;
        flex-shrink: 0;
        margin-left: 8px;
        float: none;
    }
    .dropdown-sub.open > a::after {
        transform: rotate(-135deg);
    }
    .dropdown-sub-menu a {
        display: block;
        padding: 9px 16px 9px 40px;
        font-size: 13px;
        color: #888;
    }
    .dropdown-sub-menu a:hover,
    .dropdown-sub-menu a.active {
        color: #667eea;
        background: #f0f2ff;
    }
    .dropdown-sub-menu a::before {
        content: '';
        display: inline-block;
        width: 4px;
        height: 4px;
        background: #ccc;
        border-radius: 50%;
        margin-right: 10px;
        vertical-align: middle;
    }
    .dropdown-sub-menu a.active::before {
        background: #667eea;
    }

    /* Hero 区域 */
    #home {
        padding-top: 60px;
    }
    .hero-content {
        flex-direction: column;
        gap: 40px;
        padding: 40px 20px;
    }
    .hero-text h1 {
        font-size: 32px;
    }
    .hero-text p {
        font-size: 15px;
    }
    .hero-buttons {
        flex-direction: column;
        gap: 12px;
    }
    .btn-primary, .btn-outline {
        padding: 12px 24px;
        font-size: 15px;
        justify-content: center;
    }
    .hero-stats {
        gap: 20px;
        margin-top: 30px;
    }
    .stat-item .stat-num {
        font-size: 24px;
    }
    .hero-visual {
        display: none;
    }

    /* 公共模块 */
    .section {
        padding: 60px 20px;
    }
    .section-title h2 {
        font-size: 26px;
    }
    .section-desc {
        font-size: 14px;
        margin-bottom: 40px;
    }

    /* 产品卡片 */
    .products-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .product-card {
        padding: 24px 20px;
        position: relative;
    }
    .product-card::after {
        content: '点击查看详情 →';
        display: block;
        text-align: center;
        font-size: 12px;
        color: #999;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px dashed #eee;
    }

    /* 关于我们 */
    .about-container {
        flex-direction: column;
        gap: 30px;
    }
    .about-left h3 {
        font-size: 22px;
    }
    .about-left p {
        font-size: 14px;
    }
    .about-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-top: 24px;
    }
    .about-stat-card {
        padding: 18px;
    }
    .about-stat-card .num {
        font-size: 28px;
    }
    .advantages-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .advantage-card {
        padding: 20px 16px;
    }
    .advantage-card .icon {
        font-size: 28px;
    }
    .advantage-card h4 {
        font-size: 14px;
    }
    .advantage-card p {
        font-size: 12px;
    }

    /* 联系我们 */
    .contact-container {
        flex-direction: column;
        gap: 24px;
    }
    .contact-info h3 {
        font-size: 20px;
    }
    .contact-item {
        padding: 12px 0;
    }
    .contact-item .c-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    .map-link {
        padding: 10px 16px;
        font-size: 13px;
    }

    /* 地图卡片 */
    .contact-map {
        min-height: 300px;
    }
    .map-card {
        min-height: 300px;
        padding: 30px 20px;
    }
    .map-card h3 {
        font-size: 17px;
    }
    .map-buttons {
        flex-direction: column;
        gap: 10px;
    }
    .map-btn {
        padding: 10px 20px;
        font-size: 14px;
        justify-content: center;
    }

    /* 页脚 */
    .footer {
        padding: 40px 20px 24px;
    }
    .footer-content {
        flex-direction: column;
        gap: 30px;
    }
    .footer-brand h3 {
        font-size: 18px;
    }
    .footer-brand p {
        font-size: 13px;
    }
    .footer-links h4 {
        font-size: 14px;
        margin-bottom: 10px;
    }
    .footer-links a {
        font-size: 13px;
        padding: 3px 0;
    }
    .footer-bottom {
        font-size: 12px;
        white-space: normal;
        line-height: 1.8;
    }

    /* 浮动二维码 - 移动端改为底部固定栏 */
    .float-qr {
        position: fixed;
        right: auto;
        left: 0;
        right: 0;
        top: auto;
        bottom: 0;
        transform: none;
        width: 100%;
        border-radius: 16px 16px 0 0;
        padding: 14px 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 16px;
        text-align: center;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
        z-index: 998;
    }
    .float-qr.hidden {
        transform: translateY(100%);
    }
    .float-qr img {
        width: 100px;
        height: 100px;
        border-radius: 12px;
        flex-shrink: 0;
    }
    .float-qr-title {
        display: none;
    }
    .float-qr-tip {
        font-size: 13px;
        color: #888;
    }
    /* 移动端隐藏回到顶部按钮 */
    .back-to-top {
        display: none !important;
    }
    .back-to-top {
        right: 16px;
        bottom: 20px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    /* 产品详情页 */
    .product-hero {
        padding: 50px 20px;
    }
    .product-hero h1 {
        font-size: 28px;
    }
    .product-hero p {
        font-size: 15px;
    }
    .product-body {
        padding: 40px 20px 60px;
    }
    .product-section h2 {
        font-size: 20px;
    }
    .product-section p {
        font-size: 14px;
    }
    .advantage-grid {
        grid-template-columns: 1fr;
    }
    .advantage-item {
        padding: 20px;
    }
    .advantage-item h4 {
        font-size: 15px;
    }
    .advantage-item p {
        font-size: 13px;
    }
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    .pricing-card {
        padding: 24px;
    }
    .pricing-price {
        font-size: 32px;
    }
    .industry-tags {
        gap: 8px;
    }
    .industry-tags .tag {
        padding: 6px 14px;
        font-size: 13px;
    }
    .product-cta {
        padding: 30px 20px;
    }
    .product-cta h3 {
        font-size: 20px;
    }
}

/* ==================== 小手机 (<=480px) ==================== */
@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 26px;
    }
    .hero-stats {
        flex-wrap: wrap;
    }
    .stat-item {
        flex: 1;
        min-width: 80px;
    }
    .about-stats {
        grid-template-columns: 1fr 1fr;
    }
    .advantages-grid {
        grid-template-columns: 1fr;
    }
}
