/* ============================================================
   茶米师品牌官网 · 三主题 CSS 变量系统
   green=茶青绿(默认) brown=红茶暖棕 ink=墨韵黑金
   切换：<html data-theme="...">，后台改 fa_config.theme 即生效
   ============================================================ */

:root, :root[data-theme="green"] {
    --brand: #2F8F6B;
    --brand-dark: #1F6B50;
    --brand-light: #E3F0EA;
    --bg: #F7F5F0;
    --surface: #FFFFFF;
    --text: #26302B;
    --text-weak: #7A857F;
    --border: #E4E0D6;
    --hero-bg: linear-gradient(135deg, #1F6B50 0%, #2F8F6B 55%, #3FA37C 100%);
    --hero-text: #F4FAF7;
    --gold: #B9975B;
}
:root[data-theme="brown"] {
    --brand: #8C4A2F;
    --brand-dark: #6E3A24;
    --brand-light: #F2E4DB;
    --bg: #FAF6F0;
    --surface: #FFFFFF;
    --text: #33241C;
    --text-weak: #8A7A6E;
    --border: #E8DDD2;
    --hero-bg: linear-gradient(135deg, #5C2F1D 0%, #8C4A2F 55%, #A05C3A 100%);
    --hero-text: #FBF4EE;
    --gold: #B9975B;
}
:root[data-theme="ink"] {
    --brand: #B9975B;
    --brand-dark: #2B2B2B;
    --brand-light: #F0E9DC;
    --bg: #F5F5F4;
    --surface: #FFFFFF;
    --text: #262626;
    --text-weak: #80807D;
    --border: #E4E4E1;
    --hero-bg: linear-gradient(135deg, #1D1D1B 0%, #2B2B2B 55%, #3D3B36 100%);
    --hero-text: #EDE4D2;
    --gold: #B9975B;
}

/* ============ 基础 ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.cms-container { max-width: 640px; margin: 0 auto; padding: 0 16px; }
.cms-narrow { max-width: 720px; }

/* ============ 头部 ============ */
.cms-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 50;
}
.cms-header-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.cms-logo { display: flex; align-items: center; gap: 8px; }
.cms-logo-mark {
    width: 34px; height: 34px; border-radius: 8px;
    background: var(--brand); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 19px; font-weight: 700;
}
.cms-logo-mark-lg { width: 52px; height: 52px; font-size: 28px; border-radius: 12px; margin: 0 auto; }
.cms-logo-text { font-size: 19px; font-weight: 700; letter-spacing: 2px; display: flex; flex-direction: column; line-height: 1.15; }
.cms-logo-text i { font-style: normal; font-size: 9px; letter-spacing: 3px; color: var(--text-weak); font-weight: 400; }
/* 手机隐藏横向导航（有底部tabbar），PC显示 */
.cms-nav { display: none; gap: 26px; font-size: 15px; }
.cms-nav a { color: var(--text-weak); padding: 4px 2px; border-bottom: 2px solid transparent; }
.cms-nav a.active, .cms-nav a:hover { color: var(--brand); border-bottom-color: var(--brand); }
.cms-header-right { display: flex; align-items: center; }

/* ============ 按钮 ============ */
.cms-btn {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--brand); color: #fff;
    border: 1px solid var(--brand);
    border-radius: 8px; padding: 10px 22px;
    font-size: 15px; cursor: pointer; transition: opacity .15s;
}
.cms-btn:hover { opacity: .88; }
.cms-btn:disabled { opacity: .5; cursor: not-allowed; }
.cms-btn-outline { background: transparent; color: var(--brand); }
.cms-header .cms-btn-outline { color: var(--brand); }
.cms-hero .cms-btn-outline { background: transparent; color: var(--hero-text); border-color: rgba(255,255,255,.65); }
.cms-btn-sm { padding: 6px 14px; font-size: 13px; }
.cms-btn-lg { padding: 12px 28px; font-size: 16px; }
.cms-btn-block { width: 100%; }

/* ============ 主体 ============ */
.cms-main { min-height: 60vh; padding-bottom: 40px; }

/* ============ Hero 品牌主视觉 ============ */
.cms-hero { background: var(--hero-bg); color: var(--hero-text); padding: 64px 0 72px; }
.cms-hero h1 { font-size: 30px; line-height: 1.35; letter-spacing: 1px; }
.cms-hero-sub { margin: 16px 0 26px; opacity: .85; font-size: 15px; max-width: 34em; }
.cms-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ============ Hero 品牌配图（仅PC显示） ============ */
.cms-hero-art { display: none; }
@media (min-width: 768px) {
    .cms-hero { position: relative; overflow: hidden; }
    .cms-hero .cms-container { position: relative; z-index: 2; }
    .cms-hero-art { display: block; position: absolute; right: 6%; top: 50%; transform: translateY(-50%); z-index: 1; width: 300px; height: 380px; }
    .cms-hero-art-main {
        position: absolute; right: 0; top: 0; width: 260px; height: 340px;
        object-fit: cover; border-radius: 14px;
        box-shadow: 0 24px 60px rgba(0,0,0,.35);
        transform: rotate(3deg);
    }
    .cms-hero-art-sub {
        position: absolute; left: -34px; bottom: -14px; width: 140px; height: 140px;
        object-fit: cover; border-radius: 12px;
        box-shadow: 0 14px 40px rgba(0,0,0,.35);
        transform: rotate(-5deg);
        border: 4px solid rgba(255,255,255,.7);
    }
    .cms-hero-art-main::after { content: ""; }
}
@media (min-width: 1200px) {
    .cms-hero-art { width: 360px; right: 8%; }
    .cms-hero-art-main { width: 310px; height: 400px; }
}

/* ============ 区块 ============ */
.cms-section { padding: 36px 0 8px; }
.cms-section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-top: 28px; }
.cms-section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
.cms-section-head h2 { font-size: 21px; letter-spacing: 1px; position: relative; padding-left: 12px; }
.cms-section-head h2::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 4px; height: 18px; border-radius: 2px; background: var(--brand); }
.cms-more { font-size: 13px; color: var(--text-weak); }
.cms-lead { color: var(--text-weak); margin-bottom: 20px; }

