/* ==========================================================
   拾光集 · 文创礼品商城 H5
   米白 + 金棕主题（深棕主色 + 金色点缀）
   ========================================================== */

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

:root {
    --c-bg: #FAF7F2;            /* 米白背景 */
    --c-bg-soft: #F3EDE3;       /* 浅米色（卡片底） */
    --c-text: #2C2416;          /* 深棕黑（主文字） */
    --c-text-sub: #8A7A66;      /* 灰棕（副文字） */
    --c-text-mute: #B5A892;     /* 浅棕（说明文字） */
    --c-brand: #8B6F47;         /* 主色：深棕 */
    --c-brand-dark: #5A4830;    /* 深棕（hover/active） */
    --c-gold: #C9A961;          /* 强调：金棕 */
    --c-gold-soft: #E8D5A6;     /* 浅金 */
    --c-line: #E8DFD0;          /* 分隔线 */
    --c-red: #C13B3B;           /* 价格红 */
    --c-green: #5B8C5A;         /* 成功绿 */
    --c-wx-green: #07C160;      /* 微信绿 */

    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 16px;

    --shadow-sm: 0 2px 6px rgba(60, 40, 20, 0.06);
    --shadow-md: 0 4px 14px rgba(60, 40, 20, 0.10);

    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    color: var(--c-text);
    background: #E8E2D6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
    color: inherit;
}

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

/* ==========================================================
   手机外框（桌面端居中显示，模拟手机外观）
   ========================================================== */

body {
    display: flex;
    justify-content: center;
    align-items: stretch;
}

.phone-frame {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    background: var(--c-bg);
    position: relative;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.10);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@media (min-width: 481px) {
    body {
        padding: 0;
        background: linear-gradient(135deg, #d4c9b4 0%, #e8dfd0 100%);
    }
    .phone-frame {
        min-height: 100vh;
        border-left: 1px solid rgba(0, 0, 0, 0.05);
        border-right: 1px solid rgba(0, 0, 0, 0.05);
    }
}

/* ==========================================================
   状态栏（装饰用）
   ========================================================== */

.status-bar {
    height: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--c-text);
    background: var(--c-bg);
    flex-shrink: 0;
}

.status-icons {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-icons .signal {
    width: 16px;
    height: 10px;
    background:
        linear-gradient(to right, var(--c-text) 0 25%, transparent 25% 50%, var(--c-text) 50% 75%, transparent 75% 100%);
    -webkit-mask: linear-gradient(to right, black 0 25%, transparent 25% 50%, black 50% 75%, transparent 75% 100%);
    clip-path: polygon(0 60%, 25% 60%, 25% 40%, 50% 40%, 50% 20%, 75% 20%, 75% 0, 100% 0, 100% 100%, 0 100%);
    background: var(--c-text);
}

.status-icons .wifi {
    width: 14px;
    height: 10px;
    background: var(--c-text);
    clip-path: polygon(50% 0, 100% 50%, 80% 50%, 50% 25%, 20% 50%, 0 50%);
    position: relative;
}

.status-icons .battery {
    width: 22px;
    height: 10px;
    border: 1.2px solid var(--c-text);
    border-radius: 2px;
    position: relative;
    padding: 1px;
}
.status-icons .battery::after {
    content: '';
    position: absolute;
    right: -3px;
    top: 3px;
    width: 2px;
    height: 4px;
    background: var(--c-text);
    border-radius: 0 1px 1px 0;
}
.status-icons .battery::before {
    content: '';
    display: block;
    width: 80%;
    height: 100%;
    background: var(--c-text);
    border-radius: 1px;
}

/* ==========================================================
   顶部导航栏
   ========================================================== */

.topbar {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-line);
    position: relative;
    flex-shrink: 0;
    z-index: 10;
}

.topbar-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--c-text);
    letter-spacing: 2px;
}

.topbar-back {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-text);
    border-radius: 50%;
}

.topbar-back:active {
    background: var(--c-bg-soft);
}

.topbar-action {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-text);
    border-radius: 50%;
}

/* ==========================================================
   主内容区
   ========================================================== */

.content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--c-bg);
    padding-bottom: 64px;
}

