/**
 * 拼团插件 - 统一样式
 *
 * 设计语言：白色极简（参考 Apple Human Interface）
 * 命名规范：所有 class 以 .gb- 开头，避免与宿主模板冲突
 * 仅在拼团页面引入即可，不影响其他页面
 */

/* =========================================
   1. 设计令牌（Design Tokens）
========================================= */
.gb-scope {
    /* —— 品牌色：与后台 Hero 蓝紫体系对齐 —— */
    --gb-primary: #2b59ff;
    --gb-primary-hover: #1f47e0;
    --gb-primary-soft: #eef2ff;
    --gb-primary-ring: rgba(43, 89, 255, 0.18);

    --gb-accent: #6f5dff;
    --gb-gradient: linear-gradient(135deg, #2b59ff 0%, #6f5dff 100%);

    /* —— 语义色 —— */
    --gb-success: #16a34a;
    --gb-success-soft: #e8f9ed;
    --gb-warning: #f59e0b;
    --gb-warning-soft: #fff8e6;
    --gb-danger: #ef4444;
    --gb-danger-soft: #ffebe9;

    /* —— 中性色阶（冷灰，与蓝主色协调）—— */
    --gb-bg: #f7f8fc;
    --gb-surface: #ffffff;
    --gb-gray-50: #f5f7fb;
    --gb-gray-100: #eef1f6;
    --gb-gray-200: #e2e6ee;
    --gb-gray-300: #c9d0dc;
    --gb-gray-400: #8b93a7;
    --gb-gray-500: #5b6478;
    --gb-gray-700: #2f3645;
    --gb-gray-900: #0f1424;

    /* —— 圆角 —— */
    --gb-radius-sm: 8px;
    --gb-radius-md: 12px;
    --gb-radius-lg: 16px;
    --gb-radius-xl: 20px;

    /* —— 阴影（带蓝色调，更通透）—— */
    --gb-shadow-sm: 0 1px 2px rgba(20, 32, 70, 0.04);
    --gb-shadow-md: 0 6px 18px rgba(20, 32, 70, 0.08);
    --gb-shadow-lg: 0 18px 40px rgba(20, 32, 70, 0.10);
    --gb-shadow-primary: 0 8px 22px rgba(43, 89, 255, 0.22);

    --gb-font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text',
                    'Helvetica Neue', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* =========================================
   2. 容器与布局
========================================= */
.gb-scope {
    font-family: var(--gb-font-sans);
    color: var(--gb-gray-900);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.gb-scope * { box-sizing: border-box; }

.gb-page {
    background: #fff;
    min-height: 60vh;
}
/* 当外层是 .gb-list-hero（带背景图/渐变）时，gb-page 必须透明，否则会盖住背景 */
.gb-scope.gb-list-hero .gb-page { background: transparent; }

.gb-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
}

.gb-container--narrow { max-width: 600px; }
.gb-container--wide { max-width: 1200px; }
.gb-container--full { max-width: 100%; }

.gb-section { padding: 48px 0; }
.gb-section--compact { padding: 24px 0; }

/* 详情子页（带返回按钮的 .gb-subheader）：顶部留白收紧，避免与外层主题导航之间出现大面积空白 */
.gb-scope.gb-detail-page .gb-section { padding-top: 20px; }

/* =========================================
   3. 顶部页头
========================================= */
.gb-header {
    text-align: center;
    margin-bottom: 48px;
}
.gb-header__title {
    font-size: 36px;
    font-weight: 700;
    color: var(--gb-gray-900);
    margin: 0 0 12px;
    letter-spacing: -0.5px;
}
.gb-header__subtitle {
    font-size: 16px;
    color: var(--gb-gray-500);
    margin: 0;
}

/* 用于子页（带返回按钮的窄头） */
.gb-subheader {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--gb-gray-200);
    margin-bottom: 32px;
}
.gb-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gb-gray-100);
    color: var(--gb-gray-900);
    text-decoration: none;
    transition: background 0.2s;
}
.gb-back-btn:hover { background: var(--gb-gray-200); }
.gb-subheader__title {
    font-size: 17px;
    font-weight: 600;
}

/* =========================================
   4. 统计卡片（顶部计数等）
========================================= */
.gb-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    padding: 28px 32px;
    background: var(--gb-gray-50);
    border-radius: var(--gb-radius-xl);
    margin-bottom: 48px;
}
.gb-stat__value {
    font-size: 32px;
    font-weight: 700;
    color: var(--gb-gray-900);
    text-align: center;
}
.gb-stat__label {
    font-size: 14px;
    color: var(--gb-gray-500);
    margin-top: 4px;
    text-align: center;
}

/* =========================================
   5. 活动卡片（列表）
========================================= */
.gb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.gb-card {
    display: block;
    background: #fff;
    border: 1px solid var(--gb-gray-200);
    border-radius: var(--gb-radius-xl);
    padding: 28px;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
    position: relative;
}
.gb-card:hover {
    border-color: var(--gb-gray-300);
    box-shadow: var(--gb-shadow-lg);
    transform: translateY(-4px);
}
.gb-card:active { transform: translateY(0); }

.gb-card__title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gb-gray-900);
    margin: 0 0 12px;
    line-height: 1.4;
}
.gb-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    font-size: 13px;
    color: var(--gb-gray-500);
    margin-bottom: 18px;
}
.gb-card__meta span:not(.dot)::after {
    content: '·';
    margin-left: 10px;
    color: var(--gb-gray-300);
}
.gb-card__meta span:last-child::after { content: ''; margin: 0; }

/* =========================================
   6. 价格块
========================================= */
.gb-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}
.gb-price__current {
    font-size: 32px;
    font-weight: 700;
    color: var(--gb-gray-900);
    letter-spacing: -1px;
    line-height: 1;
}
.gb-price__current--xl { font-size: 48px; letter-spacing: -2px; }
.gb-price__original {
    font-size: 16px;
    color: var(--gb-gray-400);
    text-decoration: line-through;
}
.gb-price__saved {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: #fff;
    border: 1px solid var(--gb-success);
    color: var(--gb-success);
    font-size: 12px;
    font-weight: 600;
    border-radius: 999px;
}

