/* 如玉集 · 商城前台样式 */

:root {
  --paper: #f7f3ec;
  --paper-2: #efe8db;
  --card: #fbf8f2;
  --ink: #1f1c18;
  --ink-2: #5c554b;
  --ink-3: #8c8377;
  --line: #ded3c2;
  --line-2: #eae2d4;
  --seal: #a4432f;
  --seal-soft: #c2694f;
  --celadon: #6f8f80;
  --sand: #e8dfcd;
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", STSong, "SimSun", "Georgia", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 2px;
  --shadow: 0 18px 40px -28px rgba(31, 28, 24, .45);
  --wrap: 1180px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(circle at 12% 8%, rgba(164, 67, 47, .035), transparent 42%),
    radial-gradient(circle at 86% 22%, rgba(111, 143, 128, .045), transparent 46%);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; margin: 0; line-height: 1.3; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.wrap.narrow { max-width: 760px; }
.muted { color: var(--ink-3); }
.mono { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 13px; letter-spacing: .02em; }
.bad { color: var(--seal); }

/* ---------------- 顶部公告 / 头部 ---------------- */

.notice {
  background: var(--ink);
  color: #efe6d6;
  font-size: 12.5px;
  letter-spacing: .12em;
  text-align: center;
  padding: 7px 12px;
}

.site-head {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(247, 243, 236, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.head-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: 78px;
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--seal);
  color: var(--seal);
  font-family: var(--serif);
  font-size: 19px;
  background: rgba(164, 67, 47, .04);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-family: var(--serif); font-size: 19px; letter-spacing: .3em; font-weight: 500; }
.brand-text em { font-style: normal; font-size: 11px; letter-spacing: .18em; color: var(--ink-3); }

.nav { display: flex; gap: 28px; margin-left: auto; font-size: 13.5px; letter-spacing: .14em; }
.nav a { color: var(--ink-2); padding: 6px 0; border-bottom: 1px solid transparent; transition: .2s; }
.nav a:hover { color: var(--ink); border-color: var(--seal); }

.cart-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  letter-spacing: .16em;
  border: 1px solid var(--line);
  padding: 8px 14px;
  transition: .2s;
  background: var(--card);
}
.cart-link:hover { border-color: var(--ink); }
.cart-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--seal);
  color: #fff;
  font-size: 11px;
  display: grid;
  place-items: center;
  font-family: var(--sans);
  letter-spacing: 0;
}

/* ---------------- 提示条 ---------------- */

.flash { font-size: 13.5px; padding: 11px 0; letter-spacing: .02em; }
.flash-ok { background: #e9efe6; color: #3f5c45; border-bottom: 1px solid #d3dfd0; }
.flash-bad { background: #f7e8e4; color: #8c3423; border-bottom: 1px solid #ebd2ca; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  font-size: 13.5px;
  letter-spacing: .16em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: .22s ease;
  font-family: var(--sans);
  background: none;
  color: var(--ink);
}

.btn-ink { background: var(--ink); color: #f4ede1; }
.btn-ink:hover { background: var(--seal); }

.btn-line { border-color: var(--line); color: var(--ink-2); background: transparent; }
.btn-line:hover { border-color: var(--ink); color: var(--ink); }

.btn-wide { width: 100%; }

.link-arrow { color: var(--seal); font-size: 13.5px; letter-spacing: .1em; border-bottom: 1px solid rgba(164, 67, 47, .35); padding-bottom: 2px; }
.link-quiet { color: var(--ink-3); font-size: 13px; }
.link-quiet:hover { color: var(--ink); }

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

.hero { padding: 64px 0 40px; border-bottom: 1px solid var(--line); }

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  font-size: 11.5px;
  letter-spacing: .34em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(30px, 4.4vw, 52px);
  line-height: 1.32;
  letter-spacing: .04em;
  margin-bottom: 24px;
}

.lead { color: var(--ink-2); font-size: 15px; max-width: 30em; }

.hero-actions { display: flex; gap: 14px; margin-top: 34px; }

.hero-art { position: relative; display: grid; place-items: center; }
.hero-art::before {
  content: "";
  position: absolute;
  inset: 6% 10%;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #fbf7ef, #f0e9da 70%);
}
.hero-art img { position: relative; width: 100%; max-width: 400px; }
.hero-cap {
  position: absolute;
  bottom: 4%;
  right: 2%;
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: .28em;
  color: var(--ink-3);
}

/* ---------------- 分类 ---------------- */

.cats { padding: 54px 0 10px; }
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.cat-card {
  border: 1px solid var(--line);
  background: var(--card);
  padding: 30px 26px 26px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  transition: .25s;
}
.cat-card:hover { border-color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow); }
.cat-no { font-family: var(--serif); font-size: 12px; color: var(--seal); letter-spacing: .2em; }
.cat-card strong { font-family: var(--serif); font-size: 23px; font-weight: 500; letter-spacing: .16em; }
.cat-card em { font-style: normal; color: var(--ink-2); font-size: 13.5px; }
.cat-count { position: absolute; right: 22px; bottom: 22px; font-size: 11.5px; color: var(--ink-3); letter-spacing: .1em; }