.view {
    display: none;
}
.view.active {
    display: block;
}
.view[hidden] {
    display: none !important;
}

/* ==========================================================
   首页 Banner
   ========================================================== */

.banner {
    position: relative;
    margin: 12px 16px 16px;
    padding: 28px 24px 24px;
    border-radius: var(--r-lg);
    background:
        radial-gradient(circle at 90% 10%, rgba(201, 169, 97, 0.4) 0%, transparent 40%),
        linear-gradient(135deg, #8B6F47 0%, #5A4830 100%);
    color: #FAF7F2;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.banner-eyebrow {
    display: inline-block;
    font-size: 11px;
    padding: 4px 10px;
    background: rgba(201, 169, 97, 0.25);
    border: 1px solid rgba(201, 169, 97, 0.5);
    color: var(--c-gold-soft);
    border-radius: 12px;
    letter-spacing: 1px;
    margin-bottom: 14px;
}

.banner-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 4px;
    line-height: 1.3;
    margin-bottom: 10px;
    color: #F5ECD9;
}

.banner-sub {
    font-size: 12px;
    line-height: 1.7;
    color: rgba(245, 236, 217, 0.75);
    margin-bottom: 18px;
    letter-spacing: 1px;
}

.banner-cta {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    background: var(--c-gold);
    color: #3A2A14;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    transition: transform 0.2s;
}
.banner-cta:active {
    transform: scale(0.96);
    background: var(--c-gold-soft);
}

.banner-deco {
    position: absolute;
    border-radius: 50%;
    background: rgba(201, 169, 97, 0.18);
    pointer-events: none;
}
.banner-deco-1 {
    width: 140px;
    height: 140px;
    right: -40px;
    top: -40px;
}
.banner-deco-2 {
    width: 60px;
    height: 60px;
    right: 60px;
    bottom: -20px;
    background: rgba(201, 169, 97, 0.12);
}

/* ==========================================================
   快捷分类
   ========================================================== */

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

.quick-cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 0;
    background: var(--c-bg-soft);
    border-radius: var(--r-md);
    transition: transform 0.2s, background 0.2s;
}
.quick-cat-item:active {
    transform: scale(0.96);
    background: var(--c-gold-soft);
}

.quick-cat-ico {
    font-size: 26px;
    line-height: 1;
}

.quick-cat-name {
    font-size: 11px;
    color: var(--c-text);
    letter-spacing: 1px;
}

/* ==========================================================
   区块标题
   ========================================================== */

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 16px 16px 12px;
}

.section-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--c-text);
    letter-spacing: 2px;
    position: relative;
    padding-left: 12px;
}
.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    background: var(--c-gold);
    border-radius: 2px;
}

.section-more {
    font-size: 12px;
    color: var(--c-text-sub);
    padding: 4px 8px;
}
.section-more:active {
    color: var(--c-brand);
}

/* ==========================================================
   商品网格 / 列表
   ========================================================== */

.goods-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 0 16px;
}

.goods-card {
    background: #fff;
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s;
    cursor: pointer;
    text-align: left;
    width: 100%;
}
.goods-card:active {
    transform: scale(0.97);
}

.goods-img {
    aspect-ratio: 1 / 1;
    background: var(--c-bg-soft);
    overflow: hidden;
    position: relative;
}
.goods-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.goods-info {
    padding: 10px 12px 12px;
}

.goods-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--c-text);
    line-height: 1.4;
    height: 36px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 6px;
}

.goods-price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.goods-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--c-red);
    font-family: -apple-system, "PingFang SC", sans-serif;
}
.goods-price::before {
    content: '¥';
    font-size: 12px;
    margin-right: 1px;
}

.goods-sales {
    font-size: 10px;
    color: var(--c-text-mute);
}

.goods-list {
    background: #fff;
    padding: 0 16px;
}

.goods-row {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--c-line);
    cursor: pointer;
}
.goods-row:last-child {
    border-bottom: none;
}

.goods-row-img {
    width: 92px;
    height: 92px;
    flex-shrink: 0;
    border-radius: var(--r-sm);
    overflow: hidden;
    background: var(--c-bg-soft);
}
.goods-row-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.goods-row-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--c-text);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.goods-row-desc {
    font-size: 11px;
    color: var(--c-text-mute);
    margin-top: 4px;
}

