/* ============================================================
 * LXMall mall.css v2（v1.8.0 全站视觉重构）
 * 设计语言：参考京东/天猫的信息密度 + Apple 的留白层次 + Shopify 的现代组件
 *  - 全 CSS 变量驱动，主题（classic/dark/fashion/...）仅覆盖变量与少量规则
 *  - 兼容保留全部历史类名（v1.5/1.6/1.8 已有模板零改动可用）
 * 依赖：Bootstrap 5.3
 * ============================================================ */

:root {
    /* 品牌色 */
    --ftm-primary: #4f46e5;
    --ftm-primary-dark: #4338ca;
    --ftm-primary-grad: linear-gradient(135deg, #6366f1 0%, #4f46e5 55%, #4338ca 100%);
    --ftm-price: #e52d27;
    --ftm-urgent: #e11d2f; /* v1.8.2：营销紧迫色（倒计时/秒杀价），暗色主题覆盖 */
    --ftm-accent: #f59e0b;

    /* 语义色 */
    --ftm-success: #16a34a;
    --ftm-danger: #dc2626;
    --ftm-info: #0ea5e9;

    /* 表面与文本 */
    --ftm-bg: #f5f6fa;
    --ftm-surface: #ffffff;
    --ftm-surface-2: #f8fafc;
    --ftm-border: #e8eaf0;
    --ftm-border-strong: #d9dce6;
    --ftm-text: #1f2333;
    --ftm-text-2: #5b6478;
    --ftm-text-3: #9aa3b5;

    /* 深色顶条 / 页脚 */
    --ftm-dark: #101322;
    --ftm-dark-2: #181c30;

    /* 几何 */
    --ftm-radius: 14px;
    --ftm-radius-sm: 10px;
    --ftm-radius-lg: 20px;

    /* 阴影层级 */
    --ftm-shadow-1: 0 1px 2px rgba(16,19,34,.04), 0 2px 8px rgba(16,19,34,.04);
    --ftm-shadow-2: 0 4px 12px rgba(16,19,34,.06), 0 12px 28px rgba(16,19,34,.08);
    --ftm-shadow-3: 0 8px 24px rgba(16,19,34,.10), 0 24px 56px rgba(16,19,34,.12);

    /* 头部 */
    --ftm-header-h: 68px;
}

html { scroll-behavior: smooth; }

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--ftm-bg);
    color: var(--ftm-text);
    -webkit-font-smoothing: antialiased;
}

main { flex: 1 0 auto; }

a { text-decoration: none; }
a:hover { text-decoration: none; }

::selection { background: rgba(79,70,229,.18); }

/* Bootstrap 主按钮品牌化 */
.btn-primary {
    background: var(--ftm-primary-grad);
    border: 0;
    box-shadow: 0 4px 14px rgba(79,70,229,.28);
    transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
}
.btn-primary:hover, .btn-primary:focus {
    background: var(--ftm-primary-grad);
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(79,70,229,.38);
}
.btn-primary:active { transform: translateY(0); }
.btn-outline-primary {
    color: var(--ftm-primary);
    border-color: rgba(79,70,229,.45);
}
.btn-outline-primary:hover {
    background: var(--ftm-primary);
    border-color: var(--ftm-primary);
}
.text-primary { color: var(--ftm-primary) !important; }
.form-control:focus, .form-select:focus {
    border-color: rgba(99,102,241,.55);
    box-shadow: 0 0 0 .2rem rgba(99,102,241,.12);
}
.dropdown-item.active, .dropdown-item:active { background-color: var(--ftm-primary); }

/* ============================================================
 * 顶部导航（三段式：顶条 + 主栏 + 分类条）
 * ============================================================ */
.site-header {
    background: var(--ftm-surface);
    border-bottom: 1px solid var(--ftm-border);
    box-shadow: 0 1px 10px rgba(15,23,42,.03);
}

