:root {
  --bg: #f7f7f8;
  --paper: #ffffff;
  --text: #1f2a3d;
  --mute: #64748b;
  --line: #e2e8f0;
  --primary: #1d4ed8;
  --danger: #d94837;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Microsoft YaHei", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-weight: 400;
}

.top-header {
  background-color: #fff;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.88)),
    url("./assets/pattern-corner-header.png");
  background-repeat: no-repeat;
  background-position: top center;
  background-size: 100% auto;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.top-bg {
  height: 10px;
  background: transparent;
  border-bottom: 1px solid #edf1f6;
}
.top-row {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 20px 9px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.logo-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
}
.logo-image {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
}
.logo {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #1e3a8a;
  line-height: 1;
  white-space: nowrap;
}
.top-nav { display: none; }
.top-nav a {
  text-decoration: none;
  color: var(--text);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 14px;
}
.top-nav a.active { background: #edf2ff; color: var(--primary); }
.search-box { margin-left: auto; }
.search-box input {
  width: 620px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 9px 34px 9px 12px;
  background: #fbfbfc;
  font-size: 14px;
}
.top-quick-nav {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: 10px;
}
.top-quick-nav a {
  text-decoration: none;
  color: #111827;
  font-size: 14px;
  border: 1px solid #dbe2ea;
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}
.top-quick-nav a:hover {
  color: #1d4ed8;
  border-color: #bfdbfe;
  background: #eff6ff;
}
.top-quick-nav a.active {
  color: #0f172a;
  border-color: #94a3b8;
  background: #f8fafc;
}
.inline-icon {
  width: 22px;
  height: 22px;
  vertical-align: middle;
}
.badge {
  margin-left: 4px;
  display: inline-block;
  min-width: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 999px;
  color: #fff;
  background: var(--danger);
  font-size: 11px;
}
.sub-row {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #f0f2f5;
}
.sub-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.quick-links {
  display: inline-flex;
  gap: 10px;
}
.quick-links a {
  text-decoration: none;
  color: #334155;
  font-size: 12px;
  border: 1px solid #dbe2ea;
  border-radius: 999px;
  padding: 2px 8px;
}
.quick-links a:hover {
  color: #1d4ed8;
  border-color: #bfdbfe;
  background: #eff6ff;
}
.sub-nav {
  display: flex;
  gap: 22px;
}
.sub-nav a {
  text-decoration: none;
  color: #111827;
  font-size: 15px;
  font-weight: 400;
  padding: 4px 0;
}
.sub-nav a.active {
  font-weight: 700;
}
.chain-entry {
  font-size: 15px;
  color: #111827;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chain-link {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.layout {
  max-width: 1280px;
  margin: 8px auto 24px;
  padding: 0 20px;
}
.hero-board {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 10px;
}
.hero-card {
  height: 340px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #d6dde8;
}
.hero-card.main { height: 340px; }
.hero-card.side { height: 340px; }
.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-dots {
  grid-column: 1 / -1;
  text-align: center;
  padding: 6px 0 4px;
}
.hero-dots span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #d1d5db;
  display: inline-block;
  margin: 0 3px;
  cursor: pointer;
}
.hero-dots span.active {
  background: #111827;
}
.service-head {
  margin-top: 2px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.service-head h2 {
  margin: 0;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.service-head a {
  text-decoration: none;
  color: #1e3a8a;
  font-size: 14px;
  font-weight: 600;
}
.market-title-second {
  margin-top: 20px;
}

.market-main {
  margin-top: 6px;
}
.service-main {
  margin-top: 8px;
  margin-bottom: 18px;
}
.market-content {
  padding-top: 14px;
}
.filter-inline-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}
.filter-inline-block {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 8px 0;
}
.filter-inline-block label {
  width: 40px;
  display: block;
  color: #0f172a;
  font-weight: 600;
  font-size: 15px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips button {
  border: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 14px;
  cursor: pointer;
}
.chips button.active {
  background: #eef2ff;
  color: #1e3a8a;
  border-color: #a5b4fc;
}

.content {
  background: #fff;
  border: 1px solid #e6e9ef;
  border-radius: 16px;
  padding: 10px 14px 14px;
}
.content-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  margin-top: -2px;
}
.sort {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--mute);
  font-size: 15px;
  transform: translateX(2px);
}
.sort button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 7px 11px;
  cursor: pointer;
}
.sort button.active { color: var(--primary); border-color: #bfdbfe; background: #eff6ff; }
.sort span { margin-left: 4px; color: #475569; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.product-card {
  border: none;
  border-radius: 6px;
  overflow: hidden;
  background: transparent;
}
.product-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}
.product-card h4 {
  margin: 10px 2px 6px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
}
.product-card p {
  margin: 0 2px 6px;
  color: var(--mute);
  font-size: 13px;
  line-height: 1.4;
}
.card-bottom {
  margin: 8px 2px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-bottom strong { color: #000; font-size: 32px; }
.card-bottom button {
  border: none;
  border-radius: 10px;
  background: #111827;
  color: #fff;
  cursor: pointer;
  padding: 10px 13px;
  font-size: 14px;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 22px 0 8px;
}
.pagination button {
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
}
.pagination button.active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.cart-page, .pay-success {
  max-width: 980px;
  margin: 24px auto;
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.pay-page, .profile-page {
  max-width: 1120px;
  margin: 24px auto;
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.pay-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.pay-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
}
.pay-option {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
}
.pay-modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: grid;
  place-items: center;
  z-index: 999;
}
.pay-modal {
  width: min(360px, 92vw);
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.3);
}
.pay-modal h3 {
  margin: 0 0 10px;
  font-size: 20px;
}
.qr-image {
  width: 220px;
  height: 220px;
  display: block;
  margin: 0 auto 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}
.pay-modal p {
  margin: 0 0 12px;
  color: #475569;
  font-size: 13px;
}
.profile-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
}
.profile-menu {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  display: grid;
  gap: 8px;
  height: fit-content;
}
.profile-menu button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
}
.menu-link-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 8px 10px;
  text-align: left;
  text-decoration: none;
  color: #0f172a;
  font-size: 14px;
}
.menu-link-btn:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #1e40af;
}
.profile-menu button.active {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #1e40af;
}
.profile-content {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
}
.empty { color: var(--mute); }
.cart-list { display: grid; gap: 12px; margin-bottom: 16px; }
.cart-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  display: grid;
  grid-template-columns: 100px 1fr auto;
  align-items: center;
  gap: 12px;
}
.cart-item img {
  width: 100px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
}
.meta h4 { margin: 0 0 5px; }
.meta p { margin: 0; color: #334155; }
.qty { display: flex; align-items: center; gap: 8px; }
.qty button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}
.cart-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.actions { display: flex; gap: 8px; }
.actions button {
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  padding: 10px 14px;
}
.actions .ghost {
  border: 1px solid var(--line);
  color: var(--text);
  background: #fff;
}

