/* ============================================================
   壳研所 CASE LAB — 站点样式
   编辑式排版 / 暖纸底色 / 单一强调色
   ============================================================ */

:root {
  --paper: #fdfbf7;
  --paper-2: #f6f1e8;
  --ink: #1a1614;
  --ink-2: #443c35;
  --muted: #7a6f63;
  --line: #e5dccd;
  --line-2: #d3c7b4;
  --accent: #a8442a;
  --accent-soft: #f3e4dd;
  --ok: #3f6b4a;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --serif: "Songti SC", "Source Han Serif SC", "Noto Serif SC", STSong,
    "SimSun", ui-serif, serif;

  --w: 1200px;
  --r: 4px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }

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

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

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

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

.container { width: min(100% - 48px, var(--w)); margin-inline: auto; }

/* ---------- 顶部公告 ---------- */
.announce {
  background: var(--ink);
  color: #f0e9df;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-align: center;
  padding: 9px 16px;
}
.announce b { color: #fff; font-weight: 600; }

/* ---------- 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(253, 251, 247, 0.86);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 68px;
}
.logo {
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: 0.16em;
  font-weight: 600;
  white-space: nowrap;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.logo em {
  font-family: var(--sans);
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--muted);
  font-weight: 500;
}
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a {
  font-size: 14px;
  color: var(--ink-2);
  position: relative;
  padding: 4px 0;
  transition: color 0.2s;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--ink);
  transition: right 0.3s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after, .nav a.active::after { right: 0; }
.nav a.active { color: var(--ink); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  position: relative;
  transition: border-color 0.2s, background 0.2s;
}
.icon-btn:hover { border-color: var(--line-2); background: var(--paper-2); }
.cart-count {
  position: absolute;
  top: -3px; right: -3px;
  min-width: 17px; height: 17px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 10.5px;
  line-height: 17px;
  text-align: center;
  padding: 0 4px;
  font-weight: 600;
}
.cart-count[hidden] { display: none; }

.burger { display: none; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; }
.burger span { display: block; width: 15px; height: 1.5px; background: var(--ink); margin: 3px auto; transition: 0.25s; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: transform 0.2s var(--ease), background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #2b2420; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #94371f; }
.btn-line { border: 1px solid var(--line-2); color: var(--ink); }
.btn-line:hover { border-color: var(--ink); }
.btn-sm { height: 38px; padding: 0 18px; font-size: 13px; }
.btn-block { width: 100%; }

/* ---------- 首屏 ---------- */
.hero { border-bottom: 1px solid var(--line); overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.02fr 1fr;
  align-items: center;
  gap: 56px;
  padding: 72px 0 0;
}
.hero-copy { padding-bottom: 72px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 26px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--line-2); }

h1, .h1, h2 {
  text-wrap: balance;
}

h1, .h1 {
  font-family: var(--serif);
  font-size: clamp(38px, 5.2vw, 63px);
  line-height: 1.14;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0 0 24px;
}
h1 .thin, .thin { color: var(--muted); }
.hero p.lead {
  font-size: 16.5px;
  color: var(--ink-2);
  max-width: 46ch;
  margin: 0 0 34px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-figure { position: relative; align-self: end; }
.hero-figure img {
  width: 100%;
  height: clamp(320px, 46vw, 560px);
  object-fit: cover;
  object-position: center 40%;
  filter: saturate(0.96);
}
.hero-tag {
  position: absolute;
  left: 22px; bottom: 22px;
  background: rgba(253, 251, 247, 0.93);
  border: 1px solid var(--line);
  padding: 12px 16px;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 10px;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); flex: none; }

/* ---------- 数据条 ---------- */
.stats {
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  padding: 26px 24px;
  border-left: 1px solid var(--line);
}
.stat:first-child { border-left: 0; padding-left: 0; }
.stat b {
  display: block;
  font-family: var(--serif);
  font-size: 27px;
  letter-spacing: -0.01em;
  font-weight: 600;
}
.stat span { font-size: 12.5px; color: var(--muted); letter-spacing: 0.04em; }

/* ---------- 通用区块 ---------- */
section { padding: 86px 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 44px;
}
.section-head h2 {
  font-family: var(--serif);
  font-size: clamp(26px, 3.2vw, 36px);
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 0;
  font-weight: 600;
}
.section-head p { margin: 12px 0 0; color: var(--muted); font-size: 14.5px; max-width: 52ch; }
.section-head .more {
  font-size: 13.5px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  white-space: nowrap;
}