/* ---- 顶条 ---- */
.topstrip {
    background: var(--ftm-dark);
    color: rgba(255,255,255,.82);
    font-size: .78rem;
}
.topstrip a { color: rgba(255,255,255,.78); }
.topstrip a:hover { color: #fff; }
.topstrip .divider { opacity: .25; margin: 0 .55rem; }
.topstrip .bi { font-size: .82rem; }

/* ---- 主栏 ---- */
.brand-logo { height: 40px; width: auto; max-width: 180px; object-fit: contain; }

.search-form {
    max-width: 460px;
    display: flex;
    width: 100%;
    border: 2px solid var(--ftm-primary);
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 3px 12px rgba(79,70,229,.10);
}
.search-form .form-control {
    border: 0;
    box-shadow: none;
    border-radius: 0;
    padding: .55rem 1.1rem;
    font-size: .92rem;
}
.search-form .btn {
    border-radius: 0;
    padding: .35rem 1.25rem;
}
.search-form .btn i { font-size: 1.05rem; }

/* 主栏图标按钮 */
.header-icon-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: .12rem;
    color: var(--ftm-text-2);
    font-size: .68rem;
    padding: .3rem .55rem;
    border-radius: 10px;
    transition: color .15s ease, background .15s ease;
    white-space: nowrap;
}
.header-icon-btn i { font-size: 1.18rem; }
.header-icon-btn:hover { color: var(--ftm-primary); background: rgba(79,70,229,.07); }

/* ---- 分类导航条 ---- */
.catnav {
    background: var(--ftm-surface);
    border-top: 1px solid var(--ftm-border);
    border-bottom: 1px solid var(--ftm-border);
}
.catnav-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--ftm-text);
    font-size: .9rem;
    font-weight: 600;
    padding: .68rem .95rem;
    position: relative;
    white-space: nowrap;
}
.catnav-link i { color: var(--ftm-primary); font-size: .95rem; }
.catnav-link:hover, .catnav-link.active { color: var(--ftm-primary); }
.catnav-link:hover::after, .catnav-link.active::after {
    content: "";
    position: absolute;
    left: .95rem; right: .95rem; bottom: -1px;
    height: 2.5px;
    border-radius: 2px 2px 0 0;
    background: var(--ftm-primary-grad);
}
.catnav-scroll { display: flex; overflow-x: auto; scrollbar-width: none; }
.catnav-scroll::-webkit-scrollbar { display: none; }

/* v1.8.2：分类导航条布局（「全部分类」下拉移出滚动容器，修复下拉被裁剪） */
.catnav-bar { display: flex; align-items: stretch; gap: .35rem; }
.catnav-all { flex: 0 0 auto; }
.catnav-bar .catnav-scroll { flex: 1 1 auto; min-width: 0; }
.catnav .dropdown-menu { min-width: 13rem; padding-bottom: .55rem; }
.catnav .dropdown-item strong { font-weight: 600; }

/* v1.8.2 收尾：移动端主导航（汉堡菜单内，catnav 仅桌面的补位） */
@media (max-width: 991.98px) {
    .navbar-collapse.show { display: flex; flex-direction: column; align-items: stretch; }
    .navbar-collapse.show .search-form { width: 100%; }
    .navbar-collapse.show .search-form .form-control { flex: 1 1 auto; min-width: 0; }
}
.wm-mobile-nav { border-top: 1px solid var(--ftm-border); margin-top: .65rem; padding: .3rem 0; }
.wm-mobile-nav a {
    display: flex; align-items: center; gap: .6rem;
    padding: .6rem .2rem; color: var(--ftm-text-2);
    font-size: .95rem; font-weight: 500; text-decoration: none;
    border-bottom: 1px dashed var(--ftm-border);
}
.wm-mobile-nav a:last-child { border-bottom: 0; }
.wm-mobile-nav a:active, .wm-mobile-nav a:hover { color: var(--ftm-primary); }
.wm-mobile-nav a i { color: var(--ftm-primary); font-size: 1rem; }

/* 二级下拉（分类子菜单） */
.dropdown-submenu { position: relative; }
.dropdown-submenu > .dropdown-menu.sub {
    top: 0;
    left: 100%;
    margin-top: -1px;
    display: none;
    box-shadow: var(--ftm-shadow-2);
    border-radius: var(--ftm-radius-sm);
}
.dropdown-submenu:hover > .dropdown-menu.sub { display: block; }
.dropdown-submenu > .dropdown-item::after {
    content: "\F285";
    font-family: "bootstrap-icons";
    float: right;
    font-size: .7rem;
    line-height: 1.6;
    opacity: .55;
}

