/* ========================================
 * 景山生态积分兑换商城 - 样式表 v2
 * @description 精细化 UI 升级：更精致的色彩、动效、布局
 * ======================================== */

/* ====== CSS 变量 ====== */
:root {
    --primary: #1aad19;
    --primary-dark: #149a12;
    --primary-light: #e8f9e8;
    --primary-gradient: linear-gradient(135deg, #1aad19 0%, #0d8f0d 100%);
    --secondary: #ff8c1a;
    --secondary-light: #fff4e6;
    --danger: #fa5151;
    --success: #2aae67;
    --warning: #ff8c1a;
    --info: #1989fa;

    --bg: #f6f7f8;
    --bg-white: #ffffff;
    --bg-gray: #f2f3f5;
    --bg-card: #ffffff;

    --text-primary: #1a1a1a;
    --text-secondary: #576b95;
    --text-light: #999999;
    --text-soft: #c2c2c2;
    --text-white: #ffffff;

    --border: #e8e8e8;
    --border-light: #f0f0f0;

    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 999px;

    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.1);
    --shadow-primary: 0 4px 16px rgba(26, 173, 25, 0.2);

    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --spacing-xl: 20px;
    --spacing-xxl: 24px;

    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ====== 全局样式 ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', 'Noto Sans SC', sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    background: #ededed;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

a:hover {
    opacity: 0.8;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ====== 页面容器 ====== */
.page-container {
    max-width: 750px;
    margin: 0 auto;
    padding-bottom: 70px;
    background: var(--bg);
    min-height: 100vh;
    position: relative;
}

.page {
    display: none;
    animation: pageIn 0.35s ease-out;
}

.page.active {
    display: block;
}

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

/* ====== 底部 Tab 栏 ====== */
.bottom-tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 750px;
    margin: 0 auto;
    height: 60px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 0.5px solid rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all var(--transition-normal);
    padding: 4px 0 2px;
    -webkit-tap-highlight-color: transparent;
}

.tab-item .tab-icon {
    font-size: 24px;
    margin-bottom: 2px;
    transition: transform var(--transition-normal);
}

.tab-item span:not(.tab-icon):not(.tab-badge) {
    font-size: 10px;
    color: var(--text-light);
    transition: color var(--transition-normal);
    letter-spacing: 0.5px;
}

.tab-item.active .tab-icon {
    transform: scale(1.15) translateY(-1px);
}

.tab-item.active span:not(.tab-icon):not(.tab-badge) {
    color: var(--primary);
    font-weight: 600;
}

.tab-item.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--primary);
    border-radius: 0 0 2px 2px;
}

.tab-badge {
    position: absolute;
    top: 0;
    right: 50%;
    transform: translateX(20px);
    background: var(--danger);
    color: var(--text-white);
    font-size: 10px;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    border-radius: var(--radius-full);
    padding: 0 5px;
    text-align: center;
    font-weight: 600;
    border: 1.5px solid #fff;
}

/* ====== 首页 Hero 区域 ====== */
.hero {
    background: linear-gradient(160deg, #1aad19 0%, #0d7a0d 50%, #0a6b0a 100%);
    color: var(--text-white);
    padding: 12px 24px 9px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -20%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    border-radius: 50%;
}

.hero h1 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: 2px;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.hero p {
    font-size: 13px;
    opacity: 0.85;
    letter-spacing: 4px;
    position: relative;
    z-index: 1;
}

/* ====== 轮播图 ====== */
.carousel {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--bg-gray);
    box-shadow: var(--shadow-md);
    width: 100%;
    aspect-ratio: 16 / 9;
}

.carousel-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    height: 100%;
}

.carousel-slide {
    min-width: 100%;
    position: relative;
    height: 100%;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(4px);
    color: var(--text-white);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    z-index: 10;
    opacity: 0;
}

.carousel:hover .carousel-arrow {
    opacity: 1;
}

.carousel-arrow:hover {
    background: rgba(0, 0, 0, 0.45);
    transform: translateY(-50%) scale(1.1);
}

.carousel-arrow.prev { left: 10px; }
.carousel-arrow.next { right: 10px; }

.carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.carousel-dot.active {
    background: var(--text-white);
    width: 20px;
    box-shadow: 0 0 6px rgba(255,255,255,0.5);
}