.goods-row-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
}

/* ==========================================================
   分类页
   ========================================================== */

.cat-list {
    display: flex;
    gap: 6px;
    padding: 12px 12px 8px;
    overflow-x: auto;
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-line);
    scrollbar-width: none;
}
.cat-list::-webkit-scrollbar { display: none; }

.cat-item {
    flex-shrink: 0;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 12px;
    color: var(--c-text-sub);
    background: var(--c-bg-soft);
    transition: all 0.2s;
}
.cat-item.active {
    background: var(--c-brand);
    color: #FAF7F2;
    font-weight: 600;
}

.cat-pane-head {
    padding: 14px 16px 10px;
    font-size: 13px;
    color: var(--c-text-sub);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.cat-pane-head strong {
    color: var(--c-text);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1px;
}

/* ==========================================================
   商品详情
   ========================================================== */

.detail-gallery {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--c-bg-soft);
    overflow: hidden;
}
.detail-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-pager {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 10px;
}

.detail-main {
    padding: 16px 16px 12px;
    background: #fff;
}

.detail-price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 8px;
}
.detail-price {
    font-size: 26px;
    font-weight: 700;
    color: var(--c-red);
    font-family: -apple-system, "PingFang SC", sans-serif;
}
.detail-price::before {
    content: '¥';
    font-size: 16px;
    margin-right: 2px;
}
.detail-sales {
    font-size: 11px;
    color: var(--c-text-mute);
}

.detail-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--c-text);
    line-height: 1.5;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.detail-sub {
    font-size: 12px;
    color: var(--c-text-sub);
    line-height: 1.5;
    margin-bottom: 10px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.detail-tag {
    font-size: 10px;
    padding: 3px 8px;
    background: var(--c-bg-soft);
    color: var(--c-brand);
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.detail-block {
    margin-top: 8px;
    padding: 14px 16px;
    background: #fff;
}
.detail-block-head {
    font-size: 14px;
    font-weight: 600;
    color: var(--c-text);
    margin-bottom: 10px;
    letter-spacing: 1px;
}
.detail-block-sub {
    font-size: 12px;
    color: var(--c-text-mute);
    font-weight: 400;
}

.spec-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.spec-item {
    padding: 6px 14px;
    border: 1px solid var(--c-line);
    border-radius: 6px;
    font-size: 12px;
    color: var(--c-text-sub);
}
.spec-item.active {
    border-color: var(--c-brand);
    color: var(--c-brand);
    background: rgba(139, 111, 71, 0.08);
}

.detail-shipping {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: var(--c-text-sub);
}
.detail-shipping-sub {
    font-size: 11px;
    color: var(--c-text-mute);
}

.detail-desc {
    font-size: 13px;
    color: var(--c-text-sub);
    line-height: 1.8;
    letter-spacing: 0.5px;
}

.review-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.review-item {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--c-line);
}
.review-item:last-child { border-bottom: none; padding-bottom: 0; }

.review-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.review-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--c-gold);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}
.review-name {
    font-size: 12px;
    color: var(--c-text);
    font-weight: 500;
}
.review-time {
    font-size: 10px;
    color: var(--c-text-mute);
    margin-left: auto;
}
.review-text {
    font-size: 12px;
    color: var(--c-text-sub);
    line-height: 1.6;
}

/* 详情页购买数量 */
.detail-qty-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding: 14px 16px;
    background: #fff;
}
.detail-qty-label {
    font-size: 13px;
    color: var(--c-text-sub);
}
.detail-stepper {
    display: flex;
    align-items: center;
    border: 1px solid var(--c-line);
    border-radius: 16px;
    overflow: hidden;
}
.detail-stepper button {
    width: 28px;
    height: 28px;
    background: #fff;
    color: var(--c-text-sub);
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}
.detail-stepper button:active { background: var(--c-bg-soft); }
.detail-stepper button:disabled { color: var(--c-line); }
.detail-step-val {
    min-width: 36px;
    text-align: center;
    font-size: 13px;
    color: var(--c-text);
}