/* ---------------- 区块标题 ---------------- */

.section-head { display: flex; align-items: baseline; gap: 20px; flex-wrap: wrap; margin-bottom: 34px; }
.section-head h2 { font-size: 26px; letter-spacing: .16em; }
.section-head p { color: var(--ink-3); font-size: 13.5px; margin: 0; }

.pick { padding: 70px 0 60px; }

/* ---------------- 商品网格 ---------------- */

.prod-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px 22px; }

.prod-card { display: flex; flex-direction: column; gap: 14px; }
.prod-img {
  position: relative;
  background: var(--paper-2);
  border: 1px solid var(--line-2);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}
.prod-img img { width: 100%; transition: transform .5s ease; }
.prod-card:hover .prod-img img { transform: scale(1.04); }
.prod-card:hover .prod-img { border-color: var(--line); }
.soldout {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--ink);
  color: #f3ece0;
  font-size: 11px;
  letter-spacing: .18em;
  padding: 4px 9px;
}

.prod-body h3 { font-size: 16.5px; letter-spacing: .06em; font-weight: 500; margin-bottom: 4px; }
.prod-sum { font-size: 12.5px; color: var(--ink-3); line-height: 1.6; margin: 0 0 8px; min-height: 2.6em; }
.prod-price { font-family: var(--serif); font-size: 16px; margin: 0; display: flex; align-items: baseline; gap: 10px; }
.prod-price s { color: var(--ink-3); font-size: 12.5px; }

/* ---------------- 品牌故事 ---------------- */

.story { border-top: 1px solid var(--line); padding: 76px 0 84px; background: linear-gradient(180deg, rgba(255,255,255,.5), transparent); }
.story-inner { display: grid; grid-template-columns: .8fr 1.2fr; gap: 60px; align-items: center; }
.story-art img { max-width: 360px; margin: 0 auto; }
.story-text h2 { font-size: clamp(24px, 3vw, 34px); line-height: 1.42; letter-spacing: .06em; margin-bottom: 22px; }
.story-text p { color: var(--ink-2); font-size: 14.5px; }

/* ---------------- 页头 / 面包屑 ---------------- */

.crumbs { padding: 24px 0 0; font-size: 12.5px; color: var(--ink-3); display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--ink); }

.page-head { padding: 28px 0 34px; border-bottom: 1px solid var(--line); margin-bottom: 44px; }
.page-head h1 { font-size: clamp(24px, 3vw, 34px); letter-spacing: .12em; margin-bottom: 10px; }
.page-head p { color: var(--ink-3); font-size: 13.5px; margin: 0; }

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

.pdp { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: start; }

.pdp-media { background: var(--paper-2); border: 1px solid var(--line-2); aspect-ratio: 1/1; display: grid; place-items: center; }
.pdp-media img { width: 100%; }

