/* ===========================
   权益充值平台 - 浅色主题 SPA
   =========================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --bg-page: #f5f6fa;
    --bg-card: #ffffff;
    --bg-input: #f5f6fa;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --text-white: #ffffff;
    --border-color: #e5e7eb;
    --border-light: #f0f0f5;
    --accent-1: #667eea;
    --accent-2: #764ba2;
    --accent-gradient: linear-gradient(135deg, #667eea, #764ba2);
    --price-color: #ef4444;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.10);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 20px;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #e8eaef;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    overflow: hidden;
}

.mobile-container {
    width: 375px;
    height: 812px;
    background: var(--bg-page);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 60px rgba(0,0,0,0.15);
    border-radius: 0;
}

/* ===========================
   SPA 页面切换
   =========================== */
.page {
    display: none;
    flex-direction: column;
    width: 100%;
    flex: 1;
    min-height: 0;
    position: relative;
}
.page.active {
    display: flex;
    animation: pageFadeIn 0.3s ease;
}
.page.behind {
    display: none !important;
}
.hidden {
    display: none !important;
}

@keyframes pageFadeIn {
    from { opacity: 0.6; transform: translateX(12px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ===========================
   状态栏
   =========================== */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px 8px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    z-index: 100;
    position: relative;
    background: var(--bg-card);
}

/* ===========================
   搜索栏
   =========================== */
.search-header {
    display: flex;
    align-items: center;
    padding: 8px 16px 12px;
    gap: 12px;
    z-index: 100;
    background: var(--bg-card);
    position: relative;
}

.search-bar {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-muted);
    font-size: 13px;
}
.search-bar:active {
    border-color: var(--accent-1);
    background: white;
}

.header-actions {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    transition: background 0.3s ease;
    color: var(--text-secondary);
}

/* ===========================
   主内容区
   =========================== */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 20px;
    scroll-behavior: smooth;
}
.main-content::-webkit-scrollbar { display: none; }

/* ===========================
   轮播图
   =========================== */
.carousel-container {
    padding: 0 16px;
    margin-bottom: 20px;
    position: relative;
}
.carousel {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 155px;
}
.carousel-item {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease;
    display: flex;
    align-items: center;
    padding: 24px;
    overflow: hidden;
}
.carousel-item.active { opacity: 1; }

.carousel-content { position: relative; z-index: 2; }
.carousel-tag {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}
.carousel-content h3 {
    color: white;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}
.carousel-content p {
    color: rgba(255,255,255,0.9);
    font-size: 13px;
    margin-bottom: 14px;
}
.carousel-btn {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
}
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
}
.dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: all 0.3s ease;
    cursor: pointer;
}
.dot.active {
    width: 18px;
    border-radius: 3px;
    background: var(--accent-gradient);
}

/* ===========================
   全部充值分类网格
   =========================== */
