/* 移动端修复样式 */

/* 基础移动端优化 */
@media (max-width: 768px) {
    /* 确保所有图片不会超出屏幕 */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Hero区域移动端修复 */
    .hero {
        min-height: 40vh !important;
        max-height: 70vh !important;
    }
    
    .hero[style*="aspect-ratio"] {
        max-height: 70vh !important;
        min-height: 200px !important;
    }
    
    /* 设置了宽高比的图片限制高度 */
    .product-img--ratio,
    .section-img--ratio {
        max-height: 70vh !important;
        width: 100% !important;
        object-fit: cover !important;
    }
    
    /* 容器优化 */
    .container {
        padding: 0 15px !important;
    }
    
    /* 产品区域优化 */
    .product-section {
        padding: 40px 0 !important;
    }
    
    .product-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}

/* 小屏手机优化 */
@media (max-width: 480px) {
    .hero {
        min-height: 35vh !important;
        max-height: 60vh !important;
    }
    
    .hero[style*="aspect-ratio"] {
        max-height: 60vh !important;
        min-height: 150px !important;
    }
    
    .product-img--ratio,
    .section-img--ratio {
        max-height: 60vh !important;
    }
    
    .container {
        padding: 0 10px !important;
    }
    
    .product-section {
        padding: 30px 0 !important;
    }
    
    /* 文字大小优化 */
    .hero__title {
        font-size: 1.5rem !important;
    }
    
    .hero__subtitle {
        font-size: 1rem !important;
    }
}

/* 超小屏幕优化 */
@media (max-width: 360px) {
    .hero {
        min-height: 30vh !important;
        max-height: 50vh !important;
    }
    
    .hero[style*="aspect-ratio"] {
        max-height: 50vh !important;
        min-height: 120px !important;
    }
    
    .product-img--ratio,
    .section-img--ratio {
        max-height: 50vh !important;
    }
    
    .container {
        padding: 0 8px !important;
    }
    
    .hero__title {
        font-size: 1.2rem !important;
    }
    
    .hero__subtitle {
        font-size: 0.9rem !important;
    }
}

/* 强制移动端样式 */
@media screen and (max-device-width: 768px) {
    img {
        max-width: 100% !important;
    }
    
    .hero[style*="aspect-ratio"] {
        max-height: 70vh !important;
    }
    
    .product-img--ratio,
    .section-img--ratio {
        max-height: 70vh !important;
    }
}

/* 横屏模式优化 */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 60vh !important;
        max-height: 80vh !important;
    }
    
    .hero[style*="aspect-ratio"] {
        max-height: 80vh !important;
    }
    
    .product-img--ratio,
    .section-img--ratio {
        max-height: 80vh !important;
    }
}
