/* ============================================================
   深圳市星科智联网络有限公司 · 田园农产风格样式
   配色：叶绿 / 麦穗金 / 泥土棕 / 米糠纸底
   ============================================================ */
:root {
  --primary: #3f7d43;          /* 叶片绿 */
  --primary-dark: #2c5c31;     /* 深叶绿 */
  --primary-light: #eef4e3;    /* 嫩芽 */
  --accent: #c08a2e;           /* 麦穗金 */
  --accent-light: #f7ecd6;     /* 麦糠 */
  --clay: #b4552c;             /* 陶土红 */
  --earth: #7a5a3a;            /* 泥土棕 */
  --text: #332c22;
  --text-light: #7d7466;
  --bg: #f7f2e6;
  --bg-soft: #fffdf7;
  --border: #e7dcc6;
  --border-strong: #d8c9a9;
  --shadow-sm: 0 1px 2px rgba(90, 70, 40, 0.06);
  --shadow-md: 0 6px 18px rgba(90, 70, 40, 0.08);
  --shadow-lg: 0 16px 36px rgba(70, 60, 35, 0.14);
  --radius: 6px;
  --radius-lg: 10px;
  --gradient: linear-gradient(135deg, #5b9350 0%, #3f7d43 55%, #2f6336 100%);
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
}

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

html, body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% -10%, rgba(192, 138, 46, 0.1), transparent 42%),
    radial-gradient(circle at 88% 6%, rgba(63, 125, 67, 0.07), transparent 46%),
    repeating-linear-gradient(90deg, rgba(122, 90, 58, 0.022) 0 1px, transparent 1px 5px);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary-dark); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }

img { max-width: 100%; display: block; }

::selection { background: var(--accent-light); color: var(--earth); }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ============== 顶部导航 ============== */
.topbar {
  background: rgba(253, 250, 243, 0.96);
  backdrop-filter: saturate(150%) blur(10px);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  border-top: 3px solid var(--primary-dark);
  border-bottom: 1px solid var(--border-strong);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 0 rgba(231, 220, 198, 0.5), var(--shadow-sm);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  height: 68px;
  gap: 24px;
}
.logo {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: 0.1em;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.logo::before {
  content: "";
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background: var(--gradient);
  border-radius: 50% 0 50% 50%;
  transform: rotate(-45deg);
  box-shadow: inset -2px -2px 0 rgba(0, 0, 0, 0.07);
}
.logo:hover { color: var(--primary-dark); }

.nav {
  display: flex;
  gap: 2px;
  align-items: center;
  flex: 1;
  justify-content: flex-end;
}
.nav a {
  color: var(--text);
  padding: 8px 13px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  white-space: nowrap;
}
.nav a svg { transition: transform .2s; opacity: .8; }
.nav a:hover {
  background: #f4ecda;
  color: var(--primary-dark);
}
.nav a:hover svg { transform: translateY(-1px); opacity: 1; }
.nav a.active {
  color: var(--primary-dark);
  font-weight: 700;
  background: transparent;
}
.nav a.active::after {
  content: "";
  position: absolute;
  left: 13px; right: 13px; bottom: 1px;
  height: 2px;
  background: var(--accent);
  border-radius: 0;
}

.nav .hi {
  color: var(--text-light);
  font-size: 13px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.nav-hi {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #fbf6e9;
  border: 1px dashed var(--border-strong);
  border-radius: 4px;
  color: var(--earth);
  font-size: 13px;
  font-weight: 500;
}
.nav-hi svg { color: var(--accent); }

.btn-mini {
  background: #f4ecda;
  color: var(--text-light);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  transition: all .2s;
}
.btn-mini:hover { background: var(--primary-light); color: var(--primary-dark); }

/* 购物车链接 + 角标 */
.nav-cart-link { position: relative; }
.nav-cart-link svg { stroke-width: 2.2; }
.nav-badge {
  position: absolute;
  top: -2px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--clay);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  border-radius: 999px;
  border: 2px solid #fdfaf3;
  box-sizing: content-box;
  transform: scale(0);
  transition: transform .25s cubic-bezier(.5,1.6,.4,1);
}
.nav-badge:not(.nav-badge-zero) { transform: scale(1); }
@keyframes navBadgePop {
  0%   { transform: scale(0); }
  60%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}
.nav-badge.bump { animation: navBadgePop .35s ease; }

/* 登录/注册按钮 */
.nav-login {
  color: var(--text) !important;
}
.nav-register {
  background: var(--gradient) !important;
  color: #fff !important;
  padding: 8px 20px !important;
  border-radius: 4px !important;
  box-shadow: 0 3px 0 var(--primary-dark);
}
.nav-register:hover {
  color: #fff !important;
  background: var(--primary-dark) !important;
  transform: translateY(1px);
  box-shadow: 0 2px 0 #24492a;
}
.nav-register svg { display: none; }

/* 退出登录按钮 - 明显化 */
.nav-logout {
  background: var(--clay) !important;
  color: #fff !important;
  padding: 8px 18px !important;
  border-radius: 4px !important;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 3px 0 #8f3f1f;
  letter-spacing: 0.5px;
}
.nav-logout:hover {
  background: #9c4724 !important;
  color: #fff !important;
  transform: translateY(1px);
  box-shadow: 0 2px 0 #7b3719;
}
.nav-logout:active { transform: translateY(2px); box-shadow: none; }

/* ============== 主体与底部 ============== */
main.wrap { min-height: calc(100vh - 200px); padding: 28px 20px 40px; }

.footer {
  background:
    radial-gradient(circle at 15% 0%, rgba(255, 255, 255, 0.06), transparent 45%),
    linear-gradient(180deg, #336138 0%, #24462a 100%);
  border-top: 3px solid var(--accent);
  padding: 30px 0 32px;
  text-align: center;
  color: #dbe4cf;
  font-size: 13px;
  line-height: 2;
  margin-top: 48px;
}
.footer a { color: #efe3c4; margin: 0 8px; }
.footer a:hover { color: #fff; }

/* 公安备案图标 + 链接 */
.footer .beian-police {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
}
.footer .beian-police img {
  width: 20px;
  height: auto;
  display: block;
}

/* ============== 首页 Hero ============== */
.hero {
  position: relative;
  background:
    radial-gradient(120% 100% at 88% 6%, rgba(247, 236, 214, 0.22), transparent 58%),
    repeating-linear-gradient(105deg, rgba(255, 255, 255, 0.045) 0 2px, transparent 2px 18px),
    linear-gradient(135deg, #4d8849 0%, #356b3a 52%, #27512e 100%);
  color: #fff;
  padding: 58px 44px 62px;
  border-radius: var(--radius-lg);
  margin-bottom: 34px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 40px rgba(45, 70, 40, 0.22);
}
/* 左上暖阳 */
.hero::before {
  content: "";
  position: absolute;
  top: -70px; right: -50px;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(246, 224, 174, 0.55), rgba(246, 224, 174, 0.12) 55%, transparent 68%);
  border-radius: 50%;
}
/* 底部梯田弧线 */
.hero::after {
  content: "";
  position: absolute;
  left: -12%; right: -12%; bottom: -46%;
  height: 92%;
  background: repeating-radial-gradient(ellipse at 50% 100%,
      rgba(255, 255, 255, 0.07) 0 2px,
      rgba(255, 255, 255, 0) 2px 24px);
  border-radius: 50% 50% 0 0;
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero .hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.28em;
  color: #f0dfb4;
  margin-bottom: 16px;
}
.hero .hero-kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: rgba(240, 223, 180, 0.75);
}
.hero h1 {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-shadow: 0 2px 10px rgba(20, 40, 20, 0.18);
}
.hero p {
  font-size: 15px;
  color: #e7edd9;
  max-width: 560px;
}
.hero .hero-cta {
  margin-top: 26px;
  display: inline-block;
  background: #f7ecd2;
  color: var(--primary-dark);
  padding: 12px 30px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.04em;
  position: relative;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 4px 0 rgba(192, 138, 46, 0.9);
}
.hero .hero-cta:hover {
  transform: translateY(2px);
  color: var(--primary-dark);
  box-shadow: 0 2px 0 rgba(192, 138, 46, 0.9);
}

/* ============== 区块标题 ============== */
.sec-title {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 700;
  color: var(--text);
  margin: 8px 0 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 0.08em;
}
.sec-title::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background: var(--gradient);
  border-radius: 50% 0 50% 0;
  transform: rotate(-45deg);
}
.sec-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--border-strong) 0 8px, transparent 8px 16px);
}