.gb-price-card {
    background: var(--gb-gray-50);
    border-radius: var(--gb-radius-xl);
    padding: 28px;
    margin-bottom: 16px;
}
.gb-price-card__label {
    font-size: 13px;
    color: var(--gb-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

/* =========================================
   7. 规格 / 信息条
========================================= */
.gb-specs {
    display: flex;
    gap: 24px;
    padding: 20px 0;
    border-top: 1px solid var(--gb-gray-200);
}
.gb-spec {
    flex: 1;
    text-align: center;
}
.gb-spec__value {
    font-size: 22px;
    font-weight: 700;
    color: var(--gb-gray-900);
    line-height: 1;
}
.gb-spec__label {
    font-size: 13px;
    color: var(--gb-gray-500);
    margin-top: 6px;
}

/* =========================================
   8. 状态徽章
========================================= */
.gb-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--gb-radius-md);
    font-size: 14px;
    font-weight: 500;
}
.gb-status--active  { background: #fff8e6; color: #b25000; }
.gb-status--success { background: #e8f9ed; color: #1a7f37; }
.gb-status--failed  { background: #ffebe9; color: #cf222e; }

.gb-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.gb-badge--success { background: #e8f9ed; color: #1a7f37; }
.gb-badge--warning { background: #fff8e6; color: #b25000; }
.gb-badge--danger  { background: #ffebe9; color: #cf222e; }
.gb-badge--gray    { background: var(--gb-gray-100); color: var(--gb-gray-500); }

/* =========================================
   9. 进度条
========================================= */
.gb-progress {
    margin-bottom: 24px;
}
.gb-progress__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.gb-progress__title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gb-gray-900);
}
.gb-progress__count {
    font-size: 14px;
    color: var(--gb-gray-500);
}
.gb-progress__count strong {
    color: var(--gb-gray-900);
    font-weight: 600;
}
.gb-progress__bar {
    height: 8px;
    background: var(--gb-gray-200);
    border-radius: 999px;
    overflow: hidden;
}
.gb-progress__fill {
    height: 100%;
    background: var(--gb-primary);
    border-radius: 999px;
    transition: width 0.6s ease;
}

/* =========================================
   10. 成员头像网格
========================================= */
.gb-members {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 16px;
    margin-top: 20px;
}
.gb-member {
    text-align: center;
}
.gb-member__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    transition: transform 0.2s;
    overflow: hidden;
}
.gb-member__avatar:hover { transform: scale(1.05); }
.gb-member__avatar--leader { background: var(--gb-primary); color: #fff; }
.gb-member__avatar--normal { background: var(--gb-gray-200); color: var(--gb-gray-900); }
.gb-member__avatar--empty {
    background: #fff;
    border: 2px dashed var(--gb-gray-300);
    color: var(--gb-gray-400);
}
.gb-member__avatar img { width: 100%; height: 100%; object-fit: cover; }
.gb-member__name {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gb-member__role {
    font-size: 11px;
    color: var(--gb-gray-500);
}

/* =========================================
   11. 团组列表项（详情页"正在拼团"区）
========================================= */
.gb-group-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    background: var(--gb-gray-50);
    border-radius: var(--gb-radius-lg);
    margin-bottom: 12px;
}
.gb-group-item__leader {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}
.gb-avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gb-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}
.gb-group-item__info {
    flex: 1;
    min-width: 0;
}
.gb-group-item__name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gb-gray-900);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gb-group-item__meta {
    font-size: 12px;
    color: var(--gb-gray-500);
}

/* =========================================
   12. 按钮
========================================= */
.gb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 24px;
    border-radius: var(--gb-radius-md);
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease,
                box-shadow 0.18s ease, transform 0.12s ease,
                border-color 0.18s ease;
    line-height: 1.2;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.gb-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--gb-primary-ring);
}
.gb-btn:active { transform: scale(0.98); }
.gb-btn[disabled],
.gb-btn:disabled,
.gb-btn.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}
.gb-btn--block { display: flex; width: 100%; padding: 16px 32px; font-size: 16px; }
.gb-btn--lg    { padding: 18px 32px; font-size: 17px; border-radius: 14px; }

/* 主按钮：品牌蓝 + 软投影 */
.gb-btn--primary {
    background: var(--gb-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(43, 89, 255, 0.18);
}
.gb-btn--primary:hover {
    background: var(--gb-primary-hover);
    box-shadow: var(--gb-shadow-primary);
}

/* 渐变主按钮：用于最醒目的 CTA（如「发起拼团 ¥xx」） */
.gb-btn--gradient {
    background: linear-gradient(135deg, #a0522d 0%, #6b3410 100%);
    color: #fff;
    box-shadow: 0 8px 20px rgba(107, 52, 16, 0.28);
    border: 1px solid transparent;
    transition: background .2s ease, color .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.gb-btn--gradient:hover {
    background: #fff;
    color: #6b3410;
    border-color: #a0522d;
    box-shadow: 0 12px 28px rgba(107, 52, 16, 0.18);
}

/* 次按钮：浅灰底 */
.gb-btn--secondary {
    background: var(--gb-gray-100);
    color: var(--gb-gray-900);
}
.gb-btn--secondary:hover {
    background: var(--gb-gray-200);
}

/* 描边按钮：用于次级 CTA（如「我的拼团 →」） */
.gb-btn--outline {
    background: #fff;
    color: var(--gb-primary);
    border-color: var(--gb-primary);
}
.gb-btn--outline:hover {
    background: var(--gb-primary-soft);
}

/* 幽灵按钮：仅文字 */
.gb-btn--ghost {
    background: transparent;
    color: var(--gb-gray-500);
    padding: 8px 16px;
    font-size: 14px;
}
.gb-btn--ghost:hover {
    color: var(--gb-primary);
    background: var(--gb-primary-soft);
}

/* 小尺寸（圆角胶囊，用于团组列表里的「去参团」） */
.gb-btn--small { padding: 8px 16px; font-size: 13px; border-radius: 999px; }

/* =========================================
   13. 底部固定操作区（移动端友好）
========================================= */
.gb-action-bar {
    background: #fff;
    padding: 20px 24px;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--gb-gray-200);
    position: sticky;
    bottom: 0;
    z-index: 50;
}
.gb-action-bar__inner {
    max-width: 600px;
    margin: 0 auto;
}
.gb-action-bar__note {
    text-align: center;
    font-size: 13px;
    color: var(--gb-gray-500);
    margin-top: 12px;
}
.gb-action-bar__note--success { color: var(--gb-success); }

/* =========================================
   14. 邀请横幅（邀请页顶部）
========================================= */
.gb-invite-banner {
    background: var(--gb-gray-100);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--gb-gray-200);
}
.gb-invite-banner__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gb-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    flex-shrink: 0;
}
.gb-invite-banner__title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 2px;
}
.gb-invite-banner__subtitle {
    font-size: 13px;
    color: var(--gb-gray-500);
    margin: 0;
}