.full-category-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    padding: 0 16px;
    margin-bottom: 20px;
}
.full-cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 8px 2px;
    cursor: pointer;
    transition: transform 0.2s ease;
    border-radius: 8px;
}
.full-cat-item:active { transform: scale(0.92); }
.full-cat-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.full-cat-name {
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

/* ===========================
   大牌特惠横向滚动
   =========================== */
.brand-scroll {
    display: flex;
    gap: 10px;
    padding: 0 16px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-bottom: 20px;
}
.brand-scroll::-webkit-scrollbar { display: none; }
.brand-card {
    flex-shrink: 0;
    width: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}
.brand-card:active {
    transform: scale(0.95);
    box-shadow: var(--shadow-md);
}
.brand-card-icon {
    width: 48px; height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.brand-card-name {
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 600;
    text-align: center;
}
.brand-card-price {
    color: var(--price-color);
    font-size: 10px;
    font-weight: 500;
}

/* ===========================
   附近门店横向滚动
   =========================== */
.store-scroll {
    display: flex;
    gap: 10px;
    padding: 0 16px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-bottom: 20px;
}
.store-scroll::-webkit-scrollbar { display: none; }
.store-card {
    flex-shrink: 0;
    width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}
.store-card:active {
    transform: scale(0.97);
    box-shadow: var(--shadow-md);
}
.store-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.store-icon {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.store-name {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
}
.store-status {
    display: inline-block;
    font-size: 9px;
    font-weight: 500;
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 4px;
}
.store-status.open {
    background: #dcfce7;
    color: #16a34a;
}
.store-status.busy {
    background: #fef3c7;
    color: #d97706;
}
.store-address {
    color: var(--text-muted);
    font-size: 10px;
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.store-distance {
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
}

/* ===========================
   大牌甄选分类标签
   =========================== */
.pick-tags {
    display: flex;
    gap: 8px;
    padding: 0 16px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-bottom: 12px;
}
.pick-tags::-webkit-scrollbar { display: none; }
.pick-tag {
    flex-shrink: 0;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-sm);
}
.pick-tag.active {
    color: white;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    border-color: transparent;
}
.pick-tag:active {
    transform: scale(0.95);
}

/* ===========================
   大牌甄选商品列表
   =========================== */
.brand-pick-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 16px;
    margin-bottom: 20px;
}
.pick-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}
.pick-item:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-md);
}
.pick-item-img {
    width: 110px;
    height: 90px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 36px;
}
.pick-item-img::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 6px;
    background: repeating-linear-gradient(
        45deg,
        #ff6b6b,
        #ff6b6b 3px,
        #ffd43b 3px,
        #ffd43b 6px
    );
}
.pick-item-img .hot-badge {
    position: absolute;
    top: 6px; left: 6px;
    background: linear-gradient(135deg, #ff6b6b, #feca57);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}
.pick-item-info {
    flex: 1;
    padding: 8px 0;
    min-width: 0;
}
.pick-item-info h4 {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}
.pick-item-info .pick-item-desc {
    color: var(--price-color);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
}
.pick-item-info .pick-item-sub {
    color: var(--text-muted);
    font-size: 11px;
}
.pick-item-arrow {
    flex-shrink: 0;
    padding: 0 12px;
    color: var(--text-muted);
}

/* ===========================
   分类横向滑动
   =========================== */
.category-section {
    padding: 0 0 16px 0;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    margin-bottom: 12px;
}
.section-header h2 {
    color: var(--text-primary);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.3px;
}
.view-all {
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
}
.category-scroll {
    display: flex;
    gap: 8px;
    padding: 0 16px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.category-scroll::-webkit-scrollbar { display: none; }

.category-pill {
    flex-shrink: 0;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.category-pill.active {
    color: white;
    background: var(--accent-gradient);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(102,126,234,0.3);
}

/* ===========================
   瀑布流布局
   =========================== */
.waterfall-section { padding: 0 16px; }
.waterfall-section .section-header { padding: 0 0 12px 0; }

.waterfall-grid {
    display: flex;
    gap: 10px;
}
.waterfall-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ===========================
   商品卡片（浅色版）
   =========================== */
.wf-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--border-light);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    animation: wfFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    box-shadow: var(--shadow-sm);
}
.wf-card:active {
    transform: scale(0.97);
    box-shadow: var(--shadow-md);
}
@keyframes wfFadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}
.wf-card:nth-child(1) { animation-delay: 0.03s; }
.wf-card:nth-child(2) { animation-delay: 0.06s; }
.wf-card:nth-child(3) { animation-delay: 0.09s; }
.wf-card:nth-child(4) { animation-delay: 0.12s; }
.wf-card:nth-child(5) { animation-delay: 0.15s; }
.wf-card:nth-child(6) { animation-delay: 0.18s; }

.wf-card-image {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 16px;
    background: linear-gradient(135deg, #f0f4ff, #fdf2ff);
}
.wf-card-icon { position: relative; z-index: 2; }

.wf-card-badge {
    position: absolute;
    top: 8px; left: 8px;
    z-index: 3;
    background: rgba(0,0,0,0.5);
    color: white;
    font-size: 9px;
    font-weight: 600;
    padding: 3px 7px;
    border-radius: 6px;
    letter-spacing: 0.3px;
}
.wf-card-badge.hot {
    background: var(--price-color);
}
.wf-card-badge.new {
    background: var(--success-color);
    color: white;
}

.wf-card-info { padding: 10px 12px 12px; }
.wf-card-info h3 {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 3px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.wf-card-desc {
    color: var(--text-secondary);
    font-size: 10px;
    margin-bottom: 6px;
}
.wf-card-pricing {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-bottom: 6px;
}
.wf-original-price {
    color: var(--text-muted);
    font-size: 10px;
    text-decoration: line-through;
}
.wf-current-price {
    color: var(--price-color);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.3px;
}
.wf-card-tags {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
}
.wf-tag {
    background: rgba(239,68,68,0.08);
    color: var(--price-color);
    font-size: 9px;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 4px;
}

/* ===========================
   底部导航（浅色版）
   =========================== */
.bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0 28px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    position: relative;
    z-index: 100;
    flex-shrink: 0;
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 10px;
    transition: all 0.3s ease;
    padding: 4px 12px;
    border-radius: 8px;
    position: relative;
}
.nav-item.active {
    color: var(--accent-1);
}
.nav-item.active::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 16px; height: 3px;
    background: var(--accent-gradient);
    border-radius: 0 0 3px 3px;
}
.nav-item span { font-weight: 500; }

/* ===========================
   页面头部（子页面用）
   =========================== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
}
.back-btn, .placeholder {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease;
    color: var(--text-primary);
}
.back-btn:active { background: var(--bg-input); }
.placeholder { visibility: hidden; }
.page-title {
    color: var(--text-primary);
    font-size: 17px;
    font-weight: 600;
}

/* ===========================
   分类页
   =========================== */
.cat-search-bar {
    margin: 12px 16px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-muted);
    font-size: 13px;
}
.cat-search-bar:active {
    border-color: var(--accent-1);
    background: white;
}
.category-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 20px;
}
.category-content::-webkit-scrollbar { display: none; }