/* ============== 商品卡片网格 ============== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
}
/* 前台商品信息：固定横向三列 */
.grid.product-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 900px) {
  .grid.product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}
@media (max-width: 480px) {
  .grid.product-grid {
    grid-template-columns: 1fr;
  }
}
.card {
  background: var(--bg-soft);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s, border-color .25s;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}
.card .img {
  width: 100%;
  aspect-ratio: 1/1;
  background: #f2ead8;
  object-fit: cover;
  transition: transform .4s;
}
.card:hover .img { transform: scale(1.04); }
.card .img-wrap { overflow: hidden; position: relative; background: #f2ead8; }
.card .img-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(122, 90, 58, 0.06);
  pointer-events: none;
}
.card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.card .name {
  font-size: 14px;
  color: var(--text);
  height: 44px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.55;
}
.card .price {
  color: var(--clay);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 21px;
  margin: 8px 0 12px;
  letter-spacing: 0.02em;
}
.card .price::before {
  content: "";
  display: block;
  width: 26px;
  height: 1px;
  margin-bottom: 8px;
  background: repeating-linear-gradient(90deg, var(--border-strong) 0 4px, transparent 4px 8px);
}
.card .btn {
  margin-top: auto;
  text-align: center;
  background: var(--primary);
  color: #fff;
  padding: 9px 0;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  transition: all .2s;
  box-shadow: 0 3px 0 var(--primary-dark);
}
.card .btn:hover {
  color: #fff;
  background: var(--primary-dark);
  transform: translateY(1px);
  box-shadow: 0 2px 0 #24492a;
}

/* ============== 通用按钮 ============== */
.btn {
  display: inline-block;
  padding: 9px 20px;
  background: var(--primary);
  color: #fff;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  transition: all .2s;
  box-shadow: 0 3px 0 var(--primary-dark), 0 5px 12px rgba(47, 90, 52, 0.14);
}
.btn:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(1px);
  box-shadow: 0 2px 0 #24492a, 0 3px 8px rgba(47, 90, 52, 0.16);
}
.btn:active { transform: translateY(2px); box-shadow: none; }
.btn.gray {
  background: #eae1cd;
  color: #6d6454;
  box-shadow: 0 3px 0 #d2c6ab;
}
.btn.gray:hover { background: #ddd1b6; color: #5c5446; box-shadow: 0 2px 0 #c4b697; }
.btn.danger {
  background: var(--clay);
  box-shadow: 0 3px 0 #8f3f1f;
}
.btn.danger:hover { background: #9c4724; box-shadow: 0 2px 0 #7b3719; }
.btn-outline {
  background: transparent;
  color: var(--primary-dark);
  border: 1.5px solid var(--primary);
  box-shadow: none;
}
.btn-outline:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
  transform: none;
  box-shadow: none;
}
.btn-lg { padding: 12px 32px; font-size: 16px; }
.btn-block { display: block; width: 100%; }

/* ============== 表单 ============== */
.form {
  position: relative;
  background: var(--bg-soft);
  padding: 34px 32px 28px;
  border-radius: var(--radius-lg);
  max-width: 440px;
  margin: 30px auto;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}
.form::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  border-radius: 10px 10px 0 0;
  background: var(--gradient);
}
.form h2 {
  margin-bottom: 22px;
  text-align: center;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.form-row { margin-bottom: 16px; }
.form-row label {
  display: block;
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 6px;
  font-weight: 500;
}
.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  font-size: 14px;
  background: #fdfaf1;
  color: var(--text);
  transition: all .2s;
  font-family: inherit;
}
.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--primary);
  background: #fffdf7;
  box-shadow: 0 0 0 3px rgba(63, 125, 67, 0.12);
}
.form-row textarea { height: 100px; resize: vertical; }
.form .btn { width: 100%; padding: 12px; font-size: 15px; }
.form .alt {
  text-align: center;
  font-size: 13px;
  color: var(--text-light);
  margin-top: 14px;
}
.form .alt a { font-weight: 500; }