/* =========================================
   15. 空状态
========================================= */
.gb-empty {
    text-align: center;
    padding: 80px 24px;
}
.gb-empty__icon { color: var(--gb-gray-300); margin-bottom: 24px; }
.gb-empty__title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gb-gray-900);
    margin: 0 0 8px;
}
.gb-empty__desc {
    font-size: 14px;
    color: var(--gb-gray-500);
    margin: 0;
}

/* =========================================
   16. 错误页
========================================= */
.gb-error {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 40px 24px;
}
.gb-error__box { text-align: center; max-width: 360px; }
.gb-error__icon { color: var(--gb-danger); margin-bottom: 16px; }
.gb-error__msg {
    font-size: 16px;
    color: var(--gb-gray-900);
    margin: 0 0 24px;
}

/* =========================================
   17. Toast 提示（JS 生成）
========================================= */
.gb-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: var(--gb-gray-900);
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--gb-radius-md);
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s;
    pointer-events: none;
    max-width: 80%;
}
.gb-toast--show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.gb-toast--error { background: var(--gb-danger); }
.gb-toast--success { background: var(--gb-success); }

/* =========================================
   18. 表格样式（我的拼团等）
========================================= */
.gb-table-list {
    border: 1px solid var(--gb-gray-200);
    border-radius: var(--gb-radius-lg);
    overflow: hidden;
}
.gb-table-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--gb-gray-200);
    background: #fff;
}
.gb-table-row:last-child { border-bottom: none; }
.gb-table-row__main { flex: 1; min-width: 0; }
.gb-table-row__title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gb-table-row__meta {
    font-size: 13px;
    color: var(--gb-gray-500);
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
}
.gb-table-row__actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* =========================================
   19. 响应式
========================================= */
@media (max-width: 640px) {
    .gb-container { padding: 0 16px; }
    .gb-section { padding: 32px 0; }
    /* 详情子页移动端进一步收紧顶部，让"活动详情"标题贴近主题导航 */
    .gb-scope.gb-detail-page .gb-section { padding-top: 12px; }
    .gb-header__title { font-size: 28px; }
    .gb-grid { grid-template-columns: 1fr; gap: 16px; }
    .gb-card { padding: 20px; }
    .gb-stats { gap: 32px; padding: 20px; }
    .gb-stat__value { font-size: 24px; }
    .gb-price__current { font-size: 28px; }
    .gb-price__current--xl { font-size: 36px; }
    .gb-table-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .gb-table-row__actions { justify-content: flex-end; }
}

@media (min-width: 768px) {
    .gb-members { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 20px; }
    .gb-member__avatar { width: 64px; height: 64px; font-size: 22px; }
}

/* =========================================
   20. 列表页 Hero 背景变体（.gb-list-hero）
   - 默认：使用 CSS 变量 --gb-list-bg-image 注入的图片
   - 兜底：若变量未设置（兼容旧版），回退到原蓝紫渐变
   - 装饰：图片之上盖一层渐变蒙版，保证白字可读
========================================= */
.gb-scope.gb-list-hero {
    position: relative;
    min-height: 100vh;
    /* 当 --gb-list-bg-image 被模板注入时，优先用图片 */
    background-image: var(--gb-list-bg-image, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

/* 仅当没注入背景图变量时才显示原渐变（向后兼容）*/
.gb-scope.gb-list-hero:not([style*="--gb-list-bg-image"]) {
    background:
        radial-gradient(circle at 15% 0%, rgba(111, 93, 255, 0.55) 0%, transparent 45%),
        radial-gradient(circle at 85% 10%, rgba(43, 89, 255, 0.55) 0%, transparent 50%),
        linear-gradient(180deg, #1e3a8a 0%, #2b59ff 55%, #4f7bff 100%);
    overflow: hidden;
}

/* 自定义图背景下：完全不加蒙版；屏蔽原白色光晕；靠文字自身阴影保证可读 */
.gb-scope.gb-list-hero[style*="--gb-list-bg-image"] { overflow: hidden; }
.gb-scope.gb-list-hero[style*="--gb-list-bg-image"]::before { display: none; }
.gb-scope.gb-list-hero[style*="--gb-list-bg-image"] .gb-header__title {
    text-shadow: 0 2px 6px rgba(0,0,0,0.55), 0 4px 18px rgba(0,0,0,0.4);
}
.gb-scope.gb-list-hero[style*="--gb-list-bg-image"] .gb-header__subtitle {
    text-shadow: 0 1px 4px rgba(0,0,0,0.6), 0 2px 10px rgba(0,0,0,0.4);
}

/* 顶部光晕装饰（伪元素，纯视觉，不影响布局） */
.gb-scope.gb-list-hero::before {
    content: '';
    position: absolute;
    top: -200px; left: 50%;
    width: 800px; height: 800px;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(255,255,255,0.18) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.gb-scope.gb-list-hero .gb-section { position: relative; z-index: 1; padding: 96px 0 80px; }

/* 速科前台公共模板（详情页 / 邀请页）：避开速科 fixed 顶部导航 */
.gb-scope.gb-public .gb-section { padding-top: 96px; }

/* 速科详情子页：仍需避开 fixed 导航，但比默认 96px 收紧 */
.gb-scope.gb-public.gb-detail-page .gb-section { padding-top: 72px; }

/* 页头：白色文字 */
.gb-scope.gb-list-hero .gb-header__title {
    color: #fff;
    font-size: 40px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}
.gb-scope.gb-list-hero .gb-header__subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 17px;
}

/* 统计卡：玻璃拟态 */
.gb-scope.gb-list-hero .gb-stats {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 8px 28px rgba(15, 20, 50, 0.18);
}
.gb-scope.gb-list-hero .gb-stat__value { color: #fff; }
.gb-scope.gb-list-hero .gb-stat__label { color: rgba(255, 255, 255, 0.78); }

/* 网格：固定 3 列（≥960px），让卡片更长更舒展 */
.gb-scope.gb-list-hero .gb-container { max-width: 1600px; padding: 0 32px; }
.gb-scope.gb-list-hero .gb-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}
@media (max-width: 960px) {
    .gb-scope.gb-list-hero .gb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
}
@media (max-width: 640px) {
    .gb-scope.gb-list-hero .gb-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* ============== 商品卡（gb-pcard）============== */
.gb-pcard {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 12px 30px rgba(15, 20, 50, 0.18);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
}
.gb-pcard:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 44px rgba(15, 20, 50, 0.28);
}
.gb-pcard:hover .gb-pcard__cta { background: var(--gb-primary-hover); }
.gb-pcard:hover .gb-pcard__arrow { transform: translateX(4px); }

/* —— 顶部 Hero 区（背景图 / 无图回退渐变 + 标题 + 副标题 + 周期）—— */
.gb-pcard__hero {
    position: relative;
    padding: 22px 22px 24px;
    /* 默认深蓝渐变，作为无图时的回退 */
    background-color: #1f2c5c;
    background-image:
        radial-gradient(circle at 100% 0%, rgba(255,255,255,0.18) 0%, transparent 55%),
        linear-gradient(135deg, #1f2c5c 0%, #2d3b7a 60%, #3a4ea0 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-height: 168px;
}
/* 有图模式：图片高清直出，不叠任何蒙版；通过文字阴影保证白字在亮色图上的可读性 */
.gb-pcard__hero > * { position: relative; z-index: 1; }
.gb-pcard__hero--img .gb-pcard__title,
.gb-pcard__hero--img .gb-pcard__subtitle,
.gb-pcard__hero--img .gb-pcard__cycle {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.35);
}
.gb-pcard__hero--img .gb-pcard__arrow {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}
.gb-pcard__hero-text { flex: 1; min-width: 0; }
.gb-pcard__title {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 6px;
    line-height: 1.3;
    word-break: break-all;
}
.gb-pcard__subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.78);
    margin: 0 0 14px;
    line-height: 1.55;
    word-break: break-word;
}
.gb-pcard__subtitle br + br { display: none; }
.gb-pcard__cycle {
    font-size: 15px;
    font-weight: 700;
    color: #4f8dff;
    margin: 0;
    line-height: 1.4;
}
.gb-pcard__arrow {
    flex-shrink: 0;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255, 255, 255, 0.85);
    transition: transform 0.25s ease;
    position: relative;
    z-index: 1;
}

