/* 外贸素材库 · 界面样式（不依赖外部字体，国内访问也快） */
:root {
  --ink: #15181C;
  --ink-2: #2A3038;
  --text-2: #3D4651;
  --muted: #5B636E;
  --line: #DDE1E6;
  --line-2: #EDEFF2;
  --bg: #F3F4F6;
  --bg-2: #EEF0F3;
  --card: #FFFFFF;
  --accent: #F2B01E;
  --accent-ink: #7A4E00;
  --green-bg: #E4F3EA; --green: #1D6B3A;
  --amber-bg: #FDEBD3; --amber: #7A3E00;
  --red-bg: #FBE3E1; --red: #9B1C13;
  --blue-bg: #E3ECFD; --blue: #1D4FB8;
  --wa: #25D366; --wa-ink: #0B2E17;
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--accent-ink); }
a:hover { color: #4F3200; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 26px; font-weight: 700; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid #2563EB; outline-offset: 2px; }

.muted { color: var(--muted); }
.sm { font-size: 13px; }
.xs { font-size: 12px; }
.nowrap { white-space: nowrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.ellipsis { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pre { white-space: pre-line; }
.danger-text { color: var(--red) !important; }
.warn { color: var(--amber); background: var(--amber-bg); padding: 8px 12px; border-radius: 8px; }
.link { background: none; border: 0; padding: 0; color: var(--accent-ink); text-decoration: underline; cursor: pointer; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.loading { padding: 60px 20px; text-align: center; color: var(--muted); }
.mobile-only { display: none !important; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 0 16px; border: 1px solid #CDD2D8; border-radius: 10px;
  background: #fff; color: var(--ink); font-size: 14px; font-weight: 500; text-decoration: none;
  cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s;
}
.btn:hover { background: #F7F8FA; color: var(--ink); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.sm { min-height: 34px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.lg { min-height: 48px; font-size: 15px; font-weight: 700; padding: 0 22px; }
.btn.block { width: 100%; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--ink); font-weight: 700; }
.btn.primary:hover { background: #E3A40F; }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.btn.dark:hover { background: var(--ink-2); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--bg); }
.btn.wa { background: var(--wa); border-color: var(--wa); color: var(--wa-ink); font-weight: 700; }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; font-weight: 700; }
.btn.danger-outline { border-color: var(--red); color: var(--red); background: #fff; }
.btn.dark-ghost { background: var(--ink-2); border-color: var(--ink-2); color: #fff; }
.btn.add { background: var(--accent); border-color: var(--accent); font-weight: 600; }
.btn.add:hover { background: #E3A40F; }
.btn.add.on { background: var(--green-bg); border-color: var(--green-bg); color: var(--green); }
.btn svg { flex-shrink: 0; }
.btn.grow { flex: 1 1 0; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 10px; background: var(--bg); cursor: pointer; color: var(--ink); flex-shrink: 0; }
.icon-btn:hover { background: var(--line); }
.icon-btn.sm { width: 32px; height: 32px; background: transparent; color: var(--muted); }
.icon-btn.sm:hover { background: var(--bg); color: var(--ink); }

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: 100vh; }
.side {
  width: 232px; flex-shrink: 0; background: var(--ink); color: #fff; display: flex; flex-direction: column; gap: 22px;
  padding: 20px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; }
.brand .logo { width: 40px; height: 40px; border-radius: 10px; background: var(--accent); color: var(--ink); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; overflow: hidden; flex-shrink: 0; }
.brand .logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.brand b { display: block; font-size: 16px; }
.brand span { display: block; font-size: 12px; color: #9AA3AE; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border-radius: 8px; color: #C3CAD3; text-decoration: none; font-size: 14px; }
.nav-item:hover { background: #1F242A; color: #fff; }
.nav-item.on { background: var(--ink-2); color: #fff; }
.nav-item .dot { width: 7px; height: 7px; border-radius: 2px; background: #4A535E; flex-shrink: 0; }
.nav-item.on .dot { background: var(--accent); }
.nav-extra { font-size: 11px; color: #9AA3AE; }
.nav-group { margin: 14px 12px 4px; font-size: 12px; color: #8E97A3; letter-spacing: 1px; }
.me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 14px 6px 0; border-top: 1px solid var(--ink-2); }
.me b { display: block; font-size: 13px; }
.me span { display: block; font-size: 12px; color: #9AA3AE; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--ink-2); display: flex; align-items: center; justify-content: center; color: #C3CAD3; font-weight: 700; flex-shrink: 0; }

.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; padding: 12px 28px; background: #fff; border-bottom: 1px solid var(--line); }
.search { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border: 1px solid #CDD2D8; border-radius: 10px; background: #F7F8FA; color: var(--muted); max-width: 760px; }
.search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 14px; color: var(--ink); }
.basket-btn { min-height: 44px; margin-left: auto; }
.count-pill { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--ink); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.count-pill.zero { background: #4A535E; color: #fff; }
.view { padding: 26px 28px 64px; max-width: 1320px; width: 100%; }

/* ---------- 页面通用 ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.ph-text { display: flex; flex-direction: column; gap: 6px; max-width: 760px; }
.ph-text p { color: var(--muted); font-size: 14px; line-height: 1.7; }
.ph-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.block { margin-top: 30px; }
.block > h2 { margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.block-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-bottom: 14px; }
.block-head h2 { margin: 0; }
.count { font-size: 13px; font-weight: 600; color: var(--muted); background: var(--bg-2); padding: 1px 8px; border-radius: 999px; }
.card-block { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card-block.flush { padding: 0; overflow: hidden; }
.card-block h2 { margin-bottom: 12px; }
.block.card-block { margin-top: 24px; }
.en-box { display: flex; flex-direction: column; gap: 4px; margin-bottom: 20px; }
.en-box p { color: var(--text-2); }
.back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 16px; font-weight: 600; text-decoration: none; min-height: 32px; }
.empty { padding: 40px 20px; border: 1px dashed #CDD2D8; border-radius: var(--radius); text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 12px; background: #fff; }
.empty.small { padding: 22px 14px; }
.hint { font-size: 12px; color: var(--muted); line-height: 1.6; }
.banner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 14px 18px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); margin: 16px 0 6px; }
.banner b { display: block; font-size: 15px; }
.banner.dark { background: var(--ink-2); color: #fff; border-color: var(--ink-2); }
.step-no { font-size: 22px; font-weight: 800; color: var(--muted); margin-right: 4px; font-variant-numeric: tabular-nums; }
.en-label { font-size: 13px; font-weight: 500; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chips.static { margin-bottom: 14px; }
.chip { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 14px; border: 1px solid #CDD2D8; border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; font-size: 13px; }
.chips.static .chip { border-radius: 8px; background: var(--bg); border-color: transparent; }
a.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--bg-2); color: var(--text-2); }
.badge.gray { background: var(--bg-2); color: var(--text-2); }
.badge.amber { background: var(--amber-bg); color: var(--amber); }
.badge.red { background: var(--red-bg); color: var(--red); }
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.blue { background: var(--blue-bg); color: var(--blue); }
.badge.dark { background: var(--ink-2); color: #fff; }
.badges { display: flex; flex-wrap: wrap; gap: 4px; }
.badges:empty { display: none; }

/* ---------- 网格 ---------- */
.grid { display: grid; gap: 14px; }
.grid.packs { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.grid.cats { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.grid.products { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.grid.sups { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.grid.tiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }

.pack { display: flex; flex-direction: column; gap: 10px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.pack-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.pack-top .en { font-size: 12px; font-weight: 700; letter-spacing: .8px; color: var(--muted); }
.pack-items { font-size: 13px; line-height: 1.7; flex: 1; color: var(--text-2); }

.cat { display: flex; flex-direction: column; gap: 2px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.cat:hover { border-color: var(--ink); color: var(--ink); }
.cat-img { aspect-ratio: 4 / 3; border-radius: 10px; background: var(--bg-2); overflow: hidden; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; color: #9AA3AE; }
.cat-img img { width: 100%; height: 100%; object-fit: cover; }
.cat b { font-size: 15px; }

.list { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ask { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); color: var(--ink); text-decoration: none; }
.ask:last-child, .share-row:last-child { border-bottom: 0; }
.ask:hover { background: #FAFAFB; color: var(--ink); }
.ask .q { flex: 1 1 280px; font-weight: 600; font-size: 15px; }
.ask .muted { flex: 0 1 140px; }
.ask .to { flex: 1 1 220px; color: var(--accent-ink); font-weight: 600; }
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.share-row .grow { display: flex; flex-direction: column; gap: 2px; }
.views { font-size: 12px; color: var(--muted); }
.views.seen { color: var(--green); font-weight: 600; }

.pcard { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pthumb { position: relative; aspect-ratio: 4 / 3; background: var(--bg-2); display: flex; align-items: center; justify-content: center; color: #9AA3AE; }
.pthumb.wide { aspect-ratio: 16 / 10; }
.pthumb img { width: 100%; height: 100%; object-fit: cover; }
.tag { position: absolute; top: 10px; left: 10px; padding: 3px 10px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; }
.pbody { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px 4px; }
.pbody .model { font-size: 21px; font-weight: 800; letter-spacing: .2px; }
.pbody b { font-size: 15px; }
.pactions { display: flex; gap: 8px; padding: 12px 16px 16px; margin-top: auto; }
.pactions > * { flex: 1 1 0; }

.sup { display: flex; flex-direction: column; gap: 2px; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; }
.sup b { font-size: 17px; }
.sup:hover { border-color: var(--ink); color: var(--ink); }
.sup.on { box-shadow: 0 0 0 2px var(--ink); border-color: var(--ink); }

.tile { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; }
.tile b { font-size: 28px; font-weight: 800; line-height: 1.1; }
.tile.on { box-shadow: 0 0 0 2px var(--ink); }
.tile .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }

/* ---------- 资料卡片 ---------- */
.acard { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.athumb { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.athumb.mini { width: 56px; border-radius: 8px; overflow: hidden; }
.thumb { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; background: var(--bg-2); overflow: hidden; color: #9AA3AE; }
.thumb.dark { background: var(--ink-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.athumb.mini .play svg { width: 22px; height: 22px; }
.thumb .kind { position: absolute; top: 8px; right: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.92); color: var(--ink); font-size: 11px; font-weight: 600; }
.athumb.mini .kind { display: none; }
.ph-label { font-size: 12px; color: var(--muted); }
.thumb.dark .ph-label { color: #C3CAD3; }
.ph-icon { display: flex; flex-direction: column; align-items: center; gap: 6px; color: #9AA3AE; }
.abody { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 6px; }
.atitle { font-size: 14px; line-height: 1.45; word-break: break-word; }
.aactions { display: flex; flex-direction: column; gap: 8px; padding: 8px 14px 14px; margin-top: auto; }
.aactions .btn.add { width: 100%; }
.dl { display: flex; flex-wrap: wrap; gap: 2px; }
.dl .btn { color: var(--text-2); }

/* ---------- 产品详情 ---------- */
.detail { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; }
.gallery { display: flex; flex-direction: column; gap: 10px; }
.gmain { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); background: var(--bg-2); border: 0; padding: 0; overflow: hidden; display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center; cursor: zoom-in; color: #9AA3AE; }
.gmain img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.gthumbs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.gthumb { aspect-ratio: 1; border: 2px solid transparent; border-radius: 8px; padding: 0; overflow: hidden; background: var(--bg-2); cursor: pointer; }
.gthumb.on { border-color: var(--ink); }
.gthumb img { width: 100%; height: 100%; object-fit: cover; }
.dinfo { display: flex; flex-direction: column; gap: 10px; }
.model-xl { font-size: 40px; font-weight: 800; letter-spacing: .2px; line-height: 1.05; }
.name-cn { font-size: 20px; font-weight: 700; }
.summary { color: var(--text-2); line-height: 1.7; }
.factories { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.factories .muted { flex-basis: 100%; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; background: #fff; }
.table th { text-align: left; font-size: 12px; font-weight: 700; color: var(--text-2); background: #F7F8FA; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.dim td { opacity: .55; }
.table.specs td:first-child, .table.specs td:nth-child(2) { color: var(--text-2); width: 26%; }
.tthumb { width: 72px; }
.mini-img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: var(--bg-2); display: block; }
.table.assets td:nth-child(2) { min-width: 220px; max-width: 360px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filters select, .filters input { min-height: 40px; padding: 0 12px; border: 1px solid #CDD2D8; border-radius: 10px; background: #fff; }
.filters input { flex: 1 1 220px; }

/* ---------- 表单 ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field small { font-size: 12px; }
.field.narrow { max-width: 260px; }
.field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea {
  width: 100%; min-height: 42px; padding: 8px 12px; border: 1px solid #CDD2D8; border-radius: 10px; background: #fff; font-size: 14px;
}
.field textarea { resize: vertical; line-height: 1.6; }
.field input:disabled { background: var(--bg); color: var(--muted); }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border: 1px solid #CDD2D8; border-radius: 999px; background: #fff; font-size: 13px; }
.seg input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid #2563EB; outline-offset: 2px; }
.check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--ink); flex-shrink: 0; }
.check.pad-top { padding-top: 28px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 14px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.rows { display: flex; flex-direction: column; gap: 6px; }
.rowedit { display: flex; gap: 6px; align-items: center; }
.rowedit input { flex: 1 1 0; min-width: 0; min-height: 38px; padding: 0 10px; border: 1px solid #CDD2D8; border-radius: 8px; }
.spec-row input:nth-child(3) { flex: 1.4 1 0; }
.cat-row { margin-bottom: 8px; }
.w-sort { flex: 0 0 64px !important; }
.sm-select { min-height: 32px; padding: 0 8px; border: 1px solid #CDD2D8; border-radius: 8px; background: #fff; font-size: 13px; }
.kv { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.kv span { width: 120px; color: var(--muted); }
.logo-preview { width: 64px; height: 64px; border-radius: 12px; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; overflow: hidden; background: #fff; }
.logo-preview img { width: 100%; height: 100%; object-fit: contain; }

.dropzone { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 16px; border: 2px dashed #CDD2D8; border-radius: var(--radius); background: #F7F8FA; cursor: pointer; text-align: center; color: var(--text-2); }
.dropzone.over { border-color: var(--ink); background: #fff; }
.uplist { display: flex; flex-direction: column; gap: 6px; }
.upitem { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.upitem .grow { display: flex; flex-direction: column; gap: 2px; }
.bar { height: 4px; border-radius: 4px; background: var(--bg-2); overflow: hidden; margin-top: 4px; }
.bar i { display: block; height: 100%; background: var(--accent); transition: width .2s; }
.edit-preview { display: flex; gap: 12px; align-items: flex-start; padding: 12px; background: var(--bg); border-radius: 12px; }
.edit-preview .athumb { width: 120px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.edit-preview .grow { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }

/* ---------- 抽屉、弹窗、提示 ---------- */
.overlay { position: fixed; inset: 0; background: rgba(21, 24, 28, .42); z-index: 50; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 440px; max-width: 100%; background: #fff; z-index: 51; display: flex; flex-direction: column; box-shadow: -10px 0 32px rgba(0, 0, 0, .14); animation: slide .18s ease-out; }
.drawer.wide { width: 560px; }
@keyframes slide { from { transform: translateX(24px); opacity: .6; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer-body { flex: 1 1 auto; overflow-y: auto; padding: 18px 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.drawer-body h3 { margin-top: 4px; }
.drawer-foot { display: flex; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: #fff; }
.bitems { display: flex; flex-direction: column; gap: 6px; }
.bitem { display: flex; align-items: center; gap: 10px; padding: 8px 6px 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.bitem .grow { display: flex; flex-direction: column; font-size: 13px; }
.share-form { display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: 12px; background: var(--bg); }
.share-result { display: flex; flex-direction: column; gap: 12px; }
.link-box { padding: 12px 14px; border: 1px solid var(--ink); border-radius: 10px; font-family: var(--mono); font-size: 13px; word-break: break-all; background: #fff; }
.share-result textarea { background: #EAF7EF !important; border-color: #CBE9D6 !important; }

.modal-wrap { position: fixed; inset: 0; z-index: 60; background: rgba(21, 24, 28, .6); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: #fff; border-radius: 16px; width: 480px; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.modal.confirm { padding: 22px; gap: 12px; }
.modal.confirm p { color: var(--text-2); line-height: 1.7; }
.modal.preview { width: 1000px; }
.pv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--line); }
.pv-head b { display: block; }
.pv-body { flex: 1 1 auto; min-height: 0; background: #111; display: flex; align-items: center; justify-content: center; }
.pv-img { max-width: 100%; max-height: 72vh; object-fit: contain; }
.pv-video { width: 100%; max-height: 72vh; background: #000; }
.pv-pdf { width: 100%; height: 72vh; border: 0; background: #fff; }
.pv-empty { padding: 60px 20px; color: #C3CAD3; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pv-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); }

#toast-root { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { padding: 11px 20px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .22); transition: opacity .3s, transform .3s; max-width: 90vw; text-align: center; }
.toast.error { background: var(--red); }
.toast.out { opacity: 0; transform: translateY(6px); }

/* ---------- 登录 ---------- */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--ink); }
.auth-card { width: 400px; max-width: 100%; background: #fff; border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.auth-card .brand { padding: 0; margin-bottom: 4px; }
.auth-card .brand span { color: var(--muted); }

/* ---------- 手机 ---------- */
@media (max-width: 900px) {
  .detail { grid-template-columns: 1fr; }
  .three { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .mobile-only { display: inline-flex !important; }
  .hide-sm { display: none; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; z-index: 40; transform: translateX(-100%); transition: transform .2s; width: 260px; }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(21, 24, 28, .4); }
  .brand .icon-btn { margin-left: auto; background: var(--ink-2); color: #fff; }
  .topbar { padding: 10px 12px; gap: 8px; }
  .search { height: 42px; padding: 0 10px; }
  .basket-btn { padding: 0 10px; flex-shrink: 0; }
  .view { padding: 18px 14px 56px; }
  h1 { font-size: 22px; }
  .model-xl { font-size: 32px; }
  .two, .three { grid-template-columns: 1fr; }
  .grid.products, .grid.cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .grid.cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pactions { flex-direction: column; }
  .pbody .model { font-size: 18px; }
  .drawer, .drawer.wide { width: 100%; }
  .check.pad-top { padding-top: 0; }
  .gthumbs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .modal-wrap { padding: 0; }
  .modal.preview { border-radius: 0; height: 100%; }
}
@media (max-width: 420px) {
  .grid.products, .grid.cards { grid-template-columns: 1fr; }
}
