/* Remix Icon - 各页面已通过 link rel 单独引入，此处移除 CDN @import 避免阻塞首屏渲染 */
/* @import url('https://cdn.jsdelivr.net/npm/remixicon@4.1.0/fonts/remixicon.css'); */

/* ========== 隐藏浏览器地址栏/状态栏，全屏APP体验 ========== */
html, body {
    height: 100%;
    min-height: 101vh;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overscroll-behavior: none;
}


:root {
    /* ===== 8pt 栅格系统基础变量 ===== */
    --grid-base: 8px;
    --grid-2x: 16px;
    --grid-1_5x: 12px;
    --grid-0_5x: 4px;
    
    /* ===== 全局安全边距 ===== */
    --safe-margin: 16px;
    --safe-margin-sm: 12px;
    
    /* ===== 卡片内边距 ===== */
    --card-padding: 16px;
    --card-padding-sm: 12px;
    
    /* ===== 模块间距 ===== */
    --section-spacing: 12px;
    --section-spacing-sm: 10px;
    
    /* ===== 圆角半径 ===== */
    --radius-lg: 12px;
    --radius-md: 8px;
    --radius-sm: 4px;
    --radius-xl: 20px;
    
    /* ===== 字体层级 ===== */
    --font-title: 18px;
    --font-title-lg: 20px;
    --font-body: 14px;
    --font-body-lg: 16px;
    --font-small: 12px;
    
    /* ===== 色彩体系 ===== */
    --primary: #FF9A3C;
    --primary-dark: #E8892A;
    --primary-light: #FFF0E0;
    --success: #67C23A;
    --danger: #F56C6C;
    --warning: #E6A23C;
    --info: #409EFF;
    --primary-color: #FF9A3C;
    --primary-dark-color: #E8892A;
    --primary-light-color: #FFF0E0;
    --success-color: #67C23A;
    --danger-color: #F56C6C;
    --warning-color: #E6A23C;
    --info-color: #409EFF;
    
    /* V5.0 三大板块视觉色系 */
    --section-charity: #E53935;
    --section-charity-light: #FFEBEE;
    --section-charity-gradient: linear-gradient(135deg, #E53935, #FF6B6B);
    --section-commerce: #FF8C00;
    --section-commerce-light: #FFF8E7;
    --section-elder: #9B59B6;
    --section-elder-light: #F5EEF8;
    
    /* V4.6 Meituan CX 统一色板 */
    --mt-red: #C81F2C;
    --mt-red-dark: #B71C1C;
    --mt-orange: #FF9F00;
    --mt-orange-dark: #E68A00;
    --mt-bg: #F5F5F5;
    --mt-card-bg: #FFFFFF;
    --mt-text-primary: #1A1A1A;
    --mt-text-secondary: #666666;
    --mt-text-light: #999999;
    --mt-border: #EEEEEE;
    --mt-shadow: 0 2px 12px rgba(0,0,0,0.06);
    --mt-shadow-card: 0 2px 8px rgba(0,0,0,0.04);
    --mt-radius: 12px;
    --mt-radius-sm: 8px;
    --mt-radius-lg: 16px;
    --mt-font-title: 18px;
    --mt-font-body: 14px;
    --mt-font-small: 12px;
    
    /* ===== 京东APP 视觉规范 V1.0 ===== */
    --jd-primary: #E2231A;
    --jd-primary-dark: #C41D16;
    --jd-primary-light: #FFECEC;
    --jd-secondary: #333333;
    --jd-text-primary: #333333;
    --jd-text-secondary: #666666;
    --jd-text-tertiary: #999999;
    --jd-text-placeholder: #CCCCCC;
    --jd-bg-page: #F5F5F5;
    --jd-bg-card: #FFFFFF;
    --jd-bg-elevated: #FAFAFA;
    --jd-border: #E5E5E5;
    --jd-border-light: #F0F0F0;
    --jd-shadow: 0 2px 8px rgba(0,0,0,0.08);
    --jd-shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
    --jd-radius-sm: 6px;
    --jd-radius: 8px;
    --jd-radius-lg: 12px;
    --jd-radius-xl: 16px;
    --jd-radius-round: 9999px;
    --jd-icon-lg: 128px;
    --jd-icon-md: 64px;
    --jd-icon-sm: 48px;
    --jd-image-product: 800px;
    --jd-image-detail: 750px;
    
    /* Legacy tokens keep working */
    --bg: #F5F5F5;
    --white: #FFFFFF;
    --text: #1A1A1A;
    --text-secondary: #666666;
    --text-light: #999999;
    --border: #EEEEEE;
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 20px rgba(0,0,0,0.1);
    --shadow-xl: 0 12px 32px rgba(0,0,0,0.12);
    --shadow-card: 0 2px 8px rgba(0,0,0,0.04);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --gradient-primary: linear-gradient(135deg, #FF9A3C 0%, #FF6B2B 100%);
    --gradient-warm: linear-gradient(135deg, #FF9A3C 0%, #FFD93D 100%);
    --gradient-commerce: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FF8C00 100%);
    --gradient-charity: linear-gradient(135deg, #FF6B6B 0%, #EE5A5A 100%);
    --gradient-elder: linear-gradient(135deg, #9B59B6 0%, #8E44AD 100%);
    --gradient-silver: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --glass-bg: rgba(255,255,255,0.85);
    --glass-border: rgba(255,255,255,0.3);
    --page-padding-bottom: 90px;
    --main-padding-bottom: calc(env(safe-area-inset-bottom, 16px) + 90px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', 'Hiragino Sans GB', 'Microsoft YaHei', Arial, sans-serif;
    background: #F5F5F5;
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 14px;
}

a {
    color: var(--primary);
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    /* 图片高清渲染（auto适合照片，crisp-edges适合图标） */
    image-rendering: auto;
    /* 消除移动端缩放模糊 */
    -ms-interpolation-mode: bicubic;
    /* GPU加速防抖动 */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    /* 防止Chrome图片发虚 */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    /* 保持图片质量不降级 */
    -webkit-optimize-contrast: auto;
    /* 高清适配 */
    image-rendering: -webkit-optimize-contrast;
    /* 确保图片填充容器 */
    object-fit: cover;
    object-position: center;
}

/* 图标类图片保持锐利 */
img[src*="icon"]:not([src*="photo"]),
img.icon-img,
.kk-icon img,
.entry-icon-wrap img,
.icon-sm img,
.icon-md img,
.icon-lg img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* 商品图片居中裁剪不变形 */
.goods-img img,
.goods-card img,
.product-img img,
.goods-thumb img,
.page-goods-img img,
.goods-card-img {
    object-fit: cover;
    object-position: center;
    width: 100%;
    height: 100%;
    min-height: 100%;
    display: block;
    /* 高清显示 */
    image-rendering: auto;
    -webkit-optimize-contrast: auto;
}

/* 商品图片容器 */
.goods-img,
.goods-card-img,
.product-img,
.page-goods-img,
.goods-card-img-wrap {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
}

/* 集市、生鲜分类、生鲜预售页面通用商品图片 */
.goods-card-img-wrap img,
.page-goods-img img,
.fresh-product-img img,
.category-product-img img,
.fresh-flash-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    image-rendering: auto;
    -webkit-optimize-contrast: auto;
}

/* 生鲜页面商品图片容器 */
.fresh-flash-img,
.fresh-product-img {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #E8F8FA, #CFEEF5);
}

/* 金刚区图标自适应 */
.page-kingkong-icon,
.kk-icon,
.kk-icon-meituan,
.entry-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.page-kingkong-icon img,
.kk-icon img,
.kk-icon-meituan img,
.entry-icon-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    image-rendering: crisp-edges;
}

/* 购物车商品图片高清自适应 */
.cart-img,
.cart-item-img,
.cart-goods-img,
.item-img {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
}

.cart-img img,
.cart-item-img img,
.cart-goods-img img,
.item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    image-rendering: auto;
    -webkit-optimize-contrast: auto;
}

/* 生鲜预售商品图片 */
.fresh-img,
.fresh-goods-img,
.pre-sale-img {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f8f0, #d0e8d0);
}

.fresh-img img,
.fresh-goods-img img,
.pre-sale-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    image-rendering: auto;
    -webkit-optimize-contrast: auto;
}

/* Banner/轮播图全宽高清 */
.banner-img img,
.banner-slide img,
.carousel-img img,
.swiper-slide img {
    object-fit: cover;
    object-position: center;
    width: 100%;
    min-height: 100%;
    image-rendering: auto;
}

/* ========== 全局图片加载优化 ========== */
/* 图片加载前防止CLS */
img:not([src]),
img[src=""],
img[src="#"] {
    visibility: hidden;
}
/* 响应式懒加载 */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.4s ease;
}
img[loading="lazy"].loaded {
    opacity: 1;
}