/* ====== 区块标题 ====== */
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 16px 14px;
}

.section-title h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
    letter-spacing: 0.5px;
}

.section-title p {
    font-size: 12px;
    color: var(--text-light);
    letter-spacing: 0.5px;
}

.more-link {
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color var(--transition-fast);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: var(--bg-gray);
}

.more-link:hover {
    color: var(--primary);
    background: var(--primary-light);
}

/* ====== 分类导航 ====== */
.category-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 0 16px 24px;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform var(--transition-normal);
    -webkit-tap-highlight-color: transparent;
}

.category-item:hover {
    transform: translateY(-3px);
}

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

.category-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(145deg, #f0faf0, #e0f5e0);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 6px;
    transition: box-shadow var(--transition-normal);
}

.category-item:hover .category-icon {
    box-shadow: 0 4px 12px rgba(26, 173, 25, 0.15);
}

.category-item span {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ====== 分类商品页 ====== */
.category-goods-page {
    padding: var(--page-padding);
}

.category-goods-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
	padding: 0 12px;
}

.category-goods-back {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-primary);
    padding: 0;
    line-height: 1;
}

.category-goods-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.subcategory-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
	padding: 0 12px;
}

.subcategory-btn {
    padding: 6px 14px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.subcategory-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.subcategory-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.load-more {
    padding: 20px 0;
    text-align: center;
}

.load-more .btn {
    max-width: 300px;
    margin: 0 auto;
}

/* ====== 商品网格 ====== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 0 12px 24px;
}

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

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

.product-card:active {
    transform: scale(0.98);
}

.product-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #f8f8f8, #f0f0f0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #d0d0d0;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.product-info {
    padding: 12px;
}

.product-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--danger);
    letter-spacing: -0.5px;
}

.product-price span {
    font-size: 11px;
    font-weight: 500;
    margin-left: 2px;
    color: var(--text-light);
}

/* ====== 商品列表页 ====== */
.goods-list-page {
    padding: var(--page-padding);
}

.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.search-input {
    flex: 1;
    height: 42px;
    padding: 0 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 14px;
    outline: none;
    transition: all var(--transition-normal);
    background: var(--bg-white);
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 173, 25, 0.1);
}

.goods-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.filter-btn {
    padding: 7px 16px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.filter-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-white);
    box-shadow: var(--shadow-primary);
}

.loading {
    text-align: center;
    padding: 40px 0;
}

.loading-spinner {
    width: 28px;
    height: 28px;
    border: 2.5px solid var(--border-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 0 auto 12px;
}

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

.loading p {
    font-size: 13px;
    color: var(--text-light);
}

/* ====== 商品详情页 ====== */
.goods-detail-page {
    padding-bottom: 80px;
}

.goods-gallery {
    background: var(--bg-white);
}

.gallery-main {
    width: 100%;
    height: 375px;
    background: linear-gradient(135deg, #f8f8f8, #f0f0f0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    color: #d0d0d0;
    overflow: hidden;
    position: relative;
    touch-action: pan-y;
}

.gallery-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-slide {
    min-width: 100%;
    height: 100%;
    flex-shrink: 0;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}

.gallery-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.gallery-dot.active {
    width: 18px;
    border-radius: 3px;
    background: #fff;
}

.gallery-thumbs {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    overflow-x: auto;
    background: var(--bg-white);
}

.gallery-thumb {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition-normal);
    flex-shrink: 0;
}

.gallery-thumb.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(26, 173, 25, 0.2);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.goods-info-card {
    background: var(--bg-white);
    padding: 20px 16px;
    margin-bottom: 10px;
}

.goods-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
}

.goods-price {
    font-size: 30px;
    font-weight: 800;
    color: var(--danger);
    letter-spacing: -1px;
}

.goods-price-unit {
    font-size: 13px;
    color: var(--text-light);
}

.goods-original-price {
    font-size: 13px;
    color: var(--text-soft);
    text-decoration: line-through;
}

.goods-name {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.5;
}

.goods-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.7;
}