.pdp-cat { font-size: 11.5px; letter-spacing: .28em; color: var(--seal); margin-bottom: 12px; }
.pdp-info h1 { font-size: clamp(24px, 2.6vw, 32px); letter-spacing: .1em; margin-bottom: 12px; }
.pdp-sum { color: var(--ink-2); font-size: 14px; }
.pdp-price { display: flex; align-items: baseline; gap: 14px; margin: 20px 0 10px; font-family: var(--serif); }
.pdp-price .now { font-size: 27px; letter-spacing: .04em; }
.pdp-price s { color: var(--ink-3); font-size: 14px; }
.pdp-stock { font-size: 12.5px; color: var(--ink-3); padding-bottom: 22px; border-bottom: 1px solid var(--line); }

.buy-form { display: flex; gap: 14px; align-items: flex-end; margin: 24px 0; }
.qty { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--ink-3); }
.qty input, .cart-qty input {
  width: 82px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  text-align: center;
}
.buy-form .btn { flex: 1; }

.pdp-spec { display: grid; gap: 8px; margin: 0 0 26px; font-size: 13px; }
.pdp-spec > div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; border-bottom: 1px dotted var(--line); padding-bottom: 8px; }
.pdp-spec dt { color: var(--ink-3); }
.pdp-spec dd { margin: 0; color: var(--ink-2); }

.pdp-extra { font-size: 12.5px; color: var(--ink-3); }
.pdp-extra b { color: var(--ink); font-weight: 500; }

.pdp-desc { border-top: 1px solid var(--line); margin-top: 70px; padding-top: 40px; max-width: 720px; }
.pdp-desc h2 { font-size: 20px; letter-spacing: .16em; margin-bottom: 22px; }

.prose { color: var(--ink-2); font-size: 14.5px; line-height: 2; }
.prose.big { font-size: 15.5px; line-height: 2.05; }
.prose h2 { font-size: 19px; letter-spacing: .12em; margin: 34px 0 12px; color: var(--ink); }
.prose b { color: var(--ink); font-weight: 500; }

.related { padding: 70px 0 90px; }

/* ---------------- 购物车 ---------------- */

.cart-layout { display: grid; grid-template-columns: 1.6fr .9fr; gap: 54px; align-items: start; padding-bottom: 90px; }

.cart-list { border-top: 1px solid var(--line); }
.cart-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 22px; padding: 24px 0; border-bottom: 1px solid var(--line); align-items: start; }
.cart-thumb { background: var(--paper-2); border: 1px solid var(--line-2); aspect-ratio: 1/1; display: grid; place-items: center; }
.cart-thumb img { width: 100%; }
.cart-name { font-family: var(--serif); font-size: 17px; letter-spacing: .05em; }
.cart-meta { font-size: 12.5px; color: var(--ink-3); margin: 4px 0 12px; }
.cart-qty { display: flex; align-items: flex-end; gap: 20px; }
.cart-qty label { font-size: 12px; color: var(--ink-3); display: flex; flex-direction: column; gap: 4px; }
.cart-line-total { font-family: var(--serif); font-size: 16px; }
.cart-remove { background: none; border: none; color: var(--ink-3); font-size: 12.5px; cursor: pointer; padding: 4px; }
.cart-remove:hover { color: var(--seal); }
.cart-tools { display: flex; align-items: center; gap: 22px; padding: 24px 0; }

.cart-side {
  border: 1px solid var(--line);
  background: var(--card);
  padding: 30px 28px;
  position: sticky;
  top: 100px;
}
.cart-side h2 { font-size: 18px; letter-spacing: .18em; margin-bottom: 20px; }
.side-note { font-size: 12px; color: var(--ink-3); line-height: 1.7; margin: 14px 0 0; }

.sum { margin: 0 0 18px; font-size: 13.5px; }
.sum > div { display: flex; justify-content: space-between; padding: 7px 0; }
.sum dt { color: var(--ink-2); }
.sum dd { margin: 0; }
.sum-total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px !important; font-family: var(--serif); font-size: 18px; }
.sum-total dt, .sum-total dd { color: var(--ink); }

.mini-list { list-style: none; margin: 0 0 18px; padding: 0; font-size: 13px; border-bottom: 1px solid var(--line); }
.mini-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; color: var(--ink-2); }

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

.checkout-form { border-top: 1px solid var(--line); padding-top: 28px; }
.field { margin-bottom: 20px; display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 12.5px; letter-spacing: .1em; color: var(--ink-3); }
.field input, .field textarea {
  border: 1px solid var(--line);
  background: var(--card);
  padding: 12px 14px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  border-radius: var(--radius);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink-2); background: #fff; }