/* ============== 表格 ============== */
.table {
  width: 100%;
  background: var(--bg-soft);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.table th, .table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 14px;
}
.table th {
  background: #f3ead7;
  font-weight: 700;
  color: var(--earth);
  font-size: 13px;
  letter-spacing: 0.04em;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fbf6ea; }

/* ============== 商品详情 ============== */
.detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  background: var(--bg-soft);
  padding: 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}
.detail .img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 6px;
  background: #f2ead8;
  border: 1px solid var(--border);
}
.detail h1 {
  font-family: var(--serif);
  font-size: 27px;
  margin-bottom: 14px;
  line-height: 1.45;
  letter-spacing: 0.04em;
}
.detail .price {
  color: var(--clay);
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 800;
  margin: 16px 0;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--border-strong);
  letter-spacing: -0.5px;
}
.detail .merchant {
  background: #f7f0df;
  padding: 14px 16px;
  border-radius: 6px;
  margin: 16px 0;
  font-size: 14px;
  color: var(--text-light);
}
.detail .merchant strong { color: var(--text); }
.detail .desc {
  margin-top: 20px;
  line-height: 1.9;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}
.detail .actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.detail .qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  overflow: hidden;
  background: #fffdf7;
}
.detail .qty button {
  width: 36px;
  height: 38px;
  border: 0;
  background: #f3ead7;
  cursor: pointer;
  font-size: 16px;
  color: var(--text);
  transition: background .2s;
}
.detail .qty button:hover { background: var(--primary-light); color: var(--primary-dark); }
.detail .qty input {
  width: 56px;
  height: 38px;
  text-align: center;
  border: 0;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  font-size: 14px;
  background: #fffdf7;
}

/* ============== 提示与标签 ============== */
.alert {
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 14px;
  border-left: 4px solid;
}
.alert.ok {
  background: #edf5e3;
  color: #3f7d43;
  border-color: #4f8a3b;
}
.alert.err {
  background: #fae9e2;
  color: #b4552c;
  border-color: var(--clay);
}
.alert.info {
  background: #edf2ef;
  color: #2f6a60;
  border-color: #4e8b7d;
}

