/* 同益智心商城 · 全新前端 */
:root {
  /* 温馨暖色：米白底 + 暖金/琥珀 + 陶土点缀；--navy 语义改为深棕褐（标题/强调） */
  --navy: #4A3728;
  --navy-deep: #3A2A1E;
  --gold: #D4A04A;
  --gold-hover: #BE8A35;
  --gold-soft: rgba(212, 160, 74, 0.18);
  --terracotta: #C4785A;
  --caramel: #A67C52;
  --warm: #FBF7F0;
  --warm-card: #ffffff;
  --text: #3D3229;
  --text-secondary: #6B5E52;
  --muted: #9A8B7A;
  --line: #EDE4D8;
  --header-bg: rgba(255, 252, 247, 0.92);
  --footer-bg: #F3EBE0;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 8px 28px rgba(74, 55, 40, 0.07);
  --shadow-hover: 0 14px 36px rgba(74, 55, 40, 0.12);
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --price-red: #E4393C;
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--warm);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
.wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.muted { color: var(--muted); }
.price { color: var(--price-red); font-weight: 700; letter-spacing: 0.01em; }
.price.muted { color: var(--muted); }
/* 京东式价格：¥ 与小数小一号，整数加粗 */
.jd-price { display: inline-flex; align-items: baseline; color: inherit; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.jd-sym { font-size: .62em; margin-right: 1px; font-weight: 600; }
.jd-int { font-size: 1em; }
.jd-dec { font-size: .62em; font-weight: 600; }
.jd-suffix { font-size: .62em; font-weight: 400; color: var(--muted); margin-left: 2px; }
.jd-price--sm { font-size: 15px; }
.price-del { color: var(--muted); text-decoration: line-through; font-size: 13px; font-weight: 400; }
.price--lg { font-size: 32px; }
.price--gold { color: var(--gold); }
.text-link { color: var(--navy); border-bottom: 1px solid var(--gold); }
.text-link:hover { color: var(--gold-hover); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 22px; border-radius: 999px;
  background: var(--gold); color: #fff; font-weight: 600;
  transition: transform .25s var(--ease), box-shadow .25s, background .2s;
  box-shadow: 0 6px 16px rgba(212, 160, 74, 0.32);
}
.btn:hover { background: var(--gold-hover); transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-navy { background: var(--terracotta); box-shadow: 0 6px 16px rgba(196,120,90,.28); color: #fff; }
.btn-navy:hover { background: #b3684c; }
.btn-ghost {
  background: transparent; color: var(--navy); border: 1px solid var(--line);
  box-shadow: none;
}
.btn-ghost:hover { border-color: var(--gold); color: var(--navy); background: var(--gold-soft); }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---- Page transition (jq22-inspired) ---- */
.page-enter {
  animation: pageIn .55s var(--ease) both;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }
.stagger > .reveal:nth-child(1) { transition-delay: .05s; }
.stagger > .reveal:nth-child(2) { transition-delay: .12s; }
.stagger > .reveal:nth-child(3) { transition-delay: .19s; }
.stagger > .reveal:nth-child(4) { transition-delay: .26s; }
.stagger > .reveal:nth-child(5) { transition-delay: .33s; }
.stagger > .reveal:nth-child(6) { transition-delay: .4s; }
.stagger > .reveal:nth-child(7) { transition-delay: .47s; }
.stagger > .reveal:nth-child(8) { transition-delay: .54s; }

@media (prefers-reduced-motion: reduce) {
  .back-top, .detail-tabs-bar, .img-preview { transition: none !important; animation: none !important; }
  .page-enter, .reveal, .hero-slide, .card, .btn { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 100; color: var(--text);
}
/* JS 量好展开高度后：外层只做占位（高度固定不变，正文不跳），内层固定定位负责收缩动效 */
.site-header.is-fixed { position: relative; }
.header-bar {
  background: var(--header-bg);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 20px rgba(74, 55, 40, 0.05);
  transition: background-color .38s var(--ease), box-shadow .38s var(--ease), border-color .38s var(--ease);
}
.site-header.is-fixed .header-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 100; }
.header-top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; font-size: 13px; color: var(--muted);
  border-bottom: 1px solid var(--line);
  max-height: 40px; overflow: hidden;
  transition: max-height .38s var(--ease), padding .38s var(--ease), opacity .28s ease, border-color .38s var(--ease);
}
.header-main { transition: min-height .38s var(--ease), padding .38s var(--ease); }
.brand-mark, .brand-mark svg { transition: width .38s var(--ease), height .38s var(--ease); }
.brand-text strong, .brand-text span { transition: font-size .38s var(--ease); }
/* 收紧态：顶条收起、主栏变矮、Logo 缩小、阴影加深、背景更实 */
.site-header.is-compact .header-bar {
  background: rgba(255, 252, 247, 0.97);
  box-shadow: 0 6px 24px rgba(74, 55, 40, 0.12);
}
.site-header.is-compact .header-top { max-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; border-bottom-color: transparent; }
.site-header.is-compact .header-main { min-height: 56px; padding: 4px 0; }
.site-header.is-compact .brand-mark,
.site-header.is-compact .brand-mark svg { width: 34px; height: 34px; }
.site-header.is-compact .brand-text strong { font-size: 16px; }
.site-header.is-compact .brand-text span { font-size: 11px; }
/* 测量时关闭过渡，取到的是终态高度 */
.site-header.is-measuring *, .site-header.is-measuring .header-bar { transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  .header-bar, .header-top, .header-main, .brand-mark, .brand-mark svg, .brand-text strong, .brand-text span, .detail-tabs { transition: none !important; }
}
.header-top a { color: var(--text-secondary); }
.header-top a:hover { color: var(--gold-hover); }
.header-main {
  display: flex; align-items: center; gap: 28px;
  min-height: var(--header-h); padding: 10px 0;
}
.brand {
  display: flex; align-items: center; gap: 12px; flex-shrink: 0;
}
.brand-mark { width: 42px; height: 42px; flex-shrink: 0; }
.brand-mark svg { width: 42px; height: 42px; display: block; }
.brand-text strong { display: block; font-size: 18px; color: var(--navy); letter-spacing: .04em; }
.brand-text span { font-size: 12px; color: var(--caramel); }
.nav-main { display: flex; gap: 8px; flex: 1; justify-content: center; }
.nav-main a {
  padding: 8px 16px; border-radius: 999px; color: var(--text-secondary);
  font-weight: 500; transition: background .2s, color .2s;
}
.nav-main > a { white-space: nowrap; flex-shrink: 0; }
/* 导航 4 项 + 搜索在 769–960px 放不下：提前收进汉堡菜单（与手机端同一套下拉） */
@media (max-width: 960px) {
  .nav-main { display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--warm-card); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    flex-direction: column; padding: 12px; gap: 4px; }
  .nav-main.is-open { display: flex; }
  .nav-toggle { display: grid; place-items: center; }
  .header-tools .search-mini { display: none; }
  .nav-main .nav-search { display: flex; margin-top: 8px; min-width: 0; }
  .header-tools { margin-left: auto; }
}
@media (max-width: 1100px) {
  .nav-main { gap: 4px; }
  .nav-main > a { padding-left: 12px; padding-right: 12px; }
}
.nav-main a:hover, .nav-main a.is-on { color: var(--navy); background: var(--gold-soft); }
.nav-main a.is-on { box-shadow: inset 0 -2px 0 var(--gold); border-radius: 0; background: transparent; padding-bottom: 10px; color: var(--navy); }
.header-tools { display: flex; align-items: center; gap: 14px; }
.header-tools a, .header-tools .tool {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-secondary); font-size: 14px;
}
.header-tools a:hover { color: var(--gold-hover); }
.search-mini {
  display: flex; align-items: center; background: #fff; border-radius: 999px;
  overflow: hidden; height: 38px; min-width: 200px;
  border: 1px solid var(--line); transition: border-color .2s, box-shadow .2s;
}
.search-mini:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.search-mini input {
  border: 0; outline: 0; padding: 0 14px; flex: 1; min-width: 0; background: transparent; color: var(--text);
}
.search-mini button {
  width: 40px; height: 36px; color: var(--navy);
  display: grid; place-items: center; transition: color .2s;
}
.search-mini button:hover { color: var(--gold-hover); }
.line-icon { width: 20px; height: 20px; flex-shrink: 0; }
.nav-search { display: none; }
.nav-toggle { display: none; width: 40px; height: 40px; color: var(--navy); border-radius: 10px; }
.nav-toggle .line-icon { width: 24px; height: 24px; }
a:focus-visible, button:focus-visible, .btn:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px;
}