.cat-section {
    margin-bottom: 24px;
    padding: 0 16px;
}
.cat-section-title {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 14px;
    letter-spacing: -0.3px;
}

.hot-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.cat-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 4px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}
.cat-grid-item:active {
    transform: scale(0.94);
    box-shadow: var(--shadow-md);
}
.cat-grid-item span {
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 500;
}
.cat-grid-item em {
    color: var(--text-secondary);
    font-size: 10px;
    font-style: normal;
}
.cat-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.cat-sub-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* 卡片网格布局（分类商品页） */
.category-product-list {
    padding: 12px 16px 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.cat-sub-item {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.cat-sub-item:active {
    background: var(--bg-input);
    transform: scale(0.985);
}
.cat-sub-icon {
    width: 100%;
    aspect-ratio: 1 / 0.85;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}
.cat-sub-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}
.cat-sub-icon .icon-fallback {
    position: relative;
    z-index: 2;
    font-size: 36px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}
.cat-sub-info {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.cat-sub-name {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cat-sub-desc {
    color: var(--text-secondary);
    font-size: 11px;
}
.cat-sub-price {
    color: var(--price-color);
    font-size: 15px;
    font-weight: 700;
    margin-top: 2px;
}
.cat-sub-price-row {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-top: 2px;
}
.cat-sub-original {
    color: #9ca3af;
    font-size: 11px;
    font-weight: 400;
    text-decoration: line-through;
}
.cat-sub-arrow {
    display: none;
}

/* ===========================
   订单页
   =========================== */
.orders-tabs {
    display: flex;
    padding: 12px 16px 0;
    gap: 4px;
    position: sticky;
    top: 44px;
    z-index: 99;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding-bottom: 12px;
}
.order-tab {
    flex: 1;
    text-align: center;
    padding: 7px 0;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
}
.order-tab.active {
    color: var(--accent-1);
    background: rgba(102,126,234,0.08);
}
.order-tab.active::after {
    content: '';
    position: absolute;
    bottom: -12px; left: 50%;
    transform: translateX(-50%);
    width: 16px; height: 2px;
    background: var(--accent-gradient);
    border-radius: 1px;
}

.orders-list {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.order-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: orderFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
    box-shadow: var(--shadow-sm);
}
.order-card:nth-child(1) { animation-delay: 0.03s; }
.order-card:nth-child(2) { animation-delay: 0.06s; }
.order-card:nth-child(3) { animation-delay: 0.09s; }

@keyframes orderFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.order-card:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-md);
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.order-no {
    color: var(--text-muted);
    font-size: 11px;
    font-family: 'SF Mono', 'Menlo', monospace;
}
.order-status {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
}
.order-status.pending {
    color: var(--warning-color);
    background: rgba(245,158,11,0.1);
}
.order-status.completed {
    color: var(--success-color);
    background: rgba(16,185,129,0.1);
}
.order-status.cancelled {
    color: var(--text-muted);
    background: rgba(156,163,175,0.1);
}

.order-card-body {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}
.order-product-img {
    width: 48px; height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, #f0f4ff, #fdf2ff);
}
.order-product-name {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.order-product-spec {
    color: var(--text-secondary);
    font-size: 11px;
}
.order-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--border-light);
}
.order-date {
    color: var(--text-muted);
    font-size: 11px;
}
.order-amount {
    color: var(--price-color);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.3px;
}
.order-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.order-btn {
    flex: 1;
    text-align: center;
    padding: 7px 0;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}
.order-btn.primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 2px 10px rgba(102,126,234,0.25);
}
.order-btn.secondary {
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}
.order-btn:active { transform: scale(0.96); }

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 32px;
    animation: orderFadeIn 0.5s ease both;
}
.empty-icon {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--text-muted);
}
.empty-state h3 {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}
.empty-state p {
    color: var(--text-secondary);
    font-size: 13px;
    text-align: center;
    line-height: 1.5;
}
.empty-btn {
    margin-top: 20px;
    background: var(--accent-gradient);
    color: white;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 28px;
    border-radius: 20px;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 15px rgba(102,126,234,0.25);
    transition: transform 0.2s ease;
}
.empty-btn:active { transform: scale(0.96); }