.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 500;
}
.tag.user { background: #e9f1ea; color: #3f7d43; }
.tag.merchant { background: #f7ecd5; color: #a9761f; }
.tag.admin { background: #efe6db; color: var(--earth); }
.tag.on { background: #edf5e3; color: #4c7a34; }
.tag.off { background: #efe9dc; color: var(--text-light); }
.tag.pending { background: #fbf0d5; color: #a9761f; }
.tag.approved { background: #edf5e3; color: #4c7a34; }
.tag.rejected { background: #fae9e2; color: #b4552c; }

/* ============== 购物车 ============== */
.cart-table .qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  overflow: hidden;
}
.cart-table .qty input {
  width: 54px;
  text-align: center;
  padding: 6px;
  border: 0;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  font-size: 14px;
  background: #fffdf7;
}
.cart-table .qty button {
  width: 30px;
  height: 32px;
  border: 0;
  background: #f3ead7;
  cursor: pointer;
  font-size: 15px;
  color: var(--text);
  transition: all .2s;
}
.cart-table .qty button:hover { background: var(--primary-light); color: var(--primary-dark); }

.cart-summary {
  background: var(--bg-soft);
  padding: 22px 26px;
  border-radius: 6px;
  margin-top: 20px;
  text-align: right;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.cart-summary .label { color: var(--text-light); font-size: 14px; }
.cart-summary .total {
  font-family: var(--serif);
  font-size: 28px;
  color: var(--clay);
  font-weight: 800;
  margin-left: 12px;
  letter-spacing: -0.5px;
}
.cart-summary .btn { margin-left: 20px; }

/* ============== 商品列表页筛选/搜索 ============== */
.toolbar {
  background: var(--bg-soft);
  padding: 16px 20px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  flex-wrap: wrap;
}
.toolbar form { display: flex; gap: 10px; flex: 1; }
.toolbar input[type="text"] {
  flex: 1;
  padding: 9px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  font-size: 14px;
  background: #fdfaf1;
  min-width: 0;
}
.toolbar input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
  background: #fffdf7;
  box-shadow: 0 0 0 3px rgba(63, 125, 67, 0.12);
}

/* ============== 空状态 ============== */
.empty {
  background: var(--bg-soft);
  border-radius: 6px;
  padding: 60px 20px;
  text-align: center;
  color: var(--text-light);
  border: 1px dashed var(--border-strong);
}
.empty .icon {
  font-size: 44px;
  margin-bottom: 12px;
  opacity: 0.6;
}

/* ============== 后台 ============== */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
  background: #f4efe2;
}
.admin-side {
  background:
    radial-gradient(circle at 100% 0%, rgba(192, 138, 46, 0.16), transparent 55%),
    linear-gradient(180deg, #336138 0%, #24462a 100%);
  color: #fff;
  padding: 22px 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.admin-side h2 {
  text-align: center;
  padding: 0 20px 18px;
  border-bottom: 1px solid rgba(243, 230, 199, 0.18);
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #f3e6c7;
  margin: 0 16px 18px;
}
.admin-side a {
  display: block;
  color: #cad7c0;
  padding: 12px 22px;
  font-size: 14px;
  border-left: 3px solid transparent;
  transition: all .2s;
}
.admin-side a:hover,
.admin-side a.active {
  background: rgba(243, 230, 199, 0.1);
  color: #fff;
  border-left-color: var(--accent);
}
.admin-main { padding: 24px; min-width: 0; }
.admin-top {
  background: var(--bg-soft);
  padding: 16px 22px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  font-weight: 600;
}
.admin-card {
  background: var(--bg-soft);
  padding: 22px;
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.pagination {
  margin: 20px 0;
  text-align: center;
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}
.pagination a,
.pagination span {
  display: inline-block;
  padding: 7px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  font-size: 13px;
  color: var(--text);
  transition: all .2s;
  min-width: 36px;
  text-align: center;
}
.pagination a:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-dark);
}
.pagination .current {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  font-weight: 700;
}

/* ============== 统计卡片 ============== */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--bg-soft);
  padding: 20px;
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--gradient);
}
.stat-card .label {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 6px;
}
.stat-card .value {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
}

/* ============== 响应式 ============== */
@media (max-width: 1080px) {
  .topbar .wrap { gap: 14px; }
  .logo { font-size: 20px; letter-spacing: 0.06em; }
  .nav a { padding: 7px 9px; font-size: 13px; }
  .nav-apply, .nav-merchant-login, .nav-merchant { padding: 6px 10px; }
}

@media (max-width: 768px) {
  .topbar .wrap { height: 60px; gap: 8px; }
  .logo { font-size: 19px; gap: 7px; letter-spacing: 0.06em; }
  .logo::before { width: 16px; height: 16px; }
  .nav { gap: 2px; }
  .nav a { padding: 6px 8px; font-size: 12px; }
  .nav a span { display: none; }
  .nav a svg { display: inline-block; }
  .nav-register { display: inline-flex !important; padding: 6px 12px !important; }
  .nav-hi { padding: 6px 8px; }
  .nav-hi span { display: inline; font-size: 12px; }
  .nav-logout { padding: 8px !important; }
  .nav-logout span { display: none; }
  .hero { padding: 40px 24px 44px; }
  .hero h1 { font-size: 25px; }
  .hero p { font-size: 14px; }
  .detail { grid-template-columns: 1fr; padding: 20px; gap: 20px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .card .name { font-size: 13px; height: 40px; }
  .card .price { font-size: 18px; }
  .form { margin: 20px 12px; padding: 26px 20px; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; }
  .admin-main { padding: 16px; }
}

/* ============== 动画 ============== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.card, .form, .detail, .admin-card { animation: fadeIn .4s ease; }

/* ============== 商品介绍区（前台底部） ============== */
.detail-intro {
  background: var(--bg-soft);
  border-radius: var(--radius-lg);
  padding: 28px 32px 36px;
  margin-top: 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}
.detail-intro .sec-title { margin: 0 0 18px; }
.detail-intro-body {
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
  word-break: break-word;
}
.detail-intro-body p { margin: 0 0 12px; }
.detail-intro-body h1,
.detail-intro-body h2,
.detail-intro-body h3,
.detail-intro-body h4 {
  margin: 22px 0 12px;
  font-family: var(--serif);
  font-weight: 700;
  color: var(--text);
}
.detail-intro-body h1 { font-size: 22px; }
.detail-intro-body h2 { font-size: 19px; }
.detail-intro-body h3 { font-size: 17px; }
.detail-intro-body ul,
.detail-intro-body ol {
  padding-left: 24px;
  margin: 0 0 14px;
}
.detail-intro-body li { margin-bottom: 4px; }
.detail-intro-body img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 8px 0;
  display: block;
  border: 1px solid var(--border);
}
.detail-intro-body a {
  color: var(--primary-dark);
  text-decoration: underline;
}
.detail-intro-body blockquote {
  border-left: 4px solid var(--accent);
  background: #faf3e2;
  margin: 12px 0;
  padding: 10px 16px;
  border-radius: 0 4px 4px 0;
  color: var(--text);
}
.detail-intro-body .muted,
.muted { color: var(--text-light); text-align: center; padding: 20px 0; }

/* ============== 富文本编辑器 ============== */
.rt-wrap {
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: #fffdf7;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.rt-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(63, 125, 67, 0.1);
}
.rt-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 6px 8px;
  background: #f6efdd;
  border-bottom: 1px solid var(--border);
  border-radius: 4px 4px 0 0;
}
.rt-btn {
  min-width: 32px;
  height: 30px;
  padding: 0 8px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.rt-btn:hover {
  background: #fffdf7;
  border-color: var(--border-strong);
  color: var(--primary-dark);
}
.rt-btn:active { transform: scale(0.96); }
.rt-sep {
  width: 1px;
  background: var(--border-strong);
  margin: 4px 4px;
  align-self: stretch;
}
.rt-content {
  min-height: 220px;
  padding: 14px 16px;
  outline: none;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  background: #fffdf7;
}
.rt-content:empty::before {
  content: attr(data-placeholder);
  color: #a4b0be;
  pointer-events: none;
}
.rt-content h1, .rt-content h2, .rt-content h3 { margin: 14px 0 8px; font-family: var(--serif); }
.rt-content p { margin: 0 0 10px; }
.rt-content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 6px 0;
  display: block;
}
.rt-content ul, .rt-content ol { padding-left: 24px; margin: 0 0 10px; }
.rt-content blockquote {
  border-left: 3px solid var(--accent);
  background: #faf3e2;
  margin: 10px 0;
  padding: 6px 12px;
  border-radius: 0 4px 4px 0;
}
.rt-content a { color: var(--primary-dark); text-decoration: underline; }

/* ============== .rt-editor（同 .rt-content 样式，给 merchant/products.php 用）============== */
.rt-editor {
  min-height: 220px;
  padding: 14px 16px;
  outline: none;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  background: #fffdf7;
  border-radius: 0 0 4px 4px;
  word-break: break-word;
}
.rt-editor:empty::before {
  content: attr(data-placeholder);
  color: #a4b0be;
  pointer-events: none;
}
.rt-editor h1, .rt-editor h2, .rt-editor h3 { margin: 14px 0 8px; font-family: var(--serif); }
.rt-editor p { margin: 0 0 10px; }
.rt-editor img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 6px 0;
  display: block;
}
.rt-editor ul, .rt-editor ol { padding-left: 24px; margin: 0 0 10px; }
.rt-editor blockquote {
  border-left: 3px solid var(--accent);
  background: #faf3e2;
  margin: 10px 0;
  padding: 6px 12px;
  border-radius: 0 4px 4px 0;
}
.rt-editor a { color: var(--primary-dark); text-decoration: underline; }

/* ============== Modal 弹窗 ============== */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(40, 34, 22, .5);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  animation: maskIn .2s ease;
}
.modal-mask[hidden] { display: none; }
@keyframes maskIn { from { opacity: 0 } to { opacity: 1 } }

.modal {
  background: var(--bg-soft);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(40, 30, 15, .24);
  width: 92%;
  max-width: 440px;
  max-height: 90vh;
  overflow: hidden;
  display: flex; flex-direction: column;
  animation: modalIn .25s cubic-bezier(.22,1.4,.36,1);
}
.modal-md { max-width: 480px; }
.modal-sm { max-width: 380px; }
.modal-lg { max-width: 680px; }
@keyframes modalIn {
  from { transform: translateY(20px) scale(.96); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  background: #f8f1e0;
}
.modal-title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.06em;
}
.modal-close {
  background: transparent;
  border: 0;
  font-size: 24px;
  line-height: 1;
  width: 30px; height: 30px;
  border-radius: 50%;
  color: var(--text-light);
  cursor: pointer;
  transition: all .15s;
}
.modal-close:hover { background: var(--primary-light); color: var(--primary-dark); }

.modal-body {
  padding: 22px;
  overflow: auto;
}
.modal-body .form-row { margin-bottom: 14px; }
.modal-body .form-row:last-child { margin-bottom: 0; }
.modal-body .form-row label {
  display: block;
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 6px;
}
.modal-body input[type=text],
.modal-body input[type=tel],
.modal-body textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  font-size: 14px;
  color: var(--text);
  background: #fdfaf1;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
.modal-body input:focus,
.modal-body textarea:focus {
  border-color: var(--primary);
  outline: none;
  background: #fffdf7;
  box-shadow: 0 0 0 3px rgba(63, 125, 67, .1);
}
.modal-body textarea { resize: vertical; min-height: 64px; }

.modal-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  background: #fbf6e9;
  margin: 0;
}
.modal-foot .btn { margin: 0; }