/* 详情页底部操作栏 */
.detail-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 60px;
    background: #fff;
    border-top: 1px solid var(--c-line);
    display: flex;
    align-items: center;
    padding: 0 8px;
    gap: 6px;
    z-index: 25;
    padding-bottom: var(--safe-bottom);
}

.detail-bar-icon {
    width: 56px;
    height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--c-text-sub);
    font-size: 11px;
    position: relative;
}
.detail-bar-icon:active { color: var(--c-brand); }
.detail-bar-ico { font-size: 18px; line-height: 1; }
.detail-bar-txt {
    font-size: 10px;
    letter-spacing: 0.5px;
}
.detail-bar-badge {
    position: absolute;
    top: 0;
    right: 8px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--c-red);
    color: #fff;
    font-size: 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.detail-addcart {
    flex: 1;
    height: 42px;
    background: var(--c-gold);
    color: #3A2A14;
    border-radius: 22px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
}
.detail-addcart:active { background: var(--c-gold-soft); }

.detail-buynow {
    flex: 1;
    height: 42px;
    background: var(--c-red);
    color: #fff;
    border-radius: 22px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
}
.detail-buynow:active { opacity: 0.92; }

/* ==========================================================
   购物车
   ========================================================== */

.cart-list {
    padding: 12px 16px 140px;   /* 底部留空间给 cart-bar (60) + tabbar (60) */
}
.cart-item {
    display: flex;
    gap: 12px;
    padding: 14px;
    background: #fff;
    border-radius: var(--r-md);
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
    align-items: center;
}

.cart-check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid var(--c-line);
    background: #fff;
    flex-shrink: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.cart-check.checked {
    background: var(--c-brand);
    border-color: var(--c-brand);
}
.cart-check.checked::after {
    content: '✓';
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.cart-item-img {
    width: 78px;
    height: 78px;
    border-radius: var(--r-sm);
    overflow: hidden;
    background: var(--c-bg-soft);
    flex-shrink: 0;
}
.cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.cart-item-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--c-text);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.cart-item-spec {
    font-size: 11px;
    color: var(--c-text-mute);
}

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

.cart-item-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--c-red);
    font-family: -apple-system, sans-serif;
}
.cart-item-price::before {
    content: '¥';
    font-size: 11px;
    margin-right: 1px;
}

.cart-stepper {
    display: flex;
    align-items: center;
    border: 1px solid var(--c-line);
    border-radius: 14px;
    overflow: hidden;
}
.cart-stepper button {
    width: 26px;
    height: 26px;
    background: #fff;
    color: var(--c-text-sub);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-stepper button:active {
    background: var(--c-bg-soft);
}
.cart-stepper button:disabled {
    color: var(--c-line);
}
.cart-stepper .stepper-val {
    min-width: 32px;
    text-align: center;
    font-size: 12px;
    color: var(--c-text);
}

.cart-empty {
    padding: 80px 16px;
    text-align: center;
}
.cart-empty-icon { font-size: 60px; opacity: 0.5; margin-bottom: 16px; }
.cart-empty-text { font-size: 14px; color: var(--c-text-mute); margin-bottom: 20px; }
.cart-empty-btn {
    display: inline-block;
    padding: 10px 30px;
    background: var(--c-brand);
    color: #FAF7F2;
    border-radius: 20px;
    font-size: 13px;
    letter-spacing: 2px;
}

.cart-bar {
    position: fixed;
    bottom: 60px;            /* 浮在 tabbar 上方，避免被遮挡 */
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 60px;
    background: #fff;
    border-top: 1px solid var(--c-line);
    display: flex;
    align-items: center;
    padding: 0 12px 0 16px;
    z-index: 35;              /* 高于 tabbar 的 30 */
    box-shadow: 0 -2px 8px rgba(60, 40, 20, 0.04);
}

.cart-check-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-check-input {
    width: 18px;
    height: 18px;
    accent-color: var(--c-brand);
}

.cart-total {
    flex: 1;
    text-align: right;
    margin-right: 12px;
}
.cart-total-label { font-size: 12px; color: var(--c-text-sub); }
.cart-total-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--c-red);
    font-family: -apple-system, sans-serif;
}
.cart-total-price::before {
    content: '¥';
    font-size: 13px;
    margin-right: 1px;
}

