/* ==========================================================
   湘川人家干果铺 —— 样式表
   纯静态、无外部依赖，file:// 直接打开即可
   ========================================================== */

:root {
  --bg: #FBF6EE;
  --bg-2: #F5ECDF;
  --paper: #FFFFFF;
  --ink: #241C16;
  --ink-2: #57483C;
  --muted: #8D7C6C;
  --line: #E9DECC;
  --line-2: #F2E9DB;
  --brand: #A9331A;
  --brand-dark: #86230F;
  --brand-soft: #F8E7DE;
  --amber: #C97A2B;
  --gold: #C39A4E;
  --green: #4F7A5B;
  --ok-bg: #EAF3EC;
  --danger: #B3261E;
  --shadow-sm: 0 1px 2px rgba(74, 52, 33, .06), 0 4px 12px rgba(74, 52, 33, .05);
  --shadow-md: 0 2px 4px rgba(74, 52, 33, .06), 0 14px 32px rgba(74, 52, 33, .10);
  --shadow-lg: 0 18px 50px rgba(74, 52, 33, .16);
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 26px;
  --maxw: 1180px;
  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI", "Microsoft YaHei",
          "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans CJK SC", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.has-modal { overflow: hidden; }

img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--brand); color: #fff; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------------- 顶部导航 ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 246, 238, .88);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line-2);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 11px;
  background: linear-gradient(150deg, #B03A1E, #7E2413);
  display: grid; place-items: center;
  box-shadow: 0 4px 10px rgba(169, 51, 26, .25);
}
.brand-mark svg { width: 19px; height: 19px; }
.brand-name { font-size: 18px; font-weight: 800; letter-spacing: .02em; }
.brand-sub { display: block; font-size: 10.5px; letter-spacing: .16em; color: var(--muted); font-weight: 500; margin-top: -2px; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a {
  padding: 8px 13px; border-radius: 999px; font-size: 14.5px; color: var(--ink-2);
  transition: background .18s, color .18s;
}
.nav a:hover { background: #fff; color: var(--brand); }
.nav a.active { color: var(--brand); background: #fff; box-shadow: var(--shadow-sm); }

.header-tools { display: flex; align-items: center; gap: 10px; }

/* ---------------- 通用按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 18px; border-radius: 999px; border: 1px solid transparent;
  background: var(--brand); color: #fff; font-size: 14.5px; font-weight: 600;
  transition: transform .16s, box-shadow .16s, background .16s, border-color .16s, color .16s;
  box-shadow: 0 6px 16px rgba(169, 51, 26, .22);
  white-space: nowrap;
}
.btn:hover { background: var(--brand-dark); transform: translateY(-1px); box-shadow: 0 10px 22px rgba(169, 51, 26, .26); }
.btn:active { transform: translateY(0); }
.btn svg { width: 16px; height: 16px; }

.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--line); box-shadow: none; }
.btn-ghost:hover { background: #fff; color: var(--brand); border-color: #DCC9B0; box-shadow: var(--shadow-sm); transform: none; }

.btn-line { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-line:hover { background: #fff; color: var(--brand); border-color: #DCC9B0; }

.btn-danger { background: #fff; color: var(--danger); border-color: #F0D3CE; box-shadow: none; }
.btn-danger:hover { background: #FDF1EF; transform: none; box-shadow: none; }

.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.icon-btn {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line);
  background: #fff; display: grid; place-items: center; color: var(--muted);
  transition: all .16s; flex: none;
}
.icon-btn:hover { color: var(--brand); border-color: #DCC9B0; background: #FFFDF9; }
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn.danger:hover { color: var(--danger); border-color: #F0D3CE; background: #FDF1EF; }

/* ---------------- 首页 Hero ---------------- */
.hero { padding: 54px 0 20px; }
.hero-grid { display: grid; grid-template-columns: 1.02fr .98fr; gap: 56px; align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--brand); font-weight: 700; margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 22px; height: 1.5px; background: var(--brand); opacity: .5; }

.hero h1 {
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.14;
  letter-spacing: -.02em;
  font-weight: 800;
  margin-bottom: 20px;
}
.hero h1 em {
  font-style: normal;
  color: var(--brand);
  position: relative;
  z-index: 0;
  white-space: nowrap;
}
.hero h1 em::after {
  content: ""; position: absolute; left: 2px; right: 2px; bottom: 3px; height: 10px;
  background: linear-gradient(90deg, rgba(201, 122, 43, .30), rgba(201, 122, 43, .08));
  border-radius: 3px; z-index: -1;
}
.hero-lead { font-size: 16.5px; line-height: 1.85; color: var(--ink-2); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.hero-facts { display: flex; gap: 34px; margin-top: 40px; padding-top: 26px; border-top: 1px solid var(--line); }
.fact-num { font-size: 24px; font-weight: 800; color: var(--brand); letter-spacing: -.02em; }
.fact-num span { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-left: 2px; }
.fact-label { font-size: 12.5px; color: var(--muted); letter-spacing: .04em; }

.hero-art { position: relative; display: grid; grid-template-columns: 1.12fr .88fr; gap: 14px; align-items: center; }
.hero-art .art-col { display: flex; flex-direction: column; gap: 14px; }
.hero-art figure { margin: 0; overflow: hidden; border-radius: var(--r-lg); background: var(--bg-2); box-shadow: var(--shadow-md); }
.hero-art img { width: 100%; height: 100%; object-fit: cover; }
.hero-art .art-a { aspect-ratio: 4 / 5.8; }
.hero-art .art-b { aspect-ratio: 4 / 3.4; }
.hero-art .art-c { aspect-ratio: 4 / 3.4; }
.art-note {
  position: absolute; left: -14px; bottom: 26px;
  background: #fff; border-radius: 14px; padding: 12px 16px;
  box-shadow: var(--shadow-md); border: 1px solid var(--line-2);
  display: flex; align-items: center; gap: 12px;
}
.art-note .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(79, 122, 91, .14); }
.art-note b { font-size: 13.5px; }
.art-note small { display: block; color: var(--muted); font-size: 11.5px; }

/* ---------------- 区块 ---------------- */
.section { padding: 56px 0; }
.section.tight { padding: 34px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.section-title { font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; letter-spacing: -.015em; }
.section-title .count { font-size: 14px; color: var(--muted); font-weight: 500; margin-left: 8px; letter-spacing: 0; }
.section-sub { color: var(--muted); font-size: 14px; margin-top: 6px; }

/* ---------------- 筛选工具条 ---------------- */
.toolbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--ink-2); font-size: 13.5px; font-weight: 500;
  transition: all .16s;
}
.chip:hover { background: #fff; color: var(--brand); border-color: #DCC9B0; }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.search {
  position: relative; flex: 1 1 200px; max-width: 280px; margin-left: auto;
}
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted); }
.search input {
  width: 100%; padding: 9px 14px 9px 36px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; font-size: 14px; outline: none;
  transition: border-color .16s, box-shadow .16s;
}
.search input:focus { border-color: #D3B896; box-shadow: 0 0 0 3px rgba(201, 122, 43, .12); }
.search input::placeholder { color: #B3A392; }

.sort-select {
  padding: 9px 34px 9px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%238D7C6C' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center / 11px;
  font-size: 13.5px; outline: none; appearance: none; -webkit-appearance: none; cursor: pointer;
}

/* ---------------- 商品卡片 ---------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 22px;
}
.card {
  position: relative; background: var(--paper); border: 1px solid var(--line-2);
  border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column;
  transition: transform .22s cubic-bezier(.2, .7, .3, 1), box-shadow .22s, border-color .22s;
  box-shadow: 0 1px 2px rgba(74, 52, 33, .04);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--line); }
.card-media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--bg-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .3, 1); }
.card:hover .card-media img { transform: scale(1.045); }
.card-tag {
  position: absolute; left: 12px; top: 12px;
  background: rgba(255, 255, 255, .93); backdrop-filter: blur(6px);
  color: var(--ink-2); font-size: 11.5px; font-weight: 600; letter-spacing: .04em;
  padding: 4px 10px; border-radius: 999px;
}
.card-flag {
  position: absolute; right: 12px; top: 12px;
  background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; letter-spacing: .04em;
}
.card-body { padding: 15px 16px 17px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.card-name { font-size: 16.5px; font-weight: 700; letter-spacing: -.01em; }
.card-desc { font-size: 12.5px; color: var(--muted); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; align-items: baseline; justify-content: space-between; margin-top: 8px; gap: 8px; }
.price { font-size: 21px; font-weight: 800; color: var(--brand); letter-spacing: -.02em; }
.price .cur { font-size: 13px; font-weight: 700; margin-right: 1px; }
.price .per { font-size: 12px; font-weight: 500; color: var(--ink-2); margin-left: 3px; letter-spacing: 0; opacity: .78; }
.spec-count { font-size: 12px; color: var(--muted); white-space: nowrap; }

.card.sold-out .card-media::after {
  content: "暂时售罄"; position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(36, 28, 22, .42); color: #fff; font-size: 14px; font-weight: 600; letter-spacing: .1em;
}

.empty {
  text-align: center; padding: 72px 20px; border: 1px dashed var(--line);
  border-radius: var(--r-lg); color: var(--muted); background: rgba(255, 255, 255, .5);
}
.empty b { display: block; color: var(--ink-2); font-size: 15px; margin-bottom: 6px; }

/* ---------------- 详情页 ---------------- */
.crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 26px 0 18px; }
.crumb a:hover { color: var(--brand); }
.crumb .sep { opacity: .5; }

.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: start; padding-bottom: 40px; }

