/* ============================================================
   灵霖鑫塔商城 · 全局组件与布局
   ============================================================ */

/* ---------- 容器 ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.hide { display: none !important; }

/* ---------- 顶部品牌栏（非对称：左字标 / 右文字链） ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 241, 233, .86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brandmark { display: flex; align-items: baseline; gap: 10px; }
.brandmark .logo {
  font-family: var(--font-serif); font-size: 22px; font-weight: 700; color: var(--ink);
  letter-spacing: 2px;
}
.brandmark .logo b { color: var(--gold); }
.brandmark .sub { font-size: 12px; color: var(--ink-soft); letter-spacing: 3px; }
.topnav { display: flex; align-items: center; gap: 22px; }
.topnav a { font-size: 14px; color: var(--ink); transition: color .2s; }
.topnav a:hover { color: var(--gold); }
.topnav .me { color: var(--gold); font-weight: 600; }

/* ---------- Hero（左对齐，破标准居中） ---------- */
.hero { padding: 56px 0 30px; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.4fr .6fr; gap: 24px; align-items: end; }
.hero h1 {
  font-size: 46px; line-height: 1.12; font-weight: 700; letter-spacing: 1px;
}
.hero h1 .accent { color: var(--gold); font-style: italic; }
.hero p { margin-top: 16px; color: var(--ink-soft); max-width: 520px; font-size: 15px; }
.hero .deco {
  border-right: 1px solid var(--gold-line); border-top: 1px solid var(--gold-line);
  height: 120px; align-self: end;
}
.hero .eyebrow {
  display: inline-block; font-size: 12px; letter-spacing: 4px; color: var(--gold-deep);
  text-transform: uppercase; margin-bottom: 14px;
}

/* ---------- 主体：品牌筛选侧栏 + 产品网格 ---------- */
.main-grid { display: grid; grid-template-columns: 168px 1fr; gap: 34px; padding-bottom: 60px; }

/* 品牌筛选（桌面竖向索引） */
.brandrail { position: sticky; top: 120px; align-self: start; }
.brandrail h4 { font-size: 13px; color: var(--ink-soft); letter-spacing: 2px; margin-bottom: 12px; font-weight: 600; }
.brandrail ul { list-style: none; }
.brandrail li {
  padding: 7px 0; font-size: 14px; color: var(--ink); cursor: pointer;
  border-left: 2px solid transparent; padding-left: 12px; transition: all .18s;
}
.brandrail li:hover { color: var(--gold); }
.brandrail li.active { color: var(--gold); border-left-color: var(--gold); font-weight: 600; }

/* 移动端品牌 chip */
.brandchips { display: none; gap: 8px; overflow-x: auto; padding: 4px 0 18px; }
.brandchips button {
  white-space: nowrap; padding: 6px 14px; border: 1px solid var(--line);
  border-radius: 999px; font-size: 13px; color: var(--ink); background: #fff;
}
.brandchips button.active { background: var(--ink); color: var(--ivory); border-color: var(--ink); }

/* ---------- 产品网格（响应式：列宽随视口自适应，杜绝错位） ---------- */
.grid {
  display: grid;
  /* min(var(--card-min), 100%)：视口比卡片最小宽度还窄时自动降为单列，不会横向溢出 */
  grid-template-columns: repeat(auto-fill, minmax(min(var(--card-min), 100%), 1fr));
  gap: var(--grid-gap);
  align-items: stretch;
}

/* 防御安全网：若某区块漏包 .grid、卡片直接挂在区块下（旧结构撑爆根因），
   强制该区块本身成网格，杜绝单卡撑满整行（1598px 撑爆）。
   仅当区块直接含 .card 时生效，正确结构（区块>wrap>.grid>.card）不受影响。 */
