:root {
  --ink: #1d1b19;
  --muted: #6c655e;
  --line: #e3ddd4;
  --bg: #fbf9f5;
  --paper: #ffffff;
  --accent: #7a5a34;
  --accent-dark: #5c431f;
  --ok-bg: #e7f3ea; --ok-fg: #255d36;
  --err-bg: #fbeae9; --err-fg: #9b2c23;
  --max: 1120px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 "Helvetica Neue", Arial, "PingFang SC", sans-serif;
}
h1, h2, h3, .serif { font-family: Georgia, "Times New Roman", serif; font-weight: 600; }
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* header */
.site-head { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 20; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { font-family: Georgia, serif; font-size: 22px; letter-spacing: .5px; color: var(--ink); }
.brand b { color: var(--accent); }
.nav { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--ink); font-size: 14px; letter-spacing: .3px; }
.nav a.active { color: var(--accent); }
.nav .sep { width: 1px; height: 18px; background: var(--line); }

/* hero */
.hero { padding: 56px 0 40px; text-align: center; }
.hero h1 { font-size: 40px; margin: 0 0 10px; }
.hero p { color: var(--muted); max-width: 640px; margin: 0 auto; font-size: 18px; }

/* section title */
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 36px 0 18px; }
.section-title h2 { font-size: 24px; margin: 0; }