.goods-stats {
    display: flex;
    gap: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.stat-label {
    font-size: 11px;
    color: var(--text-light);
    letter-spacing: 1px;
}

/* ====== SKU 区域 ====== */
.sku-section {
    background: var(--bg-white);
    padding: 16px;
    margin-bottom: 10px;
}

.sku-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.sku-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sku-option {
    padding: 8px 18px;
    background: var(--bg-gray);
    border: 1.5px solid transparent;
    border-radius: var(--radius-full);
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.sku-option:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.sku-option.active,
.sku-option.selected {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 500;
}

.quantity-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 0;
}

.quantity-btn {
    width: 34px;
    height: 34px;
    background: var(--bg-gray);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

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

.quantity-btn:active {
    transform: scale(0.9);
}

.quantity-input {
    width: 50px;
    height: 34px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 15px;
    font-weight: 600;
    outline: none;
}

/* ====== 商品详情内容 ====== */
.goods-detail-content {
    background: var(--bg-white);
    margin: 10px 0;
    padding: 16px;
    overflow: hidden;
}

.goods-detail-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.goods-detail-content * {
    max-width: 100%;
    box-sizing: border-box;
}

/* ====== 商品操作按钮 ====== */
.goods-actions {
    position: fixed;
    bottom: 68px;
    left: 0;
    right: 0;
    max-width: 750px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px 16px;
    display: flex;
    gap: 10px;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
    z-index: 100;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0));
}

.goods-back-top {
    position: fixed;
    bottom: calc(68px + 60px + 80px);
    left: 50%;
    transform: translateX(-50%);
    max-width: 750px;
    width: 100%;
    padding: 0 16px;
    z-index: 99;
    display: flex;
    justify-content: flex-end;
    pointer-events: none;
}

.goods-back-top span {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #666;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: background 0.2s;
}

.action-btn {
    flex: 1;
    height: 44px;
    border: none;
    border-radius: var(--radius-full);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    letter-spacing: 1px;
}

.action-btn-cart {
    background: linear-gradient(135deg, #ff9500, #ff6b00);
    color: var(--text-white);
    box-shadow: 0 4px 12px rgba(255, 149, 0, 0.3);
}

.action-btn-cart:hover {
    box-shadow: 0 6px 20px rgba(255, 149, 0, 0.4);
    transform: translateY(-1px);
}

.action-btn-buy {
    background: var(--primary-gradient);
    color: var(--text-white);
    box-shadow: var(--shadow-primary);
}

.action-btn-buy:hover {
    box-shadow: 0 6px 20px rgba(26, 173, 25, 0.35);
    transform: translateY(-1px);
}

.action-btn:active {
    transform: scale(0.97);
}

/* ====== 购物车页 ====== */
.cart-page {
    padding: 16px;
}

.cart-item {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 10px;
    display: flex;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.cart-item:hover {
    box-shadow: var(--shadow-md);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    background: var(--bg-gray);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #d0d0d0;
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.cart-item-title,
.cart-item-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-item-sku {
    font-size: 11px;
    color: var(--text-light);
    background: var(--bg-gray);
    padding: 2px 8px;
    border-radius: var(--radius-xs);
    display: inline-block;
}

.cart-item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-item-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--danger);
}

.cart-item-remove,
.cart-item-delete {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-xs);
    transition: all var(--transition-fast);
}

.cart-item-remove:hover,
.cart-item-delete:hover {
    color: var(--danger);
    background: #fff0f0;
}

.cart-empty {
    text-align: center;
    padding: 60px 0 40px;
}

.cart-empty-icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.cart-empty-text {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.cart-footer {
    position: fixed;
    bottom: 60px;
    left: 0;
    right: 0;
    max-width: 750px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.04);
    z-index: 99;
}

.cart-total {
    font-size: 14px;
    color: var(--text-secondary);
}

.cart-total-amount {
    font-size: 20px;
    font-weight: 800;
    color: var(--danger);
}

/* ====== 确认订单页 ====== */
.checkout-page {
    padding-bottom: 80px;
}

.checkout-section {
    background: var(--bg-white);
    padding: 18px 16px;
    margin-bottom: 10px;
}

.checkout-section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.checkout-goods-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.checkout-goods-item {
    display: flex;
    gap: 12px;
    align-items: center;
}

.checkout-goods-image {
    width: 56px;
    height: 56px;
    background: var(--bg-gray);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #d0d0d0;
    overflow: hidden;
    flex-shrink: 0;
}

.checkout-goods-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.checkout-goods-info {
    flex: 1;
    min-width: 0;
}

