/* 海霸王官网样式 — 桌面优先，自适应手机。颜色、圆角、阴影只用 tokens.css 的变量；按钮、标签、价格、步进器、输入框来自 components.css。 */
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body.site { font-size: 16px; line-height: 26px; background: var(--surface); min-height: 100vh; display: flex; flex-direction: column; }
body.site > main { flex: 1; }
.site a { color: var(--link); }
.site a:focus-visible, .site button:focus-visible, .site summary:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }
.site a.hpw-btn { text-decoration: none; }
.site a.hpw-btn-primary { color: var(--on-red); }
.site a.hpw-btn-secondary { color: var(--on-green); }
.site a.hpw-btn-outline { color: var(--green-text); }
.site a.hpw-btn-quiet { color: var(--ink); }
.site a.hpw-btn:focus-visible, .site button.hpw-btn:focus-visible { border-radius: var(--radius-full); }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: var(--surface-raised) !important; padding: 8px 16px; border-radius: var(--radius-md); }
.skip-link:focus { top: 12px; }

/* ---------- 页头 ---------- */
.site-header { position: sticky; top: 0; z-index: 30; background: var(--surface-raised); border-bottom: 1px solid var(--line); }
.site-header-in { display: flex; align-items: center; gap: 28px; height: 72px; }
.site-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.site-logo img { height: 44px; width: auto; display: block; }
.site-logo span { font-size: 15px; line-height: 22px; font-weight: 600; color: var(--ink-2); padding-left: 12px; border-left: 1px solid var(--line); white-space: nowrap; }
.site-nav { display: flex; gap: 2px; flex: 1; min-width: 0; }
.site-nav a { padding: 7px 14px; border-radius: var(--radius-full); color: var(--ink); text-decoration: none; font-size: 15px; line-height: 22px; font-weight: 500; white-space: nowrap; }
.site-nav a:hover { background: var(--surface-sunken); }
.site-nav a[aria-current="page"] { color: var(--red-text); background: var(--red-soft); }
.site-nav-extra { display: none; }
.site-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; flex: none; }
.site-link { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; font-size: 15px; line-height: 22px; font-weight: 500; text-decoration: none; color: var(--ink) !important; border-radius: var(--radius-full); white-space: nowrap; }
.site-link:hover { background: var(--surface-sunken); }
.site-link[aria-current="page"] { color: var(--red-text) !important; }
.site-cart { gap: 8px; padding: 0 16px; }
.site-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--radius-full); background: var(--on-red); color: var(--red); font-size: 12px; line-height: 20px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.site-badge[hidden] { display: none; }
.site-menu-btn { display: none; width: 44px; height: 44px; border: 0; background: transparent; color: var(--ink); border-radius: var(--radius-full); align-items: center; justify-content: center; cursor: pointer; padding: 0; }