/* ============================================================
 * 首页 Hero
 * ============================================================ */
.hero-banner {
    min-height: 380px;
    background: linear-gradient(120deg, #0f172a 0%, #312e81 55%, #6366f1 100%);
    background-size: cover;
    position: relative;
    overflow: hidden;
}
.hero-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(720px 300px at 88% 18%, rgba(99,102,241,.35), transparent 65%),
        radial-gradient(520px 260px at 12% 85%, rgba(14,165,233,.18), transparent 60%);
    pointer-events: none;
}
.hero-tag {
    display: inline-flex;
    align-items: center;
    padding: .4rem 1rem;
    border-radius: 2rem;
    background: rgba(99,102,241,.28);
    border: 1px solid rgba(148,163,255,.5);
    font-size: .8rem;
    letter-spacing: .06em;
    backdrop-filter: blur(4px);
}

/* ---- 服务保障条 ---- */
.service-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .8rem;
}
.service-item {
    display: flex;
    align-items: center;
    gap: .8rem;
    background: var(--ftm-surface);
    border: 1px solid var(--ftm-border);
    border-radius: var(--ftm-radius);
    padding: .9rem 1.05rem;
    box-shadow: var(--ftm-shadow-1);
    transition: transform .18s ease, box-shadow .18s ease;
}
.service-item:hover { transform: translateY(-2px); box-shadow: var(--ftm-shadow-2); }
.service-item .svc-ico {
    width: 42px; height: 42px;
    flex: 0 0 auto;
    border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
    color: #fff;
}
.service-item:nth-child(1) .svc-ico { background: linear-gradient(135deg, #6366f1, #4338ca); }
.service-item:nth-child(2) .svc-ico { background: linear-gradient(135deg, #06b6d4, #0e7490); }
.service-item:nth-child(3) .svc-ico { background: linear-gradient(135deg, #f59e0b, #d97706); }
.service-item:nth-child(4) .svc-ico { background: linear-gradient(135deg, #10b981, #047857); }
.service-item b { display: block; font-size: .9rem; color: var(--ftm-text); }
.service-item span { font-size: .76rem; color: var(--ftm-text-3); }

/* ============================================================
 * 区块标题
 * ============================================================ */
.section-title {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin-bottom: 1.35rem;
    font-size: 1.38rem;
    font-weight: 800;
    color: var(--ftm-text);
    letter-spacing: .01em;
}
.section-title::before {
    content: "";
    width: 5px;
    height: 1.35em;
    border-radius: 4px;
    background: var(--ftm-primary-grad);
    flex: 0 0 auto;
}
.section-title > span { white-space: nowrap; }
.section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--ftm-border-strong), transparent);
}

/* ============================================================
 * 商品卡片（首页/列表通用）
 * ============================================================ */
.product-card {
    border: 1px solid var(--ftm-border);
    border-radius: var(--ftm-radius);
    overflow: hidden;
    background: var(--ftm-surface);
    box-shadow: var(--ftm-shadow-1);
    transition: box-shadow .22s ease, transform .22s ease, border-color .22s ease;
    position: relative;
}
.product-card:hover {
    box-shadow: var(--ftm-shadow-3);
    transform: translateY(-4px);
    border-color: transparent;
    z-index: 2;
}

.product-thumb {
    display: block;
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--ftm-surface-2);
    overflow: hidden;
}
.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s cubic-bezier(.2,.7,.3,1);
}
.product-card:hover .product-thumb img { transform: scale(1.07); }

.product-thumb .badge-wrap {
    position: absolute;
    top: .55rem;
    left: .55rem;
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    z-index: 2;
}
/* v1.8.2：NEW/HOT 精致化 —— 深色玻璃胶囊降低彩度噪音，与类型徽章拉开层级 */
.product-thumb .badge {
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .06em;
    padding: .26rem .55rem;
    border-radius: 999px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,.28);
    box-shadow: 0 2px 8px rgba(15,23,42,.16);
}
.product-thumb .badge.bg-success {
    background: rgba(31,35,51,.72);
    color: #fff;
}
.product-thumb .badge.bg-danger {
    background: linear-gradient(135deg, #f43f5e, #e11d48);
    color: #fff;
}

/* 悬浮快捷条（仅桌面） */
.product-quickbar {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    transform: translateY(100%);
    background: linear-gradient(180deg, transparent, rgba(16,19,34,.78) 38%);
    padding: 1.6rem .8rem .7rem;
    display: flex;
    gap: .5rem;
    justify-content: center;
    transition: transform .25s ease;
    z-index: 3;
}
.product-card:hover .product-quickbar { transform: translateY(0); }
.product-quickbar .btn {
    border-radius: 999px;
    font-size: .78rem;
    padding: .32rem .9rem;
}
@media (hover: none) { .product-quickbar { display: none; } }

.product-title {
    display: block;
    color: var(--ftm-text);
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.5;
    max-height: 2.7em;
    overflow: hidden;
    margin-bottom: .2rem;
    transition: color .15s ease;
}
.product-title:hover { color: var(--ftm-primary); }

.price {
    color: var(--ftm-price);
    font-weight: 800;
    font-size: 1.12rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.01em;
}

/* ============================================================
 * 资讯卡片
 * ============================================================ */
.news-card {
    border: 1px solid var(--ftm-border);
    border-radius: var(--ftm-radius);
    overflow: hidden;
    background: var(--ftm-surface);
    box-shadow: var(--ftm-shadow-1);
    transition: box-shadow .2s ease, transform .2s ease;
}
.news-card:hover { box-shadow: var(--ftm-shadow-2); transform: translateY(-2px); }
.news-cover {
    display: block;
    aspect-ratio: 16 / 9;
    background: var(--ftm-surface-2);
    overflow: hidden;
}
.news-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}
.news-card:hover .news-cover img { transform: scale(1.05); }
.news-title { color: var(--ftm-text); font-weight: 600; font-size: .9rem; }
.news-title:hover { color: var(--ftm-primary); }
.news-meta { color: var(--ftm-text-3); font-size: .76rem; }
.news-summary { color: var(--ftm-text-2); font-size: .84rem; line-height: 1.6; }

/* ============================================================
 * 文章正文
 * ============================================================ */
.article-content, .rich-text {
    color: var(--ftm-text); /* v1.8.2：原硬编码 #334155 在暗色主题下不可见 */
    font-size: .96rem;
    line-height: 1.9;
    word-break: break-word;
}
.article-content img, .rich-text img { max-width: 100%; height: auto; border-radius: .5rem; }
.article-content p, .rich-text p { margin-bottom: .9rem; }

/* ============================================================
 * 商品详情
 * ============================================================ */
.gallery-main {
    border: 1px solid var(--ftm-border);
    border-radius: var(--ftm-radius);
    overflow: hidden;
    background: var(--ftm-surface-2);
    aspect-ratio: 1 / 1;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumbs img {
    width: 64px; height: 64px;
    object-fit: cover;
    border-radius: var(--ftm-radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    background: var(--ftm-surface-2);
    transition: border-color .15s ease;
}
.gallery-thumbs img:hover, .gallery-thumbs img.active { border-color: var(--ftm-primary); }

.price-panel {
    background: linear-gradient(135deg, rgba(79,70,229,.06), rgba(14,165,233,.05));
    border: 1px solid rgba(79,70,229,.14);
    border-radius: var(--ftm-radius-sm);
    padding: .95rem 1.1rem;
}

/* 规格选择 */
.spec-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .38rem .95rem;
    font-size: .85rem;
    border: 1.5px solid var(--ftm-border-strong);
    border-radius: 2rem;
    background: var(--ftm-surface);
    color: var(--ftm-text); /* v1.8.2：原硬编码 #334155 在暗色主题下不可见 */
    transition: all .15s ease;
}
.spec-btn:hover { border-color: var(--ftm-primary); color: var(--ftm-primary-dark); }
.spec-btn.active {
    border-color: var(--ftm-primary);
    color: var(--ftm-primary-dark);
    background: rgba(99,102,241,.08);
    box-shadow: 0 0 0 1px var(--ftm-primary) inset;
    font-weight: 600;
}
.spec-btn.disabled { opacity: .35; pointer-events: none; }
.color-dot {
    width: 14px; height: 14px;
    border-radius: 50%;
    display: inline-block;
    border: 1px solid rgba(0,0,0,.15);
}

/* 详情页保障图标行 */
.assurance-row {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem 1.4rem;
    color: var(--ftm-text-2);
    font-size: .82rem;
}
.assurance-row .bi { color: var(--ftm-success); }

/* ============================================================
 * 支付/收银台
 * ============================================================ */
.gateway-option {
    border: 1.5px solid var(--ftm-border);
    border-radius: var(--ftm-radius-sm);
    cursor: pointer;
    transition: all .15s ease;
    background: var(--ftm-surface);
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .8rem .95rem;
}
.gateway-option:hover { border-color: var(--ftm-primary); box-shadow: var(--ftm-shadow-1); }
.gateway-option:has(input:checked) {
    border-color: var(--ftm-primary);
    background: rgba(99,102,241,.06);
    box-shadow: 0 0 0 1px var(--ftm-primary) inset;
}
.gateway-option .gw-name { font-weight: 600; font-size: .9rem; color: var(--ftm-text); }

/* v1.8.1 收银台支付方式 TAB（共享组件 .pay-tabs） */
.pay-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}
.pay-tab {
    flex: 1 1 30%;
    min-width: 6.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    border: 1.5px solid var(--ftm-border);
    border-radius: var(--ftm-radius-sm);
    background: var(--ftm-surface);
    color: var(--ftm-text-2);
    padding: .68rem .6rem;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s ease, color .15s ease, box-shadow .15s ease, background .15s ease;
}
.pay-tab img { width: 22px; height: 22px; display: block; }
.pay-tab i { font-size: 1.3rem; line-height: 1; }
.pay-tab .pt-name { white-space: nowrap; }
.pay-tab:hover { border-color: var(--ftm-primary); color: var(--ftm-text); box-shadow: var(--ftm-shadow-1); }
.pay-tab.active {
    border-color: var(--ftm-primary);
    color: var(--ftm-primary);
    background: rgba(99, 102, 241, .07);
    box-shadow: 0 0 0 1px var(--ftm-primary) inset;
}
.pay-tab:focus-visible { outline: 2px solid var(--ftm-primary); outline-offset: 2px; }
.pay-tab-hint {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-top: .65rem;
    font-size: .8rem;
    color: var(--ftm-text-2);
}
.pay-tab-hint .bi { color: var(--ftm-primary); }
@media (max-width: 575.98px) {
    .pay-tab { flex: 1 1 45%; min-width: 5.4rem; font-size: .84rem; padding: .6rem .4rem; }
    .pay-tab img { width: 18px; height: 18px; }
    .pay-tab i { font-size: 1.15rem; }
}

/* 收银台摘要卡 */
.checkout-summary {
    background: var(--ftm-surface);
    border: 1px solid var(--ftm-border);
    border-radius: var(--ftm-radius);
    box-shadow: var(--ftm-shadow-1);
    overflow: hidden;
}
.checkout-summary .sum-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .55rem 1.2rem;
    font-size: .9rem;
    color: var(--ftm-text-2);
}
.checkout-summary .sum-row b { color: var(--ftm-text); font-variant-numeric: tabular-nums; }
.checkout-summary .sum-total {
    border-top: 1px dashed var(--ftm-border-strong);
    background: var(--ftm-surface-2);
    font-size: 1.05rem;
    color: var(--ftm-text);
}
.checkout-summary .sum-total .amount {
    color: var(--ftm-price);
    font-weight: 800;
    font-size: 1.35rem;
    font-variant-numeric: tabular-nums;
}

/* ============================================================
 * 联系我们
 * ============================================================ */
.contact-icon {
    width: 46px; height: 46px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    background: rgba(79,70,229,.09);
    color: var(--ftm-primary);
}

/* ============================================================
 * 页脚
 * ============================================================ */
.site-footer {
    background: var(--ftm-dark);
    color: #c3cad9;
    margin-top: 3.5rem;
    position: relative;
}
/* v1.8.2：页脚品牌渐变顶边，从浅色内容区自然过渡 */
.site-footer::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--ftm-primary-grad);
    opacity: .85;
}
.site-footer a { color: #9aa3b8; transition: color .15s ease; }
.site-footer a:hover { color: #fff; }
.site-footer .h5 { color: #fff; font-weight: 700; }
.site-footer hr { border-color: rgba(148,163,184,.16); opacity: 1; }
.footer-pay-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem;
}
.footer-pay-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
    color: #d5dbe8;
    border-radius: 8px;
    padding: .3rem .65rem;
    font-size: .78rem;
}
.footer-pay-badge i { font-size: .95rem; }

/* ============================================================
 * 分页 / 空状态
 * ============================================================ */
.pagination .page-link {
    border-radius: .5rem;
    margin: 0 2px;
    border: 1px solid var(--ftm-border);
    color: var(--ftm-text-2);
}
.pagination .page-item.active .page-link {
    background: var(--ftm-primary);
    border-color: var(--ftm-primary);
    color: #fff;
}
.empty-state { padding: 4rem 1rem; }

/* ============================================================
 * v1.5.0 组件：类型徽章 / 账户中心 / 地址 / 订单 / 课程
 * ============================================================ */
.type-badge {
    font-weight: 600;
    letter-spacing: .02em;
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    border-radius: 6px;
    padding: .28rem .55rem;
    font-size: .72rem;
    backdrop-filter: blur(3px);
}
.type-badge img { width: 13px; height: 13px; }
/* v1.8.2：类型徽章移入卡片信息区的上下文样式（图片上仅保留 NEW/HOT） */
.card-body .type-badge {
    font-size: .66rem;
    padding: .22rem .55rem;
    margin-bottom: .4rem;
    border-radius: 999px;
    backdrop-filter: none;
}
.type-badge.type-course  { background: rgba(79,70,229,.92); color: #fff; border: 1px solid rgba(99,102,241,.9); }
.type-badge.type-virtual { background: rgba(13,202,240,.92); color: #06303a; border: 1px solid rgba(13,202,240,.9); }
.type-badge.type-physical{ background: rgba(255,255,255,.94); color: #474f63; border: 1px solid var(--ftm-border-strong); }
.type-ico { width: 15px; height: 15px; vertical-align: -2px; }

/* ---- 账户中心 ---- */
.account-card {
    background: var(--ftm-surface);
    border: 1px solid var(--ftm-border);
    border-radius: var(--ftm-radius);
    box-shadow: var(--ftm-shadow-1);
}
.account-card-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: .95rem 1.3rem .55rem;
    font-weight: 700; color: var(--ftm-text);
}
.account-card-body { padding: .55rem 1.3rem 1.15rem; }
.account-avatar {
    width: 72px; height: 72px; font-size: 2rem; color: var(--ftm-primary);
    background: rgba(79,70,229,.09); border-radius: 50% !important;
}
.account-nav { display: flex; flex-direction: column; gap: .15rem; }
.account-nav-link {
    display: flex; align-items: center; gap: .65rem;
    padding: .65rem 1rem;
    border-radius: var(--ftm-radius-sm);
    color: var(--ftm-text-2);
    font-weight: 500;
    transition: all .18s ease;
}
.account-nav-link i { font-size: 1.05rem; }
.account-nav-link:hover { color: var(--ftm-primary); background: rgba(79,70,229,.07); }
.account-nav-link.active { color: var(--ftm-primary); background: rgba(79,70,229,.09); font-weight: 700; }
.stat-card { transition: transform .18s ease, box-shadow .18s ease; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--ftm-shadow-2); }
.stat-num { font-size: 1.65rem; font-weight: 800; color: var(--ftm-primary); line-height: 1.2; }
.stat-label { color: var(--ftm-text-2); font-size: .8rem; }
.order-row { display: block; border-bottom: 1px solid var(--ftm-border); }
.order-row:last-child { border-bottom: 0; }
.order-row:hover { background: rgba(79,70,229,.05); }
.order-item { transition: box-shadow .18s ease; border-radius: var(--ftm-radius-sm); }
.order-item:hover { box-shadow: var(--ftm-shadow-2); }
.order-item-head {
    display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
    padding: .7rem 1.25rem;
    border-bottom: 1px dashed var(--ftm-border);
}
.order-item-body { display: flex; align-items: center; padding: .9rem 1.25rem; color: var(--ftm-text); }
.order-item-body:hover { color: var(--ftm-text); }
.min-w-0 { min-width: 0; }
.ph-box { background: rgba(79,70,229,.08); color: var(--ftm-primary); display: flex; align-items: center; justify-content: center; }

/* ---- 订单时间线 ---- */
.order-timeline { display: flex; justify-content: space-between; padding: 0 1rem; }
.timeline-step { flex: 1; text-align: center; position: relative; }
.timeline-step:not(.first)::before {
    content: ''; position: absolute; top: 15px; right: 50%;
    width: 100%; height: 2px; background: var(--ftm-border);
}
.timeline-step.done:not(.first)::before { background: var(--ftm-primary); }
.timeline-dot {
    position: relative; z-index: 1; width: 32px; height: 32px; margin: 0 auto;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: var(--ftm-border); color: var(--ftm-text-2); font-size: .9rem;
}
.timeline-step.done .timeline-dot { background: var(--ftm-primary); color: #fff; }
.timeline-label { margin-top: .5rem; font-weight: 600; font-size: .85rem; color: var(--ftm-text); }
.timeline-step:not(.done) .timeline-label { color: var(--ftm-text-2); font-weight: 500; }
.timeline-time { font-size: .72rem; color: var(--ftm-text-3); }

/* ---- 地址卡片 ---- */
.address-card.is-default { border-color: var(--ftm-primary); box-shadow: 0 0 0 3px rgba(79,70,229,.09); }
.address-option { cursor: pointer; border: 1.5px solid var(--ftm-border); transition: all .15s ease; }
.address-option:hover { border-color: var(--ftm-primary); }
.address-option:has(input:checked) { border-color: var(--ftm-primary); background: rgba(79,70,229,.05); }

/* ---- 交付卡片 / 提示 ---- */
.delivery-card { border-left: 3px solid var(--ftm-primary); }
.delivery-note {
    padding: .8rem 1rem;
    border-radius: var(--ftm-radius-sm);
    background: rgba(79,70,229,.08);
    color: var(--ftm-primary-dark);
}

/* ---- 课程 ---- */
.course-cover { position: relative; aspect-ratio: 16/8.4; max-height: 430px; }
.course-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.course-cover::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.05) 40%, rgba(0,0,0,.45));
}
.course-cover-play {
    position: absolute; inset: 0; z-index: 2;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem;
    color: #fff; font-weight: 700; letter-spacing: .05em;
}
.course-cover-play i { font-size: 4.2rem; filter: drop-shadow(0 6px 18px rgba(0,0,0,.4)); transition: transform .18s ease; }
.course-cover-play:hover i { transform: scale(1.08); }
.course-buy-card {
    background: var(--ftm-surface); border: 1px solid var(--ftm-border);
    border-radius: var(--ftm-radius); padding: 1.25rem; box-shadow: var(--ftm-shadow-2);
}
.course-perks li { margin-bottom: .35rem; }
.course-player-wrap { background: #000; }
.course-player { display: block; max-height: 62vh; }
.lesson-panel {
    background: var(--ftm-surface); border: 1px solid var(--ftm-border);
    border-radius: var(--ftm-radius); overflow: hidden;
}
.lesson-panel-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: .9rem 1.1rem; font-weight: 700; border-bottom: 1px solid var(--ftm-border); color: var(--ftm-text);
}
.lesson-panel-body { max-height: 520px; overflow-y: auto; }
.lesson-panel-foot { padding: 1rem 1.1rem; border-top: 1px solid var(--ftm-border); }
.lesson-item {
    display: flex; align-items: center; gap: .8rem;
    padding: .8rem 1.1rem; text-decoration: none; color: var(--ftm-text);
    border-bottom: 1px solid var(--ftm-border); transition: background .15s ease;
}
.lesson-item:last-child { border-bottom: 0; }
.lesson-item:hover { background: rgba(79,70,229,.06); color: var(--ftm-text); }
.lesson-item.is-locked .lesson-title { color: var(--ftm-text-2); }
.lesson-item.is-active { background: rgba(79,70,229,.08); box-shadow: inset 3px 0 0 var(--ftm-primary); }
.lesson-item.is-active .lesson-index { color: var(--ftm-primary); }
.lesson-index { width: 26px; flex-shrink: 0; text-align: center; color: var(--ftm-text-2); font-weight: 700; font-size: .85rem; }
.lesson-title { flex: 1; min-width: 0; font-size: .92rem; }
.lesson-meta { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; color: var(--ftm-text-2); font-size: .78rem; }
.lesson-duration { font-variant-numeric: tabular-nums; }
.lesson-item.is-preview .lesson-index { color: var(--ftm-success); }
.object-fit-cover { object-fit: cover; }