.beauty-mod:has(> .card),
.flagship-mod:has(> .card),
.season-mod:has(> .card),
.songxianxian-mod:has(> .card),
.zhiweiguan-mod:has(> .card),
.fudonghai-mod:has(> .card),
.sx-block:has(> .card) {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(var(--card-min), 100%), 1fr));
  gap: var(--grid-gap);
  align-items: stretch;
}
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; position: relative; transition: transform .25s, box-shadow .25s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.card .thumb {
  aspect-ratio: var(--thumb-ratio, 4 / 5); background: #fff; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
/* 网格场景：统一 4/5 修长比例 + object-fit cover，杜绝卡片大小不一/撑爆整行 */
.grid .card .thumb {
  aspect-ratio: var(--thumb-ratio, 4 / 5);
  max-height: 300px;
}
.grid .card .thumb img { width: 100%; height: 100%; object-fit: cover; padding: 0; }
/* monogram 占位（无图时） */
.mono {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  background: radial-gradient(120% 120% at 30% 20%, #FBF7EF 0%, var(--ivory-2) 70%);
}
.mono .glyph {
  font-family: var(--font-serif); font-size: 54px; color: var(--gold); line-height: 1;
}
.mono .gname { font-size: 12px; color: var(--ink-soft); letter-spacing: 1px; padding: 0 12px; text-align: center; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; padding: 0; }

/* ---------- 首页品类快捷入口 ---------- */
.cat-chips { display: flex; gap: 10px; overflow-x: auto; padding: 2px 0 14px; }
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chips a, .cat-chips button {
  display: inline-block; text-decoration: none;
  white-space: nowrap; padding: 7px 16px; border: 1px solid var(--line);
  border-radius: 999px; font-size: 13px; color: var(--ink); background: #fff;
  transition: all .18s;
}
.cat-chips a:hover, .cat-chips button:hover { border-color: var(--gold); color: var(--gold-deep); }
.cat-chips a.active, .cat-chips button.active { background: var(--ink); color: var(--ivory); border-color: var(--ink); }

/* 品牌栏折叠按钮 */
.brandrail li.more {
  cursor: pointer; color: var(--gold-deep); font-size: 13px; letter-spacing: 1px;
  border-left-color: transparent;
}
.brandrail li.more:hover { color: var(--gold); }
.brandchips button.more {
  background: transparent; color: var(--gold-deep); border: 1px dashed var(--gold-line);
  white-space: nowrap;
}

/* ---------- 首页宣传海报栏 ---------- */
.poster-banner { margin: 8px 0 6px; }
.poster-track { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
.poster-track::-webkit-scrollbar { height: 6px; }
.poster-track::-webkit-scrollbar-thumb { background: var(--gold-line); border-radius: 3px; }
.poster {
  position: relative; flex: 0 0 100%; min-height: 150px; border-radius: var(--radius-lg);
  background-size: cover; background-position: center; scroll-snap-align: start;
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
  padding: 28px 34px; color: #fff; text-decoration: none; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.poster.has-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.28), rgba(0,0,0,0) 60%); }
.poster .pt { font-family: var(--font-serif); font-size: 26px; font-weight: 700; position: relative; }
.poster .ps { font-size: 14px; opacity: .92; max-width: 560px; position: relative; }
.poster .pb {
  align-self: flex-start; margin-top: 6px; position: relative;
  background: #fff; color: var(--ink); padding: 9px 20px; border-radius: 999px;
  font-size: 14px; font-weight: 600;
}
.poster:hover { box-shadow: var(--shadow-md); }

/* ---------- 商品详情长图 ---------- */
.detail-long { margin: 34px 0 60px; }
.detail-long .dl-title {
  font-family: var(--font-serif); font-size: 20px; font-weight: 600; color: var(--ink);
  margin: 0 0 16px; padding-left: 12px; border-left: 3px solid var(--gold);
}
.detail-long .dl-img {
  display: block; width: 100%; border-radius: var(--radius); margin: 0 0 14px;
  box-shadow: var(--shadow-sm); background: #fff;
}

/* 下载资料包金角标 */
.corner-dl {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--gold); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm); transition: transform .2s, background .2s;
}
.corner-dl:hover { transform: scale(1.08); background: var(--gold-deep); }
.corner-dl i { font-size: 15px; }

.card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card .brand { font-size: 12px; color: var(--gold-deep); letter-spacing: 1px; }
.card .name { font-family: var(--font-serif); font-size: 16px; font-weight: 600; line-height: 1.35; /* 高塔反馈：标题把卡片拉得很长；改为最多 2 行 + 行高截断，底对齐统一 */
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
  max-height: calc(1.35em * 2 + 2px);
  overflow: hidden; word-break: break-word;
}
.card .spec { font-size: 12px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-actions { display: flex; align-items: stretch; gap: 6px; margin-top: 4px; min-height: 30px; }
.card-act { flex: 1; min-width: 0; display: inline-flex; align-items: center; justify-content: center; padding: 6px 4px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; color: var(--ink); background: #fff; transition: all .15s; cursor: pointer; }
.card-act:hover { transform: translateY(-1px); filter: brightness(1.04); }
.card .prices { margin-top: auto; padding-top: 8px; display: flex; align-items: baseline; gap: 12px; }
.card .price-retail { font-size: 13px; color: var(--ink-soft); }
.card .price-retail .num { font-size: 15px; }
.card .price-self { color: var(--gold-deep); font-weight: 600; }
.card .price-self .num { font-size: 20px; }
.card .price-self small { font-size: 11px; color: var(--ink-soft); font-weight: 400; margin-right: 3px; }
/* 百货集：京东同款比价链接（真实比价锚点，替代虚高「市场参考」） */
.card .price-jd {
  font-size: 12px; color: var(--market-deep); text-decoration: none;
  border: 1px solid var(--market-line); border-radius: 999px; padding: 2px 10px;
  white-space: nowrap; transition: all .18s; align-self: center;
}
.card .price-jd:hover { background: var(--market-soft); border-color: var(--market); }
.card .price-warn { font-size: 12px; color: var(--wine); font-weight: 600; align-self: center; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 26px; border-radius: var(--radius); font-size: 14px; font-weight: 600;
  transition: all .2s; letter-spacing: .5px;
}
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-deep); }
.btn-outline { border: 1px solid var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: var(--ivory); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- 商品详情 ---------- */
.detail { display: grid; grid-template-columns: 7fr 5fr; gap: 48px; padding: 40px 0 70px; align-items: start; }
.detail .gallery { display: flex; gap: 16px; align-items: flex-start; }
.detail .gallery .main { flex: 1; aspect-ratio: 1/1; border-radius: var(--radius-lg); overflow: hidden; background: var(--ivory-2); }
.detail .gallery .main img { width: 100%; height: 100%; object-fit: contain; }
.detail .gallery .thumbs { display: flex; flex-direction: column; gap: 10px; max-height: 560px; overflow-y: auto; flex: 0 0 auto; }
.detail .gallery .thumb { width: 60px; height: 60px; padding: 0; border-radius: var(--radius); overflow: hidden; background: var(--ivory-2); border: 1px solid var(--line); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.detail .gallery .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail .gallery .thumb.active { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(197,165,114,.35); }
.detail .info .brand { color: var(--gold-deep); letter-spacing: 2px; font-size: 13px; }
.detail .info h1 { font-size: 30px; margin: 8px 0 6px; line-height: 1.25; }
.detail .info .spec { color: var(--ink-soft); font-size: 14px; margin-bottom: 22px; }
.price-block { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; margin-bottom: 24px; }
.price-row { display: flex; align-items: baseline; justify-content: space-between; padding: 6px 0; }
.price-row .label { color: var(--ink-soft); font-size: 13px; }
.price-row .val { font-family: var(--font-num); font-size: 24px; }
.price-row.muted .val { color: var(--ink-soft); }
.price-row.self .val { color: var(--gold-deep); }
.locked { color: var(--ink-soft); font-size: 13px; }
.locked i { color: var(--gold); margin-right: 6px; }
.detail .actions { display: flex; gap: 12px; margin: 18px 0; }
.detail .pkg { display: inline-flex; align-items: center; gap: 8px; color: var(--gold-deep); font-size: 13px; cursor: pointer; }

/* 版本选择（专柜版 / 一般贸易） */
.ver-sel { display: flex; gap: 10px; margin: 4px 0 20px; }
.ver-opt { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--ivory); cursor: pointer; transition: all .18s; text-align: left; font-family: inherit; }
.ver-opt .vt { font-size: 14px; font-weight: 600; color: var(--ink); }
.ver-opt .vp { font-family: var(--font-num); font-size: 18px; color: var(--gold-deep); }
.ver-opt.active { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(197,165,114,.25); background: var(--ivory-2); }
.ver-opt:not(.active) .vp { color: var(--ink-soft); }

/* 礼盒内搭自选（专柜 / 一般贸易 逐件切换 + 实时求和） */
.gift-sel { border: 1px solid var(--gold); border-radius: var(--radius-lg); background: linear-gradient(180deg, var(--ivory-2), var(--ivory)); padding: 16px 18px; margin: 4px 0 22px; }
.gift-sel .gs-head { font-size: 15px; font-weight: 700; color: var(--gold-deep); }
.gift-sel .gs-head i { margin-right: 6px; }
.gift-sel .gs-sub { font-size: 12px; color: var(--ink-soft); margin: 2px 0 12px; }
.gift-sel .gs-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.gift-sel .gs-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.gift-sel .gs-item .gs-label { font-size: 14px; color: var(--ink); font-weight: 600; }
.gift-sel .gs-item .gs-label em { font-style: normal; font-size: 12px; color: var(--ink-soft); margin-left: 4px; }
.gift-sel .gs-toggle { display: flex; gap: 6px; }
.gift-sel .gs-opt { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 12px; min-width: 92px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--ivory); cursor: pointer; font-family: inherit; transition: all .16s; }
.gift-sel .gs-opt .gs-p { font-family: var(--font-num); font-size: 15px; color: var(--ink-soft); }
.gift-sel .gs-opt.active { border-color: var(--gold); background: var(--gold-deep); box-shadow: 0 0 0 2px rgba(197,165,114,.22); }
.gift-sel .gs-opt.active span { color: #fff; }
.gift-sel .gs-only { font-size: 13px; color: var(--ink-soft); padding: 6px 10px; }
.gift-sel .gs-only.muted { font-size: 12px; }
.gift-sel .gs-total { display: flex; align-items: baseline; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--gold); }
.gift-sel .gs-total > span:first-child { font-size: 13px; color: var(--ink-soft); }
.gift-sel .gs-sum { font-family: var(--font-num); font-size: 26px; font-weight: 700; color: var(--gold-deep); }

/* 下单表单 */
.order-form { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; background: var(--ivory); margin-bottom: 22px; }
.ofield { margin-bottom: 12px; }
.ofield label { display: block; font-size: 13px; color: var(--ink-soft); margin-bottom: 6px; }
.ofield input { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 15px; font-family: inherit; background: #fff; color: var(--ink); }
.ofield input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(197,165,114,.15); }
.ofield-v .oview { padding: 11px 12px; border: 1px dashed var(--gold); border-radius: var(--radius); font-family: var(--font-num); font-size: 16px; color: var(--gold-deep); background: var(--ivory-2); }
.order-form .btn-block { width: 100%; margin-top: 4px; }
.order-login { margin: 8px 0 22px; }
#orderMsg { margin-top: 12px; }
#orderMsg .notice { font-size: 13px; }

/* ---------- 表单 / 申请·注册 / 登录 ---------- */
.auth-wrap { max-width: 460px; margin: 40px auto 80px; }
.auth-wrap .eyebrow { font-size: 12px; letter-spacing: 4px; color: var(--gold-deep); text-transform: uppercase; }
.auth-wrap h2 { font-size: 30px; margin: 10px 0 4px; }
.auth-wrap .lead { color: var(--ink-soft); font-size: 14px; margin-bottom: 22px; }

.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tabs button {
  flex: 1; padding: 14px 0; font-size: 15px; color: var(--ink-soft);
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all .2s;
}
.tabs button.active { color: var(--ink); border-bottom-color: var(--gold); font-weight: 600; }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; color: var(--ink-soft); margin-bottom: 6px; letter-spacing: .5px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 2px; border: none; border-bottom: 1px solid var(--line);
  background: transparent; font-family: var(--font-sans); font-size: 15px; color: var(--ink);
  transition: border-color .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--gold); }