/* —— 中部 Body —— */
.gb-pcard__body {
    padding: 14px 22px 16px;
}

/* 顶部 chips 行 */
.gb-pcard__chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.gb-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.6;
}
.gb-chip--gray { background: #f1f3f7; color: #6e7591; }
.gb-chip--info { background: var(--gb-primary-soft); color: var(--gb-primary); }
.gb-chip--newuser {
    background: linear-gradient(135deg, #ff6b3d, #ff3b30);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(255, 59, 48, 0.18);
}
.gb-chip--notstarted {
    background: linear-gradient(135deg, #4e9cff, #007aff);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 122, 255, 0.20);
}
.gb-chip--ended {
    background: #e5e5ea;
    color: #6e6e73;
    font-weight: 500;
}
.gb-pcard__chip-text {
    font-size: 13px;
    color: var(--gb-gray-500);
    margin-left: 4px;
}

/* 价格行：左标签 + 右价格 */
.gb-pcard__pricerow {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.gb-pcard__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.gb-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    border: 1px solid transparent;
}
.gb-tag--orange {
    background: linear-gradient(135deg, #ff8a3d 0%, #ff6a00 100%);
    color: #fff;
    box-shadow: 0 2px 6px rgba(255, 122, 0, 0.25);
}
.gb-tag--outline {
    background: #fff;
    border-color: #d8dde9;
    color: var(--gb-gray-700);
}

.gb-pcard__price {
    text-align: right;
    line-height: 1.4;
    min-width: 0;
}
.gb-pcard__price-label {
    display: block;
    font-size: 12px;
    color: var(--gb-gray-400);
    margin-bottom: 2px;
}
.gb-pcard__price-main {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    color: var(--gb-primary);
}
.gb-pcard__price-value {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
}
.gb-pcard__price-unit {
    font-size: 13px;
    font-weight: 600;
}
.gb-pcard__price-original {
    display: block;
    font-size: 12px;
    color: var(--gb-gray-400);
    margin-top: 2px;
}
.gb-pcard__price-original s { color: var(--gb-gray-400); }

/* —— 底部进度 + CTA —— */
.gb-pcard__foot { padding: 0 22px 18px; }
.gb-pcard__progress {
    height: 6px;
    background: #e7eaf2;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 12px;
}
.gb-pcard__progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4f8dff 0%, #2b59ff 100%);
    border-radius: 999px;
    transition: width 0.6s ease;
    min-width: 4%;
}
.gb-pcard__foot-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.gb-pcard__foot-text {
    font-size: 13px;
    color: var(--gb-gray-500);
}
.gb-pcard__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 22px;
    background: var(--gb-primary);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(43, 89, 255, 0.28);
    transition: background 0.18s ease;
    flex-shrink: 0;
}

/* 移动端 */
@media (max-width: 520px) {
    .gb-scope.gb-list-hero .gb-grid { grid-template-columns: 1fr; }
    .gb-pcard__hero { padding: 18px 18px 20px; min-height: 140px; }
    .gb-pcard__title { font-size: 20px; }
    .gb-pcard__body, .gb-pcard__foot { padding-left: 18px; padding-right: 18px; }
    .gb-pcard__pricerow { flex-direction: column; align-items: flex-start; }
    .gb-pcard__price { text-align: left; }
    .gb-pcard__price-value { font-size: 24px; }
}

/* 空状态：白色文字 */
.gb-scope.gb-list-hero .gb-empty__icon { color: rgba(255, 255, 255, 0.55); }
.gb-scope.gb-list-hero .gb-empty__title { color: #fff; }
.gb-scope.gb-list-hero .gb-empty__desc { color: rgba(255, 255, 255, 0.78); }

/* 底部「我的拼团 / 登录查看更多」按钮：玻璃描边 */
.gb-scope.gb-list-hero .gb-btn--secondary {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.gb-scope.gb-list-hero .gb-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.26);
    border-color: rgba(255, 255, 255, 0.7);
}

/* 底部规则文字：半透明白 */
.gb-scope.gb-list-hero .gb-section > .gb-container > div[style*="margin-top:24px"] {
    color: rgba(255, 255, 255, 0.7) !important;
}

@media (max-width: 640px) {
    .gb-scope.gb-list-hero .gb-section { padding: 84px 0 60px; }
    .gb-scope.gb-public .gb-section { padding-top: 84px; }
    .gb-scope.gb-list-hero .gb-header__title { font-size: 30px; }
    .gb-scope.gb-list-hero .gb-card { padding: 22px 20px; }
    .gb-scope.gb-list-hero .gb-card__title { min-height: auto; }
}

/* =========================================
   17. 活动详情页 - 卡片式（铺满）
========================================= */
.gb-detail {
    --gb-detail-radius: 18px;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}
@media (max-width: 900px) {
    .gb-detail { grid-template-columns: 1fr; }
}

/* 新版分层布局：1号横向铺满 + 2/3号下方左右并排 */
.gb-detail.gb-detail--stacked {
    width: 100%;
    max-width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
}
.gb-detail.gb-detail--stacked > .gb-detail-hero,
.gb-detail.gb-detail--stacked > .gb-detail-bottom {
    width: 100%;
    max-width: 100%;
    align-self: stretch;
}
.gb-detail-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}
@media (max-width: 900px) {
    .gb-detail-bottom { grid-template-columns: 1fr; }
}

/* 通用卡片基底 */
.gb-card-pane {
    background: #fff;
    border: 1px solid var(--gb-gray-200);
    border-radius: var(--gb-detail-radius);
    box-shadow: 0 8px 24px rgba(20, 32, 80, 0.06);
    overflow: hidden;
}

/* 左侧：商品主卡（封面 + 标题 + 描述 + 价格） */
.gb-detail-hero {
    display: flex;
    flex-direction: column;
}
.gb-detail-hero__cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--gb-gray-100) center / cover no-repeat;
    position: relative;
}