.checkout-goods-title,
.checkout-goods-name {
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.checkout-goods-sku {
    font-size: 11px;
    color: var(--text-light);
}

.checkout-goods-right {
    text-align: right;
    flex-shrink: 0;
}

.checkout-goods-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--danger);
}

.checkout-goods-qty {
    font-size: 12px;
    color: var(--text-light);
}

.checkout-summary {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
}

.summary-row.total {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.summary-value {
    color: var(--danger);
    font-weight: 800;
}

.checkout-footer {
    position: fixed;
    bottom: 68px;
    left: 0;
    right: 0;
    max-width: 750px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
    z-index: 100;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0));
}

.checkout-total-label {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 2px;
}

.checkout-total-amount {
    font-size: 20px;
    font-weight: 800;
    color: var(--danger);
}

/* ====== 地址管理页 ====== */
.address-page {
    padding: 16px;
}

.address-item {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    border-left: 3px solid transparent;
}

.address-item:hover {
    box-shadow: var(--shadow-md);
}

.address-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.address-item-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.address-item-default {
    font-size: 10px;
    color: var(--primary);
    background: var(--primary-light);
    padding: 1px 6px;
    border-radius: var(--radius-xs);
    font-weight: 500;
}

.address-item-phone {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.address-item-detail {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 10px;
}

.address-item-actions {
    display: flex;
    gap: 16px;
    padding-top: 10px;
    border-top: 1px solid var(--border-light);
}

.address-action {
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.address-action:hover {
    color: var(--primary);
}

.address-add-btn {
    margin-top: 16px;
}

.address-form {
    background: var(--bg-white);
    padding: 20px 16px;
    border-radius: var(--radius-md);
}

.address-form h3 {
    font-size: 17px;
    font-weight: 600;
}

.form-row {
    display: flex;
    gap: 10px;
}

.form-row .form-group {
    flex: 1;
}

.form-select {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    background: var(--bg-white);
    transition: border-color var(--transition-normal);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%23999'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.form-select:focus {
    border-color: var(--primary);
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-row label {
    margin-bottom: 0 !important;
}

/* ====== 订单列表页 ====== */
.orders-page {
    padding: 16px;
}

.order-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.order-tab {
    flex: 1;
    padding: 12px 8px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-normal);
    text-align: center;
    font-weight: 500;
    position: relative;
}

.order-tab.active {
    color: var(--primary);
    font-weight: 600;
}

.order-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
}

.order-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.order-item {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.order-item:hover {
    box-shadow: var(--shadow-md);
}

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

.order-no {
    font-size: 12px;
    color: var(--text-light);
    font-family: 'SF Mono', 'Menlo', monospace;
}

.order-id {
    font-size: 12px;
    color: var(--text-light);
}

.order-status {
    font-size: 13px;
    font-weight: 600;
}

.order-goods {
    margin-bottom: 12px;
}

.order-goods-item {
    display: flex;
    gap: 12px;
    align-items: center;
}

.order-goods-image {
    width: 60px;
    height: 60px;
    background: var(--bg-gray);
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.order-goods-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.order-goods-info {
    flex: 1;
}

.order-goods-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.order-goods-sku {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 4px;
}

.order-goods-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--danger);
}

.order-goods-price span {
    font-size: 14px;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.order-time {
    font-size: 12px;
    color: var(--text-light);
}

.order-total {
    font-size: 14px;
    font-weight: 600;
    color: var(--danger);
}

.order-empty {
    text-align: center;
    padding: 60px 0 40px;
}

.order-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.4;
}

.order-empty-text {
    font-size: 14px;
    color: var(--text-light);
}

/* ====== 认证页面（登录/注册/忘记密码） ====== */
.auth-page {
    padding: 48px 20px;
    min-height: calc(100vh - 70px);
    background: linear-gradient(180deg, var(--primary-light) 0%, var(--bg) 40%);
}

.auth-card {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 36px 24px;
    box-shadow: var(--shadow-lg);
}

.auth-header {
    text-align: center;
    margin-bottom: 36px;
}

.auth-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.auth-header p {
    font-size: 13px;
    color: var(--text-light);
    letter-spacing: 1px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    height: 46px;
    padding: 0 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    transition: all var(--transition-normal);
    background: var(--bg-white);
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 173, 25, 0.08);
}

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

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 13px;
}