/* ---------- 首页：主视觉 ---------- */
.hero { background: var(--surface-raised); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 64px; align-items: center; padding-top: 72px; padding-bottom: 80px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--green-text); background: var(--green-soft); padding: 5px 14px; border-radius: var(--radius-full); }
.hero h1 { font-size: 52px; line-height: 64px; font-weight: 700; margin: 20px 0 16px; text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--red-text); }
.lead { font-size: 18px; line-height: 30px; color: var(--ink-2); max-width: 30em; margin: 0; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.hero-cta .hpw-btn { height: 48px; padding: 0 28px; font-size: 16px; }
.hero-facts { display: flex; gap: 40px; list-style: none; margin: 40px 0 0; padding: 24px 0 0; border-top: 1px solid var(--line); }
.hero-facts b { display: block; font-size: 30px; line-height: 38px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hero-facts span { font-size: 14px; line-height: 20px; color: var(--ink-2); }
.hero-board { background: var(--green); border-radius: 28px; padding: 24px 28px 28px 0; margin-left: 40px; color: var(--on-green); }
.hero-board-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-left: 28px; margin-bottom: 16px; }
.hero-board-head h2 { font-size: 18px; line-height: 26px; font-weight: 600; margin: 0; }
.hero-board-head a { color: var(--on-green); font-size: 14px; line-height: 20px; display: inline-flex; align-items: center; gap: 4px; text-decoration: none; opacity: 0.92; }
.hero-board-head a:hover { text-decoration: underline; opacity: 1; }
.hero-list { display: flex; flex-direction: column; gap: 12px; margin-left: -40px; }
.hero-item { display: flex; align-items: center; gap: 16px; background: var(--surface-raised); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px 14px 14px; box-shadow: var(--shadow-sm); }
.hero-thumb { width: 64px; height: 64px; flex: none; border-radius: var(--radius-md); background: var(--surface-sunken); color: var(--ink-3); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hero-thumb img, .prod-thumb img, .cart-thumb img, .dlg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hero-item-name { font-size: 16px; line-height: 24px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-item-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hero-item .hpw-btn, .hero-item .hpw-stepper { flex: none; }
.hero-note { margin: 14px 0 0; padding-left: 28px; font-size: 13px; line-height: 20px; opacity: 0.85; }

/* ---------- 通用分区 ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--surface-raised); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.section-head h2 { font-size: 30px; line-height: 40px; font-weight: 700; margin: 0; }
.section-head p { margin: 8px 0 0; color: var(--ink-2); }
.more-link { display: inline-flex; align-items: center; gap: 4px; font-size: 15px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.more-link:hover { text-decoration: underline; }

.cat-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.cat-tile { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); text-decoration: none; color: var(--ink) !important; transition: border-color 0.15s, box-shadow 0.15s; }
.cat-tile:hover { border-color: var(--green-text); box-shadow: var(--shadow-sm); }
.cat-glyph { width: 48px; height: 48px; flex: none; border-radius: var(--radius-full); background: var(--green-soft); color: var(--green-text); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; }
.cat-tile b { display: block; font-size: 16px; line-height: 24px; font-weight: 600; }
.cat-tile small { display: block; font-size: 13px; line-height: 18px; color: var(--ink-2); }

.prod-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.prod-card { display: flex; flex-direction: column; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; transition: box-shadow 0.15s; }
.prod-card:hover { box-shadow: var(--shadow-sm); }
.prod-thumb { aspect-ratio: 4 / 3; background: var(--surface-sunken); color: var(--ink-3); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.prod-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; flex: 1; }
.prod-name { font-size: 16px; line-height: 24px; font-weight: 600; margin: 0; min-height: 48px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prod-desc { font-size: 13px; line-height: 20px; color: var(--ink-2); margin: 0; min-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prod-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; min-height: 40px; }

.feat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.feat { padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.feat-icon { width: 48px; height: 48px; border-radius: var(--radius-lg); background: var(--green-soft); color: var(--green-text); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.feat h3 { font-size: 18px; line-height: 26px; font-weight: 600; margin: 0 0 8px; }
.feat p { margin: 0; font-size: 15px; line-height: 24px; color: var(--ink-2); }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { position: relative; counter-increment: step; padding-top: 64px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: var(--radius-full); background: var(--red); color: var(--on-red); font-size: 18px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.steps li::after { content: ""; position: absolute; left: 56px; right: -12px; top: 21px; height: 2px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps h3 { font-size: 18px; line-height: 26px; font-weight: 600; margin: 0 0 6px; }
.steps p { margin: 0; font-size: 15px; line-height: 24px; color: var(--ink-2); }

.about { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 56px; align-items: start; }
.about h2 { font-size: 30px; line-height: 40px; font-weight: 700; margin: 0 0 16px; }
.about-text p { margin: 0 0 14px; color: var(--ink-2); max-width: 38em; }
.about-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; }
.about-card .about-logo { background: #ffffff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px; display: flex; justify-content: center; margin-bottom: 20px; }
.about-card img { height: 64px; width: auto; display: block; }
.info-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.info-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 24px; }
.info-list .hpw-icon { margin-top: 3px; color: var(--green-text); }

.cta-band { background: var(--green); color: var(--on-green); border-radius: 24px; padding: 40px 48px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.cta-band h2 { font-size: 28px; line-height: 38px; font-weight: 700; margin: 0 0 6px; }
.cta-band p { margin: 0; opacity: 0.9; }
.site a.btn-on-green { background: #ffffff; border-color: #ffffff; color: #00603f; height: 48px; padding: 0 28px; font-size: 16px; font-weight: 600; flex: none; }
.site a.btn-on-green:hover { background: #e3f2ea; border-color: #e3f2ea; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--surface-raised); border-top: 1px solid var(--line); }
.site-footer-in { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 40px; padding-top: 48px; padding-bottom: 40px; }
.foot-brand img { height: 55px; width: auto; display: block; }
.foot-brand p { margin: 14px 0 0; font-size: 14px; line-height: 22px; color: var(--ink-2); max-width: 22em; }
.foot-col h2 { font-size: 15px; line-height: 22px; font-weight: 600; margin: 0 0 12px; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.foot-col li { font-size: 14px; line-height: 22px; color: var(--ink-2); display: flex; gap: 8px; align-items: flex-start; }
.foot-col li .hpw-icon { margin-top: 3px; }
.foot-col a { color: var(--ink-2); text-decoration: none; }
.foot-col a:hover { color: var(--green-text); text-decoration: underline; }
.foot-legal { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 16px; padding-bottom: 24px; border-top: 1px solid var(--line); font-size: 13px; line-height: 20px; color: var(--ink-2); }
.foot-legal a { color: var(--ink-2); }

/* ---------- 内页标题 ---------- */
.page-head { background: var(--surface-raised); border-bottom: 1px solid var(--line); padding: 28px 0; }
.page-head h1 { font-size: 30px; line-height: 40px; font-weight: 700; margin: 4px 0 0; }
.crumbs { font-size: 14px; line-height: 20px; color: var(--ink-2); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--green-text); text-decoration: underline; }

/* ---------- 商品中心 ---------- */
.shop { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; align-items: start; padding-top: 32px; padding-bottom: 72px; }
.shop-side { position: sticky; top: 96px; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 8px; max-height: calc(100vh - 120px); overflow: auto; }
.side-cat, .side-sub { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; border: 0; background: transparent; font: inherit; text-align: left; cursor: pointer; color: var(--ink); border-radius: var(--radius-md); }
.side-cat { padding: 9px 12px; font-size: 15px; line-height: 22px; }
.side-cat:hover, .side-sub:hover { background: var(--surface-sunken); }
.side-cat small { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.side-cat[aria-current="true"] { background: var(--red-soft); color: var(--red-text); font-weight: 600; }
.side-cat[aria-current="true"] small { color: var(--red-text); }
.side-subs { padding: 4px 0 8px 12px; margin-left: 12px; border-left: 2px solid var(--line); }
.side-group { font-size: 12px; line-height: 18px; font-weight: 600; color: var(--ink-3); padding: 8px 12px 2px; }
.side-sub { padding: 6px 12px; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.side-sub[aria-current="true"] { color: var(--red-text); font-weight: 600; }
.shop-chips { display: none; }
.chip-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 16px; margin: 0 -16px; }
.chip-row::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 36px; padding: 0 14px; border-radius: var(--radius-full); border: 1px solid var(--line); background: var(--surface-raised); color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap; }
.chip[aria-current="true"] { background: var(--red); border-color: var(--red); color: var(--on-red); font-weight: 600; }
.chip-row-sub .chip { height: 32px; font-size: 13px; }
.chip-row-sub .chip[aria-current="true"] { background: var(--red-soft); border-color: var(--red-text); color: var(--red-text); }
.shop-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.shop-bar h2 { font-size: 22px; line-height: 30px; font-weight: 700; margin: 0; }
.shop-bar .hpw-search { flex: 0 1 340px; margin-left: auto; }
.shop-count { font-size: 14px; color: var(--ink-2); }
.shop .prod-grid { grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); }
.shop-empty { background: var(--surface-raised); border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); }

