/* ============================================================
   顺嘉养老维修 + 新零售商城 - 全局样式 v2.0
   完美UI前端 | 响应式设计 | 动画增强
   ============================================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', sans-serif;
    line-height: 1.6; color: #333; background: #f0f2f5;
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; transition: all 0.25s; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
input, select, textarea, button { font-family: inherit; }

/* ---------- Container ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c0c4cc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #909399; }

/* ============================================================
   HEADER & NAVIGATION
   ============================================================ */
.header {
    background: linear-gradient(135deg, #1565c0, #0d47a1);
    color: #fff; position: sticky; top: 0; z-index: 1000;
    box-shadow: 0 2px 24px rgba(21,101,192,0.25);
    backdrop-filter: blur(10px);
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 0; min-height: 56px; gap: 10px;
}
.header .logo { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 8px; letter-spacing: 0.5px; flex-shrink: 0; }
.header .logo img { height: 36px; }
.header .logo span { letter-spacing: 1px; white-space: nowrap; }
.header-inner > .nav { display: flex; gap: 2px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.header-inner > .nav a {
    padding: 7px 13px; border-radius: 20px; font-size: 13px;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1); white-space: nowrap;
    font-weight: 500;
}
.header-inner > .nav a:hover, .header-inner > .nav a.active { background: rgba(255,255,255,0.18); transform: translateY(-1px); }
.header-inner > .nav .btn-mall { background: #ff6b35; color: #fff; font-weight: 700; padding: 8px 18px; box-shadow: 0 2px 12px rgba(255,107,53,0.4); font-size: 14px; animation: pulse-btn-mall 2.5s infinite; }
@keyframes pulse-btn-mall {
    0%, 100% { box-shadow: 0 2px 12px rgba(255,107,53,0.4); }
    50% { box-shadow: 0 4px 22px rgba(255,107,53,0.7); }
}
.header-inner > .nav .btn-mall:hover { background: #e85a2b; transform: translateY(-2px); box-shadow: 0 4px 18px rgba(255,107,53,0.5); }

/* Dropdown Menu - 注册下拉 */
.nav-dropdown { position: relative; display: inline-flex; align-items: center; }
.nav-dropdown .dropdown-toggle { cursor: pointer; }
.nav-dropdown .dropdown-toggle::after {
    content: ' ▾';
    font-size: 10px;
    vertical-align: middle;
    opacity: 0.7;
}
.nav-dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.18);
    min-width: 150px;
    z-index: 1000;
    padding: 6px 0;
    margin-top: 8px;
    animation: dropFadeIn 0.2s ease;
}
@keyframes dropFadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.nav-dropdown .dropdown-menu a {
    display: block;
    padding: 10px 18px;
    color: #333 !important;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
    background: transparent !important;
    border-radius: 0 !important;
}
.nav-dropdown .dropdown-menu a:hover {
    background: #f0f4ff !important;
    color: #1565c0 !important;
}
/* 桌面端 hover 显示下拉 */
@media (min-width: 769px) {
    .nav-dropdown:hover .dropdown-menu { display: block; }
}
/* 移动端 click 切换由 JS 处理 */

/* Mobile Menu */
.menu-toggle { display: none; font-size: 24px; cursor: pointer; background: none; border: none; color: #fff; padding: 6px; line-height: 1; border-radius: 6px; }
.menu-toggle:active { background: rgba(255,255,255,0.15); }

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff; padding: 70px 0 60px; text-align: center;
    position: relative; overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero::after {
    content: ''; position: absolute; bottom: -40px; left: 50%; transform: translateX(-50%);
    width: 120%; height: 80px; background: #f0f2f5; border-radius: 50% 50% 0 0;
}
.hero h1 { font-size: 2.5rem; margin-bottom: 16px; position: relative; font-weight: 800; text-shadow: 0 2px 10px rgba(0,0,0,0.15); }
.hero p { font-size: 1.1rem; opacity: 0.92; position: relative; max-width: 750px; margin: 0 auto 30px; line-height: 1.8; }
.hero-buttons { position: relative; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Buttons */
.btn-primary {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 14px 36px; background: #fff; color: #667eea;
    border-radius: 30px; font-weight: 700; font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 36px rgba(0,0,0,0.2); }
.btn-outline {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 14px 36px; border: 2px solid #fff; color: #fff;
    border-radius: 30px; font-weight: 700; font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    backdrop-filter: blur(4px);
}
.btn-outline:hover { background: #fff; color: #667eea; transform: translateY(-2px); }

/* ============================================================
   SECTIONS (通用)
   ============================================================ */
.section { padding: 60px 0; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: 2rem; color: #1a1a2e; margin-bottom: 10px; font-weight: 700; position: relative; display: inline-block; }
.section-title h2::after {
    content: ''; position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%);
    width: 50px; height: 3px; background: linear-gradient(90deg, #ff6b35, #667eea);
    border-radius: 3px;
}
.section-title p { color: #666; font-size: 15px; margin-top: 15px; }

/* ============================================================
   SERVICE CARDS
   ============================================================ */
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.service-card {
    background: #fff; border-radius: 18px; padding: 28px 18px; text-align: center;
    box-shadow: 0 2px 16px rgba(0,0,0,0.04); transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
    cursor: pointer; border: 1px solid transparent; position: relative; overflow: hidden;
}
.service-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2); transform: scaleX(0);
    transition: transform 0.35s ease;
}
.service-card:hover::before { transform: scaleX(1); }
.service-card:hover { transform: translateY(-6px); box-shadow: 0 12px 40px rgba(0,0,0,0.1); border-color: #e0e0e0; }
.service-card .icon { width: 72px; height: 72px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; font-size: 34px; transition: transform 0.3s; }
.service-card:hover .icon { transform: scale(1.1); }
.service-card h3 { font-size: 16px; margin-bottom: 8px; color: #1a1a2e; font-weight: 600; }
.service-card p { font-size: 13px; color: #888; line-height: 1.6; }

/* Service icon colors */
.service-card:nth-child(1) .icon { background: #e3f2fd; }
.service-card:nth-child(2) .icon { background: #fce4ec; }
.service-card:nth-child(3) .icon { background: #fff3e0; }
.service-card:nth-child(4) .icon { background: #e8f5e9; }
.service-card:nth-child(5) .icon { background: #f3e5f5; }
.service-card:nth-child(6) .icon { background: #e0f7fa; }
.service-card:nth-child(7) .icon { background: #fff8e1; }
.service-card:nth-child(8) .icon { background: #fbe9e7; }
.service-card:nth-child(9) .icon { background: #e8eaf6; }
.service-card:nth-child(10) .icon { background: #fce4ec; }

/* ============================================================
   GALLERY
   ============================================================ */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.gallery-item {
    border-radius: 14px; overflow: hidden; cursor: pointer;
    position: relative; aspect-ratio: 4/3;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.4,0,0.2,1); }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item .overlay {
    position: absolute; inset: 0; background: rgba(0,0,0,0.45);
    opacity: 0; transition: opacity 0.35s;
    display: flex; align-items: center; justify-content: center;
}
.gallery-item:hover .overlay { opacity: 1; }
.gallery-item .overlay span { color: #fff; font-size: 24px; font-weight: 500; }
.gallery-item.zoomed { position: fixed; inset: 30px; z-index: 9999; aspect-ratio: auto; background: rgba(0,0,0,0.95); display: flex; align-items: center; justify-content: center; border-radius: 0; }
.gallery-item.zoomed img { object-fit: contain; max-width: 90vw; max-height: 90vh; }

/* ============================================================
   VIDEO SECTION
   ============================================================ */
.video-section { background: linear-gradient(135deg, #1a1a2e, #16213e); color: #fff; }
.video-section .section-title h2 { color: #fff; }
.video-section .section-title h2::after { background: linear-gradient(90deg, #ff6b35, #ff9800); }
.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 30px; }
.video-card {
    background: #2a2a3e; border-radius: 18px; overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.video-card:hover { transform: translateY(-5px); box-shadow: 0 12px 36px rgba(0,0,0,0.4); }
.video-card video { width: 100%; display: block; background: #000; }
.video-card .info { padding: 20px 22px; }
.video-card .info h3 { margin-bottom: 6px; font-size: 17px; }
.video-card .info p { font-size: 13px; color: #aaa; }

/* ============================================================
   TRUST & FAQ
   ============================================================ */
.trust-section { background: #fff; padding: 55px 0; }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.trust-item { padding: 24px; transition: transform 0.3s; }
.trust-item:hover { transform: translateY(-4px); }
.trust-item .num { font-size: 38px; font-weight: 800; background: linear-gradient(135deg, #667eea, #764ba2); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.trust-item .label { font-size: 14px; color: #888; margin-top: 6px; }

.faq-item {
    background: #fff; border-radius: 14px; padding: 20px 22px;
    margin-bottom: 10px; cursor: pointer;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
    transition: all 0.3s;
}
.faq-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.faq-item .question { font-weight: 700; font-size: 16px; display: flex; justify-content: space-between; align-items: center; }
.faq-item .question .arrow { font-size: 20px; transition: transform 0.3s; color: #667eea; }
.faq-item.open .question .arrow { transform: rotate(45deg); }
.faq-item .answer { margin-top: 12px; font-size: 14px; color: #666; line-height: 1.8; display: none; }
.faq-item.open .answer { display: block; animation: fadeInDown 0.3s ease; }

@keyframes fadeInDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   CONTACT BAR
   ============================================================ */
.contact-bar {
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    color: #fff; padding: 36px 30px; border-radius: 18px;
    text-align: center; margin-top: 40px;
    box-shadow: 0 8px 32px rgba(26,115,232,0.3);
}
.contact-bar h3 { font-size: 22px; margin-bottom: 8px; }
.contact-bar .phone { font-size: 34px; font-weight: 800; letter-spacing: 2px; margin: 12px 0; }
.contact-bar p { opacity: 0.9; font-size: 14px; }

/* ============================================================
   MERCHANT SECTION (附近多商家折叠展示)
   ============================================================ */
.merchant-section { background: #fff; }
.merchant-grid-wrap { display: flex; flex-direction: column; gap: 10px; max-width: 800px; margin: 0 auto; }
.merchant-row {
    background: #fff; border: 1px solid #e8e8e8; border-radius: 14px;
    overflow: hidden; transition: all 0.3s; box-shadow: 0 1px 6px rgba(0,0,0,0.03);
}
.merchant-row:hover { border-color: #667eea; box-shadow: 0 4px 16px rgba(102,126,234,0.1); }
.merchant-row-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; cursor: pointer; transition: background 0.2s;
    gap: 12px; flex-wrap: wrap;
}
.merchant-row-header:hover { background: #f8f9ff; }
.merchant-row-header .merchant-name { font-weight: 700; font-size: 16px; color: #1a1a2e; display: flex; align-items: center; gap: 8px; }
.merchant-row-header .merchant-name .m-icon {
    width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px;
}
.merchant-row-header .merchant-info { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.merchant-row-header .merchant-info span { font-size: 13px; color: #666; display: flex; align-items: center; gap: 4px; }
.merchant-row-header .toggle-icon { font-size: 20px; color: #999; transition: transform 0.3s; }
.merchant-row.open .merchant-row-header .toggle-icon { transform: rotate(180deg); }
.merchant-row-body {
    max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 20px; border-top: 0px solid transparent; transition: all 0.4s ease;
}
.merchant-row.open .merchant-row-body { max-height: 300px; padding: 15px 20px; border-top: 1px solid #f0f0f0; }
.merchant-row-body p { font-size: 13px; color: #666; line-height: 1.8; }
.merchant-row-body .m-actions { margin-top: 10px; display: flex; gap: 10px; flex-wrap: wrap; }
.merchant-row-body .m-actions a {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 8px 16px; border-radius: 20px; font-size: 13px;
    background: #f0f2f5; color: #555; transition: all 0.3s;
}
.merchant-row-body .m-actions a:hover { background: #667eea; color: #fff; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: #1a1a2e; color: #ccc; padding: 40px 0 20px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; margin-bottom: 30px; }
.footer h4 { color: #fff; margin-bottom: 15px; font-size: 16px; font-weight: 700; }
.footer p, .footer a { font-size: 13px; color: #999; line-height: 2; }
.footer a:hover { color: #fff; }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid #2a2a3e; font-size: 12px; color: #666; }

/* ============================================================
   MALL STYLES (新零售商城)
   ============================================================ */

/* Mall Top Bar */
.mall-topbar { background: #1a1a2e; padding: 8px 0; border-bottom: 1px solid #2a2a3e; font-size: 36px; color: #ccc; }
.mall-topbar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; }
.mall-topbar a { color: #ddd; margin-left: 12px; font-weight: 700; transition: color 0.25s; font-size: 26px; }
.mall-topbar a:hover { color: #ff6b35; }
.mall-topbar span { color: #aaa; font-size: 26px; font-weight: 700; }

/* Mall Header */
.mall-header { background: #fff; padding: 12px 0; box-shadow: 0 2px 16px rgba(0,0,0,0.06); position: sticky; top: 0; z-index: 999; }
.mall-header .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mall-search { display: flex; flex: 1; max-width: 480px; margin: 0 15px; min-width: 200px; }
.mall-search input {
    flex: 1; padding: 10px 18px; border: 2px solid #ff6b35; border-right: none;
    border-radius: 25px 0 0 25px; font-size: 14px; outline: none;
    transition: border-color 0.3s; min-width: 0;
}
.mall-search input:focus { border-color: #e85a2b; }
.mall-search button {
    padding: 10px 22px; background: #ff6b35; color: #fff; border: none;
    border-radius: 0 25px 25px 0; cursor: pointer; font-size: 14px; font-weight: 700;
    transition: background 0.3s; white-space: nowrap;
}
.mall-search button:hover { background: #e85a2b; }
.mall-cart { position: relative; font-size: 24px; color: #333; transition: color 0.3s; flex-shrink: 0; }
.mall-cart:hover { color: #ff6b35; }
.mall-cart .badge {
    position: absolute; top: -8px; right: -10px; background: #ff6b35; color: #fff;
    font-size: 11px; min-width: 20px; height: 20px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; font-weight: 700;
    box-shadow: 0 2px 8px rgba(255,107,53,0.4);
}

/* Category Nav */
.cat-nav { background: #fff; padding: 0; border-bottom: 1px solid #f0f0f0; position: sticky; top: 56px; z-index: 98; }
.cat-nav .container { display: flex; gap: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cat-nav a {
    padding: 14px 22px; font-size: 14px; color: #555; white-space: nowrap;
    border-bottom: 2px solid transparent; transition: all 0.3s; font-weight: 600;
}
.cat-nav a:hover, .cat-nav a.active { color: #ff6b35; border-bottom-color: #ff6b35; font-weight: 700; }

/* Partner Banner */
.partner-banner {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff; padding: 24px 30px; border-radius: 18px; text-align: center;
    margin-bottom: 25px; box-shadow: 0 6px 24px rgba(240,147,251,0.3);
    animation: pulse-border 2s infinite;
}
@keyframes pulse-border { 0%,100% { box-shadow: 0 6px 24px rgba(240,147,251,0.3); } 50% { box-shadow: 0 6px 36px rgba(240,147,251,0.5); } }
.partner-banner h3 { font-size: 22px; margin-bottom: 8px; font-weight: 800; }
.partner-banner p { opacity: 0.95; font-size: 15px; font-weight: 500; }

/* Banner Slider */
.banner-slider {
    background: linear-gradient(135deg, #ff6b35 0%, #f5576c 50%, #764ba2 100%);
    color: #fff; padding: 50px 0; text-align: center;
    border-radius: 0 0 30px 30px; margin-bottom: 0;
    position: relative; overflow: hidden;
}
.banner-slider::before {
    content: ''; position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Ccircle cx='30' cy='30' r='2' fill='white' opacity='0.1'/%3E%3Ccircle cx='15' cy='15' r='1' fill='white' opacity='0.08'/%3E%3Ccircle cx='45' cy='45' r='1.5' fill='white' opacity='0.08'/%3E%3C/g%3E%3C/svg%3E");
}
.banner-slider h1 { font-size: 2.4rem; margin-bottom: 10px; font-weight: 800; position: relative; text-shadow: 0 2px 12px rgba(0,0,0,0.2); letter-spacing: 1px; }
.banner-slider p { font-size: 1.1rem; opacity: 0.95; position: relative; font-weight: 500; }
.banner-cards { display: flex; gap: 16px; justify-content: center; margin-top: -35px; position: relative; z-index: 10; flex-wrap: wrap; padding: 0 15px; }
.banner-card {
    background: #fff; border-radius: 16px; padding: 24px 24px;
    box-shadow: 0 10px 36px rgba(0,0,0,0.1); text-align: center;
    flex: 1; min-width: 180px; max-width: 280px;
    transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
    border: 1px solid #f0f0f0;
}
.banner-card:hover { transform: translateY(-6px); box-shadow: 0 16px 48px rgba(0,0,0,0.15); border-color: #ff6b35; }
.banner-card .icon { font-size: 42px; margin-bottom: 12px; }
.banner-card h4 { font-size: 16px; margin-bottom: 6px; color: #1a1a2e; font-weight: 700; }
.banner-card p { font-size: 13px; color: #888; line-height: 1.6; font-weight: 500; }

/* Product Grid */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card {
    background: #fff; border-radius: 14px; overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4,0,0.2,1); cursor: pointer;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04); border: 1px solid #f0f0f0;
}
.product-card:hover { transform: translateY(-5px); box-shadow: 0 12px 36px rgba(0,0,0,0.1); border-color: #ff6b35; }
.product-card .img-box { position: relative; overflow: hidden; aspect-ratio: 1; background: #f8f8f8; }
.product-card .img-box img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.55s cubic-bezier(0.4,0,0.2,1); }
.product-card:hover .img-box img { transform: scale(1.06); }
.product-card .img-box .tag {
    position: absolute; top: 8px; left: 8px; padding: 4px 12px;
    background: linear-gradient(135deg, #ff6b35, #f5576c); color: #fff;
    border-radius: 12px; font-size: 11px; font-weight: 700;
}
.product-card .info { padding: 14px 15px; }
.product-card .name { font-size: 15px; font-weight: 600; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.5; color: #1a1a2e; }
.product-card .price { color: #ff3b30; font-size: 20px; font-weight: 800; letter-spacing: -0.5px; }
.product-card .price .original { color: #aaa; font-size: 12px; text-decoration: line-through; margin-left: 8px; font-weight: 400; }
.product-card .sales { font-size: 12px; color: #999; margin-top: 6px; font-weight: 500; }

/* Product Detail */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 30px 0; }
.product-detail .gallery { position: relative; }
.product-detail .gallery .main-img { width: 100%; border-radius: 16px; aspect-ratio: 1; object-fit: cover; background: #f8f8f8; }
.product-detail .thumb-list { display: flex; gap: 10px; margin-top: 12px; }
.product-detail .thumb-list img {
    width: 64px; height: 64px; border-radius: 10px; object-fit: cover; cursor: pointer;
    border: 2px solid transparent; transition: all 0.3s;
}
.product-detail .thumb-list img:hover { border-color: #ff6b35; opacity: 0.8; }
.product-detail .thumb-list img.active { border-color: #ff6b35; }
.product-detail .detail-name { font-size: 24px; font-weight: 800; margin-bottom: 12px; color: #1a1a2e; line-height: 1.4; }
.product-detail .detail-price { color: #ff3b30; font-size: 32px; font-weight: 800; margin-bottom: 20px; letter-spacing: -0.5px; }
.product-detail .detail-meta { font-size: 14px; color: #888; margin-bottom: 20px; display: flex; gap: 16px; flex-wrap: wrap; font-weight: 500; }
.product-detail .quantity { display: flex; align-items: center; gap: 0; margin-bottom: 22px; }
.product-detail .quantity button {
    width: 40px; height: 40px; border: 1px solid #ddd; background: #f8f9fa;
    cursor: pointer; font-size: 18px; transition: all 0.2s; color: #555; font-weight: 700;
}
.product-detail .quantity button:hover { background: #e9ecef; }
.product-detail .quantity button:first-of-type { border-radius: 8px 0 0 8px; }
.product-detail .quantity button:last-of-type { border-radius: 0 8px 8px 0; }
.product-detail .quantity input {
    width: 64px; height: 40px; text-align: center; border: 1px solid #ddd; border-left: none; border-right: none; font-size: 16px; background: #fff; font-weight: 600;
}
.btn-buy { padding: 14px 44px; background: linear-gradient(135deg, #ff6b35, #f5576c); color: #fff; border: none; border-radius: 30px; font-size: 16px; font-weight: 700; cursor: pointer; margin-right: 10px; transition: all 0.3s; box-shadow: 0 4px 16px rgba(255,107,53,0.3); }
.btn-buy:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,107,53,0.4); }
.btn-cart { padding: 14px 44px; border: 2px solid #ff6b35; color: #ff6b35; background: #fff; border-radius: 30px; font-size: 16px; font-weight: 700; cursor: pointer; transition: all 0.3s; }
.btn-cart:hover { background: #fff5f0; transform: translateY(-2px); }

/* Cart Table */
.cart-table { width: 100%; background: #fff; border-radius: 14px; overflow: hidden; border: 1px solid #f0f0f0; }
.cart-table th { background: #f8f9fa; padding: 14px 16px; text-align: left; font-size: 14px; color: #444; font-weight: 700; }
.cart-table td { padding: 14px 16px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; font-size: 14px; font-weight: 500; }
.cart-table .item { display: flex; align-items: center; gap: 12px; }
.cart-table .item img { width: 80px; height: 80px; border-radius: 10px; object-fit: cover; }

/* User Center */
.user-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; padding: 30px 0; }
.user-sidebar { background: #fff; border-radius: 16px; padding: 24px; box-shadow: 0 2px 12px rgba(0,0,0,0.04); border: 1px solid #f0f0f0; }
.user-sidebar .user-info { text-align: center; padding-bottom: 20px; border-bottom: 1px solid #f0f0f0; margin-bottom: 15px; }
.user-sidebar .user-info .avatar { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 12px; object-fit: cover; border: 3px solid #fff; box-shadow: 0 2px 12px rgba(0,0,0,0.1); }
.user-sidebar .user-info .name { font-size: 18px; font-weight: 800; color: #1a1a2e; }
.user-sidebar .menu a {
    display: block; padding: 12px 16px; border-radius: 10px; font-size: 14px;
    color: #555; margin-bottom: 4px; transition: all 0.25s; font-weight: 500;
}
.user-sidebar .menu a:hover, .user-sidebar .menu a.active { background: #fff5f0; color: #ff6b35; transform: translateX(4px); font-weight: 700; }

/* 侧边栏折叠按钮（默认隐藏，移动端显示） */
.sidebar-toggle { display: none; }
.user-content { background: #fff; border-radius: 16px; padding: 30px; min-height: 500px; box-shadow: 0 2px 12px rgba(0,0,0,0.04); border: 1px solid #f0f0f0; }
.user-content h3 { margin-bottom: 20px; font-size: 20px; font-weight: 800; color: #1a1a2e; }

/* Partner Status Card */
.partner-card {
    background: linear-gradient(135deg, #ff6b35, #f5576c);
    color: #fff; border-radius: 16px; padding: 22px 26px;
    margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 6px 24px rgba(245,87,108,0.3); flex-wrap: wrap; gap: 12px;
}
.partner-card .status { font-size: 14px; opacity: 0.9; }
.partner-card .amount { font-size: 30px; font-weight: 800; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card {
    background: #fff; border-radius: 14px; padding: 20px 16px; text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04); transition: transform 0.3s;
}
.stat-card:hover { transform: translateY(-3px); }
.stat-card .num { font-size: 28px; font-weight: 800; color: #ff6b35; }
.stat-card .label { font-size: 13px; color: #999; margin-top: 5px; }

/* ============================================================
   RECOMMEND SECTION (猜你喜欢)
   ============================================================ */
.recommend-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.recommend-header h3 { margin: 0; font-size: 20px; font-weight: 800; color: #1a1a2e; }
.recommend-header .hint { font-size: 13px; color: #999; font-weight: 500; }
.recommend-section { background: #fafbfc; padding: 24px 0 16px; border-bottom: 1px solid #f0f0f0; }

/* ============================================================
   DUOBAO (积分夺宝)
   ============================================================ */
.duobao-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.duobao-card {
    background: #fff; border-radius: 18px; overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,0.05); transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
    border: 1px solid #f0f0f0;
}
.duobao-card:hover { transform: translateY(-5px); box-shadow: 0 12px 36px rgba(0,0,0,0.1); }
.duobao-card .img-box { position: relative; aspect-ratio: 1; background: #f8f8f8; }
.duobao-card .img-box img { width: 100%; height: 100%; object-fit: cover; }
.duobao-card .img-box .badge {
    position: absolute; top: 12px; left: 12px; background: linear-gradient(135deg, #ff6b35, #f5576c);
    color: #fff; padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 700;
}
.duobao-card .img-box .ended-badge {
    position: absolute; inset: 0; background: rgba(0,0,0,0.5); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800;
}
.duobao-card .info { padding: 16px 18px; }
.duobao-card .info h4 { font-size: 17px; margin-bottom: 10px; font-weight: 700; color: #1a1a2e; }
.duobao-card .progress-bar { height: 10px; background: #f0f0f0; border-radius: 5px; margin: 14px 0; overflow: hidden; }
.duobao-card .progress-bar .fill { height: 100%; background: linear-gradient(90deg, #ff6b35, #f5576c); border-radius: 5px; transition: width 0.5s ease; }
.duobao-card .meta { display: flex; justify-content: space-between; font-size: 13px; color: #888; margin-bottom: 14px; font-weight: 500; }
.duobao-card .btn-join { width: 100%; padding: 13px; background: linear-gradient(135deg, #ff6b35, #f5576c); color: #fff; border: none; border-radius: 25px; font-size: 16px; font-weight: 800; cursor: pointer; transition: all 0.3s; letter-spacing: 0.5px; }
.duobao-card .btn-join:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255,107,53,0.4); }
.duobao-card .btn-join:disabled { background: #ccc; cursor: not-allowed; }
.duobao-winner { padding: 12px; background: #fff8e1; border-radius: 10px; margin-top: 10px; font-size: 14px; text-align: center; color: #f57f17; font-weight: 600; }
/* 积分夺宝增强样式 */
.duobao-hero { transition: all 0.3s; }
.duobao-my-stats > div { backdrop-filter: blur(10px); transition: transform 0.3s; }
.duobao-my-stats > div:hover { transform: scale(1.05); }
/* Tab切换 */
.duobao-tabs { position: sticky; top: 0; z-index: 10; }
.duobao-tab { transition: all 0.25s ease; font-weight: 600 !important; }
.duobao-tab:hover { color: #ff6b35 !important; }
.duobao-tab.active { cursor: default; font-weight: 700 !important; }
/* 参与记录列表 */
.duobao-record-item { transition: all 0.25s ease; }
.duobao-record-item:hover { transform: translateX(4px); box-shadow: 0 4px 16px rgba(0,0,0,0.08) !important; }
/* 中奖名单卡片 */
.winner-card { transition: all 0.25s ease; }
.winner-card:hover { transform: translateX(4px); box-shadow: 0 4px 20px rgba(255,107,53,0.12) !important; }

/* ============================================================
   COMMENT SECTION
   ============================================================ */
.comment-list { margin-top: 20px; }
.comment-item { padding: 16px 0; border-bottom: 1px solid #f5f5f5; }
.comment-item:last-child { border-bottom: none; }
.comment-item .user { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.comment-item .user img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.comment-item .user .name { font-size: 14px; font-weight: 600; }
.comment-item .user .time { font-size: 12px; color: #bbb; margin-left: auto; }
.comment-item .content { font-size: 14px; color: #555; margin-bottom: 8px; line-height: 1.6; }
.comment-item .actions { display: flex; gap: 16px; font-size: 12px; color: #999; }
.comment-item .actions button { border: none; background: none; color: #999; cursor: pointer; font-size: 12px; display: flex; align-items: center; gap: 4px; transition: all 0.2s; padding: 4px 0; }
.comment-item .actions button:hover { color: #ff6b35; }
.comment-item .actions button.liked { color: #ff6b35; }

/* ============================================================
   VERIFY CODE (核销码) & QR
   ============================================================ */
.verify-code-display {
    display: inline-block; padding: 8px 16px; background: #fff;
    border: 2px dashed #ff6b35; border-radius: 8px;
    font-family: 'Courier New', monospace; font-size: 16px;
    letter-spacing: 2px; color: #ff6b35; font-weight: 700;
}
.qr-code-wrapper { text-align: center; padding: 15px; }
.qr-code-wrapper canvas { border-radius: 10px; border: 4px solid #fff; box-shadow: 0 4px 16px rgba(0,0,0,0.1); }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 14px; color: #555; font-weight: 500; }
.form-input {
    width: 100%; padding: 12px 16px; border: 1.5px solid #ddd; border-radius: 10px;
    font-size: 14px; transition: all 0.3s; background: #fafafa;
}
.form-input:focus { outline: none; border-color: #ff6b35; background: #fff; box-shadow: 0 0 0 3px rgba(255,107,53,0.1); }
textarea.form-input { min-height: 100px; resize: vertical; }
.btn-submit {
    padding: 12px 32px; background: linear-gradient(135deg, #ff6b35, #f5576c);
    color: #fff; border: none; border-radius: 10px; font-size: 15px; cursor: pointer;
    font-weight: 700; transition: all 0.3s; display: inline-flex; align-items: center; gap: 6px;
    box-shadow: 0 4px 16px rgba(255,107,53,0.25);
}
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,107,53,0.35); }
.btn-submit.sm { padding: 8px 16px; font-size: 12px; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    z-index: 9999; align-items: center; justify-content: center;
    backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
    background: #fff; border-radius: 18px; padding: 32px;
    max-width: 480px; width: 92%; max-height: 85vh; overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: slideUp 0.35s cubic-bezier(0.4,0,0.2,1);
}
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.modal-box h2 { margin-bottom: 20px; font-size: 20px; font-weight: 700; text-align: center; }
.modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 22px; cursor: pointer; color: #999; }

/* ============================================================
   TOAST
   ============================================================ */
.toast-container { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 99999; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
    background: #333; color: #fff; padding: 12px 28px; border-radius: 30px;
    font-size: 14px; white-space: nowrap; box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    animation: toastIn 0.35s cubic-bezier(0.4,0,0.2,1), toastOut 0.3s ease 2.2s forwards;
}
.toast.success { background: #27ae60; }
.toast.error { background: #e74c3c; }
.toast.warning { background: #f39c12; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; } }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 30px; flex-wrap: wrap; }
.pagination a, .pagination span {
    padding: 8px 16px; border: 1px solid #ddd; border-radius: 8px; font-size: 13px;
    color: #666; transition: all 0.3s; background: #fff;
}
.pagination a:hover { background: #ff6b35; color: #fff; border-color: #ff6b35; }
.pagination .current { background: #ff6b35; color: #fff; border-color: #ff6b35; font-weight: 600; }

/* ============================================================
   LOADING SPINNER
   ============================================================ */
.spinner {
    display: inline-block; width: 20px; height: 20px; border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff; border-radius: 50%; animation: spin 0.6s linear infinite;
}
.spinner.dark { border-color: rgba(0,0,0,0.1); border-top-color: #ff6b35; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay {
    position: fixed; inset: 0; background: rgba(255,255,255,0.7); z-index: 9998;
    display: flex; align-items: center; justify-content: center;
}
.loading-overlay .spinner { width: 40px; height: 40px; border-width: 4px; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state { text-align: center; padding: 60px 20px; background: #fff; border-radius: 16px; }
.empty-state .icon { font-size: 64px; margin-bottom: 16px; }
.empty-state p { color: #999; margin-bottom: 20px; font-size: 15px; }

/* ============================================================
   SKELETON LOADING (骨架屏)
   ============================================================ */
.skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-card { background: #fff; border-radius: 14px; overflow: hidden; }
.skeleton-img { width: 100%; aspect-ratio: 1; display: block; }
.skeleton-text { height: 16px; margin: 10px 12px 6px; }
.skeleton-text.sm { height: 12px; width: 60%; }
.skeleton-price { height: 22px; width: 40%; margin: 6px 12px 12px; }

/* ============================================================
   BACK TO TOP (回到顶部)
   ============================================================ */
.back-to-top {
    position: fixed; bottom: 24px; right: 24px; z-index: 999;
    width: 44px; height: 44px; border-radius: 50%;
    background: linear-gradient(135deg, #ff6b35, #f5576c);
    color: #fff; border: none; cursor: pointer;
    font-size: 20px; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(255,107,53,0.4);
    opacity: 0; visibility: hidden; transform: translateY(20px);
    transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(255,107,53,0.5); }

/* ============================================================
   MOBILE BOTTOM NAV (移动端底部导航)
   ============================================================ */
.mobile-bottom-nav {
    display: none; position: fixed; bottom: 0; left: 0; right: 0;
    background: #fff; border-top: 1px solid #eee; z-index: 998;
    padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
    box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
}
.mobile-bottom-nav .inner { display: flex; justify-content: space-around; }
.mobile-bottom-nav a {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    font-size: 10px; color: #999; padding: 4px 12px; text-decoration: none;
    transition: color 0.25s;
}
.mobile-bottom-nav a.active { color: #ff6b35; }
.mobile-bottom-nav a .nav-icon { font-size: 22px; line-height: 1; }

/* ============================================================
   STICKY CHECKOUT BAR (移动端结算悬浮条)
   ============================================================ */
.sticky-checkout-bar {
    display: none; position: fixed; bottom: 0; left: 0; right: 0;
    background: #fff; border-top: 1px solid #eee; z-index: 997;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
    align-items: center; gap: 10px;
}
.sticky-checkout-bar .total-price { font-size: 18px; font-weight: 800; color: #ff3b30; flex: 1; }
.sticky-checkout-bar .total-price .label { font-size: 11px; color: #999; font-weight: 400; }

/* ============================================================
   QUANTITY SELECTOR (数量选择器 通用)
   ============================================================ */
.qty-selector { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 8px; overflow: hidden; }
.qty-selector button {
    width: 34px; height: 34px; border: none; background: #f8f9fa;
    cursor: pointer; font-size: 16px; color: #555; transition: background 0.2s;
    display: flex; align-items: center; justify-content: center; line-height: 1;
}
.qty-selector button:hover { background: #e9ecef; }
.qty-selector button:disabled { color: #ccc; cursor: not-allowed; background: #f5f5f5; }
.qty-selector input {
    width: 48px; height: 34px; text-align: center; border: none; border-left: 1px solid #ddd; border-right: 1px solid #ddd;
    font-size: 14px; background: #fff; -moz-appearance: textfield;
}
.qty-selector input::-webkit-outer-spin-button,
.qty-selector input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ============================================================
   DISABLED BUTTONS & STATES
   ============================================================ */
.btn-disabled, button:disabled, .btn-submit:disabled, .btn-buy:disabled, .btn-cart:disabled {
    opacity: 0.5; cursor: not-allowed !important; pointer-events: none;
    transform: none !important; box-shadow: none !important;
}
.btn-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn-loading::after {
    content: ''; position: absolute; width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff; border-radius: 50%;
    animation: spin 0.6s linear infinite;
    top: 50%; left: 50%; margin: -9px 0 0 -9px;
}

/* ============================================================
   PULSE DOT (脉冲点，用于直播/活动)
   ============================================================ */
.pulse-dot {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    background: #27ae60; position: relative;
}
.pulse-dot::after {
    content: ''; position: absolute; inset: -4px; border-radius: 50%;
    background: inherit; opacity: 0.4; animation: pulse-ring 1.5s ease infinite;
}
@keyframes pulse-ring { to { transform: scale(2.5); opacity: 0; } }

/* ============================================================
   SEARCH DROPDOWN (搜索建议)
   ============================================================ */
.search-dropdown {
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12); z-index: 100;
    max-height: 320px; overflow-y: auto; display: none;
}
.search-dropdown.show { display: block; }
.search-dropdown .item {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; cursor: pointer; transition: background 0.2s;
    border-bottom: 1px solid #f5f5f5; font-size: 14px; color: #333;
}
.search-dropdown .item:hover { background: #fff5f0; }
.search-dropdown .item:last-child { border-bottom: none; }
.search-dropdown .item .hot-tag {
    padding: 1px 6px; border-radius: 4px; font-size: 10px;
    background: #fff3e0; color: #e67e22; margin-left: auto;
}

/* ============================================================
   ORDER TIMELINE (订单状态时间线)
   ============================================================ */
.order-timeline { position: relative; padding-left: 28px; }
.order-timeline::before {
    content: ''; position: absolute; left: 11px; top: 8px; bottom: 8px;
    width: 2px; background: #e0e0e0;
}
.order-timeline .step {
    position: relative; padding: 6px 0 16px; font-size: 13px; color: #999;
}
.order-timeline .step:last-child { padding-bottom: 0; }
.order-timeline .step::before {
    content: ''; position: absolute; left: -20px; top: 10px;
    width: 10px; height: 10px; border-radius: 50%; background: #e0e0e0;
    border: 2px solid #fff; z-index: 1;
}
.order-timeline .step.active { color: #333; font-weight: 500; }
.order-timeline .step.active::before { background: #ff6b35; }
.order-timeline .step.done { color: #27ae60; }
.order-timeline .step.done::before { background: #27ae60; }

/* ============================================================
   TABS (标签切换)
   ============================================================ */
.tabs { display: flex; gap: 0; border-bottom: 2px solid #f0f0f0; margin-bottom: 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tabs a, .tabs button {
    padding: 10px 18px; font-size: 13px; font-weight: 600; color: #999;
    border: none; background: none; cursor: pointer; white-space: nowrap;
    border-bottom: 2px solid transparent; margin-bottom: -2px;
    transition: all 0.3s; text-decoration: none;
}
.tabs a:hover, .tabs button:hover { color: #555; }
.tabs a.active, .tabs button.active { color: #ff6b35; border-bottom-color: #ff6b35; }

/* ============================================================
   FLOATING CART BUTTON (浮动购物车按钮 - 移动端商品详情)
   ============================================================ */
.floating-cart-btn {
    display: none; position: fixed; bottom: 20px; right: 20px; z-index: 900;
    width: 56px; height: 56px; border-radius: 50%;
    background: #ff6b35; color: #fff; border: none; cursor: pointer;
    font-size: 22px; box-shadow: 0 6px 24px rgba(255,107,53,0.5);
    transition: transform 0.3s; align-items: center; justify-content: center;
}
.floating-cart-btn:hover { transform: scale(1.1); }
.floating-cart-btn .badge {
    position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px;
    background: #e74c3c; border-radius: 10px; font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; padding: 0 5px;
}

/* ============================================================
   CHIP / TAG (小标签)
   ============================================================ */
.chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 600;
    background: #f0f2f5; color: #555; margin: 2px;
}
.chip.primary { background: #fff5f0; color: #ff6b35; font-weight: 700; }
.chip.success { background: #e8f5e9; color: #27ae60; font-weight: 700; }
.chip.warning { background: #fff8e1; color: #f39c12; font-weight: 700; }
.chip.danger { background: #ffebee; color: #e74c3c; font-weight: 700; }

/* ============================================================
   OVERLAY PANEL (右侧抽屉)
   ============================================================ */
.panel-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 9997; opacity: 0; visibility: hidden; transition: all 0.3s; }
.panel-overlay.show { opacity: 1; visibility: visible; }
.panel-right {
    position: fixed; top: 0; right: 0; bottom: 0; width: 320px; max-width: 85vw;
    background: #fff; z-index: 9998; transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1); overflow-y: auto;
}
.panel-right.show { transform: translateX(0); }

/* ============================================================
   LOAD MORE (H5首页动态加载)
   ============================================================ */
.load-more { text-align: center; padding: 20px; color: #999; font-size: 13px; cursor: pointer; }
.load-more:hover { color: #ff6b35; }

/* ============================================================
   PRINT BUTTON (打印小票)
   ============================================================ */
.btn-print {
    display: inline-block; padding: 6px 16px;
    background: linear-gradient(135deg, #ff6b35, #f5576c);
    color: #fff; border: 1.5px solid transparent; border-radius: 8px;
    font-size: 13px; cursor: pointer; font-weight: 600;
    transition: all 0.25s; text-decoration: none;
    box-shadow: 0 2px 8px rgba(255,107,53,0.2);
}
.btn-print:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(255,107,53,0.35); }

/* 打印弹窗遮罩 */
.print-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 10000;
    display: flex; align-items: center; justify-content: center;
}
.print-modal {
    background: #fff; border-radius: 14px; padding: 25px;
    max-width: 420px; width: 90%; box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}
.print-modal h4 { margin-bottom: 15px; font-size: 16px; }
.print-modal .print-type-btn {
    display: block; width: 100%; padding: 12px; margin-bottom: 8px;
    border: 2px solid #e0e0e0; border-radius: 10px; background: #fff;
    font-size: 14px; cursor: pointer; text-align: left; transition: all 0.2s;
}
.print-modal .print-type-btn:hover { border-color: #ff6b35; background: #fff5f0; }
.print-modal .print-cancel {
    display: block; width: 100%; padding: 10px; margin-top: 5px;
    background: #f5f5f5; border: none; border-radius: 10px; font-size: 14px;
    cursor: pointer; color: #666;
}
.print-modal .print-cancel:hover { background: #eee; }

/* ============================================================
   ADMIN STYLES (后台管理) - 增强版
   ============================================================ */
.admin-layout { display: block; min-height: 100vh; position: relative; }
.admin-sidebar {
    width: 240px; background: linear-gradient(180deg, #1a1a2e, #16213e);
    color: #fff; padding: 0; position: fixed; top: 0; left: 0; bottom: 0; z-index: 150; overflow-y: auto;
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 2px 0 16px rgba(0,0,0,0.15);
}
.admin-sidebar .brand {
    padding: 18px 16px; font-size: 16px; font-weight: 700; border-bottom: 1px solid rgba(255,255,255,0.08);
    letter-spacing: 0.5px; display: flex; align-items: center; gap: 8px;
    position: sticky; top: 0; background: linear-gradient(180deg, #1a1a2e, #16213e); z-index: 2;
}
.admin-sidebar .menu-list { display: flex; flex-direction: column; padding-bottom: 24px; }
.admin-sidebar .menu-list a {
    display: flex; align-items: center; gap: 10px; padding: 12px 18px;
    color: #999; font-size: 14px; border-left: 3px solid transparent;
    transition: all 0.25s; font-weight: 500; text-decoration: none;
    white-space: nowrap;
}
.admin-sidebar .menu-list a:hover, .admin-sidebar .menu-list a.active {
    color: #fff; background: rgba(255,255,255,0.05); border-left-color: #ff6b35;
}

/* ===== 后台菜单分组下拉 ===== */
.admin-sidebar .menu-group {
    margin-top: 4px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.admin-sidebar .menu-group-title {
    display: flex; align-items: center; justify-content: space-between;
    padding: 13px 18px; color: #e0e0e0; font-size: 14px; font-weight: 700;
    cursor: pointer; user-select: none;
    transition: all 0.25s; letter-spacing: 1px;
    border-left: 3px solid transparent;
}
.admin-sidebar .menu-group-title:hover {
    color: #fff; background: rgba(255,255,255,0.06); border-left-color: rgba(255,107,53,0.4);
}
.admin-sidebar .menu-group-title .menu-arrow {
    font-size: 10px; transition: transform 0.3s; color: #777;
}
.admin-sidebar .menu-group.open > .menu-group-title .menu-arrow {
    transform: rotate(180deg);
}
.admin-sidebar .menu-group.open > .menu-group-title {
    color: #ff6b35; border-left-color: #ff6b35; background: rgba(255,107,53,0.08);
}

/* 子菜单容器 - grid动画更整齐 */
.admin-sidebar .menu-group-items {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease;
}
.admin-sidebar .menu-group-items.open {
    grid-template-rows: 1fr;
}
.admin-sidebar .menu-group-items > div {
    overflow: hidden;
}
.admin-sidebar .menu-group-items a {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 18px 10px 40px !important;
    font-size: 13px !important; font-weight: 400 !important;
    color: #888 !important;
    border-left: 3px solid transparent !important;
    transition: all 0.2s;
    text-decoration: none;
}
.admin-sidebar .menu-group-items a:hover,
.admin-sidebar .menu-group-items a.active {
    color: #fff !important; font-weight: 500 !important;
    background: rgba(255,255,255,0.04) !important;
    border-left-color: #ff6b35 !important;
}

/* 兼容不支持 grid-template-rows 动画的浏览器 */
@supports not (grid-template-rows: 0fr) {
    .admin-sidebar .menu-group-items {
        display: block;
        max-height: 0; overflow: hidden;
        transition: max-height 0.35s ease;
    }
    .admin-sidebar .menu-group-items.open {
        max-height: 600px;
    }
    .admin-sidebar .menu-group-items > div {
        overflow: visible;
    }
}

/* 菜单分隔线 */
.admin-sidebar .menu-divider {
    height: 1px; background: rgba(255,255,255,0.08);
    margin: 8px 16px;
}

.admin-main { margin-left: 240px; background: #f0f2f5; min-height: 100vh; }
.admin-header {
    background: #fff; padding: 14px 24px; display: flex; justify-content: space-between;
    align-items: center; box-shadow: 0 1px 6px rgba(0,0,0,0.04); position: sticky; top: 0; z-index: 50;
    gap: 12px; flex-wrap: wrap;
}
.admin-content { padding: 20px; }
.admin-table {
    width: 100%; background: #fff; border-radius: 14px; overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.admin-table th { background: #f8f9fa; padding: 13px 16px; font-size: 13px; text-align: left; color: #555; font-weight: 600; white-space: nowrap; }
.admin-table td { padding: 13px 16px; border-bottom: 1px solid #f0f0f0; font-size: 13px; }
.admin-table tr:hover { background: #fafbfc; }
.admin-table tr:last-child td { border-bottom: none; }

/* 状态标签 */
.status-badge {
    display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 11px; font-weight: 600;
}
.status-pending { background: #fff8e1; color: #f39c12; }
.status-paid { background: #e3f2fd; color: #1a73e8; }
.status-shipped { background: #e8f5e9; color: #27ae60; }
.status-done { background: #e8f5e9; color: #2ecc71; }
.status-refunded { background: #ffebee; color: #e74c3c; }
.status-cancelled { background: #f5f5f5; color: #999; }

/* 后台按钮 */
.admin-btn {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 8px 18px; border-radius: 8px; font-size: 13px; cursor: pointer;
    border: 1px solid #ddd; background: #fff; color: #555; font-weight: 500;
    transition: all 0.25s; text-decoration: none;
}
.admin-btn:hover { border-color: #bbb; background: #f8f9fa; transform: translateY(-1px); }
.admin-btn.primary { background: #1a73e8; color: #fff; border-color: #1a73e8; }
.admin-btn.primary:hover { background: #1565c0; }
.admin-btn.danger { background: #fff; color: #e74c3c; border-color: #e74c3c; }
.admin-btn.danger:hover { background: #e74c3c; color: #fff; }
.admin-btn.success { background: #27ae60; color: #fff; border-color: #27ae60; }
.admin-btn.success:hover { background: #219a52; }
.admin-btn.warning { background: #f39c12; color: #fff; border-color: #f39c12; }
.admin-btn.warning:hover { background: #e67e22; }
.admin-btn.sm { padding: 5px 12px; font-size: 12px; border-radius: 6px; }

/* 统计卡片增强 */
.stat-card {
    background: #fff; border-radius: 14px; padding: 20px 16px; text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04); transition: transform 0.3s, box-shadow 0.3s;
    border-left: 4px solid transparent;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.08); }
.stat-card .num { font-size: 28px; font-weight: 800; color: #ff6b35; }
.stat-card .label { font-size: 13px; color: #999; margin-top: 5px; }

/* 筛选栏 */
.admin-filter-bar {
    display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap;
    margin-bottom: 15px; background: #fff; padding: 15px 18px;
    border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

/* 汉堡菜单按钮 (仅移动端) */
.admin-menu-toggle {
    display: none; width: 36px; height: 36px; min-width: 36px;
    background: #f0f2f5; border: none; border-radius: 8px; cursor: pointer;
    align-items: center; justify-content: center; font-size: 20px; color: #333;
    transition: background 0.25s;
}
.admin-menu-toggle:hover { background: #e0e3e8; }

/* 侧边栏遮罩 (移动端) */
.admin-sidebar-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45);
    z-index: 149; transition: opacity 0.3s;
}

/* 分销关系树 */
.tree-card {
    border: 1px solid #e0e0e0; border-radius: 10px; padding: 14px;
    transition: all 0.3s;
}
.tree-card:hover { border-color: #667eea; box-shadow: 0 4px 16px rgba(102,126,234,0.1); }
.tree-card.root { border: 3px solid #ff6b35; background: #fff5f0; }
.tree-card.parent { border: 2px solid #1a73e8; background: #e3f2fd; }

/* 趋势图 */
.trend-bar-wrap { display: flex; align-items: flex-end; gap: 4px; height: 36px; }
.trend-bar { flex: 1; border-radius: 3px 3px 0 0; min-width: 16px; transition: height 0.4s ease; }
.trend-orders { background: linear-gradient(0deg, #1a73e8, #5b9ef5); }
.trend-revenue { background: linear-gradient(0deg, #ff6b35, #ff9a6c); }

/* ============================================================
   RESPONSIVE — 全面移动端适配
   ============================================================ */

/* ---- 平板 ≤1024 ---- */
@media (max-width: 1024px) {
    .product-detail { grid-template-columns: 1fr; gap: 24px; }
    .user-layout { grid-template-columns: 1fr; }
    .checkout-layout { grid-template-columns: 1fr; }
    .sticky-summary { position: static; }
    .user-content { padding: 20px 15px; }
}

/* ---- 手机横屏 / 小平板 ≤768 ---- */
@media (max-width: 768px) {
    /* 全局 */
    html { font-size: 15px; }
    .container { padding: 0 12px; }
    .section { padding: 40px 0; }
    .section-title h2 { font-size: 1.5rem; }

    /* 导航 */
    .header-inner > .nav { display: none; flex-direction: column; position: absolute; top: 56px; left: 0; right: 0; background: #1565c0; padding: 12px; box-shadow: 0 8px 20px rgba(0,0,0,0.2); border-radius: 0 0 16px 16px; z-index: 1001; max-height: 80vh; overflow-y: auto; }
    .header-inner > .nav.open { display: flex; }
    .header-inner > .nav a { padding: 11px 14px; font-size: 14px; border-radius: 10px; }
    .menu-toggle { display: block; }
    .header-inner { min-height: 52px; padding: 6px 0; }
    .header .logo { font-size: 16px; }

    /* Hero */
    .hero { padding: 40px 0 50px; }
    .hero h1 { font-size: 1.6rem; }
    .hero p { font-size: 0.9rem; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .hero-buttons .btn-primary,
    .hero-buttons .btn-outline { width: 100%; max-width: 280px; justify-content: center; padding: 12px 24px; font-size: 14px; }
    .hero::after { bottom: -25px; height: 50px; }

    /* 信任 */
    .trust-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .trust-section { padding: 35px 0; }
    .trust-item { padding: 16px; }
    .trust-item .num { font-size: 28px; }

    /* Video */
    .video-grid { grid-template-columns: 1fr; }
    .video-card .info { padding: 14px 16px; }
    .video-card .info h3 { font-size: 15px; }

    /* 商家 */
    .merchant-row-header { flex-direction: column; align-items: flex-start; }
    .merchant-row-header .merchant-info { flex-direction: column; align-items: flex-start; gap: 4px; }
    .merchant-row-header { padding: 12px 14px; }

    /* 联系 */
    .contact-bar { padding: 24px 16px; border-radius: 14px; }
    .contact-bar .phone { font-size: 26px; }
    .contact-bar h3 { font-size: 18px; }

    /* 页脚 */
    .footer { padding: 28px 0 16px; margin-top: 40px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 20px; }

    /* ---- 商城 ---- */
    .mall-topbar .container { flex-wrap: wrap; gap: 6px; font-size: 28px; justify-content: center; text-align: center; }
    .mall-topbar a { margin-left: 8px; font-size: 18px; font-weight: 700; }
    .mall-topbar span { font-size: 18px; font-weight: 700; }

    .mall-header { padding: 8px 0; }
    .mall-header .container { flex-wrap: wrap; gap: 8px; justify-content: space-between; }
    .mall-header > .container > a:first-child { font-size: 16px !important; flex-shrink: 0; }
    .mall-search { flex: 1 1 100%; order: 3; margin: 0 !important; max-width: 100%; min-width: 0; }
    .mall-search input { padding: 9px 12px; font-size: 13px; }
    .mall-search button { padding: 9px 16px; font-size: 13px; }
    .mall-cart { font-size: 22px; }

    .cat-nav .container { gap: 0; }
    .cat-nav a { padding: 10px 12px; font-size: 12px; }

    .banner-slider { padding: 30px 0; border-radius: 0 0 20px 20px; }
    .banner-slider h1 { font-size: 1.5rem; }
    .banner-slider p { font-size: 0.85rem; }
    .banner-cards { flex-direction: column; align-items: center; margin-top: -20px; }
    .banner-card { max-width: 100%; width: 100%; min-width: 0; }

    .partner-banner { padding: 16px 18px; }
    .partner-banner h3 { font-size: 16px; }

    /* 商品详情 */
    .product-detail { gap: 16px; padding: 20px 0; }
    .product-detail .detail-name { font-size: 18px; }
    .product-detail .detail-price { font-size: 24px; }
    .product-detail .gallery .main-img { border-radius: 12px; }
    .btn-buy, .btn-cart { padding: 12px 24px; font-size: 14px; width: 100%; text-align: center; margin-right: 0; margin-bottom: 8px; }

    /* 购物车 */
    .cart-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .cart-table th, .cart-table td { white-space: nowrap; padding: 10px 12px; font-size: 12px; }
    .cart-table .item img { width: 48px; height: 48px; }

    /* 结算 */
    .checkout-layout { grid-template-columns: 1fr; }
    .sticky-summary { position: static; }
    .checkout-section { padding: 16px; }

    /* 夺宝 */
    .duobao-card .info { padding: 12px; }
    .duobao-card .info h4 { font-size: 14px; }
    .duobao-hero { padding: 16px 18px !important; }
    .duobao-hero h2 { font-size: 18px !important; }
    .duobao-my-stats { gap: 8px !important; width: 100%; justify-content: center; }
    .duobao-my-stats > div { padding: 8px 12px !important; }
    .duobao-my-stats > div > div:first-child { font-size: 16px !important; }
    .duobao-tab { font-size: 12px !important; padding: 10px 4px !important; }
    .winner-card { padding: 12px !important; flex-wrap: wrap; }
    .winner-card img { width: 50px !important; height: 50px !important; }
    .duobao-record-item { padding: 12px !important; flex-wrap: wrap; }
    .duobao-record-item img { width: 48px !important; height: 48px !important; }

    /* ---- 用户中心 ---- */
    .user-layout { display: block; gap: 0; padding: 12px 0; }

    /* 用户侧边栏移动端 */
    .user-sidebar { border-radius: 0 0 14px 14px; margin-bottom: 12px; }
    .user-sidebar .menu { display: none; }
    .user-sidebar.open .menu { display: block; }
    .user-sidebar .user-info { padding-bottom: 12px; margin-bottom: 0; border-bottom: none; }
    .user-sidebar .user-info .avatar { width: 52px; height: 52px; }
    .avatar-wrapper { width: 52px; height: 52px; }
    .avatar-wrapper .avatar { width: 52px; height: 52px; }
    .user-sidebar .user-info .name { font-size: 15px; }
    .user-sidebar .user-info .name + div { margin-bottom: 6px; }
    .user-sidebar .menu a { padding: 10px 12px; font-size: 17px; font-weight: 700; }

    /* 用户侧边栏切换按钮 */
    .sidebar-toggle {
        display: flex; align-items: center; justify-content: center;
        width: 100%; padding: 8px 0; background: none; border: none;
        color: #999; font-size: 32px; cursor: pointer;
        border-top: 1px solid #f0f0f0; margin-top: 6px;
    }
    .sidebar-toggle::after { content: ' ▼'; font-size: 30px; }
    .user-sidebar.open .sidebar-toggle::after { content: ' ▲'; }

    .user-content { border-radius: 14px; padding: 18px 14px; min-height: auto; }
    .user-content h3 { font-size: 17px; margin-bottom: 14px; }

    .partner-card { padding: 16px 18px; border-radius: 12px; }
    .partner-card .amount { font-size: 22px; }

    /* 订单卡片移动端 */
    .order-card { padding: 14px 14px; }
    .order-header { font-size: 13px; }
    .order-body { flex-direction: column; gap: 8px; }
    .order-actions { text-align: left; margin-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
    .order-amount { font-size: 16px; }
    .order-item-row { font-size: 12px; }
    .order-item-row img { width: 40px; height: 40px; }
    .btn-pay, .btn-detail, .btn-refund { font-size: 11px; padding: 5px 12px; }

    /* 订单详情 */
    .detail-section { padding: 16px 14px; }
    .detail-table td:first-child { width: 65px; font-size: 12px; }
    .detail-table td:last-child { font-size: 12px; }

    /* 资金表格 */
    .admin-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; }
    .admin-table th, .admin-table td { padding: 10px 12px; font-size: 12px; white-space: nowrap; }

    /* 头像编辑 */
    .profile-avatar-upload { flex-direction: column; align-items: center; text-align: center; }
    .avatar-wrapper.avatar-lg { width: 100px; height: 100px; }
    .avatar-wrapper.avatar-lg .avatar { width: 100px; height: 100px; }
    .profile-nickname-row { flex-direction: column; max-width: 100%; }
    .profile-nickname-row .form-input { width: 100%; }
    .profile-nickname-row .btn-submit { width: 100%; text-align: center; justify-content: center; }

    /* 分享推广 */
    .share-main { grid-template-columns: 1fr; }
    .share-qrcode-card { position: static; }
    .share-page { padding: 20px 10px 0; max-width: 100%; }
    .share-header h1 { font-size: 22px; }
    .share-invite-code { font-size: 24px; letter-spacing: 4px; }
    .share-stats { grid-template-columns: repeat(3, 1fr); }
    .share-tips-grid { grid-template-columns: 1fr 1fr; }
    .team-member { flex-wrap: wrap; }

    /* 浏览足迹 */
    .history-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .history-card .thumb { height: 140px; }
    .history-card .card-body { padding: 10px 12px; }
    .history-card .card-body .pname { font-size: 13px; height: 36px; }
    .history-card .card-body .pprice { font-size: 15px; }
    .top-actions { flex-direction: column; gap: 8px; align-items: flex-start; }
    .top-actions h3 { font-size: 16px; }

    /* 推广链接区 */
    .user-content div[style*="grid-template-columns"] { grid-template-columns: 1fr !important; gap: 12px; }

    /* ---- 移动端底部导航 ---- */
    .mobile-bottom-nav { display: block; }
    body.has-bottom-nav { padding-bottom: 65px; }

    /* 移动端悬浮购物车 */
    .floating-cart-btn { display: flex; }

    /* 移动端结算条 */
    .sticky-checkout-bar { display: flex; }
    body.has-checkout-bar { padding-bottom: 75px; }

    /* 回到顶部按钮 */
    .back-to-top { bottom: 75px; right: 14px; width: 40px; height: 40px; font-size: 18px; }

    /* 弹窗 */
    .modal-box { padding: 22px 18px; max-width: 95%; border-radius: 14px; }
    .modal-box h2 { font-size: 18px; }

    /* 后台 */
    /* ===== 后台移动端全面适配 ===== */
    .admin-layout { display: block; position: relative; }
    .admin-sidebar-overlay { display: block; opacity: 0; pointer-events: none; z-index: 149; }
    .admin-sidebar-overlay.open { opacity: 1; pointer-events: auto; }

    /* 汉堡按钮 - 显眼的菜单入口 */
    .admin-menu-toggle {
        display: flex; width: auto; height: 38px; min-width: 38px; padding: 0 14px;
        background: #1a73e8; border: none; border-radius: 8px; cursor: pointer;
        align-items: center; justify-content: center; gap: 6px; font-size: 16px; color: #fff;
        transition: background 0.25s; font-weight: 600; flex-shrink: 0;
    }
    .admin-menu-toggle:hover { background: #1565c0; }
    .admin-menu-toggle .toggle-icon { font-size: 18px; line-height: 1; }
    .admin-menu-toggle .toggle-label { font-size: 13px; white-space: nowrap; }

    /* 侧边栏滑入式（默认隐藏） */
    .admin-sidebar {
        position: fixed; top: 0; left: 0; bottom: 0; width: 280px; min-width: 280px;
        z-index: 150; transform: translateX(-100%); transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
        box-shadow: 2px 0 24px rgba(0,0,0,0.25); overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-sidebar .brand { font-size: 15px; padding: 16px 16px; position: sticky; top: 0; }
    .admin-sidebar .menu-list { display: flex !important; position: static; background: none; box-shadow: none; padding: 0 0 24px 0; border-radius: 0; z-index: auto; }
    .admin-sidebar .menu-list a { padding: 12px 18px; font-size: 14px; }
    /* 移动端分组菜单 */
    .admin-sidebar .menu-group-title { padding: 12px 18px; font-size: 13px; }
    .admin-sidebar .menu-group-items a { padding-left: 36px !important; font-size: 13px !important; }
    .admin-sidebar .menu-divider { margin: 6px 16px; }
    /* 侧边栏内退出登录特殊标注 */
    .admin-sidebar .menu-list a[style*="color:#e74c3c"] {
        margin-top: 8px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.1);
    }

    .admin-main { margin-left: 0; width: 100%; }
    .admin-header {
        padding: 10px 12px; flex-wrap: wrap; gap: 8px;
        display: flex; align-items: center; position: sticky; top: 0; z-index: 40;
    }
    .admin-header h3 { font-size: 15px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .admin-content { padding: 12px; }

    /* 筛选栏移动端 */
    .admin-filter-bar {
        flex-direction: column; padding: 12px 14px; gap: 8px;
    }
    .admin-filter-bar > * { width: 100%; flex: none; min-width: 0; }
    .admin-filter-bar .form-input,
    .admin-filter-bar select { width: 100%; }
    .admin-filter-bar .admin-btn { width: 100%; justify-content: center; }

    /* 子页面内联筛选表单 */
    form[style*="flex-wrap:wrap"] {
        flex-direction: column !important;
        gap: 8px !important; padding: 12px 14px !important;
    }
    form[style*="flex-wrap:wrap"] .form-group {
        width: 100% !important; min-width: 0 !important; flex: none !important;
    }
    form[style*="flex-wrap:wrap"] .form-group label { font-size: 12px; }
    form[style*="flex-wrap:wrap"] .form-input,
    form[style*="flex-wrap:wrap"] select { width: 100%; }

    /* 仪表盘双栏堆叠 */
    .admin-content div[style*="grid-template-columns:1fr 2fr"] { grid-template-columns: 1fr !important; }

    /* 统计卡片 */
    .stats-grid { gap: 8px; }
    .stat-card { padding: 14px 10px; border-radius: 10px; }
    .stat-card .num { font-size: 22px; }
    .stat-card .label { font-size: 11px; }

    /* 表格 - 水平滚动 + 最小列宽 */
    .admin-table {
        display: block; overflow-x: auto; -webkit-overflow-scrolling: touch;
        border-radius: 12px; font-size: 12px;
    }
    .admin-table th, .admin-table td { padding: 9px 10px; font-size: 11px; white-space: nowrap; }
    .admin-table th { font-size: 11px; }

    /* 操作按钮组 - 换行 */
    .admin-btn { padding: 6px 14px; font-size: 12px; }
    .admin-btn.sm { padding: 4px 10px; font-size: 11px; }
    td .admin-btn + .admin-btn { margin-left: 2px; }
    td:has(.admin-btn) { white-space: normal; }
    td:has(.admin-btn) .admin-btn { margin-bottom: 3px; }

    /* 表单控件全宽 */
    .form-input, .form-select, .form-textarea { font-size: 14px; padding: 10px 12px; }

    /* 弹窗 */
    .modal-box { max-width: 92%; padding: 18px 14px; }

    /* 海报弹窗 */
    .poster-dialog { padding: 16px; max-width: 95%; }
    .poster-dialog canvas { max-width: 100%; height: auto; }

    /* FAQ */
    .faq-item { padding: 14px 16px; }
    .faq-item .question { font-size: 14px; }
}

/* ---- 小屏手机 ≤480 ---- */
@media (max-width: 480px) {
    html { font-size: 14px; }
    .container { padding: 0 10px; }
    .section { padding: 30px 0; }

    .hero { padding: 30px 0 40px; }
    .hero h1 { font-size: 1.35rem; }
    .hero p { font-size: 0.82rem; line-height: 1.6; }

    .service-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .service-card { padding: 14px 8px; border-radius: 12px; }
    .service-card .icon { font-size: 26px; width: 50px; height: 50px; }
    .service-card h3 { font-size: 13px; font-weight: 700; }
    .service-card p { font-size: 10px; }

    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .product-card { border-radius: 10px; }
    .product-card .info { padding: 10px; }
    .product-card .name { font-size: 13px; font-weight: 700; }
    .product-card .price { font-size: 16px; font-weight: 800; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .stat-card { padding: 14px 10px; border-radius: 10px; }
    .stat-card .num { font-size: 22px; }

    .duobao-grid { grid-template-columns: 1fr; }
    .duobao-card { border-radius: 14px; }

    .gallery-grid { grid-template-columns: 1fr 1fr; gap: 8px; }

    .trust-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .trust-item .num { font-size: 24px; }
    .trust-item .label { font-size: 12px; }

    .footer-grid { grid-template-columns: 1fr; gap: 16px; }
    .footer h4 { font-size: 14px; margin-bottom: 8px; }

    .share-stats { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .share-stat-item { padding: 12px 8px; }
    .share-stat-num { font-size: 20px; }
    .share-tips-grid { grid-template-columns: 1fr; }

    .history-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .history-card .thumb { height: 120px; }

    .pagination a, .pagination span { padding: 6px 10px; font-size: 11px; }

    .btn-submit { padding: 10px 20px; font-size: 13px; }
    .form-input { padding: 10px 12px; font-size: 13px; }

    /* 480 后台增强 */
    .admin-menu-toggle { height: 34px; min-width: 34px; padding: 0 10px; }
    .admin-menu-toggle .toggle-icon { font-size: 18px; }
    .admin-menu-toggle .toggle-label { font-size: 12px; }
    .admin-sidebar { width: 250px; }
    .admin-sidebar .brand { font-size: 14px; padding: 14px 14px; }
    .admin-sidebar .menu-list a { padding: 10px 14px; font-size: 12px; }
    .admin-header { padding: 8px 10px; gap: 6px; }
    .admin-header h3 { font-size: 13px; }
    .admin-content { padding: 8px; }
    .stat-card { padding: 12px 8px; }
    .stat-card .num { font-size: 20px; }
    .stat-card .label { font-size: 10px; }
    .admin-table th, .admin-table td { padding: 7px 8px; font-size: 10px; }
    .admin-btn { padding: 5px 12px; font-size: 11px; }
    .admin-filter-bar { padding: 10px 12px; gap: 6px; }
}

/* ============================================================
   分享推广页
   ============================================================ */
.share-page { padding: 30px 15px 0; max-width: 1000px; }

/* 页面标题 */
.share-header { text-align: center; margin-bottom: 24px; }
.share-header h1 { font-size: 26px; font-weight: 800; color: #1a1a2e; margin-bottom: 6px; }
.share-header p { font-size: 14px; color: #888; }

/* 统计条 */
.share-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}
.share-stat-item {
    background: #fff;
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: transform 0.25s;
}
.share-stat-item:hover { transform: translateY(-2px); }
.share-stat-item.highlight {
    background: linear-gradient(135deg, #fff5f0, #ffede3);
    border: 1px solid #ffd4bc;
}
.share-stat-num { font-size: 24px; font-weight: 800; color: #ff6b35; }
.share-stat-item.highlight .share-stat-num { color: #e85a2b; }
.share-stat-label { font-size: 12px; color: #999; margin-top: 4px; }

/* 主要内容区 */
.share-main {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 24px;
    margin-bottom: 30px;
}

/* 二维码卡片 */
.share-qrcode-card {
    background: #fff;
    border-radius: 18px;
    padding: 28px 24px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    position: sticky;
    top: 80px;
}
.share-qrcode-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}
.share-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ff6b35;
}
.share-username { font-size: 16px; font-weight: 700; color: #1a1a2e; text-align: left; }
.share-userid { font-size: 12px; color: #999; text-align: left; margin-top: 2px; }

/* 二维码区域 */
.share-qrcode-box {
    background: #fafafa;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 18px;
    border: 2px dashed #e0e0e0;
}
.share-qrcode-box canvas {
    display: block;
    margin: 0 auto;
    border-radius: 8px;
}
.share-qrcode-tip {
    font-size: 12px;
    color: #999;
    margin-top: 10px;
}

/* 二维码操作按钮 */
.share-qrcode-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 分享按钮 */
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.25s;
    width: 100%;
}
.share-btn-primary {
    background: linear-gradient(135deg, #ff6b35, #f5576c);
    color: #fff;
    box-shadow: 0 4px 14px rgba(245,87,108,0.3);
}
.share-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(245,87,108,0.4); }
.share-btn-outline {
    background: #fff;
    color: #ff6b35;
    border: 2px solid #ff6b35;
}
.share-btn-outline:hover { background: #fff5f0; }
.share-btn-sm {
    width: auto;
    padding: 8px 18px;
    font-size: 13px;
    background: #fff5f0;
    color: #ff6b35;
    border: 1px solid #ffd4bc;
}
.share-btn-sm:hover { background: #ffede3; }

/* 推广信息区 */
.share-info-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.share-info-card {
    background: #fff;
    border-radius: 16px;
    padding: 22px 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}
.share-info-card h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 14px;
    color: #1a1a2e;
}

/* 邀请码 */
.share-invite-code {
    font-size: 32px;
    font-weight: 800;
    color: #ff6b35;
    letter-spacing: 6px;
    text-align: center;
    padding: 14px 0;
    background: #fff5f0;
    border-radius: 10px;
    margin-bottom: 12px;
    border: 2px dashed #ffd4bc;
}

/* 推广链接输入框 */
.share-link-input {
    font-size: 12px !important;
    color: #666 !important;
    background: #f8f9fa !important;
    margin-bottom: 12px;
}

/* 分销规则 */
.share-rules { background: #fffdf5; border: 1px solid #fff0c0; }
.share-rule-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #fef0d0;
}
.share-rule-item:last-child { border-bottom: none; padding-bottom: 0; }
.share-rule-icon { font-size: 20px; flex-shrink: 0; line-height: 1.4; }
.share-rule-item strong { font-size: 14px; color: #333; display: block; margin-bottom: 2px; }
.share-rule-item p { font-size: 12px; color: #888; line-height: 1.5; }

/* 分享方式 */
.share-tips { margin-bottom: 30px; }
.share-tips h3 { font-size: 20px; font-weight: 700; margin-bottom: 16px; color: #1a1a2e; }
.share-tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}
.share-tip-card {
    background: #fff;
    border-radius: 14px;
    padding: 22px 18px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: transform 0.25s;
}
.share-tip-card:hover { transform: translateY(-3px); }
.share-tip-icon { font-size: 36px; margin-bottom: 10px; }
.share-tip-card h4 { font-size: 15px; font-weight: 700; margin-bottom: 6px; color: #333; }
.share-tip-card p { font-size: 12px; color: #888; line-height: 1.6; }

/* 响应式 */
@media (max-width: 768px) {
    .share-main { grid-template-columns: 1fr; }
    .share-qrcode-card { position: static; }
    .share-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   AVATAR UPLOAD (头像上传编辑)
   ============================================================ */
.avatar-wrapper {
    position: relative; display: inline-block;
    width: 72px; height: 72px; margin: 0 auto;
}
.avatar-wrapper .avatar {
    width: 72px; height: 72px; border-radius: 50%;
    object-fit: cover; border: 3px solid #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}
.avatar-overlay {
    position: absolute; inset: 0; border-radius: 50%;
    background: rgba(0,0,0,0.45); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; opacity: 0; cursor: pointer;
    transition: opacity 0.25s; text-decoration: none;
}
.avatar-wrapper:hover .avatar-overlay { opacity: 1; }

/* 大号头像（资料编辑页） */
.avatar-wrapper.avatar-lg { width: 120px; height: 120px; }
.avatar-wrapper.avatar-lg .avatar { width: 120px; height: 120px; }
.avatar-overlay-lg { font-size: 14px; text-align: center; line-height: 1.4; }

/* 资料编辑页 */
.profile-avatar-section {
    padding: 10px 0 20px; border-bottom: 1px solid #f0f0f0; margin-bottom: 24px;
}
.profile-avatar-upload { display: flex; align-items: center; gap: 20px; }
.profile-avatar-desc { font-size: 13px; color: #999; line-height: 1.8; }

.profile-nickname-section {
    padding: 10px 0 20px; border-bottom: 1px solid #f0f0f0; margin-bottom: 24px;
}
.profile-nickname-row {
    display: flex; gap: 12px; align-items: center; max-width: 400px;
}
.profile-nickname-row .form-input { flex: 1; }

.profile-info-section { padding-top: 4px; }
.profile-info-row {
    display: flex; padding: 12px 0; border-bottom: 1px solid #f8f8f8;
    font-size: 14px;
}
.profile-info-row:last-child { border-bottom: none; }
.profile-info-label { color: #999; width: 80px; flex-shrink: 0; }
.profile-info-value { color: #333; font-weight: 500; }

/* ============================================================
   弹窗公告 Popup
   ============================================================ */
.popup-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.65);
    z-index: 11000; display: flex; align-items: center; justify-content: center;
    animation: popupFadeIn 0.3s ease;
    padding: 20px;
}
@keyframes popupFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.popup-dialog {
    background: #fff; border-radius: 20px; max-width: 420px; width: 100%;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3); animation: popupSlideUp 0.35s ease;
    overflow: hidden; position: relative;
}
@keyframes popupSlideUp {
    from { opacity: 0; transform: translateY(60px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.popup-header {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white; padding: 16px 20px; display: flex;
    align-items: center; gap: 10px; font-size: 1.05rem; font-weight: 700;
}
.popup-header-icon { font-size: 1.4rem; }
.popup-close {
    position: absolute; top: 12px; right: 14px;
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(255,255,255,0.25); border: none; color: white;
    font-size: 1.2rem; cursor: pointer; display: flex; align-items: center;
    justify-content: center; line-height: 1; transition: background 0.2s;
    z-index: 2;
}
.popup-close:hover { background: rgba(255,255,255,0.45); }
.popup-body {
    padding: 24px 20px; font-size: 0.95rem; color: #334155;
    line-height: 1.8; max-height: 300px; overflow-y: auto; white-space: pre-wrap; word-break: break-word;
}
.popup-footer {
    padding: 0 20px 20px; display: flex; gap: 10px; justify-content: center;
}
.popup-footer .btn-close-popup {
    background: #f1f5f9; color: #64748b; border: none; padding: 10px 28px;
    font-weight: 600; cursor: pointer; border-radius: 20px; font-size: 0.9rem; transition: background 0.2s;
}
.popup-footer .btn-close-popup:hover { background: #e2e8f0; }