.form-options label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    margin-bottom: 0;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
    color: var(--text-secondary);
}

.auth-divider {
    text-align: center;
    margin: 28px 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-light);
}

.auth-divider span {
    position: relative;
    background: var(--bg-white);
    padding: 0 16px;
    font-size: 12px;
    color: var(--text-light);
}

/* ====== 我的页面 ====== */
.profile-header {
    background: linear-gradient(160deg, #1aad19 0%, #0d7a0d 60%, #0a6b0a 100%);
    color: var(--text-white);
    padding: 40px 20px 32px;
    position: relative;
    overflow: hidden;
}

.profile-header::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.avatar {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.profile-details h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-details p {
    font-size: 12px;
    opacity: 0.8;
}

.badge-first-sub {
    display: inline-block;
    margin-top: 6px;
    padding: 2px 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

.asset-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    padding: 0;
    background: var(--bg-white);
    margin: -16px 12px 12px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 2;
    overflow: hidden;
}

.asset-card {
    text-align: center;
    padding: 16px 6px;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.asset-card:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: var(--border-light);
}

.asset-card:not(:nth-child(3n))::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: var(--border-light);
}

.asset-card:hover {
    background: var(--primary-light);
}

.asset-card:active {
    background: #f0f8f0;
}

.asset-icon {
    font-size: 22px;
    margin-bottom: 6px;
}

.asset-value {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.asset-label {
    font-size: 12px;
    color: var(--text-light);
    letter-spacing: 0.5px;
}

.menu-list {
    background: var(--bg-white);
    margin: 0 12px 12px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 16px;
    cursor: pointer;
    transition: background var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.menu-item:not(:last-child) {
    border-bottom: 0.5px solid var(--border-light);
}

.menu-item:hover {
    background: var(--bg-gray);
}

.menu-item:active {
    background: #f0f0f0;
}

.menu-icon {
    font-size: 20px;
    margin-right: 14px;
    width: 28px;
    text-align: center;
}

.menu-text {
    flex: 1;
}

.menu-text h4 {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.menu-text p {
    font-size: 12px;
    color: var(--text-light);
}

.menu-badge {
    padding: 2px 8px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 10px;
    border-radius: var(--radius-full);
    margin-right: 8px;
    font-weight: 600;
}

.menu-arrow {
    font-size: 16px;
    color: var(--text-soft);
}

/* ====== 按钮样式 ====== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-align: center;
    letter-spacing: 1px;
    -webkit-tap-highlight-color: transparent;
}

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

.btn-primary {
    background: var(--primary-gradient);
    color: var(--text-white);
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(26, 173, 25, 0.3);
    transform: translateY(-1px);
}

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

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

.btn-ghost {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-gray);
    border-color: var(--text-light);
}

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

.btn-lg {
    height: 48px;
    font-size: 15px;
    border-radius: var(--radius-md);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: var(--radius-xs);
}

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

.btn-danger:hover {
    opacity: 0.9;
}

/* ====== 结果提示框 ====== */
.result-box {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    text-align: center;
    display: none;
    animation: fadeIn 0.3s ease;
}

.result-box.show {
    display: block;
}

.result-box.success {
    background: var(--primary-light);
    color: var(--primary-dark);
    border: 1px solid rgba(26, 173, 25, 0.15);
}

.result-box.error {
    background: #fff0f0;
    color: var(--danger);
    border: 1px solid rgba(250, 81, 81, 0.15);
}

/* ====== Toast ====== */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-size: 14px;
    z-index: 9999;
    animation: toastIn 0.3s ease;
    max-width: 80%;
    text-align: center;
    letter-spacing: 0.5px;
}

@keyframes toastIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.85); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

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

/* ====== 页脚 ====== */
.footer {
    text-align: center;
    padding: 40px 16px 24px;
    font-size: 12px;
    color: var(--text-light);
    letter-spacing: 0.5px;
}

/* ====== 管理后台 ====== */
.page-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
}

.page-header h2 {
    font-size: 17px;
    font-weight: 600;
}

.back-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.back-btn:hover {
    background: var(--bg-gray);
}

.page-content {
    padding: 16px;
}

.admin-tabs {
    display: flex;
    gap: 0;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.admin-tab {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
}

.admin-tab.active {
    color: var(--primary);
    font-weight: 600;
}

.admin-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
}

.admin-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-item {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.admin-item-info {
    flex: 1;
    min-width: 0;
}

.admin-item-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.admin-item-desc {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.6;
}

.admin-item-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.empty {
    text-align: center;
    padding: 40px 0;
    color: var(--text-light);
    font-size: 14px;
}

/* ====== 上传凭证页面 ====== */
.apply-page {
    padding: 16px;
}

.apply-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    box-shadow: var(--shadow-md);
}

.apply-card h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.apply-subtitle {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 24px;
}

.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    background: var(--bg-gray);
    position: relative;
}

