/* =========================================================================
   KOH Case —— 全站样式（移动端优先）
   ========================================================================= */

:root {
  --bg: #f6f1e8;
  --surface: #fffdf9;
  --card: #ffffff;
  --ink: #17140f;
  --ink-2: #4a453c;
  --ink-3: #6f685d;
  --line: #e3dbcc;
  --line-2: #eee7d9;
  --chip: #ebe3d4;
  --accent: #d6402a;
  --accent-d: #b5321f;
  --accent-soft: #fbe6e0;
  --green: #1b7a54;
  --green-soft: #e0f1e8;
  --gold: #f6c948;
  --tg: #1878ad;
  --r-lg: 22px;
  --r: 16px;
  --r-sm: 11px;
  --shadow: 0 14px 34px -20px rgba(23, 20, 15, .4);
  --wrap: 1180px;
  --font: "Kantumruy Pro", "Noto Sans Khmer", "Khmer OS Battambang", "Khmer Sangam MN", "Leelawadee UI", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-zh: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2317140f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
html[data-lang="zh"] body { font-family: var(--font-zh); }
html[data-lang="km"] body { line-height: 1.8; }
main { flex: 1; }
img, svg { max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-weight: 700; line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
html[data-lang="km"] h1, html[data-lang="km"] h2, html[data-lang="km"] h3 { line-height: 1.5; letter-spacing: 0; }
html[data-lang="zh"] h1, html[data-lang="zh"] h2, html[data-lang="zh"] h3 { line-height: 1.3; letter-spacing: 0; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.i18n-pending [data-i18n] { visibility: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; }
.skip:focus { top: 12px; }
.container { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--ink-3); }
.case-art { display: block; height: auto; }
@media (min-width: 720px) { .container { padding: 0 28px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ---------- 页头 ---------- */
.setup-bar { background: var(--gold); color: #2a2000; font-size: .82rem; font-weight: 600; }
.setup-bar .container { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: center; padding-top: 7px; padding-bottom: 7px; text-align: center; }
.topbar { background: var(--ink); color: #f3ecdf; font-size: .8rem; }
.topbar-in { display: flex; justify-content: center; align-items: center; gap: 12px; min-height: 34px; text-align: center; }
.topbar-sep { width: 4px; height: 4px; border-radius: 50%; background: var(--gold); flex: none; }
@media (max-width: 620px) { .topbar-sep, .topbar-sep + span { display: none; } }

.header-main {
  position: sticky; top: 0; z-index: 40;
  background: rgba(246, 241, 232, .93);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-in { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.logo { display: inline-flex; align-items: center; gap: 9px; min-width: 0; font-weight: 700; font-size: 1.12rem; letter-spacing: -.02em; text-decoration: none; white-space: nowrap; }
.logo svg { width: 28px; height: 28px; flex: none; }
.logo-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nav { display: none; gap: 4px; margin-left: 18px; }
.nav-link { padding: 7px 14px; border-radius: 999px; text-decoration: none; font-weight: 500; font-size: .95rem; color: var(--ink-2); white-space: nowrap; }
.nav-link:hover { background: var(--line-2); color: var(--ink); }
.nav-link.is-on { color: var(--ink); background: var(--chip); }
.tools { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.seg { display: inline-flex; background: var(--chip); border-radius: 999px; padding: 3px; }
.seg-btn { border: 0; background: transparent; border-radius: 999px; min-height: 32px; min-width: 30px; padding: 0 10px; font-size: .82rem; font-weight: 600; line-height: 1; color: var(--ink-2); cursor: pointer; }
.seg-btn.is-on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .14); }
.cur-seg .seg-btn { font-size: 1rem; padding: 0 9px; }
.lang-seg { display: none; }
.lang-select {
  -webkit-appearance: none; appearance: none; border: 0; cursor: pointer;
  height: 38px; max-width: 108px; padding: 0 28px 0 13px; border-radius: 999px;
  background: var(--chip) var(--chev) no-repeat right 11px center / 10px;
  font-size: .85rem; font-weight: 600;
}
.cart-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; background: var(--ink); color: #fff; flex: none; }
.cart-btn svg { width: 20px; height: 20px; }
.cart-count { position: absolute; top: -4px; right: -4px; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; line-height: 1; display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg); }
.subnav { border-bottom: 1px solid var(--line); }
.subnav .container { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-top: 6px; padding-bottom: 6px; }
.subnav .container::-webkit-scrollbar { display: none; }
/* 窄屏（常见的 360px 安卓机）：收紧间距，保证购物车按钮不被挤出屏幕；店名太长时用省略号 */
@media (max-width: 400px) {
  .header-in { gap: 8px; }
  .tools { gap: 6px; }
  .lang-select { padding: 0 24px 0 10px; background-position: right 9px center; }
  .cur-seg .seg-btn { min-width: 28px; padding: 0 7px; }
  .cart-btn { width: 40px; height: 40px; }
}
@media (max-width: 330px) { .logo-text { display: none; } }
@media (max-width: 300px) {
  .container { padding: 0 10px; }
  .header-in { gap: 8px; }
  .tools { gap: 5px; }
  .lang-select { max-width: 84px; padding: 0 24px 0 10px; font-size: .8rem; background-position: right 9px center; }
  .cur-seg .seg-btn { min-width: 26px; padding: 0 6px; }
  .cart-btn { width: 38px; height: 38px; }
}
@media (min-width: 720px) { .lang-seg { display: inline-flex; } .lang-select { display: none; } }
@media (min-width: 900px) { .nav { display: flex; } .subnav { display: none; } .header-in { min-height: 68px; } }

/* ---------- 按钮 / 标签 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 8px 22px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 600; font-size: 1rem; line-height: 1.25; text-align: center; text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #2f2a21; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-d); }
.btn-ghost { border-color: var(--ink); background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-light { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-light:hover { border-color: var(--ink-3); }
.btn-tg { background: var(--tg); color: #fff; }
.btn-tg:hover { background: #136a9a; }
.btn-lg { min-height: 54px; padding: 8px 28px; font-size: 1.05rem; }
.btn-sm { min-height: 40px; padding: 6px 16px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; min-height: 38px; padding: 4px 14px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2);
  font-size: .9rem; font-weight: 500; line-height: 1.2; text-decoration: none; white-space: nowrap; cursor: pointer;
}
.chip:hover { border-color: var(--ink-3); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
@media (min-width: 720px) { .chips.scroll { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; } }

.badges { position: absolute; left: 10px; top: 10px; z-index: 2; display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.badge { font-size: .7rem; font-weight: 700; line-height: 1; padding: 5px 8px; border-radius: 999px; background: var(--ink); color: #fff; }
.badge.sale { background: var(--accent); }
.badge.mag { background: rgba(255, 255, 255, .92); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
.badge.out { background: #6f685d; }
html[data-lang="km"] .badge { line-height: 1.5; padding: 2px 8px; }

/* ---------- 表单 ---------- */
.field { display: grid; gap: 6px; align-content: start; }
.label, .field > label { font-weight: 600; font-size: .92rem; }
.req { color: var(--accent); }
.input {
  width: 100%; min-height: 50px; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm);
  background: #fff; color: var(--ink); font-size: 1rem; line-height: 1.4; transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 96px; resize: vertical; }
select.input { -webkit-appearance: none; appearance: none; background: #fff var(--chev) no-repeat right 15px center / 12px; padding-right: 40px; cursor: pointer; }
.input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(23, 20, 15, .1); }
.input::placeholder { color: #757067; }
.field.has-error .input { border-color: var(--accent); background: #fff8f6; }
.field-error { color: var(--accent-d); font-size: .84rem; font-weight: 500; }
.field-error:empty { display: none; }
.form-error { background: var(--accent-soft); color: var(--accent-d); border-radius: 12px; padding: 12px 14px; font-weight: 500; font-size: .92rem; }
.form-error:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- 版块 ---------- */
.section { padding: 30px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-head h2 { font-size: clamp(1.35rem, 4.4vw, 1.9rem); }
.link-more { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: .92rem; text-decoration: none; color: var(--ink-2); white-space: nowrap; }
.link-more:hover { color: var(--accent-d); }
.link-more svg { width: 16px; height: 16px; }
.page-head { padding: 22px 0 4px; }
.page-head h1 { font-size: clamp(1.6rem, 5.6vw, 2.4rem); }
@media (min-width: 900px) { .section { padding: 44px 0; } .page-head { padding-top: 34px; } }

/* ---------- 首页：主视觉 ---------- */
.hero { padding: 20px 0 6px; }
.hero-in { display: grid; gap: 22px; align-items: center; }
.kicker { display: inline-flex; align-items: center; font-size: .82rem; font-weight: 600; color: var(--accent-d); background: var(--accent-soft); padding: 5px 12px; border-radius: 999px; }
.hero h1 { font-size: clamp(2.15rem, 8vw, 4.1rem); margin: 14px 0 12px; }
html[data-lang="km"] .hero h1 { font-size: clamp(1.75rem, 6.6vw, 3.2rem); }
html[data-lang="zh"] .hero h1 { font-size: clamp(2rem, 7.4vw, 3.7rem); }
.lead { font-size: 1.06rem; color: var(--ink-2); max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 20px; font-size: .9rem; color: var(--ink-2); }
.hero-points li { display: inline-flex; align-items: center; gap: 6px; }
.hero-points svg { width: 18px; height: 18px; color: var(--green); flex: none; }
.krama-bg {
  background-color: #f1e4d0;
  background-image:
    repeating-linear-gradient(0deg, rgba(214, 64, 42, .11) 0 16px, transparent 16px 32px),
    repeating-linear-gradient(90deg, rgba(214, 64, 42, .11) 0 16px, transparent 16px 32px);
}
.hero-art { position: relative; width: 100%; border-radius: 28px; overflow: hidden; aspect-ratio: 1 / .8; }
.hero-case { position: absolute; width: 46%; }
.hero-case .case-art { width: 100%; }
.hero-case.c1 { left: 0; top: 17%; transform: rotate(-13deg); }
.hero-case.c2 { left: 26%; top: 8%; width: 48%; z-index: 2; }
.hero-case.c3 { right: -1%; top: 18%; transform: rotate(12deg); }
@media (min-width: 900px) {
  .hero { padding: 40px 0 14px; }
  .hero-in { grid-template-columns: 1.05fr .95fr; gap: 48px; }
  .hero-art { aspect-ratio: 1 / .92; }
  .hero-case.c1 { top: 22%; }
  .hero-case.c2 { top: 13%; }
  .hero-case.c3 { top: 23%; }
}

/* ---------- 首页：机型查找 ---------- */
#finder { scroll-margin-top: 70px; }
.finder { background: var(--ink); color: #f6f1e8; border-radius: var(--r-lg); padding: 22px 18px; display: grid; gap: 14px; }
.finder h2 { font-size: 1.3rem; }
.finder .muted { color: #b9b1a2; font-size: .88rem; margin-top: 6px; }
.finder-form { display: flex; flex-wrap: wrap; gap: 8px; }
.finder-form .input { flex: 1 1 190px; border-color: transparent; }
.finder .chip { background: transparent; border-color: #4a443a; color: #e9e2d4; }
.finder .chip:hover { border-color: #f6f1e8; }
@media (min-width: 900px) {
  .finder { grid-template-columns: 1fr 1fr; align-items: center; gap: 16px 44px; padding: 30px 34px; }
  .finder .chips { grid-column: 1 / -1; }
}

/* ---------- 首页：分类 ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cat { position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r); background: var(--tint, #efe7d8); text-decoration: none; padding: 14px 14px 0; }
.cat-name { font-weight: 700; font-size: 1rem; line-height: 1.35; }
.cat-count { font-size: .8rem; color: var(--ink-2); }
.cat-art { width: 112%; margin: -2% -6% -66%; transition: transform .25s ease; }
.cat-art .case-art { width: 100%; }
.cat:hover .cat-art { transform: translateY(-6px) rotate(-3deg); }
@media (min-width: 640px) { .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1000px) { .cat-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* ---------- 商品卡片 ---------- */
.grid-products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.card { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r); background: var(--card); border: 1px solid var(--line-2); text-decoration: none; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-art { position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; aspect-ratio: 1 / 1.08; background: var(--tint, #efe7d8); }
.card-art .case-art { width: 90%; flex: none; transition: transform .3s ease; }
.card:hover .case-art { transform: rotate(-4deg) scale(1.03); }
.photo { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 12px 12px 14px; }
.card-name { font-size: .95rem; font-weight: 600; line-height: 1.3; letter-spacing: 0; }
html[data-lang="km"] .card-name { line-height: 1.6; }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.price { font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.was { margin-left: 6px; color: var(--ink-3); font-size: .85rem; font-weight: 400; white-space: nowrap; }
.dots { display: flex; align-items: center; gap: 4px; }
.dot { width: 13px; height: 13px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .16); }
.dots-more { font-size: .74rem; color: var(--ink-3); }
@media (min-width: 720px) { .grid-products { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } .card-body { padding: 14px 16px 16px; } }
@media (min-width: 1040px) { .grid-products { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; } }

/* ---------- 首页：系列横幅 / 步骤 / 卖点 / 联系 ---------- */
.banner { display: grid; grid-template-columns: minmax(0, 1fr); overflow: hidden; border-radius: var(--r-lg); }
.banner-copy { padding: 26px 20px 4px; }
.banner h2 { font-size: clamp(1.5rem, 5.2vw, 2.3rem); margin: 10px 0 6px; }
.banner p { color: var(--ink-2); max-width: 26em; }
.banner .btn { margin-top: 16px; }
.banner-art { display: flex; justify-content: center; min-width: 0; height: 176px; padding-top: 10px; }
.banner-art .case-art { width: 150px; flex: none; margin: 0 -12px; }
.banner-art .case-art:nth-child(1) { transform: rotate(-10deg) translateY(16px); }
.banner-art .case-art:nth-child(3) { transform: rotate(10deg) translateY(16px); }
@media (min-width: 760px) {
  .banner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
  .banner-copy { padding: 44px; }
  .banner-art { height: 330px; padding-top: 34px; }
  .banner-art .case-art { width: 232px; margin: 0 -22px; }
}

.steps { display: grid; gap: 12px; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; align-items: start; padding: 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line-2); }
.step-n { grid-row: span 2; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.step h3 { font-size: 1.05rem; letter-spacing: 0; line-height: 1.45; }
.step p { color: var(--ink-2); font-size: .93rem; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 18px; } }

.vps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.vp { padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line-2); }
.vp-ic { width: 40px; height: 40px; border-radius: 12px; margin-bottom: 10px; background: var(--green-soft); color: var(--green); display: flex; align-items: center; justify-content: center; }
.vp-ic svg { width: 22px; height: 22px; }
.vp h3 { font-size: .98rem; letter-spacing: 0; line-height: 1.45; }
.vp p { margin-top: 2px; font-size: .86rem; color: var(--ink-2); }
@media (min-width: 900px) { .vps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; } }

.cta { display: grid; gap: 14px; justify-items: center; text-align: center; padding: 28px 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-2); }
.cta h2 { font-size: 1.5rem; }
.cta p { color: var(--ink-2); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ---------- 商品列表页 ---------- */
.toolbar { display: grid; gap: 10px; margin: 14px 0 12px; }
.toolbar-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search .input { padding-left: 42px; }
.result-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0; color: var(--ink-2); font-size: .9rem; }
.empty { display: grid; gap: 10px; justify-items: center; text-align: center; padding: 48px 16px; }
.empty h2 { font-size: 1.3rem; }
.empty p { color: var(--ink-2); }
.empty .btn { margin-top: 8px; }
@media (min-width: 860px) { .toolbar { grid-template-columns: 1.3fr 1fr 1fr; } .toolbar-row { display: contents; } }

/* ---------- 商品详情页 ---------- */
.crumb { display: inline-flex; align-items: center; gap: 4px; margin-top: 16px; color: var(--ink-2); font-size: .9rem; font-weight: 500; text-decoration: none; }
.crumb svg { width: 16px; height: 16px; transform: rotate(180deg); }
.crumb:hover { color: var(--accent-d); }
.pd { display: grid; gap: 22px; padding: 14px 0 26px; }
.pd-stage { position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; aspect-ratio: 1 / 1; border-radius: var(--r-lg); background: var(--tint, #efe7d8); transition: background .25s; }
.pd-stage .case-art { width: 76%; flex: none; }
.pd-note { position: absolute; left: 12px; bottom: 12px; font-size: .78rem; line-height: 1.5; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .86); color: var(--ink-2); }
.pd-info h1 { font-size: clamp(1.5rem, 5.2vw, 2.2rem); margin: 4px 0 6px; }
.pd-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; }
.pd-price .price { font-size: 1.7rem; }
.pd-price .was { margin-left: 0; font-size: 1rem; }
.pd-price .alt { color: var(--ink-3); font-size: .95rem; }
.save { align-self: center; font-size: .78rem; font-weight: 700; padding: 4px 9px; border-radius: 999px; color: var(--accent-d); background: var(--accent-soft); }
.pd-desc { margin: 10px 0 0; color: var(--ink-2); }
.opt-group { margin-top: 20px; }
.opt-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.opt-val { color: var(--ink-2); font-size: .92rem; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 42px; height: 42px; padding: 0; border-radius: 50%; border: 3px solid var(--bg); background: var(--c); box-shadow: 0 0 0 1.5px var(--line); cursor: pointer; }
.swatch.is-on { box-shadow: 0 0 0 2.5px var(--ink); }
.buy-row { display: grid; grid-template-columns: auto 1fr; gap: 10px; margin-top: 22px; }
.buy-row .btn-wide { grid-column: 1 / -1; }
.stepper { display: inline-flex; align-items: center; height: 48px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; }
.stepper button { width: 42px; height: 100%; border: 0; border-radius: 999px; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.stepper button svg { width: 16px; height: 16px; }
.stepper button[disabled] { opacity: .3; cursor: default; }
.stepper output { min-width: 30px; text-align: center; font-weight: 600; }
.stepper.sm { height: 38px; }
.stepper.sm button { width: 34px; }
.info-box { margin-top: 22px; padding: 2px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.info-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); font-size: .92rem; }
.info-row:last-child { border-bottom: 0; }
.info-row svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--green); }
.info-row span { display: block; }
.pd-section { margin-top: 26px; }
.pd-section h2 { font-size: 1.1rem; letter-spacing: 0; margin-bottom: 8px; }
.feat-list { display: grid; gap: 8px; }
.feat-list li { display: flex; align-items: flex-start; gap: 10px; font-size: .95rem; }
.feat-list svg { width: 18px; height: 18px; flex: none; margin-top: 4px; color: var(--green); }
html[data-lang="km"] .feat-list svg { margin-top: 6px; }
.model-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.model-tag { font-size: .8rem; padding: 3px 10px; border-radius: 999px; background: var(--chip); color: var(--ink-2); }
.buybar { display: none; }
@media (max-width: 899px) {
  .buybar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: flex; align-items: center; gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 253, 249, .96); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-top: 1px solid var(--line); transform: translateY(110%); transition: transform .2s ease;
  }
  .buybar.is-show { transform: none; }
  .buybar .price { font-size: 1.15rem; }
  .buybar .btn { flex: 1; }
  body[data-page="product"] .site-footer { padding-bottom: 84px; }
  body[data-page="product"] .toast { bottom: calc(92px + env(safe-area-inset-bottom)); }
}
@media (min-width: 900px) {
  .pd { grid-template-columns: 1.05fr 1fr; gap: 52px; align-items: start; padding: 22px 0 40px; }
  .pd-media { position: sticky; top: 92px; }
}

/* ---------- 购物车 / 结算 ---------- */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 12px 0 40px; }
.lines { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-content: start; }
.line { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; padding: 12px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line-2); }
.line-art { display: flex; align-items: center; justify-content: center; overflow: hidden; aspect-ratio: 1 / 1.1; border-radius: 12px; background: var(--tint, #efe7d8); }
.line-art .case-art { width: 92%; flex: none; }
.line-name { display: block; font-weight: 600; line-height: 1.35; text-decoration: none; }
html[data-lang="km"] .line-name { line-height: 1.6; }
.line-meta { font-size: .86rem; color: var(--ink-2); }
.line-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 10px; margin-top: 8px; }
.line-price { font-weight: 700; }
.line-ctl { display: flex; align-items: center; gap: 4px; }
.icon-btn { width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-3); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--accent-soft); color: var(--accent-d); }
.icon-btn svg { width: 18px; height: 18px; }
.summary { display: grid; gap: 12px; padding: 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.summary h2 { font-size: 1.15rem; letter-spacing: 0; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; font-size: .95rem; }
.sum-row.total { padding-top: 12px; border-top: 1px solid var(--line); font-size: 1.2rem; font-weight: 700; }
.sum-alt { margin-top: -8px; text-align: right; color: var(--ink-3); font-size: .88rem; }
.free-meter { padding: 10px 12px; border-radius: 12px; background: var(--green-soft); color: #12583c; font-size: .88rem; font-weight: 500; }
.free-meter .bar { height: 6px; margin-top: 8px; overflow: hidden; border-radius: 99px; background: rgba(27, 122, 84, .18); }
.free-meter .bar i { display: block; height: 100%; border-radius: 99px; background: var(--green); }
.note { font-size: .84rem; color: var(--ink-3); }
.panel { display: grid; gap: 14px; padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-2); }
.panel h2 { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; letter-spacing: 0; }
.panel h2 .n { width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--ink); color: #fff; font-size: .82rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.panels { display: grid; gap: 14px; align-content: start; }
.grid-2 { display: grid; gap: 14px; }
.opts { display: grid; gap: 10px; }
.opt { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; }
.opt.is-on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.opt.is-static { cursor: default; }
.opt input { width: 18px; height: 18px; margin: 4px 0 0; flex: none; accent-color: var(--ink); }
.opt-ic { width: 22px; height: 22px; flex: none; margin-top: 2px; color: var(--green); }
.opt-ic svg { display: block; width: 100%; height: 100%; }
.opt-end { margin-left: auto; color: var(--ink-3); }
.sum-rows { display: grid; gap: 12px; }
.opt-t { display: block; font-weight: 600; }
.opt-d { display: block; font-size: .86rem; color: var(--ink-2); }
.opt-r { margin-left: auto; font-weight: 700; white-space: nowrap; }
.mini-lines { display: grid; gap: 10px; }
.mini { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 10px; font-size: .9rem; }
.mini .line-art { border-radius: 10px; }
.mini b { display: block; font-weight: 600; line-height: 1.35; }
html[data-lang="km"] .mini b { line-height: 1.6; }
.mini small { color: var(--ink-3); font-size: .82rem; }
@media (max-width: 330px) {
  .line { grid-template-columns: 60px minmax(0, 1fr); gap: 10px; padding: 10px; }
  .stepper.sm button { width: 30px; }
  .line .icon-btn { width: 32px; height: 32px; }
  .panel, .summary { padding: 14px; }
  .chips.scroll { margin: 0 -10px; padding: 2px 10px; }
}
@media (min-width: 620px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) {
  .cart-layout { grid-template-columns: minmax(0, 1fr) 370px; gap: 36px; align-items: start; }
  .summary { position: sticky; top: 92px; }
  .panel { padding: 22px; }
}

/* ---------- 下单成功页 ---------- */
.done { display: grid; gap: 16px; max-width: 720px; margin: 0 auto; padding: 26px 0 48px; }
.done-head { display: grid; gap: 10px; justify-items: center; text-align: center; }
.done-head h1 { font-size: clamp(1.4rem, 5vw, 2rem); }
.done-ic { width: 64px; height: 64px; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; }
.done-ic svg { width: 34px; height: 34px; }
.done-ic.is-pending { background: var(--tg); }
.order-no { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px 6px 16px; border: 1.5px dashed #cfc5b2; border-radius: 14px; background: var(--surface); font-size: 1.15rem; font-weight: 700; letter-spacing: .04em; }
.pay-box { justify-items: center; text-align: center; }
.pay-box .lead { font-size: 1rem; }
.qr { width: 230px; max-width: 72%; height: auto; padding: 10px; border-radius: 16px; border: 1px solid var(--line); background: #fff; }
.kv { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 6px 16px; width: 100%; max-width: 440px; text-align: left; }
.kv dt { color: var(--ink-3); font-size: .88rem; }
.kv dd { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 38px; font-weight: 600; }
.tg-box { justify-items: center; text-align: center; }
.tg-box.is-required { border-color: var(--tg); box-shadow: inset 0 0 0 1px var(--tg); }
.addr { color: var(--ink-2); font-size: .95rem; }
.addr b { color: var(--ink); }

/* ---------- 帮助页 ---------- */
.prose { max-width: 820px; padding-bottom: 40px; }
.help-sec { padding: 22px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.help-sec:last-child { border-bottom: 0; }
.help-sec h2 { font-size: 1.3rem; margin-bottom: 10px; }
.help-sec p { margin-top: 8px; color: var(--ink-2); }
.table { width: 100%; margin-top: 6px; border-collapse: separate; border-spacing: 0; overflow: hidden; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line-2); font-size: .95rem; }
.table th { background: #f1e9db; color: var(--ink-3); font-size: .82rem; font-weight: 600; }
.table tr:last-child td { border-bottom: 0; }
.faq { margin-top: 10px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--ink-3); }
.faq[open] summary::after { content: "–"; }
.faq p { margin: 0; padding: 0 0 14px; }
.contact-list { display: grid; gap: 10px; margin-top: 12px; }
.contact-item { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.contact-item svg { width: 20px; height: 20px; flex: none; color: var(--ink-3); }
a.contact-item:hover { color: var(--accent-d); }

/* ---------- 页脚 ---------- */
.site-footer { margin-top: 36px; background: var(--ink); color: #d9d1c2; }
.footer-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px 20px; padding-top: 36px; padding-bottom: 26px; }
.footer-brand, .footer-col:last-child { grid-column: 1 / -1; }
.site-footer .logo { color: #fff; }
.footer-brand p { margin-top: 10px; max-width: 26em; font-size: .92rem; color: #b5ad9e; }
.pay-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.pay-chip { padding: 4px 10px; border-radius: 8px; border: 1px solid #3a342a; background: #2a251d; color: #eee6d6; font-size: .76rem; font-weight: 600; }
.footer-col h4 { margin-bottom: 8px; font-size: .82rem; font-weight: 600; color: #9c9485; }
.footer-col a, .footer-col span { display: flex; align-items: flex-start; gap: 8px; padding: 5px 0; font-size: .93rem; color: #e6dfd0; text-decoration: none; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-col svg { width: 17px; height: 17px; flex: none; margin-top: 4px; color: #9c9485; }
.footer-legal { display: grid; gap: 6px; padding-top: 16px; padding-bottom: 22px; border-top: 1px solid #2e2921; font-size: .78rem; color: #8f8778; }
@media (min-width: 760px) {
  .footer-in { grid-template-columns: 1.4fr .9fr .9fr 1.3fr; gap: 36px; }
  .footer-brand, .footer-col:last-child { grid-column: auto; }
}

/* ---------- 轻提示 ---------- */
.toast {
  position: fixed; left: 16px; right: 16px; bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 80;
  display: flex; align-items: center; gap: 12px; width: fit-content; max-width: calc(100vw - 32px); margin: 0 auto;
  padding: 12px 18px; border-radius: 22px; background: var(--ink); color: #fff; font-size: .92rem; font-weight: 500;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .5);
  opacity: 0; transform: translateY(20px); pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.is-show { opacity: 1; transform: none; pointer-events: auto; }
.toast a { color: var(--gold); font-weight: 600; white-space: nowrap; }

/* ---------- 订单后台 ---------- */
.adm { padding-top: 8px; padding-bottom: 48px; }
.adm .page-head { padding-bottom: 14px; }
.adm-login { display: grid; gap: 14px; max-width: 420px; margin: 30px auto; }
.adm-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0; }
.adm-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.orders { display: grid; gap: 12px; }
.order { display: grid; gap: 8px; padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line-2); }
.order-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; }
.order-id { font-weight: 700; letter-spacing: .03em; }
.order-time { color: var(--ink-3); font-size: .85rem; }
.order-items { font-size: .92rem; color: var(--ink-2); }
.order-cust { font-size: .92rem; }
.order-cust a { font-weight: 600; }
.order-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-top: 8px; border-top: 1px solid var(--line-2); }
.order-foot .input { width: auto; min-height: 40px; padding-top: 6px; padding-bottom: 6px; font-size: .9rem; }
.status { padding: 3px 10px; border-radius: 999px; background: var(--chip); font-size: .75rem; font-weight: 700; }
.status.new { background: var(--accent-soft); color: var(--accent-d); }
.status.confirmed { background: #e3ecfb; color: #234a8f; }
.status.shipped { background: #fdf0c9; color: #7a5600; }
.status.delivered { background: var(--green-soft); color: #12583c; }
.status.cancelled { background: #ebe7e0; color: #665f55; }
.checklist { display: grid; gap: 6px; padding: 14px 16px; border-radius: var(--r); background: #fdf3cf; color: #4d3a00; font-size: .92rem; }
.checklist.is-ok { background: var(--green-soft); color: #12583c; }
.checklist ul { display: grid; gap: 2px; padding-left: 18px; list-style: disc; }
