/* ================================
   PricePeek - Smart Price Comparison
   Modern, Clean, International
   With Member System
   ================================ */

/* CSS Variables - Design System */
:root {
    --primary: #6366F1;
    --primary-light: #818CF8;
    --primary-dark: #4F46E5;
    --secondary: #10B981;
    --accent: #F59E0B;
    --danger: #EF4444;
    --vip-gold: #FFD700;
    --vip-gradient: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8FAFC;
    --bg-tertiary: #F1F5F9;
    --bg-dark: #0F172A;
    
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    
    --border-color: #E2E8F0;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
    
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    --header-height: 60px;
    --bottom-nav-height: 64px;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #0F172A;
    --bg-secondary: #1E293B;
    --bg-tertiary: #334155;
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --border-color: #334155;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-family);
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Language-specific Fonts */
html[lang="zh"],
html[lang="zh-TW"] {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', 'Segoe UI', sans-serif;
}

html[lang="ja"] {
    font-family: 'Hiragino Sans', 'Yu Gothic', 'Meiryo', 'Noto Sans JP', 'Segoe UI', sans-serif;
}

html[lang="ko"] {
    font-family: 'Malgun Gothic', 'Noto Sans KR', 'Dotum', 'Segoe UI', sans-serif;
}

html[lang="en"],
html[lang="es"],
html[lang="fr"] {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* App Container */
#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-bottom: var(--bottom-nav-height);
}

/* ================================
   Header
   ================================ */
.header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--header-height);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-md);
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
}

.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}

.logo:hover .logo-icon {
    transform: scale(1.05);
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.logo-badge {
    background: var(--vip-gradient);
    color: #000;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    padding-top: 3px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* User Area */
.user-area { position: relative; }

.login-btn {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.login-btn:hover { background: var(--primary-dark); }
.login-btn svg { width: 18px; height: 18px; }

.user-menu { position: relative; }

.user-avatar-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs);
    background: transparent;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.user-avatar-btn:hover { background: var(--bg-tertiary); }

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-avatar-btn svg { width: 16px; height: 16px; color: var(--text-muted); }

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-normal);
    z-index: 200;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: var(--space-md);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    color: white;
}

.dropdown-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dropdown-user-name {
    font-weight: 700;
    font-size: 1rem;
}

.dropdown-user-email {
    font-size: 0.75rem;
    opacity: 0.9;
}

.member-tag {
    display: inline-block;
    margin-top: var(--space-sm);
    padding: 2px 8px;
    background: var(--vip-gradient);
    color: #000;
    font-size: 0.625rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
}

.dropdown-divider { height: 1px; background: var(--border-color); }

.dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    color: var(--text-primary);
    text-decoration: none;
    transition: background var(--transition-fast);
    background: none;
    border: none;
    width: 100%;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    text-align: left;
}

.dropdown-item:hover { background: var(--bg-tertiary); }
.dropdown-item svg { width: 20px; height: 20px; color: var(--text-secondary); }
.dropdown-item.logout { color: var(--danger); }
.dropdown-item.logout svg { color: var(--danger); }

.admin-btn, .theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.admin-btn:hover, .theme-toggle:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.admin-btn svg, .theme-toggle svg { width: 20px; height: 20px; }

.theme-toggle .moon-icon { display: none; }
[data-theme="dark"] .theme-toggle .sun-icon { display: none; }
[data-theme="dark"] .theme-toggle .moon-icon { display: block; }

/* ================================
   Main Content
   ================================ */
.main-content {
    flex: 1;
    padding: calc(var(--header-height) + var(--space-md)) var(--space-md) var(--space-md);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.page { display: none; animation: fadeIn var(--transition-normal); }
.page.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ================================
   Home Page
   ================================ */

.search-hero {
    text-align: center;
    padding: var(--space-xl) 0;
}

.hero-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.hero-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-xs);
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-md);
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.search-icon {
    width: 24px;
    height: 24px;
    color: var(--text-muted);
    margin-left: var(--space-md);
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: var(--space-md);
    font-size: 1rem;
    color: var(--text-primary);
    outline: none;
}