/* ========== Meituan CX KingKong Grid ========== */
.kingkong-meituan {
    background: var(--white);
    border-radius: var(--mt-radius-lg);
    padding: 16px 12px 8px;
    margin: 0 16px 16px;
    box-shadow: var(--mt-shadow);
}
.kingkong-meituan .kk-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px 8px;
    margin-bottom: 8px;
}
.kingkong-meituan .kk-row:last-child {
    margin-bottom: 0;
}
.kingkong-meituan .kk-item-meituan {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 8px 4px;
    border-radius: var(--mt-radius);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text);
}
.kingkong-meituan .kk-item-meituan:active {
    background: #f5f5f5;
    transform: scale(0.94);
}
.kingkong-meituan .kk-icon-meituan {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    position: relative;
}
.kingkong-meituan .kk-icon-meituan i {
    font-size: 28px;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.kingkong-meituan .kk-item-meituan .kk-text-meituan {
    font-size: var(--mt-font-small);
    color: var(--text);
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

/* ========== Meituan Product Card ========== */
.product-card-mt {
    background: var(--white);
    border-radius: var(--mt-radius);
    overflow: hidden;
    box-shadow: var(--mt-shadow-card);
    cursor: pointer;
    transition: var(--transition);
}
.product-card-mt:active {
    transform: scale(0.98);
}
.product-card-mt .mt-prod-img {
    width: 100%;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 64px;
    overflow: hidden;
}
.product-card-mt .mt-prod-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: linear-gradient(135deg, #E53935, #FF5252);
    color: #fff;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 8px;
    font-weight: 600;
}
.product-card-mt .mt-prod-info {
    padding: 10px 10px 12px;
}
.product-card-mt .mt-prod-name {
    font-size: var(--mt-font-body);
    color: var(--mt-text-primary);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
    margin-bottom: 6px;
    min-height: 36px;
}
.product-card-mt .mt-prod-price-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}
.product-card-mt .mt-prod-price {
    color: var(--mt-orange);
    font-size: 18px;
    font-weight: 700;
}
.product-card-mt .mt-prod-price .yen {
    font-size: 12px;
    font-weight: 600;
}
.product-card-mt .mt-prod-original {
    font-size: 11px;
    color: #bbb;
    text-decoration: line-through;
    margin-left: 4px;
}
.product-card-mt .mt-prod-sales {
    font-size: 11px;
    color: var(--mt-text-light);
    margin-top: 2px;
}

input, textarea, select, button {
    font-family: inherit;
    font-size: inherit;
}

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

.container-sm {
    max-width: 720px;
}

/* ========== Top Bar ========== */
.top-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
    border-bottom: 1px solid var(--glass-border);
}