.cart-submit {
    height: 40px;
    padding: 0 20px;
    background: var(--c-brand);
    color: #FAF7F2;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
}
.cart-submit:disabled {
    background: var(--c-line);
    color: var(--c-text-mute);
}

/* ==========================================================
   订单确认
   ========================================================== */

.checkout-address {
    margin: 12px 16px 0;
    padding: 16px;
    background: #fff;
    border-radius: var(--r-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.checkout-address::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--c-gold);
}

.checkout-addr-info { flex: 1; }

.checkout-addr-name {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 15px;
    font-weight: 600;
    color: var(--c-text);
}
.checkout-addr-name span:last-child {
    font-weight: 400;
    font-size: 13px;
    color: var(--c-text-sub);
    letter-spacing: 0.5px;
}

.checkout-addr-text {
    font-size: 12px;
    color: var(--c-text-sub);
    line-height: 1.6;
    padding-left: 0;
}

.checkout-addr-tag {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 6px;
    background: var(--c-gold);
    color: #3A2A14;
    font-size: 10px;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

.checkout-addr-arrow {
    font-size: 24px;
    color: var(--c-text-mute);
    margin-left: 8px;
}

.checkout-goods {
    margin: 12px 16px 0;
    background: #fff;
    border-radius: var(--r-md);
    padding: 12px 16px;
}

.checkout-goods-head {
    font-size: 13px;
    font-weight: 600;
    color: var(--c-text);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--c-line);
}

.checkout-goods-row {
    display: flex;
    gap: 10px;
    padding: 6px 0;
    align-items: center;
}
.checkout-goods-img {
    width: 56px;
    height: 56px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--c-bg-soft);
    flex-shrink: 0;
}
.checkout-goods-img img { width: 100%; height: 100%; object-fit: cover; }

.checkout-goods-info {
    flex: 1;
    min-width: 0;
}
.checkout-goods-title {
    font-size: 13px;
    color: var(--c-text);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}
.checkout-goods-spec {
    font-size: 11px;
    color: var(--c-text-mute);
    margin-top: 2px;
}
.checkout-goods-price {
    font-size: 13px;
    font-weight: 600;
    color: var(--c-text);
    text-align: right;
}
.checkout-goods-price-qty {
    font-size: 10px;
    color: var(--c-text-mute);
    margin-top: 2px;
}

.checkout-options {
    margin: 12px 16px 0;
    background: #fff;
    border-radius: var(--r-md);
    padding: 0 16px;
}
.checkout-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--c-line);
    font-size: 13px;
}
.checkout-row:last-child { border-bottom: none; }
.checkout-row-label { color: var(--c-text-sub); }
.checkout-row-value { color: var(--c-text); }

.checkout-price {
    margin: 12px 16px 0;
    background: #fff;
    border-radius: var(--r-md);
    padding: 12px 16px;
}
.checkout-price-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--c-text-sub);
    padding: 6px 0;
}
.checkout-price-total {
    border-top: 1px solid var(--c-line);
    margin-top: 6px;
    padding-top: 12px;
    font-size: 14px;
    color: var(--c-text);
    font-weight: 600;
}
.checkout-price-total span:last-child {
    color: var(--c-red);
    font-size: 18px;
    font-weight: 700;
}
.price-discount { color: var(--c-red); }

.checkout-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 60px;
    background: #fff;
    border-top: 1px solid var(--c-line);
    display: flex;
    align-items: center;
    padding: 0 16px;
    z-index: 20;
    padding-bottom: calc(0px + var(--safe-bottom));
}
.checkout-bar-info {
    flex: 1;
    text-align: right;
    margin-right: 12px;
}
.checkout-bar-label { font-size: 12px; color: var(--c-text-sub); }
.checkout-bar-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--c-red);
    font-family: -apple-system, sans-serif;
}
.checkout-bar-price::before {
    content: '¥';
    font-size: 13px;
    margin-right: 1px;
}
.checkout-submit {
    height: 40px;
    padding: 0 28px;
    background: var(--c-brand);
    color: #FAF7F2;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
}

/* ==========================================================
   支付页
   ========================================================== */

