/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    min-height: 100%;
    background: #f5f5f5;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    color: #333;
    overflow-x: hidden;
    overflow-y: auto;
}

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

/* ==================== 手机外壳 ==================== */
.phone-frame {
    width: 375px;
    height: 812px;
    margin: 20px auto;
    background: #fff;
    border-radius: 40px;
    box-shadow: 0 10px 60px rgba(0,0,0,0.15), 0 0 0 12px #1a1a1a, 0 0 0 14px #333;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ==================== 状态栏 (仿快手App) ==================== */
.status-bar {
    height: 44px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    font-size: 15px;
    font-weight: 600;
    color: #000;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

.status-bar .time {
    font-weight: 600;
}

.status-icons {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
}

.status-icons .icon {
    font-size: 14px;
}

.ks-logo-mini {
    background: linear-gradient(90deg, #ff6600, #ff9900);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin: 0 4px;
}

/* ==================== 导航栏 ==================== */
.nav-bar {
    height: 36px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    flex-shrink: 0;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    z-index: 10;
}

.nav-left {
    font-size: 28px;
    color: #333;
    font-weight: 300;
    width: 32px;
    line-height: 32px;
}

.nav-center {
    flex: 1;
}

.nav-right {
    display: flex;
    gap: 18px;
}

.nav-icon {
    font-size: 18px;
    color: #333;
}

/* ==================== 主内容容器 ==================== */
.app-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    background: #f5f5f5;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

.app-container::-webkit-scrollbar {
    display: none;
}

/* ==================== 页面 ==================== */
.page {
    display: none;
    min-height: 100%;
}

.page.active {
    display: block;
}

/* ==================== 底部 TabBar ==================== */
.tab-bar {
    height: 60px;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    flex-shrink: 0;
    padding-bottom: 6px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.04);
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #999;
    transition: all 0.2s;
    position: relative;
    cursor: pointer;
}

/* 可点击交互元素统一手型光标 */
.cat-tab,
.order-tab,
.mine-list-item,
.mine-order-item,
.section-more,
.nav-left,
.nav-icon {
    cursor: pointer;
}

.tab-item.active {
    color: #ff5500;
}

.tab-icon {
    font-size: 22px;
}

.tab-label {
    font-size: 11px;
    margin-top: 2px;
}

.tab-item.active .tab-icon {
    transform: scale(1.1);
}

.tab-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: linear-gradient(90deg, #ff5500, #ff8800);
    border-radius: 0 0 3px 3px;
}

/* ==================== 首页 - 店铺头部 ==================== */
.shop-header {
    background: #fff;
    margin-bottom: 8px;
}

.shop-banner {
    height: 80px;
    background: linear-gradient(135deg, #ff5500 0%, #ff8800 50%, #ffaa00 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
}

.shop-banner::before {
    content: '🎂';
    position: absolute;
    right: 20px;
    bottom: -10px;
    font-size: 80px;
    opacity: 0.3;
    transform: rotate(-15deg);
}

.shop-banner-tag {
    background: rgba(255,255,255,0.25);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.shop-banner-brand {
    background: linear-gradient(90deg, #ffeb3b, #ffc107);
    color: #d32f2f;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.shop-info {
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

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

.shop-name {
    font-size: 17px;
    font-weight: 700;
    color: #222;
    margin-bottom: 8px;
    line-height: 1.3;
}

.shop-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 12px;
}

.rating {
    color: #ff5500;
    font-weight: 600;
}

.review {
    color: #999;
}

.avg-price {
    color: #ff5500;
    font-weight: 500;
}

.shop-tag-mini {
    color: #999;
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
}

.shop-hot-tag {
    margin-top: 4px;
}

.hot-badge {
    display: inline-block;
    background: linear-gradient(90deg, #fff5e6, #ffe6cc);
    color: #ff5500;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid #ffd9b0;
}

.review-btn {
    background: #fff;
    border: 1px solid #ff5500;
    color: #ff5500;
    padding: 5px 14px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 500;
    flex-shrink: 0;
}

.shop-status {
    padding: 10px 16px;
    border-top: 1px solid #f5f5f5;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.status-text {
    color: #4caf50;
    font-weight: 600;
}

.status-time {
    color: #666;
    flex: 1;
}

.status-arrow {
    color: #ccc;
    font-size: 16px;
}

.shop-address {
    padding: 10px 16px 14px;
    border-top: 1px solid #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.address-text {
    flex: 1;
    min-width: 0;
}

.address-line {
    color: #333;
    font-size: 13px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.address-distance {
    color: #999;
    font-size: 11px;
}

.address-actions {
    display: flex;
    gap: 8px;
}

.addr-btn {
    background: #f5f5f5;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 11px;
    color: #666;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.addr-icon {
    font-size: 14px;
}

/* ==================== 限时团购标题 ==================== */
.section-header {
    background: #fff;
    padding: 14px 16px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1px;
}

.section-title {
    font-size: 17px;
    font-weight: 700;
    color: #222;
    position: relative;
    padding-left: 12px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    background: linear-gradient(180deg, #ff5500, #ff8800);
    border-radius: 2px;
}

.live-tag {
    color: #ff5500;
    font-size: 11px;
    background: #fff5e6;
    padding: 3px 8px;
    border-radius: 10px;
}

/* 「成为达人，赚1%佣金」绿色入口（对齐华莱士式团单页） */
.daren-banner {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f0fbf4;
    border: 1px solid #37b46a;
    color: #1e8a4c;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 14px;
    cursor: pointer;
    white-space: nowrap;
    max-width: 220px;
    overflow: hidden;
}

.daren-banner .daren-icon {
    font-size: 12px;
}

.daren-banner .daren-arrow {
    font-size: 14px;
    line-height: 1;
    margin-left: -2px;
}

.daren-banner:active {
    background: #dcf5e6;
}

/* ==================== 团购主体 ==================== */
.tuangou-container {
    background: #fff;
}

/* 分类栏：标题下方横排一行，可横向滚动 */
.category-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    padding: 2px 10px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.cat-tab {
    padding: 6px 14px;
    font-size: 13px;
    color: #555;
    text-align: center;
    position: relative;
    transition: background-color 0.2s, color 0.2s, transform 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
    border-radius: 999px;   /* 椭圆胶囊底色 */
    background: transparent;
}

.cat-tab:active {
    transform: scale(0.96);
}

/* 每个分类的激活底色（椭圆色块），随点击切换 */
.cat-tab[data-cat="recommend"].active { background: #fff1e6; color: #ff5500; }
.cat-tab[data-cat="best"].active       { background: #f5f5f5; color: #333; }
.cat-tab[data-cat="delivery"].active   { background: #e8f5ff; color: #1677ff; }
.cat-tab[data-cat="cake"].active       { background: #fff4e0; color: #c8770a; }

/* 兜底：后台新建的分类沿用默认橙（上方按 data-cat 的规则优先覆盖） */
.cat-tab.active {
    background: #fff1e6;
    color: #ff5500;
    font-weight: 600;
}


/* 空分类占位 */
.goods-empty {
    text-align: center;
    padding: 60px 0 70px;
}
.goods-empty-icon { font-size: 40px; margin-bottom: 12px; }
.goods-empty-text { font-size: 15px; color: #333; font-weight: 600; }
.goods-empty-sub { font-size: 12px; color: #999; margin-top: 6px; }

.goods-list {
    background: #fff;
    padding: 4px 12px 8px;
}

.goods-card {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    position: relative;
}

.goods-card:last-child {
    border-bottom: none;
}

.goods-card.best-price {
    background: linear-gradient(90deg, #fff9f0, #ffffff);
    margin: 0 -12px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #ffe6cc;
}

.goods-img {
    width: 112px;
    height: 112px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    background: #f0f0f0;
}

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

/* 商品图左上角橙黄「爆款价」角标 */
.best-tag {
    position: absolute;
    top: 4px;
    left: 4px;
    background: linear-gradient(90deg, #ff5500, #ff8800);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    z-index: 1;
}

/* 商品图左上角蓝色「限时抢购」角标 */
.hot-corner {
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(135deg, #3d8bff, #6c5cff);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px 2px 5px;
    border-radius: 7px 0 9px 0;
    line-height: 1.4;
    z-index: 1;
}

.goods-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.goods-name {
    font-size: 14px;
    color: #222;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
    font-weight: 600;
}

.goods-tags {
    display: flex;
    gap: 4px;
    flex-wrap: nowrap;
    overflow: hidden;
    margin-bottom: 6px;
    /* 超出的标签右缘淡出，避免文字被生硬切断 */
    -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent 98%);
    mask-image: linear-gradient(90deg, #000 82%, transparent 98%);
}

.goods-tag {
    font-size: 10px;
    color: #ff5500;
    background: #fff5e6;
    padding: 1px 5px;
    border-radius: 3px;
    border: 1px solid #ffe6cc;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.5;
}

.goods-tag.only-tag {
    color: #2196f3;
    background: #e3f2fd;
    border-color: #bbdefb;
}







/* 底部：左侧价格块(价格一行+新人立省一行) + 右侧按钮垂直居中 */
.goods-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    gap: 8px;
}


/* 红色「新人立省」价签（独立一行，不再挤占价格行） */
.newer-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(90deg, #ff2e4d, #ff5f2e);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 8px 2px 8px 2px;
    line-height: 1.4;
    white-space: nowrap;
    box-shadow: 0 1px 4px rgba(255, 46, 77, 0.3);
}

.goods-price {
    color: #ff5500;
    display: flex;
    align-items: baseline;
    gap: 2px;
    font-weight: 700;
    line-height: 1;
    min-width: 0;
}

.price-symbol {
    font-size: 11px;
}

.price-num {
    font-size: 19px;
    font-weight: 700;
}

.price-original {
    color: #999;
    font-size: 11px;
    text-decoration: line-through;
    margin-left: 4px;
    font-weight: normal;
    white-space: nowrap;
}

.buy-btn {
    background: linear-gradient(90deg, #ff5500, #ff8800);
    color: white;
    padding: 5px 13px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(255,85,0,0.3);
    transition: all 0.2s;
    flex-shrink: 0;
}

.buy-btn:active {
    transform: scale(0.95);
}

/* ==================== 订单页 ==================== */
.order-header {
    background: #fff;
    padding: 16px;
}

.order-title {
    font-size: 20px;
    font-weight: 700;
    color: #222;
}

.order-tabs {
    background: #fff;
    display: flex;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    z-index: 5;
}

.order-tab {
    flex: 1;
    padding: 12px 8px;
    text-align: center;
    font-size: 13px;
    color: #666;
    position: relative;
    transition: all 0.2s;
}

.order-tab.active {
    color: #ff5500;
    font-weight: 600;
}

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

.order-list {
    padding: 12px;
}

.order-card {
    background: #fff;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.order-card-top {
    padding: 12px 14px;
    border-bottom: 1px solid #f5f5f5;
}

.order-shop {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.shop-icon {
    font-size: 16px;
}

.shop-name-text {
    flex: 1;
    color: #333;
    font-weight: 600;
}

.order-status-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.order-status-badge.using {
    background: #fff3e0;
    color: #ff5500;
}

.order-status-badge.paying {
    background: #ffebee;
    color: #e91e63;
}

.order-status-badge.comment {
    background: #e8f5e9;
    color: #4caf50;
}

.order-status-badge.refund {
    background: #f3e5f5;
    color: #9c27b0;
}

.order-card-body {
    padding: 12px 14px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.order-goods-img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f0f0f0;
}

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

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

.order-goods-name {
    font-size: 13px;
    color: #222;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.order-goods-spec {
    color: #999;
    font-size: 11px;
    margin-bottom: 4px;
}

.order-goods-time {
    color: #bbb;
    font-size: 11px;
}

.order-goods-price {
    color: #ff5500;
    font-weight: 700;
    flex-shrink: 0;
}

.order-card-bottom {
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f5f5f5;
}

.order-total {
    color: #666;
    font-size: 12px;
}

.total-price {
    color: #ff5500;
    font-weight: 700;
    font-size: 14px;
}

.order-actions {
    display: flex;
    gap: 8px;
}

.order-btn {
    padding: 5px 12px;
    border-radius: 14px;
    font-size: 12px;
    border: 1px solid #ddd;
    background: #fff;
    color: #666;
}

.order-btn.primary {
    background: linear-gradient(90deg, #ff5500, #ff8800);
    color: white;
    border: none;
}

.empty-state {
    padding: 60px 20px;
    text-align: center;
    color: #ccc;
}

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

.empty-text {
    color: #999;
    font-size: 13px;
}

/* ==================== 我的页面 ==================== */
.user-header {
    background: #fff;
    position: relative;
    padding-bottom: 16px;
    overflow: hidden;
}

.user-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 140px;
    background: linear-gradient(135deg, #ff5500 0%, #ff8800 50%, #ffaa00 100%);
}

.user-bg::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.user-bg::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 120px;
    height: 120px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}

.user-info {
    position: relative;
    z-index: 2;
    padding: 20px 16px 0;
    display: flex;
    align-items: center;
    gap: 14px;
    color: white;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.4);
    overflow: hidden;
    flex-shrink: 0;
    background: #fff;
}

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

.user-detail {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 4px;
}

.user-id {
    font-size: 12px;
    opacity: 0.85;
}

.user-edit {
    background: rgba(255,255,255,0.25);
    color: white;
    padding: 6px 14px;
    border-radius: 14px;
    font-size: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
}

.user-stats {
    position: relative;
    z-index: 2;
    background: rgba(255,255,255,0.95);
    margin: 20px 16px 0;
    border-radius: 12px;
    padding: 14px 0;
    display: flex;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.stat-item {
    flex: 1;
    text-align: center;
    position: relative;
}

.stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 24px;
    background: #eee;
}

.stat-num {
    font-size: 18px;
    font-weight: 700;
    color: #222;
    margin-bottom: 2px;
}

.stat-label {
    font-size: 11px;
    color: #999;
}

/* ==================== 我的 - 通用部分 ==================== */
.mine-section {
    background: #fff;
    margin: 10px 0;
    padding: 14px 16px;
}

.section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.section-title-text {
    font-size: 15px;
    font-weight: 700;
    color: #222;
}

.section-more {
    font-size: 12px;
    color: #999;
}

.mine-order-grid {
    display: flex;
    justify-content: space-around;
}

.mine-order-item {
    text-align: center;
    position: relative;
    flex: 1;
}

.mine-order-icon {
    font-size: 26px;
    margin-bottom: 4px;
}

.mine-order-label {
    color: #666;
    font-size: 12px;
}

.mine-order-badge {
    position: absolute;
    top: -2px;
    right: calc(50% - 22px);
    background: #ff5500;
    color: white;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 8px;
    min-width: 16px;
    text-align: center;
    font-weight: 600;
}

/* ==================== 分销卡片 ==================== */
.distribute-card {
    background: linear-gradient(90deg, #fff5e6, #ffe6cc);
    border: 1px solid #ffd9b0;
    border-radius: 12px;
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.distribute-title {
    font-size: 14px;
    font-weight: 700;
    color: #d84315;
    margin-bottom: 4px;
}

.distribute-desc {
    font-size: 11px;
    color: #ff5500;
}

.distribute-btn {
    background: linear-gradient(90deg, #ff5500, #ff8800);
    color: white;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(255,85,0,0.3);
}

/* ==================== 列表项 ==================== */
.mine-list {
    /* 默认在 mine-section 内 */
}

.mine-list-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
    position: relative;
}

.mine-list-item:last-child {
    border-bottom: none;
}

.list-icon {
    font-size: 18px;
    margin-right: 12px;
    width: 24px;
    text-align: center;
}

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

.list-num {
    color: #999;
    font-size: 12px;
    margin-right: 4px;
}

.list-badge {
    background: linear-gradient(90deg, #ff5500, #ff8800);
    color: white;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 6px;
    margin-right: 4px;
    font-weight: 600;
}

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

/* ==================== 底部留白 ==================== */
.bottom-spacer {
    height: 30px;
    background: #f5f5f5;
}
/* ==================== 二级浮层页（详情/确认订单） ==================== */
.layer-page {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f5f5f5;
    z-index: 100;
    flex-direction: column;
    animation: layerIn 0.25s ease;
}

.layer-page.show {
    display: flex;
}

@keyframes layerIn {
    from { transform: translateX(30%); opacity: 0.4; }
    to { transform: translateX(0); opacity: 1; }
}

.layer-topbar {
    height: 44px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    flex-shrink: 0;
    border-bottom: 1px solid #f0f0f0;
}

.layer-back {
    font-size: 26px;
    color: #333;
    width: 36px;
    line-height: 36px;
    cursor: pointer;
    font-weight: 300;
}

.layer-title {
    font-size: 16px;
    font-weight: 600;
    color: #222;
}

.layer-actions {
    width: 36px;
    text-align: right;
}

.layer-scroll {
    flex: 1;
    min-height: 0; /* 允许 flex 子项收缩，防止内容把底部栏挤出视口 */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.layer-scroll-spacer {
    height: 20px;
}

/* ---- 详情页 ---- */
.detail-hero {
    height: 260px;
    background: linear-gradient(135deg, #f6d365, #fda085);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.detail-hero::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -40px;
    width: 160px;
    height: 160px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
}

.detail-hero-emoji {
    font-size: 110px;
    filter: drop-shadow(0 8px 20px rgba(0,0,0,0.18));
}

.detail-card {
    background: #fff;
    margin: 10px 0 0;
    padding: 14px 16px;
}

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

.detail-sales {
    color: #999;
    font-size: 11px;
}

.detail-name {
    font-size: 17px;
    font-weight: 700;
    color: #222;
    line-height: 1.4;
    margin: 8px 0;
}

.detail-shop-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #f5f5f5;
    margin-top: 8px;
    font-size: 12px;
}

.detail-shop {
    color: #333;
    font-weight: 500;
}

.detail-rate {
    color: #ff5500;
}

.detail-sec-title {
    font-size: 14px;
    font-weight: 700;
    color: #222;
    margin: 12px 0 10px;
}

.detail-sec-title:first-child {
    margin-top: 0;
}

/* ---- 规格选择 ---- */
.sku-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}

.sku-item {
    padding: 7px 14px;
    border-radius: 16px;
    border: 1px solid #ddd;
    background: #fafafa;
    font-size: 12px;
    color: #555;
    cursor: pointer;
    transition: all 0.15s;
}

.sku-item.active {
    background: #fff5e6;
    border-color: #ff5500;
    color: #ff5500;
    font-weight: 600;
}

/* ---- 数量步进器 ---- */
.stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
}

.stepper-sm .step-btn {
    width: 26px;
    height: 26px;
    font-size: 14px;
}

.step-btn {
    width: 32px;
    height: 30px;
    background: #fafafa;
    border: none;
    font-size: 16px;
    color: #333;
    cursor: pointer;
}

.step-btn:active {
    background: #f0f0f0;
}

.step-num {
    min-width: 36px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    padding: 0 4px;
}

.detail-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.8;
}

.detail-notes {
    list-style: none;
    font-size: 12px;
    color: #999;
    line-height: 1.9;
}

.detail-notes li::before {
    content: '· ';
    color: #ff5500;
    font-weight: 700;
}

/* ---- 底部操作栏 ---- */
.layer-footer {
    height: 56px;
    background: #fff;
    border-top: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    padding: 0 14px;
    gap: 12px;
    flex-shrink: 0;
    padding-bottom: 6px;
}

.footer-fav {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #666;
    font-size: 10px;
    cursor: pointer;
    gap: 1px;
}

.footer-fav .fav-icon {
    font-size: 20px;
    line-height: 1;
}

.footer-fav.faved .fav-icon {
    color: #ff5500;
}

.footer-fav.faved .fav-text {
    color: #ff5500;
}

.footer-buy {
    flex: 1;
    background: linear-gradient(90deg, #ff5500, #ff8800);
    color: white;
    height: 40px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255,85,0,0.35);
    cursor: pointer;
}

.footer-buy:active {
    transform: scale(0.98);
}

/* ---- 确认订单页 ---- */
.checkout-shop-card {
    background: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkout-shop-name {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: #222;
}

.checkout-arrow {
    color: #ccc;
    font-size: 16px;
}

.checkout-goods-card {
    background: #fff;
    margin-top: 10px;
    padding: 14px 16px;
    display: flex;
    gap: 12px;
}

.checkout-goods-img {
    width: 76px;
    height: 76px;
    border-radius: 8px;
    flex-shrink: 0;
    background: linear-gradient(135deg,#f6d365,#fda085);
}

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

.checkout-goods-name {
    font-size: 13px;
    color: #222;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
    font-weight: 600;
}

.checkout-goods-spec {
    color: #999;
    font-size: 11px;
    margin-bottom: 4px;
}

.checkout-goods-price {
    margin-top: auto;
}

.checkout-rows {
    background: #fff;
    margin-top: 10px;
    padding: 4px 16px;
}

.checkout-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 13px;
    color: #333;
    border-bottom: 1px solid #f7f7f7;
}

.checkout-row:last-child {
    border-bottom: none;
}

.checkout-row.total {
    font-weight: 600;
}

.coupon-link {
    color: #ff5500;
    font-size: 12px;
    cursor: pointer;
}

.checkout-total-bar {
    flex: 1;
    font-size: 13px;
    color: #333;
}

.checkout-total-bar b {
    color: #ff5500;
    font-size: 18px;
    margin-left: 2px;
}

.footer-submit {
    background: linear-gradient(90deg, #ff5500, #ff8800);
    color: white;
    height: 40px;
    padding: 0 28px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255,85,0,0.35);
    cursor: pointer;
    flex-shrink: 0;
}

.footer-submit:disabled {
    opacity: 0.6;
}

/* 商品卡可点击打开详情 */
.goods-card {
    cursor: pointer;
}

/* ==================== 通用弹窗（券码/地图） ==================== */
.modal-mask {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 300;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: maskIn 0.2s ease;
}

.modal-mask.show {
    display: flex;
}

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

.modal-card {
    position: relative;
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-height: 90%;
    overflow-y: auto;
    animation: cardIn 0.25s ease;
    -webkit-overflow-scrolling: touch;
}

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

.modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 22px;
    color: #999;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    cursor: pointer;
    z-index: 2;
}

/* ---- 券码弹窗 ---- */
.voucher-card {
    padding: 18px 16px 14px;
}

.voucher-head {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding-right: 26px;
}

.voucher-shop-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg,#f6d365,#fda085);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.voucher-shop-name {
    font-size: 15px;
    font-weight: 700;
    color: #222;
}

.voucher-goods {
    font-size: 12px;
    color: #666;
    margin-top: 3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.qr-wrap {
    background: linear-gradient(180deg, #fff7ef, #fff);
    border: 1px solid #ffe6cc;
    border-radius: 12px;
    padding: 16px 0 10px;
    margin: 14px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.qr-box {
    width: 168px;
    height: 168px;
    background: #fff;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.qr-box .qr-grid {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(21, 1fr);
    grid-template-rows: repeat(21, 1fr);
}

.qr-box .qr-cell {
    background: #1a1a1a;
}

.qr-tip {
    font-size: 11px;
    color: #999;
}

.voucher-code-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
}

.voucher-code {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #222;
    font-family: 'SF Mono', Menlo, monospace;
}

.voucher-copy {
    font-size: 11px;
    color: #ff5500;
    border: 1px solid #ffb08c;
    border-radius: 12px;
    padding: 2px 10px;
    cursor: pointer;
}

.voucher-copy:active {
    background: #fff5e6;
}

.voucher-meta {
    background: #fafafa;
    border-radius: 10px;
    padding: 4px 12px;
    margin-bottom: 10px;
}

.voucher-meta-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 12px;
    color: #666;
    border-bottom: 1px solid #f0f0f0;
}

.voucher-meta-row:last-child {
    border-bottom: none;
}

.voucher-meta-row b {
    color: #333;
    font-weight: 600;
}

.voucher-note {
    font-size: 10px;
    color: #bbb;
    line-height: 1.6;
    text-align: center;
}

/* ---- 地图弹窗 ---- */
.map-card {
    padding: 12px 14px 14px;
}

.map-canvas {
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 6px;
}

.map-addr-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 2px;
}

.map-addr-name {
    font-size: 15px;
    font-weight: 700;
    color: #222;
}

.map-addr-detail {
    font-size: 12px;
    color: #888;
    margin-top: 3px;
}

.map-actions {
    display: flex;
    gap: 10px;
}

.map-go {
    flex: 1;
    display: block;
    text-align: center;
    background: linear-gradient(90deg, #ff5500, #ff8800);
    color: #fff;
    height: 40px;
    line-height: 40px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(255,85,0,0.35);
}

.map-go:active {
    transform: scale(0.98);
}

/* ---- 图文详情图片 ---- */
.detail-imgs {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-img {
    width: 100%;
    height: 130px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
}

/* 后台上传的图文详情图（img 形式）：宽度撑满、高度随原始比例，不裁剪不变形 */
img.detail-img {
    height: auto;
    object-fit: contain;
    display: block;
    font-size: 0;
    background: #f7f7f7;
}

.detail-img-note {
    font-size: 10px;
    color: #c5c5c5;
    text-align: center;
    padding-top: 2px;
}

/* ---- 地图选择面板 ---- */
.map-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.map-opt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 4px 10px;
    border: 1px solid #eee;
    border-radius: 12px;
    background: #fafafa;
    text-decoration: none;
    transition: all 0.15s;
    cursor: pointer;
}

.map-opt:active {
    background: #fff5e6;
    border-color: #ffcf9e;
    transform: scale(0.96);
}

.map-opt-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.map-opt-name {
    font-size: 12px;
    color: #333;
    font-weight: 500;
}

.map-opt[data-app="apple"] {
    display: none; /* 非 Apple 设备隐藏，由 JS 判断 */
}

.map-opt[data-app="apple"].is-apple {
    display: flex;
}

.map-grid-note {
    text-align: center;
    font-size: 10px;
    color: #bbb;
    padding-top: 10px;
}

/* 显示苹果地图时切换为 2×2 布局，避免文字折行 */
.map-grid.has-apple {
    grid-template-columns: repeat(2, 1fr);
}

.map-grid.has-apple .map-opt {
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    padding: 12px 14px;
}

/* 地图弹窗操作区纵向排列（网格在上、提示在下） */
.map-actions {
    flex-direction: column;
}

/* ==================== 顶部幻灯片广告位（轮播） ==================== */
.banner-swiper {
    position: relative;
    height: 150px; /* 对齐快手750设计稿体系 750x300 通行规范 */
    overflow: hidden;
}

.banner-track {
    display: flex;
    height: 100%;
    transition: transform 0.45s cubic-bezier(0.33, 0.9, 0.4, 1);
    will-change: transform;
}

.banner-slide {
    flex: 0 0 100%;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 20px;
    position: relative;
    overflow: hidden;
}

.banner-slide.s1 {
    background: linear-gradient(120deg, #ff5500 0%, #ff8800 55%, #ffaa33 100%);
}

.banner-slide.s2 {
    background: linear-gradient(120deg, #ff6f91 0%, #ff9a76 60%, #ffc3a0 100%);
}

.banner-slide.s3 {
    background: linear-gradient(120deg, #7b5cff 0%, #9d7bff 55%, #c9a7ff 100%);
}

/* 装饰圆 */
.banner-slide::before {
    content: '';
    position: absolute;
    right: -30px;
    top: -40px;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
}

.banner-slide::after {
    content: '';
    position: absolute;
    right: 60px;
    bottom: -50px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.slide-art {
    font-size: 68px;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.2));
    transform: rotate(-8deg);
    z-index: 1;
}

.slide-copy {
    z-index: 1;
    min-width: 0;
}

.slide-line1 {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.slide-line1 span {
    font-size: 11px;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.slide-tag-live { background: rgba(0, 0, 0, 0.28); }
.slide-tag-brand { background: rgba(255, 255, 255, 0.24); }
.slide-tag-new { background: rgba(0, 0, 0, 0.28); }
.slide-tag-coupon { background: #ffd54d; color: #7a4b00 !important; }

.slide-line2 {
    color: #fff;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 圆点指示器 */
.banner-dots {
    position: absolute;
    left: 14px;
    bottom: 12px;
    display: flex;
    gap: 5px;
    z-index: 2;
}

.banner-dot {
    width: 6px;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.3s;
    cursor: pointer;
}

.banner-dot.active {
    width: 16px;
    background: #fff;
}

/* 广告位行动按钮 */
.slide-cta {
    position: absolute;
    right: 14px;
    bottom: 12px;
    z-index: 1;
    background: rgba(255, 255, 255, 0.95);
    color: #ff5500;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ==================== 达人中心（分销计划） ==================== */
.daren-topbar {
    background: linear-gradient(90deg, #06c167, #0aa856);
}

.daren-topbar .layer-title,
.daren-topbar .layer-back,
.daren-topbar .layer-actions {
    color: #fff;
}

/* 头部身份卡 */
.daren-hero {
    margin: 10px 12px;
    padding: 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, #06c167, #0b9e58);
    color: #fff;
    box-shadow: 0 4px 12px rgba(6, 193, 103, 0.25);
}

.daren-hero-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.daren-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

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

.daren-hero-name {
    font-size: 15px;
    font-weight: 700;
}

.daren-hero-sub {
    font-size: 11px;
    opacity: 0.9;
    margin-top: 2px;
}

.daren-join-btn {
    background: #fff;
    color: #06c167;
    border: none;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 14px;
    flex-shrink: 0;
}

.daren-join-btn.joined {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.daren-stats {
    display: flex;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.daren-stat {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.daren-stat b {
    font-size: 16px;
    font-weight: 700;
}

.daren-stat span {
    font-size: 10px;
    opacity: 0.85;
}

/* 通用卡片 */
.daren-steps-card,
.daren-goods-card,
.daren-record-card {
    margin: 0 12px 10px;
    padding: 12px;
    background: #fff;
    border-radius: 12px;
}

.daren-card-title {
    font-size: 14px;
    font-weight: 700;
    color: #222;
    margin-bottom: 10px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.daren-card-sub {
    font-size: 10px;
    color: #999;
    font-weight: normal;
}

/* 三步流程 */
.daren-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 6px;
}

.daren-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #333;
    position: relative;
}

.daren-step .step-no {
    position: absolute;
    top: -6px;
    left: -10px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #06c167;
    color: #fff;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.daren-step .step-icon {
    font-size: 22px;
}

.step-arrow {
    color: #ccc;
    font-size: 14px;
}

.daren-rule {
    margin-top: 10px;
    font-size: 10px;
    color: #999;
    line-height: 1.5;
}

/* 推广商品列表 */
.daren-goods-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.daren-goods-item:last-child {
    border-bottom: none;
}

.daren-goods-img {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    flex-shrink: 0;
}

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

.daren-goods-name {
    font-size: 12px;
    color: #222;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.daren-goods-price {
    color: #ff5500;
    font-size: 14px;
    font-weight: 700;
    margin-top: 3px;
}

.daren-goods-price .price-symbol {
    font-size: 10px;
}

.daren-goods-cmt {
    font-size: 10px;
    color: #06a050;
    margin-top: 2px;
}

.daren-share-btn {
    background: linear-gradient(90deg, #06c167, #0aa856);
    color: #fff;
    border: none;
    font-size: 11px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 14px;
    flex-shrink: 0;
}

/* 收益明细 */
.daren-record-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.daren-record-item:last-child {
    border-bottom: none;
}

.daren-record-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.daren-record-goods {
    font-size: 12px;
    color: #333;
    font-weight: 600;
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.daren-record-time {
    font-size: 10px;
    color: #999;
}

.daren-record-amount {
    color: #06c167;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.daren-empty {
    text-align: center;
    color: #bbb;
    font-size: 12px;
    padding: 16px 0;
}

/* ==================== 佣金结算规则卡 ==================== */
.daren-rules-card {
    margin: 0 12px 10px;
    padding: 12px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e8f7ef;
}

.rules-flag {
    color: #06a050;
    font-size: 14px;
    font-weight: 700;
}

.rule-item {
    display: flex;
    gap: 8px;
    padding: 5px 0;
}

.rule-item .rule-dot {
    color: #06c167;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    line-height: 1.6;
}

.rule-item div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.rule-item b {
    font-size: 12px;
    color: #222;
}

.rule-item span {
    font-size: 11px;
    color: #777;
    line-height: 1.5;
}

.daren-rule-src {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #eee;
    font-size: 10px;
    color: #aaa;
}

/* 入驻状态：审核中 */
.daren-join-btn.reviewing {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    cursor: default;
}

/* ==================== 达人入驻申请页 ==================== */
.apply-hero-tip {
    margin: 10px 12px;
    padding: 12px;
    background: linear-gradient(135deg, #f0fbf5, #e6f7ee);
    border-radius: 12px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.apply-tip-icon {
    font-size: 20px;
}

.apply-hero-tip div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.apply-hero-tip b {
    font-size: 13px;
    color: #067a41;
}

.apply-hero-tip span {
    font-size: 11px;
    color: #4a8f68;
    line-height: 1.5;
}

.apply-card {
    margin: 0 12px 10px;
    padding: 12px 12px 4px;
    background: #fff;
    border-radius: 12px;
}

.apply-card-title {
    font-size: 13px;
    font-weight: 700;
    color: #222;
    margin-bottom: 6px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.apply-card-sub {
    font-size: 10px;
    color: #999;
    font-weight: normal;
}

.form-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid #f6f6f6;
}

.form-row:last-child {
    border-bottom: none;
}

.form-label {
    font-size: 12px;
    color: #555;
    width: 86px;
    flex-shrink: 0;
}

.form-label i {
    color: #ff5500;
    font-style: normal;
    margin-right: 2px;
}

.form-row input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    font-size: 13px;
    color: #222;
    background: #f7f7f7;
    border-radius: 6px;
    padding: 7px 10px;
}

.form-row input::placeholder {
    color: #bbb;
    font-size: 11px;
}

/* 结算方式按钮组 */
.pay-type {
    flex: 1;
    display: flex;
    gap: 8px;
}

.pay-opt {
    flex: 1;
    text-align: center;
    padding: 7px 0;
    border-radius: 8px;
    border: 1px solid #eee;
    font-size: 12px;
    color: #666;
    cursor: pointer;
}

.pay-opt.active {
    border-color: #06c167;
    background: #f0fbf5;
    color: #06a050;
    font-weight: 600;
}

/* 类目 chips */
.chip-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 8px;
}

.apply-chip {
    font-size: 12px;
    color: #666;
    background: #f5f5f5;
    padding: 6px 12px;
    border-radius: 16px;
    cursor: pointer;
    border: 1px solid transparent;
}

.apply-chip.active {
    background: #f0fbf5;
    border-color: #06c167;
    color: #06a050;
}

.apply-rules-note {
    margin: 0 12px 10px;
    padding: 10px 12px;
    background: #fffdf5;
    border: 1px dashed #ffd591;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.apply-rules-note b {
    font-size: 11px;
    color: #e68a00;
}

.apply-rules-note span {
    font-size: 10px;
    color: #b07d2a;
    line-height: 1.5;
}

.apply-agree {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 14px 8px;
    font-size: 11px;
    color: #888;
}

.apply-agree .agree-box {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: transparent;
    flex-shrink: 0;
}

.apply-agree.checked .agree-box {
    background: #06c167;
    border-color: #06c167;
    color: #fff;
}

.apply-agree a {
    color: #06a050;
}

/* 申请页底部留白加大：确保协议行可完整滚动到固定提交按钮上方，不被遮挡 */
#page-darenApply .layer-scroll-spacer {
    height: 90px;
}

/* ==================== 优惠券底部弹层 ==================== */
.modal-bottom {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 14px 14px calc(14px + env(safe-area-inset-bottom));
    max-height: 70%;
    display: flex;
    flex-direction: column;
}

.coupon-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.coupon-title {
    font-size: 15px;
    font-weight: 700;
    color: #222;
}

.coupon-close {
    position: static;
    width: 24px;
    height: 24px;
    line-height: 22px;
    background: #f2f2f2;
    border-radius: 50%;
    text-align: center;
    font-size: 14px;
    color: #999;
}

.coupon-list {
    overflow-y: auto;
    min-height: 120px;
}

.coupon-item {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #fff7ec, #fff3e0);
    border: 1px solid #ffe0b2;
    border-radius: 10px;
    margin-bottom: 8px;
    padding: 10px 12px;
    gap: 10px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.coupon-item.selected {
    border-color: #ff5500;
    box-shadow: 0 0 0 1px #ff5500;
}

.coupon-item.disabled {
    opacity: 0.45;
}

.coupon-item .coupon-left {
    width: 64px;
    text-align: center;
    flex-shrink: 0;
    color: #ff5500;
}

.coupon-item .coupon-left b {
    font-size: 20px;
}

.coupon-item .coupon-left b small {
    font-size: 12px;
    font-weight: 700;
}

.coupon-item .coupon-left div {
    font-size: 10px;
    color: #ff8a3d;
}

.coupon-mid {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.coupon-mid .coupon-name {
    font-size: 13px;
    font-weight: 700;
    color: #222;
}

.coupon-mid .coupon-desc {
    font-size: 10px;
    color: #999;
}

.coupon-action {
    flex-shrink: 0;
    font-size: 12px;
    padding: 5px 14px;
    border-radius: 13px;
}

.coupon-action.use {
    background: linear-gradient(90deg, #ff5500, #ff8800);
    color: #fff;
    font-weight: 600;
}

.coupon-action.used {
    background: #f2f2f2;
    color: #888;
}

.coupon-action.claim {
    background: linear-gradient(90deg, #06c167, #0aa856);
    color: #fff;
    font-weight: 600;
}

.coupon-confirm {
    margin-top: 10px;
    padding: 11px 0;
    border-radius: 22px;
    background: linear-gradient(90deg, #ff5500, #ff8800);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.coupon-confirm.plain {
    background: #f5f5f5;
    color: #666;
    font-weight: 500;
}

/* ==================== 开发者 · 数据源卡片（真实接口接缝） ==================== */
.dev-source-card {
    background: #fff;
    border: 1px dashed #ffb28a;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
}
.dev-source-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.dev-source-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}
.dev-source-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 999px;
    letter-spacing: 1px;
}
.dev-source-badge.mock {
    background: #f0f0f0;
    color: #888;
}
.dev-source-badge.live {
    background: linear-gradient(90deg, #ff5500, #ff8800);
    color: #fff;
}
.dev-source-desc {
    font-size: 11px;
    color: #999;
    line-height: 1.6;
    margin-top: 6px;
}
.dev-source-status {
    background: #f8f9fb;
    border-radius: 8px;
    padding: 8px 10px;
    margin-top: 8px;
}
.dev-source-status .ds-row {
    font-size: 11px;
    color: #555;
    line-height: 1.9;
    word-break: break-all;
}
.dev-source-status .ds-ok { color: #0aa868; font-weight: 600; }
.dev-source-status .ds-warn { color: #e6a23c; font-weight: 600; }
.dev-source-status .ds-bad { color: #e5484d; font-weight: 600; }
.dev-source-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}
.dev-source-btn {
    flex: 1;
    height: 32px;
    border: 1px solid #ff5500;
    background: #fff;
    color: #ff5500;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.dev-source-btn.primary {
    background: linear-gradient(90deg, #ff5500, #ff8800);
    color: #fff;
    border: none;
}
.dev-source-btn:disabled {
    opacity: .5;
}