.upload-area:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.upload-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.upload-preview img {
    max-height: 200px;
    border-radius: var(--radius-sm);
}

.preview-delete-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 18px;
    line-height: 28px;
    text-align: center;
    cursor: pointer;
    z-index: 10;
    user-select: none;
}

.preview-delete-btn:hover {
    background: rgba(0,0,0,0.8);
}

.quota-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quota-row label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* ====== 我是主账号 ====== */
.main-account-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    margin-top: 12px;
    cursor: pointer;
    color: #fff;
}

.main-account-icon {
    font-size: 20px;
}

.main-account-text {
    font-size: 15px;
    font-weight: 600;
}

.main-account-arrow {
    font-size: 20px;
    color: rgba(255,255,255,0.7);
}

.main-account-card {
    background: var(--bg-white);
    border-radius: 12px;
    margin-bottom: 10px;
}

.main-account-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
}

.main-account-header h3 {
    margin: 0;
    font-size: 18px;
    color: #667eea;
}

/* ====== 子账号管理 ====== */
.subaccount-card {
    padding: 16px;
}

.subaccount-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.subaccount-header h3 {
    font-size: 17px;
    font-weight: 600;
}

.subaccount-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.subaccount-item {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
}

.subaccount-avatar {
    width: 44px;
    height: 44px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    flex-shrink: 0;
}

.subaccount-info {
    flex: 1;
    min-width: 0;
}

.subaccount-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.subaccount-info p {
    font-size: 12px;
    color: var(--text-light);
}

.subaccount-status {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-weight: 500;
    flex-shrink: 0;
}

.status-active {
    background: var(--primary-light);
    color: var(--primary);
}

.status-cancelled {
    background: #f5f5f5;
    color: var(--text-light);
}

/* ====== 响应式设计 ====== */
@media (max-width: 480px) {
    .hero {
        padding: 36px 16px 28px;
    }

    .hero h1 {
        font-size: 22px;
    }

    .asset-grid {
        grid-template-columns: repeat(3, 1fr);
        margin: -16px 8px 12px;
    }

    .menu-list {
        margin: 0 8px 12px;
    }
}

/* ====== 本地生活模块 ====== */
.local-life-section {
    margin-top: 2px;
}