.pay-success-head {
    padding: 40px 16px 20px;
    text-align: center;
    background: #fff;
}
.pay-success-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--c-green);
    color: #fff;
    font-size: 32px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 60px;
}
.pay-success-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--c-text);
    margin-bottom: 6px;
    letter-spacing: 2px;
}
.pay-success-sub {
    font-size: 12px;
    color: var(--c-text-mute);
}

.pay-amount {
    padding: 24px 16px;
    background: var(--c-bg-soft);
    text-align: center;
    border-bottom: 1px solid var(--c-line);
}
.pay-amount-label {
    font-size: 12px;
    color: var(--c-text-sub);
    margin-bottom: 8px;
}
.pay-amount-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--c-red);
    font-family: -apple-system, sans-serif;
}
.pay-amount-price::before {
    content: '¥';
    font-size: 18px;
    margin-right: 2px;
}

.pay-order {
    margin: 12px 16px 0;
    background: #fff;
    border-radius: var(--r-md);
    padding: 12px 16px;
}
.pay-order-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 6px 0;
}
.pay-order-row span:first-child { color: var(--c-text-sub); }
.pay-order-row span:last-child { color: var(--c-text); max-width: 60%; text-align: right; }

.pay-methods {
    margin: 12px 16px 0;
    background: #fff;
    border-radius: var(--r-md);
    padding: 4px 16px;
}
.pay-method {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--c-line);
}
.pay-method:last-child { border-bottom: none; }
.pay-method-ico {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    flex-shrink: 0;
}
.pay-method-ico-wx {
    background: var(--c-wx-green);
    position: relative;
}
.pay-method-ico-wx::before {
    content: '微';
    position: absolute;
    inset: 0;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pay-method-info { flex: 1; }
.pay-method-name { font-size: 14px; font-weight: 500; color: var(--c-text); }
.pay-method-sub { font-size: 11px; color: var(--c-text-mute); margin-top: 2px; }

.pay-method-check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--c-brand);
    color: #fff;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pay-qrcode {
    padding: 20px 16px;
    text-align: center;
}
.pay-qrcode-frame {
    display: inline-block;
    padding: 16px;
    background: #fff;
    border-radius: var(--r-md);
    box-shadow: var(--shadow-md);
}
.pay-qrcode-img {
    width: 180px;
    height: 180px;
    background:
        repeating-linear-gradient(0deg, #2C2416 0 8px, transparent 8px 14px),
        repeating-linear-gradient(90deg, #2C2416 0 8px, transparent 8px 14px),
        #fff;
    background-blend-mode: multiply;
    position: relative;
}
.pay-qrcode-img::before, .pay-qrcode-img::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    border: 4px solid #2C2416;
    background: #fff;
}
.pay-qrcode-img::before { top: 8px; left: 8px; }
.pay-qrcode-img::after { top: 8px; right: 8px; }

.pay-qrcode-tip {
    font-size: 12px;
    color: var(--c-text-sub);
    margin-top: 10px;
}

.pay-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 60px;
    background: #fff;
    border-top: 1px solid var(--c-line);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 10px;
    z-index: 20;
    padding-bottom: calc(0px + var(--safe-bottom));
}
.pay-cancel {
    flex: 1;
    height: 40px;
    border: 1px solid var(--c-line);
    border-radius: 20px;
    color: var(--c-text-sub);
    font-size: 14px;
}
.pay-confirm {
    flex: 2;
    height: 40px;
    background: var(--c-wx-green);
    color: #fff;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
}

/* ==========================================================
   我的
   ========================================================== */

.mine-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 20px;
    margin: 12px 16px 0;
    background: linear-gradient(135deg, #8B6F47 0%, #5A4830 100%);
    border-radius: var(--r-md);
    color: #FAF7F2;
}
.mine-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--c-gold);
    color: #3A2A14;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
}
.mine-info { flex: 1; }
.mine-name { font-size: 17px; font-weight: 600; letter-spacing: 1px; }
.mine-id { font-size: 11px; opacity: 0.7; margin-top: 4px; }

.mine-orders {
    margin: 12px 16px 0;
    background: #fff;
    border-radius: var(--r-md);
    padding: 12px 16px;
}
.mine-orders-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--c-text);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--c-line);
}
.mine-orders-all {
    font-size: 12px;
    font-weight: 400;
    color: var(--c-text-mute);
}