/* ---------- 产品卡 ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px 24px;
}
.card { position: relative; }
.card-media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 0.92;
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--line);
}
.card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.card:hover .card-media img { transform: scale(1.035); }
.card-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  padding: 5px 9px;
  text-transform: uppercase;
}
.card-badge.sold { background: var(--accent); }
.card-quick {
  position: absolute;
  left: 12px; right: 12px; bottom: 12px;
  height: 40px;
  background: rgba(26, 22, 20, 0.9);
  color: #fff;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transform: translateY(6px);
  transition: 0.28s var(--ease);
}
.card:hover .card-quick { opacity: 1; transform: none; }
.card-body { padding-top: 14px; }
.card-series { font-size: 11px; letter-spacing: 0.18em; color: var(--muted); text-transform: uppercase; }
.card h3 {
  font-size: 16.5px;
  font-weight: 600;
  margin: 6px 0 4px;
  letter-spacing: -0.01em;
}
.card-meta { font-size: 12.5px; color: var(--muted); }
.card-foot {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 8px;
}
.price { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.price small { font-family: var(--sans); font-size: 11px; color: var(--muted); font-weight: 400; }
.price-old { font-size: 12.5px; color: #a89b8b; text-decoration: line-through; }

/* ---------- 能力/工艺 ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.feature-list { display: grid; gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.feature {
  background: var(--paper);
  padding: 22px 0;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  align-items: start;
}
.feature .num {
  font-family: var(--serif);
  font-size: 13px;
  color: var(--muted);
  padding-top: 3px;
  letter-spacing: 0.06em;
}
.feature h4 { margin: 0 0 4px; font-size: 15.5px; font-weight: 600; }
.feature p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.65; }

.spec-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.spec-table th, .spec-table td { text-align: left; padding: 12px 0; border-bottom: 1px solid var(--line); }
.spec-table th { color: var(--muted); font-weight: 400; width: 42%; }
.spec-table td { font-variant-numeric: tabular-nums; }

/* ---------- 定制横幅 ---------- */
.band {
  background: var(--ink);
  color: #f4eee5;
  padding: 76px 0;
}
.band-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 56px;
  align-items: center;
}
.band h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.2;
  margin: 0 0 18px;
  letter-spacing: -0.015em;
  font-weight: 600;
}
.band p { color: #bdafa0; margin: 0 0 28px; font-size: 15px; max-width: 48ch; }
.band .eyebrow { color: #a89583; }
.band .eyebrow::before { background: #4a3f35; }
.band-list { display: grid; gap: 14px; }
.band-item {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding-bottom: 14px;
  border-bottom: 1px solid #2e2721;
  font-size: 14px;
}
.band-item b { color: #fff; font-weight: 500; }
.band-item span { color: #a89583; font-size: 12.5px; margin-left: auto; }

/* ---------- 评价 ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.quote {
  border: 1px solid var(--line);
  padding: 28px 26px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.quote p { margin: 0; font-size: 14.5px; color: var(--ink-2); line-height: 1.75; }
.quote footer { margin-top: auto; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 600;
}
.stars { color: var(--accent); font-size: 12px; letter-spacing: 0.14em; }

/* ---------- 页脚 ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--paper-2); padding: 60px 0 28px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 44px;
}
.footer-brand p { font-size: 13px; color: var(--muted); max-width: 30ch; margin: 14px 0 0; line-height: 1.7; }
.footer-col h5 {
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 16px;
  font-weight: 500;
}
.footer-col a, .footer-col p { display: block; font-size: 13.5px; color: var(--ink-2); margin: 0 0 10px; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}

/* ---------- 购物车抽屉 ---------- */
.overlay {
  position: fixed; inset: 0;
  background: rgba(26, 22, 20, 0.4);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
  z-index: 90;
}
.overlay.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 100%);
  background: var(--paper);
  z-index: 100;
  transform: translateX(100%);
  transition: transform 0.42s var(--ease);
  display: flex;
  flex-direction: column;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.08);
}
.drawer.open { transform: none; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}
.drawer-head h3 { margin: 0; font-size: 15px; letter-spacing: 0.04em; }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 24px; }
.drawer-foot { border-top: 1px solid var(--line); padding: 20px 24px 26px; }
.close-x { font-size: 20px; line-height: 1; color: var(--muted); padding: 6px; }
.close-x:hover { color: var(--ink); }

.cart-line { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-line img { width: 64px; height: 64px; object-fit: cover; border: 1px solid var(--line); }
.cart-line h4 { margin: 0 0 4px; font-size: 14px; font-weight: 500; }
.cart-line .sub { font-size: 12px; color: var(--muted); }
.qty { display: inline-flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 13px; }
.qty button { width: 22px; height: 22px; border: 1px solid var(--line-2); border-radius: 50%; line-height: 1; font-size: 13px; color: var(--ink-2); }
.qty button:hover { border-color: var(--ink); }
.cart-empty { text-align: center; color: var(--muted); font-size: 14px; padding: 60px 20px; }
.sum-row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 8px; }
.sum-row.total { font-size: 17px; font-weight: 600; margin: 14px 0 18px; }
.sum-row.total span:last-child { font-family: var(--serif); }
.hint { font-size: 11.5px; color: var(--muted); line-height: 1.6; margin-top: 12px; }

/* ---------- 商品详情弹层 ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(26, 22, 20, 0.5);
  opacity: 0; pointer-events: none;
  transition: opacity 0.28s;
}
.modal.open { opacity: 1; pointer-events: auto; }
.modal-card {
  background: var(--paper);
  width: min(920px, 100%);
  max-height: 90vh;
  overflow: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  transform: translateY(12px) scale(0.99);
  transition: transform 0.35s var(--ease);
}
.modal.open .modal-card { transform: none; }
.modal-card img { width: 100%; height: 100%; object-fit: cover; }
.modal-info { padding: 38px 36px; }
.modal-info h2 { font-family: var(--serif); font-size: 30px; margin: 8px 0 10px; letter-spacing: -0.02em; font-weight: 600; }
.modal-info .price { font-size: 24px; }
.modal-desc { font-size: 14px; color: var(--ink-2); margin: 20px 0; }
.spec-mini { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 22px 0 26px; }
.spec-mini div { border-top: 1px solid var(--line); padding-top: 10px; }
.spec-mini span { display: block; font-size: 11px; letter-spacing: 0.12em; color: var(--muted); text-transform: uppercase; }
.spec-mini b { font-size: 14px; font-weight: 500; }
.swatches { display: flex; gap: 8px; margin: 10px 0 22px; }
.swatch {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--line-2);
  box-shadow: inset 0 0 0 2px var(--paper);
  cursor: pointer;
}
.swatch[aria-pressed="true"] { outline: 1.5px solid var(--ink); outline-offset: 2px; }

/* ---------- 表单 ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: block; }
.field.full { grid-column: 1 / -1; }
.field span { display: block; font-size: 12px; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 7px; text-transform: uppercase; }
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line-2);
  background: var(--paper);
  padding: 12px 14px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  border-radius: 0;
  transition: border-color 0.2s;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.field input::placeholder, .field textarea::placeholder { color: #b3a696; }
.form-note { font-size: 12px; color: var(--muted); margin-top: 14px; }
.form-result { font-size: 13.5px; margin-top: 16px; padding: 12px 14px; border: 1px solid var(--line); }
.form-result.ok { border-color: #b7cdbe; background: #f1f6f2; color: var(--ok); }
.form-result.err { border-color: #e2c2b8; background: #fbf1ee; color: var(--accent); }

/* ---------- 筛选器 ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: center;
  padding: 20px 0;
  border-block: 1px solid var(--line);
  margin-bottom: 40px;
}
.filters .label { font-size: 11.5px; letter-spacing: 0.16em; color: var(--muted); text-transform: uppercase; margin-right: 6px; }
.chip {
  font-size: 13px;
  padding: 7px 15px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--ink-2);
  transition: 0.2s;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.filters .spacer { flex: 1; }
.count { font-size: 12.5px; color: var(--muted); }

/* ---------- 页面头 ---------- */
.page-head {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--line);
}
.page-head h1 { font-size: clamp(32px, 4.4vw, 46px); margin-bottom: 12px; }
.page-head p { color: var(--muted); max-width: 60ch; margin: 0; font-size: 15px; }
.crumbs { font-size: 12px; color: var(--muted); margin-bottom: 18px; letter-spacing: 0.05em; }
.crumbs a:hover { color: var(--accent); }

/* ---------- 提示 ---------- */
.toast {
  position: fixed;
  left: 50%; bottom: 32px;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  padding: 12px 22px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s var(--ease);
  z-index: 200;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 0; padding-top: 48px; }
  .hero-copy { padding-bottom: 44px; }
  .hero-figure img { height: 340px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .split, .band-grid { grid-template-columns: 1fr; gap: 40px; }
  .quotes { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .modal-card { grid-template-columns: 1fr; }
  .modal-card img { height: 260px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 16px; }
}

@media (max-width: 720px) {
  .container { width: calc(100% - 36px); }
  section { padding: 60px 0; }
  .nav { display: none; }
  .nav.open {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 8px 18px 18px;
  }
  .nav.open a { padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
  .burger { display: grid; place-items: center; order: 3; }
  .header-inner { gap: 14px; height: 62px; }
  .logo { font-size: 18px; }
  .logo em { display: none; }
  .hero-figure img { height: 260px; }
  .product-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .modal-info { padding: 26px 22px; }
  .announce { font-size: 11px; letter-spacing: 0.02em; padding: 8px 10px; }
  .band { padding: 56px 0; }
  .card-quick { opacity: 1; transform: none; height: 36px; }
}
