/*! 商城配套 CMS 模板样式
 * 与商城模块（modules/shop）视觉保持一致：同款品牌渐变、圆角卡片、面包屑与侧栏
 * 自带样式，不依赖商城模块是否安装
 */
:root {
    --mc-brand: #4f46e5;
    --mc-brand-2: #7c3aed;
    --mc-text: #1e293b;
    --mc-muted: #64748b;
    --mc-line: #e8ecf4;
    --mc-bg: #f7f8fb;
    --mc-card: #ffffff;
    --mc-radius: 14px;
    --mc-shadow: 0 8px 24px rgba(15, 23, 42, .06);
    --mc-shadow-sm: 0 1px 4px rgba(15, 23, 42, .05);
}

/* ---------------- 基础 ---------------- */
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
.mall-wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.mall-main { padding: 16px 0 40px; }
.mall-muted { color: var(--mc-muted); }

/* ---------------- 头部 ---------------- */
.mall-header { background: #fff; border-bottom: 1px solid var(--mc-line); position: sticky; top: 0; z-index: 30; }
.mall-header-inner { display: flex; align-items: center; gap: 24px; min-height: 64px; flex-wrap: wrap; }
.mall-logo {
    font-size: 19px; font-weight: 800; letter-spacing: -.4px;
    background: linear-gradient(135deg, var(--mc-brand), var(--mc-brand-2));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.mall-nav { margin-left: auto; }
.mall-nav ul { list-style: none; display: flex; gap: 4px; flex-wrap: wrap; }
.mall-nav li a { display: block; padding: 8px 14px; border-radius: 10px; font-size: 14.5px; color: #475569; transition: .15s; }
.mall-nav li a:hover { background: #f1f5f9; color: var(--mc-brand); }
.mall-nav li.on a, .mall-nav a.on { color: var(--mc-brand); font-weight: 600; }

/* ---------------- 面包屑 ---------------- */
.mall-crumb { background: var(--mc-bg); border-bottom: 1px solid var(--mc-line); }
.mall-crumb .mall-wrap { display: flex; align-items: center; gap: 8px; min-height: 40px; font-size: 13px; color: var(--mc-muted); flex-wrap: wrap; }
.mall-crumb a:hover { color: var(--mc-brand); }

/* ---------------- 布局 ---------------- */
.mall-layout { display: grid; grid-template-columns: 1fr 260px; gap: 20px; align-items: start; }
.mall-content { min-width: 0; }
.mall-side { min-width: 0; }

/* ---------------- 面板 / 卡片 ---------------- */
.mall-panel { background: var(--mc-card); border: 1px solid var(--mc-line); border-radius: var(--mc-radius); box-shadow: var(--mc-shadow-sm); overflow: hidden; }
.mall-panel-head { padding: 16px 20px; border-bottom: 1px solid var(--mc-line); display: flex; align-items: center; gap: 10px; }
.mall-panel-head h1, .mall-panel-head h2 { font-size: 17px; }
.mall-panel-head .mall-muted { margin-left: auto; font-size: 13px; }
.mall-panel-body { padding: 18px 20px; }
.mall-card { background: var(--mc-card); border: 1px solid var(--mc-line); border-radius: var(--mc-radius); box-shadow: var(--mc-shadow-sm); padding: 16px; margin-bottom: 16px; }
.mall-card h3 { font-size: 15px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--mc-line); }
.mall-card ul { list-style: none; }
.mall-card li { padding: 7px 0; font-size: 13.5px; border-bottom: 1px dashed var(--mc-line); }
.mall-card li:last-child { border-bottom: 0; }
.mall-card li a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mall-card li a:hover { color: var(--mc-brand); }
.mall-card p { font-size: 13px; color: var(--mc-muted); line-height: 1.7; }

/* ---------------- 文章列表 ---------------- */
.mall-postlist { list-style: none; }
.mall-postlist li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--mc-line); }
.mall-postlist li:last-child { border-bottom: 0; }
.mall-postlist li a { flex: 1; min-width: 0; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mall-postlist li a:hover { color: var(--mc-brand); }
.mall-postlist .mall-date { flex: none; font-size: 12.5px; color: var(--mc-muted); }

/* ---------------- 文章详情 ---------------- */
.mall-post-title { font-size: 22px; line-height: 1.4; margin-bottom: 10px; }
.mall-post-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--mc-muted); padding-bottom: 14px; border-bottom: 1px solid var(--mc-line); margin-bottom: 18px; }
.mall-post-content { font-size: 15px; line-height: 1.9; color: #334155; overflow-wrap: break-word; word-break: break-word; }
.mall-post-content p { margin-bottom: 12px; }
.mall-post-content img { border-radius: 10px; margin: 10px 0; max-width: 100%; }
.mall-post-content h1, .mall-post-content h2, .mall-post-content h3 { font-size: 17px; margin: 16px 0 8px; }
.mall-post-content ul, .mall-post-content ol { margin: 0 0 12px 22px; }
.mall-post-content table { width: 100% !important; border-collapse: collapse; }
.mall-post-content td, .mall-post-content th { border: 1px solid var(--mc-line); padding: 8px 10px; }
.mall-post-content video, .mall-post-content iframe { max-width: 100%; }
.mall-back { margin-top: 18px; }
.mall-back a { color: var(--mc-brand); font-size: 14px; }

/* ---------------- 按钮 ---------------- */
.mall-btn {
    display: inline-flex; align-items: center; justify-content: center;
    height: 42px; padding: 0 22px; border: 0; border-radius: 12px;
    font-size: 14.5px; font-weight: 600; color: #fff;
    background: linear-gradient(135deg, var(--mc-brand), var(--mc-brand-2));
    box-shadow: 0 8px 20px rgba(79, 70, 229, .25);
}
.mall-btn:hover { opacity: .94; }

/* ---------------- 空状态 / 分页 ---------------- */
.mall-empty { text-align: center; color: var(--mc-muted); padding: 50px 20px; }
.mall-pager { padding: 18px 0 4px; }
/* CMS 分页函数输出的是 ul.vncms-pager > li（.active / .disabled） > a */
.mall-pager .vncms-pager, .vncms-pager {
    display: flex; gap: 6px; justify-content: center; flex-wrap: wrap;
    list-style: none; margin: 0; padding: 0;
}
.vncms-pager li { list-style: none; margin: 0; }
.vncms-pager li a {
    min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
    padding: 0 10px; border-radius: 9px; background: #fff; border: 1px solid var(--mc-line);
    font-size: 13px; color: var(--mc-text);
}
.vncms-pager li a:hover { border-color: var(--mc-brand); color: var(--mc-brand); }
.vncms-pager li.active a {
    background: linear-gradient(135deg, var(--mc-brand), var(--mc-brand-2));
    color: #fff; border-color: transparent; font-weight: 600;
}
.vncms-pager li.disabled a { color: #cbd5e1; }

/* ---------------- 页脚 ---------------- */
.mall-footer { background: #0f172a; color: #94a3b8; margin-top: 30px; }
.mall-footer-main { padding: 26px 0; font-size: 15px; font-weight: 600; color: #fff; }
.mall-footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 16px 0; font-size: 13px; }
.mall-footer-bottom a { color: #cbd5e1; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 860px) {
    .mall-layout { grid-template-columns: 1fr; }
    .mall-post-title { font-size: 19px; }
    .mall-header-inner { gap: 12px; }
}