.location-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fff;
    border-radius: 12px;
    margin: 0 16px 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.location-text {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.location-icon {
    font-size: 18px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f5f5f5;
    border-radius: 20px;
    padding: 8px 16px;
    flex: 1;
    max-width: 200px;
    margin-left: 12px;
}

.search-icon {
    font-size: 14px;
    color: #999;
}

.search-placeholder {
    font-size: 14px;
    color: #999;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    margin: 0 8px 12px;
}

.cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.cat-icon {
    font-size: 36px;
    line-height: 1;
}

.cat-name {
    font-size: 13px;
    color: #333;
}

.follow-section {
    background: #fff;
    border-radius: 12px;
    margin: 0 8px 12px;
    padding: 16px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.heart-icon {
    font-size: 20px;
}

.view-more {
    font-size: 14px;
    color: #999;
}



.shop-info {
    flex: 1;
}

.shop-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.sort-bar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 12px 16px;
    background: #fff;
    border-radius: 12px;
    margin: 0 8px 12px;
    position: relative;
}

.sort-item {
    font-size: 15px;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.sort-item.active {
    color: #FF6B00;
    font-weight: 600;
}

.sort-arrow {
    font-size: 12px;
    transition: transform 0.2s;
}

.sort-arrow.open {
    transform: rotate(180deg);
}

.category-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-top: 8px;
    z-index: 100;
    min-width: 140px;
    max-height: 300px;
    overflow-y: auto;
}

.category-dropdown-list {
    display: flex;
    flex-direction: column;
}

.category-dropdown-item {
    padding: 10px 16px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.category-dropdown-item:hover {
    background: #f5f5f5;
    color: #FF6B00;
}

.category-dropdown-item.active {
    color: #FF6B00;
    font-weight: 600;
    background: #fff8f0;
}

.category-dropdown-item:first-child {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.category-dropdown-item:last-child {
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.shop-list {
    background: #fff;
    border-radius: 12px;
    margin: 0 8px;
    padding: 0 16px 16px;
}

.shop-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    border-top: 1px solid #f0f0f0;
}

.shop-item:first-child {
    border-top: none;
}

.shop-avatar {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}

.shop-details {
    flex: 1;
}

.shop-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.shop-name-bold {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.shop-distance {
    font-size: 14px;
    color: #999;
}

.shop-category {
    font-size: 14px;
    color: #FF8C1A;
    margin-top: 4px;
}

/* ====== 滚动条美化 ====== */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* ====== 选中文本 ====== */
::selection {
    background: rgba(26, 173, 25, 0.15);
    color: var(--text-primary);
}

/* ====== 商家详情页面 ====== */
.merchant-detail-page {
    background: #fff;
    min-height: 100vh;
}

.merchant-cover {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #07c160, #059d4c);
}

.merchant-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.merchant-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    font-weight: 700;
}

.merchant-cover .back-btn {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.merchant-header {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #f0f0f0;
}

.merchant-avatar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.merchant-avatar {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.merchant-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.merchant-avatar .avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #07c160, #059d4c);
}

.merchant-title-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.merchant-name {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.merchant-followers {
    font-size: 12px;
    color: #999;
}

.merchant-contact {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 8px;
}

.contact-icon {
    font-size: 28px;
    color: #07c160;
}

.contact-text {
    font-size: 12px;
    color: #666;
}

.contact-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #ff4d4f;
    color: #fff;
    font-size: 10px;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    border-radius: 9px;
    text-align: center;
    padding: 0 4px;
    font-weight: 600;
}

.merchant-address {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.address-icon {
    font-size: 16px;
    color: #999;
}

.address-text {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.address-arrow {
    font-size: 18px;
    color: #ccc;
}

.merchant-actions {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.action-btn-follow {
    flex: 1;
    height: 44px;
    background: #ff4d4f;
    color: #fff;
    border: none;
    border-radius: 22px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn-follow:hover {
    background: #ff7875;
}

.action-btn-follow.followed {
    background: #fff;
    color: #666;
    border: 1px solid #ddd;
}

.action-btn-appointment {
    flex: 1;
    height: 44px;
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 22px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.action-btn-appointment:hover {
    background: #f5f5f5;
}

.appointment-icon {
    font-size: 18px;
}

.merchant-info-section {
    padding: 20px 16px;
}

.merchant-info-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.merchant-info-title span {
    font-size: 16px;
    font-weight: 700;
    color: #ff4d4f;
}

.title-line {
    flex: 1;
    height: 1px;
    background: #f0f0f0;
}

.merchant-info-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-row {
    display: flex;
    gap: 16px;
    font-size: 14px;
}

.info-label {
    color: #999;
    min-width: 80px;
    flex-shrink: 0;
}

.info-value {
    color: #333;
    flex: 1;
}

.merchant-photos-section {
    padding: 20px 16px 80px;
}

.merchant-photos-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
}

.merchant-photos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.merchant-photo-item {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.merchant-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.merchant-photo-item:hover img {
    transform: scale(1.05);
}

/* ========== 图片浏览模态框 ========== */
.photo-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}
.photo-modal-mask {
    position: absolute;
    inset: 0;
}
.photo-modal-img {
    max-width: 92vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 6px;
    z-index: 1;
}
.photo-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    line-height: 1;
}
.photo-modal-prev, .photo-modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    color: #fff;
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    user-select: none;
}
.photo-modal-prev { left: 12px; }
.photo-modal-next { right: 12px; }
.photo-modal-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 14px;
    background: rgba(0,0,0,0.4);
    padding: 4px 14px;
    border-radius: 12px;
    z-index: 2;
}