.field .hint { font-size: 12px; color: var(--ink-soft); margin-top: 5px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button {
  padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px;
  background: #fff; color: var(--ink); transition: all .2s;
}
.chips button.on { background: var(--gold-soft); border-color: var(--gold); color: var(--gold-deep); }

.notice {
  padding: 12px 14px; border-radius: var(--radius); font-size: 13px; margin-bottom: 16px;
  border: 1px solid var(--gold-line); background: var(--gold-soft); color: var(--ink);
}
.notice.wine { border-color: rgba(122,59,71,.3); background: rgba(122,59,71,.08); color: var(--wine); }

.admin-toggle { margin-top: 16px; text-align: center; }
.admin-toggle a { color: var(--ink-soft); font-size: 13px; border-bottom: 1px dashed var(--line); }
.admin-box { margin-top: 18px; border-top: 1px dashed var(--line); padding-top: 18px; }
/* 短信验证码行 + 登录方式切换 */
.code-row { display: flex; gap: 10px; align-items: stretch; }
.code-row input { flex: 1; min-width: 0; }
.code-row .btn { white-space: nowrap; flex: 0 0 auto; }
.auth-switch { margin-top: 12px; text-align: center; }
.auth-switch a { color: var(--gold-deep); font-size: 13px; border-bottom: 1px dashed var(--gold); cursor: pointer; }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--line); background: var(--ivory-2); padding: 30px 0; }
.footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer .f-brand { font-family: var(--font-serif); font-size: 16px; color: var(--ink); }
.footer .f-meta { font-size: 12px; color: var(--ink-soft); }

