:root {
  --bg: #f4f6f9;
  --surface: #fff;
  --border: #e2e6ed;
  --text: #1a1d24;
  --muted: #5c6573;
  --accent: #e4393c;
  --accent-hover: #c72f32;
  --header-bg: #2d333b;
  --header-text: #f0f2f5;
  --notice-bg: #fff8e6;
  --notice-border: #f5d78e;
  --radius: 8px;
  --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* —— 顶栏 —— */
.top-bar {
  background: var(--header-bg);
  color: var(--header-text);
  font-size: 13px;
}

.top-bar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.top-bar a {
  color: #c8d0da;
  text-decoration: none;
}

.top-bar a:hover {
  color: #fff;
  text-decoration: none;
}

.top-bar .sep {
  color: #5a6268;
  user-select: none;
}

/* —— 主导航 —— */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.site-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.logo {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo:hover {
  color: var(--accent-hover);
  text-decoration: none;
}

.header-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.header-nav a {
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}

.header-nav a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* —— 公告 —— */
.notice-strip {
  background: var(--notice-bg);
  border-bottom: 1px solid var(--notice-border);
}

.notice-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 16px;
  font-size: 13px;
  color: #6b5a1a;
}

.notice-inner strong {
  color: #4a3d12;
}

/* —— 主布局：侧栏 + 内容 —— */
.shop-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  align-items: start;
}

@media (max-width: 860px) {
  .shop-shell {
    grid-template-columns: 1fr;
  }
}

.sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.sidebar-title {
  margin: 0;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 600;
  background: linear-gradient(180deg, #fafbfc, #f0f2f5);
  border-bottom: 1px solid var(--border);
}

.cat-list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}

.cat-list button,
.cat-list a.cat-link {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border: none;
  background: none;
  font: inherit;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
}

.cat-list button:hover,
.cat-list a.cat-link:hover {
  background: #fff5f5;
  color: var(--accent);
  text-decoration: none;
}

.cat-list button.active,
.cat-list a.cat-link.active {
  background: #fff0f0;
  color: var(--accent);
  font-weight: 600;
}

.shop-main {
  min-width: 0;
}

.section-hint {
  margin: 0 0 10px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 13px;
}

/* —— 商品表 —— */
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}

.product-table-wrap {
  overflow-x: auto;
}

.product-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.product-table th,
.product-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.product-table th {
  background: #fafbfc;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.product-table tr:last-child td {
  border-bottom: none;
}

.product-table .name {
  color: var(--text);
  font-weight: 500;
  max-width: 320px;
}

.product-table .spec {
  color: var(--muted);
  white-space: nowrap;
}