/* 横向宽版：图片在左，内容在右 */
.gb-detail-hero.gb-detail-hero--wide {
    flex-direction: row;
    align-items: stretch;
    min-height: 320px;
}
.gb-detail-hero--wide .gb-detail-hero__cover {
    width: 42%;
    flex-shrink: 0;
    aspect-ratio: auto;
}
.gb-detail-hero--wide .gb-detail-hero__body {
    flex: 1;
    min-width: 0;
    padding: 32px 36px;
    gap: 20px;
}
@media (max-width: 900px) {
    .gb-detail-hero.gb-detail-hero--wide { flex-direction: column; min-height: 0; }
    .gb-detail-hero--wide .gb-detail-hero__cover { width: 100%; aspect-ratio: 16 / 9; }
    .gb-detail-hero--wide .gb-detail-hero__body { padding: 22px 20px; }
}
.gb-detail-hero__cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.02) 0%, rgba(0,0,0,0.45) 100%);
    pointer-events: none;
}
.gb-detail-hero__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 24px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.gb-detail-hero__overlay .gb-detail-hero__title {
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.gb-detail-hero__overlay .gb-detail-hero__desc {
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    margin: 0;
    line-height: 1.6;
    text-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.gb-detail-hero__badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #ff4d4f 0%, #ef4444 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.35);
}
.gb-detail-hero__body {
    padding: 24px 28px 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.gb-detail-hero__title {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--gb-gray-900);
    margin: 0;
}
.gb-detail-hero__desc {
    font-size: 14px;
    color: var(--gb-gray-500);
    line-height: 1.7;
    margin: 0;
    white-space: pre-line;       /* 兼容老数据：未走 description_html 也能识别 \n */
    word-break: break-word;
}
.gb-detail-hero__desc br + br { display: none; }  /* 防止连续多个空行造成过大间隙 */
.gb-detail-hero__price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 12px;
    padding: 18px 20px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.06) 0%, rgba(239, 68, 68, 0.02) 100%);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: 14px;
}
.gb-detail-hero__price .gb-price__current {
    font-size: 34px;
    font-weight: 800;
    color: var(--gb-danger);
    letter-spacing: -0.5px;
}
.gb-detail-hero__price .gb-price__original {
    font-size: 15px;
}
.gb-detail-hero__price .gb-price__saved {
    margin-left: auto;
    font-size: 13px;
    padding: 4px 10px;
    background: #fff;
    border-color: var(--gb-danger);
    color: var(--gb-danger);
}

/* 三大指标 */
.gb-detail-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 0;
}
.gb-detail-stat {
    background: var(--gb-gray-50);
    border-radius: 12px;
    padding: 14px 12px;
    text-align: center;
}
.gb-detail-stat__value {
    font-size: 20px;
    font-weight: 700;
    color: var(--gb-gray-900);
    line-height: 1.1;
    margin-bottom: 4px;
}
.gb-detail-stat__label {
    font-size: 12px;
    color: var(--gb-gray-500);
}

/* 右侧：配置信息 + 团组列表 */
.gb-detail-side {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.gb-detail-block {
    padding: 22px 24px;
}
.gb-detail-block__head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}
.gb-detail-block__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--gb-gray-900);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.gb-detail-block__title::before {
    content: '';
    width: 4px;
    height: 16px;
    background: var(--gb-gradient);
    border-radius: 2px;
}
.gb-detail-block__hint {
    margin-left: auto;
    font-size: 12px;
    color: var(--gb-gray-400);
}