/* 备案信息：独占一行，禁止隐藏/缩小（合规要求：需与页脚其他文字同等可视） */
.footer .f-beian { flex: 0 0 100%; font-size: 12px; color: var(--ink-soft); line-height: 1.8; }
.footer .f-beian a { color: var(--ink-soft); text-decoration: none; }
.footer .f-beian a:hover { color: var(--gold-deep); text-decoration: underline; }
.footer .f-beian-sep { margin: 0 6px; opacity: .45; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 36px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--ivory); padding: 12px 22px; border-radius: 999px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: all .3s; z-index: 200;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 空 / 加载 ---------- */
.loading { text-align: center; color: var(--ink-soft); padding: 60px 0; letter-spacing: 2px; }
.empty { text-align: center; color: var(--ink-soft); padding: 60px 0; }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero .deco { display: none; }
  .hero h1 { font-size: 34px; }
  .detail { grid-template-columns: 1fr; gap: 24px; }
  .detail .gallery { flex-direction: column; }
  .detail .gallery .thumbs { flex-direction: row; flex-wrap: wrap; max-height: none; width: 100%; }
  .main-grid { grid-template-columns: 1fr; gap: 0; }
  .brandrail { display: none; }
  .brandchips { display: flex; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid .card:nth-child(even) { margin-top: 0; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  /* minmax(0,1fr) 而非 1fr：否则超长商品名会把列撑破导致错位 */
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-actions { gap: 4px; }
  .card-act { padding: 5px 2px; font-size: 11px; }
  .topnav { gap: 14px; }
  .topnav .hide-sm { display: none; }
  .hero h1 { font-size: 28px; }
}

/* ============================================================
   #194 视觉打磨层：动效 / 景深 / 对比度 / 移动端
   （不改动既有布局 token，仅叠加精炼的质感与运动）
   ============================================================ */

/* ---------- 可访问性：焦点环 ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 2px;
}
/* 尊重「减少动态效果」偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---------- 页面切换：柔和淡入 ---------- */
#view { animation: viewIn .42s cubic-bezier(.22,.61,.36,1) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Hero 入场（错落分层） ---------- */
.hero .eyebrow, .hero h1, .hero p { opacity: 0; transform: translateY(16px); animation: rise .7s cubic-bezier(.22,.61,.36,1) forwards; }
.hero .eyebrow { animation-delay: .05s; }
.hero h1 { animation-delay: .16s; }
.hero p { animation-delay: .30s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* Hero 背景：香槟金柔光 + 极淡颗粒，制造景深 */
.hero { overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(70% 120% at 88% -10%, var(--gold-soft) 0%, rgba(197,165,114,0) 55%),
    radial-gradient(50% 90% at 0% 120%, rgba(217,167,167,.10) 0%, rgba(217,167,167,0) 60%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* ---------- 产品卡：滚动入场 + 悬停精致化 ----------
   仅 .grid 内的 card 默认启用入场动画（透明度 0 → IO 触发 reveal）；
   其他页面（百货集 .sup-grid、详情页关联推荐、分类页等）的 .card 上来就可见，
   不再因 IO 失败或 .reveal 漏挂而出现"商品不显示"。 */
.grid > .card { opacity: 0; transform: translateY(22px); }
.grid > .card.reveal { animation: cardIn .6s cubic-bezier(.22,.61,.36,1) forwards; }
@keyframes cardIn { to { opacity: 1; transform: none; } }
.card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(33,28,24,.13); }

/* 兜底：如果浏览器在 2 秒内仍未把 IO 触发的 .reveal 加上（极少见的低端 webview/无头环境），
   强制把网格内所有 .card 显示出来，避免一直透明。 */
.grid > .card.force-show { opacity: 1 !important; transform: none !important; }

/* 百货集 / 松鲜鲜等非首页模块的网格：上来就可见，不做滚动入场动画（避免 IO 失败导致整片空白） */
.sup-grid > .card,
.sx-block .grid > .card,
.mod-grid > .card,
.channel-cards > .card {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}
.card:hover .thumb img { transform: scale(1.06); }
.card .thumb img { transition: transform .5s cubic-bezier(.22,.61,.36,1); }
/* 卡内金色细描边（悬停浮现） */
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 1px var(--gold-line); opacity: 0; transition: opacity .3s; pointer-events: none;
}
.card:hover::after { opacity: 1; }
/* 品牌名：悬停金色下划线生长 */
.card .brand { position: relative; display: inline-block; }
.card .brand::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1px; width: 0;
  background: var(--gold); transition: width .3s ease;
}
.card:hover .brand::after { width: 100%; }

/* ---------- 品牌栏：金色下划线生长 ---------- */
.brandrail li::after {
  content: ""; display: block; height: 1px; width: 0; margin-top: 3px;
  background: var(--gold); transition: width .25s ease;
}
.brandrail li:hover::after, .brandrail li.active::after { width: 60%; }

/* ---------- monogram 占位：更温润的渐变质感 ---------- */
.mono {
  background:
    radial-gradient(120% 120% at 28% 18%, #FCF9F2 0%, var(--ivory-2) 62%),
    radial-gradient(80% 80% at 90% 100%, rgba(197,165,114,.12), transparent 60%);
}
.mono .glyph { text-shadow: 0 2px 10px rgba(197,165,114,.25); }

/* ---------- 骨架屏 shimmer（加载态） ---------- */
.skeleton { background: var(--ivory-2); border-radius: var(--radius-lg); overflow: hidden; position: relative; }
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.65) 50%, transparent 80%);
  transform: translateX(-100%); animation: shimmer 1.3s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
