/* =========================================================
   西漠金驼官网 - 统一样式表
   配色：金色系 (#b98a3d) + 深棕 (#3b2f23) + 米白 (#faf6ee)
   字体：系统字体（避免字体侵权）
   ========================================================= */

:root {
    --gold: #b98a3d;
    --gold-light: #d8b46a;
    --gold-dark: #9a6f2f;
    --cream: #faf6ee;
    --cream-dark: #f0e9d8;
    --brown: #3b2f23;
    --brown-dark: #2a2017;
    --text: #2b241a;
    --muted: #6b5f4f;
    --line: #e7ddc9;
    --white: #ffffff;
    --red: #c0392b;
    --green: #1e8e3e;
    --blue: #2980b9;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 4px 16px rgba(59,47,35,.08);
    --shadow-lg: 0 12px 36px rgba(59,47,35,.12);
    --transition: .25s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: #fff;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-dark); }

img { max-width: 100%; display: block; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ─── 顶部导航 ─────────────────────────────── */
.topnav {
    background: linear-gradient(180deg, #2a1e15 0%, #1a120d 100%);
    color: #fff;
    border-bottom: 1px solid rgba(216,180,106,.12);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,.25);
}

.topnav-inner {
    width: 100%;
    padding: 0 36px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 40px;
}

.topnav .logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    flex-shrink: 0;
    text-decoration: none;
}

.topnav .logo-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
}

.topnav .logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.topnav .logo-text strong {
    font-size: 18px;
    color: var(--gold-light);
    letter-spacing: 2px;
    font-weight: 700;
}

.topnav .logo-text em {
    font-size: 10px;
    font-style: normal;
    color: #c9b787;
    letter-spacing: .5px;
    margin-top: 2px;
}

.topnav .menu {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.topnav .menu a {
    display: inline-flex;
    align-items: center;
    padding: 9px 20px;
    color: rgba(255,255,255,.65);
    font-size: 15px;
    font-weight: 500;
    position: relative;
    transition: all .2s ease;
    border-radius: 6px;
    text-decoration: none;
}

.topnav .menu a:hover {
    color: var(--gold-light);
    background: rgba(216,180,106,.08);
}

.topnav .menu a.active {
    color: var(--gold-light);
    background: rgba(216,180,106,.12);
}

.topnav .menu a.active::after {
    content: "";
    position: absolute;
    left: 20px; right: 20px; bottom: 5px;
    height: 2px;
    background: var(--gold-light);
    border-radius: 2px;
}

.topnav .menu a:not(.active)::after { display: none; }

.topnav .menu-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.topnav .menu-right a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-nav-login {
    color: var(--gold-light);
    border: 1px solid rgba(216,180,106,.4);
}
.btn-nav-login:hover {
    background: rgba(216,180,106,.12);
    border-color: var(--gold-light);
}

.btn-nav-register {
    background: var(--gold);
    color: #fff;
}
.btn-nav-register:hover { background: var(--gold-dark); color: #fff; }

.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-user .avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gold-light);
    background: var(--cream);
}

.nav-user .avatar-placeholder {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--gold);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid var(--gold-light);
}

.nav-user .display-name {
    color: #ececec;
    font-size: 14px;
}

.btn-nav-logout {
    color: #b7a88e;
    font-size: 13px;
}

/* 管理员操作区（后台管理 + 退出） */
.admin-actions {
    display: inline-flex;
    align-items: center;
    background: rgba(216,180,106,0.08);
    border: 1px solid rgba(216,180,106,0.2);
    border-radius: 8px;
    padding: 2px;
    transition: background .2s, border-color .2s;
}

.admin-actions:hover {
    background: rgba(216,180,106,0.12);
    border-color: rgba(216,180,106,0.35);
}

.admin-actions .admin-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gold-light);
    border-radius: 6px;
    transition: all .15s;
    white-space: nowrap;
    text-decoration: none;
}

.admin-actions .admin-link:hover {
    background: rgba(216,180,106,0.18);
    color: #fff;
}