.search-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.scan-btn-large {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    width: 100%;
    margin-top: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-primary);
    border: 2px dashed var(--primary);
    border-radius: var(--radius-lg);
    color: var(--primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.scan-btn-large:hover {
    background: rgba(99, 102, 241, 0.05);
}

.scan-btn-large svg { width: 24px; height: 24px; }

/* Sections */
.section { margin-top: var(--space-xl); }

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.section-more {
    font-size: 0.875rem;
    color: var(--primary);
    text-decoration: none;
}

.deal-badge {
    background: linear-gradient(135deg, #FF4757 0%, #FF6B81 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

/* Categories Scroll */
.categories-scroll {
    display: flex;
    gap: var(--space-md);
    overflow-x: auto;
    padding: var(--space-sm) 0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.categories-scroll::-webkit-scrollbar { display: none; }

.category-chip {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition-fast);
    min-width: 80px;
}

.category-chip:hover, .category-chip.active {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.category-chip-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    font-size: 1.5rem;
}

.category-chip-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

/* Deals Grid */
.deals-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.deal-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.deal-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.deal-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    background: var(--bg-tertiary);
}

.deal-info {
    padding: var(--space-md);
}

.deal-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.deal-prices {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.deal-price-current {
    font-size: 1rem;
    font-weight: 700;
    color: var(--danger);
}

.deal-price-original {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.deal-discount {
    font-size: 0.625rem;
    font-weight: 700;
    color: white;
    background: var(--danger);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

/* Products List */
.products-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.product-list-item {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.product-list-item:hover {
    border-color: var(--primary);
}

.product-list-image {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    object-fit: cover;
    background: var(--bg-tertiary);
    flex-shrink: 0;
}

.product-list-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-list-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.product-list-category {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.product-list-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-list-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--secondary);
}

.product-list-stores {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ================================
   Categories Page
   ================================ */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.edit-btn {
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.category-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

/* 分类页大卡片（此前缺失样式导致图标与文字错位） */
.category-card-large {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl) var(--space-md);
    text-align: center;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.category-card-large:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.category-card-large .category-icon {
    width: 64px;
    height: 64px;
    margin-bottom: var(--space-md);
    font-size: 2.75rem;
}

.category-card-large .category-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.category-card-large .category-count {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.category-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.category-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.category-count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.category-products { margin-top: var(--space-lg); }

.back-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 0.875rem;
    cursor: pointer;
    margin-bottom: var(--space-md);
}

.back-btn svg { width: 20px; height: 20px; }

.category-products-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

/* ================================
   Favorites Page
   ================================ */
.favorites-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.favorite-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.favorite-item-image {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    object-fit: cover;
    background: var(--bg-tertiary);
}

.favorite-item-info { flex: 1; }

.favorite-item-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.favorite-item-price {
    font-size: 0.875rem;
    color: var(--secondary);
    font-weight: 600;
}

.remove-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: none;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-btn:hover { background: var(--danger); color: white; }
.remove-btn svg { width: 18px; height: 18px; }

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-muted);
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: var(--space-md);
    opacity: 0.5;
}

.empty-state p {
    font-size: 0.875rem;
    margin-bottom: var(--space-lg);
}

.empty-action-btn {
    padding: var(--space-md) var(--space-xl);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}

/* ================================
   Alerts Page
   ================================ */
.add-alert-btn {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}

.add-alert-btn svg { width: 18px; height: 18px; }

.alerts-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.alert-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.alert-item-image {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    object-fit: cover;
    background: var(--bg-tertiary);
}

.alert-item-info { flex: 1; }

.alert-item-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.alert-item-target {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.alert-item-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-xs);
}

.alert-item-price {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--secondary);
}

.alert-status {
    font-size: 0.625rem;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 600;
}

.alert-status.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--secondary);
}

.alert-status.triggered {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.member-only-notice {
    text-align: center;
    padding: var(--space-2xl);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 165, 0, 0.1) 100%);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.notice-icon { font-size: 3rem; margin-bottom: var(--space-md); }

.member-only-notice h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.member-only-notice p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.upgrade-btn {
    padding: var(--space-md) var(--space-xl);
    background: var(--vip-gradient);
    color: #000;
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
}

/* ================================
   Membership Page
   ================================ */
.membership-hero {
    text-align: center;
    padding: var(--space-xl) 0;
}

.membership-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-lg);
}

.badge-icon { font-size: 1.5rem; }
.badge-text { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); }

.membership-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.membership-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Membership Plans */
.membership-plans {
    display: grid;
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

.plan-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    border: 2px solid var(--border-color);
    position: relative;
}

.plan-card.vip {
    border-color: var(--vip-gold);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05) 0%, rgba(255, 165, 0, 0.05) 100%);
}

.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--vip-gradient);
    color: #000;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-full);
}

.plan-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.plan-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    margin-bottom: var(--space-sm);
}