/* ---------- 规格弹窗：桌面居中，手机从底部升起 ---------- */
.site-modal .hpw-scrim { z-index: 40; }
.site-modal .hpw-sheet-fixed { z-index: 41; }
.dlg-thumb { width: 80px; height: 80px; }
@media (min-width: 641px) {
  .site-modal .hpw-sheet-fixed { left: 50%; right: auto; top: 50%; bottom: auto; transform: translate(-50%, -50%); width: min(520px, calc(100vw - 48px)); max-width: none; max-height: calc(100vh - 48px); overflow: auto; border-radius: var(--radius-xl); padding: 24px; margin: 0; }
}

/* ---------- 购物车与下单 ---------- */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; padding-top: 32px; padding-bottom: 72px; }
.panel { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.cart-head, .cart-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) 112px 124px 112px 36px; gap: 16px; align-items: center; padding: 14px 20px; }
.cart-head { font-size: 13px; line-height: 20px; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.cart-head label { display: flex; align-items: center; gap: 16px; grid-column: 1 / 3; cursor: pointer; }
.cart-row + .cart-row { border-top: 1px solid var(--line); }
.cart-prod { display: flex; align-items: center; gap: 14px; min-width: 0; }
.cart-thumb { width: 64px; height: 64px; flex: none; border-radius: var(--radius-md); background: var(--surface-sunken); color: var(--ink-3); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cart-name { font-size: 15px; line-height: 22px; font-weight: 600; }
.cart-spec { font-size: 13px; line-height: 20px; color: var(--ink-2); }
.cart-num { text-align: right; }
.cart-sub .hpw-price { font-size: 16px; }
.cart-label { display: none; }
.icon-btn { width: 36px; height: 36px; border: 0; background: transparent; color: var(--ink-2); border-radius: var(--radius-full); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.icon-btn:hover { background: var(--surface-sunken); color: var(--red-text); }
button.hpw-check { cursor: pointer; padding: 0; }
.cart-aside { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 16px; }
.sum-card { padding: 24px; }
.sum-card h2 { font-size: 18px; line-height: 26px; font-weight: 600; margin: 0 0 16px; }
.sum-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 15px; line-height: 24px; color: var(--ink-2); }
.sum-total { margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--ink); font-weight: 600; }
.sum-card .hpw-btn-block { margin-top: 20px; height: 48px; font-size: 16px; }
.sum-note { margin: 12px 0 0; font-size: 13px; line-height: 20px; color: var(--ink-2); text-align: center; }
.empty-state { text-align: center; padding: 72px 24px; color: var(--ink-2); display: flex; flex-direction: column; align-items: center; gap: 16px; }
.empty-state .hpw-icon { color: var(--ink-3); }
.empty-state h2 { font-size: 20px; line-height: 28px; font-weight: 600; color: var(--ink); margin: 0; }
.empty-state p { margin: 0; }

.done { max-width: 720px; margin: 0 auto; padding: 48px 24px 72px; }
.done-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 24px; }
.done-mark { width: 64px; height: 64px; border-radius: var(--radius-full); background: var(--green-soft); color: var(--green-text); display: flex; align-items: center; justify-content: center; }
.done-head h1 { font-size: 28px; line-height: 38px; font-weight: 700; margin: 4px 0 0; }
.site h1:focus { outline: none; }
.done-head p { margin: 0; color: var(--ink-2); font-size: 15px; }
.order-no { font-family: var(--font-mono); font-size: 14px; color: var(--ink); }
.order-text { white-space: pre-wrap; word-break: break-all; font-size: 14px; line-height: 22px; background: var(--surface-sunken); border-radius: var(--radius-md); padding: 16px; margin: 0; color: var(--ink); font-family: inherit; }
.done-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.sync-row { display: flex; align-items: center; gap: 6px; font-size: 14px; line-height: 22px; color: var(--ink-2); }
.sync-row .hpw-btn { margin-left: 8px; height: 30px; padding: 0 14px; }
.sync-big { justify-content: center; font-size: 16px; line-height: 24px; font-weight: 500; }
.sync-sent { color: var(--green-text); }
.sync-fail { color: var(--red-text); }