/* ---- Hero ---- */
.hero {
  position: relative; min-height: 420px; color: #fff; overflow: hidden;
  background: #E8D9C4;
  border-radius: 0 0 24px 24px;
}
.hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(74,55,40,.72) 0%, rgba(74,55,40,.38) 50%, rgba(212,160,74,.22) 100%),
    url('../img/hero.jpg') center/cover no-repeat;
  transform: scale(1.06);
  animation: heroSlide 14s var(--ease) infinite alternate;
}
@keyframes heroSlide {
  from { transform: scale(1.06) translateX(0); }
  to { transform: scale(1.12) translateX(-2%); }
}
.hero-inner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; justify-content: center;
  min-height: 420px; padding: 64px 0;
  max-width: 760px;
}
/* 标题桌面/平板一行；窄屏只在「·」后的空格处换行 */
.hero h1 .nowrap { display: inline-block; white-space: nowrap; }
.hero h1 {
  margin: 0 0 16px; font-size: clamp(28px, 4vw, 40px); line-height: 1.35; font-weight: 700;
}
.hero p { margin: 0 0 28px; font-size: 16px; color: rgba(255,252,247,.92); line-height: 1.7; }
.hero .btn { align-self: flex-start; }

/* ---- Service strip ---- */
.service-strip {
  background: var(--warm-card); margin-top: -28px; position: relative; z-index: 2;
  border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid rgba(237, 228, 216, 0.9);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  padding: 22px 12px;
}
.service-item {
  display: flex; align-items: center; gap: 12px; padding: 8px 16px;
  transition: transform .25s var(--ease);
}
.service-item:hover { transform: translateY(-2px); }
.service-icon {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: var(--gold-soft); color: var(--gold);
  display: grid; place-items: center; font-size: 20px;
}
.service-icon .line-icon { width: 22px; height: 22px; }
.service-item strong { display: block; font-size: 15px; color: var(--navy); }
.service-item span { font-size: 12px; color: var(--muted); }

/* ---- Sections ---- */
.section { padding: 56px 0 24px; }
.section-head { margin-bottom: 28px; }
.section-head h2 {
  margin: 0 0 8px; font-size: 28px; color: var(--navy); position: relative; display: inline-block;
}
.section-head h2::after {
  content: ""; display: block; width: 48px; height: 3px; margin-top: 8px;
  background: var(--gold); border-radius: 2px;
}
.section-head p { margin: 0; color: var(--text-secondary); }

/* 首页分类分区：标题左、「查看更多」右 */
.home-cat + .home-cat { padding-top: 32px; }
.section-head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.section-more {
  display: inline-flex; align-items: center; gap: 2px; flex-shrink: 0; padding: 6px 0;
  color: var(--caramel); font-size: 14px; transition: color .2s;
}
.section-more:hover { color: var(--gold-hover); }
.section-more .line-icon { width: 16px; height: 16px; }
@media (max-width: 768px) {
  .section-head--row { align-items: flex-start; }
  .section-head--row h2 { font-size: 22px; }
  .section-head--row p { font-size: 14px; }
}

/* ---- Featured mix grid (home) ---- */
/* 只有 4 张卡：等宽单行，勿用跨行大卡（右两列第二行会空出来、高度对不齐） */
.featured-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px;
}

