/* 前台 + 后台共用一份样式；后台多出来的在文件末尾 .adm 段 */
:root {
    --brand: #e8590c;
    --brand-dark: #c2410c;
    --brand-soft: #fff4ec;
    --text: #1f2328;
    --text-2: #57606a;
    --text-3: #8c959f;
    --line: #e5e7eb;
    --bg: #f5f6f8;
    --card: #fff;
    --ok: #16a34a;
    --danger: #dc2626;
    --radius: 12px;
    --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font: 15px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--text-3); }
.hidden { display: none !important; }

/* ---------- 顶栏 ---------- */
.topbar {
    position: sticky; top: 0; z-index: 20;
    background: #111827; color: #fff;
}
.topbar .wrap { display: flex; align-items: center; gap: 12px; height: 52px; }
.logo { font-weight: 700; font-size: 17px; white-space: nowrap; }
.logo b { color: var(--brand); }
.topbar form { flex: 1; min-width: 0; }
.topbar input[type=search] {
    width: 100%; height: 34px; border: 0; border-radius: 17px;
    padding: 0 14px; background: #fff1; color: #fff; outline: none;
}
.topbar input[type=search]::placeholder { color: #fff9; }
.topbar .promo-link {
    white-space: nowrap; font-size: 13px; padding: 5px 12px;
    border-radius: 16px; background: var(--brand);
}

/* ---------- 筛选 ---------- */
.filters { background: var(--card); border-bottom: 1px solid var(--line); }
.filter-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.filter-row:last-child { border-bottom: 0; }
.filter-row > .label { flex: none; width: 40px; color: var(--text-3); font-size: 13px; line-height: 28px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.chips::-webkit-scrollbar { display: none; }
.chip {
    flex: none; height: 28px; line-height: 28px; padding: 0 12px;
    border-radius: 14px; background: var(--bg); font-size: 13px; color: var(--text-2);
}
.chip.on { background: var(--brand); color: #fff; }
.chip small { opacity: .7; margin-left: 2px; }

.listbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 0 4px; font-size: 13px; color: var(--text-2); }
.sorts { display: flex; gap: 14px; }
.sorts a.on { color: var(--brand); font-weight: 600; }

/* ---------- 车辆卡片 ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 8px 0 20px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(4, 1fr); } }

.card { background: var(--card); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card .pic { position: relative; aspect-ratio: 4 / 3; background: #eceef1; }
.card .pic img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card .title { font-size: 14px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { font-size: 12px; color: var(--text-3); }
.card .price { margin-top: auto; color: var(--brand); font-weight: 700; font-size: 17px; }
.card .price del { color: var(--text-3); font-weight: 400; font-size: 12px; margin-left: 4px; }

.tag {
    display: inline-block; font-size: 11px; line-height: 18px; padding: 0 6px;
    border-radius: 4px; background: var(--brand-soft); color: var(--brand-dark); font-weight: 500;
}
.tag.used { background: #eef2ff; color: #4338ca; }
.tag.sold { background: #111827cc; color: #fff; }
.tag.hot { background: var(--brand); color: #fff; }
.pic .tags { position: absolute; left: 6px; top: 6px; display: flex; gap: 4px; }
.pic .sold-mask {
    position: absolute; inset: 0; background: #0006; color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; letter-spacing: 4px;
}
.noimg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text-3); font-size: 13px; }

.empty { text-align: center; padding: 60px 0; color: var(--text-3); }

/* ---------- 分页 ---------- */
.pager { display: flex; justify-content: center; gap: 6px; padding: 8px 0 28px; flex-wrap: wrap; }
.pager a, .pager span {
    min-width: 34px; height: 34px; line-height: 34px; text-align: center; padding: 0 10px;
    border-radius: 8px; background: var(--card); font-size: 14px;
}
.pager .on { background: var(--brand); color: #fff; }
.pager .off { color: var(--text-3); }

/* ---------- 详情 ---------- */
.detail { padding-bottom: calc(72px + var(--safe-b)); }
@media (min-width: 900px) {
    .detail .cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; padding-top: 20px; }
}
.gallery { position: relative; background: #111; }
@media (min-width: 900px) { .gallery { border-radius: var(--radius); overflow: hidden; } }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
/* 一张一格：先铺模糊小图（--ph，几 KB），大图下完淡入盖上 —— 网慢也马上有样子，不是一块黑 */
.slide { position: relative; flex: none; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; scroll-snap-align: center; }
.slide::before { content: ''; position: absolute; inset: -12px; background: var(--ph) center / cover no-repeat; filter: blur(12px); opacity: .85; }
.slide img { position: relative; width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; opacity: 0; transition: opacity .35s ease; }
.slide img.in { opacity: 1; }
.thumbs img { background: #e5e7eb; }
.gallery .count {
    position: absolute; right: 10px; bottom: 10px; background: #0008; color: #fff;
    font-size: 12px; padding: 2px 10px; border-radius: 10px;
}
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0; }
.thumbs img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; opacity: .6; cursor: pointer; flex: none; }
.thumbs img.on { opacity: 1; outline: 2px solid var(--brand); }

.panel { background: var(--card); padding: 14px 16px; margin-top: 10px; }
@media (min-width: 900px) { .panel { border-radius: var(--radius); } .panel:first-child { margin-top: 0; } }
.panel h1 { font-size: 19px; margin: 6px 0 8px; line-height: 1.35; }
.panel h2 { font-size: 15px; margin: 0 0 10px; }
.big-price { color: var(--brand); font-size: 26px; font-weight: 700; }
.big-price del { color: var(--text-3); font-size: 14px; font-weight: 400; margin-left: 8px; }
.specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 8px; }
.specs div { background: var(--bg); border-radius: 8px; padding: 8px; text-align: center; }
.specs b { display: block; font-size: 15px; }
.specs span { font-size: 12px; color: var(--text-3); }
.desc { white-space: pre-wrap; color: var(--text-2); font-size: 14px; }

.shop-row { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.shop-row:first-of-type { border-top: 0; }
.shop-row .ico { flex: none; width: 22px; text-align: center; }
.shop-row .txt { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.shop-row .act { flex: none; font-size: 13px; color: var(--brand); padding: 2px 10px; border: 1px solid var(--brand); border-radius: 14px; background: none; cursor: pointer; }

.actionbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--card); border-top: 1px solid var(--line);
    padding: 8px 16px calc(8px + var(--safe-b));
}
.actionbar .wrap { display: flex; gap: 10px; padding: 0; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 44px; padding: 0 18px; border-radius: 22px; border: 0; cursor: pointer;
    background: var(--brand); color: #fff; font-weight: 600; font-size: 15px;
}
.btn.ghost { background: var(--brand-soft); color: var(--brand-dark); }
.btn.dark { background: #111827; }
.btn.block { width: 100%; }
.btn.sm { height: 32px; padding: 0 14px; font-size: 13px; border-radius: 16px; }
.btn.danger { background: #fee2e2; color: var(--danger); }
.btn:disabled { opacity: .5; }
.actionbar .btn { flex: 1; }

/* ---------- 底部弹层 / 推广 ---------- */
.sheet-mask { position: fixed; inset: 0; background: #0007; z-index: 50; display: none; }
.sheet-mask.open { display: block; }
.sheet {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 51;
    background: var(--card); border-radius: 16px 16px 0 0;
    padding: 18px 16px calc(18px + var(--safe-b));
    max-width: 520px; margin: 0 auto; transform: translateY(110%); transition: transform .2s;
    max-height: 90vh; overflow-y: auto;
}
.sheet.open { transform: none; }
.sheet h3 { margin: 0 0 12px; font-size: 16px; text-align: center; }
.sheet .close { position: absolute; right: 12px; top: 10px; border: 0; background: none; font-size: 22px; color: var(--text-3); cursor: pointer; }

.qr-box { text-align: center; }
.qr-box img { width: 200px; height: 200px; margin: 0 auto; border: 1px solid var(--line); border-radius: 8px; }
.link-box { display: flex; gap: 8px; margin: 12px 0; }
.link-box input { flex: 1; min-width: 0; height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; background: var(--bg); font-size: 13px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
    width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 10px;
    padding: 0 12px; background: #fff; outline: none; font-size: 16px;
}
.field textarea { height: auto; min-height: 110px; padding: 10px 12px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); }
.field .err, .err { color: var(--danger); font-size: 12px; margin-top: 4px; }

.toast {
    position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 99;
    background: #000c; color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 14px;
    pointer-events: none; opacity: 0; transition: opacity .2s;
}
.toast.show { opacity: 1; }
.flash { background: #dcfce7; color: #166534; padding: 10px 16px; font-size: 14px; }
.flash.bad { background: #fee2e2; color: #991b1b; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stats div { background: var(--bg); border-radius: 10px; padding: 12px 6px; text-align: center; }
.stats b { display: block; font-size: 22px; color: var(--brand); }
.stats span { font-size: 12px; color: var(--text-3); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.list li:last-child { border-bottom: 0; }

.viewer { position: fixed; inset: 0; background: #000; z-index: 60; display: none; align-items: center; justify-content: center; }
.viewer.open { display: flex; }
.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; }

.footer { text-align: center; color: var(--text-3); font-size: 12px; padding: 20px 0 30px; }

/* =============== 后台（只做手机版） =============== */
.adm { max-width: 560px; margin: 0 auto; min-height: 100vh; background: var(--bg); padding-bottom: calc(70px + var(--safe-b)); }
.adm-head {
    position: sticky; top: 0; z-index: 20; height: 48px; background: #111827; color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 16px;
}
.adm-head .l, .adm-head .r { position: absolute; top: 0; height: 48px; display: flex; align-items: center; padding: 0 14px; font-size: 14px; font-weight: 400; }
.adm-head .l { left: 0; }
.adm-head .r { right: 0; color: #fdba74; }
.adm-head .r button { background: none; border: 0; color: inherit; padding: 0; cursor: pointer; }
.adm-body { padding: 12px; }
.adm-tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; max-width: 560px; margin: 0 auto;
    background: var(--card); border-top: 1px solid var(--line);
    display: flex; padding-bottom: var(--safe-b);
}
.adm-tabs a { flex: 1; text-align: center; padding: 7px 0 6px; font-size: 11px; color: var(--text-3); }
.adm-tabs a i { display: block; font-style: normal; font-size: 20px; line-height: 24px; }
.adm-tabs a.on { color: var(--brand); }

.box { background: var(--card); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; }
.box h3 { margin: 0 0 10px; font-size: 15px; }
.row-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: center; }
.row-item:last-child { border-bottom: 0; }
.row-item .thumb { width: 84px; height: 63px; border-radius: 8px; object-fit: cover; background: var(--bg); flex: none; }
.row-item .main { flex: 1; min-width: 0; }
.row-item .main .t { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-item .main .s { font-size: 12px; color: var(--text-3); }
.row-item .side { flex: none; text-align: right; font-size: 13px; }
.seg { display: flex; background: var(--card); border-radius: 10px; padding: 3px; margin-bottom: 12px; }
.seg a { flex: 1; text-align: center; padding: 6px 0; font-size: 13px; border-radius: 8px; color: var(--text-2); }
.seg a.on { background: var(--brand); color: #fff; }
.search-line { display: flex; gap: 8px; margin-bottom: 12px; }
.search-line input { flex: 1; min-width: 0; height: 38px; border: 1px solid var(--line); border-radius: 19px; padding: 0 14px; background: #fff; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.radio-seg { display: flex; gap: 8px; }
.radio-seg label { flex: 1; margin: 0; }
.radio-seg input { display: none; }
.radio-seg span { display: block; text-align: center; height: 40px; line-height: 40px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 14px; color: var(--text); }
.radio-seg input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.switch-line { display: flex; align-items: center; justify-content: space-between; }
.switch-line input { width: 22px; height: 22px; accent-color: var(--brand); }
.img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.img-grid .cell { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--bg); }
.img-grid .cell img { width: 100%; height: 100%; object-fit: cover; }
.img-grid .cell .ops { position: absolute; left: 0; right: 0; bottom: 0; display: flex; background: #0009; }
.img-grid .cell .ops button { flex: 1; border: 0; background: none; color: #fff; font-size: 12px; padding: 4px 0; cursor: pointer; }
.img-grid .cell .badge { position: absolute; left: 4px; top: 4px; }
.upload-cell {
    aspect-ratio: 1; border: 1.5px dashed #cbd5e1; border-radius: 8px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; color: var(--text-3); font-size: 12px; cursor: pointer; background: #fff;
}
.upload-cell b { font-size: 28px; line-height: 1; font-weight: 300; }
.upload-cell input { display: none; }
.sticky-save { position: fixed; left: 0; right: 0; bottom: calc(56px + var(--safe-b)); max-width: 560px; margin: 0 auto; padding: 8px 12px; background: linear-gradient(#f5f6f800, var(--bg) 30%); z-index: 25; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpis a, .kpis div { background: var(--card); border-radius: var(--radius); padding: 12px 8px; text-align: center; }
.kpis b { display: block; font-size: 22px; }
.kpis span { font-size: 12px; color: var(--text-3); }
.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form input { flex: 1; min-width: 0; height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; }
.inline-form input.num { flex: none; width: 60px; }
.status-ops { display: flex; gap: 6px; margin-top: 6px; }
.status-ops button { border: 1px solid var(--line); background: #fff; border-radius: 12px; font-size: 12px; padding: 2px 10px; cursor: pointer; }
.login-wrap { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 24px; max-width: 420px; margin: 0 auto; }
.login-wrap h1 { text-align: center; font-size: 22px; margin-bottom: 24px; }
.btn.wa { background: #25d366; color: #fff; }
.warranty-ok { color: var(--ok); font-weight: 600; }
.warranty-out { color: var(--danger); font-weight: 600; }
.kv { display: grid; grid-template-columns: 84px 1fr; gap: 6px 10px; font-size: 14px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.menu-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.menu-grid a { background: var(--bg); border-radius: 10px; padding: 12px 4px; text-align: center; font-size: 12px; color: var(--text-2); }
.menu-grid a i { display: block; font-style: normal; font-size: 22px; line-height: 28px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 8px 4px; border-bottom: 1px solid var(--line); text-align: right; }
.table th:first-child, .table td:first-child { text-align: left; }
.table th { color: var(--text-3); font-weight: 400; }
.table tfoot td { font-weight: 700; border-bottom: 0; }
/* 手机上 logo 只留 MOTO，把地方让给搜索框 */
@media (max-width: 560px) { .logo span { display: none; } }
.captcha-line { display: flex; gap: 8px; align-items: center; }
.captcha-line input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: 2px; }
.captcha-line img { flex: none; width: 120px; height: 42px; border-radius: 8px; border: 1px solid var(--line); cursor: pointer; }
.captcha-line input::placeholder { text-transform: none; letter-spacing: 0; }
/* 360° 环拍 */
.tag.spin360 { background: #111827cc; color: #fff; }
.view-tabs { display: flex; gap: 6px; padding: 8px 16px; background: var(--card); }
.view-tabs button { flex: 1; height: 34px; border: 1px solid var(--line); background: #fff; border-radius: 17px; font-size: 14px; cursor: pointer; color: var(--text-2); }
.view-tabs button.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
@media (min-width: 900px) { .view-tabs { border-radius: var(--radius) var(--radius) 0 0; padding: 8px 0; background: none; } }
.gallery.spin { aspect-ratio: 4 / 3; background: #fff; touch-action: pan-y; user-select: none; cursor: grab; }
.gallery.spin img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.spin-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #0001; }
.spin-bar i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }
.gallery.spin.ready .spin-bar { display: none; }
.spin-hint {
    position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%);
    background: #000a; color: #fff; font-size: 13px; padding: 4px 12px; border-radius: 14px; pointer-events: none;
    transition: opacity .3s;
}
.spin-hint.gone { opacity: 0; }
.spin-grid .cell { aspect-ratio: 4 / 3; }
/* 账号 / 收藏 */
.topbar .top-icon { font-size: 22px; line-height: 1; color: #fff; padding: 4px 2px; }
.auth-wrap { max-width: 440px; padding-top: 16px; padding-bottom: 30px; }
.actionbar .fav-form { flex: none; margin: 0; }
.actionbar .btn.fav { flex: none; width: 44px; padding: 0; font-size: 22px; background: var(--brand-soft); color: var(--brand); }
.actionbar .btn.fav.on { background: var(--brand); color: #fff; }
.fav-link { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: var(--brand-soft); border-radius: 10px; color: var(--brand-dark); font-weight: 600; }
.fav-item { display: flex; flex-direction: column; }
.fav-item .card { flex: 1; }
.fav-remove { width: 100%; margin-top: 6px; border: 0; background: none; color: var(--text-3); font-size: 12px; cursor: pointer; padding: 4px; }
/* 管理员权限勾选 */
.perm-line { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; cursor: pointer; }
.perm-line:last-child { border-bottom: 0; }
.perm-line input { width: 20px; height: 20px; flex: none; accent-color: var(--brand); }
/* 车辆类型大 tab（前台筛选最上面） */
.type-tabs { background: #111827; }
.type-tabs .wrap { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-top: 2px; padding-bottom: 10px; }
.type-tabs .wrap::-webkit-scrollbar { display: none; }
.type-tabs a { flex: none; padding: 6px 14px; border-radius: 16px; font-size: 14px; color: #fffc; background: #fff1; }
.type-tabs a.on { background: #fff; color: #111827; font-weight: 600; }
/* 配件库存状态 */
.tag.stock-in { background: #dcfce7; color: #166534; }
.tag.stock-low { background: #fef3c7; color: #92400e; }
.tag.stock-out { background: #e5e7eb; color: #4b5563; }
.stock-text-in { color: var(--ok); font-weight: 600; }
.stock-text-low { color: #b45309; font-weight: 600; }
.stock-text-out { color: var(--text-3); font-weight: 600; }
.parts-search { padding: 10px 0 2px; }
.parts-search input { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 19px; padding: 0 14px; background: var(--bg); outline: none; }
.stock-ops { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.stock-ops button { width: 30px; height: 26px; border: 1px solid var(--line); background: #fff; border-radius: 8px; font-size: 15px; cursor: pointer; }
.stock-ops b { min-width: 34px; text-align: center; }
.stock-ops b.low { color: var(--danger); }

/* ---------- 前台「My purchases」：客户看自己的订单和保修期 ---------- */
.purchase-hd { display: flex; gap: 12px; align-items: center; }
.purchase-hd img { width: 72px; height: 54px; object-fit: cover; border-radius: 8px; flex: none; background: #f3f4f6; }
.purchase-hd b { display: block; font-size: 15px; line-height: 1.35; }
.purchase-hd .muted { font-size: 13px; margin-top: 2px; }
.warranty { margin-top: 12px; padding: 10px 12px; border-radius: 8px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.warranty span { margin-left: auto; font-weight: 600; }
.warranty.ok { background: #ecfdf5; color: #047857; }
.warranty.out { background: #f3f4f6; color: #6b7280; }
.warranty.none { background: #f9fafb; color: #6b7280; }
/* ---------- 前台 09-26 体验改版：筛选收成一行 + 弹层、底栏、页脚展厅卡 ---------- */
.fbar { background: var(--card); border-bottom: 1px solid var(--line); }
.fbar-row { display: flex; align-items: center; gap: 8px; padding-top: 10px; padding-bottom: 10px; }
.fbtn {
    flex: none; display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 12px;
    border: 1px solid var(--line); border-radius: 17px; background: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
}
.fbtn.on { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-soft); }
.fbtn i { font-style: normal; min-width: 18px; height: 18px; line-height: 18px; border-radius: 9px; background: var(--brand); color: #fff; font-size: 11px; text-align: center; }
.fquick { flex: none; display: flex; gap: 2px; background: var(--bg); border-radius: 17px; padding: 2px; }
.fquick a { flex: none; height: 30px; line-height: 30px; padding: 0 12px; border-radius: 15px; font-size: 13px; color: var(--text-2); }
.fquick a.on { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 1px 2px #0002; }
.fsort { margin: 0; flex: 1; min-width: 0; display: flex; justify-content: flex-end; }
.fsort select {
    height: 34px; width: 100%; max-width: 170px; border: 0; text-overflow: ellipsis; background: none; color: var(--text-2); font-size: 13px;
    padding: 0 18px 0 4px; appearance: none; -webkit-appearance: none; cursor: pointer; text-align: right;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238c959f'/%3E%3C/svg%3E") right 4px center no-repeat;
}
.fchips { display: flex; gap: 6px; flex-wrap: wrap; padding-bottom: 10px; }
.fchip { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border-radius: 14px; background: var(--brand-soft); color: var(--brand-dark); font-size: 13px; }
.fchip b { font-weight: 400; font-size: 16px; line-height: 1; }
.fclear { height: 28px; line-height: 28px; padding: 0 6px; font-size: 13px; color: var(--text-3); text-decoration: underline; }
.fsheet { padding-bottom: 0; }
.fgroup { padding: 4px 0 12px; }
.fgroup h4 { margin: 0 0 8px; font-size: 14px; }
.fopts { display: flex; flex-wrap: wrap; gap: 8px; }
.fopts label { margin: 0; cursor: pointer; }
.fopts input { position: absolute; opacity: 0; pointer-events: none; }
.fopts span { display: block; min-height: 36px; line-height: 20px; padding: 8px 14px; border-radius: 18px; background: var(--bg); font-size: 14px; color: var(--text-2); border: 1px solid transparent; }
.fopts input:checked + span { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); font-weight: 600; }
.fopts input:focus-visible + span { outline: 2px solid var(--brand); }
.fsheet-ft { position: sticky; bottom: 0; display: flex; gap: 10px; padding: 12px 0 calc(14px + var(--safe-b)); background: var(--card); border-top: 1px solid var(--line); }
.fsheet-ft .btn { flex: 1; }
.fsheet-ft .btn.ghost { flex: none; width: 110px; }
.filters .parts-search { padding-bottom: 10px; }
.listbar { padding-top: 10px; }

.trust { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 12px 0 0; }
.trust::-webkit-scrollbar { display: none; }
.trust span { flex: none; display: flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 8px; background: var(--card); font-size: 12px; color: var(--text-2); }
.trust i { font-style: normal; }
.empty-acts { display: flex; gap: 10px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }

.buy-notes { list-style: none; margin: 10px 0 0; padding: 10px 0 0; border-top: 1px dashed var(--line); font-size: 13px; color: var(--text-2); }
.buy-notes li { display: flex; gap: 6px; padding: 2px 0; }
.buy-notes i { font-style: normal; flex: none; }
.specs b { font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }

.site-foot { padding-top: 6px; }
.shop-card { background: var(--card); border-radius: var(--radius); padding: 14px 16px; }
.shop-card h2 { margin: 0 0 6px; font-size: 16px; }
.shop-card p { margin: 4px 0; font-size: 14px; color: var(--text-2); overflow-wrap: anywhere; }
.shop-card .pay { font-size: 12px; color: var(--text-3); margin-top: 10px; }
.shop-acts { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.shop-acts .btn { flex: 1; min-width: 90px; height: 40px; }

/* 手机底栏（详情页没有：那里是 WhatsApp / Call 操作条） */
.tabbar { display: none; }
@media (max-width: 719px) {
    .has-tabbar { padding-bottom: calc(60px + var(--safe-b)); }
    .has-tabbar .top-desk { display: none; }
    .tabbar {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
        background: var(--card); border-top: 1px solid var(--line); padding-bottom: var(--safe-b);
    }
    .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0 6px; font-size: 11px; color: var(--text-3); }
    .tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .tabbar a.on { color: var(--brand); }
    .tabbar a.on svg { stroke-width: 2.2; }
    .tabbar a.chat { color: #128c4b; font-weight: 600; }
    .tabbar a.chat span { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-top: -20px; border-radius: 50%; background: #25d366; box-shadow: 0 2px 8px #25d36666; border: 3px solid #fff; }
    .tabbar a.chat svg { stroke: #fff; width: 22px; height: 22px; }
    .tabbar a.chat svg path + path { fill: #fff; stroke: none; }
    .topbar .wrap { gap: 10px; }
}

/* ---------- 已售出 / 已下架的详情页（老板 09-26：下架的也能看，但要写明） ---------- */
.panel.gone { background: #fff7ed; border-left: 4px solid var(--brand); }
.gone-hd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gone-hd b { font-size: 16px; }
.gone-badge { background: #111827; color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 1px; padding: 2px 8px; border-radius: 4px; }
.panel.gone p { margin: 6px 0 10px; font-size: 13px; color: var(--text-2); }
.gone-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.big-price.gone-price { color: var(--text-3); }
.big-price small { display: block; font-size: 12px; font-weight: 400; color: var(--text-3); }
.actionbar .btn { white-space: nowrap; }

/* webp：<picture> 包一层后照样撑满卡片 */
.card .pic picture, .slide picture { display: contents; }
.thumbs picture { display: contents; }

/* ---------- 09-26 UI 打磨 ---------- */
.sheet { visibility: hidden; transition: transform .2s, visibility 0s linear .2s; }
.sheet.open { visibility: visible; transition: transform .2s; }
/* 顶栏搜索：左边放大镜，占位字短一点（详情页右边还有 ♡ 和登录，长了会被截） */
.topbar input[type=search] {
    padding-left: 34px;
    background: #fff1 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff99' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") 12px center no-repeat;
}
/* 电脑上：详情页底部操作条收成右下角一张浮卡，不再一整条横贯屏幕 */
@media (min-width: 900px) {
    .actionbar {
        left: auto; right: max(16px, calc((100vw - 1180px) / 2 + 16px)); bottom: 16px; width: 440px;
        border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 30px #0002; padding: 10px 12px;
    }
    .actionbar .btn { height: 42px; font-size: 14px; }
}