.gallery { position: sticky; top: 92px; }
.gallery-main {
  border-radius: var(--r-xl); overflow: hidden; background: var(--bg-2);
  aspect-ratio: 4 / 4.6; box-shadow: var(--shadow-md);
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.thumb {
  width: 68px; height: 82px; border-radius: 12px; overflow: hidden; padding: 0;
  border: 2px solid transparent; background: var(--bg-2); opacity: .78;
  transition: opacity .16s, border-color .16s, transform .16s;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover { opacity: 1; transform: translateY(-2px); }
.thumb.active { border-color: var(--brand); opacity: 1; }

.info-head .eyebrow { margin-bottom: 10px; }
.info-title { font-size: clamp(26px, 3.2vw, 36px); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.tag {
  font-size: 12px; padding: 4px 11px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-dark); font-weight: 500;
}

.price-box {
  margin-top: 22px; padding: 18px 20px; border-radius: var(--r-md);
  background: linear-gradient(135deg, #FDF7F0, #F8EDE0);
  border: 1px solid #F0E1CD; display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap;
}
.price-now { font-size: 40px; font-weight: 800; color: var(--brand); line-height: 1; letter-spacing: -.03em; }
.price-now .cur { font-size: 19px; font-weight: 700; margin-right: 2px; }
.price-now .per { font-size: 13px; font-weight: 500; color: var(--ink-2); margin-left: 4px; letter-spacing: 0; }
.price-note { font-size: 12.5px; color: var(--muted); margin-left: auto; text-align: right; line-height: 1.6; }

.spec-picker { margin-top: 22px; }
.label { font-size: 12px; letter-spacing: .1em; color: var(--muted); font-weight: 600; text-transform: uppercase; margin-bottom: 10px; }
.spec-list { display: flex; flex-wrap: wrap; gap: 9px; }
.spec-btn {
  border: 1px solid var(--line); background: #fff; border-radius: 11px;
  padding: 9px 16px; font-size: 14px; color: var(--ink-2); display: flex; align-items: baseline; gap: 7px;
  transition: all .16s;
}
.spec-btn .sp-price { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.spec-btn:hover { border-color: #D8C2A6; }
.spec-btn.active { border-color: var(--brand); background: #FFF8F5; color: var(--brand-dark); box-shadow: 0 0 0 3px rgba(169, 51, 26, .07); }
.spec-btn.active .sp-price { color: var(--brand); }
.spec-btn[disabled] { opacity: .45; cursor: not-allowed; }

.rule { height: 1px; background: var(--line-2); margin: 26px 0; border: 0; }

.prose { color: var(--ink-2); font-size: 15px; line-height: 1.95; }
.prose p + p { margin-top: 10px; }

.info-list { display: grid; gap: 10px; margin-top: 20px; }
.info-list li { display: flex; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.info-list .k { color: var(--muted); min-width: 62px; }
.info > .shop-card { margin-top: 30px; }

.contact-card {
  margin-top: 34px; border-radius: var(--r-lg); background: #2A2018; color: #F6E9D8;
  padding: 22px; display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center;
  box-shadow: var(--shadow-md);
}
.contact-card h4 { font-size: 16px; margin-bottom: 6px; }
.contact-card p { font-size: 12.5px; color: rgba(246, 233, 216, .62); line-height: 1.7; }
.contact-actions { display: flex; gap: 9px; margin-top: 14px; flex-wrap: wrap; }
.contact-card .btn { box-shadow: none; }
.contact-card .btn-line { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); color: #F6E9D8; }
.contact-card .btn-line:hover { background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .3); }

.qr-box {
  width: 118px; height: 118px; border-radius: 14px; background: #fff; padding: 8px;
  display: grid; place-items: center; overflow: hidden;
}
.qr-box img { width: 100%; height: 100%; object-fit: contain; }
.qr-empty {
  border: 1.5px dashed rgba(246, 233, 216, .34); border-radius: 14px; width: 118px; height: 118px;
  display: grid; place-items: center; text-align: center; padding: 8px;
  font-size: 10.5px; line-height: 1.5; color: rgba(246, 233, 216, .6);
}

/* 关于 / 联系 区块 */
.split { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.about-text p { color: var(--ink-2); font-size: 15.5px; line-height: 1.95; margin-bottom: 14px; }
.about-points { display: grid; gap: 14px; margin-top: 24px; }
.point { display: flex; gap: 12px; align-items: flex-start; }
.point .bullet {
  width: 26px; height: 26px; border-radius: 8px; background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: none; margin-top: 2px;
}
.point b { display: block; font-size: 14.5px; }
.point span { font-size: 13px; color: var(--muted); }

.shop-card {
  background: #fff; border: 1px solid var(--line-2); border-radius: var(--r-xl);
  padding: 28px; box-shadow: var(--shadow-sm);
}
.shop-card h3 { font-size: 18px; margin-bottom: 4px; }
.shop-card .muted { color: var(--muted); font-size: 13px; }
.shop-rows { display: grid; gap: 0; margin-top: 20px; }
.shop-row { display: grid; grid-template-columns: 76px 1fr; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line-2); font-size: 13.5px; }
.shop-row .k { color: var(--muted); }
.shop-row .v { color: var(--ink); font-weight: 500; word-break: break-all; }
.qr-inline { margin-top: 20px; display: flex; align-items: center; gap: 14px; }
.qr-inline .qr-box { width: 104px; height: 104px; box-shadow: var(--shadow-sm); border: 1px solid var(--line-2); }
.qr-inline .qr-empty { width: 104px; height: 104px; border-color: #E2D2BE; color: var(--muted); background: #FCF8F2; }

/* ---------------- 页脚 ---------------- */
.site-footer { margin-top: 40px; border-top: 1px solid var(--line); background: #F7F0E4; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 30px 0; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.footer-links { display: flex; gap: 18px; }
.footer-links a:hover { color: var(--brand); }
.footer-note { font-size: 11.5px; color: #A99A88; margin-top: 4px; }

/* ---------------- 管理端 ---------------- */
body.admin .site-header, body.admin .site-footer { display: none; }
.admin-bar {
  position: sticky; top: 0; z-index: 30; background: #2A2018; color: #F6E9D8;
}
.admin-bar .wrap { display: flex; align-items: center; gap: 16px; height: 58px; }
.admin-bar .logo { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15px; }
.admin-bar .logo .brand-mark { width: 26px; height: 26px; border-radius: 8px; box-shadow: none; }
.admin-bar .logo .brand-mark svg { width: 15px; height: 15px; }
.admin-bar .spacer { margin-left: auto; }
.admin-bar .who { font-size: 12.5px; color: rgba(246, 233, 216, .6); }
.admin-bar .link { font-size: 13px; padding: 6px 12px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .16); transition: all .16s; }
.admin-bar .link:hover { background: rgba(255, 255, 255, .1); }

.admin-wrap { max-width: 1080px; margin: 0 auto; padding: 30px 24px 80px; }
.admin-title { font-size: 24px; font-weight: 800; letter-spacing: -.015em; }
.admin-desc { color: var(--muted); font-size: 13.5px; margin-top: 6px; }

.tabs { display: flex; gap: 6px; margin: 24px 0 22px; border-bottom: 1px solid var(--line); }
.tab {
  padding: 10px 16px; background: none; border: 0; border-bottom: 2px solid transparent;
  font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: -1px; transition: color .16s, border-color .16s;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--brand); border-color: var(--brand); }

.panel { background: #fff; border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.panel-pad { padding: 22px; }
.panel-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 16px 20px; border-bottom: 1px solid var(--line-2);
}
.panel-head .grow { margin-left: auto; }
.panel-title { font-size: 15px; font-weight: 700; }

.stat-row { display: flex; gap: 12px; flex-wrap: wrap; }
.stat {
  flex: 1 1 150px; background: #fff; border: 1px solid var(--line-2); border-radius: var(--r-md);
  padding: 15px 17px;
}
.stat b { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.stat span { font-size: 12.5px; color: var(--muted); }

/* 产品行 */
.p-row {
  display: grid; grid-template-columns: 54px 1fr 130px 92px 116px; gap: 16px; align-items: center;
  padding: 12px 20px; border-bottom: 1px solid var(--line-2);
}
.p-row:last-child { border-bottom: 0; }
.p-row:hover { background: #FDFBF7; }
.p-thumb { width: 54px; height: 66px; border-radius: 9px; overflow: hidden; background: var(--bg-2); }
.p-thumb img { width: 100%; height: 100%; object-fit: cover; }
.p-name { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.p-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.p-price { font-size: 13.5px; font-weight: 600; color: var(--brand); }
.p-actions { display: flex; gap: 6px; justify-content: flex-end; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12.5px; color: var(--muted); user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 38px; height: 22px; border-radius: 999px; background: #DED3C4; transition: background .18s; position: relative; flex: none; }
.switch .track::after {
  content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .18s;
}
.switch input:checked + .track { background: var(--green); }
.switch input:checked + .track::after { transform: translateX(16px); }

.badge {
  font-size: 11px; padding: 2px 8px; border-radius: 999px; font-weight: 600; letter-spacing: .02em;
}
.badge-ok { background: var(--ok-bg); color: var(--green); }
.badge-off { background: #F1EAE0; color: var(--muted); }
.badge-brand { background: var(--brand-soft); color: var(--brand-dark); }

/* 表单 */
.form-grid { display: grid; gap: 16px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field .hint { font-size: 11.5px; color: var(--muted); margin-top: 5px; line-height: 1.5; }
.input, .textarea, .select {
  width: 100%; padding: 9px 12px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: #fff; font-size: 14px; outline: none; transition: border-color .16s, box-shadow .16s;
}
.input:focus, .textarea:focus, .select:focus { border-color: #D3B896; box-shadow: 0 0 0 3px rgba(201, 122, 43, .1); }
.textarea { resize: vertical; min-height: 96px; line-height: 1.7; }
.select { appearance: none; -webkit-appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%238D7C6C' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center / 11px; padding-right: 32px; }
.input[type="number"] { max-width: 160px; }

.pic-list { display: flex; flex-wrap: wrap; gap: 10px; }
.pic-item { position: relative; width: 88px; border-radius: 10px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--line-2); }
.pic-item img { width: 100%; height: 108px; object-fit: cover; }
.pic-item .del {
  position: absolute; right: 4px; top: 4px; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(36, 28, 22, .66); color: #fff; border: 0; display: grid; place-items: center;
  font-size: 13px; line-height: 1; backdrop-filter: blur(4px);
}
.pic-item .del:hover { background: var(--danger); }
.pic-item .cover-flag {
  position: absolute; left: 0; bottom: 0; right: 0; font-size: 10px; text-align: center;
  background: rgba(36, 28, 22, .6); color: #fff; padding: 3px 0;
}
.pic-add {
  width: 88px; height: 108px; border-radius: 10px; border: 1.5px dashed var(--line);
  background: #FDFBF7; color: var(--muted); display: grid; place-items: center; align-content: center; gap: 6px;
  font-size: 11.5px; text-align: center; transition: all .16s;
}
.pic-add:hover { border-color: #D3B896; color: var(--brand); background: #FFF9F4; }
.pic-add svg { width: 18px; height: 18px; }

.spec-edit-row {
  display: grid; grid-template-columns: 1.4fr .9fr 1.1fr .9fr 34px; gap: 8px; align-items: center;
  padding: 8px 0; border-bottom: 1px dashed var(--line-2);
}
.spec-edit-row:last-of-type { border-bottom: 0; }
.spec-head { font-size: 11.5px; color: var(--muted); font-weight: 600; letter-spacing: .04em; }

.uploading { font-size: 12.5px; color: var(--amber); }

/* 批量录入 */
.batch-box { display: grid; gap: 12px; }
.batch-code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12.5px;
}

/* 登录页 */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1200px 600px at 50% -10%, #F6E9D8, var(--bg));
}
.login-card {
  width: 100%; max-width: 380px; background: #fff; border-radius: var(--r-xl);
  padding: 34px 30px; box-shadow: var(--shadow-lg); border: 1px solid var(--line-2);
}
.login-card .mark { width: 44px; height: 44px; border-radius: 13px; background: linear-gradient(150deg, #B03A1E, #7E2413); display: grid; place-items: center; margin-bottom: 18px; }
.login-card .mark svg { width: 24px; height: 24px; }
.login-card h1 { font-size: 21px; margin-bottom: 6px; }
.login-card p { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.login-hint { margin-top: 16px; font-size: 12px; color: var(--muted); background: #FBF5EC; border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; line-height: 1.6; }

/* ---------------- 弹窗 ---------------- */
.modal-root { position: fixed; inset: 0; z-index: 90; display: none; }
.modal-root.open { display: block; }
.modal-mask { position: absolute; inset: 0; background: rgba(36, 28, 22, .45); backdrop-filter: blur(3px); }
.modal-card {
  position: relative; width: calc(100% - 32px); max-width: 680px; margin: 5vh auto;
  background: var(--paper); border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
  max-height: 90vh; display: flex; flex-direction: column; overflow: hidden;
  animation: pop .22s cubic-bezier(.2, .8, .3, 1);
}
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line-2); }
.modal-head h3 { font-size: 16.5px; }
.modal-head .close { margin-left: auto; }
.modal-body { padding: 22px; overflow: auto; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 22px; border-top: 1px solid var(--line-2); background: #FDFBF7; }

/* 大图预览 */
.lightbox { position: fixed; inset: 0; z-index: 95; background: rgba(20, 15, 11, .9); display: none; place-items: center; padding: 30px; }
.lightbox.open { display: grid; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.lightbox .lb-close { position: absolute; top: 20px; right: 22px; color: #fff; background: none; border: 0; font-size: 26px; opacity: .8; }

/* ---------------- 提示 ---------------- */
.toast-root {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 120;
  display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none;
}
.toast {
  background: #2A2018; color: #F8EEDD; padding: 11px 20px; border-radius: 999px;
  font-size: 13.5px; box-shadow: var(--shadow-lg); animation: toastin .24s ease;
  max-width: min(90vw, 520px); text-align: center;
}
.toast.ok { background: #2F5A3E; }
.toast.err { background: #8A2B21; }
@keyframes toastin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------------- 移动端 ---------------- */
.mobile-cta { display: none; }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero-art { max-width: 560px; }
  .detail { grid-template-columns: 1fr; gap: 28px; }
  .gallery { position: static; }
  .gallery-main { aspect-ratio: 4 / 4.2; max-width: 520px; }
  .split { grid-template-columns: 1fr; gap: 30px; }
  .p-row { grid-template-columns: 46px 1fr 100px 90px; }
  .p-row .p-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

@media (max-width: 720px) {
  .wrap { padding: 0 18px; }
  .header-inner { height: 60px; gap: 12px; }
  .nav { display: none; }
  .hero { padding: 34px 0 8px; }
  .hero-facts { gap: 22px; }
  .hero-art { max-width: none; grid-template-columns: 1fr 1fr; gap: 10px; }
  .hero-art .art-a { aspect-ratio: 4 / 5.6; }
  .hero-art .art-b { margin-top: 0; aspect-ratio: 4 / 5.6; }
  .hero-art .art-c { display: none; }
  .art-note { display: none; }
  .section { padding: 38px 0; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-body { padding: 11px 12px 13px; }
  .card-name { font-size: 14.5px; }
  .price { font-size: 18px; }
  .card-desc { display: none; }
  .toolbar { gap: 10px; }
  .search { max-width: none; flex: 1 1 100%; order: 3; }
  .sort-select { margin-left: auto; }
  .contact-card { grid-template-columns: 1fr; }
  .qr-box, .qr-empty { width: 100px; height: 100px; }
  .detail { padding-bottom: 88px; }
  .mobile-cta {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(251, 246, 238, .94); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
  }
  .form-grid.two { grid-template-columns: 1fr; }
  .admin-wrap { padding: 20px 16px 70px; }
  .p-row { grid-template-columns: 46px 1fr 84px; gap: 10px; }
  .p-row .p-price { display: none; }
  .modal-card { margin: 2vh auto; max-height: 94vh; }
  .modal-body { padding: 16px; }
}

@media (max-width: 420px) {
  .grid { grid-template-columns: 1fr; }
  .card-media { aspect-ratio: 4 / 3.6; }
}

@media print {
  .site-header, .site-footer, .toolbar, .mobile-cta, .admin-bar { display: none !important; }
  body { background: #fff; }
}