.mine-orders-tabs {
    display: flex;
    gap: 16px;
    padding: 12px 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.mine-orders-tabs::-webkit-scrollbar { display: none; }
.mine-orders-tab {
    font-size: 13px;
    color: var(--c-text-sub);
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    flex-shrink: 0;
}
.mine-orders-tab.active {
    color: var(--c-brand);
    border-color: var(--c-brand);
    font-weight: 600;
}

.mine-orders-list {
    padding: 8px 0;
}
.mine-order-row {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--c-line);
}
.mine-order-row:last-child { border-bottom: none; }
.mine-order-img {
    width: 56px;
    height: 56px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--c-bg-soft);
    flex-shrink: 0;
}
.mine-order-img img { width: 100%; height: 100%; object-fit: cover; }
.mine-order-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.mine-order-title {
    font-size: 12px;
    color: var(--c-text);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.mine-order-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--c-text-mute);
}
.mine-order-status {
    color: var(--c-brand);
    font-weight: 500;
}

.mine-list {
    margin: 12px 16px 0;
    background: #fff;
    border-radius: var(--r-md);
}
.mine-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    font-size: 14px;
    color: var(--c-text);
    border-bottom: 1px solid var(--c-line);
}
.mine-list-item:last-child { border-bottom: none; }
.mine-list-arrow { color: var(--c-text-mute); font-size: 16px; }

.orders-empty {
    padding: 100px 16px;
    text-align: center;
}
.orders-empty-icon { font-size: 50px; opacity: 0.4; margin-bottom: 14px; }
.orders-empty-text { font-size: 14px; color: var(--c-text-mute); }

/* ==========================================================
   底部 TabBar
   ========================================================== */

.tabbar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 60px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--c-line);
    display: flex;
    z-index: 30;
    padding-bottom: var(--safe-bottom);
}

.tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--c-text-mute);
    font-size: 10px;
    position: relative;
    transition: color 0.2s;
}
.tab.active {
    color: var(--c-brand);
}
.tab-ico {
    font-size: 22px;
    line-height: 1;
}
.tab-name {
    font-size: 10px;
    letter-spacing: 1px;
}

.tab-badge {
    position: absolute;
    top: 6px;
    right: 50%;
    transform: translateX(18px);
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--c-red);
    color: #fff;
    font-size: 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* ==========================================================
   Store footer (备案信息)
   ========================================================== */

.store-footer {
    padding: 32px 16px 24px;
    text-align: center;
    color: var(--c-text-mute);
}
.store-line {
    font-size: 11px;
    color: var(--c-text-mute);
    margin-bottom: 16px;
    letter-spacing: 2px;
}
.store-divider {
    width: 32px;
    height: 1px;
    background: var(--c-line);
    margin: 0 auto 16px;
}
.store-info {
    margin-bottom: 12px;
}
.store-brand {
    font-size: 13px;
    color: var(--c-text);
    font-weight: 500;
    margin-bottom: 6px;
    letter-spacing: 1px;
}
.store-sub {
    font-size: 11px;
    color: var(--c-text-mute);
    line-height: 1.6;
}

.filings {
    margin: 12px 0;
    font-size: 11px;
    color: var(--c-text-mute);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
}
.filings a {
    color: var(--c-text-mute);
    text-decoration: none;
    transition: color 0.2s;
    letter-spacing: 0.5px;
}
.filings a:hover { color: var(--c-brand); }

.filing-sep {
    color: var(--c-line);
    margin: 0 2px;
}

.gongan-icon {
    width: 14px;
    height: 14px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 3px;
    margin-top: -2px;
}

.store-copy {
    font-size: 11px;
    color: var(--c-text-mute);
    margin-top: 4px;
}

/* ==========================================================
   Toast
   ========================================================== */

.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.78);
    color: #fff;
    font-size: 13px;
    border-radius: 8px;
    z-index: 100;
    max-width: 80%;
    text-align: center;
    animation: toast-in 0.2s ease-out;
}

@keyframes toast-in {
    from { opacity: 0; transform: translate(-50%, -40%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

/* ==========================================================
   动画
   ========================================================== */

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

.view.active {
    animation: fade-in 0.25s ease-out;
}