.admin-actions .admin-link.logout {
    color: #c4a882;
    font-size: 12px;
}

.admin-actions .admin-link.logout:hover {
    background: rgba(244,63,94,0.15);
    color: #fca5a5;
}

.admin-actions .admin-divider {
    width: 1px;
    height: 16px;
    background: rgba(216,180,106,0.25);
    margin: 0 2px;
}

.btn-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    background: rgba(216,180,106,.15);
    color: var(--gold-light);
    border: 1px solid rgba(216,180,106,.3);
}

/* ─── 主内容区域 ─────────────────────────── */
.main-content {
    flex: 1;
    padding: 0;
}

/* ─── Hero 区域 ───────────────────────────── */
.hero {
    position: relative;
    background: linear-gradient(160deg, var(--brown) 0%, #57442f 60%, #6b5334 100%);
    color: #fff;
    overflow: hidden;
}
.hero::after {
    content: "";
    position: absolute; inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(216,180,106,.18), transparent 45%);
    pointer-events: none;
}
.hero-inner {
    position: relative; z-index: 2;
    padding: 64px 20px 72px;
    text-align: center;
}
.hero .brand-tag {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 15px; letter-spacing: 4px;
    color: var(--gold-light); text-transform: uppercase;
}
.hero .brand-tag::before, .hero .brand-tag::after {
    content: ""; width: 36px; height: 1px;
    background: var(--gold-light); opacity: .7;
}
.hero h1 { font-size: 40px; font-weight: 700; margin: 18px 0 8px; letter-spacing: 2px; }
.hero .sub { font-size: 18px; color: #efe6d4; letter-spacing: 1px; }
.hero .claim {
    margin-top: 22px; font-size: 15px; color: #d9cba9;
    max-width: 640px; margin-left: auto; margin-right: auto;
}
.hero .badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }
.hero .badge {
    border: 1px solid var(--gold-light); color: var(--gold-light);
    padding: 8px 18px; border-radius: 30px; font-size: 14px; letter-spacing: 1px;
}

/* ─── 通用 Section ────────────────────────── */
.sec { padding: 60px 0; }
.sec-alt { background: var(--cream); }
.sec-head { text-align: center; margin-bottom: 40px; }
.sec-head h2 { font-size: 30px; color: var(--brown); letter-spacing: 2px; }
.sec-head .en {
    font-size: 13px; color: var(--gold);
    letter-spacing: 3px; text-transform: uppercase; margin-top: 6px;
}
.sec-head .line { width: 56px; height: 2px; background: var(--gold); margin: 16px auto 0; }

/* ─── 产品亮点卡片 ───────────────────────── */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
    background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius); padding: 26px 22px;
    transition: all var(--transition);
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gold-light);
}
.card .num { font-size: 13px; color: var(--gold); letter-spacing: 2px; }
.card h3 { font-size: 18px; color: var(--brown); margin: 10px 0 8px; }
.card p { font-size: 14px; color: var(--muted); }

/* ─── 工艺流程 ───────────────────────────── */
.proc { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.proc-item { text-align: center; padding: 0 10px; }
.proc-item .icon {
    width: 64px; height: 64px; margin: 0 auto 14px;
    border: 2px solid var(--gold); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; color: var(--gold); background: #fff;
}
.proc-item h4 { font-size: 16px; color: var(--brown); margin-bottom: 6px; }
.proc-item p { font-size: 13px; color: var(--muted); }

/* ─── 产品规格面板 ───────────────────────── */
.spec-grid { display: grid; grid-template-columns: minmax(auto,560px); justify-content: center; gap: 30px; }
.panel {
    background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius); padding: 28px;
}
.panel h3 {
    font-size: 20px; color: var(--brown);
    border-bottom: 2px solid var(--gold);
    padding-bottom: 12px; margin-bottom: 18px;
}
.spec-list li {
    list-style: none; padding: 8px 0;
    border-bottom: 1px dashed var(--line);
    font-size: 14px; display: flex; justify-content: space-between;
}
.spec-list li:last-child { border-bottom: none; }
.spec-list .k { color: var(--muted); }
.spec-list .v { color: var(--brown); font-weight: 600; text-align: right; }