/* ---------- 我的订单 ---------- */
.orders { max-width: 880px; margin: 0 auto; padding: 32px 24px 72px; display: flex; flex-direction: column; gap: 16px; }
.order-card { padding: 20px 24px; }
.order-card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.order-meta { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; font-size: 14px; line-height: 22px; color: var(--ink-2); margin: 6px 0 10px; }
.order-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.order-card .order-text { margin-top: 14px; }
.orders-note { font-size: 13px; line-height: 20px; color: var(--ink-2); margin: 0; }

.site-toast { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); background: var(--ink); color: var(--surface-raised); padding: 10px 20px; border-radius: var(--radius-full); font-size: 15px; line-height: 22px; z-index: 60; box-shadow: var(--shadow-sm); white-space: nowrap; pointer-events: none; }
.site-toast[hidden] { display: none; }

/* ---------- 自适应 ---------- */
@media (max-width: 1100px) {
  .site-header-in { gap: 16px; }
  .site-logo span { display: none; }
  .hero-in { gap: 40px; }
  .hero h1 { font-size: 44px; line-height: 56px; }
  .cat-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .prod-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cart-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; }
  .cart-head, .cart-row { grid-template-columns: 24px minmax(0, 1fr) 96px 124px 96px 36px; gap: 12px; }
}
@media (max-width: 900px) {
  html { scroll-padding-top: 76px; }
  .site-header-in { height: 60px; }
  .site-logo img { height: 36px; }
  .site-menu-btn { display: inline-flex; }
  .site-link { display: none; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; background: var(--surface-raised); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm); padding: 8px 16px 16px; }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px; border-radius: var(--radius-md); font-size: 16px; }
  .site-nav-extra { display: block; }
  .hero-in { grid-template-columns: minmax(0, 1fr); padding-top: 48px; padding-bottom: 56px; }
  .hero-board { margin-left: 0; padding: 20px; }
  .hero-board-head, .hero-note { padding-left: 0; }
  .hero-list { margin-left: 0; }
  .section { padding: 56px 0; }
  .cat-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .feat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }
  .steps li:nth-child(2n)::after { display: none; }
  .about { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .cta-band { flex-direction: column; align-items: flex-start; padding: 32px; }
  .site-footer-in { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
  .shop { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 16px; }
  .shop-side { display: none; }
  .shop-chips { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
  .shop-bar .hpw-search { flex: 1 1 100%; margin-left: 0; order: 3; }
  .cart-layout { grid-template-columns: minmax(0, 1fr); }
  .cart-aside { position: static; }
}
@media (max-width: 640px) {
  body.site { font-size: 15px; line-height: 24px; }
  .wrap { padding: 0 16px; }
  .site-cart { padding: 0 14px; }
  .site-cart-text { display: none; }
  .hero h1 { font-size: 36px; line-height: 46px; }
  .lead { font-size: 16px; line-height: 26px; }
  .hero-cta .hpw-btn { flex: 1; padding: 0 16px; }
  .hero-facts { gap: 24px; margin-top: 32px; }
  .hero-facts b { font-size: 24px; line-height: 32px; }
  .hero-facts span { font-size: 13px; }
  .hero-board { border-radius: 20px; padding: 16px; }
  .hero-item { padding: 12px; gap: 12px; }
  .hero-thumb { width: 56px; height: 56px; }
  .hero-item-name { font-size: 15px; line-height: 22px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .section { padding: 48px 0; }
  .section-head { margin-bottom: 20px; }
  .section-head h2, .about h2 { font-size: 24px; line-height: 32px; }
  .section-head p { font-size: 14px; line-height: 22px; }
  .cat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .cat-tile { padding: 12px; gap: 10px; }
  .cat-glyph { width: 40px; height: 40px; font-size: 17px; }
  .cat-tile b { font-size: 15px; line-height: 22px; }
  .prod-grid, .shop .prod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .prod-body { padding: 10px 12px 12px; gap: 6px; }
  .prod-name { font-size: 15px; line-height: 22px; min-height: 44px; }
  .prod-foot { flex-direction: column; align-items: stretch; gap: 8px; }
  .prod-foot .hpw-btn { width: 100%; }
  .prod-foot .hpw-stepper { justify-content: space-between; }
  .feat-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .feat { padding: 20px; display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 16px; }
  .feat-icon { grid-row: 1 / 3; margin: 0; }
  .steps { grid-template-columns: minmax(0, 1fr); row-gap: 24px; }
  .steps li { padding: 0 0 0 60px; min-height: 44px; }
  .steps li::after { display: none; }
  .cta-band { border-radius: 20px; padding: 28px 24px; }
  .cta-band h2 { font-size: 24px; line-height: 32px; }
  .site a.btn-on-green { width: 100%; }
  .site-footer-in { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 40px; }
  .page-head { padding: 20px 0; }
  .page-head h1 { font-size: 24px; line-height: 32px; }
  .shop-bar h2 { font-size: 20px; line-height: 28px; }
  .cart-head { display: flex; padding: 12px 16px; }
  .cart-head > span { display: none; }
  .cart-row { grid-template-columns: 24px minmax(0, 1fr) auto 36px; grid-template-areas: "check prod prod del" ". unit unit unit" ". qty sub sub"; gap: 8px 12px; padding: 14px 16px; }
  .cart-row > .cart-check { grid-area: check; } .cart-row > .cart-prod { grid-area: prod; } .cart-row > .cart-del { grid-area: del; }
  .cart-row > .cart-unit { grid-area: unit; text-align: left; } .cart-row > .cart-qty { grid-area: qty; } .cart-row > .cart-sub { grid-area: sub; }
  .cart-label { display: inline; font-size: 13px; color: var(--ink-2); margin-right: 6px; }
  .cart-thumb { width: 56px; height: 56px; }
  .sum-card { padding: 20px; }
  .done { padding: 32px 16px 56px; }
  .done-head h1 { font-size: 24px; line-height: 32px; }
  .done-actions .hpw-btn { flex: 1; }
  .orders { padding: 16px 16px 56px; }
  .order-card { padding: 16px; }
  .site-toast { bottom: 24px; font-size: 14px; }
}

/* ---------- 登录状态 ---------- */
.price-locked { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; line-height: 20px; color: var(--ink-2); white-space: nowrap; }
.site-user { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; line-height: 22px; font-weight: 500; color: var(--ink); white-space: nowrap; max-width: 9em; overflow: hidden; text-overflow: ellipsis; padding-left: 4px; }
button.site-link { border: 0; background: transparent; font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; }
.site-logout { color: var(--ink-2) !important; }
.site-login { padding: 0 24px; }
.site-nav-btn { border: 0; background: transparent; font: inherit; text-align: left; cursor: pointer; color: var(--ink); padding: 12px; border-radius: var(--radius-md); font-size: 16px; font-weight: 500; }
.login-wrap { display: flex; justify-content: center; padding: 64px 24px 96px; }
.login-card { width: 100%; max-width: 420px; padding: 32px; }
.login-card h1 { font-size: 28px; line-height: 38px; font-weight: 700; margin: 0 0 6px; }
.login-sub { margin: 0 0 24px; color: var(--ink-2); font-size: 15px; }
.login-card .hpw-btn-block { margin-top: 24px; height: 48px; font-size: 16px; }
.login-error { background: var(--red-soft); color: var(--red-text); border-radius: var(--radius-md); padding: 10px 14px; font-size: 14px; line-height: 22px; margin-bottom: 16px; }
.login-error[hidden] { display: none; }
.login-help { margin: 20px 0 0; font-size: 13px; line-height: 20px; color: var(--ink-2); text-align: center; }
/* 登录后页头内容更多，导航提前收进菜单 */
@media (max-width: 1100px) { .site-user { display: none; } }
@media (max-width: 1040px) {
  .site-menu-btn { display: inline-flex; }
  .site-link { display: none; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; background: var(--surface-raised); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm); padding: 8px 16px 16px; }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px; border-radius: var(--radius-md); font-size: 16px; }
  .site-nav-extra { display: block; }
}
@media (max-width: 640px) {
  .login-wrap { padding: 32px 16px 64px; }
  .login-card { padding: 24px 20px; }
  .login-card h1 { font-size: 24px; line-height: 32px; }
  .site-login { padding: 0 18px; }
}

/* ---------- 真实图片 ---------- */
.cat-photo { background: var(--surface-sunken); overflow: hidden; }
.cat-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-tiles .cat-glyph { width: 56px; height: 56px; }
.side-cat-name { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.side-cat-name img { width: 28px; height: 28px; border-radius: var(--radius-full); object-fit: cover; flex: none; background: var(--surface-sunken); }
@media (max-width: 640px) { .cat-tiles .cat-glyph { width: 44px; height: 44px; } }

/* ---------- 订单明细（我的订单、商家后台共用） ---------- */
.order-no .hpw-tag { margin-left: 8px; vertical-align: 1px; font-family: var(--font-sans); }
.order-items { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.order-item { display: grid; grid-template-columns: minmax(0, 1fr) auto 96px; gap: 12px; align-items: baseline; padding: 10px 14px; font-size: 14px; line-height: 22px; }
.order-item + .order-item { border-top: 1px solid var(--line); }
.order-item-name { color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.order-item-name small { display: block; font-size: 13px; line-height: 20px; color: var(--ink-2); }
.order-item-qty { color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.order-item-sub { text-align: right; color: var(--ink); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .order-item { grid-template-columns: minmax(0, 1fr) auto; }
  .order-item-qty { grid-column: 1; grid-row: 2; font-size: 13px; line-height: 20px; }
  .order-item-sub { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
}

/* ---------- 商家后台 ---------- */
.adm-head { padding-bottom: 0; }
.adm-tabs { display: flex; gap: 4px; margin-top: 16px; overflow-x: auto; }
.adm-tab { border: 0; background: transparent; font: inherit; font-size: 16px; line-height: 24px; font-weight: 500; color: var(--ink-2); padding: 10px 16px; border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; }
.adm-tab:hover { color: var(--ink); }
.adm-tab[aria-selected="true"] { color: var(--red-text); border-bottom-color: var(--red); font-weight: 600; }
.adm-tab:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }
.adm { padding-top: 24px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 16px; }
.adm-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 16px; }
.adm-bar label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; line-height: 20px; color: var(--ink-2); min-width: 0; }
.adm-bar .hpw-input { height: 40px; min-width: 0; width: 170px; }
.adm-bar .adm-grow { flex: 1 1 220px; }
.adm-bar .adm-grow .hpw-input { width: 100%; }
.adm-bar .hpw-btn { height: 40px; }
.adm-bar-end { margin-left: auto; }
.adm-sum { font-size: 14px; line-height: 22px; color: var(--ink-2); margin: 0; }
.adm-sum b { color: var(--ink); font-weight: 600; }
.adm-error { color: var(--red-text); background: var(--red-soft); border-radius: var(--radius-md); padding: 10px 14px; font-size: 14px; line-height: 22px; margin: 0; }
.adm-note { color: var(--green-text); background: var(--green-soft); border-radius: var(--radius-md); padding: 10px 14px; font-size: 14px; line-height: 22px; margin: 0; }
.adm-list { display: flex; flex-direction: column; gap: 12px; }
.adm-order { padding: 16px 20px; }
.adm-order .order-meta { margin: 6px 0 0; }
.adm-order-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.adm-rows { overflow: hidden; }
.adm-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 12px 16px; }
.adm-row + .adm-row { border-top: 1px solid var(--line); }
.adm-row.is-off { background: var(--surface-sunken); }
.adm-thumb { width: 64px; height: 64px; border-radius: var(--radius-md); background: var(--surface-sunken); overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--ink-3); flex: none; }
.adm-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.adm-thumb-lg { width: 120px; height: 120px; }
.adm-name { font-size: 15px; line-height: 22px; font-weight: 600; color: var(--ink); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.adm-sub { font-size: 13px; line-height: 20px; color: var(--ink-2); overflow-wrap: anywhere; }
.adm-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.adm-more { align-self: center; }
.adm-modal .hpw-scrim { position: fixed; inset: 0; z-index: 80; background: var(--overlay); }
.adm-dialog { position: fixed; z-index: 81; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); background: var(--surface-raised); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; }
.adm-dialog form { display: flex; flex-direction: column; min-height: 0; }
.adm-dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.adm-dlg-head h2 { margin: 0; font-size: 18px; line-height: 26px; font-weight: 600; }
.adm-dlg-body { padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.adm-dlg-foot { display: flex; gap: 8px; justify-content: flex-end; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); }
.adm-dlg-foot .adm-danger { margin-right: auto; color: var(--red-text); }
.adm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.adm-grid .adm-wide { grid-column: 1 / -1; }
.adm-grid .hpw-input, .adm-spec .hpw-input { width: 100%; min-width: 0; }
.adm-textarea { height: auto; min-height: 150px; padding: 10px 12px; line-height: 22px; resize: vertical; font: inherit; }
.adm-image { display: flex; gap: 16px; align-items: center; }
.adm-image p { margin: 0 0 8px; font-size: 13px; line-height: 20px; color: var(--ink-2); }
.adm-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.adm-checks { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.adm-check { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; line-height: 22px; cursor: pointer; }
.adm-check input { width: 18px; height: 18px; accent-color: var(--red); }
.adm-specs h3 { margin: 0 0 4px; font-size: 15px; line-height: 22px; font-weight: 600; }
.adm-specs > p { margin: 0 0 10px; font-size: 13px; line-height: 20px; color: var(--ink-2); }
.adm-spec { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.adm-spec .adm-check { font-size: 14px; white-space: nowrap; }
@media (max-width: 640px) {
  .adm { padding-top: 16px; }
  .adm-bar label, .adm-bar .hpw-input { width: 100%; }
  .adm-bar label { flex: 1 1 140px; }
  .adm-bar-end { margin-left: 0; width: 100%; }
  .adm-bar-end .hpw-btn { width: 100%; }
  .adm-order { padding: 14px 16px; }
    .adm-row { grid-template-columns: 56px minmax(0, 1fr); gap: 12px; }
  .adm-thumb { width: 56px; height: 56px; }
  .adm-row .adm-price { grid-column: 2; }
  .adm-row .adm-acts { grid-column: 1 / -1; justify-content: flex-start; }
  .adm-dialog { width: 100vw; max-height: 92vh; max-height: 92dvh; top: auto; bottom: 0; left: 0; transform: none; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .adm-grid { grid-template-columns: minmax(0, 1fr); }
  .adm-spec { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-md); }
  .adm-spec > :first-child { grid-column: 1 / -1; }
}

/* Logo 按高度显示、宽度自适应，换成别的比例的图也不会变形 */
.about-card .about-logo img { height: 72px; width: auto; max-width: 100%; display: block; }

/* Logo 现在只有徽标（不带文字），平台名称在旁边一直显示，窄屏也不隐藏 */
.site-logo { gap: 10px; }
.site-logo span { display: inline; font-size: 17px; line-height: 24px; font-weight: 700; color: var(--ink); padding-left: 0; border-left: 0; }
@media (max-width: 640px) { .site-logo { gap: 8px; } .site-logo span { font-size: 15px; line-height: 22px; } }

/* 商家后台 · 账号 */
.adm-row.adm-row-plain { grid-template-columns: minmax(0, 1fr) auto; }
.adm-dialog.adm-dialog-sm { width: min(480px, calc(100vw - 32px)); }
.adm-secret { margin: 0; border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.adm-secret > div { display: flex; align-items: baseline; gap: 16px; padding: 12px 16px; }
.adm-secret > div + div { border-top: 1px solid var(--line); }
.adm-secret dt { flex: none; width: 4em; font-size: 14px; line-height: 22px; color: var(--ink-2); }
.adm-secret dd { margin: 0; font-size: 16px; line-height: 24px; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.adm-secret .adm-secret-pw { font-family: var(--font-mono); font-size: 20px; line-height: 28px; letter-spacing: 0.04em; user-select: all; }
@media (max-width: 640px) {
  .adm-row.adm-row-plain { grid-template-columns: minmax(0, 1fr); }
  .adm-dialog.adm-dialog-sm { width: 100vw; }
  .adm-dlg-foot { flex-wrap: wrap; }
}
/* 弹窗里的内容不被压扁：放不下时整个内容区滚动 */
.adm-dlg-body > * { flex: none; }