.plan-price .price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.plan-price .period {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.plan-features {
    list-style: none;
    margin-bottom: var(--space-lg);
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    font-size: 0.875rem;
}

.plan-features li svg { width: 18px; height: 18px; }

.plan-features li.included { color: var(--text-primary); }
.plan-features li.included svg { color: var(--secondary); }

.plan-features li.not-included { color: var(--text-muted); }
.plan-features li.not-included svg { color: var(--text-muted); }

.plan-btn {
    width: 100%;
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.plan-btn.current {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

.plan-btn:not(.current) {
    background: var(--primary);
    border: none;
    color: white;
}

.plan-btn:not(.current):hover { background: var(--primary-dark); }

.plan-card.vip .plan-btn {
    background: var(--vip-gradient);
    color: #000;
}

.plan-card.vip .plan-btn:hover { opacity: 0.9; }

.plan-card.enterprise .plan-btn {
    background: linear-gradient(135deg, #1E293B 0%, #334155 100%);
    color: white;
}

/* Membership Benefits */
.membership-benefits { margin-top: var(--space-2xl); }

.benefits-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
    text-align: center;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.benefit-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    border: 1px solid var(--border-color);
}

.benefit-icon { font-size: 2rem; margin-bottom: var(--space-sm); }

.benefit-card h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.benefit-card p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ================================
   Profile Page
   ================================ */
.profile-header {
    text-align: center;
    padding: var(--space-xl) 0;
}

.profile-avatar-section {
    position: relative;
    display: inline-block;
    margin-bottom: var(--space-md);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
}

.change-avatar-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.change-avatar-btn svg { width: 14px; height: 14px; color: var(--text-secondary); }

.profile-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.profile-email {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.profile-membership {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.profile-form {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    margin-top: var(--space-lg);
}

.form-section { margin-bottom: var(--space-xl); }

.form-section:last-child { margin-bottom: 0; }

.form-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border-color);
}

.form-group { margin-bottom: var(--space-md); }

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.input-with-verify {
    display: flex;
    gap: var(--space-sm);
}

.input-with-verify input { flex: 1; }

.verify-btn {
    padding: var(--space-md) var(--space-lg);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.password-input {
    position: relative;
}

.show-password-btn {
    position: absolute;
    right: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
}

.show-password-btn svg { width: 20px; height: 20px; color: var(--text-muted); }

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    cursor: pointer;
}

.checkbox-label input { width: auto; }

.toggle-group { display: flex; flex-direction: column; gap: var(--space-md); }

.toggle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.toggle {
    position: relative;
    width: 48px;
    height: 28px;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--border-color);
    transition: var(--transition-normal);
    border-radius: var(--radius-full);
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: var(--transition-normal);
    border-radius: 50%;
}

.toggle input:checked + .toggle-slider { background-color: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

.save-profile-btn {
    width: 100%;
    padding: var(--space-md);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: var(--space-lg);
}

.save-profile-btn:hover { background: var(--primary-dark); }

/* ================================
   Bottom Navigation
   ================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 var(--space-md);
    z-index: 100;
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: var(--space-sm) var(--space-md);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    transition: all var(--transition-fast);
}

.nav-btn svg { width: 24px; height: 24px; }

.nav-btn span {
    font-size: 0.625rem;
    font-weight: 600;
}

.nav-btn.active { color: var(--primary); }

.nav-badge {
    position: absolute;
    top: 0;
    right: 8px;
    min-width: 16px;
    height: 16px;
    background: var(--danger);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.nav-badge.vip-only {
    background: var(--vip-gradient);
    color: #000;
}

/* ================================
   Modals
   ================================ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
}

.modal.active, .modal.show { display: flex; }

/* ================================
   通用功能面板（订单/资产/客服等）
   ================================ */
.feature-panel { max-width: 460px; max-height: 82vh; display: flex; flex-direction: column; }

.feature-panel .modal-title { padding-right: 40px; }

.feature-panel-body {
    overflow-y: auto;
    flex: 1;
    min-height: 120px;
    padding-right: 4px;
}

.fp-subtitle { font-size: 0.8125rem; color: var(--text-muted); margin-bottom: var(--space-md); }

.fp-list { display: flex; flex-direction: column; gap: 10px; }

.fp-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
}

.fp-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.fp-card-title { font-weight: 600; font-size: 0.9rem; color: var(--text-primary); }
.fp-card-sub { font-size: 0.8125rem; color: var(--text-muted); }

.fp-tag {
    display: inline-block; font-size: 0.6875rem; padding: 2px 8px; border-radius: 99px;
    background: var(--primary); color: #fff; font-weight: 600; white-space: nowrap;
}
.fp-tag.gray { background: var(--bg-tertiary); color: var(--text-muted); }
.fp-tag.green { background: #10B981; }
.fp-tag.orange { background: #F59E0B; }
.fp-tag.red { background: #EF4444; }

.fp-amount { font-size: 1.5rem; font-weight: 700; color: var(--secondary); }

.fp-btn {
    border: none; border-radius: var(--radius-md); padding: 9px 14px;
    font-size: 0.8125rem; font-weight: 600; cursor: pointer; white-space: nowrap;
    background: var(--primary); color: #fff; transition: opacity .15s;
}
.fp-btn:hover { opacity: .88; }
.fp-btn.ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border-color); }
.fp-btn.danger { background: #EF4444; }
.fp-btn.block { width: 100%; padding: 12px; font-size: 0.9375rem; }
.fp-btn:disabled { opacity: .45; cursor: not-allowed; }

.fp-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; flex-wrap: wrap; }

.fp-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border-color); gap: 10px; }
.fp-row:last-child { border-bottom: none; }

.fp-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0; }

.fp-empty { text-align: center; padding: 36px 12px; color: var(--text-muted); font-size: 0.875rem; }
.fp-empty svg { width: 42px; height: 42px; opacity: .35; margin-bottom: 10px; }

