/* ============================================================
 * LXMall v1.5.0 共享组件样式（跨主题）
 * 商品类型徽章 / 账户中心 / 收货地址 / 订单时间线 / 课程点播 / 收银台
 *
 * 非默认主题（classic/dark/fashion/minimal/tech）在各自主题 CSS
 * 之后加载本文件；各主题通过 --acc-* 变量注入自己的配色：
 *   --acc-accent      主强调色（默认 #4f46e5）
 *   --acc-accent-bg   强调色浅底（悬停/选中）
 *   --acc-surface     卡片面
 *   --acc-line        分隔线/描边
 *   --acc-text        主文字
 *   --acc-muted       次要文字
 *   --acc-radius      卡片圆角（默认 1rem）
 * ============================================================ */

.v150 {
    --acc-accent: #4f46e5;
    --acc-accent-bg: rgba(79, 70, 229, .08);
    --acc-surface: #ffffff;
    --acc-line: #e9ecef;
    --acc-text: #212529;
    --acc-muted: #6c757d;
    --acc-radius: 1rem;
    --acc-preview: #198754;
}

/* ---------- 商品类型徽章 ---------- */
.type-badge { font-weight: 600; letter-spacing: .02em; }
.type-badge.type-course  { background: rgba(79, 70, 229, .10); color: var(--acc-accent); border: 1px solid var(--acc-accent); }
.type-badge.type-virtual { background: rgba(13, 202, 240, .12); color: #0891b2; border: 1px solid rgba(13, 202, 240, .6); }
.type-badge.type-physical{ background: rgba(108, 117, 125, .10); color: var(--acc-muted); border: 1px solid var(--acc-line); }

/* ---------- 账户中心 ---------- */
.account-card {
    background: var(--acc-surface);
    border: 1px solid var(--acc-line);
    border-radius: var(--acc-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}
.account-card-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: .9rem 1.25rem .5rem; font-weight: 600; color: var(--acc-text);
}
.account-card-body { padding: .5rem 1.25rem 1.1rem; }
.account-avatar {
    width: 72px; height: 72px; font-size: 2rem; color: var(--acc-accent);
    background: var(--acc-accent-bg); 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: .6rem;
    color: var(--acc-muted); text-decoration: none; font-weight: 500;
    transition: all .18s ease;
}
.account-nav-link i { font-size: 1.05rem; }
.account-nav-link:hover { color: var(--acc-accent); background: var(--acc-accent-bg); }
.account-nav-link.active { color: var(--acc-accent); background: var(--acc-accent-bg); font-weight: 700; }
.stat-card { transition: transform .18s ease, box-shadow .18s ease; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0, 0, 0, .08); }
.stat-num { font-size: 1.6rem; font-weight: 800; color: var(--acc-accent); line-height: 1.2; }
.stat-label { color: var(--acc-muted); font-size: .8rem; }
.order-row { display: block; border-bottom: 1px solid var(--acc-line); }
.order-row:last-child { border-bottom: 0; }
.order-row:hover { background: var(--acc-accent-bg); }
.order-item { transition: box-shadow .18s ease; }
.order-item:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, .07); }
.order-item-head {
    display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
    padding: .7rem 1.25rem; border-bottom: 1px dashed var(--acc-line);
}
.order-item-body { display: flex; align-items: center; padding: .9rem 1.25rem; color: var(--acc-text); }
.order-item-body:hover { color: var(--acc-text); }
.min-w-0 { min-width: 0; }
.ph-box {
    background: var(--acc-accent-bg); color: var(--acc-accent);
    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(--acc-line);
}
.timeline-step.done:not(.first)::before { background: var(--acc-accent); }
.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(--acc-line); color: var(--acc-muted); font-size: .9rem;
}
.timeline-step.done .timeline-dot { background: var(--acc-accent); color: #fff; }
.timeline-label { margin-top: .5rem; font-weight: 600; font-size: .85rem; color: var(--acc-text); }
.timeline-step:not(.done) .timeline-label { color: var(--acc-muted); font-weight: 500; }
.timeline-time { font-size: .72rem; color: var(--acc-muted); }

/* ---------- 地址 / 网关选择 ---------- */
.address-card.is-default { border-color: var(--acc-accent); box-shadow: 0 0 0 3px var(--acc-accent-bg); }
.address-option { cursor: pointer; border: 1.5px solid var(--acc-line); transition: all .15s ease; }
.address-option:hover { border-color: var(--acc-accent); }
.address-option:has(input:checked) { border-color: var(--acc-accent); background: var(--acc-accent-bg); }
.gateway-option { border: 1.5px solid var(--acc-line); cursor: pointer; transition: all .15s ease; }
.gateway-option:hover { border-color: var(--acc-accent); }
.gateway-option:has(input:checked) { border-color: var(--acc-accent); background: var(--acc-accent-bg); }

/* ---------- 交付卡片 / 提示 ---------- */
.delivery-card { border-left: 3px solid var(--acc-accent); }
.delivery-note { padding: .8rem 1rem; border-radius: .6rem; background: var(--acc-accent-bg); color: var(--acc-accent); }

/* ---------- 课程 ---------- */
.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; text-decoration: none; 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(--acc-surface); border: 1px solid var(--acc-line);
    border-radius: var(--acc-radius); padding: 1.25rem; box-shadow: 0 4px 16px rgba(0, 0, 0, .05);
}
.course-perks li { margin-bottom: .35rem; }
.course-player-wrap { background: #000; border-radius: var(--acc-radius); }
.course-player { display: block; max-height: 62vh; }
.lesson-panel {
    background: var(--acc-surface); border: 1px solid var(--acc-line);
    border-radius: var(--acc-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(--acc-line); color: var(--acc-text);
}
.lesson-panel-body { max-height: 520px; overflow-y: auto; }
.lesson-panel-foot { padding: 1rem 1.1rem; border-top: 1px solid var(--acc-line); }
.lesson-item {
    display: flex; align-items: center; gap: .8rem;
    padding: .8rem 1.1rem; text-decoration: none; color: var(--acc-text);
    border-bottom: 1px solid var(--acc-line); transition: background .15s ease;
}
.lesson-item:last-child { border-bottom: 0; }
.lesson-item:hover { background: var(--acc-accent-bg); color: var(--acc-text); }
.lesson-item.is-locked .lesson-title { color: var(--acc-muted); }
.lesson-item.is-active { background: var(--acc-accent-bg); box-shadow: inset 3px 0 0 var(--acc-accent); }
.lesson-item.is-active .lesson-index { color: var(--acc-accent); }
.lesson-index { width: 26px; flex-shrink: 0; text-align: center; color: var(--acc-muted); 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(--acc-muted); font-size: .78rem; }
.lesson-duration { font-variant-numeric: tabular-nums; }
.lesson-item.is-preview .lesson-index { color: var(--acc-preview); }
.object-fit-cover { object-fit: cover; }

@media (max-width: 575.98px) {
    .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; }
}

/* ==================================================================
   v1.6.0 跨主题组件：幻灯 / GEO 横幅 / 友情链接 / FAQ / 排版微调
   ================================================================== */

/* ---------- 首页幻灯 ---------- */
.wm-slider {
    position: relative;
    background: var(--acc-accent-bg, #eef2ff);
    border-radius: 0 0 1.25rem 1.25rem;
    overflow: hidden;
    box-shadow: 0 10px 30px -18px rgba(15, 23, 42, .28);
}
.wm-slider .carousel-inner { border-radius: inherit; }
.wm-slide { aspect-ratio: 1600 / 500; }
.wm-slide-link { display: block; width: 100%; height: 100%; text-decoration: none; }
.wm-slide-img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    background: linear-gradient(135deg, var(--acc-accent, #4f46e5), color-mix(in srgb, var(--acc-accent, #4f46e5) 55%, #0f172a));
}
.wm-slide-plain .wm-slide-link {
    background: linear-gradient(120deg, color-mix(in srgb, var(--acc-accent, #4f46e5) 92%, #000 0%), color-mix(in srgb, var(--acc-accent, #4f46e5) 40%, #0f172a));
    display: flex; align-items: center; justify-content: center;
}
.wm-slide-caption {
    position: absolute; inset: 0; z-index: 2;
    display: flex; flex-direction: column; justify-content: center;
    padding: 2rem clamp(1.25rem, 6vw, 5rem);
    color: #fff; text-shadow: 0 2px 14px rgba(2, 6, 23, .45);
    pointer-events: none;
}
.wm-slide-plain .wm-slide-caption { position: static; text-align: center; align-items: center; padding: 1.5rem; }
.wm-slide-title { font-size: clamp(1.6rem, 3.6vw, 3rem); font-weight: 800; margin: 0 0 .5rem; letter-spacing: .01em; line-height: 1.15; }
.wm-slide-sub { font-size: clamp(.95rem, 1.6vw, 1.25rem); margin: 0 0 1.1rem; opacity: .92; max-width: 560px; }
.wm-slide-plain .wm-slide-sub { margin-inline: auto; }
.wm-slide-btn {
    display: inline-flex; align-items: center; gap: .45rem;
    background: rgba(255, 255, 255, .94); color: #1e293b;
    padding: .6rem 1.35rem; border-radius: 999px;
    font-weight: 700; font-size: .95rem;
    box-shadow: 0 6px 18px -6px rgba(2, 6, 23, .5);
    pointer-events: auto;
}
.wm-slide-link:hover .wm-slide-btn { transform: translateY(-2px); box-shadow: 0 10px 24px -6px rgba(2, 6, 23, .55); }
.wm-slider .carousel-indicators { margin-bottom: .8rem; z-index: 3; }
.wm-slider .carousel-indicators [data-bs-target] {
    width: 26px; height: 4px; border-radius: 2px; border: 0;
    background: rgba(255, 255, 255, .55); opacity: 1; transition: all .2s ease;
}
.wm-slider .carousel-indicators .active { background: #fff; width: 40px; }
.wm-slider .carousel-control-prev, .wm-slider .carousel-control-next { z-index: 3; opacity: .55; width: 8%; }
.wm-slider .carousel-control-prev:hover, .wm-slider .carousel-control-next:hover { opacity: .95; }
@media (max-width: 767.98px) {
    .wm-slide { aspect-ratio: 4 / 3; }
    .wm-slide-img { object-position: 62% center; }
    .wm-slide-caption { padding: 1.25rem; }
}

/* ---------- GEO 国家横幅 ---------- */
.wm-geo-banner {
    background: linear-gradient(90deg, var(--acc-accent, #4f46e5), color-mix(in srgb, var(--acc-accent, #4f46e5) 55%, #06b6d4));
    color: #fff; font-size: .88rem;
    animation: wmGeoIn .35s ease;
}
@keyframes wmGeoIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.wm-geo-banner-inner {
    display: flex; align-items: center; justify-content: center; gap: .55rem;
    flex-wrap: wrap; padding: .45rem 1rem;
}
.wm-geo-banner-inner .bi-geo-alt-fill { flex-shrink: 0; opacity: .9; }
.wm-geo-close {
    background: rgba(255, 255, 255, .22); border: 0; color: #fff;
    width: 22px; height: 22px; border-radius: 50%;
    line-height: 1; font-size: 1rem; cursor: pointer; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .15s ease; margin-left: .35rem;
}
.wm-geo-close:hover { background: rgba(255, 255, 255, .4); }

/* ---------- 友情链接 ---------- */
.wm-friend-links {
    display: flex; align-items: baseline; flex-wrap: wrap; gap: .35rem 1rem;
    padding: .8rem 0 1.1rem; margin-top: 1.4rem;
    border-top: 1px dashed var(--acc-line, #e2e8f0);
    font-size: .82rem;
}
.wm-fl-title { font-weight: 700; color: #d5dbe8; display: inline-flex; align-items: center; }
.wm-friend-links a {
    color: var(--acc-muted, #64748b); text-decoration: none;
    transition: color .15s ease;
}
.wm-friend-links a:hover { color: var(--acc-accent, #4f46e5); }
.wm-faq-link { color: inherit; text-decoration: none; }
.wm-faq-link:hover { color: var(--acc-accent, #4f46e5); }

/* ---------- FAQ 落地页 ---------- */
.faq-list { display: flex; flex-direction: column; gap: .8rem; }
.faq-item {
    background: var(--acc-card, #fff);
    border: 1px solid var(--acc-line, #e2e8f0);
    border-radius: .9rem; overflow: hidden;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.faq-item[open] { border-color: color-mix(in srgb, var(--acc-accent, #4f46e5) 45%, var(--acc-line, #e2e8f0)); box-shadow: 0 8px 24px -14px rgba(15, 23, 42, .25); }
.faq-item summary {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1rem 1.25rem; cursor: pointer; list-style: none;
    font-weight: 700; color: var(--acc-text, #1e293b); font-size: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .bi-chevron-down { flex-shrink: 0; color: var(--acc-muted, #94a3b8); transition: transform .2s ease; }
.faq-item[open] summary .bi-chevron-down { transform: rotate(180deg); color: var(--acc-accent, #4f46e5); }
.faq-a {
    padding: 0 1.25rem 1.1rem; color: var(--acc-text, #334155);
    line-height: 1.75; font-size: .95rem;
    border-top: 1px solid var(--acc-line, #eef2f7); padding-top: .9rem;
}

/* ---------- v1.6.0 排版微调（前后台观感统一） ---------- */
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, .wm-slide-title { text-wrap: balance; }
p  { text-wrap: pretty; }
.site-header, .section-title span, .navbar-brand { letter-spacing: .01em; }
.section-title span { letter-spacing: .06em; }

/* 富媒体图片默认懒加载对齐 */
.object-fit-cover { object-fit: cover; }

/* ==================================================================
   v1.6.1 细节美化（前台）：注册按钮 / 轮播对比度 / 卡片微交互 / 排版
   ================================================================== */

/* ---------- 顶部注册入口 ---------- */
.wm-nav-register { white-space: nowrap; }
.wm-nav-register:hover { transform: translateY(-1px); }
.navbar .btn-sm { transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease; }
.navbar .btn-sm:active { transform: translateY(0) scale(.98); }

/* 搜索框统一胶囊风 + focus 光晕（跨主题） */
.search-form .form-control {
    border-radius: 999px 0 0 999px;
    padding-left: 1rem;
    transition: box-shadow .18s ease, border-color .18s ease;
}
.search-form .btn { border-radius: 0 999px 999px 0; }
.search-form .form-control:focus {
    box-shadow: 0 0 0 .22rem color-mix(in srgb, var(--acc-accent, #4f46e5) 15%, transparent);
    border-color: var(--acc-accent, #4f46e5);
}

/* ---------- 轮播对比度增强（VLM 反馈：浅色指示点对比弱） ---------- */
.wm-slider .carousel-indicators [data-bs-target] {
    background: rgba(255, 255, 255, .5);
    box-shadow: 0 1px 4px rgba(2, 6, 23, .35);
}
.wm-slider .carousel-indicators .active {
    background: #fff;
    box-shadow: 0 1px 8px rgba(2, 6, 23, .5);
}
.wm-slider .carousel-control-prev-icon,
.wm-slider .carousel-control-next-icon {
    filter: drop-shadow(0 1px 6px rgba(2, 6, 23, .55));
}
/* 幻灯文字可读性：加深投影 */
.wm-slide-caption { text-shadow: 0 2px 18px rgba(2, 6, 23, .55), 0 1px 3px rgba(2, 6, 23, .35); }
.wm-slide-btn { text-shadow: none; }

/* ---------- 商品卡微交互：图片轻缩放 + 阴影层次 ---------- */
.product-card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.product-card:hover { transform: translateY(-3px); }
.product-thumb { overflow: hidden; }
.product-thumb img { transition: transform .3s ease, opacity .3s ease; }
.product-card:hover .product-thumb img { transform: scale(1.04); }
.product-card:hover .product-title { color: var(--acc-accent, #4f46e5); }
.product-title { transition: color .18s ease; }

/* ---------- GEO 横幅关闭按钮焦点可达 ---------- */
.wm-geo-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ---------- 友链 hover 下划线替代（保持无下划线约定，用颜色+位移反馈） ---------- */
.wm-friend-links a { position: relative; transition: color .15s ease; }
.wm-friend-links a::after {
    content: ''; position: absolute; left: 0; right: 100%; bottom: -2px;
    height: 1.5px; background: currentColor; transition: right .2s ease; opacity: .55;
}
.wm-friend-links a:hover::after { right: 0; }

/* ---------- FAQ 手风琴细节 ---------- */
.faq-item summary { transition: background .15s ease; }
.faq-item summary:hover { background: var(--acc-accent-bg, rgba(79, 70, 229, .05)); }

/* ---------- 表单控件统一（登录/联系/收银台） ---------- */
.form-control:focus, .form-select:focus {
    border-color: var(--acc-accent, #4f46e5);
    box-shadow: 0 0 0 .22rem color-mix(in srgb, var(--acc-accent, #4f46e5) 14%, transparent);
}

/* ---------- v1.6.1 顶部密度微调（VLM 复审反馈） ---------- */
@media (min-width: 992px) {
    .search-form { width: 215px; }
}
@media (max-width: 1199.98px) {
    /* 中等屏：主题/币种/语言切换只留图标，给登录注册让位 */
    .navbar .dropdown-toggle .me-1 + * { display: none; }
}
.navbar .nav-link { white-space: nowrap; }

/* ==================================================================
   v1.7.0 前台细节美化：导航阴影 / 价格排版 / 滚动条 / 动效可访问性
   ================================================================== */

/* ---------- 吸顶导航微阴影（层次感，滚动时与内容分离） ---------- */
.site-header.sticky-top {
    box-shadow: 0 1px 0 var(--acc-line, #e9ecef), 0 4px 18px -12px rgba(15, 23, 42, .18);
}

/* ---------- 价格数字排版：等宽数字，金额跳动不抖动 ---------- */
.price, .product-price, .stat-num, #priceNow {
    font-variant-numeric: tabular-nums;
    letter-spacing: -.01em;
}

/* ---------- 精致滚动条（WebKit） ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--acc-muted, #6c757d) 38%, transparent);
    border-radius: 6px;
    border: 2px solid transparent;
    background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--acc-accent, #4f46e5) 55%, transparent);
    background-clip: content-box;
}

/* ---------- 选中文字主题色 ---------- */
::selection { background: color-mix(in srgb, var(--acc-accent, #4f46e5) 22%, transparent); }

/* ---------- 页面进入轻微淡入（120ms，感知更顺滑） ---------- */
@keyframes wmPageIn { from { opacity: .35; } to { opacity: 1; } }
main.mb-5 { animation: wmPageIn .16s ease-out; }

/* ---------- 键盘可达性：焦点环统一 ---------- */
a:focus-visible, button:focus-visible, .product-card a:focus-visible {
    outline: 2px solid var(--acc-accent, #4f46e5);
    outline-offset: 2px;
    border-radius: .35rem;
}

/* ---------- 页脚链接微反馈 ---------- */
.site-footer a { transition: color .15s ease, opacity .15s ease; }
.site-footer a:hover { opacity: .85; }

/* ---------- 商品卡徽章与折扣角标排版 ---------- */
.product-thumb .badge-wrap .badge { letter-spacing: .02em; }

/* ---------- 动效可访问性：用户偏好减少动效时关闭装饰动画 ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- 小屏导航密度 ---------- */
@media (max-width: 575.98px) {
    .search-form .form-control { min-width: 0; }
    .navbar-brand { font-size: 1.05rem !important; }
}