.sk-card { aspect-ratio: 1 / 1; } /* 占位比例与卡片一致 */

/* ---------- 加载态：金色自旋 ---------- */
.loading { display: inline-flex; align-items: center; gap: 12px; color: var(--ink-soft); font-size: 14px; letter-spacing: 2px; }
.loading::before {
  content: ""; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--gold-line); border-top-color: var(--gold); animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 顶栏：滚动收束（配合 JS 加 .scrolled） ---------- */
.topbar { transition: background .3s, box-shadow .3s, border-color .3s; }
.topbar.scrolled { background: rgba(246,241,233,.94); box-shadow: 0 4px 18px rgba(33,28,24,.06); }

/* ---------- 移动端打磨 ---------- */
@media (max-width: 980px) {
  /* 品牌 chip 吸顶，便于在长列表中随时切换 */
  .brandchips {
    position: sticky; top: 64px; z-index: 40; background: rgba(246,241,233,.92);
    backdrop-filter: blur(8px); padding: 10px 0 12px; margin: 0 0 8px;
  }
  .brandchips::-webkit-scrollbar { display: none; }
  .grid { gap: 14px; }
  .card .body { padding: 12px 14px 14px; }
  .card .name { font-size: 15px; min-height: 40px; }
  .card .price-self .num { font-size: 18px; }
}
@media (max-width: 560px) {
  .hero { padding: 36px 0 22px; }
  .hero p { font-size: 14px; }
  .topbar .wrap { height: 56px; }
  .brandmark .logo { font-size: 19px; letter-spacing: 1px; }
  .btn { padding: 13px 22px; }
  .card .prices { flex-wrap: wrap; gap: 6px 10px; }
}
/* 刘海屏安全区 */
@supports (padding: env(safe-area-inset-bottom)) {
  .footer .wrap { padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right)); }
  .toast { bottom: calc(36px + env(safe-area-inset-bottom)); }
}