/* ============ 产品卡片 ============ */
.cms-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.cms-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.cms-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0,0,0,.10); }
.cms-card-img img { transition: transform .35s ease; }
.cms-card:hover .cms-card-img img { transform: scale(1.05); }
.cms-card-more { display: inline-block; margin-top: 6px; font-size: 12px; color: var(--brand); opacity: 0; transform: translateX(-4px); transition: opacity .2s, transform .2s; }
.cms-card:hover .cms-card-more { opacity: 1; transform: translateX(0); }
.cms-card-img { aspect-ratio: 4/3; background: var(--brand-light); overflow: hidden; }
.cms-card-img img { width: 100%; height: 100%; object-fit: cover; }
.cms-img-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 40px; color: var(--brand); opacity: .5; background: var(--brand-light); }
.cms-img-ph-lg { font-size: 72px; }
.cms-card-body { padding: 12px 14px; min-height: 86px; display: flex; flex-direction: column; }
.cms-card-body h3 { font-size: 16px; margin-bottom: 2px; }
.cms-card-body p { font-size: 13px; color: var(--text-weak); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============ 列表（资讯） ============ */
.cms-list { display: flex; flex-direction: column; gap: 12px; }
.cms-list-item { display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px; }
.cms-list-thumb { width: 104px; height: 78px; border-radius: 8px; overflow: hidden; flex-shrink: 0; background: var(--brand-light); }
.cms-list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cms-list-thumb .cms-img-ph { font-size: 26px; }
.cms-list-body h3 { font-size: 15px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cms-list-body time { font-size: 12px; color: var(--text-weak); }

/* ============ Tabs（资讯分类） ============ */
.cms-tabs { display: flex; gap: 8px; margin-bottom: 18px; overflow-x: auto; padding-bottom: 4px; }
.cms-cat-tabs { flex-wrap: wrap; }
@media (min-width: 1200px) { .cms-cat-tabs a { padding: 7px 22px; font-size: 14px; } }
.cms-tabs a { padding: 6px 16px; border-radius: 999px; font-size: 13px; background: var(--surface); border: 1px solid var(--border); color: var(--text); white-space: nowrap; transition: border-color .15s, color .15s, background .15s; }
.cms-tabs a:hover { border-color: var(--brand); color: var(--brand); }
.cms-tabs a.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ============ 资讯卡片 ============ */
.cms-news-tag {
    position: absolute; left: 12px; top: 12px;
    padding: 2px 12px; border-radius: 999px;
    background: rgba(255,255,255,.92); color: var(--brand);
    font-size: 12px; letter-spacing: 1px;
}
.cms-card-img { position: relative; }
.cms-news-card .cms-card-body h3 {
    font-size: 15px; line-height: 1.5; min-height: 45px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cms-news-date { font-size: 12px; color: var(--text-weak); }

/* ============ 空状态 ============ */
.cms-empty { text-align: center; padding: 44px 16px; color: var(--text-weak); background: var(--surface); border: 1px dashed var(--border); border-radius: 12px; font-size: 14px; }
.cms-empty-lg { padding: 60px 16px; }
.cms-empty-lg h2 { color: var(--text); margin: 12px 0 6px; font-size: 19px; }
.cms-empty-lg .cms-btn { margin-top: 18px; }
.cms-empty-icon { font-size: 44px; }
.cms-empty small { opacity: .8; }

/* ============ 详情页 ============ */
/* 富文本小标题自动编号 */
.cms-detail-content { counter-reset: cmssec; }
.cms-detail-content h3 { padding-left: 46px; }
.cms-detail-content h3::before {
    content: "0" counter(cmssec); counter-increment: cmssec;
    position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    font-size: 15px; font-weight: 700; color: var(--gold);
    letter-spacing: 1px; line-height: 1;
}
.cms-detail-content h3::after {
    content: ""; position: absolute; left: 26px; top: 50%; transform: translateY(-50%);
    width: 3px; height: 14px; border-radius: 2px; background: var(--brand);
}

/* ============ 右侧悬浮咨询条（仅PC） ============ */
.cms-float-contact {
    display: none; position: fixed; right: 0; top: 46%; z-index: 55;
    flex-direction: column; gap: 1px;
    background: var(--surface); border: 1px solid var(--border); border-right: 0;
    border-radius: 10px 0 0 10px; overflow: hidden;
    box-shadow: 0 6px 24px rgba(0,0,0,.10);
}
.cms-float-contact a {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 14px; font-size: 13px; color: var(--text);
    transition: background .15s;
}
.cms-float-contact a:hover { background: var(--brand-light); color: var(--brand); }
.cms-float-contact span { font-size: 18px; }
.cms-float-contact i { font-style: normal; display: none; }
.cms-float-contact a:hover i { display: inline; }
@media (min-width: 1200px) {
    .cms-float-contact { display: flex; right: 14px; }
}

.cms-detail-hero { display: flex; flex-direction: column; gap: 18px; }
.cms-detail-head h1 { font-size: 24px; margin: 10px 0 8px; line-height: 1.35; }
.cms-detail-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.cms-tag {
    display: inline-block; padding: 3px 14px; border-radius: 999px;
    background: var(--brand); color: #fff; font-size: 12px; letter-spacing: 1px;
}
.cms-tag-ghost { background: transparent; color: var(--brand); border: 1px solid var(--brand); }
.cms-detail-cta {
    margin-top: 18px; padding: 16px; border-radius: 12px;
    background: var(--brand-light); border: 1px solid var(--border);
    display: flex; flex-direction: column; gap: 12px;
}
.cms-detail-cta-txt strong { display: block; font-size: 16px; color: var(--brand-dark); }
.cms-detail-cta-txt span { font-size: 13px; color: var(--text-weak); }
.cms-detail-cta-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.cms-detail-cta-btns .cms-btn { min-width: 150px; }
/* 正文（纯文本，回车换行自动分段，与图集左对齐） */
.cms-detail-content { font-size: 15px; margin-top: 22px; color: var(--text); line-height: 1.9; }
/* 同类推荐 */
.cms-related { margin-top: 34px; padding-top: 8px; }

@media (min-width: 1200px) {
    .cms-detail-hero { flex-direction: row; align-items: stretch; gap: 30px; }
    .cms-detail-cover { flex: 0 0 46%; margin-bottom: 0; align-self: flex-start; }
    .cms-detail-head { flex: 1; padding-top: 8px; }
    .cms-detail-head h1 { font-size: 30px; margin-top: 12px; }
    .cms-detail-content { font-size: 16px; margin-top: 30px; }
    .cms-detail-cta { margin-top: 24px; padding: 20px; flex-direction: row; align-items: center; justify-content: space-between; }
    .cms-related { margin-top: 46px; }
}
.cms-breadcrumb { font-size: 13px; color: var(--text-weak); margin-bottom: 14px; }
.cms-breadcrumb a { color: var(--brand); }
.cms-detail { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.cms-detail h1 { font-size: 22px; margin: 10px 0 8px; line-height: 1.4; }
.cms-detail-sub { color: var(--brand); font-size: 14px; margin-bottom: 14px; }
.cms-detail-meta { font-size: 13px; color: var(--text-weak); margin-bottom: 16px; display: flex; gap: 8px; align-items: center; }
.cms-detail-meta time { color: var(--brand); }
.cms-detail-cover { border-radius: 10px; overflow: hidden; margin-bottom: 16px; background: var(--brand-light); }
.cms-video { margin-bottom: 16px; border-radius: 10px; overflow: hidden; background: #000; }
.cms-video video { width: 100%; display: block; }
.cms-detail-content { font-size: 15px; }
.cms-back { margin-top: 18px; }

/* ============ 分页 ============ */
.cms-pagination { margin: 22px 0 10px; text-align: center; }
.cms-pagination ul { display: inline-flex; gap: 6px; list-style: none; flex-wrap: wrap; justify-content: center; }
.cms-pagination li a, .cms-pagination li span {
    display: inline-block; min-width: 34px; padding: 5px 10px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 6px;
    font-size: 13px; color: var(--text-weak);
}
.cms-pagination li.active span { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ============ 登录页 ============ */
.cms-auth { padding-top: 28px; }
.cms-auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 26px 20px; }
.cms-auth-head { text-align: center; margin-bottom: 22px; }
.cms-auth-head h2 { font-size: 20px; margin: 12px 0 8px; }
.cms-auth-head p { font-size: 13px; color: var(--text-weak); line-height: 1.6; }
.cms-form-item { margin-bottom: 16px; }
.cms-form-item label { display: block; font-size: 13px; color: var(--text-weak); margin-bottom: 6px; }
.cms-form-item input {
    width: 100%; height: 46px; padding: 0 14px;
    border: 1px solid var(--border); border-radius: 8px;
    font-size: 16px; background: var(--bg); color: var(--text);
    outline: none; transition: border .15s;
}
.cms-form-item input:focus { border-color: var(--brand); background: var(--surface); }
.cms-code-row { display: flex; gap: 10px; }
.cms-code-row input { flex: 1; }
.cms-code-row .cms-btn { white-space: nowrap; height: 46px; padding: 0 16px; }
.cms-code-tip { font-size: 12px; color: var(--brand); margin-top: 6px; min-height: 16px; }
.cms-auth-other { margin-top: 24px; }
.cms-auth-divider { text-align: center; font-size: 12px; color: var(--text-weak); position: relative; margin-bottom: 14px; }
.cms-auth-divider span { background: var(--surface); padding: 0 12px; position: relative; z-index: 1; }
.cms-auth-divider::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--border); }
.cms-auth-btns { display: flex; gap: 10px; justify-content: center; }
.cms-auth-alt {
    flex: 1; text-align: center; padding: 10px; border-radius: 8px;
    border: 1px dashed var(--border); font-size: 14px; color: var(--text-weak);
}

/* ============ 会员中心 ============ */
.cms-member-card {
    display: flex; align-items: center; gap: 14px;
    background: var(--hero-bg); color: var(--hero-text);
    border-radius: 14px; padding: 20px 18px; margin-bottom: 16px;
}
.cms-member-avatar { width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center; font-size: 24px; overflow: hidden; flex-shrink: 0; }
.cms-member-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cms-member-info { flex: 1; min-width: 0; }
.cms-member-info h2 { font-size: 19px; display: flex; flex-direction: column; }
.cms-member-info h2 small { font-size: 13px; font-weight: 400; opacity: .8; }
.cms-member-info p { font-size: 12px; opacity: .75; }
.cms-member-logout { font-size: 12px; opacity: .8; border: 1px solid rgba(255,255,255,.4); border-radius: 999px; padding: 4px 12px; }
.cms-stat-row { display: flex; gap: 12px; margin-bottom: 16px; }
.cms-stat {
    flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    text-align: center; padding: 16px 8px;
}
.cms-stat strong { display: block; font-size: 26px; color: var(--brand); }
.cms-stat span { font-size: 13px; color: var(--text-weak); }
.cms-menu { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.cms-menu-item { display: flex; align-items: center; gap: 12px; padding: 15px 16px; border-bottom: 1px solid var(--border); font-size: 15px; }
.cms-menu-item:last-child { border-bottom: 0; }
.cms-menu-item:active { background: var(--brand-light); }
.cms-menu-ico { font-size: 18px; }
.cms-menu-item i { margin-left: auto; font-style: normal; color: var(--text-weak); font-size: 18px; }

/* ============ 购买记录 ============ */
.cms-purchase-list { display: flex; flex-direction: column; gap: 10px; }
.cms-purchase-item { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.cms-purchase-item h3 { font-size: 16px; }
.cms-purchase-item h3 small { font-size: 12px; color: var(--text-weak); font-weight: 400; margin-left: 8px; }
.cms-purchase-meta { font-size: 13px; color: var(--text-weak); margin-top: 4px; }
.cms-purchase-remark { font-size: 12px; color: var(--text-weak); margin-top: 4px; }

/* ============ 积分 ============ */
.cms-points-hero {
    text-align: center; background: var(--hero-bg); color: var(--hero-text);
    border-radius: 14px; padding: 26px 16px; margin-bottom: 22px;
}
.cms-points-hero span { font-size: 13px; opacity: .8; }
.cms-points-hero strong { display: block; font-size: 44px; font-weight: 700; letter-spacing: 1px; }
.cms-points-list { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.cms-points-item { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.cms-points-item:last-child { border-bottom: 0; }
.cms-points-info h3 { font-size: 14px; font-weight: 500; }
.cms-points-info time { font-size: 12px; color: var(--text-weak); }
.cms-points-num { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cms-points-num.inc { color: var(--brand); }
.cms-points-num.dec { color: #C0564A; }

/* ============ 联系我们 ============ */
.cms-contact-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.cms-contact-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 22px 16px; text-align: center; }
.cms-contact-ico { font-size: 30px; margin-bottom: 8px; }
.cms-contact-card h3 { font-size: 15px; margin-bottom: 4px; }
.cms-contact-card p { font-size: 15px; color: var(--brand); word-break: break-all; }
.cms-contact-qrcode { width: 180px; margin: 8px auto 0; }
.cms-contact-wide { grid-column: 1 / -1; }
@media (min-width: 1200px) { .cms-contact-wide { grid-column: span 2; } }

/* ============ 页脚 ============ */
.cms-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 26px 0 90px; text-align: center; }
.cms-footer-brand { font-size: 15px; font-weight: 600; letter-spacing: 1px; margin-bottom: 8px; }
.cms-footer-line { font-size: 13px; color: var(--text-weak); margin: 2px 0; }
.cms-footer-copy { font-size: 12px; color: var(--text-weak); margin-top: 10px; }

/* ============ 手机底部导航 ============ */
.cms-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    display: flex; background: var(--surface);
    border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom);
}
.cms-tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 7px 0 5px; font-size: 11px; color: var(--text-weak);
}
.cms-tabbar a.active { color: var(--brand); }
.cms-tabbar svg { width: 22px; height: 22px; }

/* ============================================================
   响应式：≥768px 桌面宽屏
   ============================================================ */
@media (min-width: 768px) {
    .cms-container { max-width: 1140px; padding: 0 28px; }
    .cms-narrow { max-width: 780px; }
    .cms-header-inner { height: 68px; }
    .cms-nav { display: flex; }
    .cms-tabbar { display: none; }
    .cms-footer { padding-bottom: 30px; }
    .cms-hero { padding: 88px 0 96px; }
    .cms-hero h1 { font-size: 44px; }
    .cms-hero-sub { font-size: 17px; }
    .cms-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
    .cms-section { padding: 52px 0 12px; }
    .cms-section-head h2 { font-size: 24px; }
    .cms-contact-grid { grid-template-columns: repeat(2, 1fr); }
    .cms-auth { max-width: 460px; margin: 0 auto; }
    .cms-detail { padding: 28px; }
    .cms-stat strong { font-size: 32px; }
}
@media (min-width: 768px) and (max-width: 1023px) {
    .cms-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1200px) {
    .cms-container { max-width: 1280px; }
    .cms-container.cms-detail-wrap { max-width: 1140px; }
    .cms-narrow { max-width: 860px; }
    .cms-grid { grid-template-columns: repeat(3, 1fr); gap: 22px; }
    .cms-contact-grid { grid-template-columns: repeat(4, 1fr); }
    .cms-section-head { max-width: 1280px; }
}

/* 产品图轮播（封面位：封面图+图集） */
.cms-carousel { position: relative; }
.cms-carousel-track { display: flex; transition: transform .3s ease; }
.cms-carousel-slide { flex: 0 0 100%; aspect-ratio: 4 / 3; background: var(--brand-light); }
.cms-carousel-slide img { width: 100%; height: 100%; object-fit: contain; display: block; cursor: zoom-in; }
.cms-carousel-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px;
    border: none; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--text);
    font-size: 22px; line-height: 1; cursor: pointer; box-shadow: 0 1px 6px rgba(0, 0, 0, .18);
}
.cms-carousel-arrow:hover { background: #fff; }
.cms-carousel-prev { left: 10px; }
.cms-carousel-next { right: 10px; }
.cms-carousel-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; }
.cms-carousel-dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(0, 0, 0, .22); cursor: pointer; }
.cms-carousel-dots span.on { background: var(--brand); }
.cms-carousel-count { position: absolute; right: 10px; top: 10px; background: rgba(0, 0, 0, .45); color: #fff; font-size: 12px; padding: 2px 9px; border-radius: 10px; }

/* 图片灯箱（点击轮播图放大） */
.cms-lightbox { position: fixed; inset: 0; z-index: 9999; background: rgba(20, 16, 10, .9); display: flex; align-items: center; justify-content: center; padding: 22px; cursor: zoom-out; }
.cms-lightbox[hidden] { display: none; }
.cms-lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: 0 12px 48px rgba(0, 0, 0, .5); }

/* 积分规则卡片 */
.cms-rule-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; margin-bottom: 20px; }
.cms-rule-card h3 { font-size: 16px; margin: 0 0 8px; color: var(--brand-dark); }
.cms-rule-card .cms-rule-body { font-size: 14px; color: var(--text); line-height: 1.9; }