/* ---- Product cards ---- */
.product-card {
  background: var(--warm-card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}
.product-card.is-soldout { opacity: .72; }
.card-media {
  position: relative; aspect-ratio: 1; background: #F3EBE0; overflow: hidden;
}
.card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s var(--ease);
}
.product-card:hover .card-media img { transform: scale(1.05); }
.card-media .tag {
  position: absolute; top: 12px; left: 12px; z-index: 1;
  background: var(--gold); color: #fff; font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
}
.card-body { padding: 16px 18px 20px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.product-card { min-width: 0; }
.card-body > .muted { margin: 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-body h3 {
  margin: 0; font-size: 16px; color: var(--navy); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.8em; overflow-wrap: anywhere;
}
.card-body .price { font-size: 20px; margin-top: auto; padding-top: 8px; }

/* 列数只在这里和下方媒体查询里定（桌面 4 / 平板 3 / 手机 2），勿加更高优先级的覆盖 */
.product-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px;
}

/* ---- Filters ---- */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 22px;
}
.filter-btn {
  padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--text-secondary); font-size: 14px;
  transition: all .2s;
}
.filter-btn:hover { border-color: var(--gold); color: var(--navy); }
.filter-btn.is-on { background: var(--gold); color: #fff; border-color: var(--gold); }
.page-banner {
  padding: 36px 0 8px;
}
.page-banner h1 { margin: 0 0 8px; font-size: 32px; color: var(--navy); }
.page-banner h1::after {
  content: ""; display: block; width: 40px; height: 3px; margin-top: 10px; background: var(--gold);
}
.page-banner p { margin: 0; color: var(--text-secondary); }

/* ---- Product detail ---- */
.detail {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; padding: 28px 0 40px;
}
.gallery-stage {
  position: relative; background: #F3EBE0; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 1;
}
.gallery-stage img { width: 100%; height: 100%; object-fit: cover; }
.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.92);
  color: var(--navy); font-size: 22px; display: grid; place-items: center;
  box-shadow: var(--shadow);
}
.gallery-nav--prev { left: 12px; }
.gallery-nav--next { right: 12px; }
.gallery-index {
  position: absolute; right: 12px; bottom: 12px;
  background: rgba(74,55,40,.62); color: #fff; font-size: 12px;
  padding: 4px 10px; border-radius: 999px;
}
.thumb-row { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.thumb-row img {
  width: 72px; height: 72px; object-fit: cover; border-radius: 10px;
  border: 2px solid transparent; cursor: pointer; flex-shrink: 0; background: #F3EBE0;
}
.thumb-row img.is-on { border-color: var(--gold); }
.detail-info h1 { margin: 8px 0 12px; font-size: 26px; color: var(--navy); line-height: 1.35; }
.price-box {
  background: linear-gradient(90deg, #faf6ee, #fff); border-radius: var(--radius-sm);
  padding: 16px 18px; margin: 16px 0;
}
.price-box .label {
  display: inline-block; background: var(--caramel); color: #fff;
  font-size: 12px; padding: 2px 8px; border-radius: 4px; margin-right: 8px; vertical-align: middle;
}
.price-box .price { font-size: 32px; vertical-align: middle; }
.qty-row {
  display: flex; align-items: center; gap: 14px; margin: 16px 0;
}
.qty-row > span { color: var(--text-secondary); min-width: 48px; }
.sku-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; font-size: 14px; transition: all .2s;
}
.chip small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.chip.is-on { border-color: var(--gold); background: var(--gold-soft); color: var(--navy); }
.chip.is-disabled, .chip:disabled { opacity: .45; cursor: not-allowed; }
.qty-ctrl {
  display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
}
.qty-ctrl button { width: 40px; height: 40px; background: var(--warm); color: var(--navy); font-size: 18px; }
.qty-ctrl input {
  width: 56px; height: 40px; border: 0; text-align: center; outline: 0; background: #fff;
}
.assure-row {
  display: flex; gap: 24px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line);
}
.assure-row span { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); font-size: 14px; }
.assure-row .ico { color: var(--gold); }
.goods-section { padding: 32px 0 48px; }
.goods-section h2 {
  text-align: center; font-size: 20px; color: var(--navy); margin: 0 0 24px;
  display: flex; align-items: center; justify-content: center; gap: 16px;
}
.goods-section h2::before, .goods-section h2::after {
  content: ""; flex: 1; max-width: 120px; height: 1px; background: var(--line);
}
.goods-content { color: var(--text-secondary); line-height: 1.8; }
/* 详情图常是长图切片：不留外边距/圆角/阴影，块级显示消除基线缝 */
.goods-content img { display: block; width: auto; margin: 0 auto; padding: 0; border: 0; border-radius: 0; box-shadow: none; max-width: 100%; height: auto; vertical-align: top; }
.feature-icons {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px;
}
.feature-icons article {
  text-align: center; padding: 20px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
}
.feature-icons .ico { font-size: 28px; color: var(--gold); margin-bottom: 8px; }
.buy-bar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: #fff; padding: 10px 16px; box-shadow: 0 -4px 20px rgba(0,0,0,.08);
  align-items: center; justify-content: space-between; gap: 12px;
}