/* ---------- 高塔工作台（管理员后台） ---------- */
.workbench { padding-top: 44px; padding-bottom: 64px; }
.wb-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.wb-head .lead { margin-top: 8px; color: var(--ink-soft); font-size: 15px; }
.wb-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 40px; }
.wb-card {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, #f7faff 0%, #eef4ff 100%);
  border: 1px solid var(--line); border-radius: 14px;
  padding: 22px 20px; box-shadow: 0 1px 0 rgba(33,28,24,.04);
}
.wb-card-ico { color: var(--gold); font-size: 18px; opacity: .85; }
.wb-card-n {
  margin-top: 14px; font-family: var(--font-serif); font-weight: 600;
  font-size: 38px; line-height: 1; color: var(--ink); letter-spacing: .5px;
}
.wb-card-unit { font-family: var(--font-sans); font-size: 13px; color: var(--ink-soft); margin-left: 6px; letter-spacing: 0; }
.wb-card-label { margin-top: 8px; font-size: 13px; color: var(--ink-soft); letter-spacing: 1px; }
.wb-section-title { font-family: var(--font-serif); font-size: 18px; color: var(--ink); margin-bottom: 16px; letter-spacing: 1px; }
.wb-modules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.wb-mod {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 18px; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.wb-mod:hover { transform: translateY(-3px); box-shadow: 0 12px 30px -18px rgba(0,0,0,.35); border-color: var(--gold-line); }
.wb-mod-ico {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 10px;
  display: grid; place-items: center; color: var(--gold);
  background: linear-gradient(160deg, #eef2fb, #e3ebf7);
}
.wb-mod-body { flex: 1 1 auto; min-width: 0; }
.wb-mod-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.wb-mod-desc { font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; }
.wb-badge {
  flex: 0 0 auto; font-size: 12px; color: #fff; background: var(--wine);
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}
.wb-badge b { font-weight: 700; }
.wb-badge.ghost { color: var(--ink-soft); background: #EEF1F5; }
.wb-foot { margin-top: 28px; font-size: 12.5px; color: var(--ink-soft); }
.wb-card.skel { min-height: 116px; background: linear-gradient(100deg, #eef2fb 30%, #f5f9ff 50%, #eef2fb 70%);
  background-size: 200% 100%; animation: shimmer 1.3s infinite linear; }

@media (max-width: 980px) {
  .wb-cards { grid-template-columns: repeat(2, 1fr); }
  .wb-modules { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .wb-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .wb-cards { grid-template-columns: repeat(2, 1fr); }
  .wb-modules { grid-template-columns: 1fr; }
}

/* ============================================================
   移动端抽屉菜单（修复：原 app.css 缺 drawer 样式导致菜单无法显示）
   ============================================================ */
.hamburger {
  display: none;
  width: 40px; height: 40px; border: none; border-radius: 8px;
  background: transparent; color: var(--ink); cursor: pointer;
  align-items: center; justify-content: center; font-size: 20px;
}
.hamburger:hover { background: rgba(197,165,114,.12); color: var(--gold-deep); }

.drawer-mask {
  position: fixed; inset: 0; background: rgba(33,28,24,.45);
  opacity: 0; pointer-events: none; transition: opacity .28s ease;
  z-index: 90;
}
.drawer-mask.show { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(82vw, 360px);
  min-height: 100vh; min-height: 100dvh;
  background: var(--ivory);
  box-shadow: -8px 0 40px rgba(33,28,24,.18);
  transform: translateX(100%); transition: transform .32s cubic-bezier(.22,.61,.36,1);
  z-index: 100; display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }

.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  background: var(--ivory-2);
}
.drawer-head .brandmark { flex-direction: column; align-items: flex-start; gap: 2px; }
.drawer-head .brandmark .logo { font-size: 18px; letter-spacing: 1px; }
.drawer-head .brandmark .sub { font-size: 10px; letter-spacing: 2px; }
.drawer-close {
  width: 36px; height: 36px; border: none; border-radius: 8px;
  background: transparent; color: var(--ink-soft); font-size: 22px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.drawer-close:hover { background: rgba(197,165,114,.15); color: var(--gold-deep); }

.drawer-body {
  flex: 1; overflow-y: auto; padding: 14px 16px 28px;
  background: var(--ivory); min-height: 120px;
}
.drawer-body > a,
.drawer-body > button {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 13px 12px; border-radius: 10px;
  font-size: 15px; color: var(--ink) !important; text-align: left;
  background: transparent; border: none; cursor: pointer;
  transition: background .18s, color .18s;
}
.drawer-body > a:hover,
.drawer-body > button:hover { background: var(--ivory-2); color: var(--gold-deep); }
.drawer-body > a i,
.drawer-body > button i { width: 24px; text-align: center; color: var(--gold); }
.drawer-body > a[target="_blank"] i { color: var(--gold-deep); }
.drawer-body .me {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; margin-bottom: 8px; border-radius: 10px;
  background: var(--ivory-2); color: var(--ink); font-weight: 600; font-size: 15px;
}
.drawer-body .me i { color: var(--gold); }

.drawer-group { margin: 6px 0; }
.drawer-group .dg-label {
  display: block; padding: 10px 12px 6px;
  font-size: 12px; color: var(--ink-soft); letter-spacing: 2px; text-transform: uppercase;
}
.drawer-group a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px 11px 22px; border-radius: 8px;
  font-size: 14px; color: var(--ink) !important;
}
.drawer-group a:hover { background: var(--ivory-2); color: var(--gold-deep); }
.drawer-group a i { width: 22px; text-align: center; color: var(--gold); }

@media (max-width: 980px) {
  .hamburger { display: inline-flex; }
  .topnav { display: none; }
}
@media (min-width: 981px) {
  .drawer, .drawer-mask, .hamburger { display: none !important; }
}