/* 客服聊天 */
.fp-chat { display: flex; flex-direction: column; gap: 10px; padding: 4px 0 10px; }
.fp-bubble { max-width: 78%; padding: 9px 12px; border-radius: 14px; font-size: 0.875rem; line-height: 1.5; word-break: break-word; }
.fp-bubble.bot { align-self: flex-start; background: var(--bg-secondary); border: 1px solid var(--border-color); border-bottom-left-radius: 4px; }
.fp-bubble.user { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.fp-chat-time { font-size: 0.6875rem; color: var(--text-muted); margin-top: 3px; }
.fp-chat-input { display: flex; gap: 8px; margin-top: 8px; }
.fp-chat-input input {
    flex: 1; border: 1px solid var(--border-color); background: var(--bg-secondary);
    color: var(--text-primary); border-radius: var(--radius-md); padding: 10px 12px; font-size: 0.875rem;
}
.fp-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fp-quick button {
    border: 1px solid var(--border-color); background: var(--bg-secondary); color: var(--text-secondary);
    border-radius: 99px; padding: 5px 12px; font-size: 0.75rem; cursor: pointer;
}

/* 表单 */
.fp-form { display: flex; flex-direction: column; gap: 12px; }
.fp-form label { font-size: 0.8125rem; font-weight: 600; color: var(--text-secondary); display: block; margin-bottom: 5px; }
.fp-form input, .fp-form select, .fp-form textarea {
    width: 100%; border: 1px solid var(--border-color); background: var(--bg-secondary);
    color: var(--text-primary); border-radius: var(--radius-md); padding: 10px 12px; font-size: 0.875rem;
}
.fp-form textarea { min-height: 64px; resize: vertical; }

/* 开关 */
.fp-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.fp-switch input { opacity: 0; width: 0; height: 0; }
.fp-switch .slider {
    position: absolute; inset: 0; background: var(--bg-tertiary); border-radius: 99px; cursor: pointer;
    border: 1px solid var(--border-color); transition: .2s;
}
.fp-switch .slider:before {
    content: ""; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px;
    background: #fff; border-radius: 50%; transition: .2s;
}
.fp-switch input:checked + .slider { background: var(--primary); border-color: var(--primary); }
.fp-switch input:checked + .slider:before { transform: translateX(20px); }

/* 订单商品行 */
.fp-order-items { font-size: 0.8125rem; color: var(--text-secondary); line-height: 1.7; }
.fp-order-total { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border-color); }
.fp-order-total .price { color: var(--secondary); font-weight: 700; font-size: 1.0625rem; }

/* 结算摘要 */
.fp-checkout-summary { background: var(--bg-secondary); border-radius: var(--radius-md); padding: 12px; font-size: 0.8125rem; color: var(--text-secondary); }
.fp-checkout-summary .fp-row { border-bottom: 1px dashed var(--border-color); }

/* FAQ */
.fp-faq-q { font-weight: 600; font-size: 0.875rem; color: var(--text-primary); cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 4px 0; }
.fp-faq-a { font-size: 0.8125rem; color: var(--text-muted); line-height: 1.6; padding: 8px 0 12px; border-bottom: 1px solid var(--border-color); }

/* 头像选择 */
.fp-avatars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.fp-avatar-opt {
    aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 1.75rem;
    border-radius: var(--radius-md); border: 2px solid var(--border-color); background: var(--bg-secondary); cursor: pointer;
}
.fp-avatar-opt.selected { border-color: var(--primary); background: var(--bg-tertiary); }

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp var(--transition-normal);
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover { background: var(--text-primary); color: var(--bg-primary); }
.modal-close svg { width: 20px; height: 20px; }

/* Auth Modal */
.auth-modal-content { max-width: 400px; }

.auth-header { text-align: center; margin-bottom: var(--space-xl); }

.auth-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-md);
    border-radius: 16px;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.auth-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.auth-form { display: flex; flex-direction: column; gap: var(--space-md); }

.forgot-password { text-align: right; }

.forgot-password a {
    font-size: 0.875rem;
    color: var(--primary);
    text-decoration: none;
}