.product-table .price {
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

.product-table .stock {
  color: var(--muted);
}

.btn-buy {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 4px;
  background: var(--accent);
  color: #fff !important;
  font-weight: 600;
  font-size: 12px;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-buy:hover {
  background: var(--accent-hover);
  text-decoration: none;
}

/* —— 页脚 —— */
.site-footer {
  margin-top: 32px;
  padding: 24px 16px 40px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.site-footer .links {
  margin-bottom: 12px;
}

.site-footer .links a {
  margin: 0 8px;
  color: var(--muted);
}

.site-footer .links a:hover {
  color: var(--accent);
}

.disclaimer {
  max-width: 800px;
  margin: 16px auto 0;
  text-align: left;
  line-height: 1.6;
}

/* —— 用户中心 / 登录 —— */
.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(160deg, #eef2f7 0%, #f4f6f9 50%, #e8ecf2 100%);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 24px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.auth-card h1 {
  margin: 0 0 8px;
  font-size: 20px;
}

.auth-card .sub {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13px;
}

.form-row {
  margin-bottom: 14px;
}

.form-row label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.form-row input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
}

.form-row input:focus {
  outline: none;
  border-color: #b8c0cc;
  box-shadow: 0 0 0 3px rgba(228, 57, 60, 0.12);
}

.btn-block {
  display: block;
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}

.btn-block:hover {
  background: var(--accent-hover);
}

.auth-links {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
}

.auth-links a {
  color: var(--muted);
}

.hint-box {
  padding: 14px;
  background: var(--notice-bg);
  border: 1px solid var(--notice-border);
  border-radius: var(--radius);
  font-size: 13px;
  color: #5c4f1a;
  margin-bottom: 16px;
}

.user-panel {
  max-width: 560px;
}

.user-panel dl {
  margin: 0;
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 8px 16px;
  font-size: 14px;
}

.user-panel dt {
  margin: 0;
  color: var(--muted);
}

.user-panel dd {
  margin: 0;
}

.order-empty {
  margin-top: 20px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  background: #fafbfc;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-block {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px;
}

.page-block--muted {
  background: #eef1f6;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.block-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.tools-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--muted);
  font-size: 14px;
}

.tools-list li {
  margin-bottom: 8px;
}

.divider-loud {
  text-align: center;
  margin: 16px auto;
  padding: 0 16px;
  max-width: 1180px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.order-query-inline {
  max-width: 1180px;
  margin: 0 auto 8px;
  padding: 0 16px;
}

.order-query-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.order-query-form input {
  flex: 1 1 140px;
  min-width: 120px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
}

.notice-ol {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.notice-ol li {
  margin-bottom: 8px;
}

.article-links {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
}

.article-links li {
  margin-bottom: 10px;
}

.faq-dl {
  margin: 0;
}

.faq-dl dt {
  margin: 16px 0 6px;
  font-weight: 600;
  color: var(--text);
}

.faq-dl dt:first-child {
  margin-top: 0;
}

.faq-dl dd {
  margin: 0 0 8px;
  color: var(--muted);
  padding-left: 0;
}

.article-body {
  padding: 24px;
}

.article-body h1 {
  margin: 0 0 16px;
  font-size: 22px;
}

.article-body p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.7;
}

/* —— 用户中心布局 —— */
.uc-wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 16px;
}

.uc-gate {
  max-width: 440px;
  margin: 24px auto;
  padding: 28px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

#panel {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 720px) {
  #panel {
    grid-template-columns: 1fr;
  }
}

.uc-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 0;
  position: sticky;
  top: 12px;
}

.uc-side-title {
  padding: 8px 16px 12px;
  font-weight: 700;
  font-size: 15px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.uc-nav {
  display: flex;
  flex-direction: column;
}

.uc-nav-link {
  display: block;
  padding: 10px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
}

.uc-nav-link:hover {
  background: #fff5f5;
  color: var(--accent);
  text-decoration: none;
}

.uc-nav-link.active {
  background: #fff0f0;
  color: var(--accent);
  font-weight: 600;
}

.uc-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.uc-section {
  padding: 20px 22px;
}

.uc-h2 {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 600;
}

.uc-dl {
  margin: 0;
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 8px 16px;
  font-size: 14px;
}

.uc-dl dt {
  margin: 0;
  color: var(--muted);
}

.uc-dl dd {
  margin: 0;
}

.uc-intro {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
}

.uc-phone-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.uc-phone-row input {
  flex: 1 1 180px;
  min-width: 160px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
}

.uc-msg {
  margin-top: 10px;
  font-size: 13px;
}

.uc-muted {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.uc-orders-table {
  font-size: 12px;
}

.uc-orders-table th,
.uc-orders-table td {
  padding: 10px;
}

.order-result {
  margin-top: 20px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #f8fafc;
  font-size: 14px;
}

.order-result.ok {
  border-color: #b7e4c7;
  background: #f0fdf4;
}

.order-result.err {
  border-color: #f5c2c7;
  background: #fff5f5;
  color: #842029;
}

.order-result dt {
  margin: 10px 0 4px;
  font-size: 12px;
  color: var(--muted);
}

.order-result dd {
  margin: 0;
  font-weight: 500;
  color: var(--text);
}

.order-result dd:first-of-type {
  margin-top: 0;
}

.order-loading {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}
