/* ============================================================
   KIRA — 样式表
   1. 变量 / 2. 基础 / 3. 头部导航 / 4. 首页模块
   5. 商品卡片 / 6. 列表页 / 7. 商品页 / 8. 购物车 / 9. 结算
   10. 页脚 / 11. 响应式
   ============================================================ */

/* ---------- 1. 变量 ---------- */
:root {
  --bg: #ffffff;
  --bg-deep: #f2f2f2;
  --surface: #ffffff;
  --ink: #0a0a0a;
  --ink-70: #595959;
  --ink-50: #8c8c8c;
  --ink-30: #bfbfbf;
  --line: rgba(10, 10, 10, 0.16);
  --line-soft: rgba(10, 10, 10, 0.08);
  --accent: #0a0a0a;
  --ok: #0a0a0a;
  --r-sm: 0px;
  --r-md: 0px;
  --r-lg: 0px;
  --shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.4);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --nav-h: 68px;
  --pad: clamp(20px, 4vw, 56px);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

/* ---------- 2. 基础 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "kern" 1;
}

body.is-locked { overflow: hidden; }

img, svg { 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: 0; padding: 0; }

::selection { background: var(--ink); color: var(--bg); }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

h1 { font-size: clamp(38px, 6.2vw, 78px); }
h2 { font-size: clamp(26px, 3.6vw, 44px); }
h3 { font-size: clamp(18px, 2vw, 22px); letter-spacing: -0.02em; }

p { margin: 0; }

.eyebrow {
  display: block;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-50);
  font-weight: 500;
}

.muted { color: var(--ink-70); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }

.wrap {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding-inline: var(--pad);
}

.section { padding-block: clamp(56px, 7vw, 110px); }
.section--tight { padding-block: clamp(40px, 5vw, 72px); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(24px, 3vw, 44px);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--ink-30);
  padding-bottom: 3px;
  transition: border-color 0.25s var(--ease), gap 0.25s var(--ease);
}
.link-arrow:hover { border-color: var(--ink); gap: 12px; }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  padding: 0 26px;
  border-radius: var(--r-sm);
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 1px solid var(--ink);
  transition: background 0.25s var(--ease), color 0.25s var(--ease),
    border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn:hover { background: #000; }
.btn:active { transform: translateY(1px); }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: rgba(10, 10, 10, 0.04); border-color: var(--ink); }

.btn--light { background: var(--bg); color: var(--ink); border-color: var(--bg); }
.btn--light:hover { background: #fff; }

.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

/* ---------- 3. 头部导航 ---------- */
.announce {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.86);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-align: center;
  padding: 9px 16px;
}

.header {
  position: sticky;
  top: 0;
  z-index: 90;
  isolation: isolate;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.header__bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--nav-h);
  gap: 16px;
}

.brand {
  font-size: 19px;
  letter-spacing: 0.34em;
  font-weight: 500;
  grid-column: 2;
  justify-self: center;
  text-indent: 0.34em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  grid-column: 1;
  justify-self: start;
  height: 100%;
}

.nav__item { display: flex; align-items: center; height: 100%; }

.nav__link {
  font-size: 13.5px;
  letter-spacing: 0.01em;
  color: var(--ink-70);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.nav__item:hover .nav__link,
.nav__link.is-active { color: var(--ink); border-color: var(--ink); }

.nav__actions {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition: background 0.2s var(--ease);
}
.icon-btn:hover { background: rgba(10, 10, 10, 0.06); }
.icon-btn svg { width: 18px; height: 18px; stroke: var(--ink); fill: none; stroke-width: 1.4; }

.cart-count {
  position: absolute;
  top: 2px;
  right: 1px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 0;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  display: grid;
  place-items: center;
  transform: scale(0);
  transition: transform 0.25s var(--ease);
}
.cart-count.is-on { transform: scale(1); }

/* 大菜单 */
.mega {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 40px var(--pad) 44px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s;
}
.nav__item:hover .mega,
.nav__item:focus-within .mega { opacity: 1; visibility: visible; transform: none; }

.mega__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  max-width: 1440px;
  margin: 0 auto;
}

.mega__col h4 {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-50);
  margin-bottom: 16px;
  font-weight: 500;
}

.mega__list { display: grid; gap: 11px; }
.mega__list a { font-size: 14px; color: var(--ink-70); transition: color 0.2s; }
.mega__list a:hover { color: var(--ink); }