/* 配置信息表格 */
.gb-spec-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    border: 1px solid var(--gb-gray-200);
    border-radius: 12px;
    overflow: hidden;
}
.gb-spec-row {
    display: grid;
    grid-template-columns: minmax(96px, 140px) 1fr;
    align-items: center;
    gap: 0;
    border-top: 1px solid var(--gb-gray-200);
    background: #fff;
    transition: background 0.15s;
}
.gb-spec-row:first-child { border-top: none; }
.gb-spec-row:hover { background: var(--gb-gray-50); }
.gb-spec-row__label {
    padding: 12px 14px;
    background: var(--gb-gray-50);
    color: var(--gb-gray-500);
    font-size: 13px;
    font-weight: 500;
    border-right: 1px solid var(--gb-gray-200);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gb-spec-row__value {
    padding: 12px 16px;
    color: var(--gb-gray-900);
    font-size: 14px;
    font-weight: 500;
    word-break: break-word;
    /* 让 \n 在前台直接渲染为换行（值多行场景）*/
    white-space: pre-line;
    line-height: 1.7;
}
.gb-spec-row--text .gb-spec-row__value {
    grid-column: 1 / -1;
    padding: 12px 16px;
}
.gb-spec-row--text .gb-spec-row__label { display: none; }
.gb-spec-row--text {
    grid-template-columns: 1fr;
}

/* 分组标题：跨整行的醒目小标题 */
.gb-spec-row--heading {
    grid-template-columns: 1fr;
    background: linear-gradient(135deg, rgba(255, 107, 61, 0.06), rgba(255, 107, 61, 0.02));
}
.gb-spec-row--heading:hover { background: linear-gradient(135deg, rgba(255, 107, 61, 0.10), rgba(255, 107, 61, 0.04)); }
.gb-spec-row__heading {
    padding: 10px 16px;
    color: #ff6b3d;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.4px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.gb-spec-row__heading::before {
    content: '';
    width: 3px;
    height: 14px;
    border-radius: 2px;
    background: currentColor;
}

/* 详情页响应式微调 */
@media (max-width: 640px) {
    .gb-detail-hero__body { padding: 20px 18px 22px; }
    .gb-detail-hero__title { font-size: 22px; }
    .gb-detail-hero__price { padding: 14px 16px; }
    .gb-detail-hero__price .gb-price__current { font-size: 28px; }
    .gb-detail-block { padding: 18px 18px; }
    .gb-detail-stat__value { font-size: 18px; }
    .gb-spec-row { grid-template-columns: 110px 1fr; }
}

/* =========================================
   18. 横向矩形商品卡（列表页极简版）
========================================= */
.gb-section--plain {
    padding: 32px 0 64px;
    background: transparent;
    /* 撑满 ZJMF 用户中心剩余视口，避免内容区结束后出现色差分界线 */
    min-height: calc(100vh - 220px);
}
.gb-rowlist {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 16px;
}
.gb-rowcard {
    display: flex;
    align-items: stretch;
    background: #fff;
    border: 1px solid var(--gb-gray-200);
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 3px 10px rgba(20, 32, 80, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    min-height: 156px;
}
.gb-rowcard:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(43, 89, 255, 0.14);
    border-color: rgba(43, 89, 255, 0.35);
}

/* 左侧封面 */
.gb-rowcard__cover {
    flex: 0 0 160px;
    position: relative;
    background: var(--gb-gray-100) center / cover no-repeat;
}
.gb-rowcard__cover--empty {
    background: linear-gradient(135deg, #5a78ff 0%, #2b59ff 100%);
}
.gb-rowcard__cover--empty::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.18) 0%, transparent 60%);
}
.gb-rowcard__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #ff6b3d 0%, #ff3b30 100%);
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.35);
    letter-spacing: 0.3px;
}

/* 右侧内容 */
.gb-rowcard__body {
    flex: 1;
    min-width: 0;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
}
.gb-rowcard__head { min-width: 0; }
.gb-rowcard__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--gb-gray-900);
    margin: 0 0 4px;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gb-rowcard__desc {
    font-size: 12px;
    color: var(--gb-gray-500);
    line-height: 1.55;
    margin: 0;
    word-break: break-word;
    /* 多行完整展示，按 <br> 换行 */
}
.gb-rowcard__desc br + br { display: none; }

.gb-rowcard__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.gb-rowcard__meta .gb-chip {
    padding: 3px 8px;
    font-size: 11px;
}
.gb-rowcard__stock {
    font-size: 11px;
    color: var(--gb-gray-400);
    margin-left: auto;
}

.gb-rowcard__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-top: 1px dashed var(--gb-gray-200);
    padding-top: 10px;
}
.gb-rowcard__price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px;
    min-width: 0;
}
.gb-rowcard__price-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--gb-primary);
    letter-spacing: -0.3px;
    line-height: 1;
}
.gb-rowcard__price-unit {
    font-size: 12px;
    color: var(--gb-gray-500);
    font-weight: 500;
}
.gb-rowcard__price-original {
    font-size: 12px;
    color: var(--gb-gray-400);
    text-decoration: line-through;
    margin-left: 2px;
}
.gb-rowcard__cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: var(--gb-gradient);
    border-radius: 999px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(43, 89, 255, 0.3);
    transition: transform 0.2s ease;
}
.gb-rowcard__cta svg { width: 14px; height: 14px; }
.gb-rowcard:hover .gb-rowcard__cta { transform: translateX(2px); }

/* 响应式：单列时缩小封面 */
@media (max-width: 600px) {
    .gb-rowlist { grid-template-columns: 1fr; }
    .gb-rowcard__cover { flex: 0 0 130px; }
    .gb-rowcard__body { padding: 12px 14px; }
    .gb-rowcard__title { font-size: 15px; }
    .gb-rowcard__price-value { font-size: 18px; }
    .gb-rowcard__cta { padding: 6px 12px; font-size: 12px; }
}

/* ========================================================
   我的拼团 - 分类标签
   ======================================================== */