.field-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.empty { padding: 60px 0 90px; color: var(--ink-2); font-size: 15px; }
.center { text-align: center; padding: 80px 0 110px; }
.big-404 { font-family: var(--serif); font-size: 72px; color: var(--line); margin: 0; letter-spacing: .1em; }

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

.order-head .eyebrow { color: var(--seal); margin-bottom: 10px; }
.order-main { display: grid; gap: 26px; }
.order-block, .pay-box { border: 1px solid var(--line); background: var(--card); padding: 28px 30px; }
.order-block h2, .pay-box h2 { font-size: 17px; letter-spacing: .16em; margin-bottom: 18px; }
.pay-box { border-color: var(--ink); background: #fffdf8; }
.pay-amount { font-family: var(--serif); font-size: 18px; margin: 18px 0 0; }
.pay-amount b { font-size: 26px; }

.order-items { list-style: none; margin: 0 0 20px; padding: 0; }
.order-items li { display: grid; grid-template-columns: 72px 1fr auto; gap: 18px; align-items: center; padding: 14px 0; border-bottom: 1px dotted var(--line); }
.order-items img { background: var(--paper-2); border: 1px solid var(--line-2); }
.oi-name { font-size: 14px; }
.oi-name em { font-style: normal; color: var(--ink-3); margin-left: 10px; font-size: 12.5px; }

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

.site-foot { background: #201d19; color: #cfc5b6; padding: 60px 0 26px; margin-top: 20px; }
.foot-inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 48px; padding-bottom: 44px; }
.foot-mark { font-family: var(--serif); letter-spacing: .5em; color: #f0e7d8; font-size: 17px; margin-bottom: 16px; }
.foot-brand p { font-size: 13px; color: #a89e8f; line-height: 1.85; max-width: 34em; }
.foot-col h4 { font-family: var(--sans); font-size: 11.5px; letter-spacing: .26em; color: #8d8477; margin-bottom: 16px; font-weight: 400; }
.foot-col a, .foot-col span { display: block; font-size: 13px; color: #bdb3a4; padding: 5px 0; }
.foot-col a:hover { color: #f0e7d8; }
.foot-bottom { display: flex; gap: 24px; flex-wrap: wrap; justify-content: space-between; border-top: 1px solid #332f29; padding-top: 20px; font-size: 11.5px; color: #8d8477; letter-spacing: .06em; }
.foot-bottom .muted { color: #6f675c; }

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

@media (max-width: 1000px) {
  .prod-grid { grid-template-columns: repeat(3, 1fr); }
  .pdp { grid-template-columns: 1fr; gap: 32px; }
  .cart-layout { grid-template-columns: 1fr; gap: 30px; }
  .cart-side { position: static; }
  .story-inner { grid-template-columns: 1fr; gap: 30px; }
  .story-art { order: 2; }
}

@media (max-width: 820px) {
  .head-inner { flex-wrap: wrap; gap: 14px; min-height: 66px; padding-top: 12px; padding-bottom: 12px; }
  .nav { order: 3; width: 100%; margin-left: 0; gap: 20px; overflow-x: auto; padding-bottom: 4px; white-space: nowrap; }
  .cart-link { margin-left: auto; }
  .hero { padding: 40px 0 26px; }
  .hero-inner { grid-template-columns: 1fr; gap: 26px; }
  .hero-art { max-width: 320px; margin: 0 auto; }
  .cat-grid { grid-template-columns: 1fr; }
  .prod-grid { grid-template-columns: repeat(2, 1fr); gap: 26px 16px; }
  .foot-inner { grid-template-columns: 1fr; gap: 30px; }
  .wrap { padding: 0 18px; }
  .field-row { grid-template-columns: 1fr; }
  .cart-row { grid-template-columns: 78px 1fr; }
  .cart-remove { grid-column: 2; justify-self: start; }
  .buy-form { flex-direction: column; align-items: stretch; }
  .buy-form .btn { width: 100%; }
  .order-block, .pay-box { padding: 22px 18px; }
}