/**
 * Mobile Optimized Styles - Compact Version
 * 手机端优化样式 - 紧凑版
 */

/* ============================================
   MOBILE BREAKPOINT
   手机端断点: max-width 768px
   ============================================ */

@media (max-width: 768px) {
    
    /* ----------------------------------------
       BASE STYLES
       基础样式
       ---------------------------------------- */
    html {
        font-size: 16px;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        position: relative !important;
    }
    
    body {
        width: 100% !important;
        max-width: 100% !important;
        padding-top: 48px !important;
        padding-bottom: 48px !important;
        font-size: 16px;
        line-height: 1.5;
        overflow-x: hidden !important;
        position: relative !important;
    }
    
    /* Prevent horizontal scroll */
    section, div, article, aside, header, footer, nav, main {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    section {
        overflow-x: hidden !important;
    }
    
    img, video, iframe, svg {
        max-width: 100% !important;
        height: auto !important;
    }
    
    .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
        max-width: 100% !important;
        width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    /* ----------------------------------------
       HIDE DESKTOP ELEMENTS
       隐藏桌面端元素
       ---------------------------------------- */
    .desktop-only,
    .animated-bg,
    .orb,
    .scroll-progress,
    .newsletter-popup,
    #newsletterTrigger {
        display: none !important;
    }
    
    /* ----------------------------------------
       SHOW MOBILE ELEMENTS
       显示手机端元素
       ---------------------------------------- */
    .show-mobile {
        display: flex !important;
    }
    
    /* ----------------------------------------
       FIXED TOP HEADER
       固定顶部导航
       ---------------------------------------- */
    .header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: 48px !important;
        background: rgba(10, 10, 15, 0.98) !important;
        backdrop-filter: blur(20px) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        z-index: 1000 !important;
        padding: 0 !important;
    }
    
    .header-inner {
        height: 48px !important;
        padding: 0 12px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    
    .logo {
        font-size: 16px !important;
        font-weight: 700;
    }
    
    .theme-toggle {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        width: 32px !important;
        height: 32px !important;
        font-size: 14px;
        order: 2;
    }
    
    .mobile-menu-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        background: transparent;
        border: none;
        color: var(--text-primary);
        font-size: 20px;
        cursor: pointer;
        order: 3;
    }
    
    .nav-links {
        position: fixed;
        top: 48px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 16px 12px;
        gap: 4px;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 999;
        display: flex;
    }
    
    .nav-links.mobile-open {
        transform: translateX(0);
    }
    
    .nav-links li {
        width: 100%;
    }
    
    .nav-links a {
        display: block;
        padding: 12px 16px;
        font-size: 16px;
        color: var(--text-primary);
        text-decoration: none;
        border-radius: 8px;
    }
    
    .nav-links a:active {
        background: rgba(255, 255, 255, 0.1);
    }
    
    /* ----------------------------------------
       FIXED BOTTOM NAVIGATION
       固定底部导航
       ---------------------------------------- */
    .mobile-bottom-nav {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: 48px !important;
        width: 100vw !important;
        max-width: 100vw !important;
        background: rgba(10, 10, 15, 0.98) !important;
        backdrop-filter: blur(20px) !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        z-index: 1000 !important;
        display: flex !important;
        justify-content: space-around;
        align-items: center;
        padding: 0;
        margin: 0;
    }
    
    .mobile-bottom-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1px;
        color: var(--text-muted);
        text-decoration: none;
        font-size: 9px;
        padding: 2px 0;
        border-radius: 6px;
        flex: 1;
        max-width: 70px;
        height: 40px;
    }
    
    .mobile-bottom-nav a .icon {
        font-size: 16px;
        line-height: 1;
    }
    
    .mobile-bottom-nav a.active,
    .mobile-bottom-nav a:active {
        color: var(--accent-cyan);
    }
    
    /* ----------------------------------------
       HERO SECTION
       首屏区域 - 紧凑
       ---------------------------------------- */
    .hero {
        padding: 16px 0 24px !important;
        min-height: auto !important;
    }
    
    .hero-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        width: 100% !important;
    }
    
    .hero-content {
        text-align: center;
        order: 2;
    }
    
    .hero-badge {
        display: inline-flex;
        font-size: 11px;
        padding: 4px 10px;
        margin-bottom: 12px;
    }
    
    .hero h1 {
        font-size: 24px !important;
        line-height: 1.3 !important;
        margin-bottom: 12px !important;
    }
    
    .hero-subtitle {
        font-size: 14px !important;
        line-height: 1.5 !important;
        margin-bottom: 16px !important;
    }
    
    .hero-buttons {
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    .hero-buttons .btn-primary,
    .hero-buttons .btn-secondary {
        width: 100% !important;
        justify-content: center;
        padding: 12px 20px;
        font-size: 14px;
        border-radius: 10px;
    }
    
    .hero-stats {
        display: flex;
        justify-content: center;
        gap: 24px;
        margin-top: 16px;
        padding-top: 16px;
        border-top: 1px solid var(--border);
    }
    
    .stat-number {
        font-size: 20px !important;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    .hero-visual {
        order: 1;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }
    
    .product-showcase {
        max-width: 280px !important;
        margin: 0 auto !important;
    }
    
    .product-ring {
        width: 200px !important;
        height: 200px !important;
    }
    
    .product-main {
        width: 140px !important;
        height: 180px !important;
    }
    
    .floating-tag {
        padding: 8px 12px !important;
        border-radius: 8px !important;
    }
    
    .floating-tag.tag-1 {
        top: 10% !important;
        left: 5% !important;
    }
    
    .floating-tag.tag-2 {
        bottom: 15% !important;
        right: 5% !important;
    }
    
    .floating-tag.tag-3 {
        top: 50% !important;
        left: 5% !important;
    }
    
    .floating-tag h4 {
        font-size: 9px !important;
    }
    
    .floating-tag p {
        font-size: 11px !important;
    }
    
    .hero-image {
        height: 160px !important;
        border-radius: 12px;
    }
    
    /* ----------------------------------------
       SECTIONS
       内容区块 - 超紧凑
       ---------------------------------------- */
    .section {
        padding: 16px 0 !important;
    }
    
    .section-header {
        margin-bottom: 12px !important;
        text-align: center;
    }
    
    .section-label {
        font-size: 10px !important;
        padding: 4px 10px !important;
        margin-bottom: 6px !important;
    }
    
    .section h2 {
        font-size: 18px !important;
        margin-bottom: 4px !important;
        line-height: 1.3 !important;
    }
    
    .section-header p {
        font-size: 12px !important;
        line-height: 1.4 !important;
    }
    
    /* ----------------------------------------
       PRODUCTS GRID
       产品网格
       ---------------------------------------- */
    .products-grid,
    .bento-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        grid-template-rows: auto !important;
        gap: 8px !important;
        width: 100% !important;
    }
    
    .product-card,
    .bento-item,
    .bento-item.large {
        border-radius: 8px;
        overflow: hidden;
        grid-column: span 1 !important;
        grid-row: span 1 !important;
        width: 100% !important;
        padding: 12px !important;
    }
    
    .product-image,
    .bento-item img {
        height: 100px !important;
        width: 100%;
        object-fit: cover;
    }
    
    .product-info,
    .bento-content {
        padding: 8px;
    }
    
    .bento-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 18px !important;
        border-radius: 8px !important;
        margin-bottom: 8px !important;
    }
    
    .product-info h3,
    .bento-item h3 {
        font-size: 12px !important;
        margin-bottom: 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .product-info p,
    .bento-item p {
        display: none;
    }
    
    .product-meta {
        display: flex;
        justify-content: space-between;
        font-size: 11px;
        color: var(--text-muted);
    }
    
    /* ----------------------------------------
       FEATURES
       优势特点
       ---------------------------------------- */
    .features-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        width: 100% !important;
    }
    
    .feature-card {
        padding: 12px 8px !important;
        text-align: center;
        border-radius: 8px;
    }
    
    .feature-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 18px;
        margin: 0 auto 8px;
    }
    
    .feature-card h3 {
        font-size: 12px !important;
        margin-bottom: 2px;
    }
    
    .feature-card p {
        display: none;
    }
    
    /* ----------------------------------------
       TIMELINE
       流程步骤 - 横向滚动
       ---------------------------------------- */
    .timeline {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        padding: 4px 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .timeline::-webkit-scrollbar {
        display: none;
    }
    
    .timeline::before {
        display: none !important;
    }
    
    .timeline-item {
        position: relative;
        padding: 10px 8px !important;
        background: var(--bg-card);
        border-radius: 8px;
        border: 1px solid var(--border);
        min-width: 100px !important;
        max-width: 120px !important;
        flex: 0 0 auto !important;
        text-align: center !important;
    }
    
    .timeline-item::before {
        display: none !important;
    }
    
    .timeline-item h4 {
        font-size: 11px !important;
        margin-bottom: 2px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }
    
    .timeline-item h4::before {
        content: attr(data-step);
        width: 20px;
        height: 20px;
        background: var(--accent-cyan);
        color: var(--bg-primary);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 10px;
        font-weight: 700;
    }
    
    .timeline-item p {
        font-size: 9px;
        color: var(--text-muted);
        line-height: 1.3;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* ----------------------------------------
       CALCULATOR
       报价计算器 - 超紧凑布局
       ---------------------------------------- */
    .calculator-section {
        padding: 16px 0 !important;
    }
    
    .calculator-container {
        padding: 16px 12px !important;
        border-radius: 12px;
        margin: 0 !important;
    }
    
    .calculator-title {
        margin-bottom: 12px !important;
    }
    
    .calculator-title h3 {
        font-size: 16px !important;
        margin-bottom: 2px !important;
    }
    
    .calculator-title p {
        font-size: 11px !important;
    }
    
    .calculator-form {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
        margin-bottom: 12px !important;
    }
    
    .calculator-select {
        padding: 10px 12px !important;
        font-size: 13px !important;
        border-radius: 8px !important;
    }
    
    /* Inner Dimensions - Mobile Compact */
    .calculator-dimensions {
        padding: 12px !important;
        margin-bottom: 12px !important;
        border-radius: 10px !important;
    }
    
    .dimensions-title {
        font-size: 12px !important;
        margin-bottom: 10px !important;
    }
    
    .dimensions-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    
    .dimension-input-group {
        gap: 2px !important;
    }
    
    .dimension-input-group label {
        font-size: 10px !important;
    }
    
    .dimension-input {
        padding: 8px 28px 8px 10px !important;
        font-size: 13px !important;
        border-radius: 6px !important;
    }
    
    .dimension-unit {
        right: 8px !important;
        font-size: 10px !important;
    }
    
    .dimension-select {
        padding: 8px 10px !important;
        font-size: 12px !important;
        border-radius: 6px !important;
    }
    
    .calculator-result {
        margin-top: 12px !important;
        padding: 12px !important;
        border-radius: 10px !important;
    }
    
    .calculator-result h4 {
        font-size: 12px !important;
        margin-bottom: 4px !important;
    }
    
    .calculator-result .price {
        font-size: 28px !important;
    }
    
    .calculator-result p {
        font-size: 10px !important;
    }
    
    /* ----------------------------------------
       CONTACT FORM
       联系表单
       ---------------------------------------- */
    .contact-section {
        padding: 20px 0 !important;
    }
    
    .contact-form {
        padding: 16px 12px !important;
        border-radius: 12px;
    }
    
    .contact-form h2 {
        font-size: 18px !important;
        margin-bottom: 4px !important;
    }
    
    .form-row {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    
    .form-group.full-width {
        grid-column: span 1 !important;
    }
    
    .submit-btn {
        width: 100% !important;
        padding: 12px 20px;
        font-size: 14px;
        border-radius: 10px;
    }
    
    /* ----------------------------------------
       CHAT WIDGET & FAB
       聊天组件和浮动按钮
       ---------------------------------------- */
    .chat-widget,
    .chat-btn,
    .chat-panel,
    .fab,
    .fab-btn {
        display: none !important;
    }
    
    /* ----------------------------------------
       FOOTER
       页脚
       ---------------------------------------- */
    .footer {
        display: none !important;
    }
    
    /* ----------------------------------------
       CTA SECTION - 超紧凑
       ---------------------------------------- */
    .cta-section {
        padding: 32px 0 !important;
        overflow: hidden !important;
    }
    
    .cta-section::before {
        width: 300px !important;
        height: 300px !important;
    }
    
    .cta-section h2 {
        font-size: 20px !important;
        margin-bottom: 8px !important;
    }
    
    .cta-section p {
        font-size: 13px !important;
        margin-bottom: 16px !important;
    }
    
    .cta-btn-large {
        padding: 12px 24px !important;
        font-size: 14px !important;
    }
    
    /* ----------------------------------------
       PROCESS SECTION - 超紧凑
       ---------------------------------------- */
    .process-section {
        padding: 16px 0 !important;
    }
    
    /* ----------------------------------------
       PRODUCTS SECTION - 超紧凑
       ---------------------------------------- */
    .products-section {
        padding: 16px 0 !important;
    }
    
    /* ----------------------------------------
       FEATURES SECTION - 超紧凑
       ---------------------------------------- */
    #features {
        padding: 16px 0 !important;
    }
    
    /* ----------------------------------------
       CONTACT SECTION - 超紧凑
       ---------------------------------------- */
    #contact {
        padding: 16px 0 !important;
    }
    
    /* ----------------------------------------
       TRUST SECTION - 超紧凑
       ---------------------------------------- */
    .trust-section {
        padding: 10px 0 !important;
    }
    
    .trust-content {
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    .trust-text {
        font-size: 12px !important;
    }
    
    .trust-logos {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 8px !important;
        width: 100% !important;
    }
    
    .trust-logo {
        font-size: 10px !important;
        flex: 0 0 auto !important;
    }
}

/* ============================================
   EXTRA SMALL DEVICES
   超小屏幕
   ============================================ */

@media (max-width: 480px) {
    .hero h1 {
        font-size: 22px !important;
    }
    
    .section h2 {
        font-size: 18px !important;
    }
    
    .stat-number {
        font-size: 18px !important;
    }
    
    .price-display {
        font-size: 22px !important;
    }
}

/* ============================================
   HIDE ON DESKTOP
   桌面端隐藏
   ============================================ */

@media (min-width: 769px) {
    .show-mobile,
    .mobile-bottom-nav,
    .mobile-menu-btn {
        display: none !important;
    }
}