.orders-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 20px;
}
.orders-content::-webkit-scrollbar { display: none; }

/* ===========================
   个人中心页
   =========================== */
.profile-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 20px;
}
.profile-content::-webkit-scrollbar { display: none; }

.profile-hero {
    position: relative;
    padding: 32px 24px 24px;
    text-align: center;
    overflow: hidden;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
}
.profile-avatar {
    position: relative;
    z-index: 2;
    margin-bottom: 12px;
}
.avatar-ring {
    width: 68px; height: 68px;
    margin: 0 auto;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(102,126,234,0.1), rgba(118,75,162,0.1));
    border: 2px solid rgba(102,126,234,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(102,126,234,0.1);
    color: var(--accent-1);
}
.profile-name {
    position: relative;
    z-index: 2;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}
.profile-login-btn {
    position: relative;
    z-index: 2;
    display: inline-block;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    padding: 6px 16px;
    border-radius: 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}
.profile-login-btn:active {
    background: rgba(102,126,234,0.05);
    border-color: rgba(102,126,234,0.2);
    color: var(--accent-1);
}

.assets-bar {
    display: flex;
    margin: 0 16px 24px;
    padding: 16px 0;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}
.asset-item {
    flex: 1;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.asset-item:active { transform: scale(0.95); }
.asset-value {
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-bottom: 2px;
}
.asset-label {
    color: var(--text-secondary);
    font-size: 11px;
}
.asset-divider {
    width: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

.profile-section {
    margin: 0 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.profile-cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 14px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid var(--border-light);
}
.profile-cell.no-border { border-bottom: none; }
.profile-cell:active { background: var(--bg-input); }

.cell-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.cell-left span {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}
.cell-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cell-right {
    display: flex;
    align-items: center;
    gap: 4px;
}
.cell-hint {
    color: var(--text-muted);
    font-size: 12px;
}

/* ===========================
   商品详情页
   =========================== */
.detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0);
    transition: background 0.3s ease;
}
.detail-header.scrolled {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
}
.back-btn, .detail-header-actions {
    width: 32px; height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease;
    color: var(--text-primary);
}
.back-btn:active, .detail-header-actions:active {
    background: var(--bg-input);
}
.detail-header-title {
    color: transparent;
    font-size: 16px;
    font-weight: 600;
    transition: color 0.3s ease;
}
.detail-header.scrolled .detail-header-title {
    color: var(--text-primary);
}