/* ---- Buy / order cards ---- */
.buy-page { padding: 28px 0 60px; }
.buy-page > h1 { margin: 0 0 24px; font-size: 28px; color: var(--navy); }
.buy-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px 24px; margin-bottom: 16px;
}
.buy-card h2 {
  margin: 0 0 16px; font-size: 17px; color: var(--navy);
  display: flex; align-items: center; gap: 10px;
}
.buy-card h2::before {
  content: ""; width: 4px; height: 16px; background: var(--gold); border-radius: 2px;
}
.buy-goods {
  display: flex; gap: 16px; align-items: center;
}
.buy-goods img {
  width: 88px; height: 88px; object-fit: cover; border-radius: 12px; background: #F3EBE0;
}
.buy-goods-info { flex: 1; min-width: 0; }
.buy-goods-info strong { display: block; color: var(--navy); margin-bottom: 4px; }
.buy-summary { text-align: right; margin-top: 12px; }
.buy-summary .row { display: flex; justify-content: flex-end; gap: 24px; margin: 6px 0; color: var(--text-secondary); }
.buy-summary .total { font-size: 24px; color: var(--price-red); font-weight: 700; }
.pay-choice {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fffaf5;
}
.pay-choice.is-on { border-color: var(--gold); background: var(--gold-soft); }
.pay-choice .ok { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; color: var(--gold-hover); font-weight: 600; font-size: 14px; }
.pay-choice-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; background: #fff; color: var(--text-secondary); border: 1px solid var(--line); }
.pay-choice.is-on .pay-choice-icon { color: var(--gold-hover); border-color: var(--gold); }
.pay-choice-icon .line-icon { width: 24px; height: 24px; }
.pay-choice .ok .line-icon, .btn .line-icon { width: 18px; height: 18px; }
.notice {
  margin-top: 12px; padding: 12px 14px; border-radius: 10px;
  background: #fff6e8; color: #8a5a12; font-size: 14px;
  display: flex; gap: 8px; align-items: flex-start;
}
.notice .line-icon { width: 18px; height: 18px; margin-top: 2px; }
.addr-card {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px;
  background: #fff; transition: border-color .2s, background .2s;
}
.addr-card.is-pickable { cursor: pointer; }
.addr-card.is-on { border-color: var(--gold); background: var(--gold-soft); position: relative; }
/* 选中地址：右上角金色线条勾 */
.addr-card.is-pickable.is-on::after {
  content: ""; position: absolute; top: 10px; right: 12px; width: 20px; height: 20px;
  background: var(--gold-hover);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M8.3 12.3l2.5 2.5 4.9-5'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M8.3 12.3l2.5 2.5 4.9-5'/%3E%3C/svg%3E") center/contain no-repeat;
}
.addr-card.is-pickable.is-on .addr-card-actions { margin-right: 26px; }
.addr-default {
  display: inline-block; margin-left: 8px; font-size: 12px; padding: 1px 8px;
  background: var(--gold); color: #fff; border-radius: 4px; vertical-align: middle;
}
.addr-card-actions { display: flex; gap: 8px; flex-shrink: 0; }
.addr-form-grid { display: grid; gap: 12px; }
.addr-form-actions { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.form-field label { font-size: 13px; color: var(--text-secondary); }
.form-field input, .form-field select, .auth-field input {
  height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; outline: none;
}
.form-field input:focus, .form-field select:focus, .auth-field input:focus {
  border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft);
}
.form-error, .auth-error { color: #c0392b; font-size: 14px; min-height: 1.2em; }

/* ---- Auth ---- */
/* 勿用 grid place-items 居中：auto 列下 width 百分比会退化成内容宽，卡片被挤窄 */
.auth-page {
  min-height: calc(100vh - 200px); display: flex; align-items: center; justify-content: center;
  padding: 48px 20px;
}
/* 挂载容器（#login-root 等）必须撑满，否则卡片宽度按内容收缩 */
.auth-page > * { width: 100%; display: flex; justify-content: center; }
.auth-shell {
  width: min(920px, 100%); display: grid; grid-template-columns: minmax(0, 1fr) minmax(400px, 480px);
  background: #fff; border-radius: 20px; box-shadow: var(--shadow); overflow: hidden;
  animation: pageIn .5s var(--ease);
}
.auth-brand {
  display: flex; flex-direction: column; justify-content: center; gap: 6px;
  padding: 48px 44px; color: var(--navy);
  background: linear-gradient(160deg, #F6EBDA 0%, #EFDDBF 100%);
}
.auth-brand-mark svg { width: 64px; height: 64px; display: block; margin-bottom: 18px; }
.auth-brand strong { font-size: 30px; letter-spacing: .06em; }
.auth-brand-sub { color: var(--caramel); font-size: 15px; letter-spacing: .08em; }
.auth-brand p { margin: 22px 0 0; font-size: 18px; font-weight: 600; }
.auth-brand .auth-brand-note { margin-top: 8px; font-size: 14px; font-weight: 400; color: var(--text-secondary); }
.auth-card {
  width: 100%; background: #fff; padding: 44px 40px 36px;
}
.auth-kicker { color: var(--gold); font-size: 13px; font-weight: 600; margin: 0 0 6px; letter-spacing: .08em; }
.auth-card h1 { margin: 0 0 8px; font-size: 26px; color: var(--navy); }
.auth-sub { margin: 0 0 24px; }
.auth-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; font-size: 14px; color: var(--text-secondary); }
.auth-field-head { display: flex; justify-content: space-between; }
.auth-code { display: flex; gap: 10px; }
.auth-code input { flex: 1; min-width: 0; }
.auth-code .btn { min-height: 48px; flex-shrink: 0; }
.auth-field input { height: 48px; padding: 0 14px; font-size: 15px; }
.auth-card .btn-block { min-height: 48px; font-size: 16px; margin-top: 4px; }
.auth-switch { text-align: center; margin-top: 18px; color: var(--muted); }
.agree-row { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--text-secondary); margin: 8px 0 12px; }