.auth-submit-btn {
    padding: var(--space-md);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.auth-divider {
    text-align: center;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.auth-divider span {
    position: relative;
    background: var(--bg-primary);
    padding: 0 var(--space-md);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.social-login {
    display: flex;
    gap: var(--space-md);
}

.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.social-btn:hover { border-color: var(--text-muted); }
.social-btn svg { width: 20px; height: 20px; }
.social-btn.wechat { color: #07C160; }
.social-btn.apple { color: #000; }

.auth-switch {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.auth-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.code-input-group {
    display: flex;
    gap: var(--space-sm);
}

.code-input-group input { flex: 1; }

.send-code-btn {
    padding: var(--space-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    white-space: nowrap;
}

.agreement {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.agreement a { color: var(--primary); }

/* Comparison Modal */
.comparison-modal { max-width: 600px; }

/* Language Modal */
.language-modal {
    max-width: 360px;
    padding: var(--space-lg);
}

.language-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    padding-right: 0;
}

.language-modal .modal-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.language-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    width: 100%;
    text-align: left;
    font-family: inherit;
    font-size: inherit;
}

.lang-option:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

.lang-option.active {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
}

.lang-flag {
    font-size: 1.25rem;
    width: 28px;
    text-align: center;
}

.lang-name {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
}

.lang-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.lang-option.active .lang-check {
    opacity: 1;
}

/* Dropdown language current */
.lang-current {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.modal-header {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    padding-right: var(--space-xl);
}

.product-image {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-md);
    object-fit: cover;
    background: var(--bg-tertiary);
}

.product-info { flex: 1; }

.product-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.product-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.product-qr-info {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    margin-top: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.product-qr-info svg { width: 14px; height: 14px; }

.add-favorite-btn {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-top: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.add-favorite-btn:hover { border-color: var(--danger); color: var(--danger); }
.add-favorite-btn svg { width: 18px; height: 18px; }

.add-favorite-btn.active {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
}

.add-favorite-btn.active svg { fill: currentColor; }

.share-btn {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-top: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.share-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.share-btn svg { width: 18px; height: 18px; }

.price-alert-section {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 165, 0, 0.05) 100%);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--vip-gold);
}

.set-alert-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--vip-gradient);
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    color: #000;
    cursor: pointer;
}

.set-alert-btn svg { width: 18px; height: 18px; }

.member-only-tag {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--vip-gold);
}

.price-comparison { margin-bottom: var(--space-lg); }

.comparison-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.store-count {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
}

.stores-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.store-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.store-logo {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    color: white;
}

.store-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.store-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--secondary);
}

.store-price.best {
    color: var(--danger);
}

.price-chart {
    display: flex;
    align-items: flex-end;
    gap: var(--space-sm);
    height: 100px;
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.chart-bar {
    flex: 1;
    background: linear-gradient(to top, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    min-height: 10px;
    position: relative;
}

.chart-bar::after {
    content: attr(data-price);
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.625rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Set Alert Modal */
.set-alert-modal { max-width: 400px; }

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.modal-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.radio-label {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    cursor: pointer;
}

.radio-label input { width: auto; }

.submit-btn {
    width: 100%;
    padding: var(--space-md);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: var(--space-lg);
}

/* Admin Modal */
.admin-modal-content { max-width: 900px; }

.admin-header { margin-bottom: var(--space-lg); }

.admin-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.admin-title svg { width: 24px; height: 24px; color: var(--primary); }

.admin-tabs {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--space-sm);
}

.admin-tab-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
}

.admin-tab-btn svg { width: 18px; height: 18px; }

.admin-tab-btn.active {
    background: var(--primary);
    color: white;
}

.admin-panel { display: none; }
.admin-panel.active { display: block; }

.admin-actions {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.admin-action-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
}

.admin-action-btn svg { width: 18px; height: 18px; }
.admin-action-btn:hover { border-color: var(--primary); color: var(--primary); }
.admin-action-btn.primary { background: var(--primary); border-color: var(--primary); color: white; }
.admin-action-btn.primary:hover { background: var(--primary-dark); }

.admin-search {
    margin-bottom: var(--space-md);
}

.admin-search input {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    background: var(--bg-secondary);
}

.admin-search input:focus {
    outline: none;
    border-color: var(--primary);
}

.admin-table-container {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.admin-table th,
.admin-table td {
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.admin-table tbody tr:hover { background: var(--bg-secondary); }

.qr-cell {
    font-family: monospace;
    background: var(--bg-tertiary);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
}

.actions-cell { display: flex; gap: var(--space-xs); }

.edit-btn, .delete-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.edit-btn { background: var(--bg-tertiary); color: var(--primary); }
.edit-btn:hover { background: var(--primary); color: white; }

.delete-btn { background: var(--bg-tertiary); color: var(--danger); }
.delete-btn:hover { background: var(--danger); color: white; }

.edit-btn svg, .delete-btn svg { width: 16px; height: 16px; }

.admin-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.stat-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    border: 1px solid var(--border-color);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

.admin-pagination {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

/* Product/Store Form Modal */
.product-form-modal, .store-form-modal { max-width: 500px; }

.form-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
}

.prices-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.prices-grid .form-group {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.prices-grid label {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
}

.prices-grid input {
    width: 80px;
    padding: var(--space-sm);
    text-align: right;
}

.form-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-color);
}

.form-btn {
    flex: 1;
    padding: var(--space-md);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.form-btn.cancel {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.form-btn.submit {
    background: var(--primary);
    border: none;
    color: white;
}

.form-btn.submit:hover { background: var(--primary-dark); }

/* ================================
   Scan Page
   ================================ */
.scan-hero {
    text-align: center;
    padding: var(--space-lg) 0;
}

.scan-type-selector {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.scan-type-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
}

.scan-type-btn svg { width: 32px; height: 32px; }
.scan-type-btn span { font-size: 0.875rem; font-weight: 600; }

.scan-type-btn.active {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
    color: var(--primary);
}

.qr-scanner-container {
    position: relative;
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 2px solid var(--border-color);
    margin-bottom: var(--space-lg);
}

.qr-reader {
    width: 100%;
    aspect-ratio: 1;
    background: #000;
}

#qr-reader video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

.scan-instructions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    pointer-events: none;
}

.scan-instructions.hidden { display: none; }
.scan-instructions svg { width: 64px; height: 64px; opacity: 0.7; margin-bottom: var(--space-md); }
.scan-instructions p { font-size: 0.875rem; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }

.scan-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    width: 100%;
    padding: var(--space-md);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.scan-btn svg { width: 24px; height: 24px; }

.stop-btn { background: linear-gradient(135deg, var(--danger) 0%, #DC2626 100%); }

.manual-entry {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    border: 1px solid var(--border-color);
    margin-bottom: var(--space-lg);
}

.manual-entry-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.manual-entry-box {
    display: flex;
    gap: var(--space-sm);
}

.manual-code-input {
    flex: 1;
    padding: var(--space-md);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: var(--bg-secondary);
}

.manual-entry-btn {
    padding: var(--space-md) var(--space-lg);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
}

.scan-results { margin-top: var(--space-lg); }

.store-products-list {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.store-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.store-header-logo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: white;
}

.store-header-info h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.store-header-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.store-products-grid { display: flex; flex-direction: column; }

.store-product-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.store-product-item:hover { background: var(--bg-secondary); }

.store-product-image {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--bg-tertiary);
}

.store-product-info { flex: 1; }

.store-product-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.store-product-qr {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.store-product-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--secondary);
}

/* ================================
   Responsive
   ================================ */
@media (min-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .search-hero { padding: var(--space-2xl) 0; }
    .categories-grid { grid-template-columns: repeat(4, 1fr); }
    .deals-grid { grid-template-columns: repeat(4, 1fr); }
    .membership-plans { grid-template-columns: repeat(3, 1fr); }
    .benefits-grid { grid-template-columns: repeat(4, 1fr); }
    .form-row { grid-template-columns: repeat(2, 1fr); }
    .admin-stats { grid-template-columns: repeat(3, 1fr); }
}

/* Safe area */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .bottom-nav { padding-bottom: env(safe-area-inset-bottom); }
}

/* ================================
   Cart Page
   ================================ */
.cart-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding-bottom: 100px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.cart-item-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex: 1;
    cursor: pointer;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    object-fit: cover;
    background: var(--bg-tertiary);
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.cart-item-store {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
}

.cart-item-price {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--secondary);
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: var(--space-xs);
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--bg-primary);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.qty-btn:hover {
    background: var(--primary);
    color: white;
}

.qty-btn svg {
    width: 16px;
    height: 16px;
}

.qty-value {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.cart-footer {
    position: fixed;
    bottom: var(--bottom-nav-height);
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: var(--space-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 50;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
}

.cart-summary {
    flex: 1;
}

.cart-total {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.cart-total-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.cart-total-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--danger);
}

.cart-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

.checkout-btn {
    padding: var(--space-md) var(--space-xl);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.checkout-btn:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

/* ================================
   Nearby Stores Modal
   ================================ */
.nearby-modal {
    max-width: 400px;
}

.nearby-modal .modal-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.nearby-stores-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.nearby-store-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.nearby-store-item:hover {
    background: var(--bg-tertiary);
}

.nearby-store-logo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: white;
}

.nearby-store-info {
    flex: 1;
}

.nearby-store-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.nearby-store-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.nearby-store-distance {
    text-align: right;
}

.distance-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    display: block;
}

.distance-unit {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ================================
   Bulk Actions Bar
   ================================ */
.select-all-btn {
    padding: var(--space-xs) var(--space-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.select-all-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.favorite-item.selectable {
    cursor: pointer;
}

.favorite-item.selectable::before {
    content: '';
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--bg-primary);
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.favorite-item.selected::before {
    background: var(--primary);
    border-color: var(--primary);
}

.favorite-item.selected::after {
    content: '';
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: translateY(-70%) rotate(45deg);
}

.favorite-item {
    position: relative;
}

.bulk-actions-bar {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + var(--space-md));
    left: var(--space-md);
    right: var(--space-md);
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: var(--space-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    z-index: 60;
    animation: slideUp var(--transition-normal);
}

.selected-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.selected-count strong {
    color: var(--primary);
}

.bulk-actions {
    display: flex;
    gap: var(--space-sm);
}

.bulk-delete-btn {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: var(--danger);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}

.bulk-delete-btn svg {
    width: 16px;
    height: 16px;
}

/* ================================
   Price History Modal
   ================================ */
.history-modal {
    max-width: 500px;
}

.history-modal .modal-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.history-product-info {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-lg);
}

.history-product-info img {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    object-fit: cover;
}

.history-product-info h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.history-product-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.history-chart {
    height: 200px;
    margin-bottom: var(--space-lg);
}

.history-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.stat-item {
    text-align: center;
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: var(--space-xs);
}

.stat-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-value.current {
    color: var(--secondary);
}

.stat-value.lowest {
    color: var(--danger);
}

/* ================================
   Reviews Modal
   ================================ */
.reviews-modal {
    max-width: 500px;
}

.reviews-modal .modal-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.reviews-product-info {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-lg);
}

.reviews-product-info img {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    object-fit: cover;
}

.reviews-product-info h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.rating-summary {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.rating-stars {
    display: flex;
}

.rating-stars svg {
    width: 16px;
    height: 16px;
}

.rating-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
}

.rating-count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.reviews-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: var(--space-lg);
}

.review-item {
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border-color);
}

.review-item:last-child {
    border-bottom: none;
}

.review-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.reviewer-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
}