.top-bar .back-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    font-size: 20px;
    color: var(--text);
    cursor: pointer;
    border-radius: 50%;
    transition: var(--transition);
}

.top-bar .back-btn:hover {
    background: var(--border);
}

.top-bar .title {
    font-size: 18px;
    font-weight: 600;
}

.top-bar .action-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    font-size: 20px;
    color: var(--text);
    cursor: pointer;
    border-radius: 50%;
}

/* ========== Buttons ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius);
    border: none;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 16px rgba(255, 154, 60, 0.35);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: #5daf34;
    box-shadow: 0 4px 16px rgba(103, 194, 58, 0.35);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background: #e85b5b;
    box-shadow: 0 4px 16px rgba(245, 108, 108, 0.35);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary-light);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 17px;
    border-radius: 24px;
}

.btn-xl {
    padding: 16px 36px;
    font-size: 18px;
    border-radius: 28px;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Gradient button variant */
.btn-gradient {
    background: var(--gradient-primary);
    color: var(--white);
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.btn-gradient:hover {
    box-shadow: 0 6px 24px rgba(255,154,60,0.45);
    transform: translateY(-1px);
}

/* Ghost button variant */
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--border);
}

/* Round button variant */
.btn-round {
    border-radius: 50px;
}

/* Ripple effect for all buttons */
.btn .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    transform: scale(0);
    animation: rippleEffect 0.6s ease-out;
    pointer-events: none;
}

/* ========== Cards ========== */
.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    transition: var(--transition);
}

.card-shadow {
    box-shadow: var(--shadow);
}

.card-shadow:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
}

.card-body {
    padding: 4px 0;
}

.card-footer {
    padding-top: 12px;
    border-top: 1px solid var(--border);
    margin-top: 12px;
}

/* Glassmorphism card variant */
.card-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 16px;
    transition: var(--transition);
}

/* Gradient card variant */
.card-gradient {
    background: var(--gradient-primary);
    color: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    transition: var(--transition);
}

.card-gradient .card-title,
.card-gradient .section-title {
    color: var(--white);
}

/* ========== Grids ========== */
.grid {
    display: grid;
    gap: 12px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }

.grid-18 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    padding: 4px;
}

/* ========== 2行4宫格功能入口 - 美团风格 ========== */
.entrance-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 16px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 12px 16px;
}

.entrance-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text);
}

.entrance-item:active {
    transform: scale(0.96);
    background: #F5F7FA;
}

.entrance-item .icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: linear-gradient(135deg, #FFF5E6 0%, #FFE8CC 100%);
}

/* 商业金色图标背景 */
.entrance-item.commerce .icon-wrap {
    background: linear-gradient(135deg, #FFF8E7 0%, #FFE0B2 100%);
}

/* 公益红色图标背景 */
.entrance-item.charity .icon-wrap {
    background: linear-gradient(135deg, #FFEBEE 0%, #FFCDD2 100%);
}

/* 银发紫色图标背景 */
.entrance-item.elder .icon-wrap {
    background: linear-gradient(135deg, #F3E5F5 0%, #E1BEE7 100%);
}

.entrance-item .icon-label {
    font-size: 13px;
    text-align: center;
    font-weight: 500;
    color: #333;
}

/* ========== 金刚区18宫格 ========== */
.icon-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 4px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text);
}

.icon-grid-item:hover {
    background: var(--primary-light);
    transform: translateY(-3px);
}

.icon-grid-item:active {
    transform: scale(0.95);
}

.icon-grid-item .icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: var(--primary-light);
}

.icon-grid-item .icon-label {
    font-size: 11px;
    text-align: center;
    line-height: 1.3;
}

/* ========== Bottom Navigation ========== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to bottom, #FFFFFF 0%, #F8F8F8 100%);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 6px 0;
    padding-bottom: calc(env(safe-area-inset-bottom, 10px) + 6px);
    border-top: 1px solid #E0E0E0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.12), 0 -1px 0 rgba(255,255,255,0.8) inset;
    z-index: 100;
}

.bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 2px 16px;
    color: var(--jd-text-secondary);
    text-decoration: none;
    font-size: 12px;
    font-weight: 400;
    transition: all 0.2s ease;
    position: relative;
    min-width: 56px;
    min-height: 48px;
}

.bottom-nav .nav-item.active {
    color: var(--jd-primary);
    background: transparent;
}

.bottom-nav .nav-item .nav-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.bottom-nav .nav-item .nav-icon {
    font-size: 22px;
    color: #fff;
    transition: all 0.2s ease;
}

.bottom-nav .nav-item.active .nav-icon-wrap {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.bottom-nav .nav-item.active .nav-icon {
    font-size: 24px;
}

.bottom-nav .nav-item .nav-label {
    font-size: 12px;
    font-weight: 400;
    margin-top: 4px;
}

.bottom-nav .nav-item.active .nav-label {
    font-weight: 500;
}

.bottom-nav .nav-item .nav-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    padding: 0 5px;
    border-radius: 8px;
    background: var(--jd-primary);
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(226,35,26,0.25);
}

/* 京东风格底部导航：简约线性图标 */
.bottom-nav .nav-item[data-nav="charity"].active {
    color: var(--jd-primary);
    background: transparent;
    box-shadow: none;
}