/* 付款二维码 */
.pay-body { padding: 22px 22px 8px; text-align: center; }
.pay-amount { margin-bottom: 14px; }
.pay-amount small { color: var(--text-light); font-size: 12px; }
.pay-amount .num {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 800;
  color: var(--clay);
  margin-top: 4px;
  letter-spacing: -.5px;
}
.pay-qr {
  width: 240px; height: 240px;
  margin: 0 auto 12px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(90, 70, 40, .06);
}
.pay-qr img { width: 100%; height: 100%; object-fit: contain; }
.pay-qr-box {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.6;
}
.pay-qr-box.ready { background: #fff; }
.pay-qr-box svg { width: 100%; height: 100%; display: block; }
.pay-status {
  text-align: center;
  font-size: 13px;
  color: var(--primary-dark);
  background: var(--primary-light);
  border: 1px solid #d8e6c8;
  border-radius: 4px;
  padding: 8px 12px;
  margin-bottom: 12px;
}
.pay-no {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 12px;
  word-break: break-all;
}
.pay-tips {
  text-align: left;
  background: #fbf1da;
  color: #8a6a34;
  border-radius: 4px;
  padding: 10px 14px 10px 28px;
  margin: 0 0 14px;
  font-size: 12px;
  line-height: 1.7;
  list-style: disc;
}
.pay-tips li { margin: 2px 0; }
.pay-body .modal-foot { border-top: 1px solid var(--border); }

/* ============== 商家入驻表单 fieldset ============== */
.form-fs {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px 20px 6px;
  margin: 0 0 18px;
  background: #fbf6e9;
}
.form-fs legend {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-dark);
  padding: 0 8px;
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  padding: 3px 12px;
}
.form-fs .form-row { margin-bottom: 14px; }
.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }

/* ============== 商家中心 ============== */
.merchant-shop {
  padding: 10px 14px 14px;
  margin: 6px 12px 14px;
  background: rgba(243, 230, 199, 0.12);
  border-radius: 4px;
  border: 1px dashed rgba(243, 230, 199, 0.35);
}
.merchant-shop .name { font-weight: 700; font-size: 14px; color: #f3e6c7; }
.merchant-shop .sub { font-size: 12px; color: #b9c9ae; margin-top: 4px; }
.merchant-side-bottom {
  position: absolute;
  bottom: 16px; left: 12px; right: 12px;
  display: flex; flex-direction: column;
  gap: 4px;
}
.merchant-side-bottom a {
  padding: 6px 12px;
  font-size: 12px;
  color: #b9c9ae;
  text-decoration: none;
  border-radius: 3px;
}
.merchant-side-bottom a:hover { background: rgba(243, 230, 199, 0.12); color: #fff; }
.merchant-side-bottom a.danger { color: #e8b49a; }
.merchant-side-bottom a.danger:hover { background: rgba(180, 85, 44, .25); }

.merchant-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
}
.merchant-stats .stat-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 4px;
  padding: 16px 18px;
  text-align: center;
  transition: transform .15s, box-shadow .15s;
}
.merchant-stats .stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.merchant-stats .stat-card.ok   { border-left-color: #4f8a3b; }
.merchant-stats .stat-card.gray { border-left-color: #a89c86; }
.merchant-stats .stat-card.warn { border-left-color: var(--accent); }
.merchant-stats .num { font-family: var(--serif); font-size: 26px; font-weight: 800; color: var(--text); }
.merchant-stats .lab { font-size: 12px; color: var(--text-light); margin-top: 4px; }

.table.info th, .table.info td { background: transparent; }
.table.info th { width: 100px; color: var(--text-light); font-weight: 600; }

/* 导航上的商家按钮（已审核） */
.nav-merchant {
  background: linear-gradient(135deg, #c8963e, #a9761f);
  color: #fff !important;
  border-radius: 4px;
  padding: 6px 14px;
  margin-left: 4px;
}
.nav-merchant:hover { background: linear-gradient(135deg, #b98733, #96691a); color: #fff !important; }
.nav-merchant-pending { color: #a89c86; padding: 6px 14px; }
.nav-apply, .nav-merchant-login {
  border: 1px dashed var(--primary);
  color: var(--primary-dark) !important;
  border-radius: 4px;
  padding: 6px 14px;
  margin-left: 4px;
  background: var(--primary-light);
}
.nav-apply:hover, .nav-merchant-login:hover {
  background: var(--primary);
  color: #fff !important;
}

/* ============== 注册页：协议勾选 ============== */
.form-agree {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 13px;
  color: var(--text-light);
  margin: 4px 0 16px;
  padding: 10px 12px;
  background: #fbf6e9;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
}
.form-agree input[type=checkbox] {
  width: 16px;
  height: 16px;
  margin-right: 4px;
  accent-color: var(--primary);
  cursor: pointer;
}
.form-agree a {
  color: var(--primary-dark);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s;
}
.form-agree a:hover { border-color: var(--accent); }

/* ============== 法律页面 ============== */
.legal-doc {
  background: var(--bg-soft);
  border-radius: var(--radius-lg);
  padding: 32px 40px 36px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  max-width: 880px;
  margin: 24px auto;
  line-height: 1.85;
  color: var(--text);
}
.legal-meta {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
}
.legal-tag {
  display: inline-block;
  padding: 2px 10px;
  background: var(--accent-light);
  color: #a9761f;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
}
.legal-h1 {
  text-align: center;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
  margin: 8px 0 24px;
  letter-spacing: 0.08em;
  position: relative;
  padding-bottom: 18px;
}
.legal-h1::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 64px; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
}
.legal-lead {
  background: #fbf1da;
  color: #8a6a34;
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  padding: 12px 16px;
  font-size: 14px;
  margin: 0 0 24px;
}
.legal-doc h2 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  margin: 28px 0 10px;
  padding-left: 12px;
  border-left: 4px solid var(--primary);
  line-height: 1.4;
}
.legal-doc ol {
  padding-left: 24px;
  margin: 0 0 12px;
}
.legal-doc ol > li {
  margin-bottom: 6px;
}
.legal-doc ol ol,
.legal-doc ol ul {
  margin: 6px 0 4px;
  padding-left: 22px;
}
.legal-doc ul {
  list-style: disc;
  padding-left: 22px;
  margin: 6px 0;
}
.legal-doc p { margin: 0 0 10px; }
.legal-foot {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px dashed var(--border-strong);
}
.legal-foot .btn { margin: 0; }
@media (max-width: 600px) {
  .legal-doc { padding: 22px 18px; }
  .legal-h1 { font-size: 22px; }
}

/* ============== 商品详情里的商家卡片（可点击进入店铺） ============== */
.detail .merchant-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f7f0df;
  padding: 14px 16px;
  border-radius: 4px;
  margin: 16px 0;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: background .2s, border-color .2s, transform .2s;
}
.detail .merchant-link:hover {
  background: #fbf6e9;
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-1px);
}
.detail .merchant-main { flex: 1; min-width: 0; }
.detail .merchant-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 4px;
}
.detail .merchant-desc {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.detail .merchant-desc.muted { color: #a89c86; }
.detail .merchant-go {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
}

/* ============== 店铺主页 ============== */
.shop-header {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
  background-image:
    radial-gradient(90% 130% at 100% 0%, rgba(192, 138, 46, 0.12), transparent 60%),
    linear-gradient(135deg, #f6efdd 0%, #fffdf7 62%);
}
.shop-header-main {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}
.shop-avatar {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 50% 0 50% 0;
  background: var(--gradient);
  color: #fff;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 3px #fffdf7, 0 0 0 4px var(--accent-light), var(--shadow-sm);
}
.shop-info { flex: 1; min-width: 0; }
.shop-name {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--text);
  letter-spacing: 0.04em;
}
.shop-desc {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.7;
  margin: 0 0 14px;
  white-space: pre-wrap;
  word-break: break-word;
}
.shop-desc.muted { color: #a89c86; }
.shop-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 13px;
  color: var(--text-light);
}
.shop-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  background: var(--accent-light);
  color: #a9761f;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
}

@media (max-width: 600px) {
  .shop-header { padding: 20px 18px; }
  .shop-header-main { gap: 14px; }
  .shop-avatar { width: 52px; height: 52px; font-size: 22px; }
  .shop-name { font-size: 20px; }
  .detail .merchant-link { padding: 12px 14px; }
  .detail .merchant-go { display: none; }
}

/* ============== 结算弹窗：支付方式 ============== */
.pay-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}
.pay-method { display: block; cursor: pointer; }
.pay-method input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.pay-method-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 14px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: #fffdf7;
  transition: border-color .2s, background .2s, transform .2s;
  text-align: center;
}
.pay-method:hover .pay-method-card {
  border-color: var(--accent);
  background: #fbf6e9;
}
.pay-method input[type="radio"]:checked + .pay-method-card {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 2px rgba(63, 125, 67, .18) inset;
}
.pay-method input[type="radio"]:focus-visible + .pay-method-card {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.pay-method-icon { font-size: 24px; line-height: 1; }
.pay-method-title { font-weight: 700; color: var(--text); font-size: 14px; }
.pay-method-sub   { font-size: 12px; color: var(--text-light); }

@media (max-width: 480px) {
  .pay-methods { grid-template-columns: 1fr; }
}

/* ============== 支付凭证预览 ============== */
.pay-proof-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 8px 12px;
  background: var(--accent-light);
  border: 1px dashed var(--accent);
  border-radius: 4px;
  color: #8a6a34;
  font-size: 13px;
}
.pay-proof-preview img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #fff;
  background: #fff;
}
.pay-proof-preview span { font-weight: 600; }

/* ============== 商家订单 / 交易记录 ============== */
.order-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 14px 0 4px;
}
.order-detail-block {
  background: #f8f2e3;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 14px 16px;
}
.order-detail-block h4 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--earth);
  letter-spacing: 0.04em;
}
.order-detail-block p {
  margin: 0 0 4px;
  font-size: 14px;
  color: var(--text);
  word-break: break-word;
}

.order-ship-form {
  background: #fbf4e2;
  border: 1px solid #ecdcb6;
  border-radius: 4px;
  padding: 16px 20px 18px;
  max-width: 520px;
  margin-top: 8px;
}
.order-ship-form .form-row { margin-bottom: 12px; }
.order-ship-form .form-row label {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 4px;
}

.btn.ok {
  background: #5c8b3a;
  box-shadow: 0 3px 0 #456b2a;
}
.btn.ok:hover {
  background: #4f7a30;
  color: #fff;
  box-shadow: 0 2px 0 #3a5c24;
}