.gb-mygroup-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    margin: 0 0 20px;
    padding: 4px;
    background: #f5f5f7;
    border-radius: 12px;
    overflow-x: auto;
}
.gb-mygroup-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gb-gray-500);
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    line-height: 1;
}
.gb-mygroup-tab:hover {
    color: var(--gb-gray-700, #3a3a3c);
    background: rgba(255,255,255,0.5);
}
.gb-mygroup-tab--active {
    color: var(--gb-gray-900);
    background: #fff;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.gb-mygroup-tab__count {
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    background: var(--gb-primary);
    color: #fff;
    border-radius: 999px;
    line-height: 1.3;
}
.gb-mygroup-tab__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.gb-mygroup-tab__dot--active { background: #ff6b3d; }
.gb-mygroup-tab__dot--success { background: #34c759; }
.gb-mygroup-tab__dot--ended { background: #86868b; }

.gb-mygroup-filter-empty {
    max-width: 100%;
    margin: 0;
    text-align: center;
    padding: 48px 24px;
    color: var(--gb-gray-500);
    font-size: 15px;
    background: #f9f9fb;
    border-radius: 14px;
    border: 1px dashed #e0e0e5;
}

/* ========================================================
   我的拼团 - 卡片列表
   ======================================================== */
.gb-mygroup-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 100%;
    margin: 0;
}
.gb-mygroup-card {
    background: #fff;
    border: 1px solid #e8e8ed;
    border-radius: 14px;
    overflow: hidden;
    transition: box-shadow 0.25s ease;
}
.gb-mygroup-card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,0.07);
}

/* 头部：标题 + 状态 */
.gb-mygroup-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 0;
    gap: 12px;
}
.gb-mygroup-card__title {
    font-size: 17px;
    font-weight: 700;
    color: var(--gb-gray-900);
    margin: 0;
    line-height: 1.4;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 状态徽标 */
.gb-mygroup-badge {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 999px;
    white-space: nowrap;
}
.gb-mygroup-badge--active {
    color: #ff6b3d;
    background: rgba(255,107,61,0.08);
}
.gb-mygroup-badge--success {
    color: #34c759;
    background: rgba(52,199,89,0.08);
}
.gb-mygroup-badge--refund {
    color: #86868b;
    background: rgba(134,134,139,0.08);
}
.gb-mygroup-badge--fail {
    color: #ff3b30;
    background: rgba(255,59,48,0.08);
}

/* 信息行 */
.gb-mygroup-card__info {
    padding: 16px 24px 0;
    border-top: none;
}
.gb-mygroup-row {
    display: flex;
    align-items: baseline;
    padding: 6px 0;
    font-size: 14px;
    line-height: 1.6;
    border-bottom: 1px dashed #f0f0f3;
}
.gb-mygroup-row:last-child { border-bottom: none; }
.gb-mygroup-row__label {
    flex-shrink: 0;
    width: 80px;
    color: var(--gb-gray-500);
    font-size: 13px;
}
.gb-mygroup-row__value {
    flex: 1;
    color: var(--gb-gray-900);
    word-break: break-all;
}
.gb-mygroup-row__value--specs {
    font-size: 13px;
    color: var(--gb-gray-600, #6e6e73);
    line-height: 1.7;
    white-space: pre-line;
}
.gb-mygroup-price {
    color: #ff3b30;
    font-size: 15px;
    font-weight: 700;
}
.gb-mygroup-saved {
    color: #34c759;
    font-size: 12px;
    margin-left: 4px;
}

/* 进度区 */
.gb-mygroup-card__progress {
    margin: 16px 24px 0;
    padding: 16px 0 0;
    border-top: 1px solid #f0f0f3;
}
.gb-mygroup-progress-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.gb-mygroup-progress-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--gb-gray-900);
}
.gb-mygroup-progress-count {
    font-size: 14px;
    font-weight: 600;
    color: var(--gb-gray-900);
}
.gb-mygroup-progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f3;
    border-radius: 999px;
    overflow: hidden;
}
.gb-mygroup-progress-bar__fill {
    height: 100%;
    background: linear-gradient(90deg, #ff3b30, #ff6b3d);
    border-radius: 999px;
    transition: width 0.4s ease;
    min-width: 8px;
}
.gb-mygroup-remain {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    font-size: 13px;
    color: #ff6b3d;
}
.gb-mygroup-remain svg { stroke: #ff6b3d; }

/* 操作按钮 */
.gb-mygroup-card__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 24px;
    margin-top: 4px;
    border-top: 1px solid #f0f0f3;
}
.gb-mygroup-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    line-height: 1;
}
.gb-mygroup-btn--outline {
    color: var(--gb-gray-700, #3a3a3c);
    background: #fff;
    border: 1px solid #d1d1d6;
}
.gb-mygroup-btn--outline:hover {
    background: #f5f5f7;
    border-color: #b0b0b5;
    color: var(--gb-gray-900);
}
.gb-mygroup-btn--primary {
    color: #fff;
    background: var(--gb-primary);
    border: 1px solid var(--gb-primary);
}
.gb-mygroup-btn--primary:hover {
    background: var(--gb-primary-dark, #1e44d6);
    border-color: var(--gb-primary-dark, #1e44d6);
    box-shadow: 0 4px 14px rgba(43,89,255,0.3);
}

/* 我的拼团响应式 */
@media (max-width: 600px) {
    .gb-mygroup-card__header { padding: 16px 16px 0; }
    .gb-mygroup-card__info { padding: 12px 16px 0; }
    .gb-mygroup-card__progress { margin: 12px 16px 0; }
    .gb-mygroup-card__actions { padding: 14px 16px; }
    .gb-mygroup-card__title { font-size: 15px; }
    .gb-mygroup-row__label { width: 70px; }
}

/* ========================================================
   邀请页面 - 顶部横幅
   ======================================================== */
.gb-share-banner {
    display: flex;
    align-items: stretch;
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 50%, #a5b4fc 100%);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
    min-height: 160px;
}

/* 左侧：团长 */
.gb-share-banner__leader {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 24px 28px;
    background: rgba(0,0,0,0.1);
    flex-shrink: 0;
}
.gb-share-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
    font-weight: 700;
}
.gb-share-avatar--leader {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.5);
}
.gb-share-avatar--filled {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #6366f1, #818cf8);
    color: #fff;
    border: 2px solid #fff;
    font-size: 16px;
}
.gb-share-avatar--empty {
    width: 48px;
    height: 48px;
    background: #f0f0f3;
    color: #c7c7cc;
    border: 2px dashed #d1d1d6;
    font-size: 18px;
}
.gb-share-banner__leader-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.gb-share-banner__leader-label {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}
.gb-share-banner__leader-price {
    color: rgba(255,255,255,0.9);
    font-size: 20px;
    font-weight: 700;
}

/* 中间：成员头像 + 倒计时 */
.gb-share-banner__members {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    gap: 14px;
}
.gb-share-banner__avatars {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}
.gb-share-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
}
.gb-share-slot__tag {
    position: absolute;
    bottom: calc(100% - 44px);
    left: 50%;
    transform: translateX(-50%);
    background: #ff3b30;
    color: #fff;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 4px;
    white-space: nowrap;
    line-height: 1.4;
}
.gb-share-slot__name {
    font-size: 11px;
    color: rgba(255,255,255,0.85);
    white-space: nowrap;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gb-share-banner__countdown {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
}
.gb-share-banner__countdown svg {
    stroke: rgba(255,255,255,0.9);
}

/* 右侧：状态 + 操作 */
.gb-share-banner__action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px 28px;
    flex-shrink: 0;
    min-width: 160px;
}
.gb-share-banner__joined {
    font-size: 12px;
    color: rgba(255,255,255,0.85);
    text-align: center;
    line-height: 1.6;
}
.gb-share-banner__joined-price {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}
.gb-share-banner__invite-btn {
    display: inline-block;
    padding: 12px 32px;
    background: #fff;
    color: var(--gb-gray-900);
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-align: center;
}
.gb-share-banner__invite-btn:hover {
    background: #f5f5f7;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.gb-share-banner__status-done {
    padding: 10px 24px;
    background: rgba(52,199,89,0.2);
    color: #fff;
    font-weight: 600;
    border-radius: 10px;
    font-size: 14px;
}
.gb-share-banner__status-fail {
    padding: 10px 24px;
    background: rgba(255,59,48,0.2);
    color: #fff;
    font-weight: 600;
    border-radius: 10px;
    font-size: 14px;
}