.pay-success {
  text-align: center;
  max-width: 560px;
}
.icon {
  width: 72px;
  height: 72px;
  line-height: 72px;
  margin: 0 auto 10px;
  border-radius: 999px;
  background: #22c55e;
  color: #fff;
  font-size: 40px;
}
.order-box {
  margin: 16px 0;
  text-align: left;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
}
.pay-success button {
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  padding: 10px 14px;
}

@media (max-width: 1160px) {
  .hero-board { grid-template-columns: 1fr; }
  .hero-card { height: 300px; }
  .service-head h2 { font-size: 28px; }
  .service-head a { font-size: 18px; }
  .filter-inline-block { align-items: flex-start; flex-direction: column; gap: 6px; }
  .filter-inline-block label { width: auto; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-box input { width: 240px; }
  .logo { font-size: 28px; }
  .sub-nav a { font-size: 16px; }
  .chain-entry { font-size: 16px; }
  .top-quick-nav { display: none; }
  .service-head h2 { font-size: 24px; }
  .product-card h4 { font-size: 17px; }
  .product-card p { font-size: 13px; }
  .pay-grid { grid-template-columns: 1fr; }
  .profile-layout { grid-template-columns: 1fr; }
  .sub-right { gap: 8px; }
  .quick-links { display: none; }
}
