:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #172033;
  --muted: #657086;
  --line: #e4e8ef;
  --brand: #c5162e;
  --brand-dark: #9f1023;
  --soft: #fff1f3;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.nav { display: flex; justify-content: space-between; align-items: center; height: 68px; gap: 18px; }
.logo { font-weight: 800; font-size: 22px; color: var(--brand); }
nav { display: flex; gap: 18px; color: var(--muted); font-size: 14px; }
nav a:hover { color: var(--brand); }

.hero { background: linear-gradient(135deg, #fff, #fff1f3); border-bottom: 1px solid var(--line); }
.hero-grid { min-height: 360px; display: grid; grid-template-columns: 1.4fr .8fr; align-items: center; gap: 34px; padding: 48px 0; }
.eyebrow { color: var(--brand); font-weight: 700; letter-spacing: .04em; margin: 0 0 8px; }
h1 { font-size: clamp(34px, 5vw, 58px); line-height: 1.08; margin: 0 0 18px; }
h2 { font-size: 30px; margin: 0; }
.hero p { max-width: 680px; color: var(--muted); font-size: 17px; }
.search-box { display: flex; gap: 10px; max-width: 620px; margin-top: 26px; }
.search-box input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 16px;
}
.search-box button,
.btn {
  border: 0;
  border-radius: 8px;
  padding: 13px 20px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.search-box button:hover, .btn:hover { background: var(--brand-dark); }
.hero-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  display: grid;
  gap: 12px;
  box-shadow: 0 16px 40px rgba(24, 32, 51, .08);
}
.hero-panel strong { font-size: 22px; }
.hero-panel span { padding: 12px 14px; background: var(--soft); border-radius: 8px; color: var(--brand-dark); }

.content-section { padding: 42px 0 64px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 24px; }
.category-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.category-list a {
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
}
.category-list a.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.product-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.product-card > a {
  display: block;
  aspect-ratio: 1 / 1;
  background: #f7fbfb;
  overflow: hidden;
}
.product-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.product-body { padding: 18px; }
.badge {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
}
.product-body h3 { margin: 12px 0 8px; font-size: 20px; }
.product-body p { color: var(--muted); margin: 0 0 18px; min-height: 52px; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); }
.card-foot strong, .price-line { color: var(--brand); font-size: 24px; font-weight: 800; }
.mini-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.stock-text { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; }
.empty, .notice-box {
  padding: 18px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  color: var(--muted);
}

.breadcrumb { margin: 28px 0 16px; color: var(--muted); }
.product-page { padding-bottom: 64px; }
.product-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: start; }
.product-photo, .product-info, .detail-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}
.product-photo img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px; }
.product-info h1 { font-size: 42px; margin-top: 12px; }
.summary { color: var(--muted); font-size: 17px; }
.specs { display: grid; gap: 10px; margin: 22px 0; }
.specs div { display: grid; grid-template-columns: 100px 1fr; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; }
.buy-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 18px 0; }
.buy-actions span { color: var(--muted); }
.detail-section { margin-top: 28px; }
.detail-content { margin-top: 18px; font-size: 17px; }
.detail-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 16px auto; }
.checkout-page { padding: 30px 0 64px; }
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 24px; align-items: start; }
.checkout-form, .order-side, .success-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}
.checkout-form h1, .success-box h1 { font-size: 38px; margin-bottom: 12px; }
.checkout-form label { display: block; margin: 14px 0 7px; font-weight: 700; }
.checkout-form input, .checkout-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  font: inherit;
}
.full { width: 100%; margin-top: 18px; }
.order-side img:first-child { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px; background: #eef1f5; }
.order-side h2 { margin-top: 16px; }
.wechat-qr { width: 180px; height: 180px; object-fit: cover; border: 1px solid var(--line); border-radius: 8px; margin-top: 14px; }
.success-box { max-width: 720px; margin: 0 auto; text-align: center; }
.success-box .notice-box { margin: 18px 0; text-align: left; }
.alert {
  padding: 13px 15px;
  border-radius: 8px;
  margin-bottom: 18px;
}
.success { background: #eaf8ef; color: #176339; border: 1px solid #bde7ca; }
.error { background: #fff0f0; color: #a31521; border: 1px solid #ffc7c7; }
.site-footer { border-top: 1px solid var(--line); background: #fff; color: var(--muted); padding: 28px 0; }

@media (max-width: 820px) {
  .nav { height: auto; padding: 16px 0; align-items: flex-start; flex-direction: column; }
  .hero-grid, .product-hero, .checkout-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-head { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 560px) {
  .search-box { flex-direction: column; }
  .product-grid { grid-template-columns: 1fr; }
  h1 { font-size: 36px; }
  .product-info h1 { font-size: 32px; }
}