.mega__promo {
  background: var(--bg-deep);
  border-radius: var(--r-md);
  padding: 18px;
  display: flex;
  gap: 16px;
  align-items: center;
}
.mega__promo img { width: 84px; height: 84px; object-fit: cover; border-radius: 0; }
.mega__promo strong { display: block; font-size: 14px; font-weight: 500; margin-bottom: 4px; }

/* 移动端抽屉导航 */
.drawer-nav {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: var(--bg);
  transform: translateX(-100%);
  transition: transform 0.32s var(--ease);
  overflow-y: auto;
  padding: 20px var(--pad) 40px;
}
.drawer-nav.is-open { transform: none; }
.drawer-nav__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.drawer-nav__group { border-top: 1px solid var(--line); padding: 16px 0; }
.drawer-nav__group > a { font-size: 20px; letter-spacing: -0.02em; }
.drawer-nav__sub { display: grid; gap: 10px; margin-top: 12px; }
.drawer-nav__sub a { font-size: 14px; color: var(--ink-70); }

/* ---------- 4. 首页模块 ---------- */
.hero {
  position: relative;
  min-height: min(78vh, 720px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--bg-deep);
}
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--pad) clamp(32px, 5vw, 64px);
}
.hero__copy { max-width: 620px; }
.hero__copy h1 { margin: 14px 0 18px; }
.hero__copy p { max-width: 430px; color: var(--ink-70); margin-bottom: 26px; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__meta {
  margin-top: 26px;
  display: flex;
  gap: 18px;
  font-size: 12px;
  color: var(--ink-50);
  letter-spacing: 0.03em;
}

/* 四宫格分类 */
.tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.tile {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-deep);
  aspect-ratio: 1 / 1.08;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
}
.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
  z-index: -1;
}
.tile:hover img { transform: scale(1.04); }
.tile__body {
  padding: 16px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 8px;
}
.tile__body span:first-child { font-size: 15px; font-weight: 500; }
.tile__body span:last-child { font-size: 12px; color: var(--ink-50); }

/* 三段式特性 */
.feature-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 48px);
  padding-block: clamp(36px, 4vw, 60px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.feature-band h3 { margin: 12px 0 8px; }
.feature-band p { color: var(--ink-70); font-size: 14px; max-width: 320px; }

/* 大图 + 文案分栏 */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 5vw, 80px);
  align-items: center;
}
.split--reverse .split__media { order: 2; }
.split__media { border-radius: var(--r-md); overflow: hidden; background: var(--bg-deep); }
.split__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.split__body h2 { margin: 14px 0 18px; }
.split__body p { color: var(--ink-70); margin-bottom: 14px; max-width: 460px; }
.split__list { display: grid; gap: 10px; margin: 22px 0 28px; padding: 0; list-style: none; }
.split__list li {
  display: flex;
  gap: 12px;
  font-size: 14px;
  color: var(--ink-70);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
}
.split__list li::before { content: "—"; color: var(--ink-30); }

/* 信任条 */
.trust {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.trust__item {
  padding: 22px 20px;
  display: flex;
  gap: 12px;
  align-items: center;
  border-right: 1px solid var(--line);
}
.trust__item:last-child { border-right: 0; }
.trust__item svg { width: 20px; height: 20px; flex: none; stroke: var(--ink); fill: none; stroke-width: 1.3; }
.trust__item strong { display: block; font-size: 13px; font-weight: 500; }
.trust__item span { font-size: 12px; color: var(--ink-50); }

/* 口碑块 */
.reviews {
  display: grid;
  grid-template-columns: 0.8fr 2fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}
.reviews__score { font-size: clamp(44px, 6vw, 64px); letter-spacing: -0.04em; }
.stars { display: inline-flex; gap: 3px; margin: 10px 0 8px; }
.stars svg { width: 13px; height: 13px; fill: var(--ink); }
.reviews__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.review-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: 22px;
}
.review-card q { display: block; font-size: 14px; line-height: 1.65; margin-bottom: 16px; quotes: none; }
.review-card .tiny { color: var(--ink-50); display: block; }
.review-card strong { font-weight: 500; font-size: 13px; }