.detail-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 20px;
}
.detail-content::-webkit-scrollbar { display: none; }

.detail-hero {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.detail-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}
.detail-hero-tag {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 12px;
    border: 1px solid rgba(255,255,255,0.1);
}

.detail-info { padding: 20px 16px 0; }

.detail-name {
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}
.detail-sales {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}
.sales-num, .sales-rating {
    color: var(--text-secondary);
    font-size: 12px;
}
.sales-divider { color: var(--border-color); }

.detail-pricing {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}
.detail-current-price {
    color: var(--price-color);
    font-weight: 700;
    display: flex;
    align-items: baseline;
}
.price-symbol { font-size: 16px; margin-right: 1px; }
.price-value { font-size: 28px; letter-spacing: -1px; }
.price-decimal { font-size: 16px; }

.detail-original-price {
    color: var(--text-muted);
    font-size: 13px;
    text-decoration: line-through;
}
.detail-discount {
    background: rgba(239,68,68,0.08);
    color: var(--price-color);
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.detail-section { margin-bottom: 20px; }
.detail-section-title {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: -0.2px;
}

.denomination-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.deno-item {
    padding: 9px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.25s ease;
}
.deno-item.active {
    color: var(--accent-1);
    background: rgba(102,126,234,0.06);
    border-color: var(--accent-1);
    box-shadow: 0 2px 10px rgba(102,126,234,0.1);
}
.deno-item:active { transform: scale(0.96); }

.phone-input-wrap {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0 14px;
    transition: border-color 0.3s ease;
}
.phone-input-wrap:focus-within {
    border-color: var(--accent-1);
}
.phone-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 15px;
    padding: 12px 0;
    font-family: 'SF Mono', 'Menlo', monospace;
    letter-spacing: 0.5px;
}
.phone-input::placeholder {
    color: var(--text-muted);
    font-family: 'Noto Sans SC', sans-serif;
    letter-spacing: 0;
}
.phone-clear {
    width: 24px; height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s ease;
    color: var(--text-muted);
}
.phone-clear:active { background: var(--bg-input); }
.phone-tips {
    color: var(--text-muted);
    font-size: 11px;
    margin-top: 6px;
    padding-left: 2px;
}

.service-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.service-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 12px;
}
.service-item svg { flex-shrink: 0; }

.review-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 10px;
    animation: reviewFadeIn 0.4s ease both;
    box-shadow: var(--shadow-sm);
}
@keyframes reviewFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.review-card:nth-child(2) { animation-delay: 0.08s; }

.review-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.review-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: rgba(102,126,234,0.08);
    border: 1px solid rgba(102,126,234,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-1);
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}
.review-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.review-name {
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 500;
}
.review-date {
    color: var(--text-muted);
    font-size: 10px;
}
.review-stars {
    color: var(--warning-color);
    font-size: 12px;
    letter-spacing: 1px;
}
.review-content {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.6;
}

/* 底部购买栏 */
.buy-bar {
    display: flex;
    align-items: center;
    padding: 8px 16px 28px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-light);
    gap: 12px;
    position: relative;
    z-index: 100;
    flex-shrink: 0;
}
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .buy-bar {
        padding-bottom: calc(8px + env(safe-area-inset-bottom));
    }
}
.buy-bar-actions {
    display: flex;
    gap: 4px;
}
.buy-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px 10px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s ease;
    color: var(--text-secondary);
}
.buy-action-item:active { background: var(--bg-input); }
.buy-action-item span {
    color: var(--text-secondary);
    font-size: 9px;
    font-weight: 500;
}
.buy-bar-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--accent-gradient);
    color: white;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 0;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102,126,234,0.25);
    transition: all 0.2s ease;
    border: none;
}
.buy-bar-btn:active {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(102,126,234,0.2);
}
.buy-price {
    font-size: 16px;
    font-weight: 700;
}

/* ===========================
   Toast 提示
   =========================== */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(0,0,0,0.78);
    color: white;
    font-size: 13px;
    font-weight: 500;
    padding: 10px 22px;
    border-radius: 10px;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 9999;
    white-space: nowrap;
}
.toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* ===========================
   我的权益页
   =========================== */