.bottom-nav .nav-item[data-nav="market"].active {
    color: var(--jd-primary);
    background: transparent;
    box-shadow: none;
}

.bottom-nav .nav-item[data-nav="bulletin"].active {
    color: var(--jd-primary);
    background: transparent;
    box-shadow: none;
}

.bottom-nav .nav-item[data-nav="home"].active {
    color: var(--jd-primary);
    background: transparent;
    box-shadow: none;
}

.bottom-nav .nav-item[data-nav="my"].active {
    color: var(--jd-primary);
    background: transparent;
    box-shadow: none;
}
.bottom-nav .nav-item[data-nav="elder"].active {
    color: var(--section-elder);
    background: var(--section-elder-light);
}

/* V5.0 管理后台侧边栏分组标题 */
.sidebar-section-title {
    padding: 12px 16px 4px;
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* ========== Toast ========== */
.toast-container {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    color: var(--white);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: auto;
    animation: toastIn 0.35s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-warning { background: var(--warning); }
.toast-info { background: var(--info); }

.toast-out {
    animation: toastOut 0.3s ease forwards;
}

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

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

/* ========== Modal ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn 0.25s ease;
}

.modal-overlay.closing {
    animation: fadeOut 0.25s ease forwards;
}

.modal {
    background: var(--white);
    border-radius: var(--radius);
    width: 100%;
    max-width: 420px;
    max-height: 80vh;
    overflow: hidden;
    animation: modalSlideUp 0.3s ease;
    display: flex;
    flex-direction: column;
}

.modal-overlay.closing .modal {
    animation: modalSlideDown 0.25s ease forwards;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 17px;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    font-size: 22px;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--border);
    color: var(--text);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-sm { max-width: 320px; }
.modal-lg { max-width: 560px; }
.modal-full { max-width: 90vw; max-height: 90vh; }

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes modalSlideDown {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(30px) scale(0.95); }
}

/* ========== Skeleton ========== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
    width: 100%;
}

.skeleton-text:last-child { width: 60%; }

.skeleton-title {
    height: 20px;
    width: 50%;
    margin-bottom: 12px;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.skeleton-image {
    width: 100%;
    height: 160px;
    border-radius: var(--radius-sm);
}

.skeleton-card {
    padding: 16px;
    background: var(--white);
    border-radius: var(--radius);
}

@keyframes skeletonShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ========== Empty State ========== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state .empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-warm);
    border-radius: 50%;
    animation: float 3s ease-in-out infinite;
}

.empty-state .empty-text {
    font-size: 15px;
    margin-bottom: 20px;
}

/* ========== Loading Spinner ========== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.7);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-dots {
    display: flex;
    gap: 6px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    animation: dotPulse 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.loading-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes dotPulse {
    0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
    40% { transform: scale(1); opacity: 1; }
}

/* ========== Animations ========== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

@keyframes bounceIn {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.15); }
    70% { transform: scale(0.95); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes rippleEffect {
    to { transform: scale(4); opacity: 0; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes fabPulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.5); opacity: 0; }
}

.animate-fadeIn { animation: fadeIn 0.5s ease; }
.animate-slideUp { animation: slideUp 0.5s ease; }
.animate-slideDown { animation: slideDown 0.5s ease; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-shake { animation: shake 0.5s ease; }
.animate-bounceIn { animation: bounceIn 0.6s ease; }
.animate-fadeInUp { animation: fadeInUp 0.5s ease; }
.animate-scaleIn { animation: scaleIn 0.4s ease; }
.animate-float { animation: float 3s ease-in-out infinite; }

/* Staggered animation delays */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ========== Score / Badge ========== */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--danger);
    color: var(--white);
    font-size: 11px;
    font-weight: 600;
}

.score-display {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #8B4513;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

/* Badge color variants */
.badge-primary {
    background: var(--primary);
    color: var(--white);
}

.badge-success {
    background: var(--success);
    color: var(--white);
}

.badge-warning {
    background: var(--warning);
    color: var(--white);
}

/* Badge dot for status indicators */
.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* Rounded tag variant */
.tag-rounded {
    border-radius: 20px;
    padding: 4px 12px;
}

/* ========== Product Card - 美团风格 ========== */
.product-card {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow);
    border: none;
    transition: var(--transition);
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.product-card:hover .product-image {
    transform: scale(1.03);
}

.product-image {
    width: 100%;
    height: 160px;
    aspect-ratio: 4/3;
    object-fit: cover;
    background: linear-gradient(135deg, #F5F7FA 0%, #E4E8ED 100%);
    transition: transform 0.3s ease;
}

/* Product card corner badge */
.product-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: var(--white);
    background: linear-gradient(135deg, #FF6B6B 0%, #EE5A5A 100%);
    z-index: 2;
    box-shadow: 0 2px 8px rgba(238, 90, 90, 0.3);
}

.product-info {
    padding: 14px;
}

.product-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #1A1A1A;
}

.product-price {
    color: #FF6B35;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.product-price small {
    font-size: 13px;
    font-weight: 500;
}

.product-sales {
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 6px;
}

.product-original-price {
    color: var(--text-light);
    font-size: 12px;
    text-decoration: line-through;
    margin-left: 8px;
}

.product-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    margin-right: 6px;
    font-weight: 500;
}

.tag-expiring { background: #FFF3E0; color: var(--primary); }
.tag-hot { background: #FFEBEE; color: var(--danger); }
.tag-quality { background: #E8F5E9; color: var(--success); }

/* ========== Form Elements ========== */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text);
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    color: var(--text);
    background: var(--white);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 154, 60, 0.1);
}

