/* 雅集轩 · 古董工艺品商城 */

:root {
  --ink: #2b2620;
  --ink-soft: #6b6257;
  --gold: #a5813f;
  --gold-soft: #c9ab6d;
  --paper: #f7f4ee;
  --card: #ffffff;
  --line: #e5ded2;
  --danger: #b03a2e;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Songti SC", "Noto Serif SC", "SimSun", Georgia, serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--ink-soft); font-size: 14px; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--ink); }

/* ---------- 头部 ---------- */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-size: 24px; font-weight: 700; letter-spacing: 6px; color: var(--ink); }
.nav nav a { margin-left: 28px; font-size: 15px; color: var(--ink-soft); }
.nav nav a:hover { color: var(--gold); }
.lang-switch { margin-left: 24px; padding-left: 18px; border-left: 1px solid var(--line); }
.nav nav .lang-switch a { margin-left: 10px; font-size: 13px; }
.nav nav .lang-switch a.active { color: var(--gold); font-weight: 700; }

/* ---------- 首页横幅 ---------- */
.hero {
  background: linear-gradient(160deg, #241f19 0%, #3a3128 60%, #4a3d2c 100%);
  color: #f3ede2;
  padding: 96px 0;
  text-align: center;
}
.hero-kicker { letter-spacing: 8px; font-size: 14px; color: var(--gold-soft); margin-bottom: 18px; }
.hero h1 { font-size: 44px; line-height: 1.4; letter-spacing: 4px; margin-bottom: 20px; }
.hero-sub { max-width: 560px; margin: 0 auto 32px; color: #d8cfc0; font-size: 15px; }

.btn {
  display: inline-block;
  background: var(--gold);
  color: #fff;
  border: none;
  padding: 12px 32px;
  font-size: 15px;
  font-family: inherit;
  letter-spacing: 2px;
  cursor: pointer;
  border-radius: 2px;
  transition: background .2s;
}
.btn:hover { background: var(--ink); color: #fff; }
.btn:disabled { background: #b7aea0; cursor: not-allowed; }
.btn.small { padding: 6px 14px; font-size: 13px; }
.btn.ghost { background: transparent; border: 1px solid var(--gold); color: var(--gold); }
.btn.ghost:hover { background: var(--gold); color: #fff; }
.btn.danger { background: var(--danger); }

/* ---------- 购买流程 ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 64px 24px 32px;
}
.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  padding: 28px 24px;
}
.step-no { color: var(--gold); font-size: 22px; font-weight: 700; }
.step h3 { margin: 8px 0; font-size: 18px; letter-spacing: 2px; }
.step p { font-size: 14px; color: var(--ink-soft); }

/* ---------- 商品 ---------- */
.products-section { padding: 32px 24px 72px; }
.section-title {
  font-size: 26px; letter-spacing: 4px; margin-bottom: 28px;
  padding-bottom: 12px; border-bottom: 2px solid var(--gold);
  display: inline-block;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px;
  margin-top: 8px;
}
.product-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  transition: box-shadow .2s, transform .2s;
}
.product-card:hover { box-shadow: 0 8px 24px rgba(43, 38, 32, .12); transform: translateY(-2px); }
.product-thumb { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: #efe9df; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: var(--gold); color: #fff;
  font-size: 12px; letter-spacing: 2px;
  padding: 3px 10px; border-radius: 2px;
}
.badge.status-sold, .status-sold .badge { background: #8a8175; }
.badge.status-coming, .status-coming .badge { background: #4a6b8a; }
.product-info { padding: 16px 18px 20px; }
.product-name { font-size: 16px; color: var(--ink); margin-bottom: 8px; }
.product-price { color: var(--gold); font-size: 18px; font-weight: 700; }
.product-price.big { font-size: 28px; margin: 8px 0; }
.product-stock { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }

/* ---------- 详情页 ---------- */
.product-detail { padding: 56px 24px; }
.detail-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.detail-thumb { position: relative; background: #efe9df; }
.detail-thumb img { width: 100%; display: block; }
.detail-info h1 { font-size: 28px; margin-bottom: 8px; }

.attr-table { margin: 24px 0 20px; border-top: 1px solid var(--line); }
.attr-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 2px; border-bottom: 1px solid var(--line); font-size: 15px;
}
.attr-label { color: var(--ink-soft); }
.attr-row.stock.empty .attr-label,
.attr-row.stock.empty .attr-value { color: var(--danger); }

.stock-badge {
  display: inline-block;
  background: #e6f4ea; color: #2e7d46;
  padding: 6px 20px; font-size: 14px; letter-spacing: 2px; border-radius: 3px;
}
.stock-badge.unavailable { background: #f0ede7; color: #8a8175; }
.detail-info .btn { margin: 16px 0 8px; }

.meta-list { margin-top: 20px; font-size: 14px; }
.meta-row { display: flex; align-items: center; gap: 24px; padding: 5px 0; }
.meta-row dt { width: 48px; color: var(--ink-soft); flex-shrink: 0; }
.meta-row dd { margin: 0; }
.share-btns { display: flex; gap: 8px; }
.share-btn {
  width: 32px; height: 32px; border-radius: 50%;
  background: #8a8175; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.share-btn:hover { background: var(--gold); color: #fff; }

.detail-desc { margin-top: 40px; padding: 20px; background: var(--card); border: 1px solid var(--line); }
.detail-desc h3 { font-size: 15px; letter-spacing: 2px; margin-bottom: 8px; color: var(--gold); }
.detail-desc p { font-size: 14px; color: var(--ink-soft); white-space: pre-wrap; }
.back-link { display: inline-block; margin-top: 20px; font-size: 14px; }

/* ---------- 404 ---------- */
.not-found { text-align: center; padding: 120px 24px; }
.not-found h1 { font-size: 64px; color: var(--gold); margin-bottom: 12px; }
.not-found p { margin-bottom: 24px; }

/* ---------- 后台 ---------- */
.admin-login {
  min-height: 70vh;
  display: flex; align-items: center; justify-content: center;
  padding: 48px 24px;
}
.admin-card {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 32px;
  width: 100%; max-width: 420px;
}
.admin-card h1 { font-size: 20px; letter-spacing: 2px; margin-bottom: 24px; text-align: center; }
.admin-card label { display: block; font-size: 14px; margin-bottom: 16px; color: var(--ink-soft); }
.admin-card input, .admin-card select, .admin-card textarea {
  display: block; width: 100%; margin-top: 6px;
  padding: 10px 12px; font-size: 15px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 2px; background: #fdfcfa;
}
.admin-card input:focus, .admin-card select:focus, .admin-card textarea:focus {
  outline: none; border-color: var(--gold);
}
.admin-card .btn { width: 100%; margin-top: 8px; }
.admin-card .muted { text-align: center; margin-top: 16px; }

.admin-main { padding: 40px 24px 72px; }
.admin-main h1 { font-size: 24px; letter-spacing: 3px; }
.admin-topbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 20px;
}
.admin-actions { display: flex; align-items: center; gap: 12px; }
.inline-form { display: inline; }

.form-error {
  background: #f9e8e6; color: var(--danger);
  border: 1px solid #e5b8b2; padding: 10px 14px;
  font-size: 14px; margin-bottom: 16px;
}
.form-flash {
  background: #eef5e9; color: #4a7a3a;
  border: 1px solid #c4dcb4; padding: 10px 14px;
  font-size: 14px; margin-bottom: 16px;
}

.admin-table {
  width: 100%; border-collapse: collapse;
  background: var(--card); border: 1px solid var(--line);
  font-size: 14px;
}
.admin-table th, .admin-table td {
  padding: 12px 14px; text-align: left;
  border-bottom: 1px solid var(--line);
}
.admin-table th { background: #efe9df; letter-spacing: 2px; font-size: 13px; }
.admin-table .badge { position: static; }
.admin-thumb { width: 56px; height: 56px; object-fit: cover; border: 1px solid var(--line); }
.admin-thumb.large { width: 200px; height: auto; margin: 8px 0; }
.admin-ops { white-space: nowrap; }
.admin-ops .btn { margin-right: 6px; }

.password-card { max-width: 520px; margin-top: 40px; padding: 24px 32px; }
.password-card h2 { font-size: 17px; letter-spacing: 2px; margin-bottom: 16px; }
.password-form .btn { width: auto; }

.edit-form { max-width: 720px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-row.two { grid-template-columns: 1fr 1fr; }
.form-actions { display: flex; gap: 12px; margin-top: 8px; }
.form-actions .btn { width: auto; }

/* ---------- 页脚 ---------- */
.site-footer {
  background: #241f19; color: #b7aea0;
  text-align: center; padding: 32px 24px;
  font-size: 14px;
}
.site-footer .muted { color: #8a8175; }

/* ---------- 分类筛选 ---------- */
.cat-filter { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 8px; }
.chip {
  padding: 6px 18px; font-size: 14px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--ink-soft);
}
.chip:hover { border-color: var(--gold); color: var(--gold); }
.chip.active { background: var(--gold); border-color: var(--gold); color: #fff; }

/* ---------- 详情页相册 ---------- */
.thumb-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.thumb-item {
  width: 72px; height: 72px; object-fit: cover;
  border: 2px solid var(--line); border-radius: 3px; cursor: pointer;
}
.thumb-item:hover, .thumb-item.active { border-color: var(--gold); }

/* ---------- 后台相册管理 ---------- */
.gallery-card { max-width: 720px; margin-top: 24px; }
.gallery-card h2 { font-size: 17px; letter-spacing: 2px; margin-bottom: 16px; }
.gallery-manage { display: flex; flex-wrap: wrap; gap: 16px; }
.gallery-item { text-align: center; }
.gallery-item img {
  width: 120px; height: 120px; object-fit: cover;
  border: 1px solid var(--line); display: block; margin-bottom: 8px;
}

/* ---------- 申购 ---------- */
.apply-box {
  margin: 20px 0; padding: 20px;
  background: var(--card); border: 1px solid var(--gold); border-radius: 3px;
}
.apply-rows { margin-bottom: 14px; }
.apply-rows .attr-row { border-bottom: none; padding: 5px 0; font-size: 14px; }
.apply-btn { width: 100%; text-align: center; }
.apply-notice { margin-top: 12px; font-size: 13px; color: var(--ink-soft); white-space: pre-wrap; }
.apply-query-link { display: inline-block; margin-top: 10px; font-size: 13px; }

.apply-form-card { max-width: 520px; margin: 48px auto; }
.center-card { text-align: center; }
.center-actions { justify-content: center; }
.apply-code { font-size: 26px; letter-spacing: 3px; color: var(--gold); font-weight: 700; margin: 8px 0 20px; }
.apply-target { margin-bottom: 20px; font-size: 15px; }
.apply-target .product-price { margin-left: 10px; }
.apply-notice-box {
  background: #faf6ee; border: 1px solid var(--line);
  padding: 14px 16px; margin-bottom: 20px; font-size: 13px; color: var(--ink-soft);
}
.apply-notice-box h3 { font-size: 14px; color: var(--gold); letter-spacing: 2px; margin-bottom: 6px; }
.apply-notice-box p { white-space: pre-wrap; }
label.agree { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-soft); }
label.agree input { width: auto; margin: 0; }
.honey { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.apply-state { font-weight: 700; }
.apply-state.pending { color: #b8860b; }
.apply-state.approved { color: #2e7d46; }
.apply-state.rejected { color: var(--danger); }
.apply-hint { margin-top: 14px; font-size: 14px; }
.apply-hint.approved { color: #2e7d46; }
.apply-hint.rejected { color: var(--danger); }
.note-cell { max-width: 160px; font-size: 13px; }

.form-section {
  font-size: 17px; letter-spacing: 2px; margin: 24px 0 16px;
  padding-top: 20px; border-top: 1px solid var(--line);
}

/* ---------- 申购专区 ---------- */
.zone-section { background: #241f19; padding: 56px 0; }
.zone-title { color: #f3ede2; border-bottom-color: var(--gold-soft); }
.zone-badge-open { background: #b03a2e; }
.zone-badge-notStarted { background: #4a6b8a; }
.zone-badge-ended { background: #8a8175; }
.zone-deadline { font-size: 12px; color: var(--danger); margin-top: 4px; font-weight: 700; }

/* ---------- 倒计时 / 公示墙 / 成交 ---------- */
.apply-countdown {
  color: var(--danger); font-weight: 700; font-size: 15px;
  margin-bottom: 12px; font-variant-numeric: tabular-nums;
}
.apply-state.completed, .apply-hint.completed { color: #2e7d46; }
.apply-state.shipped, .apply-hint.shipped { color: #4a6b8a; }
.apply-state.confirmed, .apply-hint.confirmed { color: #4a6b8a; }
.apply-state.cancelled, .apply-hint.cancelled { color: #8a8175; }
.apply-ship-title { font-size: 15px; letter-spacing: 2px; color: var(--gold); margin: 24px 0 4px; }
.winners-page { padding: 48px 24px 72px; }
.winners-table { margin-top: 16px; }

/* ---------- 响应式 ---------- */
@media (max-width: 760px) {
  .hero h1 { font-size: 30px; }
  .steps { grid-template-columns: 1fr; }
  .detail-top { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .nav nav a { margin-left: 14px; font-size: 14px; }
}