/* 订阅 */
.newsletter {
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--r-lg);
  padding: clamp(32px, 5vw, 64px);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: center;
}
.newsletter h2 { color: var(--bg); margin-bottom: 10px; }
.newsletter p { color: rgba(255, 255, 255, 0.62); font-size: 14px; }
.field-row { display: flex; gap: 10px; }
.field-row input {
  flex: 1;
  height: 50px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--r-sm);
  color: var(--bg);
}
.field-row input::placeholder { color: rgba(255, 255, 255, 0.42); }
.field-row input:focus { outline: none; border-color: rgba(255, 255, 255, 0.6); }

/* ---------- 5. 商品卡片 ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(12px, 1.6vw, 22px) clamp(12px, 1.4vw, 18px);
}
.product-grid--three { grid-template-columns: repeat(3, 1fr); }

.card { position: relative; display: flex; flex-direction: column; }

.card__media {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-deep);
  aspect-ratio: 4 / 5;
}
.card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.5s var(--ease), transform 0.8s var(--ease);
}
.card__media img + img { opacity: 0; }
.card:hover .card__media img:first-child { opacity: 0; }
.card:hover .card__media img + img { opacity: 1; }
.card:hover .card__media img { transform: scale(1.03); }

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--surface);
  color: var(--ink);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 0;
  z-index: 2;
}
.badge--sale { background: var(--accent); color: #fff; }

.quick {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-radius: var(--r-sm);
  padding: 8px;
  display: grid;
  gap: 6px;
  transform: translateY(calc(100% + 12px));
  opacity: 0;
  transition: transform 0.32s var(--ease), opacity 0.32s var(--ease);
  z-index: 3;
}
.card:hover .quick, .quick:focus-within { transform: none; opacity: 1; }
.quick select {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  font-size: 12.5px;
  padding: 0 8px;
  width: 100%;
}
.quick button {
  height: 36px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 0;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.quick button:hover { background: #000; }

.card__body { padding-top: 12px; display: flex; flex-direction: column; gap: 3px; }
.card__title { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.card__title strong { font-size: 14px; font-weight: 500; letter-spacing: -0.01em; }
.card__title span { font-size: 13.5px; white-space: nowrap; }
.card__sub { font-size: 12.5px; color: var(--ink-50); }
.card__price--was { color: var(--ink-30); text-decoration: line-through; margin-right: 6px; font-size: 12.5px; }
.swatches { display: flex; gap: 5px; margin-top: 8px; }
.swatch {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1px solid rgba(10, 10, 10, 0.18);
  box-shadow: inset 0 0 0 2px var(--bg);
}

/* ---------- 6. 列表页 ---------- */
.page-head { padding: clamp(28px, 4vw, 56px) 0 22px; }
.page-head h1 { font-size: clamp(30px, 4.4vw, 52px); margin-bottom: 10px; }
.page-head p { color: var(--ink-70); max-width: 520px; font-size: 14px; }

.crumbs { display: flex; gap: 8px; font-size: 12px; color: var(--ink-50); padding-top: 20px; }
.crumbs a:hover { color: var(--ink); }

.shop-layout {
  display: grid;
  grid-template-columns: 216px 1fr;
  gap: clamp(24px, 3vw, 56px);
  align-items: start;
  padding-bottom: 80px;
}

.filters { position: sticky; top: calc(var(--nav-h) + 16px); }
.filter-group { border-top: 1px solid var(--line); padding: 18px 0; }
.filter-group:first-child { border-top: 0; padding-top: 0; }
.filter-group h4 {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-50);
  margin-bottom: 12px;
  font-weight: 500;
}
.filter-opt {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  color: var(--ink-70);
  padding: 5px 0;
  cursor: pointer;
}
.filter-opt input { accent-color: var(--ink); width: 14px; height: 14px; }
.filter-opt span.count { margin-left: auto; font-size: 11.5px; color: var(--ink-30); }

.shop-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.shop-toolbar select {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: transparent;
  font-size: 13px;
  padding: 0 10px;
}
.result-count { font-size: 13px; color: var(--ink-50); }

.filter-toggle { display: none; }

/* ---------- 7. 商品页 ---------- */
.pdp {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
  padding: 28px 0 80px;
}
.gallery { display: grid; gap: 10px; }
.gallery__main {
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-deep);
  aspect-ratio: 4 / 5;
}
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gallery__thumbs button {
  border-radius: var(--r-sm);
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--bg-deep);
  border: 1px solid transparent;
  transition: border-color 0.2s;
}
.gallery__thumbs button.is-active { border-color: var(--ink); }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }

.buybox { position: sticky; top: calc(var(--nav-h) + 20px); }
.buybox h1 { font-size: clamp(28px, 3.4vw, 42px); margin: 8px 0 10px; }
.buybox__price { display: flex; align-items: baseline; gap: 10px; margin: 18px 0 4px; font-size: 20px; }
.buybox__price s { color: var(--ink-30); font-size: 15px; }
.buybox__rating { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-50); }

.opt { margin-top: 24px; }
.opt__label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-50);
  margin-bottom: 10px;
}
.opt__label b { color: var(--ink); font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 13px; }

.opt-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  transition: border-color 0.2s, background 0.2s;
}
.chip:hover { border-color: var(--ink-30); }
.chip.is-active { border-color: var(--ink); background: var(--surface); }
.chip i { width: 12px; height: 12px; border-radius: 50%; display: block; }

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  height: 50px;
}
.qty button { width: 44px; height: 100%; font-size: 16px; color: var(--ink-70); }
.qty button:hover { color: var(--ink); }
.qty span { min-width: 34px; text-align: center; font-size: 14px; }

.buy-actions { display: flex; gap: 10px; margin-top: 26px; }

.trust-inline {
  display: grid;
  gap: 9px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.trust-inline div { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-70); }
.trust-inline svg { width: 15px; height: 15px; stroke: var(--ink-50); fill: none; stroke-width: 1.4; }

.delivery {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--bg-deep);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: 13px;
  margin-top: 20px;
}
.delivery strong { font-weight: 500; }

.accordion { border-top: 1px solid var(--line); margin-top: 26px; }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 0;
  font-size: 13.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; color: var(--ink-50); font-size: 15px; }
.accordion details[open] summary::after { content: "–"; }
.accordion .acc-body { padding-bottom: 18px; font-size: 13.5px; color: var(--ink-70); }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table td { padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.spec-table td:last-child { text-align: right; color: var(--ink); }

.sticky-buy {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 10px var(--pad);
  display: none;
  align-items: center;
  gap: 14px;
}
.sticky-buy strong { font-size: 13px; display: block; }
.sticky-buy .btn { height: 44px; padding-inline: 20px; margin-left: auto; }

/* ---------- 8. 购物车抽屉 ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 18, 0.36);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
  z-index: 110;
}
.overlay.is-open { opacity: 1; visibility: visible; }

.cart {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(430px, 100%);
  background: var(--bg);
  z-index: 130;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.34s var(--ease);
  box-shadow: -30px 0 60px -40px rgba(0, 0, 0, 0.4);
}
.cart.is-open { transform: none; }

.cart__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}
.cart__head strong { font-size: 14px; font-weight: 500; letter-spacing: 0.02em; }
.cart__body { flex: 1; overflow-y: auto; padding: 8px 22px; }

.cart__empty { padding: 60px 0; text-align: center; color: var(--ink-50); font-size: 14px; }

.line-item { display: grid; grid-template-columns: 76px 1fr; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line-soft); }
.line-item__img { border-radius: 0; overflow: hidden; background: var(--bg-deep); aspect-ratio: 1; }
.line-item__img img { width: 100%; height: 100%; object-fit: cover; }
.line-item__top { display: flex; justify-content: space-between; gap: 10px; }
.line-item__top strong { font-size: 13.5px; font-weight: 500; }
.line-item__meta { font-size: 12px; color: var(--ink-50); margin-top: 2px; }
.line-item__foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 0; height: 28px; }
.stepper button { width: 26px; height: 100%; font-size: 13px; color: var(--ink-70); }
.stepper span { min-width: 24px; text-align: center; font-size: 12.5px; }
.remove { font-size: 11.5px; color: var(--ink-50); text-decoration: underline; text-underline-offset: 3px; }
.remove:hover { color: var(--accent); }

.cart__foot { border-top: 1px solid var(--line); padding: 18px 22px 22px; background: var(--bg); }
.cart__row { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 8px; }
.cart__row--total { font-size: 16px; font-weight: 500; margin: 12px 0 16px; }
.cart__note { font-size: 12px; color: var(--ink-50); text-align: center; margin-top: 10px; }
.express { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
.express button {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 0;
  font-size: 10.5px;
  color: var(--ink-70);
  letter-spacing: 0.02em;
}
.express button:hover { border-color: var(--ink-30); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  padding: 12px 20px;
  border-radius: var(--r-sm);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  z-index: 200;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 9. 结算 ---------- */
.checkout { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(28px, 5vw, 80px); padding: 40px 0 90px; }
.form-block { border-top: 1px solid var(--line); padding: 24px 0; }
.form-block h3 { font-size: 15px; margin-bottom: 16px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12px; color: var(--ink-50); letter-spacing: 0.04em; }
.field input, .field select {
  height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  padding: 0 14px;
  font-size: 14px;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--ink); }
