/* 生活优惠活动页（/shenghuo）—— 前缀 xbsh-。20261011b
   沿用线报酷 zinc 设计令牌（/design/tokens.css）：只引用语义层变量，
   自带字面回退值；夜间 html.night 与 12 套多主题由令牌自动适配。 */

.xbsh-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 12px 48px;
    box-sizing: border-box;
}

/* ---------- Hero ---------- */
.xbsh-hero {
    padding: 6px 2px 18px;
    border-bottom: 1px solid var(--border, #e4e4e7);
    margin-bottom: 18px;
}

.xbsh-hero-title {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text, #09090b);
}

.xbsh-hero-sub {
    margin: 0;
    font-size: 13px;
    color: var(--text-2, #71717a);
}

/* ---------- 工具栏：分类 + 搜索 ---------- */
.xbsh-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.xbsh-cates {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1 1 auto;
    min-width: 0;
}

.xbsh-cate {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 14px;
    border: 1px solid var(--border-strong, #d4d4d8);
    border-radius: var(--radius-pill, 999px);
    background: var(--surface, #fff);
    color: var(--text-2, #71717a);
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background var(--dur-fast, .15s) var(--ease, ease),
        color var(--dur-fast, .15s) var(--ease, ease),
        border-color var(--dur-fast, .15s) var(--ease, ease);
}

.xbsh-cate:hover {
    background: var(--surface-2, #f4f4f5);
    color: var(--text, #09090b);
}

.xbsh-cate.on {
    background: var(--primary, #18181b);
    border-color: var(--primary, #18181b);
    color: var(--on-primary, #fff);
    font-weight: 500;
}

.xbsh-search {
    position: relative;
    flex: 0 0 240px;
    display: flex;
    align-items: center;
}

.xbsh-search .xb-ic {
    position: absolute;
    left: 11px;
    width: 15px;
    height: 15px;
    color: var(--text-3, #a1a1aa);
    pointer-events: none;
}

.xbsh-search input {
    width: 100%;
    height: 34px;
    padding: 0 12px 0 32px;
    border: 1px solid var(--border-strong, #d4d4d8);
    border-radius: var(--radius-pill, 999px);
    background: var(--surface, #fff);
    color: var(--text, #09090b);
    font-size: 13px;
    outline: none;
    transition: box-shadow var(--dur-fast, .15s) var(--ease, ease);
}

.xbsh-search input::placeholder {
    color: var(--text-3, #a1a1aa);
}

.xbsh-search input:focus {
    box-shadow: var(--shadow-ring-pop, 0 0 0 1.5px var(--primary, #18181b));
}

/* ---------- 卡片网格 ---------- */
.xbsh-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.xbsh-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--radius-card, 12px);
    background: var(--surface, #fff);
    box-shadow: var(--shadow-ring-sm, 0 0 0 1px var(--ring, #e4e4e7));
    cursor: pointer;
    transition: box-shadow var(--dur, .2s) var(--ease, ease),
        transform var(--dur, .2s) var(--ease, ease);
}

.xbsh-card:hover {
    box-shadow: var(--shadow-ring-lg, 0 0 0 1px var(--ring), 0 8px 30px rgba(0, 0, 0, .08));
    transform: translateY(-2px);
}

.xbsh-card-cover {
    position: relative;
    aspect-ratio: 2 / 1;
    background: var(--surface-2, #f4f4f5);
    overflow: hidden;
}

.xbsh-card-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.xbsh-card-ph {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--text-3, #a1a1aa);
}

.xbsh-card-ph img {
    max-width: 55%;
    max-height: 55%;
    object-fit: contain;
}

.xbsh-card-ph .xb-ic {
    width: 34px;
    height: 34px;
}

.xbsh-card-cate {
    position: absolute;
    left: 8px;
    top: 8px;
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 8px;
    border-radius: var(--radius-badge, 999px);
    background: rgba(9, 9, 11, .68);
    color: #fff;
    font-size: 11px;
    line-height: 1;
    backdrop-filter: blur(2px);
}

.xbsh-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 13px 13px;
    flex: 1 1 auto;
}

.xbsh-card-name {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text, #09090b);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.xbsh-card-desc {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-2, #71717a);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 37px;
}

.xbsh-card-time {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    font-size: 12px;
    color: var(--text-3, #a1a1aa);
}

.xbsh-card-time .xb-ic {
    width: 13px;
    height: 13px;
    flex: none;
}

.xbsh-card-btn {
    margin-top: 4px;
    height: 32px;
    border: 0;
    border-radius: var(--radius-control, 8px);
    background: var(--primary, #18181b);
    color: var(--on-primary, #fff);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--dur-fast, .15s) var(--ease, ease);
}

.xbsh-card:hover .xbsh-card-btn {
    background: var(--primary-hover, #27272a);
}

/* ---------- 状态 / 加载更多 ---------- */
.xbsh-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 22px 0;
    font-size: 13px;
    color: var(--text-2, #71717a);
}

.xbsh-status[hidden] {
    display: none;
}

.xbsh-spinner {
    display: none;
    width: 15px;
    height: 15px;
    border: 2px solid var(--border-strong, #d4d4d8);
    border-top-color: var(--text-2, #71717a);
    border-radius: 50%;
    animation: xbsh-spin .7s linear infinite;
}

.xbsh-status.is-loading .xbsh-spinner {
    display: inline-block;
}

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

.xbsh-more {
    display: flex;
    justify-content: center;
    padding: 4px 0 8px;
}

.xbsh-more[hidden] {
    display: none;
}

.xbsh-more-btn {
    height: 36px;
    padding: 0 26px;
    border: 1px solid var(--border-strong, #d4d4d8);
    border-radius: var(--radius-pill, 999px);
    background: var(--surface, #fff);
    color: var(--text, #09090b);
    font-size: 13.5px;
    cursor: pointer;
    transition: background var(--dur-fast, .15s) var(--ease, ease);
}

.xbsh-more-btn:hover {
    background: var(--surface-2, #f4f4f5);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
    .xbsh-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 700px) {
    .xbsh-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .xbsh-search {
        flex: 1 1 100%;
    }
    .xbsh-card-desc {
        -webkit-line-clamp: 2;
        min-height: 0;
    }
}

@media (max-width: 480px) {
    .xbsh-hero-title {
        font-size: 20px;
    }
    .xbsh-cate {
        height: 30px;
        padding: 0 12px;
        font-size: 12.5px;
    }
    .xbsh-card-body {
        padding: 10px 11px 11px;
    }
}
