/* =============================================
   移动端适配优化 - Mobile Responsive Optimization
   ============================================= */

/* ===== 通用移动端样式 ===== */
@media screen and (max-width: 768px) {
    /* 容器宽度自适应 */
    .elementor-section .elementor-container {
        max-width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* 文字大小调整 */
    h1, .elementor-heading-title {
        font-size: 28px !important;
        line-height: 1.3 !important;
    }

    h2, h2.elementor-heading-title {
        font-size: 24px !important;
    }

    h3, h3.elementor-heading-title {
        font-size: 20px !important;
    }

    p, .elementor-text-editor {
        font-size: 16px !important;
        line-height: 1.6 !important;
    }

    /* 按钮自适应 */
    .elementor-button {
        padding: 12px 24px !important;
        font-size: 14px !important;
    }

    /* 图片自适应 */
    img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* 移除固定高度 */
    .elementor-image img {
        height: auto !important;
    }

    /* 导航菜单优化 */
    .elementor-menu-toggle {
        display: block !important;
    }

    /* 表格横向滚动 */
    .elementor-table {
        overflow-x: auto !important;
        display: block !important;
    }

    /* 隐藏不必要的元素 */
    .elementor-hidden-mobile {
        display: none !important;
    }

    /* 列布局调整为单列 */
    .elementor-column {
        width: 100% !important;
        margin-bottom: 20px !important;
    }

    /* 产品卡片优化 */
    .product-card,
    .elementor-post,
    .elementor-product {
        margin-bottom: 20px !important;
    }
}

/* ===== 小屏幕手机 ===== */
@media screen and (max-width: 480px) {
    /* 更小的文字 */
    h1, .elementor-heading-title {
        font-size: 24px !important;
    }

    h2, h2.elementor-heading-title {
        font-size: 20px !important;
    }

    h3, h3.elementor-heading-title {
        font-size: 18px !important;
    }

    p, .elementor-text-editor {
        font-size: 14px !important;
    }

    /* 按钮全宽 */
    .elementor-button {
        width: 100% !important;
        text-align: center !important;
    }

    /* 减小间距 */
    .elementor-element {
        padding: 10px !important;
    }

    /* 轮播箭头位置调整 */
    .slick-arrow {
        width: 30px !important;
        height: 30px !important;
    }
}

/* ===== 平板端 ===== */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .elementor-section .elementor-container {
        max-width: 95% !important;
    }

    h1, .elementor-heading-title {
        font-size: 32px !important;
    }
}

/* ===== 触摸友好 ===== */
@media (hover: none) and (pointer: coarse) {
    /* 增大点击目标 */
    a, button, .elementor-button {
        min-height: 44px !important;
        min-width: 44px !important;
    }

    /* 移除悬停效果（触摸设备不需要） */
    a:hover {
        opacity: 0.9;
    }

    /* 滑块触摸优化 */
    .slick-slider {
        touch-action: pan-y !important;
    }
}

/* ===== 安全边距 ===== */
@media screen and (max-width: 768px) {
    body {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    /* 防止水平滚动 */
    html, body {
        overflow-x: hidden !important;
    }

    /* 修复可能溢出的容器 */
    .elementor-widget-container,
    .elementor-element {
        max-width: 100% !important;
        overflow: hidden !important;
    }
}