/* ─── 检测报告表格 ───────────────────────── */
.report { max-width: 720px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.report-head { background: var(--brown); color: #fff; padding: 16px 24px; font-size: 16px; letter-spacing: 1px; }
.report-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.report-table th, .report-table td { padding: 10px 12px; text-align: center; border-bottom: 1px solid var(--line); }
.report-table th { background: var(--cream); color: var(--brown); font-weight: 600; }
.report-table .ok { color: var(--green); font-weight: 600; }
.report-note { padding: 14px 24px; font-size: 12.5px; color: var(--muted); }

/* ─── 适配人群标签 ────────────────────────── */
.audience { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.aud-tag {
    background: #fff; border: 1px solid var(--gold-light);
    color: var(--brown); padding: 12px 22px;
    border-radius: var(--radius-sm); font-size: 15px;
}

/* ─── 产品详情图（卡片网格 + 点击放大灯箱） ── */
.detail { background: var(--cream); }
.sec-note {
    margin-top: 10px; font-size: 13px; color: var(--muted);
}
.detail-list {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 20px; padding: 0 24px;
}
.detail-card {
    position: relative; margin: 0; cursor: pointer;
    background: #fff; border-radius: 10px; overflow: hidden;
    box-shadow: 0 4px 12px rgba(59, 47, 35, .10);
    transition: box-shadow .2s, transform .2s;
}
.detail-card:hover {
    box-shadow: 0 8px 20px rgba(59, 47, 35, .18);
    transform: translateY(-2px);
}
.detail-card picture { display: block; }
.detail-img {
    display: block; width: 100%; height: 400px;
    object-fit: cover; object-position: top;
    transition: transform .25s;
}
.detail-card:hover .detail-img { transform: scale(1.03); }
.detail-hint {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 30px 10px 10px;
    background: linear-gradient(180deg, transparent, rgba(45, 35, 22, .78));
    color: #fff; font-size: 13px; text-align: center;
    pointer-events: none;
}

/* ─── 产品详情灯箱 ─────────────────────── */
.lightbox {
    display: none; position: fixed; inset: 0; z-index: 9999;
    background: rgba(28, 22, 14, .93);
}
.lightbox.open { display: block; }
.lightbox-close {
    position: fixed; top: 16px; right: 22px; z-index: 10001;
    width: 44px; height: 44px; border: none; border-radius: 50%;
    background: rgba(255, 255, 255, .16); color: #fff;
    font-size: 26px; line-height: 44px; cursor: pointer;
}
.lightbox-close:hover { background: rgba(255, 255, 255, .32); }
.lightbox-scroll {
    height: 100vh; overflow-y: auto;
    padding: 24px 16px 48px;
}
.lightbox-scroll picture {
    display: block; max-width: min(720px, 94vw); margin: 0 auto;
}
.lightbox-scroll img {
    display: block; width: 100%; height: auto;
    border-radius: 6px;
}

/* ─── 底部Footer ────────────────────────── */
.footer {
    background: linear-gradient(180deg, var(--brown) 0%, var(--brown-dark) 100%);
    color: #d9cba9; padding: 52px 24px 34px; font-size: 13px;
    margin-top: auto;
    border-top: 1px solid rgba(217, 203, 169, .12);
}
.footer-inner { max-width: 1080px; margin: 0 auto; text-align: center; }

.footer-brand {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 16px;
    margin-bottom: 18px;
}
.footer .brand-name {
    font-size: 19px;
    color: var(--gold-light);
    letter-spacing: 5px;
    font-weight: 600;
}
.footer .brand-en {
    font-size: 11px;
    color: #8a7c63;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.footer-disclaimer {
    max-width: 600px;
    margin: 0 auto;
    color: #9d8f77;
    font-size: 12px;
    line-height: 1.8;
}

.footer-legal {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid rgba(217, 203, 169, .10);
    color: #b7a88e;
    font-size: 12px;
}
.footer-divider {
    width: 1px;
    height: 12px;
    background: rgba(217, 203, 169, .28);
}
.footer-beian { color: #b7a88e; }

/* ─── 通用表单样式 ────────────────────────── */
.form-card {
    max-width: 440px; margin: 40px auto;
    background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius); padding: 36px 32px;
    box-shadow: var(--shadow);
}
.form-card.wide { max-width: 680px; }

.form-card .form-title {
    font-size: 24px; color: var(--brown);
    text-align: center; margin-bottom: 8px;
    letter-spacing: 1px;
}
.form-card .form-subtitle {
    font-size: 13px; color: var(--muted);
    text-align: center; margin-bottom: 28px;
}

.form-group { margin-bottom: 20px; }
.form-group label {
    display: block; font-size: 14px; color: var(--brown);
    font-weight: 500; margin-bottom: 6px;
}
.form-input, .form-textarea, .form-file {
    width: 100%; padding: 10px 14px;
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    font-size: 14px; font-family: inherit; color: var(--text);
    background: #fff; transition: border-color var(--transition);
}
.form-input:focus, .form-textarea:focus {
    outline: none; border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(185,138,61,.12);
}
.form-textarea { resize: vertical; }
.form-file { padding: 8px; }
.form-checkbox { width: 16px; height: 16px; accent-color: var(--gold); }

.form-error {
    color: var(--red); font-size: 13px;
    margin-top: 6px; padding: 4px 0;
}
.form-hint { color: var(--muted); font-size: 12px; margin-top: 4px; }

.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

/* ─── 按钮 ─────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 28px; border-radius: var(--radius-sm);
    font-size: 15px; font-weight: 500; cursor: pointer;
    border: none; transition: all var(--transition);
    font-family: inherit;
}
.btn-primary { background: var(--gold); color: #fff; }
.btn-primary:hover { background: var(--gold-dark); }
.btn-outline { background: transparent; color: var(--gold); border: 1px solid var(--gold); }
.btn-outline:hover { background: var(--cream); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #962d20; }
.btn-sm { padding: 6px 16px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ─── 消息提示 ─────────────────────────── */
.messages { max-width: 1080px; margin: 16px auto; padding: 0 20px; }
.message {
    padding: 12px 20px; border-radius: var(--radius-sm);
    font-size: 14px; margin-bottom: 8px;
    display: flex; align-items: center; gap: 8px;
}
.message.success { background: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7; }
.message.error { background: #ffebee; color: #b71c1c; border: 1px solid #ef9a9a; }
.message.info { background: #e3f2fd; color: #0d47a1; border: 1px solid #90caf9; }

/* ─── 新闻列表 ─────────────────────────── */
.news-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.news-card {
    background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius); overflow: hidden;
    transition: all var(--transition);
}
.news-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--gold-light);
}
.news-card .news-img { width: 100%; height: 200px; object-fit: cover; background: var(--cream); }
.news-card .news-img-placeholder {
    width: 100%; height: 200px; background: var(--cream);
    display: flex; align-items: center; justify-content: center;
    color: var(--muted); font-size: 14px;
}
.news-card .news-body { padding: 18px 20px; }
.news-card .news-title {
    font-size: 17px; font-weight: 600; color: var(--brown);
    margin-bottom: 8px; line-height: 1.4;
}
.news-card .news-excerpt { font-size: 13px; color: var(--muted); line-height: 1.6; }
.news-card .news-date { font-size: 12px; color: var(--gold); margin-top: 12px; }

/* ─── 购物链接 ─────────────────────────── */
.sec-sub { font-size: 14px; color: var(--muted); margin-top: 14px; }
.shop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.shop-card {
    background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius); overflow: hidden;
    display: flex; flex-direction: column;
    transition: all var(--transition);
}
.shop-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gold-light);
}
.shop-img-wrap {
    width: 72%;
    max-width: 240px;
    aspect-ratio: 1 / 1;
    margin: 24px auto 0;
    overflow: hidden;
    background: var(--cream);
    border-radius: 10px;
    border: 1px solid var(--line);
}
.shop-img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .4s ease;
}
.shop-card:hover .shop-img { transform: scale(1.05); }
.shop-img-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: var(--muted); font-size: 14px;
}
.shop-body { padding: 0 20px 22px; display: flex; flex-direction: column; align-items: center; flex: 1; }
.shop-name { font-size: 17px; color: var(--brown); font-weight: 600; margin: 18px 0 16px; text-align: center; }
.shop-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: auto; }
.plat-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 7px 16px; border-radius: 6px;
    font-size: 13px; color: #fff; text-decoration: none;
    background: #64748B;
    transition: all var(--transition);
    box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.plat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,.22);
    color: #fff; text-decoration: none;
}
.plat-taobao    { background: #FF5000; }
.plat-tmall     { background: #FF0036; }
.plat-jd        { background: #E1251B; }
.plat-pdd       { background: #E02E24; }
.plat-douyin    { background: #161823; }
.plat-xiaohongshu { background: #FF2442; }
.plat-wechat    { background: #07C160; }
.plat-other     { background: #64748B; }
/* 自定义平台（后台"其他"录入的中文名）不再写死颜色：
   由 views.shop_view 按平台名哈希自动分配随机配色（内联 style），避免与上述品牌色重复 */

/* ─── 新闻详情 ─────────────────────────── */
.news-detail-wrap { max-width: 800px; margin: 40px auto; padding: 0 20px; }
.news-detail-wrap h1 { font-size: 28px; color: var(--brown); margin-bottom: 12px; }
.news-detail-wrap .news-meta { font-size: 13px; color: var(--muted); margin-bottom: 24px; }
.news-detail-wrap .news-img { width: 100%; border-radius: var(--radius); margin-bottom: 24px; }
.news-detail-wrap .news-content { font-size: 16px; line-height: 1.9; color: var(--text); overflow: hidden; }
.news-detail-wrap .news-content p { margin-bottom: 16px; }

/* ─── 关于我们页 ───────────────────────── */
.hero-about .hero-inner { padding: 56px 20px 64px; }
.about-figure { margin: 0 auto 28px; text-align: center; max-width: 720px; }
.about-img { max-width: 100%; height: auto; border-radius: var(--radius); display: inline-block; }
.rich-content { font-size: 16px; line-height: 1.9; color: var(--text); overflow: hidden; }
.rich-content p { margin-bottom: 16px; }

/* 富文本图片（wangEditor）：大小/浮动/对齐渲染 */
.news-content img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.news-content img[style*="float: left"],
.news-content img[style*="float:left"] { margin: 6px 20px 10px 0; }
.news-content img[style*="float: right"],
.news-content img[style*="float:right"] { margin: 6px 0 10px 20px; }
.news-content img[style*="text-align: center"],
.news-content img[style*="display: block"] { margin-left: auto; margin-right: auto; display: block; }
.news-content blockquote { border-left: 3px solid var(--gold); background: var(--cream); margin: 0 0 16px; padding: 10px 16px; color: var(--muted); }
.news-content ul, .news-content ol { padding-left: 24px; margin-bottom: 16px; }
.news-content table { border-collapse: collapse; margin-bottom: 16px; width: 100%; }
.news-content table td, .news-content table th { border: 1px solid var(--line); padding: 6px 10px; }
.news-content h1, .news-content h2, .news-content h3 { color: var(--brown); margin: 18px 0 10px; }

/* 关于我们富文本内容（rich-content）与新闻正文同款排版 */
.rich-content img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.rich-content img[style*="float: left"],
.rich-content img[style*="float:left"] { margin: 6px 20px 10px 0; }
.rich-content img[style*="float: right"],
.rich-content img[style*="float:right"] { margin: 6px 0 10px 20px; }
.rich-content img[style*="text-align: center"],
.rich-content img[style*="display: block"] { margin-left: auto; margin-right: auto; display: block; }
.rich-content blockquote { border-left: 3px solid var(--gold); background: var(--cream); margin: 0 0 16px; padding: 10px 16px; color: var(--muted); }
.rich-content ul, .rich-content ol { padding-left: 24px; margin-bottom: 16px; }
.rich-content table { border-collapse: collapse; margin-bottom: 16px; width: 100%; }
.rich-content table td, .rich-content table th { border: 1px solid var(--line); padding: 6px 10px; }
.rich-content h1, .rich-content h2, .rich-content h3 { color: var(--brown); margin: 18px 0 10px; }

/* ─── 知识科普 ─────────────────────────── */
.knowledge-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.knowledge-card {
    background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius); overflow: hidden;
    transition: all var(--transition);
    text-decoration: none; color: inherit;
}
.knowledge-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--gold-light);
}
.knowledge-card .knowledge-img { width: 100%; height: 200px; object-fit: cover; background: var(--cream); }
.knowledge-card .knowledge-img-placeholder {
    width: 100%; height: 200px; background: var(--cream);
    display: flex; align-items: center; justify-content: center;
    color: var(--muted); font-size: 14px;
}
.knowledge-card .knowledge-body { padding: 18px 20px; }
.knowledge-card .knowledge-title {
    font-size: 17px; font-weight: 600; color: var(--brown);
    margin-bottom: 8px; line-height: 1.4;
}
.knowledge-card .knowledge-excerpt { font-size: 13px; color: var(--muted); line-height: 1.6; }
.knowledge-card .knowledge-date { font-size: 12px; color: var(--gold); margin-top: 12px; }

/* ─── 个人页面 ─────────────────────────── */
.profile-wrap { max-width: 800px; margin: 40px auto; padding: 0 20px; }
.profile-header {
    display: flex; align-items: center; gap: 20px;
    background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius); padding: 28px;
    margin-bottom: 24px; box-shadow: var(--shadow);
}
.profile-header .avatar-lg {
    width: 80px; height: 80px; border-radius: 50%;
    object-fit: cover; border: 3px solid var(--gold);
    background: var(--cream);
}
.profile-header .avatar-lg-placeholder {
    width: 80px; height: 80px; border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #fff; display: flex; align-items: center;
    justify-content: center; font-size: 32px;
    font-weight: 600; border: 3px solid var(--gold-light);
}
.profile-header .profile-info h2 { font-size: 22px; color: var(--brown); }
.profile-header .profile-info p { font-size: 14px; color: var(--muted); margin-top: 4px; }

.profile-section {
    background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius); padding: 28px;
    margin-bottom: 24px; box-shadow: var(--shadow);
}
.profile-section h3 {
    font-size: 18px; color: var(--brown);
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px; margin-bottom: 20px;
}

/* ─── 后台管理 ─────────────────────────── */
.mgmt-wrap { max-width: 1080px; margin: 32px auto; padding: 0 20px; }
.mgmt-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.mgmt-header h1 { font-size: 26px; color: var(--brown); }

.mgmt-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 32px; }
.stat-card {
    background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius); padding: 24px;
    text-align: center; box-shadow: var(--shadow);
}
.stat-card .stat-value { font-size: 36px; font-weight: 700; color: var(--gold); }
.stat-card .stat-label { font-size: 14px; color: var(--muted); margin-top: 4px; }

.mgmt-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.mgmt-table th { background: var(--cream); color: var(--brown); font-weight: 600; font-size: 14px; padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.mgmt-table td { padding: 12px 16px; font-size: 14px; border-bottom: 1px solid var(--line); }
.mgmt-table tr:last-child td { border-bottom: none; }
.mgmt-table tr:hover { background: var(--cream); }
.mgmt-table img { width: 60px; height: 60px; border-radius: var(--radius-sm); object-fit: cover; }
.mgmt-table td .btn { margin-right: 10px; }
.mgmt-table td .btn:last-child { margin-right: 0; }

.status-tag {
    display: inline-block; padding: 3px 10px;
    border-radius: 20px; font-size: 12px;
}
.status-tag.on { background: #e8f5e9; color: var(--green); }
.status-tag.off { background: var(--cream-dark); color: var(--muted); }

/* ─── 空状态 ─────────────────────────── */
.empty-state {
    text-align: center; padding: 60px 20px;
    color: var(--muted); font-size: 15px;
}
.empty-state .icon { font-size: 48px; margin-bottom: 16px; opacity: .3; }

/* ─── 面包屑 ──────────────────────────── */
.breadcrumb {
    max-width: 1080px; margin: 20px auto;
    padding: 0 20px; font-size: 13px; color: var(--muted);
}
.breadcrumb a { color: var(--gold); }
.breadcrumb span { margin: 0 8px; }

/* ─── 响应式 ──────────────────────────── */
@media (max-width: 860px) {
    .grid { grid-template-columns: repeat(2, 1fr); }
    .proc { grid-template-columns: repeat(2, 1fr); }
    .spec-grid { grid-template-columns: 1fr; }
    .news-grid { grid-template-columns: repeat(2, 1fr); }
    .shop-grid { grid-template-columns: repeat(2, 1fr); }
    .knowledge-grid { grid-template-columns: repeat(2, 1fr); }
    .mgmt-stats { grid-template-columns: 1fr; }
    .hero h1 { font-size: 30px; }
    .topnav-inner { gap: 12px; padding: 0 18px; }
    .topnav .menu { gap: 0; }
    .topnav .menu a { padding: 8px 10px; font-size: 14px; }
    .nav-user .display-name { display: none; }
    .detail-list { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .detail-img { height: 320px; }
}
@media (max-width: 520px) {
    .grid { grid-template-columns: 1fr; }
    .proc { grid-template-columns: 1fr; }
    .news-grid { grid-template-columns: 1fr; }
    .shop-grid { grid-template-columns: 1fr; }
    .knowledge-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 26px; }
    .form-card { padding: 24px 20px; }
    .detail-list { grid-template-columns: 1fr; padding: 0 16px; }
    .detail-img { height: 420px; }
}

/* ─── 首页模块管理 ─────────────────────────── */
.module-list { display: flex; flex-direction: column; gap: 12px; }
.module-item {
    display: flex; align-items: center; gap: 16px;
    background: #fff; border-radius: var(--radius); padding: 16px 20px;
    box-shadow: var(--shadow); transition: all .2s;
    cursor: grab;
}
.module-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.module-item.dragging { opacity: .6; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.module-item.disabled { opacity: .55; background: #f9f9f9; }
.module-drag {
    color: #bbb; font-size: 18px; cursor: grab; user-select: none; line-height: 1;
}
.module-info { flex: 1; }
.module-name { font-size: 16px; font-weight: 600; color: var(--brown); margin-bottom: 4px; }
.module-meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.module-type {
    font-size: 12px; color: var(--gold-dark); background: var(--cream);
    padding: 2px 10px; border-radius: 20px;
}
.module-order { font-size: 12px; color: #999; }
.badge-enabled { font-size: 12px; color: #2e7d32; background: #e8f5e9; padding: 2px 10px; border-radius: 20px; }
.badge-disabled { font-size: 12px; color: #c62828; background: #ffebee; padding: 2px 10px; border-radius: 20px; }
.module-actions { display: flex; gap: 8px; flex-shrink: 0; }
.module-form { background: #fff; border-radius: var(--radius); padding: 28px 32px; box-shadow: var(--shadow); }
.module-form .form-group { margin-bottom: 20px; }
.module-form label { display: block; font-size: 14px; font-weight: 600; color: var(--brown); margin-bottom: 6px; }
.module-form input[type="text"], .module-form input[type="number"], .module-form select, .module-form textarea {
    width: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
    font-size: 14px; font-family: inherit; transition: border-color .2s; background: #fff;
}
.module-form input:focus, .module-form select:focus, .module-form textarea:focus {
    outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(192,156,92,.1);
}
.module-form textarea.json-editor { font-family: 'SFMono-Regular', Consolas, monospace; font-size: 13px; line-height: 1.6; }
.module-form .form-hint { font-size: 12px; color: #888; margin-top: 4px; }
.module-form .inline label { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.module-form .form-actions { display: flex; gap: 12px; margin-top: 28px; }
.mgmt-tip { font-size: 14px; color: #666; margin-bottom: 20px; }

/* ─── 前台搜索栏 ─────────────────────────── */
.front-search {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    margin: 0 0 36px;
}
.front-search-box {
    flex: 1; max-width: 420px;
    display: flex; align-items: center;
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 16px;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.front-search-box:focus-within {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(185,138,61,.12);
    background: #fff;
}
.front-search-box .fs-icon { color: var(--muted); font-size: 14px; margin-right: 8px; }
.front-search-box input {
    flex: 1; border: none; outline: none; background: transparent;
    padding: 10px 0; font-size: 14px; color: var(--text); font-family: inherit;
}
.front-search-box input::placeholder { color: #b3a78f; }
.fs-btn {
    border: none; cursor: pointer;
    background: var(--gold); color: #fff;
    padding: 10px 24px; border-radius: 999px;
    font-size: 14px; font-family: inherit;
    transition: background var(--transition);
}
.fs-btn:hover { background: var(--gold-dark); }
.fs-clear {
    font-size: 13px; color: var(--muted); padding: 10px 6px;
}
.fs-clear:hover { color: var(--gold-dark); }

/* ─── 前台分页 ───────────────────────────── */
.front-pagination {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px;
    margin: 36px 0 8px; padding-top: 24px;
    border-top: 1px solid var(--line);
}
.front-pagination .fp-info { font-size: 13px; color: var(--muted); }
.front-pagination .fp-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fp-btn {
    min-width: 34px; height: 34px;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text); font-size: 13px;
    text-decoration: none;
    transition: all var(--transition);
}
a.fp-btn:hover { border-color: var(--gold); color: var(--gold-dark); background: var(--cream); }
.fp-btn.current {
    background: var(--gold); border-color: var(--gold); color: #fff; font-weight: 600;
}
.fp-btn.ellipsis { border: none; color: var(--muted); cursor: default; }
@media (max-width: 520px) {
    .front-pagination { justify-content: center; }
}

/* ─── 移动端汉堡菜单（导航抽屉） ─────────── */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0 10px;
    margin-left: auto;
    background: transparent;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.nav-toggle-bar {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: var(--gold-light);
    transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle.open .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle.open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}
.nav-toggle.open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 998;
    background: rgba(20, 15, 10, .55);
    opacity: 0;
    transition: opacity .25s ease;
}
.nav-overlay.open { display: block; opacity: 1; }

@media (max-width: 520px) {
    .nav-toggle { display: flex; order: 999; }
    .topnav .menu-right { display: none; }
    .topnav .menu {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 76%;
        max-width: 300px;
        z-index: 999;
        background: var(--white);
        padding: 56px 0 20px;
        box-shadow: -8px 0 24px rgba(0, 0, 0, .25);
        transform: translateX(100%);
        transition: transform .25s ease;
        overflow-y: auto;
    }
    .topnav .menu.open { transform: translateX(0); }
    .topnav .menu a {
        display: flex;
        align-items: center;
        padding: 14px 24px;
        font-size: 15px;
        color: var(--text);
        border-radius: 0;
        border-left: 3px solid transparent;
    }
    .topnav .menu a:hover {
        color: var(--gold-dark);
        background: var(--cream);
    }
    .topnav .menu a.active {
        color: var(--gold);
        background: var(--cream);
        border-left-color: var(--gold);
    }
    .topnav .menu a.active::after { display: none; }
}