/* ---- 物流轨迹（前台订单详情） ---- */
.shipment-timeline { padding-left: .2rem; }
.shipment-node { position: relative; padding: 0 0 1rem 1.5rem; border-left: 2px solid var(--ftm-border); margin-left: 6px; }
.shipment-node:last-child { border-left-color: transparent; padding-bottom: 0; }
.shipment-node .shipment-dot {
    position: absolute; left: -7px; top: 3px;
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--ftm-primary); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--ftm-primary);
}
.shipment-node:first-child .shipment-dot { background: var(--ftm-success); box-shadow: 0 0 0 1px var(--ftm-success); }

/* ---- 售后状态条 ---- */
.refund-status-flow { display: flex; flex-wrap: wrap; gap: .45rem; }
.refund-chip {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .32rem .8rem; border-radius: 999px;
    font-size: .8rem; font-weight: 600;
    background: var(--ftm-surface-2); color: var(--ftm-text-2);
    border: 1px solid var(--ftm-border);
}
.refund-chip.on { background: rgba(79,70,229,.1); color: var(--ftm-primary-dark); border-color: rgba(79,70,229,.35); }
.refund-chip.ok { background: rgba(22,163,74,.1); color: #15803d; border-color: rgba(22,163,74,.35); }

/* ---- 分销中心 ---- */
.dist-ref-box {
    display: flex; align-items: center; gap: .6rem;
    background: var(--ftm-surface-2);
    border: 1px dashed var(--ftm-border-strong);
    border-radius: var(--ftm-radius-sm);
    padding: .7rem .9rem;
    font-size: .88rem;
    word-break: break-all;
}

/* ============================================================
 * 响应式
 * ============================================================ */
@media (max-width: 575.98px) {
    .hero-banner { min-height: 250px; }
    .display-5 { font-size: 1.9rem; }
    .display-4 { font-size: 2.1rem; }
    .service-strip { grid-template-columns: repeat(2, 1fr); }
    .order-timeline { flex-wrap: wrap; gap: 1rem; }
    .timeline-step { flex: 1 1 40%; }
    .timeline-step:not(.first)::before { display: none; }
    .lesson-title { font-size: .85rem; }
    .section-title { font-size: 1.12rem; }
}

/* ============================================================
 * v1.8.0 字体颜色优化：对比度与层级
 * ============================================================ */
.product-title { color: var(--ftm-text); }
.product-title:hover { color: var(--ftm-primary-dark); }
.price { color: var(--ftm-price); }
.text-muted { color: var(--ftm-text-3) !important; }
.wm-slide-sub { color: rgba(255,255,255,.92); }
footer a { color: #9aa3b8; }
footer a:hover { color: #fff; }

/* v1.8.2：页脚友链标题对比度修复（原 --acc-text 深色落在深色页脚上） */
.wm-fl-title { color: #d5dbe8; }
.wm-friend-links a { color: #9aa3b8; }
.wm-friend-links a:hover { color: #fff; }

/* ============================================================
 * v1.8.2 Tooltip 浮层（ftm-ui.js 轻量实现配套）
 * ============================================================ */
.ftm-tooltip {
    position: fixed;
    z-index: 1080;
    background: #1f2333;
    color: #fff;
    font-size: .78rem;
    line-height: 1.4;
    padding: .38rem .65rem;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(15,23,42,.25);
    pointer-events: none;
    max-width: 260px;
    opacity: .96;
}