/* ========================================================
   邀请页面 - 活动详情卡片
   ======================================================== */
.gb-share-detail {
    background: #fff;
    border: 1px solid #e8e8ed;
    border-radius: 14px;
    overflow: hidden;
}
.gb-share-detail__header {
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f3;
}
.gb-share-detail__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gb-gray-900);
    margin: 0 0 8px;
}
.gb-share-detail__pricing {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}
.gb-share-detail__original {
    font-size: 13px;
    color: var(--gb-gray-400, #aeaeb2);
    text-decoration: line-through;
}
.gb-share-detail__real {
    font-size: 14px;
    color: #ff3b30;
}
.gb-share-detail__real strong {
    font-size: 22px;
    font-weight: 800;
}
.gb-share-detail__discount {
    font-size: 12px;
    color: #ff6b3d;
}
.gb-share-detail__body {
    padding: 16px 24px 20px;
}
.gb-share-detail__row {
    display: flex;
    align-items: baseline;
    padding: 8px 0;
    font-size: 14px;
    line-height: 1.6;
    border-bottom: 1px dashed #f0f0f3;
}
.gb-share-detail__row:last-child { border-bottom: none; }
.gb-share-detail__label {
    flex-shrink: 0;
    width: 80px;
    color: var(--gb-gray-500);
    font-size: 13px;
}
.gb-share-detail__value {
    flex: 1;
    color: var(--gb-gray-900);
    word-break: break-all;
}
.gb-share-detail__value--specs {
    font-size: 13px;
    color: #ff6b3d;
    line-height: 1.7;
    white-space: pre-line;
}

/* 邀请页面响应式 */
@media (max-width: 768px) {
    .gb-share-banner {
        flex-direction: column;
        border-radius: 12px;
    }
    .gb-share-banner__leader {
        justify-content: center;
        padding: 20px 20px 12px;
    }
    .gb-share-banner__members { padding: 12px 16px; }
    .gb-share-banner__action {
        padding: 12px 20px 20px;
        min-width: auto;
    }
    .gb-share-detail__header { padding: 16px 16px; }
    .gb-share-detail__body { padding: 12px 16px 16px; }
    .gb-share-detail__label { width: 70px; }
}

/* ========================================================
   参团确认弹窗
   ======================================================== */
.gb-modal-mask {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.gb-modal-mask--show {
    opacity: 1;
    visibility: visible;
}
.gb-modal {
    width: 92%;
    max-width: 420px;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    transform: translateY(24px) scale(0.96);
    transition: transform 0.3s cubic-bezier(.34,1.56,.64,1);
}
.gb-modal-mask--show .gb-modal {
    transform: translateY(0) scale(1);
}
.gb-modal__header {
    padding: 24px 24px 0;
    text-align: center;
}
.gb-modal__icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 12px;
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gb-modal__title {
    font-size: 18px;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0;
}
.gb-modal__body {
    padding: 20px 24px;
}
.gb-modal__price-box {
    background: linear-gradient(135deg, #fef3f2 0%, #fff1f0 100%);
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    margin-bottom: 16px;
}
.gb-modal__price-label {
    font-size: 13px;
    color: #86868b;
    margin-bottom: 4px;
}
.gb-modal__price-value {
    font-size: 32px;
    font-weight: 800;
    color: #ff3b30;
    line-height: 1.2;
}
.gb-modal__price-cycle {
    font-size: 14px;
    color: #ff6b3d;
    font-weight: 500;
}
.gb-modal__info {
    font-size: 13px;
    color: #3a3a3c;
    line-height: 1.8;
    margin-bottom: 16px;
}
.gb-modal__info-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px dashed #f0f0f3;
}
.gb-modal__info-row:last-child { border-bottom: none; }
.gb-modal__info-label { color: #86868b; }
.gb-modal__info-value { font-weight: 600; color: #1d1d1f; }
.gb-modal__terms {
    background: #f9f9fb;
    border: 1px solid #e8e8ed;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 12px;
    color: #6e6e73;
    line-height: 1.8;
    max-height: 120px;
    overflow-y: auto;
    margin-bottom: 16px;
}
.gb-modal__agree {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #3a3a3c;
    cursor: pointer;
    user-select: none;
    line-height: 1.5;
}
.gb-modal__agree input[type="checkbox"] {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    accent-color: #6366f1;
    flex-shrink: 0;
    cursor: pointer;
}
.gb-modal__footer {
    display: flex;
    gap: 10px;
    padding: 0 24px 24px;
}
.gb-modal__btn {
    flex: 1;
    padding: 12px 0;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    line-height: 1;
}
.gb-modal__btn--cancel {
    background: #f5f5f7;
    color: #3a3a3c;
}
.gb-modal__btn--cancel:hover { background: #e8e8ed; }
.gb-modal__btn--confirm {
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
    color: #fff;
}
.gb-modal__btn--confirm:hover {
    box-shadow: 0 4px 16px rgba(99,102,241,0.4);
}
.gb-modal__btn--confirm:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

@media (max-width: 480px) {
    .gb-modal { max-width: 100%; border-radius: 18px 18px 0 0; }
    .gb-modal-mask { align-items: flex-end; }
}