.field-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pay-opt {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 14px;
  margin-bottom: 10px;
  background: var(--surface);
  cursor: pointer;
}
.pay-opt.is-active { border-color: var(--ink); }
.pay-opt input { accent-color: var(--ink); }
.pay-ic { height: 22px; width: 35px; color: var(--ink); display: block; }
@media (max-width: 900px) {
  .field-row-2 { grid-template-columns: 1fr; }
}

.summary { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 22px; position: sticky; top: calc(var(--nav-h) + 20px); }
.summary__item { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; padding: 10px 0; font-size: 12.5px; align-items: center; }
.summary__item img { width: 52px; height: 52px; object-fit: cover; border-radius: 0; background: var(--bg-deep); }
.summary__totals { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 14px; }
.summary__row { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 7px; color: var(--ink-70); }
.summary__row--total { font-size: 16px; color: var(--ink); font-weight: 500; margin-top: 12px; }

.done { text-align: center; padding: clamp(60px, 10vw, 120px) 0; }
.done h1 { margin-bottom: 14px; }
.done p { color: var(--ink-70); margin-bottom: 26px; }

/* ---------- 10. 页脚 ---------- */
.footer { border-top: 1px solid var(--line); padding: 56px 0 28px; margin-top: auto; }
.footer__top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 40px; }
.footer__brand .brand { justify-self: start; grid-column: auto; margin-bottom: 14px; display: block; }
.footer__brand p { color: var(--ink-50); font-size: 13px; max-width: 260px; }
.footer h5 {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-50);
  margin: 0 0 14px;
  font-weight: 500;
}
.footer__links { display: grid; gap: 9px; }
.footer__links a { font-size: 13.5px; color: var(--ink-70); }
.footer__links a:hover { color: var(--ink); }
.footer__bottom {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ink-50);
}
.market-select {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: transparent;
  font-size: 12px;
  padding: 0 10px;
}

/* ---------- 11. 响应式 ---------- */
@media (max-width: 1080px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .mega__grid { grid-template-columns: 1fr 1fr 1fr; }
  .mega__promo { display: none; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .reviews { grid-template-columns: 1fr; }
  .reviews__grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .nav { display: none; }
  .header__bar { grid-template-columns: 44px 1fr 44px; }
  .brand { font-size: 17px; }
  .menu-btn { display: grid !important; }
  .hero { min-height: 68vh; }
  .hero__media { object-position: 60% 35%; }
  .hero__media img { object-position: 62% 30%; }
  .hero__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.97) 0%, rgba(255, 255, 255, 0.82) 34%, rgba(255, 255, 255, 0.25) 58%, rgba(255, 255, 255, 0) 78%);
  }
  .split, .checkout, .newsletter, .pdp { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
  .feature-band { grid-template-columns: 1fr; gap: 26px; }
  .trust { grid-template-columns: 1fr 1fr; }
  .trust__item:nth-child(2) { border-right: 0; }
  .trust__item:nth-child(1), .trust__item:nth-child(2) { border-bottom: 1px solid var(--line); }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .shop-layout { grid-template-columns: 1fr; }
  .filters {
    position: fixed;
    inset: 0;
    z-index: 120;
    background: var(--bg);
    padding: 20px var(--pad);
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s var(--ease);
  }
  .filters.is-open { transform: none; }
  .filter-toggle { display: inline-flex; }
  .buybox { position: static; }
  .sticky-buy { display: flex; }
  .pdp { padding-bottom: 120px; }
  .summary { position: static; }
}

@media (max-width: 640px) {
  .product-grid, .product-grid--three { grid-template-columns: repeat(2, 1fr); }
  .card__title { flex-direction: column; gap: 2px; }
  .quick { position: static; transform: none; opacity: 1; margin-top: 8px; background: transparent; padding: 0; }
  .quick select { background: #fff; }
  .tiles { gap: 8px; }
  .tile__body { padding: 12px; }
  .tile__body span:last-child { display: none; }
  .hero__copy p { font-size: 14px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .line-item { grid-template-columns: 64px 1fr; }
  .footer__top { grid-template-columns: 1fr; gap: 26px; }
}