.form-input::placeholder {
    color: var(--text-light);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Form input error state */
.form-input-error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(245,108,108,0.1);
}

/* Form input success state */
.form-input-success {
    border-color: var(--success);
}

/* ========== Section ========== */
.section {
    margin-bottom: 24px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 12px;
    position: relative;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 18px;
    background: var(--primary);
    border-radius: 2px;
}

.section-more {
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
}

/* ========== Divider ========== */
.divider {
    height: 1px;
    background: var(--border);
    margin: 16px 0;
}

.divider-text {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 13px;
}

.divider-text::before,
.divider-text::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ========== AI Float Button (styles now in ai-fab.html fragment) ========== */
.ai-fab-global {
    z-index: 99;
}

/* ========== Utility Classes ========== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-secondary { color: var(--text-secondary); }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.ml-1 { margin-left: 8px; }
.mr-1 { margin-right: 8px; }

.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }

.w-full { width: 100%; }
.hidden { display: none !important; }
.visible { display: block !important; }
.relative { position: relative; }

/* Enhanced utility classes */
.rounded-full { border-radius: 50%; }
.shadow-sm { box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.shadow-none { box-shadow: none; }
.overflow-hidden { overflow: hidden; }
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Page content area with bottom nav clearance */
.page-content {
    padding-bottom: var(--main-padding-bottom, var(--page-padding-bottom));
}

/* ========== Custom Scrollbar ========== */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* ========== Elder Mode Base ========== */
body.elder-mode {
    font-size: 22px;
    line-height: 1.8;
}

body.elder-mode .btn {
    min-height: 52px;
    min-width: 140px;
    padding: 14px 28px;
    font-size: 20px;
    border-radius: 14px;
}

body.elder-mode .btn-lg {
    padding: 18px 36px;
    font-size: 22px;
}

body.elder-mode .btn-xl {
    padding: 22px 44px;
    font-size: 24px;
}

body.elder-mode .card {
    padding: 24px;
    border-radius: 20px;
}

body.elder-mode .icon-grid-item .icon-wrap {
    width: 56px;
    height: 56px;
    font-size: 28px;
}

body.elder-mode .icon-grid-item .icon-label {
    font-size: 15px;
}

body.elder-mode .bottom-nav .nav-item {
    font-size: 14px;
}

body.elder-mode .bottom-nav .nav-item .nav-icon {
    font-size: 28px;
}

body.elder-mode .form-input {
    padding: 14px 18px;
    font-size: 20px;
}

body.elder-mode .form-label {
    font-size: 18px;
}

body.elder-mode .modal {
    border-radius: 20px;
}

body.elder-mode .modal-title {
    font-size: 22px;
}

body.elder-mode .modal-body {
    font-size: 20px;
}

body.elder-mode .toast {
    font-size: 18px;
    padding: 16px 28px;
}

/* Enhanced elder mode overrides */
body.elder-mode .card-glass {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--white);
}

body.elder-mode .section-title::before {
    height: 4px;
    width: 24px;
}

body.elder-mode .bottom-nav {
    padding: 10px 0;
}

