/* ==========================================================================
   眠岸 MIANAN — 设计系统
   极简高端：暖白底、近黑字、细线分隔、大留白、极小圆角
   ========================================================================== */

:root {
  --bg:        #FAF9F7;
  --surface:   #FFFFFF;
  --surface-2: #F4F2ED;
  --surface-3: #EFEBE3;

  --ink:   #1E1D1B;
  --ink-2: #6B6862;
  --ink-3: #9A968E;
  --ink-4: #BAB5AB;

  --line:   #E8E5DF;
  --line-2: #D9D5CC;

  --brand:     #39412F;
  --brand-2:   #4C5640;
  --brand-ink: #FFFFFF;
  --accent:    #A9774F;
  --danger:    #B4552F;
  --ok:        #4A7C59;
  --warn:      #B08544;

  --radius:    2px;
  --radius-lg: 4px;

  --shadow-sm: 0 1px 2px rgba(30, 29, 27, .05);
  --shadow:    0 2px 6px rgba(30, 29, 27, .05), 0 14px 36px rgba(30, 29, 27, .06);
  --shadow-lg: 0 24px 60px rgba(30, 29, 27, .12);

  --max: 1320px;
  --header-h: 68px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Songti SC", "Source Han Serif SC", "Noto Serif SC", "Times New Roman", Georgia, "SimSun", serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; padding: 0; }

h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.3; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

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

/* ------------------------------ 排版 ------------------------------ */

.display {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4.4vw, 58px);
  line-height: 1.22;
  letter-spacing: .01em;
  font-weight: 500;
}
.h1 { font-family: var(--font-serif); font-size: clamp(26px, 3vw, 38px); letter-spacing: .01em; }
.h2 { font-family: var(--font-serif); font-size: clamp(22px, 2.4vw, 30px); }
.h3 { font-size: 17px; font-weight: 500; }