.merchant-stats .stat-card.ok .num { color: #4c7a34; }
.merchant-stats .stat-card.warn .num { color: #a9761f; }

/* ============== 前台商品分类筛选 ============== */
.cat-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  padding: 12px 18px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}
.cat-filter-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-right: 6px;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: .06em;
}
.cat-filter-label::before {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50% 0 50% 0;
  transform: rotate(-45deg);
  background: var(--gradient);
}
.cat-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 18px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: #f6efde;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  text-decoration: none;
  transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}
.cat-chip:hover {
  background: #efe4c9;
  color: var(--primary-dark);
  transform: translateY(-1px);
}
.cat-chip.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 3px 0 var(--primary-dark);
}
.cat-chip.active:hover {
  background: var(--primary-dark);
  color: #fff;
}

/* ============== 商家入驻顶部介绍 ============== */
.apply-intro {
  max-width: 680px;
  margin: 8px auto 0;
}
.apply-intro h2 {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.apply-intro p.muted { text-align: left; padding: 0 0 14px; }

/* ============== 商家列表与入驻 ============== */
.merchants-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 36px 40px;
  margin-bottom: 18px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 92% 8%, rgba(247, 236, 214, .2), transparent 36%),
    repeating-linear-gradient(105deg, rgba(255, 255, 255, .035) 0 2px, transparent 2px 18px),
    var(--gradient);
  box-shadow: var(--shadow-md);
}
.merchants-kicker,
.merchant-join-kicker {
  display: block;
  margin-bottom: 8px;
  color: #f0dfb4;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .22em;
}
.merchants-hero h1 {
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: 30px;
  letter-spacing: .06em;
}
.merchants-hero p { color: #e7edd9; font-size: 14px; }
.merchants-hero .btn { flex-shrink: 0; background: #f7ecd2; color: var(--primary-dark); box-shadow: 0 3px 0 var(--accent); }
.merchants-hero .btn:hover { color: var(--primary-dark); background: #fff8e8; }
.merchants-count { margin-top: 16px; color: #e7edd9; font-size: 13px; }
.merchants-count strong { margin-right: 5px; color: #f7e6b9; font-family: var(--serif); font-size: 24px; }

.merchant-process {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-bottom: 28px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--border);
}
.merchant-process > div {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  padding: 14px 20px;
  background: var(--bg-soft);
}
.merchant-process span {
  grid-row: 1 / 3;
  align-self: center;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 700;
}
.merchant-process strong { font-size: 14px; }
.merchant-process small { color: var(--text-light); font-size: 12px; }

.merchant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.merchant-card {
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-soft);
  box-shadow: var(--shadow-sm);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.merchant-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow-md); }
.merchant-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.merchant-card-head .shop-avatar { width: 52px; height: 52px; font-size: 22px; }
.merchant-card-title { min-width: 0; }
.merchant-card-title h3 {
  overflow: hidden;
  margin-bottom: 5px;
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: .03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.merchant-card-desc {
  min-height: 48px;
  margin-bottom: 14px;
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.merchant-card-desc.muted { padding: 0; text-align: left; color: #a89c86; }
.merchant-scope {
  padding: 10px 12px;
  margin-bottom: 18px;
  border-left: 3px solid var(--accent);
  border-radius: 0 4px 4px 0;
  background: #faf3e2;
}
.merchant-scope span { display: block; margin-bottom: 2px; color: var(--text-light); font-size: 12px; }
.merchant-scope p { font-size: 13px; line-height: 1.6; word-break: break-word; }
.merchant-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--border-strong);
  color: var(--text-light);
  font-size: 13px;
}
.merchant-card-foot strong { color: var(--clay); font-family: var(--serif); font-size: 18px; }
.merchant-card-foot .btn { flex-shrink: 0; padding: 7px 14px; }
.merchants-empty p { margin-bottom: 16px; }

.merchant-join {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 36px;
  padding: 28px 32px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 100% 0%, rgba(192, 138, 46, .14), transparent 42%),
    linear-gradient(135deg, #f6efdd, #fffdf7);
}
.merchant-join-kicker { color: var(--accent); }
.merchant-join h2 { margin-bottom: 6px; font-family: var(--serif); font-size: 23px; letter-spacing: .05em; }
.merchant-join p { color: var(--text-light); font-size: 14px; }
.merchant-join-actions { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.merchant-join-link { color: var(--primary-dark); font-size: 14px; font-weight: 600; white-space: nowrap; }

@media (max-width: 768px) {
  .merchants-hero { align-items: flex-start; padding: 28px 24px; }
  .merchants-hero h1 { font-size: 25px; }
  .merchant-process > div { padding: 12px; column-gap: 8px; }
  .merchant-process small { display: none; }
  .merchant-join { align-items: flex-start; padding: 24px; }
  .merchant-join-actions { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (max-width: 600px) {
  .merchants-hero, .merchant-join { flex-direction: column; }
  .merchant-process { grid-template-columns: 1fr; }
  .merchant-process small { display: block; }
  .merchant-grid { grid-template-columns: 1fr; }
}

/* ============== 店铺营业执照 ============== */
.shop-license {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-soft);
  box-shadow: var(--shadow-sm);
}
.shop-license-info h2 {
  margin-bottom: 6px;
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: .05em;
}
.shop-license-info p { color: var(--text-light); font-size: 13px; }
.shop-license-image {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  padding: 10px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 600;
  transition: border-color .2s, box-shadow .2s;
}
.shop-license-image:hover { border-color: var(--accent); color: var(--primary-dark); box-shadow: var(--shadow-md); }
.shop-license-image img {
  width: 180px;
  height: 120px;
  object-fit: contain;
  border-radius: 3px;
  background: #faf7ef;
}
.shop-license-empty { color: var(--text-light); font-size: 14px; }

@media (max-width: 600px) {
  .shop-license { align-items: flex-start; flex-direction: column; padding: 18px; }
  .shop-license-image { width: 100%; box-sizing: border-box; }
  .shop-license-image img { width: 150px; height: 100px; }
}

/* ============== 个人中心 ============== */
.uc-hero {
  margin-bottom: 20px;
  padding: 30px 34px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #fff;
  background:
    radial-gradient(circle at 92% 10%, rgba(247, 236, 214, .22), transparent 38%),
    repeating-linear-gradient(105deg, rgba(255, 255, 255, .035) 0 2px, transparent 2px 18px),
    var(--gradient);
  box-shadow: var(--shadow-md);
}
.uc-hero-main {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.uc-avatar {
  width: 66px; height: 66px;
  flex-shrink: 0;
  border-radius: 50% 0 50% 0;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .3);
  color: #fff;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.uc-hero-info { flex: 1; min-width: 200px; }
.uc-hello {
  color: #f0dfb4;
  font-size: 12px;
  letter-spacing: .2em;
}
.uc-name {
  margin: 4px 0 8px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: .05em;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.uc-name .tag { background: rgba(255, 255, 255, .18); color: #fff; }
.uc-meta {
  display: flex; flex-wrap: wrap; gap: 6px 20px;
  color: #e7edd9; font-size: 13px;
}
.uc-dot {
  display: inline-block;
  width: 5px; height: 5px;
  margin-right: 8px;
  border-radius: 50%;
  background: #f0dfb4;
  vertical-align: middle;
}
.uc-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.uc-hero-actions .btn { background: #f7ecd2; color: var(--primary-dark); box-shadow: 0 3px 0 var(--accent); }
.uc-hero-actions .btn:hover { background: #fff8e8; color: var(--primary-dark); }
.uc-hero-actions .btn.btn-outline {
  background: transparent; color: #f7ecd2; box-shadow: none;
  border: 1px solid rgba(247, 236, 210, .6);
}
.uc-hero-actions .btn.btn-outline:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* 统计卡 */
.uc-stats { margin-bottom: 20px; }
.uc-stat { display: flex; flex-direction: column; gap: 2px; }
.uc-stat .value { color: var(--primary-dark); }
.uc-stat-tip { font-size: 12px; color: var(--text-light); }
.uc-stat-balance { border-left-color: var(--accent); }
.uc-stat-balance .value { color: var(--clay); }

/* 两栏面板 */
.uc-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 20px;
  align-items: start;
}
.uc-panel {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px 22px;
}
.uc-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px;
}
.uc-panel-title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .05em;
  color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.uc-count {
  min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 11px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.uc-balance {
  background: linear-gradient(135deg, #f6efdd, #fffdf7);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 12px;
}
.uc-balance small { color: var(--text-light); font-size: 12px; }
.uc-balance .num {
  font-family: var(--serif);
  font-size: 32px; font-weight: 800;
  color: var(--clay);
  letter-spacing: -.5px;
}
.uc-tip { color: var(--text-light); font-size: 13px; margin-bottom: 14px; }
.uc-sub-title {
  margin: 6px 0 8px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-strong);
  font-size: 13px; font-weight: 700; color: var(--earth);
}
.uc-record { list-style: none; }
.uc-record li {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0;
  font-size: 13px; color: var(--text-light);
  border-bottom: 1px dashed var(--border);
}
.uc-record li:last-child { border-bottom: 0; }
.uc-record li span:first-child { flex: 1; min-width: 0; word-break: break-all; }
.uc-record-amount { font-family: var(--serif); font-weight: 700; color: var(--clay); }
.uc-empty {
  padding: 26px 16px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: #fbf6e9;
}
.uc-empty p { color: var(--text-light); font-size: 13px; margin-bottom: 12px; }

/* 地址簿 */
.addr-list { display: flex; flex-direction: column; gap: 12px; }
.addr-card {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--border-strong);
  border-radius: var(--radius);
  background: #fffdf7;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.addr-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.addr-card.is-default { border-left-color: var(--primary); background: #f7faf1; }
.addr-card-main { flex: 1; min-width: 0; }
.addr-card-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 4px;
}
.addr-card-head strong { font-size: 15px; color: var(--text); }
.addr-card-head em { font-style: normal; font-size: 13px; color: var(--text-light); }
.addr-card-text { font-size: 13px; color: var(--text-light); word-break: break-all; }
.addr-card-ops { display: flex; gap: 12px; flex-shrink: 0; font-size: 13px; }
.addr-card-ops a { color: var(--primary-dark); }
.addr-card-ops a.danger { color: var(--clay); }

/* 订单表 */
.uc-orders .uc-order-no { font-family: var(--serif); letter-spacing: .03em; }
.uc-orders .uc-order-amount { color: var(--clay); font-weight: 700; }

/* 结算弹窗：地址选择 */
.addr-picker { display: flex; flex-direction: column; gap: 8px; max-height: 220px; overflow: auto; }
.addr-pick { display: block; cursor: pointer; }
.addr-pick input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.addr-pick-card {
  display: block;
  padding: 10px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: #fffdf7;
  transition: border-color .2s, background .2s;
}
.addr-pick:hover .addr-pick-card { border-color: var(--accent); background: #fbf6e9; }
.addr-pick input[type="radio"]:checked + .addr-pick-card {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 2px rgba(63, 125, 67, .16) inset;
}
.addr-pick input[type="radio"]:focus-visible + .addr-pick-card { outline: 2px solid var(--accent); outline-offset: 2px; }
.addr-pick-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.addr-pick-head strong { font-size: 14px; color: var(--text); }
.addr-pick-head em { font-style: normal; font-size: 13px; color: var(--text-light); }
.addr-pick-text { display: block; font-size: 12.5px; color: var(--text-light); margin-top: 2px; word-break: break-all; }
.addr-manual {
  padding: 12px 14px 2px;
  border: 1px dashed var(--border-strong);
  border-radius: 4px;
  background: #fbf6e9;
}
.addr-manual[hidden] { display: none; }
.addr-manual > label { font-weight: 700; color: var(--earth); }

/* 充值弹窗 */
.recharge-quick { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .uc-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .uc-hero { padding: 22px 20px; }
  .uc-name { font-size: 22px; }
  .uc-avatar { width: 52px; height: 52px; font-size: 22px; }
  .addr-card { flex-direction: column; align-items: flex-start; gap: 8px; }
  .uc-orders .uc-order-no { word-break: break-all; }
}