body.elder-mode .bottom-nav .nav-item {
    padding: 10px 16px;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .grid-4, .grid-5, .grid-6 {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid-18 {
        grid-template-columns: repeat(5, 1fr);
    }

    .modal {
        max-width: 92vw;
    }

    .hide-mobile {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .grid-4, .grid-5, .grid-6 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-18 {
        grid-template-columns: repeat(4, 1fr);
    }

    .btn-xl {
        padding: 14px 24px;
        font-size: 16px;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}

/* ========== 8大类别滚动屏 ========== */
.category-scroll-section {
    padding: 0 16px 16px;
}
.category-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
}
.category-scroll::-webkit-scrollbar {
    display: none;
}
.category-card {
    flex: 0 0 140px;
    scroll-snap-align: start;
    background: #FFF;
    border-radius: 16px;
    padding: 20px 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    cursor: pointer;
    transition: transform 0.2s;
    text-decoration: none;
    display: block;
}
.category-card:active {
    transform: scale(0.96);
}
.cat-icon {
    font-size: 40px;
    margin-bottom: 8px;
}
.cat-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text, #333);
}
.cat-desc {
    font-size: 12px;
    color: var(--text-light, #999);
    margin-top: 4px;
}

/* 老人模式适配 */
body.elder-mode .category-card {
    flex: 0 0 200px;
    padding: 28px 16px;
}
body.elder-mode .cat-icon {
    font-size: 56px;
}
body.elder-mode .cat-name {
    font-size: 22px;
}
body.elder-mode .cat-desc {
    font-size: 16px;
}

/* ========== 美团风格「我的」页面 ========== */
.my-meituan-header {
    background: linear-gradient(180deg, #2B5FD9 0%, #1A3F9E 100%);
    padding: 20px 16px 16px;
    color: #fff;
    position: relative;
    overflow: hidden;
    border-radius: 0 0 24px 24px;
}
.my-meituan-header::after {
    content: '';
    position: absolute;
    top: -40px; right: -20px;
    width: 160px; height: 160px;
    background: rgba(255,255,255,.04);
    border-radius: 50%;
    pointer-events: none;
}
.my-meituan-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}
.my-meituan-avatar {
    width: 56px; height: 56px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.4);
    background: rgba(255,255,255,.15);
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.my-meituan-avatar img {
    width: 100%; height: 100%; object-fit: cover;
}
.my-meituan-avatar .avatar-pl {
    font-size: 26px; color: rgba(255,255,255,.6);
}
.my-meituan-info {
    flex: 1; margin-left: 12px;
}
.my-meituan-name {
    font-size: 18px; font-weight: 600; line-height: 1.3;
}
.my-meituan-phone {
    font-size: 12px; opacity: .7; margin-top: 2px;
}
.my-meituan-level-tag {
    display: inline-flex; align-items: center; gap: 4px;
    background: rgba(255,255,255,.15);
    padding: 2px 10px; border-radius: 10px;
    font-size: 12px; margin-top: 4px;
}
.my-meituan-actions {
    display: flex; gap: 16px; align-items: center;
}
.my-meituan-action {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    color: #fff; font-size: 11px; text-decoration: none; position: relative;
}
.my-meituan-action i { font-size: 20px; }
.my-meituan-badge {
    position: absolute; top: -4px; right: -8px;
    min-width: 16px; height: 16px;
    background: #FF3838; color: #fff; font-size: 10px;
    border-radius: 8px; display: flex; align-items: center; justify-content: center;
    padding: 0 4px; font-weight: 600;
}

/* 白金会员卡片 */
.my-meituan-vip {
    background: rgba(255,255,255,.12);
    border-radius: 14px; padding: 14px 16px;
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 10px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,.15);
}
.my-meituan-vip-icon { font-size: 22px; opacity: .9; }
.my-meituan-vip-text { flex: 1; }
.my-meituan-vip-title { font-size: 13px; font-weight: 600; line-height: 1.4; }
.my-meituan-vip-progress {
    margin-top: 6px; display: flex; align-items: center; gap: 8px;
}
.my-meituan-vip-bar {
    flex: 1; height: 4px; border-radius: 2px;
    background: rgba(255,255,255,.2); overflow: hidden;
}
.my-meituan-vip-bar-inner {
    height: 100%; background: #FFD700; border-radius: 2px;
    transition: width .5s;
}
.my-meituan-vip-pct { font-size: 11px; opacity: .8; white-space: nowrap; }
.my-meituan-vip-btn {
    padding: 6px 14px; border-radius: 14px;
    background: rgba(255,255,255,.2); color: #fff;
    font-size: 12px; white-space: nowrap; cursor: pointer;
    border: none; font-weight: 500;
}

/* 3个横向营销小卡片 */
.my-meituan-cards { display: flex; gap: 8px; }
.my-meituan-card {
    flex: 1; background: rgba(255,255,255,.1);
    border-radius: 10px; padding: 8px 10px;
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; cursor: pointer; text-decoration: none; color: #fff;
}
.my-meituan-card i { font-size: 16px; }
.my-meituan-card-num { font-weight: 700; font-size: 14px; color: #FFD700; }

/* 资产区 - 3列 */
.my-meituan-assets {
    display: flex; background: #fff; border-radius: 14px;
    margin: -12px 12px 0; padding: 16px 0;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    position: relative; z-index: 2;
}
.my-meituan-asset {
    flex: 1; text-align: center; cursor: pointer;
    border-right: 1px solid #f0f0f0;
}
.my-meituan-asset:last-child { border-right: none; }
.my-meituan-asset-num {
    font-size: 22px; font-weight: 800; color: #333; line-height: 1.2;
}
.my-meituan-asset-label { font-size: 12px; color: #999; margin-top: 2px; }
.my-meituan-asset-sub { font-size: 10px; color: #bbb; }
.my-meituan-asset-badge {
    display: inline-block; background: #FF3838; color: #fff;
    font-size: 10px; padding: 0 5px; border-radius: 6px;
    min-width: 16px; text-align: center; margin-left: 2px;
}

/* 订单区 - 1行4列 */
.my-meituan-section {
    margin: 12px;
    background: #fff; border-radius: 14px; padding: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,.02);
}
.my-meituan-section-title {
    font-size: 15px; font-weight: 600; color: #333;
    margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center;
}
.my-meituan-section-more { font-size: 12px; color: #999; }
.my-meituan-grid4 { display: flex; gap: 0; }
.my-meituan-grid-item {
    flex: 1; text-align: center; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    position: relative;
}
.my-meituan-grid-icon { font-size: 24px; color: #555; }
.my-meituan-grid-label { font-size: 12px; color: #666; }
.my-meituan-grid-badge {
    position: absolute; top: -2px; right: 12px;
    min-width: 16px; height: 16px;
    background: #FF3838; color: #fff;
    font-size: 10px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px; font-weight: 600;
}

/* 营销券区橙红按钮 */
.my-meituan-coupon {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; border-radius: 12px;
    background: linear-gradient(135deg, #FFF5E6 0%, #FFF0D5 100%);
    cursor: pointer;
}
.my-meituan-coupon-icon { font-size: 28px; }
.my-meituan-coupon-text { flex: 1; }
.my-meituan-coupon-title { font-size: 14px; font-weight: 600; color: #E8892A; }
.my-meituan-coupon-sub { font-size: 11px; color: #999; margin-top: 2px; }
.my-meituan-coupon-btn {
    padding: 7px 16px; border-radius: 16px;
    background: linear-gradient(135deg, #FF6B2B, #FF3838);
    color: #fff; font-size: 12px; font-weight: 600;
    white-space: nowrap; border: none; cursor: pointer;
}

/* 工具列表 */
.my-meituan-tools {
    margin: 12px;
    background: #fff; border-radius: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,.02);
    overflow: hidden;
}
.my-meituan-tool-row {
    display: flex; align-items: center; padding: 14px 16px;
    border-bottom: 1px solid #f5f5f5; cursor: pointer;
    transition: background .15s;
}
.my-meituan-tool-row:last-child { border-bottom: none; }
.my-meituan-tool-row:active { background: #f9f9f9; }
.my-meituan-tool-icon { font-size: 22px; color: #666; width: 36px; text-align: center; }
.my-meituan-tool-label { flex: 1; font-size: 14px; color: #333; }
.my-meituan-tool-arrow { font-size: 16px; color: #ccc; }
.my-meituan-tool-dot {
    width: 7px; height: 7px; background: #FF3838; border-radius: 50%; margin-right: 8px;
}
.my-meituan-level-dot {
    display: inline-block; width: 6px; height: 6px;
    background: #FFD700; border-radius: 50%; margin-right: 4px;
}

/* ========== 美团小象超市风格搜索栏 ========== */
.header-meituan {
    background: #4FC3F7;
    /* 各页面统一顶部留白：移动端自动读取 safe-area-inset-top，桌面端回退 54px，额外+30px防遮挡状态栏 */
    padding-top: calc(env(safe-area-inset-top, 54px) + 30px);
    padding-right: 8px;
    padding-bottom: 6px;
    padding-left: 8px;
    position: relative;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.header-top-bar {
    padding: 0 16px;
    margin-bottom: 4px;
}

.location-selector {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 2px 8px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.location-selector:hover {
    background: rgba(255,255,255,0.35);
    transform: scale(1.02);
}

.location-icon {
    font-size: 14px;
    color: #fff;
}

.location-text {
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.location-arrow {
    font-size: 12px;
    color: rgba(255,255,255,0.85);
}

.header-content-meituan {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    gap: 12px;
}

.header-left-meituan {
    flex-shrink: 0;
}

.header-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    color: #fff;
    font-size: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.header-back-btn:hover {
    background: rgba(255,255,255,0.4);
    transform: scale(1.05);
}

/* 彻底隐藏所有页眉文字，确保不会显示 */
.header-title-meituan,
.header-title,
.header-top-bar,
.location-selector,
.location-text {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
}
/* 强制隐藏所有可能的页眉文字区域 */
header .header-title-meituan,
header .header-top-bar {
    display: none !important;
}
/* 强制隐藏所有页眉文字，不管什么情况 */
header span,
header div[class*="title"],
header div[class*="text"] {
    display: none !important;
}

.search-section {
    flex: 1;
    max-width: 100%;
    width: calc(100% - 120px);
}

.search-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-input-container {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.95);
    border-radius: 18px;
    padding: 0 14px;
    height: 44px;
    min-height: 44px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    border: 1px solid rgba(255,255,255,0.6);
    transition: all 0.3s ease;
}

.search-input-container:hover {
    background: #fff;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.search-icon {
    font-size: 16px;
    color: #999;
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    color: #333;
    background: transparent;
    cursor: pointer;
    height: 30px;
    line-height: 30px;
}

.search-input::placeholder {
    color: #999;
}

.ai-camera-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.ai-camera-btn:hover {
    background: rgba(255,255,255,0.5);
    transform: scale(1.08);
}

.ai-camera-btn i {
    font-size: 20px;
    color: #333;
}

.ai-label {
    display: none;
}

.header-right-meituan {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.scan-btn,
.msg-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.scan-btn:hover,
.msg-btn:hover {
    background: rgba(255,255,255,0.5);
    transform: scale(1.08);
}

.scan-btn i,
.msg-btn i {
    font-size: 16px;
}

.msg-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 14px;
    height: 14px;
    background: #FF3B30;
    color: white;
    font-size: 9px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    font-weight: 600;
}

@media (max-width: 375px) {
    .location-text {
        max-width: 70px;
        font-size: 12px;
    }
    
    .search-input-container {
        padding: 8px 12px;
    }
    
    .ai-camera-inner {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .ai-label {
        display: none;
    }
    
    .scan-btn,
    .msg-btn {
        width: 34px;
        height: 34px;
        font-size: 18px;
    }
}

/* ========== 定位选择器弹窗 ========== */
.location-picker-overlay {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 10000;
    animation: pickerFadeIn 0.2s ease;
}
@keyframes pickerFadeIn { from { opacity: 0; } to { opacity: 1; } }

.location-picker-sheet {
    width: 100%;
    max-width: 480px;
    max-height: 75vh;
    background: #fff;
    border-radius: 16px 16px 0 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: pickerSlideUp 0.25s ease;
}
@keyframes pickerSlideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.location-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}
.location-picker-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}
.location-picker-close {
    width: 28px;
    height: 28px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.location-picker-close:hover { background: #e0e0e0; }

.location-picker-tabs {
    padding: 12px 20px;
    font-size: 13px;
    color: #666;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
    overflow-x: auto;
    flex-shrink: 0;
}
.location-picker-tabs span { display: inline; }
.location-picker-tabs .active { color: var(--primary); font-weight: 600; }
.location-tab-arrow { color: #ccc; margin: 0 4px; }

.location-picker-body {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
    -webkit-overflow-scrolling: touch;
}
.location-picker-loading,
.location-picker-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
}
.location-picker-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    font-size: 15px;
    color: #333;
    cursor: pointer;
    transition: background 0.15s;
}
.location-picker-item:hover,
.location-picker-item:active { background: #f8f8f8; }
.location-picker-item + .location-picker-item { border-top: 1px solid #f5f5f5; }
.location-picker-arrow {
    font-size: 11px;
    color: #bbb;
}

.location-picker-footer {
    padding: 10px 20px;
    border-top: 1px solid #eee;
    font-size: 12px;
    color: #999;
    flex-shrink: 0;
}

/* ========== 新手引导·身份分流 ========== */
.guide-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    justify-content: center;
    align-items: center;
    padding: 16px;
}
.guide-overlay.guide-visible {
    display: flex;
}

/* 温馨柔和遮罩 */
.guide-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(255,220,180,0.45);
    animation: guideFadeIn 0.25s ease;
}
@keyframes guideFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* 温馨面板 */
.guide-panel {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 340px;
    background: linear-gradient(to bottom, #FFFEF9 0%, #FFF8EA 100%);
    border-radius: 20px;
    padding: 24px 18px 20px;
    box-shadow: 0 12px 36px rgba(255,140,60,0.22);
    animation: guidePanelIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes guidePanelIn {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.guide-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border: none;
    background: #FFF3E0;
    border-radius: 50%;
    font-size: 15px;
    color: #AA8866;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.guide-close-btn:hover { background: #FFE0B0; color: #664422; }

/* 头部 */
.guide-header { text-align: center; margin-bottom: 18px; }
.guide-wave img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 8px;
    box-shadow: 0 4px 12px rgba(255,150,80,0.3);
}
.guide-title {
    font-size: 17px;
    font-weight: 600;
    color: #553311;
    margin: 0 0 6px;
}
.guide-subtitle {
    font-size: 11px;
    color: #997755;
    margin: 0;
    line-height: 1.4;
}

/* 四宫格 */
.guide-identity-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.guide-id-card {
    background: linear-gradient(to bottom, #FFF9EF 0%, #FFF2DF 100%);
    border-radius: 14px;
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: 1.5px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}
.guide-id-card:hover, .guide-id-card:active {
    background: linear-gradient(to bottom, #FFE8C0 0%, #FFD8A8 100%);
    border-color: #FF9A3C;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(255, 154, 60, 0.25);
}

.guide-id-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.guide-id-tourist { background: #E8F4FF; color: #1976D2; }
.guide-id-resident { background: #FFF0E0; color: #FF8A2C; }
.guide-id-partner { background: #F3E5FF; color: #7B1FA2; }
.guide-id-supplier { background: #E8F5E9; color: #388E3C; }

.guide-id-name {
    font-size: 12px;
    font-weight: 600;
    color: #443322;
}
.guide-id-desc {
    font-size: 9px;
    color: #886644;
}

/* ===== 详情弹窗 ===== */
.guide-detail-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,0.65);
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 100px; /* 给底部导航留出空间 */
}
.guide-detail-sheet {
    width: 100%;
    max-width: 420px;
    max-height: 60vh;
    background: #FFFFFF;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: gdSheetUp 0.28s ease;
}
@keyframes gdSheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.guide-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #F0F0F0;
    flex-shrink: 0;
}
.guide-detail-title {
    font-size: 17px;
    font-weight: 700;
    color: #443322;
}
.guide-detail-close {
    width: 30px; height: 30px;
    border: none; background: #F5F5F5;
    border-radius: 50%;
    font-size: 15px; color: #999;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}

.guide-detail-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    -webkit-overflow-scrolling: touch;
}

/* 要点列表 */
.gd-bullets { display: flex; flex-direction: column; gap: 14px; }
.gd-bullet {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 11px;
    color: #886644;
    line-height: 1.55;
}
.gd-bullet i {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}
.gd-icon-green { color: #67C23A; }
.gd-bullet b { color: #443322; }

/* 底部按钮 */
.guide-detail-footer {
    display: flex;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid #F0F0F0;
    flex-shrink: 0;
}
.gd-btn-primary, .gd-btn-outline {
    flex: 1;
    padding: 11px 0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}
.gd-btn-primary {
    background: var(--primary);
    color: #fff;
    border: none;
}
.gd-btn-primary:hover { background: var(--primary-dark); }
.gd-btn-outline {
    background: #fff;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}
.gd-btn-outline:hover { background: var(--primary-light); }

/* "新手引导"浮动小图标（后期复唤入口） */
.guide-trigger-btn {
    position: fixed;
    right: 12px;
    top: 50%;
    width: auto;
    min-width: 64px;
    height: 32px;
    border-radius: 16px;
    background: rgba(255,255,255,0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 3px 12px rgba(0,0,0,0.12);
    border: 1px solid rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    font-size: 11px;
    font-weight: 500;
    color: #4FC3F7;
    cursor: pointer;
    z-index: 99998;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}
.guide-trigger-btn:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
    background: rgba(255,255,255,0.6);
}
.guide-trigger-btn:active {
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.guide-trigger-label {
    display: none;
}
.guide-trigger-text {
    display: block;
    white-space: nowrap;
    font-size: 12px;
    color: #4FC3F7;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    word-break: keep-all;
}
.guide-inline-btn {
    background: rgba(79,195,247,0.1);
    border: 1px solid #4FC3F7;
    color: #4FC3F7;
    padding: 3px 12px;
    border-radius: 14px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.guide-inline-btn:hover {
    background: #4FC3F7;
    color: white;
}

/* ========== 生鲜分类页面商品图片样式 ========== */
.category-product-img,
.category-scroll-img {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #E8F8FA, #CFEEF5);
}

.category-product-img img,
.category-scroll-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    image-rendering: auto;
    -webkit-optimize-contrast: auto;
}

/* ========== 生鲜预售页面商品图片样式 ========== */
.fresh-product-img,
.fresh-product-card-img {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #E8F8F5, #C8E6C9);
}

.fresh-product-img img,
.fresh-product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    image-rendering: auto;
    -webkit-optimize-contrast: auto;
}

/* ========== 购物车页面商品图片样式 ========== */
.cart-item-img,
.cart-product-img {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #F5F5F5, #E0E0E0);
    border-radius: 12px;
}

.cart-item-img img,
.cart-product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    image-rendering: auto;
    -webkit-optimize-contrast: auto;
}