.eyebrow {
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.lede { font-size: 15px; color: var(--ink-2); line-height: 1.9; }
.muted { color: var(--ink-2); }
.dim { color: var(--ink-3); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.serif { font-family: var(--font-serif); }
.center { text-align: center; }
.right { text-align: right; }

/* ------------------------------ 布局 ------------------------------ */

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 28px; }
.wrap-narrow { max-width: 940px; }
.section { padding: 88px 0; }
.section-sm { padding: 56px 0; }
.section-head { margin-bottom: 40px; }
.section-head.between { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.row { display: flex; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; }
.hide { display: none !important; }

/* ------------------------------ 公告条 ------------------------------ */

.announce {
  background: var(--brand);
  color: #EDEBE4;
  font-size: 12px;
  letter-spacing: .12em;
  text-align: center;
  padding: 9px 16px;
}

/* ------------------------------ 页头 ------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(250, 249, 247, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 40px;
}
.logo {
  font-family: var(--font-serif);
  font-size: 21px;
  letter-spacing: .22em;
  white-space: nowrap;
}
.logo span { color: var(--ink-3); font-size: 11px; letter-spacing: .3em; margin-left: 8px; }

.nav { display: flex; gap: 30px; margin-right: auto; }
.nav a {
  font-size: 13px;
  letter-spacing: .1em;
  color: var(--ink-2);
  padding: 6px 0;
  position: relative;
  transition: color .25s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px; background: var(--ink);
  transition: width .3s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after, .nav a.active::after { width: 100%; }
.nav a.active { color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: 20px; }
.icon-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; letter-spacing: .06em; color: var(--ink-2);
  transition: color .2s var(--ease);
}
.icon-btn:hover { color: var(--ink); }
.cart-btn { position: relative; }
.cart-count {
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--brand); color: #fff;
  font-size: 10.5px; line-height: 18px; text-align: center; letter-spacing: 0;
}
.header-search { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line-2); padding-bottom: 4px; }
.header-search input {
  border: none; background: none; outline: none; width: 150px; font-size: 13px;
}
.header-search input::placeholder { color: var(--ink-4); }

.user-menu { position: relative; }
.user-menu-panel {
  position: absolute; right: 0; top: calc(100% + 14px);
  min-width: 190px; background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  padding: 8px; display: none; z-index: 80;
}
.user-menu.open .user-menu-panel { display: block; }
.user-menu-panel a, .user-menu-panel button {
  display: block; width: 100%; text-align: left;
  padding: 9px 12px; font-size: 13px; color: var(--ink-2);
  transition: background .2s var(--ease), color .2s var(--ease);
}
.user-menu-panel a:hover, .user-menu-panel button:hover { background: var(--surface-2); color: var(--ink); }
.user-menu-name { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.user-menu-name strong { display: block; font-size: 13.5px; font-weight: 500; }
.user-menu-name span { font-size: 11.5px; color: var(--ink-3); }

.menu-toggle { display: none; }

/* ------------------------------ 按钮 ------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 26px;
  border: 1px solid transparent; border-radius: var(--radius);
  font-size: 13px; letter-spacing: .1em;
  transition: all .25s var(--ease);
  white-space: nowrap;
}
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: #2C3325; }
.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-ghost { border-color: var(--line-2); color: var(--ink-2); background: var(--surface); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-quiet { color: var(--ink-2); height: auto; padding: 6px 0; letter-spacing: .06em; }
.btn-quiet:hover { color: var(--ink); }
.btn-danger { border-color: var(--line-2); color: var(--danger); }
.btn-danger:hover { border-color: var(--danger); }
.btn-block { width: 100%; }
.btn-lg { height: 50px; padding: 0 34px; }
.btn-sm { height: 34px; padding: 0 16px; font-size: 12px; }
.btn:disabled, .btn[disabled] { opacity: .38; cursor: not-allowed; }
.btn-row { display: flex; gap: 12px; }

.link-underline { border-bottom: 1px solid var(--line-2); padding-bottom: 2px; transition: border-color .2s var(--ease); }
.link-underline:hover { border-color: var(--ink); }

/* ------------------------------ 徽标 ------------------------------ */

.badge {
  display: inline-block; padding: 3px 9px; font-size: 11px; letter-spacing: .08em;
  border: 1px solid var(--line-2); color: var(--ink-2); background: var(--surface);
  border-radius: var(--radius);
}
.badge-solid { background: var(--brand); color: #fff; border-color: var(--brand); }
.badge-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.badge-ok { background: #EDF3EE; color: var(--ok); border-color: #D6E3D9; }
.badge-warn { background: #FBF4E9; color: var(--warn); border-color: #F0E2CB; }
.badge-danger { background: #FBEEE8; color: var(--danger); border-color: #F0D9CE; }
.badge-mute { background: var(--surface-2); color: var(--ink-3); }

/* ------------------------------ 表单 ------------------------------ */

.field { margin-bottom: 20px; }
.label { display: block; font-size: 12px; letter-spacing: .12em; color: var(--ink-2); margin-bottom: 9px; }
.input, .select, .textarea {
  width: 100%; height: 46px; padding: 0 14px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius);
  outline: none; transition: border-color .22s var(--ease), box-shadow .22s var(--ease);
}
.textarea { height: auto; padding: 12px 14px; resize: vertical; line-height: 1.7; font-family: inherit; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(30, 29, 27, .05); }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236B6862' stroke-width='1.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}
.form-error { color: var(--danger); font-size: 12.5px; margin-top: 8px; min-height: 18px; }
.checkbox { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; }

/* ------------------------------ 商品卡 ------------------------------ */

.grid-products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.product-card { position: relative; }
.product-card-media {
  position: relative; overflow: hidden; background: var(--surface-2);
  aspect-ratio: 4 / 5;
}
.product-card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.1s var(--ease), opacity .5s var(--ease);
}
.product-card:hover .product-card-media img { transform: scale(1.035); }
.product-card-tag { position: absolute; top: 12px; left: 12px; z-index: 2; }
.product-card-body { padding: 16px 2px 0; }
.product-card-name { font-size: 14.5px; letter-spacing: .01em; }
.product-card-sub { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.product-card-price { margin-top: 10px; display: flex; align-items: baseline; gap: 8px; }
.product-card-hover {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 12px; background: rgba(255, 255, 255, .94);
  transform: translateY(101%); transition: transform .38s var(--ease);
  border-top: 1px solid var(--line);
}
.product-card:hover .product-card-hover { transform: translateY(0); }
.sold-out-veil {
  position: absolute; inset: 0; background: rgba(250, 249, 247, .62);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; letter-spacing: .24em; color: var(--ink-2);
}

/* 价格排版 */
.price { font-family: var(--font-sans); font-weight: 500; letter-spacing: 0; color: var(--ink); white-space: nowrap; }
.price .cur { font-size: .68em; margin-right: 1px; }
.price-lg { font-size: 26px; }
.price-md { font-size: 18px; }
.price-sm { font-size: 14.5px; }
.price-old { font-size: 12.5px; color: var(--ink-4); text-decoration: line-through; }
.price-off { font-size: 11.5px; color: var(--accent); border: 1px solid #E4D3C3; padding: 1px 6px; }

/* ------------------------------ 首页 ------------------------------ */

.hero { position: relative; overflow: hidden; background: var(--surface-2); }
.hero-img { width: 100%; height: clamp(400px, 46vw, 620px); object-fit: cover; object-position: 68% center; }
.hero-copy {
  position: absolute; inset: 0; display: flex; align-items: center;
}
.hero-copy-inner { max-width: 560px; }
.hero-copy .lede { margin-top: 22px; max-width: 420px; }
.hero-actions { margin-top: 34px; display: flex; gap: 14px; }
.hero-scroll {
  position: absolute; left: 28px; bottom: 26px;
  font-size: 11px; letter-spacing: .26em; color: var(--ink-3);
  writing-mode: vertical-rl;
}

.marquee { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.marquee-inner { display: flex; gap: 56px; padding: 20px 0; overflow: hidden; }
.marquee-item { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; letter-spacing: .06em; }
.marquee-item b { font-weight: 500; color: var(--ink); }

.grid-cats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.cat-card { position: relative; overflow: hidden; background: var(--surface-2); }
.cat-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 1.2s var(--ease); }
.cat-card:hover img { transform: scale(1.04); }
.cat-card-body {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 34px; background: linear-gradient(to top, rgba(30, 29, 27, .34), rgba(30, 29, 27, 0) 62%);
}
.cat-card-body h3 { color: #fff; font-family: var(--font-serif); font-size: 25px; letter-spacing: .04em; }
.cat-card-body p { color: rgba(255, 255, 255, .82); font-size: 12.5px; margin-top: 8px; max-width: 300px; }
.cat-card-body .cat-link { margin-top: 16px; color: #fff; font-size: 12px; letter-spacing: .16em; }

.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.value-cell { background: var(--surface); padding: 34px 26px; }
.value-cell .n { font-family: var(--font-serif); font-size: 15px; letter-spacing: .1em; }
.value-cell p { font-size: 12.5px; color: var(--ink-2); margin-top: 12px; line-height: 1.85; }

.quote-band { background: var(--brand); color: #EDEBE4; padding: 74px 0; }
.quote-band blockquote {
  margin: 0; font-family: var(--font-serif); font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.75; letter-spacing: .04em; max-width: 760px;
}
.quote-band .by { margin-top: 22px; font-size: 12px; letter-spacing: .2em; color: rgba(237, 235, 228, .6); }

/* ------------------------------ 列表页 ------------------------------ */

.page-head { padding: 46px 0 30px; border-bottom: 1px solid var(--line); }
.breadcrumb { font-size: 12px; color: var(--ink-3); letter-spacing: .04em; }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb span { margin: 0 8px; }

.shop-layout { display: grid; grid-template-columns: 210px 1fr; gap: 48px; align-items: start; padding: 40px 0 88px; }
.filters { position: sticky; top: calc(var(--header-h) + 24px); }
.filter-group { padding-bottom: 26px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.filter-group:last-child { border-bottom: 0; }
.filter-title { font-size: 11.5px; letter-spacing: .18em; color: var(--ink-3); margin-bottom: 14px; }
.filter-list li { margin-bottom: 2px; }
.filter-list button {
  display: block; width: 100%; text-align: left; padding: 5px 0;
  font-size: 13px; color: var(--ink-2); transition: color .2s var(--ease);
}
.filter-list button:hover { color: var(--ink); }
.filter-list button.on { color: var(--ink); font-weight: 500; }
.filter-list button.on::before { content: "— "; color: var(--accent); }
.range-row { display: flex; align-items: center; gap: 8px; }
.range-row .input { height: 36px; font-size: 13px; padding: 0 10px; }

.shop-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 18px; margin-bottom: 26px; border-bottom: 1px solid var(--line);
}
.result-count { font-size: 12.5px; color: var(--ink-3); letter-spacing: .04em; }
.sort-list { display: flex; gap: 20px; }
.sort-list button { font-size: 12.5px; color: var(--ink-3); transition: color .2s var(--ease); }
.sort-list button:hover { color: var(--ink); }
.sort-list button.on { color: var(--ink); }

.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 62px; }
.pagination button, .pagination span {
  min-width: 36px; height: 36px; padding: 0 10px; font-size: 13px; color: var(--ink-2);
  border: 1px solid transparent; transition: all .2s var(--ease);
}
.pagination button:hover { border-color: var(--line-2); color: var(--ink); }
.pagination .on { border-color: var(--ink); color: var(--ink); }

/* ------------------------------ 详情页 ------------------------------ */

.pdp { display: grid; grid-template-columns: 1.15fr .85fr; gap: 60px; padding: 40px 0 0; align-items: start; }
.pdp-media { background: var(--surface-2); position: relative; }
.pdp-media img { width: 100%; object-fit: cover; }
.pdp-thumbs { display: flex; gap: 10px; margin-top: 10px; }
.pdp-thumb { width: 74px; aspect-ratio: 4/5; overflow: hidden; background: var(--surface-2); border: 1px solid transparent; }
.pdp-thumb.on { border-color: var(--ink); }
.pdp-thumb img { width: 100%; height: 100%; object-fit: cover; }

.pdp-info { position: sticky; top: calc(var(--header-h) + 24px); }
.pdp-title { font-family: var(--font-serif); font-size: clamp(24px, 2.4vw, 32px); line-height: 1.4; }
.pdp-sub { color: var(--ink-2); margin-top: 12px; font-size: 14px; }
.pdp-price { display: flex; align-items: baseline; gap: 12px; margin: 26px 0 8px; }
.pdp-price .price { font-size: 30px; }
.pdp-spec { margin-top: 30px; }
.spec-options { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.spec-option {
  padding: 10px 16px; border: 1px solid var(--line-2); background: var(--surface);
  font-size: 13px; color: var(--ink-2); border-radius: var(--radius);
  transition: all .22s var(--ease); text-align: left;
}
.spec-option:hover { border-color: var(--ink-4); color: var(--ink); }
.spec-option.on { border-color: var(--ink); color: var(--ink); background: var(--surface-3); }
.spec-option.off { opacity: .4; cursor: not-allowed; text-decoration: line-through; }
.spec-option small { display: block; font-size: 11px; color: var(--ink-3); margin-top: 3px; }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); background: var(--surface); }
.qty button { width: 40px; height: 44px; color: var(--ink-2); font-size: 16px; transition: color .2s var(--ease); }
.qty button:hover { color: var(--ink); }
.qty input { width: 52px; height: 44px; border: none; text-align: center; outline: none; background: none; }
.pdp-actions { display: flex; gap: 12px; margin-top: 26px; }
.pdp-actions .btn { flex: 1; }
.pdp-meta { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); }
.pdp-meta div { display: flex; gap: 14px; padding: 5px 0; }
.pdp-meta b { font-weight: 400; color: var(--ink-3); width: 62px; flex: none; }

.pdp-section { padding: 72px 0 0; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.spec-table th, .spec-table td { text-align: left; padding: 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table th { width: 130px; color: var(--ink-3); font-weight: 400; letter-spacing: .06em; }
.spec-table td { color: var(--ink); line-height: 1.9; }

/* ------------------------------ 购物车 / 结算 ------------------------------ */

.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 48px; align-items: start; padding: 40px 0 88px; }
.cart-list { border-top: 1px solid var(--line); }
.cart-row { display: grid; grid-template-columns: 108px 1fr auto; gap: 22px; padding: 26px 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-row-media { width: 108px; aspect-ratio: 4/5; background: var(--surface-2); overflow: hidden; }
.cart-row-media img { width: 100%; height: 100%; object-fit: cover; }
.cart-row-name { font-size: 14.5px; }
.cart-row-spec { font-size: 12.5px; color: var(--ink-3); margin-top: 5px; }
.cart-row-controls { display: flex; align-items: center; gap: 20px; justify-content: flex-end; }

.summary-card { background: var(--surface); border: 1px solid var(--line); padding: 30px; position: sticky; top: calc(var(--header-h) + 24px); }
.summary-title { font-size: 12px; letter-spacing: .18em; color: var(--ink-3); margin-bottom: 22px; }
.summary-row { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--ink-2); padding: 7px 0; }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 18px; margin-top: 14px; border-top: 1px solid var(--line); }
.summary-total .price { font-size: 24px; }
.summary-note { font-size: 11.5px; color: var(--ink-3); margin-top: 16px; line-height: 1.8; }

.addr-card { border: 1px solid var(--line); background: var(--surface); padding: 20px; cursor: pointer; transition: border-color .22s var(--ease); }
.addr-card.on { border-color: var(--ink); }
.addr-card .receiver { font-size: 14px; }
.addr-card .line { font-size: 12.5px; color: var(--ink-2); margin-top: 6px; line-height: 1.7; }
.addr-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.addr-new { border: 1px dashed var(--line-2); background: none; display: flex; align-items: center; justify-content: center; min-height: 108px; color: var(--ink-3); font-size: 13px; transition: all .22s var(--ease); }
.addr-new:hover { border-color: var(--ink); color: var(--ink); }

.checkout-section { padding: 34px 0; border-bottom: 1px solid var(--line); }
.checkout-section > .label { margin-bottom: 18px; }
.order-line { display: flex; gap: 16px; padding: 13px 0; align-items: center; }
.order-line img { width: 56px; aspect-ratio: 4/5; object-fit: cover; background: var(--surface-2); }
.order-line .info { flex: 1; min-width: 0; }
.order-line .info .n { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-line .info .s { font-size: 12px; color: var(--ink-3); margin-top: 3px; }

/* ------------------------------ 订单 ------------------------------ */

.tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--line); margin: 32px 0 10px; }
.tabs button {
  padding: 12px 0; font-size: 13.5px; color: var(--ink-3); letter-spacing: .06em;
  border-bottom: 1px solid transparent; margin-bottom: -1px; transition: all .22s var(--ease);
}
.tabs button.on { color: var(--ink); border-color: var(--ink); }
.tabs button:hover { color: var(--ink); }

.order-card { border: 1px solid var(--line); background: var(--surface); margin-bottom: 22px; }
.order-card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px; border-bottom: 1px solid var(--line); background: var(--surface-2); font-size: 12.5px; color: var(--ink-2); }
.order-card-head .no { letter-spacing: .04em; }
.order-card-body { padding: 8px 24px; }
.order-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px; border-top: 1px solid var(--line); }
.order-card-foot .total { font-size: 13px; color: var(--ink-2); }
.order-card-foot .total .price { font-size: 19px; margin-left: 8px; }

.timeline { margin-top: 8px; }
.timeline-item { display: flex; gap: 16px; padding: 10px 0; }
.timeline-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); margin-top: 9px; flex: none; }
.timeline-item.on .timeline-dot { background: var(--brand); }
.timeline-item .t { font-size: 13px; }
.timeline-item .d { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }

/* ------------------------------ 认证页 ------------------------------ */

.auth-layout { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - var(--header-h) - 36px); }
.auth-aside { position: relative; background: var(--surface-2); overflow: hidden; }
.auth-aside img { width: 100%; height: 100%; object-fit: cover; }
.auth-aside-copy { position: absolute; left: 48px; bottom: 48px; right: 48px; color: #fff; }
.auth-aside-copy h2 { color: #fff; font-family: var(--font-serif); font-size: 30px; }
.auth-aside-copy p { color: rgba(255,255,255,.8); font-size: 13px; margin-top: 10px; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 60px 40px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-switch { font-size: 12.5px; color: var(--ink-3); margin-top: 26px; text-align: center; }
.auth-switch a { color: var(--ink); border-bottom: 1px solid var(--line-2); }
.hint-box { background: var(--surface-2); border: 1px solid var(--line); padding: 14px 16px; font-size: 12px; color: var(--ink-2); line-height: 1.9; }

/* ------------------------------ 空状态 / 加载 ------------------------------ */

.empty { text-align: center; padding: 90px 20px; }
.empty-mark { font-family: var(--font-serif); font-size: 34px; color: var(--ink-4); letter-spacing: .3em; }
.empty p { color: var(--ink-3); font-size: 13.5px; margin-top: 16px; }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, #EFEDE8 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: sk 1.4s ease infinite; }
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ------------------------------ 页脚 ------------------------------ */

.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 64px 0 30px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.footer-brand .logo { font-size: 19px; }
.footer-brand p { font-size: 12.5px; color: var(--ink-3); margin-top: 16px; max-width: 300px; line-height: 1.9; }
.footer-col h4 { font-size: 11.5px; letter-spacing: .18em; color: var(--ink-3); margin-bottom: 16px; font-weight: 400; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { font-size: 13px; color: var(--ink-2); transition: color .2s var(--ease); }
.footer-col a:hover { color: var(--ink); }
.footer-bottom { margin-top: 52px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-4); letter-spacing: .04em; }

/* ------------------------------ Toast ------------------------------ */

.toast-wrap { position: fixed; top: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast {
  background: var(--ink); color: #fff; padding: 12px 22px; font-size: 13px;
  box-shadow: var(--shadow-lg); animation: toastIn .3s var(--ease);
  max-width: 88vw; letter-spacing: .04em;
}
.toast.ok { background: var(--brand); }
.toast.err { background: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* ------------------------------ 模态框 ------------------------------ */

.modal-mask {
  position: fixed; inset: 0; background: rgba(30, 29, 27, .42); z-index: 150;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: fadeIn .22s var(--ease);
}
.modal {
  background: var(--surface); width: 100%; max-width: 520px; max-height: 88vh; overflow: auto;
  box-shadow: var(--shadow-lg); animation: modalIn .3s var(--ease);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 28px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 15px; letter-spacing: .08em; }
.modal-body { padding: 28px; }
.modal-foot { padding: 18px 28px 24px; display: flex; justify-content: flex-end; gap: 12px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ------------------------------ 后台 ------------------------------ */

.admin-body { background: #F7F6F3; }
.admin-layout { display: grid; grid-template-columns: 210px 1fr; min-height: 100vh; }
.admin-side { background: var(--brand); color: #D9D7CE; padding: 26px 0; position: sticky; top: 0; height: 100vh; }
.admin-side .brand { padding: 0 24px 26px; font-family: var(--font-serif); letter-spacing: .2em; font-size: 17px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 20px; }
.admin-side .brand small { display: block; font-family: var(--font-sans); font-size: 10.5px; letter-spacing: .22em; color: rgba(255,255,255,.5); margin-top: 6px; }
.admin-nav a { display: block; padding: 12px 24px; font-size: 13.5px; color: rgba(255,255,255,.72); letter-spacing: .06em; border-left: 2px solid transparent; transition: all .22s var(--ease); }
.admin-nav a:hover { color: #fff; background: rgba(255,255,255,.05); }
.admin-nav a.on { color: #fff; border-left-color: #B9C4A8; background: rgba(255,255,255,.07); }
.admin-side-foot { position: absolute; bottom: 24px; left: 0; right: 0; padding: 0 24px; font-size: 11.5px; color: rgba(255,255,255,.42); }
.admin-side-foot a { color: rgba(255,255,255,.7); }

.admin-main { padding: 30px 36px 70px; min-width: 0; }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.admin-top h1 { font-family: var(--font-serif); font-size: 25px; }
.admin-top p { font-size: 12.5px; color: var(--ink-3); margin-top: 5px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); padding: 22px; }
.stat-card .k { font-size: 11.5px; letter-spacing: .16em; color: var(--ink-3); }
.stat-card .v { font-size: 27px; margin-top: 12px; font-family: var(--font-sans); font-weight: 500; letter-spacing: -.01em; }
.stat-card .d { font-size: 11.5px; color: var(--ink-3); margin-top: 8px; }

.panel { background: var(--surface); border: 1px solid var(--line); padding: 24px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 16px; }
.panel-head h3 { font-size: 14.5px; letter-spacing: .06em; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-2-wide { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; }

.chart-bars { display: flex; align-items: flex-end; gap: 12px; height: 190px; padding-top: 16px; }
.chart-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; height: 100%; }
.chart-bar .bar { width: 100%; max-width: 44px; background: linear-gradient(to top, #4C5640, #6C7A5A); min-height: 3px; transition: height .6s var(--ease); }
.chart-bar .lb { font-size: 11px; color: var(--ink-3); }
.chart-bar .val { font-size: 11px; color: var(--ink-2); }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; padding: 12px 14px; font-size: 11.5px; letter-spacing: .1em;
  color: var(--ink-3); border-bottom: 1px solid var(--line); white-space: nowrap; font-weight: 400;
}
.table td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:hover td { background: #FBFAF8; }
.table .prod-cell { display: flex; align-items: center; gap: 12px; min-width: 210px; }
.table .prod-cell img { width: 42px; aspect-ratio: 4/5; object-fit: cover; background: var(--surface-2); }
.cell-input { width: 92px; height: 34px; padding: 0 9px; border: 1px solid var(--line-2); background: var(--surface); font-size: 13px; outline: none; }
.cell-input:focus { border-color: var(--ink); }
.admin-toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.admin-toolbar .input, .admin-toolbar .select { height: 40px; width: auto; min-width: 180px; }

.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.switch input { appearance: none; width: 36px; height: 20px; background: var(--line-2); border-radius: 10px; position: relative; transition: background .25s var(--ease); outline: none; cursor: pointer; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(16px); }

.login-gate { min-height: 70vh; display: flex; align-items: center; justify-content: center; }

/* ------------------------------ 响应式 ------------------------------ */

@media (max-width: 1080px) {
  .grid-products { grid-template-columns: repeat(3, 1fr); }
  .shop-layout { grid-template-columns: 1fr; gap: 26px; }
  .filters { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; }
  .filter-group { border-bottom: 0; margin: 0; padding: 0; }
  .pdp { grid-template-columns: 1fr; gap: 34px; }
  .pdp-info { position: static; }
  .cart-layout { grid-template-columns: 1fr; gap: 30px; }
  .summary-card { position: static; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; }
  .admin-nav { display: flex; flex-wrap: wrap; }
  .admin-nav a { border-left: 0; border-bottom: 2px solid transparent; }
  .admin-side-foot { position: static; margin-top: 16px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-2-wide { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .wrap { padding: 0 18px; }
  .section { padding: 58px 0; }
  .grid-products { grid-template-columns: repeat(2, 1fr); gap: 22px 14px; }
  .values { grid-template-columns: repeat(2, 1fr); }
  .grid-cats { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .nav { display: none; }
  .nav.open { display: flex; position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; gap: 0; padding: 8px 18px 16px; margin: 0; }
  .nav.open a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .menu-toggle { display: inline-flex; }
  .header-search { display: none; }
  .hero-copy { position: static; padding: 40px 0 0; }
  .hero-img { opacity: .96; }
  .hero-scroll { display: none; }
  .addr-grid { grid-template-columns: 1fr; }
  .cart-row { grid-template-columns: 84px 1fr; gap: 16px; }
  .cart-row-controls { grid-column: 1 / -1; justify-content: space-between; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .admin-main { padding: 22px 18px 60px; }
  .table .hide-sm { display: none; }
  .section-head.between { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .grid-products { grid-template-columns: 1fr; }
  .values { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
  .pdp-actions { flex-direction: column; }
  .tabs { gap: 18px; overflow-x: auto; }
}
