 :root { --primary: #ffffff; --primary-light: #f8f9fa; --primary-text: #1a1a1a; --accent: #e94560; --accent-hover: #c81d45; --gold: #d4a574; --text: #1a1a1a; --text-light: #6b7280; --bg: #fff; --bg-light: #f8f9fa; --border: #e5e7eb; --success: #10b981; --warning: #f59e0b; --error: #ef4444; --radius: 8px; --radius-lg: 12px; --shadow: 0 1px 3px rgba(0,0,0,.08); --shadow-lg: 0 10px 30px rgba(0,0,0,.1); --transition: all .3s ease; } * { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: var(--text); background: var(--bg); line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; padding-bottom: 70px; font-display: swap; } a, button, [role="button"], input[type="submit"] { touch-action: manipulation; } a { text-decoration: none; color: inherit; transition: var(--transition); } img { max-width: 100%; height: auto; display: block; } .mobile-section:not(:first-of-type), .mobile-product-section { content-visibility: auto; contain-intrinsic-size: 500px; } .mobile-hero, .mobile-footer, .mobile-bottom-nav, .mobile-search-bar { contain: layout style; } .container { width: 100%; padding: 0 12px; } /* ============================================ MOBILE HEADER ============================================ */ .mobile-header { position: sticky; top: 0; z-index: 1000; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.08); } .mobile-header-top { display: flex; align-items: center; justify-content: space-between; padding: 12px; background: #fff; color: var(--text); border-bottom: 1px solid var(--border); } .mobile-logo { font-size: 20px; font-weight: 800; color: var(--text); } .mobile-logo .accent { color: var(--accent); } .mobile-header-actions { display: flex; align-items: center; gap: 16px; } .mobile-header-btn { background: none; border: none; color: var(--text); font-size: 20px; cursor: pointer; padding: 4px; position: relative; } .mobile-cart-count { position: absolute; top: -6px; right: -6px; background: var(--accent); color: #fff; font-size: 10px; width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; } .mobile-search-bar { padding: 12px; background: #fff; border-bottom: 1px solid var(--border); } .mobile-search-form { display: flex; align-items: center; background: var(--bg-light); border-radius: 24px; overflow: hidden; padding: 0 12px; } .mobile-search-form input { flex: 1; border: none; background: transparent; padding: 10px 8px; font-size: 14px; outline: none; } .mobile-search-form button { background: none; border: none; color: var(--text-light); padding: 8px; cursor: pointer; } .mobile-nav { display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; background: #fff; border-bottom: 1px solid var(--border); padding: 0 12px; } .mobile-nav::-webkit-scrollbar { display: none; } .mobile-nav-item { flex-shrink: 0; padding: 12px 16px; font-size: 13px; font-weight: 500; color: var(--text); white-space: nowrap; border-bottom: 2px solid transparent; } .mobile-nav-item.active { color: var(--accent); border-bottom-color: var(--accent); } /* ============================================ MOBILE MAIN CONTENT ============================================ */ .mobile-main { width: 100%; padding: 0; min-height: calc(100vh - 200px); margin: 0; display: block; box-sizing: border-box; } .mobile-container { width: 100%; max-width: 100%; padding: 0 16px; margin: 0 auto; box-sizing: border-box; } /* ============================================ MOBILE HERO ============================================ */ .mobile-hero { background: linear-gradient(135deg, #f8f9fa, #e9ecef); color: var(--text); padding: 40px 16px; text-align: center; border-bottom: 1px solid var(--border); } .mobile-hero h1 { font-size: 28px; font-weight: 800; line-height: 1.2; margin-bottom: 12px; color: var(--text); } .mobile-hero h1 .accent { color: var(--accent); } .mobile-hero p { font-size: 14px; color: var(--text-light); margin-bottom: 20px; } .mobile-hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; } .mobile-hero-btn { display: inline-block; padding: 12px 24px; border-radius: 24px; font-size: 14px; font-weight: 600; } .mobile-hero-btn.primary { background: var(--accent); color: #fff; } .mobile-hero-btn.outline { background: transparent; border: 2px solid var(--accent); color: var(--accent); } /* ============================================ MOBILE SECTIONS ============================================ */ .mobile-section { padding: 32px 0; } .mobile-section-header { display: flex; align-items: center; justify-content: space-between; padding: 0 16px; margin-bottom: 16px; } .mobile-section-title { font-size: 20px; font-weight: 700; } .mobile-section-more { font-size: 13px; color: var(--accent); font-weight: 500; } /* ============================================ MOBILE PRODUCT GRID（行为驱动3行网格布局） ============================================ */ .mobile-product-section { padding: 20px 0; } .mobile-product-section .mobile-section-header { padding: 0 12px; margin-bottom: 12px; } .mobile-product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0 12px; } .mobile-product-scroll { display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; gap: 12px; padding: 0 16px; padding-bottom: 16px; } .mobile-product-scroll::-webkit-scrollbar { display: none; } .mobile-product-card { background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); display: flex; flex-direction: column; } .mobile-product-scroll .mobile-product-card { flex-shrink: 0; width: 160px; scroll-snap-align: start; } .mobile-product-image { position: relative; aspect-ratio: 1; background: var(--bg-light); overflow: hidden; } .mobile-product-image img { width: 100%; height: 100%; object-fit: cover; } .mobile-product-badge { position: absolute; top: 8px; left: 8px; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 700; background: var(--accent); color: #fff; } .mobile-product-badge.new { background: var(--success); } .mobile-product-info { padding: 10px; } .mobile-product-name { font-size: 12px; font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 6px; min-height: 32px; } .mobile-product-price { font-size: 14px; font-weight: 700; color: var(--accent); } .mobile-product-price .original { font-size: 11px; color: var(--text-light); text-decoration: line-through; margin-left: 4px; } .mobile-product-card-link { display: block; color: inherit; text-decoration: none; } .mobile-product-actions { display: flex; gap: 6px; padding: 0 8px 8px 8px; } .mbtn-add-cart, .mbtn-buy-now { flex: 1; padding: 7px 4px; border: none; border-radius: 4px; font-size: 11px; font-weight: 600; cursor: pointer; text-align: center; white-space: nowrap; transition: all 0.2s; } .mbtn-add-cart { background: var(--accent); color: #fff; } .mbtn-add-cart:active { background: var(--accent-hover); transform: scale(0.96); } .mbtn-buy-now { background: #1a1a1a; color: #fff; } .mbtn-buy-now:active { background: #333; transform: scale(0.96); } .mbtn-add-cart.loading, .mbtn-buy-now.loading { opacity: 0.7; pointer-events: none; } .mobile-product-btn { display: block; width: 100%; padding: 8px; margin-top: 8px; background: var(--accent); color: #fff; border: none; border-radius: 4px; font-size: 12px; font-weight: 600; cursor: pointer; text-align: center; } /* ============================================ MOBILE CATEGORIES ============================================ */ .mobile-category-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 0 16px; } .mobile-category-card { position: relative; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--bg-light); } .mobile-category-card img { width: 100%; height: 100%; object-fit: cover; } .mobile-category-name { position: absolute; bottom: 0; left: 0; right: 0; padding: 24px 12px 12px; background: linear-gradient(transparent, rgba(0,0,0,0.7)); color: #fff; font-size: 14px; font-weight: 600; } /* ============================================ MOBILE FOOTER ============================================ */ .mobile-footer { background: #f8f9fa; color: var(--text); padding: 32px 16px; margin-top: 40px; border-top: 1px solid var(--border); } .mobile-footer-section { margin-bottom: 24px; } .mobile-footer-title { font-size: 14px; font-weight: 700; margin-bottom: 12px; color: var(--text); } .mobile-footer-links { list-style: none; } .mobile-footer-links li { margin-bottom: 8px; } .mobile-footer-links a { font-size: 13px; color: var(--text-light); } .mobile-footer-links a:hover { color: var(--accent); } .mobile-footer-bottom { padding-top: 16px; border-top: 1px solid var(--border); text-align: center; } .mobile-footer-copyright { font-size: 12px; color: var(--text-light); } .mobile-footer-social { display: flex; justify-content: center; gap: 16px; margin-bottom: 16px; } .mobile-footer-social a { width: 40px; height: 40px; border-radius: 50%; background: var(--border); display: flex; align-items: center; justify-content: center; color: var(--text); font-size: 16px; } /* ============================================ MOBILE BOTTOM NAV ============================================ */ .mobile-bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; display: flex; justify-content: space-around; padding: 8px 0; box-shadow: 0 -2px 10px rgba(0,0,0,0.1); z-index: 1000; } .mobile-bottom-nav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text-light); font-size: 10px; padding: 4px 8px; } .mobile-bottom-nav-item i { font-size: 20px; } .mobile-bottom-nav-item.active { color: var(--accent); } /* ============================================ MOBILE CHAT WIDGET ============================================ */ .mobile-chat-widget { position: fixed; top: 50%; transform: translateY(-50%); right: 16px; z-index: 999; } .mobile-chat-btn { width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: #fff; border: none; font-size: 24px; cursor: pointer; box-shadow: 0 4px 12px rgba(233,69,96,0.4); display: flex; align-items: center; justify-content: center; } /* ============================================ TABLET STYLES (769px - 1024px) ============================================ */ @media only screen and (min-width: 769px) and (max-width: 1024px) { .container { max-width: 100%; padding: 0 24px; } .mobile-product-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } .mobile-product-scroll { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; overflow-x: visible; } .mobile-product-card { width: 100%; } .mobile-product-scroll .mobile-product-card { width: 100%; flex-shrink: 1; } .mobile-category-grid { grid-template-columns: repeat(3, 1fr); } .mobile-nav { justify-content: flex-start; padding: 0 24px; } .mobile-bottom-nav { display: none; } body { padding-bottom: 0; } .mobile-nav-item { font-size: 14px; padding: 14px 20px; } .mobile-product-btn { padding: 10px; font-size: 13px; } } /* ============================================ MOBILE UTILITIES ============================================ */ @media only screen and (max-width: 768px) { .hide-mobile { display: none !important; } .mobile-full { width: 100%; } .text-center-mobile { text-align: center; } .mb-mobile-0 { margin-bottom: 0 !important; } .mb-mobile-8 { margin-bottom: 8px !important; } .mb-mobile-16 { margin-bottom: 16px !important; } .mb-mobile-24 { margin-bottom: 24px !important; } .p-mobile-0 { padding: 0 !important; } .p-mobile-16 { padding: 16px !important; } } /* ============================================ MOBILE SIDEBAR MENU ============================================ */ .mobile-menu-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 2000; opacity: 0; display: none; transition: opacity 0.3s ease; } .mobile-menu-overlay.active { opacity: 1; } .mobile-sidebar { position: fixed; top: 0; left: -100%; width: 85%; max-width: 340px; height: 100%; background: #fff; z-index: 2100; display: flex; flex-direction: column; transition: left 0.3s ease; box-shadow: 4px 0 20px rgba(0,0,0,0.15); overflow: hidden; } .mobile-sidebar-header { display: flex; align-items: center; justify-content: space-between; padding: 20px; background: #fff; color: var(--text); border-bottom: 1px solid var(--border); } .mobile-sidebar-logo { font-size: 18px; font-weight: 800; color: var(--text); } .mobile-sidebar-logo .accent { color: var(--accent); } .mobile-sidebar-close { background: none; border: none; color: var(--text); font-size: 20px; cursor: pointer; padding: 4px; } .mobile-sidebar-content { flex: 1; overflow-y: auto; padding: 12px 0; } .mobile-sidebar-user { padding: 0 16px; margin-bottom: 16px; } .mobile-user-link { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--bg-light); border-radius: 8px; color: var(--text); font-weight: 500; font-size: 16px; } .mobile-user-link i { font-size: 24px; color: var(--accent); } .mobile-sidebar-section { padding: 0 16px; margin-bottom: 20px; } .mobile-sidebar-section-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-light); margin-bottom: 12px; padding-left: 8px; } .mobile-menu-tree { list-style: none; padding: 0; margin: 0; } .mobile-menu-item { position: relative; } .mobile-menu-link-wrapper { display: flex; align-items: center; } .mobile-menu-link-wrapper .mobile-menu-link { flex: 1; } .mobile-menu-expand-btn { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: none; background: transparent; color: var(--text-light); cursor: pointer; font-size: 12px; border-radius: 6px; transition: all 0.2s ease; flex-shrink: 0; margin-right: 8px; } .mobile-menu-expand-btn:hover { background: var(--bg-light); color: var(--accent); } .mobile-menu-expand-btn.expanded i { transform: rotate(180deg); } .mobile-menu-expand-btn i { transition: transform 0.3s ease; } .mobile-menu-link { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; color: var(--text); font-size: 15px; transition: background 0.2s ease; border-radius: 0; } .mobile-menu-link:hover { background: var(--bg-light); } .mobile-menu-link.active { background: rgba(233,69,96,0.1); color: var(--accent); } .mobile-menu-link i { font-size: 16px; margin-right: 12px; } .mobile-menu-arrow { font-size: 12px; color: var(--text-light); transition: transform 0.3s ease; } .mobile-menu-item.expanded > .mobile-menu-link-wrapper .mobile-menu-expand-btn i { transform: rotate(180deg); } .mobile-submenu { list-style: none; padding: 0; margin: 0; background: var(--bg-light); display: none; overflow: hidden; } .mobile-submenu.open { display: block; } .mobile-submenu .mobile-menu-link { padding-left: 40px; font-size: 14px; background: transparent; } .mobile-submenu .mobile-menu-link:hover { background: rgba(0,0,0,0.05); } .mobile-submenu-level3 { background: #fff; } .mobile-submenu-level3 .mobile-menu-link { padding-left: 64px; font-size: 13px; color: var(--text-light); } .mobile-sidebar-links { list-style: none; padding: 0; margin: 0; } .mobile-sidebar-links li { margin-bottom: 4px; } .mobile-sidebar-links a { display: flex; align-items: center; gap: 12px; padding: 10px 16px; color: var(--text); font-size: 14px; border-radius: 6px; transition: background 0.2s ease; } .mobile-sidebar-links a:hover { background: var(--bg-light); } .mobile-sidebar-links i { font-size: 14px; color: var(--text-light); } .mobile-menu-btn { background: none; border: none; color: var(--text); font-size: 20px; cursor: pointer; padding: 4px; margin-right: 8px; } 