.reviewer-info {
    flex: 1;
}

.reviewer-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
}

.review-stars {
    display: flex;
}

.review-stars svg {
    width: 12px;
    height: 12px;
}

.review-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.review-comment {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-top: var(--space-sm);
}

.review-images {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.review-images img {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    object-fit: cover;
}

.no-reviews {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.add-review-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    width: 100%;
    padding: var(--space-md);
    background: var(--bg-tertiary);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.add-review-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.add-review-btn svg {
    width: 20px;
    height: 20px;
}

/* Review Form Modal */
.review-form-modal {
    max-width: 400px;
}

.review-form-modal .modal-title {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.rating-input {
    display: flex;
    gap: var(--space-sm);
}

.star-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
    transition: transform var(--transition-fast);
}

.star-btn:hover {
    transform: scale(1.2);
}

.star-btn svg {
    width: 32px;
    height: 32px;
}

.upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-xl);
    background: var(--bg-secondary);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.upload-area:hover {
    border-color: var(--primary);
}

.upload-area svg {
    width: 32px;
    height: 32px;
    color: var(--text-muted);
}

.upload-area span {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.submit-review-btn {
    width: 100%;
    padding: var(--space-md);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: var(--space-lg);
}

.submit-review-btn:hover {
    background: var(--primary-dark);
}

/* ================================
   Share Modal
   ================================ */
.share-modal {
    max-width: 400px;
}

.share-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    font-family: inherit;
}

.share-option:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
}