.equity-tabs {
    display: flex;
    padding: 12px 16px 0;
    gap: 4px;
    position: sticky;
    top: 44px;
    z-index: 99;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding-bottom: 12px;
}
.equity-tab {
    flex: 1;
    text-align: center;
    padding: 7px 0;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
}
.equity-tab.active {
    color: var(--accent-1);
    background: rgba(102,126,234,0.08);
}
.equity-tab.active::after {
    content: '';
    position: absolute;
    bottom: -12px; left: 50%;
    transform: translateX(-50%);
    width: 16px; height: 2px;
    background: var(--accent-gradient);
    border-radius: 1px;
}

.equity-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 20px;
}
.equity-content::-webkit-scrollbar { display: none; }

.equity-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    animation: equityFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.equity-card.unused { border-left: 3px solid #10b981; }
.equity-card.used { border-left: 3px solid #9ca3af; opacity: 0.75; }
.equity-card.expired { border-left: 3px solid #ef4444; opacity: 0.6; }
.equity-card:active { transform: scale(0.98); box-shadow: var(--shadow-md); }

@keyframes equityFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.equity-card:nth-child(1) { animation-delay: 0.03s; }
.equity-card:nth-child(2) { animation-delay: 0.06s; }
.equity-card:nth-child(3) { animation-delay: 0.09s; }
.equity-card:nth-child(4) { animation-delay: 0.12s; }
.equity-card:nth-child(5) { animation-delay: 0.15s; }

.equity-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.equity-icon {
    width: 42px; height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.equity-info { flex: 1; min-width: 0; }
.equity-name {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.equity-type {
    color: var(--text-secondary);
    font-size: 11px;
}
.equity-status {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
}
.equity-status.unused { background: #d1fae5; color: #065f46; }
.equity-status.used { background: #f3f4f6; color: #6b7280; }
.equity-status.expired { background: #fee2e2; color: #991b1b; }

.equity-desc {
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
}

.equity-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.equity-meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.equity-expire {
    color: var(--text-muted);
    font-size: 10px;
}
.equity-buy-date {
    color: var(--text-muted);
    font-size: 10px;
}
.equity-price {
    color: var(--price-color);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.equity-code-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-light);
}
.equity-code-label {
    color: var(--text-muted);
    font-size: 10px;
    flex-shrink: 0;
}
.equity-code {
    flex: 1;
    color: var(--accent-1);
    font-size: 12px;
    font-weight: 600;
    font-family: 'SF Mono', 'Menlo', monospace;
    letter-spacing: 0.5px;
}
.equity-copy {
    flex-shrink: 0;
    background: rgba(102,126,234,0.08);
    color: var(--accent-1);
    font-size: 10px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(102,126,234,0.15);
}
.equity-copy:active {
    background: var(--accent-gradient);
    color: white;
    transform: scale(0.95);
}

/* ===========================
   分类页筛选条（新版）
   =========================== */
.category-filter-scroll {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-card);
    position: sticky;
    top: 44px;
    z-index: 99;
}
.category-filter-scroll::-webkit-scrollbar { display: none; }

.category-filter-scroll .category-pill {
    flex-shrink: 0;
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}
.category-filter-scroll .category-pill.active {
    color: white;
    background: var(--accent-gradient);
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(102,126,234,0.25);
}
.category-filter-scroll .category-pill:active {
    transform: scale(0.95);
}

/* 加载占位符 */
.loading-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    color: var(--text-muted);
    font-size: 13px;
}

/* ===========================
   安全区域
   =========================== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .bottom-nav {
        padding-bottom: calc(28px + env(safe-area-inset-bottom));
    }
}

/* ===========================
   数量选择器
   =========================== */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    width: fit-content;
}
.qty-btn {
    width: 40px;
    height: 36px;
    border: none;
    background: var(--bg-input);
    font-size: 18px;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}
.qty-btn:disabled {
    color: var(--text-hint);
    cursor: not-allowed;
}
.qty-btn:active:not(:disabled) {
    background: var(--border-color);
}
.qty-value {
    width: 50px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    background: #fff;
}