/* product grid */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 2px; overflow: hidden; display: flex; flex-direction: column; }
.card .ph { aspect-ratio: 4/5; background: #efe9e0; overflow: hidden; }
.card .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .ph img { transform: scale(1.03); }
.card .body { padding: 14px 16px 18px; }
.card .t { font-family: Georgia, serif; font-size: 17px; margin: 0 0 4px; }
.card .p { color: var(--accent-dark); font-weight: 600; }
.card .reserved { color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 24px; }
.filters a { font-size: 13px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: var(--paper); }
.filters a.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* item detail */
.item { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; padding: 32px 0 60px; }
.gallery .main { background: #efe9e0; border: 1px solid var(--line); aspect-ratio: 4/5; overflow: hidden; }
.gallery .main img { width: 100%; height: 100%; object-fit: contain; background: #efe9e0; cursor: zoom-in; }
.thumbs { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.thumbs img { width: 72px; height: 72px; object-fit: cover; border: 1px solid var(--line); cursor: pointer; }
.thumbs img.sel { outline: 2px solid var(--accent); }
.item h1 { font-size: 30px; margin: 0 0 6px; }
.price-lg { font-size: 26px; color: var(--accent-dark); font-weight: 700; margin: 8px 0 18px; }
.specs { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14px; }
.specs th, .specs td { text-align: left; padding: 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs th { color: var(--muted); font-weight: 500; width: 40%; }
.desc { color: #3a362f; }

/* buttons & forms */
.btn { display: inline-block; border: 0; border-radius: 2px; padding: 12px 22px; font-size: 15px; cursor: pointer; background: var(--accent); color: #fff; letter-spacing: .3px; }
.btn:hover { background: var(--accent-dark); text-decoration: none; }
.btn.block { display: block; width: 100%; text-align: center; }
.btn.ghost { background: transparent; color: var(--accent-dark); border: 1px solid var(--accent); }
.btn.ghost:hover { background: #f1e9df; }
.btn.sm { padding: 7px 14px; font-size: 13px; }
.btn.danger { background: #9b2c23; }
.actions { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
details.offer { margin-top: 6px; border: 1px solid var(--line); border-radius: 2px; padding: 0 14px; background: var(--paper); }
details.offer summary { cursor: pointer; padding: 12px 0; color: var(--accent-dark); font-weight: 600; }
.field { margin: 12px 0; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], textarea, select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 2px; font: inherit; background: #fff; color: var(--ink);
}
textarea { min-height: 90px; resize: vertical; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* panels & auth */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 2px; padding: 24px; }
.narrow { max-width: 440px; margin: 40px auto; }
.narrow h1 { font-size: 26px; margin: 0 0 18px; }

/* flash */
.flash { padding: 12px 16px; border-radius: 2px; margin: 16px 0; font-size: 14px; }
.flash.ok { background: var(--ok-bg); color: var(--ok-fg); }
.flash.error { background: var(--err-bg); color: var(--err-fg); }

/* account */
.subnav { display: flex; gap: 18px; border-bottom: 1px solid var(--line); margin: 24px 0; }
.subnav a { padding: 10px 2px; color: var(--ink); font-size: 14px; border-bottom: 2px solid transparent; }
.subnav a.active { border-color: var(--accent); color: var(--accent); }
.olist { width: 100%; border-collapse: collapse; }
.olist th, .olist td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
.olist th { color: var(--muted); font-weight: 500; }
.badge { display: inline-block; font-size: 12px; padding: 3px 9px; border-radius: 999px; font-weight: 600; }
.badge.wait { background: #fff3df; color: #8a5a12; }
.badge.pay { background: #e7eefb; color: #2a4d86; }
.badge.paid { background: #e7f3ea; color: #255d36; }
.badge.ship { background: #e8f0f0; color: #246; }
.badge.done { background: #eceae4; color: #555; }
.badge.cancel { background: #f3e7e6; color: #8a2e26; }
.pay-box { background: #fbf6ee; border: 1px solid #ecdfca; border-radius: 2px; padding: 16px; white-space: pre-wrap; }

/* footer */
.site-foot { border-top: 1px solid var(--line); margin-top: 60px; background: var(--paper); }
.site-foot .wrap { padding: 28px 16px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: 13px; }
.site-foot a { color: var(--muted); margin-right: 14px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card-list { display: grid; gap: 14px; }

@media (max-width: 860px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .item { grid-template-columns: 1fr; gap: 22px; }
  .hero h1 { font-size: 30px; }
}
@media (max-width: 520px) {
  .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .grid-2 { grid-template-columns: 1fr; }
  .site-head .wrap { height: auto; padding: 10px 16px; flex-direction: column; align-items: flex-start; }
}

/* ============ 商品详情页(重设计) ============ */
.pd-crumb { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 26px 0 18px; display: flex; gap: 8px; align-items: center; }
.pd-crumb a { color: var(--muted); }
.pd-crumb a:hover { color: var(--accent); text-decoration: none; }
.pd-crumb span { color: #cbc3b4; }

.pd { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 52px; align-items: start; padding-bottom: 18px; }

.pd-media { position: sticky; top: 88px; }
.pd-frame {
  margin: 0; background: linear-gradient(170deg, #fff, #f6f1e8);
  border: 1px solid var(--line); border-radius: 3px; padding: 26px;
  box-shadow: 0 18px 40px -24px rgba(60,45,25,.35);
  display: flex; align-items: center; justify-content: center; min-height: 420px;
}
.pd-frame img { width: 100%; height: auto; max-height: 72vh; object-fit: contain; }
.pd-noimg { color: var(--muted); font-size: 14px; padding: 80px 0; }
.pd-thumbs { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.pd-thumb { padding: 0; border: 1px solid var(--line); background: #fff; width: 66px; height: 66px; cursor: pointer; border-radius: 2px; overflow: hidden; transition: border-color .15s; }
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-thumb.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

.pd-info { padding-top: 4px; }
.pd-eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 12px; }
.pd-title { font-family: Georgia, "Times New Roman", serif; font-weight: 600; font-size: clamp(26px, 3vw, 36px); line-height: 1.18; letter-spacing: .005em; margin: 0 0 20px; color: var(--ink); }
.pd-pricerow { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.pd-price { font-family: Georgia, serif; font-size: 30px; font-weight: 700; color: var(--accent-dark); }
.pd-pill { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; padding: 4px 11px; border-radius: 999px; }
.pd-pill.available { background: #e7f3ea; color: #2b6b40; }
.pd-pill.reserved { background: #efe9df; color: #7a6f5c; }

.pd-buy { margin: 24px 0 8px; }
.pd-note { background: #faf3ea; border: 1px solid #ecdfca; color: #7a5a34; padding: 14px 16px; border-radius: 3px; margin: 0; font-size: 14px; }
.pd-buy .btn.block { padding: 15px 22px; font-size: 15px; letter-spacing: .02em; }
.pd-disclosure { margin-top: 12px; border-top: 1px solid var(--line); }
.pd-disclosure summary { cursor: pointer; padding: 13px 2px; color: var(--accent-dark); font-size: 14px; font-weight: 600; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.pd-disclosure summary::-webkit-details-marker { display: none; }
.pd-disclosure summary::after { content: "+"; color: var(--muted); font-size: 18px; }
.pd-disclosure[open] summary::after { content: "–"; }
.pd-disclosure textarea, .pd-disclosure input[type=number] { margin-bottom: 10px; }
.pd-disclosure label { margin-top: 2px; }
.pd-offer { margin-top: 0; }
.pd-hint { font-size: 12.5px; color: var(--muted); margin: 6px 0 2px; }

.pd-specs { margin: 26px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: max-content 1fr; }
.pd-specs dt { padding: 11px 0; color: var(--muted); font-size: 13px; border-bottom: 1px solid var(--line); }
.pd-specs dd { padding: 11px 0 11px 28px; margin: 0; font-size: 14px; border-bottom: 1px solid var(--line); text-align: right; }

.pd-description { max-width: 760px; margin: 40px auto 10px; padding-top: 34px; border-top: 1px solid var(--line); }
.pd-h2 { font-family: Georgia, serif; font-weight: 600; font-size: 20px; letter-spacing: .02em; margin: 0 0 16px; color: var(--ink); }
.pd-prose { font-size: 15.5px; line-height: 1.8; color: #39342c; max-width: 68ch; }
.pd-prose br + br { content: ""; display: block; height: .5em; }

@media (max-width: 900px) {
  .pd { grid-template-columns: 1fr; gap: 26px; }
  .pd-media { position: static; }
  .pd-frame { padding: 18px; min-height: 0; }
  .pd-description { margin-top: 30px; }
}