.share-option-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.share-option-icon.wechat {
    background: #07C160;
    color: white;
}

.share-option-icon.friend {
    background: var(--primary);
    color: white;
}

.share-option-icon.link {
    background: var(--accent);
    color: white;
}

.share-option span {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* ================================
   Animations
   ================================ */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-slide-up {
    animation: slideUp var(--transition-normal) ease-out;
}

.animate-slide-down {
    animation: slideDown var(--transition-normal) ease-out;
}

.animate-scale-in {
    animation: scaleIn var(--transition-normal) ease-out;
}

.animate-bounce {
    animation: bounce 0.5s ease-in-out;
}

.animate-pulse {
    animation: pulse 1s ease-in-out infinite;
}

/* Page transitions */
.page {
    animation: fadeIn var(--transition-normal) ease-out;
}

.page-transition-enter {
    animation: slideUp var(--transition-slow) ease-out;
}

.page-transition-exit {
    animation: fadeOut var(--transition-fast) ease-out;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Hover effects */
.hover-lift {
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.hover-scale {
    transition: transform var(--transition-fast);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-glow {
    transition: box-shadow var(--transition-fast);
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

/* Loading states */
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s ease-in-out infinite;
}

@keyframes skeleton {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Toast notifications */
.toast {
    position: fixed;
    top: calc(var(--header-height) + var(--space-md));
    left: 50%;
    transform: translateX(-50%);
    padding: var(--space-md) var(--space-xl);
    background: var(--bg-primary);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-xl);
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 1000;
    animation: toastIn var(--transition-normal) ease-out;
}

.toast.success {
    border-left: 4px solid var(--secondary);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast.info {
    border-left: 4px solid var(--primary);
}

@keyframes toastIn {
    from {
        transform: translateX(-50%) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* ================================
   Responsive Enhancements
   ================================ */
@media (min-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .search-hero {
        padding: var(--space-2xl) 0;
    }

    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .deals-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .membership-plans {
        grid-template-columns: repeat(3, 1fr);
    }

    .benefits-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .form-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .cart-list {
        max-width: 600px;
        margin: 0 auto;
    }

    .cart-footer {
        max-width: 600px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    }

    .share-options {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .main-content {
        max-width: 960px;
    }

    .deals-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .products-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }

    .product-list-item {
        flex-direction: column;
        text-align: center;
    }

    .product-list-image {
        width: 100%;
        height: 150px;
    }

    .product-list-bottom {
        flex-direction: column;
        gap: var(--space-sm);
    }
}

/* Tablet specific */
@media (min-width: 768px) and (max-width: 1023px) {
    .products-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }
}

/* Safe area for notched devices */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .bottom-nav {
        padding-bottom: env(safe-area-inset-bottom);
    }

    .cart-footer {
        padding-bottom: calc(var(--space-md) + env(safe-area-inset-bottom));
    }

    .bulk-actions-bar {
        padding-bottom: calc(var(--space-md) + env(safe-area-inset-bottom));
    }
}

/* ================================
   Meituan-style Profile Page
   ================================ */
.profile-header-meituan {
    background: linear-gradient(135deg, var(--primary) 0%, #8B5CF6 100%);
    padding: var(--space-md);
    padding-top: calc(var(--space-md) + env(safe-area-inset-top));
    color: white;
    border-radius: 0 0 24px 24px;
}

.profile-header-top {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.header-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.header-icon-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.header-icon-btn svg {
    width: 20px;
    height: 20px;
}

/* Login Section */
.profile-login-section {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: var(--radius-lg);
    transition: background var(--transition-fast);
}

.profile-login-section:hover {
    background: rgba(255, 255, 255, 0.1);
}

.profile-avatar-login {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar-login svg {
    width: 36px;
    height: 36px;
    color: white;
}

.profile-login-text {
    flex: 1;
}

.login-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.login-subtitle {
    font-size: 0.75rem;
    opacity: 0.8;
}

.profile-user-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    cursor: pointer;
}

.profile-avatar-meituan {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: white;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    border: 3px solid rgba(255, 255, 255, 0.5);
}

.profile-info-text {
    flex: 1;
}

.profile-name-meituan {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.profile-id {
    font-size: 0.75rem;
    opacity: 0.8;
}

.profile-arrow {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

/* Member Card */
.member-card {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    color: #5D4E37;
}

.member-left {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.member-badge {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.member-badge svg {
    width: 20px;
    height: 20px;
}

.member-info {
    display: flex;
    flex-direction: column;
}

.member-title {
    font-weight: 600;
    font-size: 0.875rem;
}

.member-subtitle {
    font-size: 0.75rem;
    opacity: 0.8;
}

.member-right {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.member-action {
    font-size: 0.75rem;
    font-weight: 600;
}

.member-right svg {
    width: 16px;
    height: 16px;
}

/* Order Section */
.order-section {
    background: var(--bg-primary);
    margin: var(--space-md);
    margin-top: calc(-24px);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    box-shadow: var(--shadow-md);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.order-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.order-more {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-decoration: none;
}

.order-icons {
    display: flex;
    justify-content: space-around;
}

.order-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.order-icon-item:hover {
    background: var(--bg-tertiary);
}

.order-icon-item svg {
    width: 28px;
    height: 28px;
    color: var(--primary);
}

.order-icon-item span {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Assets Section */
.assets-section {
    display: flex;
    background: var(--bg-primary);
    margin: 0 var(--space-md);
    border-radius: var(--radius-lg);
    padding: var(--space-lg) var(--space-md);
    box-shadow: var(--shadow-sm);
}

.asset-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.asset-item:hover {
    background: var(--bg-tertiary);
}

.asset-item:not(:last-child) {
    border-right: 1px solid var(--border-color);
}

.asset-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--danger);
}

.asset-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Profile Menu Section */
.profile-menu-section {
    margin: var(--space-md);
}

.menu-group {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.menu-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    cursor: pointer;
    transition: background var(--transition-fast);
    position: relative;
}

.menu-item:hover {
    background: var(--bg-tertiary);
}

.menu-item:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.menu-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-icon svg {
    width: 20px;
    height: 20px;
    color: white;
}

.fav-icon { background: #FF6B6B; }
.history-icon { background: #4ECDC4; }
.address-icon { background: #45B7D1; }
.payment-icon { background: #96CEB4; }
.privacy-icon { background: #9B59B6; }
.help-icon { background: #3498DB; }
.about-icon { background: #95A5A6; }

.menu-text {
    flex: 1;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.menu-arrow {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

/* Logout Button */
.logout-btn {
    display: block;
    width: calc(100% - var(--space-md) * 2);
    margin: var(--space-lg) var(--space-md);
    padding: var(--space-md);
    background: var(--bg-primary);
    border: 1px solid var(--danger);
    border-radius: var(--radius-lg);
    color: var(--danger);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.logout-btn:hover {
    background: var(--danger);
    color: white;
}

/* Settings Modal */
.settings-modal {
    max-width: 400px;
}

.settings-list {
    margin-top: var(--space-lg);
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md);
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item-left {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.settings-item-left svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.settings-item span {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.settings-item svg:last-child {
    color: var(--text-muted);
}

/* Utility */
.hidden { display: none !important; }

/* ================================
   App Icon Preview
   ================================ */
.icon-preview-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
    color: white;
    text-align: center;
}

.icon-preview-section h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
}

.icon-preview-section p {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: var(--space-xl);
}

.icon-preview-display {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    margin: var(--space-lg) 0;
}

.icon-preview-large {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    background: white;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    padding: var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-preview-large svg {
    width: 80px;
    height: 80px;
}

.icon-preview-variants {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    margin-top: var(--space-lg);
}

.icon-preview-variant {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-preview-variant.light {
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.icon-preview-variant.dark {
    background: var(--bg-dark);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.icon-preview-variant.gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

.icon-preview-variant svg {
    width: 40px;
    height: 40px;
}

.icon-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

.icon-feature {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    text-align: center;
    backdrop-filter: blur(10px);
}

.icon-feature h4 {
    margin-bottom: var(--space-sm);
    font-size: 1rem;
    font-weight: 600;
}

.icon-feature p {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-bottom: 0;
}

.icon-download-section {
    text-align: center;
    margin-top: var(--space-lg);
}

.icon-download-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: white;
    color: var(--primary);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-full);
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-normal);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.icon-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
}

.icon-download-btn svg {
    width: 20px;
    height: 20px;
}

.icon-usage-notes {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: var(--space-sm);
}

/* Quick icon preview in header */
.new-icon-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    line-height: 1;
}

/* App icon showcase modal */
.icon-showcase-modal {
    max-width: 600px;
}

.icon-showcase-modal .modal-content {
    padding: 0;
    overflow: hidden;
}

.icon-showcase-header {
    padding: var(--space-xl);
    text-align: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.icon-showcase-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.icon-showcase-header p {
    opacity: 0.9;
    font-size: 0.875rem;
}

.icon-showcase-content {
    padding: var(--space-xl);
}

.icon-usage-sizes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.icon-size-item {
    text-align: center;
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.icon-size-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: var(--space-sm);
}

/* Responsive adjustments for icon preview */
@media (max-width: 768px) {
    .icon-preview-display {
        flex-direction: column;
        align-items: center;
        gap: var(--space-lg);
    }
    
    .icon-usage-sizes {
        grid-template-columns: 1fr;
    }
    
    .icon-features-grid {
        grid-template-columns: 1fr;
    }
}