/* ---- Orders / account ---- */
.order-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.order-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 14px; overflow: hidden; }
.order-card-head {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted);
}
.status-tag { color: var(--gold); font-weight: 600; }
.order-card-item {
  display: grid; grid-template-columns: 64px 1fr auto auto; gap: 12px; align-items: center;
  padding: 14px 18px;
}
.order-card-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; background: #F3EBE0; }
.order-card-foot {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px;
  padding: 12px 18px 16px; border-top: 1px solid var(--line); font-size: 14px;
}
.account-user {
  display: flex; gap: 18px; align-items: center; background: #fff;
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 16px;
}
/* 头像：头部与账户页共用；真实头像盖在首字上，失败即露出首字 */
.avatar {
  position: relative; display: inline-grid; place-items: center; flex-shrink: 0; overflow: hidden;
  width: 40px; height: 40px; border-radius: 50%;
  background: #F1E2C8; color: var(--navy); border: 1px solid rgba(212, 160, 74, .45);
  font-weight: 600; line-height: 1;
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar .line-icon { width: 60%; height: 60%; }
.avatar--sm { width: 28px; height: 28px; font-size: 13px; }
.avatar--lg { width: 64px; height: 64px; font-size: 26px; border-width: 2px; }
.account-stats { display: flex; gap: 20px; margin-top: 8px; flex-wrap: wrap; }
.account-stats b { color: var(--navy); }
.account-links { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }

/* ---- 个人中心（左侧菜单 + 右侧卡片，参考京东/淘宝 PC 用户中心） ---- */
.uc { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; padding: 28px 0 48px; }
.uc-side {
  position: sticky; top: calc(var(--shop-header-h, 72px) + 16px);
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 14px;
  transition: top .38s var(--ease);
}
.uc-side h2 { margin: 0 8px 14px; font-size: 18px; color: var(--navy); }
.uc-side-group { padding: 10px 0; border-top: 1px solid var(--line); }
.uc-side-group h3 { margin: 0 8px 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
.uc-side a {
  display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 10px;
  color: var(--text-secondary); font-size: 14px; transition: background .2s, color .2s;
}
.uc-side a:hover { background: var(--gold-soft); color: var(--navy); }
.uc-side .line-icon { width: 18px; height: 18px; color: var(--caramel); }
.uc-main { display: grid; gap: 16px; min-width: 0; }
.uc-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 24px; }
.uc-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.uc-card-head h2 { margin: 0; font-size: 17px; color: var(--navy); }
.uc-more { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; color: var(--muted); }
.uc-more:hover { color: var(--gold-hover); }
.uc-more .line-icon { width: 16px; height: 16px; }
.uc-user {
  display: flex; align-items: center; gap: 18px; padding: 26px 28px;
  background: linear-gradient(120deg, #FFF8EC 0%, #fff 70%);
}
.uc-user-info { flex: 1; min-width: 0; }
.uc-user-info h1 { margin: 0; font-size: 22px; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-user-info p { margin: 6px 0 0; }
.uc-assets { display: flex; gap: 8px; }
.uc-assets[hidden] { display: none; }
.uc-assets div { min-width: 104px; padding: 4px 16px; text-align: center; border-left: 1px solid var(--line); }
.uc-assets b { display: block; font-size: 20px; color: var(--navy); font-weight: 600; }
.uc-assets span { font-size: 13px; color: var(--muted); }
.uc-orders { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.uc-orders a {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 4px;
  border-radius: 12px; color: var(--text-secondary); font-size: 14px; transition: background .2s, color .2s;
}
.uc-orders a:hover { background: var(--gold-soft); color: var(--navy); }
.uc-orders-ico { position: relative; color: var(--caramel); }
.uc-orders-ico .line-icon { width: 30px; height: 30px; stroke-width: 1.5; }
.uc-badge {
  position: absolute; top: -6px; left: 20px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--terracotta); color: #fff; font-size: 11px; font-style: normal;
  line-height: 18px; text-align: center;
}
.uc-badge[hidden] { display: none; }
.uc-entries { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.uc-entries-assets { display: contents; }
.uc-entries-assets[hidden] { display: none; }
.uc-entries > a, .uc-entries > button, .uc-entry-static {
  display: flex; align-items: center; gap: 10px; padding: 14px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--warm); color: var(--text); font-size: 14px; text-align: left;
  transition: border-color .2s, background .2s;
}
.uc-entries > a:hover, .uc-entries > button:hover { border-color: var(--gold); background: #fff; }
.uc-entries .line-icon { width: 22px; height: 22px; color: var(--caramel); }
.uc-entry-static small { display: block; margin-top: 2px; font-size: 13px; color: var(--navy); font-weight: 600; }
#logout { cursor: pointer; font: inherit; font-size: 14px; }
.uc-address #addr-mount > h2 { margin: 0 0 14px; font-size: 17px; color: var(--navy); }
.uc-address { scroll-margin-top: calc(var(--shop-header-h, 72px) + 16px); }
@media (max-width: 900px) {
  .uc { grid-template-columns: minmax(0, 1fr); padding: 16px 0 36px; }
  .uc-side { display: none; }
}
@media (max-width: 768px) {
  .uc-card { padding: 16px; }
  .uc-user { flex-wrap: wrap; padding: 20px 16px; gap: 14px; }
  .uc-assets { width: 100%; }
  .uc-assets div { flex: 1; border-left: 0; background: rgba(255, 255, 255, .7); border-radius: 12px; padding: 8px; }
  .uc-entries { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .uc-orders a { font-size: 13px; }
}

/* ---- Pay result ---- */
.ok-box {
  text-align: center; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 48px 28px; max-width: 560px; margin: 40px auto;
}
.ok-mark .line-icon { width: 38px; height: 38px; }
.gallery-nav .line-icon, .img-preview-close .line-icon { width: 22px; height: 22px; }
.assure-row .line-icon { width: 18px; height: 18px; }
.ok-mark {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 16px;
  background: var(--gold-soft); color: var(--gold-hover); font-size: 36px;
  display: grid; place-items: center; animation: popIn .5s var(--ease);
}
@keyframes popIn {
  from { transform: scale(.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ---- Empty / skeleton ---- */
.empty {
  text-align: center; padding: 56px 20px; background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); color: var(--text-secondary);
}
.empty p { margin: 0 0 16px; }
.skeleton-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.skeleton-card {
  background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.skeleton-card .sk-img {
  aspect-ratio: 1; background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
  background-size: 200% 100%; animation: shimmer 1.2s infinite;
}
.skeleton-card .sk-line {
  height: 14px; margin: 14px 16px; border-radius: 4px;
  background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
  background-size: 200% 100%; animation: shimmer 1.2s infinite;
}
.skeleton-card .sk-line.short { width: 40%; }
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---- Toast ---- */
.toast {
  position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%);
  background: rgba(74,55,40,.92); color: #fff; padding: 12px 20px; border-radius: 999px;
  font-size: 14px; z-index: 200; box-shadow: var(--shadow); animation: pageIn .3s var(--ease);
}

/* ---- Footer ---- */
.site-footer {
  background: var(--footer-bg); color: var(--text-secondary); margin-top: 48px; padding: 40px 0 24px;
  border-top: 1px solid var(--line);
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; margin-bottom: 28px;
}
.site-footer h3 { color: var(--navy); font-size: 15px; margin: 0 0 12px; }
.site-footer a { color: var(--text-secondary); }
.site-footer a:hover { color: var(--gold-hover); }
.site-footer p { margin: 0 0 8px; font-size: 14px; }
.footer-services {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  padding: 24px 0; border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line); margin-bottom: 20px;
}
.footer-services article { text-align: center; }
.footer-services strong { display: block; color: var(--navy); margin-bottom: 12px; }
.footer-services span { font-size: 12px; color: var(--caramel); }
.copyright { text-align: center; font-size: 13px; color: var(--muted); }
.copyright a { color: var(--muted); }

.crumb { padding: 18px 0 2px; font-size: 14px; color: var(--muted); }
.crumb ol { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; min-width: 0; white-space: nowrap; }
.crumb li { display: inline-flex; align-items: center; min-width: 0; flex-shrink: 0; }
.crumb li + li::before {
  content: ""; width: 6px; height: 6px; margin: 0 12px 0 10px; flex-shrink: 0;
  border-top: 1.5px solid #C9B9A4; border-right: 1.5px solid #C9B9A4; transform: rotate(45deg);
}
.crumb a { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); border-radius: 6px; transition: color .2s; }
.crumb a:hover { color: var(--gold-hover); }
.crumb .line-icon { width: 17px; height: 17px; }
.crumb .crumb-current { flex-shrink: 1; color: var(--navy); font-weight: 500; overflow: hidden; }
.crumb .crumb-current span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 520px; }

.linkish { color: var(--muted); font-size: 13px; }
.linkish:hover { color: #c0392b; }

/* ---- 子女端下载页 ---- */
.dl-page { padding-top: 32px; }
.dl-hero {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px; align-items: center;
  background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 48px; overflow: hidden;
}
.dl-hero h1 { margin: 0 0 14px; font-size: clamp(26px, 3.4vw, 38px); line-height: 1.35; color: var(--navy); }
.dl-lead { margin: 0 0 26px; color: var(--text-secondary); font-size: 16px; }
.dl-action { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.dl-btn { min-height: 52px; padding: 0 30px; font-size: 17px; }
.dl-btn.is-off { background: #E3D6C4; color: var(--text-secondary); box-shadow: none; cursor: default; transform: none; }
.dl-meta { margin: 0; color: var(--caramel); font-size: 14px; }
.dl-hint { margin: 16px 0 0; color: var(--muted); font-size: 13px; }
.dl-hero-mark {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  min-height: 260px; border-radius: 16px; color: var(--navy);
  background: linear-gradient(160deg, #F6EBDA 0%, #EFDDBF 100%);
}
.dl-qr {
  width: 180px; height: 180px; box-sizing: border-box; padding: 8px;
  background: #fff; border-radius: 12px;
}
.dl-mark svg { width: 96px; height: 96px; display: block; margin-bottom: 12px; }
.dl-hero-mark strong { font-size: 24px; letter-spacing: .06em; }
.dl-hero-mark span:last-child { color: var(--caramel); font-size: 14px; }
.dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.dl-point { padding: 24px; background: #fff; }
.dl-point h3 { margin: 14px 0 8px; font-size: 17px; color: var(--navy); }
.dl-point p { margin: 0; color: var(--text-secondary); font-size: 14px; }
.dl-point .line-icon { width: 22px; height: 22px; }
.dl-wxbar { display: none; margin: 0; padding: 10px 16px; background: #fff6e8; color: #8a5a12; font-size: 14px; text-align: center; }
.dl-wxbar.is-on { display: block; }
.dl-mask { display: none; position: fixed; inset: 0; z-index: 300; background: rgba(58,42,30,.82); color: #fff; }
.dl-mask.is-on { display: block; }
.dl-mask p { position: absolute; right: 24px; top: 72px; margin: 0; font-size: 18px; line-height: 1.8; text-align: right; }
.dl-mask p::before {
  content: ""; display: block; width: 40px; height: 40px; margin-left: auto; margin-bottom: 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17L17 7M9 7h8v8'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ---- 回到顶部 ---- */
.back-top {
  position: fixed; right: 24px; bottom: 28px; z-index: 95;
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 252, 247, .94); color: var(--navy); border: 1px solid var(--line);
  box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s, background .2s, color .2s, bottom .3s var(--ease);
}
.back-top.is-on { opacity: 1; visibility: visible; transform: none; }
.back-top:hover { background: var(--gold); color: #fff; border-color: var(--gold); }
.back-top .line-icon { width: 22px; height: 22px; }

/* ---- 详情吸顶导航 ---- */
.detail-tabs-wrap { padding-bottom: 48px; }
.detail-tabs {
  position: sticky; top: 0; z-index: 80; margin: 8px 0 20px;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  transition: box-shadow .25s, background .25s, border-radius .25s, top .38s var(--ease);
}
.detail-tabs.is-stuck {
  background: rgba(255, 252, 247, .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 18px rgba(74, 55, 40, .1); border-radius: 0 0 var(--radius) var(--radius);
}
.detail-tabs-inner { position: relative; display: flex; gap: 8px; padding: 0 16px; overflow-x: auto; }
.detail-tab {
  position: relative; padding: 15px 18px; font-size: 16px; color: var(--text-secondary); white-space: nowrap;
  transition: color .2s;
}
.detail-tab:hover { color: var(--navy); }
.detail-tab.is-on { color: var(--navy); font-weight: 600; }
.detail-tabs-bar {
  position: absolute; left: 0; bottom: 0; height: 3px; width: 0; border-radius: 3px 3px 0 0;
  background: var(--gold); transition: transform .35s var(--ease), width .35s var(--ease);
}
.detail-sec { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 28px; margin-bottom: 18px; }
.detail-sec h2 { margin: 0 0 18px; font-size: 18px; color: var(--navy); display: flex; align-items: center; gap: 10px; }
.detail-sec h2::before { content: ""; width: 4px; height: 16px; background: var(--gold); border-radius: 2px; }
.goods-content { overflow-wrap: anywhere; }
/* 详情图按原尺寸显示、不放大；容器限 790px（淘宝/京东详情切图宽）居中 */
.goods-content { max-width: 790px; margin-left: auto; margin-right: auto; }
/* 只含图片的段落/容器（product.js 标记 .img-only）：去掉段距与行高，文字段落不受影响 */
.goods-content .img-only { margin: 0; padding: 0; line-height: 0; font-size: 0; }
.spec-table-wrap { overflow-x: auto; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.spec-table th, .spec-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.spec-table th { color: var(--muted); font-weight: 500; background: #FCF8F2; }
.spec-table td .jd-price { color: var(--price-red); }

/* ---- 放大镜（仅桌面） ---- */
.detail-media { position: relative; }
.zoom-lens {
  position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; opacity: 0;
  background: rgba(212, 160, 74, .18); border: 1px solid rgba(212, 160, 74, .75);
  transition: opacity .15s;
}
.zoom-pane {
  position: absolute; top: 0; left: calc(100% + 16px); z-index: 60; pointer-events: none;
  opacity: 0; visibility: hidden; background-color: #fff; background-repeat: no-repeat;
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-hover);
  transition: opacity .15s, visibility .15s;
}
.zoom-lens.is-on, .zoom-pane.is-on { opacity: 1; visibility: visible; }
@media (hover: hover) and (pointer: fine) { .gallery-stage #main-img { cursor: crosshair; } }

/* ---- 主图预览 ---- */
.img-preview {
  position: fixed; inset: 0; z-index: 300; background: rgba(40, 28, 20, .86);
  display: grid; place-items: center; padding: 24px; animation: pageIn .25s var(--ease);
}
.img-preview img { max-width: min(960px, 100%); max-height: 90vh; object-fit: contain; border-radius: 12px; }
.img-preview-close {
  position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255, 255, 255, .9); color: var(--navy); font-size: 26px; line-height: 1;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-grid, .skeleton-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .service-strip { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .header-top { display: none; }
  .nav-main { display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--warm-card); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    flex-direction: column; padding: 12px; gap: 4px; }
  .nav-main.is-open { display: flex; }
  .nav-toggle { display: grid; place-items: center; }
  .header-tools .search-mini { display: none; }
  .nav-main .nav-search { display: flex; margin-top: 8px; min-width: 0; }
  .header-tools { margin-left: auto; }
  .header-tools [data-nav-user] span { max-width: 6em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .auth-page { padding: 20px 16px; align-items: flex-start; }
  .auth-card { padding: 28px 20px; }
  .auth-brand { padding: 22px 20px; }
  .header-main { gap: 12px; }
  .featured-grid, .product-grid, .skeleton-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card-body { padding: 12px 12px 14px; }
  .card-body h3 { font-size: 15px; }
  .card-body .price { font-size: 18px; }
  /* minmax(0,1fr)：防止缩略图行的最小内容宽度把单列撑出视口 */
  .detail { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .service-strip { grid-template-columns: 1fr; margin-top: 0; border-radius: 0; }
  .footer-grid, .footer-services, .feature-icons { grid-template-columns: 1fr; }
  .buy-bar { display: flex; }
  .back-top { right: 16px; bottom: 20px; width: 42px; height: 42px; }
  .crumb { font-size: 13px; padding-top: 12px; }
  .crumb .crumb-home span { display: none; }
  .crumb .crumb-current span { max-width: none; }
  .back-top.is-lift { bottom: 84px; }
  .detail-tab { padding: 13px 14px; font-size: 15px; }
  .detail-sec { padding: 18px 16px; }
  .price--lg, .price-box .price { font-size: 28px; }
  .order-card-item { grid-template-columns: 56px 1fr; }
  .account-user { flex-wrap: wrap; }
  .hero { min-height: 360px; }
  .hero-inner { min-height: 360px; padding: 40px 0; }
}
@media (max-width: 900px) {
  .auth-shell { width: min(520px, 100%); grid-template-columns: 1fr; }
  .auth-brand { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 24px 32px; }
  .auth-brand-mark svg { width: 44px; height: 44px; margin: 0; }
  .auth-brand strong { font-size: 22px; }
  .auth-brand p { display: none; }
  .auth-card { padding: 32px 32px 28px; }
}
@media (max-width: 768px) {
  .auth-brand { padding: 20px; }
  .auth-card { padding: 26px 20px 24px; }
}
@media (max-width: 900px) {
  .dl-hero { grid-template-columns: 1fr; padding: 32px 28px; }
  .dl-hero-mark { min-height: 0; padding: 24px; order: -1; }
  .dl-qr { width: 148px; height: 148px; }
  .dl-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .dl-page { padding-top: 16px; }
  .dl-hero { padding: 24px 20px; }
  .dl-btn { width: 100%; }
  .dl-grid { grid-template-columns: 1fr; }
}

/* ---- 协议与说明页（agreement/privacy/service/about/contact） ---- */
.info-page { padding-top: 32px; max-width: 920px; }
.info-head { margin-bottom: 24px; }
.info-head h1 { margin: 0 0 8px; font-size: clamp(24px, 3vw, 32px); color: var(--navy); }
.info-head h1::after { content: ""; display: block; width: 48px; height: 3px; margin-top: 10px; background: var(--gold); border-radius: 2px; }
.legal-block { display: flex; flex-direction: column; gap: 16px; }
.legal-card { background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: 24px 28px; line-height: 1.85; }
.legal-card h2 { margin: 0 0 10px; font-size: 18px; color: var(--navy); }
.legal-card p { margin: 0 0 8px; }
.legal-card a { color: var(--gold-hover); }
.legal-list { margin: 0; padding-left: 1.2em; }
.legal-list li { margin: 4px 0; }
.legal-card .btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.legal-card .btn-row .btn { color: #fff; }
.legal-card .btn-row .btn-ghost { color: var(--navy); }
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.contact-tel { font-size: 20px; font-weight: 600; }
.contact-tel a { color: var(--navy); }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
@media (max-width: 720px) {
  .contact-grid { grid-template-columns: 1fr; }
  .legal-card { padding: 20px; }
}

/* ---- 订单操作弹窗（申请退货 / 取消 / 确认收货） ---- */
.btn-sm { min-height: 36px; padding: 0 16px; font-size: 14px; }
.btn-sm .line-icon { width: 16px; height: 16px; }
.od-lock { overflow: hidden; }
.od-mask { position: fixed; inset: 0; z-index: 300; background: rgba(74,55,40,.38); display: flex; align-items: center; justify-content: center; padding: 20px; animation: pageIn .25s var(--ease); }
.od-dialog { position: relative; width: min(460px, 100%); background: #FBF7F0; border-radius: 18px; box-shadow: var(--shadow-hover); padding: 26px 24px 20px; }
.od-dialog h3 { margin: 0 0 16px; color: var(--navy); font-size: 19px; }
.od-x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.od-x:hover { background: var(--gold-soft); color: var(--navy); }
.od-body p { margin: 0 0 8px; line-height: 1.7; }
.od-field { display: block; margin-bottom: 14px; }
.od-field span { display: block; font-size: 14px; color: var(--navy); margin-bottom: 6px; font-weight: 600; }
.od-field em { color: var(--price-red); font-style: normal; margin-left: 2px; }
.od-field select, .od-field textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 10px 12px; font-size: 15px; resize: vertical; }
.od-field select:focus, .od-field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,160,74,.18); }
.od-tip { font-size: 13px; }
.od-tip a { color: var(--gold-hover); }
.od-err { min-height: 20px; margin: 4px 0 8px; color: var(--price-red); font-size: 14px; }
.od-actions { display: flex; justify-content: flex-end; gap: 12px; }
@media (max-width: 520px) { .od-mask { align-items: flex-end; padding: 0; } .od-dialog { border-radius: 18px 18px 0 0; } .od-actions .btn { flex: 1; } }

/* ---- 商品详情「售后服务」栏（条款来自 js/service-terms.js） ---- */
.svc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.svc-item { background: #FBF7F0; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.svc-item h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 15px; color: var(--navy); }
.svc-ico { width: 30px; height: 30px; border-radius: 50%; background: var(--gold-soft); color: var(--gold-hover); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.svc-ico .line-icon { width: 17px; height: 17px; }
.svc-item ul { margin: 0; padding-left: 1.1em; font-size: 13.5px; line-height: 1.75; color: var(--text-secondary); }
.svc-item li { margin: 2px 0; }
.svc-item strong { color: var(--navy); }
.svc-item a, .svc-more a { color: var(--gold-hover); }
.svc-more { margin: 14px 0 0; font-size: 13px; }
.assure-link { display: inline-flex; align-items: center; gap: 6px; color: inherit; font: inherit; padding: 0; }
.assure-link:hover { color: var(--gold-hover); }
@media (max-width: 1024px) { .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .svc-grid { grid-template-columns: 1fr; } }

/* ---- 我的订单空状态 + 为你推荐 ---- */
.order-empty { text-align: center; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 48px 24px 40px; }
.order-empty-art { width: 112px; height: 112px; margin: 0 auto 18px; border-radius: 50%; background: var(--gold-soft); color: var(--gold-hover); display: flex; align-items: center; justify-content: center; }
.order-empty-art svg { width: 64px; height: 64px; }
.order-empty h2 { margin: 0 0 8px; font-size: 19px; color: var(--navy); }
.order-empty p { margin: 0 auto 22px; max-width: 360px; font-size: 14px; line-height: 1.7; }
.order-empty-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.order-rec { margin-top: 32px; }
.order-rec h2 { margin: 0 0 16px; font-size: 18px; color: var(--navy); display: flex; align-items: center; gap: 10px; }
.order-rec h2::before { content: ""; width: 4px; height: 16px; background: var(--gold); border-radius: 2px; }
@media (max-width: 520px) {
  .order-empty { padding: 36px 18px 30px; }
  .order-empty-art { width: 96px; height: 96px; }
  .order-empty-art svg { width: 54px; height: 54px; }
  .order-empty-actions { flex-direction: column; align-items: stretch; max-width: 260px; margin: 0 auto; }
}

/* ---- 商品列表极简布局（无面包屑/标题/筛选条，网格紧贴头部下方） ---- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.list-page { padding: 28px 0 48px; }
.list-notice { margin: 0 0 16px; font-size: 14px; color: var(--text-secondary); }
.list-notice[hidden] { display: none; }
.list-page .empty { margin-top: 0; }
@media (max-width: 768px) {
  .list-page { padding: 16px 0 36px; }
  .list-notice { margin-bottom: 12px; font-size: 13px; }
}

/* ---- 已售件数（仅 sales>0 时渲染；小号暖灰，贴在价格右侧，仿京东/淘宝） ---- */
.card-price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; min-width: 0; }
.card-price-row .price { margin-top: 0; padding-top: 0; }
.sold-count { flex-shrink: 0; font-size: 12px; color: var(--muted); white-space: nowrap; }
.sold-count--lg { margin-left: auto; font-size: 13px; align-self: center; }
.price-box { display: flex; align-items: center; flex-wrap: wrap; row-gap: 6px; }
