/* ==========================================================================
 * 买家端样式（首页 / 列表 / 详情 / 购物 / 订单 / 账号 / 条款）
 * ========================================================================== */

/* ================= 站点头部 ================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(12, 31, 24, 0.05);
}

/* 三栏栅格：品牌 / 搜索 / 操作区 */
.header-bar {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(280px, 1fr) minmax(0, auto);
  align-items: center;
  gap: var(--sp-6);
  padding: var(--sp-3) 0;
}

.header-brand {
  display: flex;
  align-items: center;
  min-width: 0;
}

.header-brand .brand {
  margin-left: calc(var(--sp-3) * -1);
}

/* ---------- 搜索区 ---------- */
.header-search {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.search-form {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 4px;
  background: var(--white);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-pill);
  box-shadow: var(--sh-1);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

.search-form:hover {
  border-color: rgba(15, 107, 79, 0.45);
}

.search-form:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--ring);
}

.search-field {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0 var(--sp-2) 0 var(--sp-4);
}

.search-field-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: var(--muted);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
}

.search-form input {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 9px 0;
  border: none;
  background: transparent;
  font-size: 14px;
  box-shadow: none !important;
}

.search-form input:focus {
  border-color: transparent;
  box-shadow: none;
}

.search-submit {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 24px;
  border: none;
  border-radius: var(--r-pill);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-600) 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(207, 78, 25, 0.26);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

.search-submit svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.search-submit:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(207, 78, 25, 0.32);
}

.search-hot {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: var(--sp-4);
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
}

.search-hot-label {
  flex: 0 0 auto;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.search-hot-item {
  padding: 2px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  color: var(--text-sub);
  background: var(--white);
  transition: all var(--t-fast) var(--ease);
}

.search-hot-item:hover {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

/* ---------- 右侧操作区 ---------- */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 13.5px;
  color: var(--text-sub);
}

.action-item {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 56px;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r);
  color: var(--text-sub);
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease),
    transform var(--t) var(--ease);
}

.action-item:hover {
  background: var(--brand-tint);
  color: var(--brand-700);
  transform: translateY(-1px);
}

.action-icon {
  display: inline-flex;
}

.action-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.action-text {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.cart-badge {
  position: absolute;
  top: 2px;
  right: 6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--white);
}

/* 未登录 */
.header-guest {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
}

.header-guest .login-link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-sub);
}

.header-guest .login-link:hover {
  color: var(--brand);
}

/* 商家入口 */
.merchant-entry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: var(--sp-2);
  padding: 7px 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  color: var(--text-sub);
  font-weight: 600;
  transition: all var(--t) var(--ease);
}

.merchant-entry svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.merchant-entry:hover {
  border-color: var(--ink-800);
  background: var(--ink-800);
  color: #fff;
}

/* ---------- 用户下拉 ---------- */
.user-dropdown {
  position: relative;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 5px 12px 5px 5px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--white);
  color: var(--text);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

.user-chip:hover {
  color: var(--text);
  border-color: var(--brand);
  box-shadow: var(--sh-1);
}

.user-avatar {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand) 0%, var(--ink-800) 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.user-chip-name {
  max-width: 96px;
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-chip .caret {
  font-size: 10px;
  line-height: 1;
  color: var(--muted);
  transition: transform var(--t) var(--ease);
}

.user-dropdown:hover .user-chip .caret,
.user-dropdown:focus-within .user-chip .caret {
  transform: rotate(180deg);
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 70;
  min-width: 220px;
  padding: var(--sp-2);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh-3);
  display: none;
  animation: rise var(--t) var(--ease) both;
}

.user-dropdown:hover .user-dropdown-menu,
.user-dropdown:focus-within .user-dropdown-menu {
  display: block;
}

.user-dropdown-head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-2) var(--sp-3);
  margin-bottom: var(--sp-2);
  border-bottom: 1px solid var(--line);
}

.user-dropdown-head .user-avatar {
  width: 38px;
  height: 38px;
  font-size: 15px;
}

.user-dropdown-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.45;
}

.user-dropdown-meta strong {
  font-size: 13.5px;
}

.user-dropdown-meta small {
  font-size: 12px;
  color: var(--muted);
}

.user-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 9px 10px;
  border-radius: var(--r-sm);
  color: var(--text-sub);
  font-size: 13.5px;
  font-weight: 500;
}

.user-dropdown-menu a svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--muted);
  transition: color var(--t-fast) var(--ease);
}

.user-dropdown-menu a:hover {
  background: var(--brand-tint);
  color: var(--brand-700);
}

.user-dropdown-menu a:hover svg {
  color: var(--brand);
}

.user-dropdown-menu a.menu-exit {
  margin-top: var(--sp-2);
  padding-top: 11px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 var(--r-sm) var(--r-sm);
}

.user-dropdown-menu a.menu-exit:hover {
  background: #fce9e9;
  color: var(--danger);
}

.user-dropdown-menu a.menu-exit:hover svg {
  color: var(--danger);
}

/* ================= 类目导航（深色带） ================= */
.category-nav {
  background: linear-gradient(90deg, var(--ink-900) 0%, var(--ink-700) 55%, #1f4a3b 100%);
}

.category-nav-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  height: 46px;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-nav-inner::-webkit-scrollbar {
  display: none;
}

.cat-all {
  flex: 0 0 auto;
  font-weight: 700;
  color: #fff;
  padding: 0 var(--sp-4) 0 0;
  margin-right: var(--sp-2);
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  white-space: nowrap;
}

.cat-item {
  position: relative;
  flex: 0 0 auto;
}

.cat-item > a {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  color: rgba(255, 255, 255, 0.78);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease);
}

.cat-item:hover > a {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.cat-panel {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 50;
  min-width: 620px;
  background: var(--white);
  border-radius: var(--r);
  box-shadow: var(--sh-3);
  padding: var(--sp-5);
  display: none;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: var(--sp-4) var(--sp-6);
  animation: rise var(--t) var(--ease) both;
}

.cat-item:hover .cat-panel {
  display: grid;
}

.cat-panel-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-4) var(--sp-6);
  align-content: start;
}

.cat-group {
  min-width: 0;
}

.cat-panel-pic {
  display: block;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--bg-alt);
  position: relative;
  align-self: stretch;
  min-height: 150px;
}

.cat-panel-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease);
}

.cat-panel-pic:hover img {
  transform: scale(1.06);
}

.cat-panel-pic span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: var(--sp-2) var(--sp-3);
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(180deg, rgba(12, 31, 24, 0), rgba(12, 31, 24, 0.8));
}

.cat-group-title {
  font-weight: 700;
  display: inline-block;
  margin-bottom: var(--sp-2);
  color: var(--ink-900);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}

.cat-group-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px var(--sp-3);
}

.cat-group-links a {
  font-size: 13px;
  color: var(--text-sub);
}

.cat-group-links a:hover {
  color: var(--brand);
}

/* ================= 页脚 ================= */
.site-footer {
  background: var(--ink-900);
  color: rgba(255, 255, 255, 0.66);
  margin-top: var(--sp-12);
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(600px 300px at 82% 0%, rgba(232, 98, 42, 0.16), transparent 70%);
}

.footer-inner {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) 1.3fr;
  gap: var(--sp-6);
  padding: var(--sp-10) 0 var(--sp-8);
}

.footer-col h4 {
  margin-bottom: var(--sp-3);
  color: #fff;
  font-size: 14.5px;
  letter-spacing: 0.02em;
}

.footer-col p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  margin-bottom: var(--sp-2);
}

.footer-col p a:hover {
  color: var(--accent);
}

.footer-about {
  padding-left: var(--sp-4);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-about h4 {
  color: #fff;
}

.footer-about .muted {
  color: rgba(255, 255, 255, 0.55);
}

.footer-links {
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.footer-links-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px var(--sp-3);
  padding: var(--sp-3) 0;
  font-size: 13px;
}

.footer-links-inner a {
  color: rgba(255, 255, 255, 0.66);
}

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

.footer-links-inner .dot {
  color: rgba(255, 255, 255, 0.3);
}

.footer-bottom {
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--sp-4) 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px var(--sp-3);
}

.footer-meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
}

.footer-meta .dot {
  color: rgba(255, 255, 255, 0.28);
}

.footer-icp {
  color: rgba(255, 255, 255, 0.55);
}

.footer-icp:hover {
  color: var(--accent);
}

/* ================= 首页 ================= */
.hero-kitchen {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: var(--sp-4);
  margin-bottom: var(--sp-8);
  animation: rise var(--t-slow) var(--ease) both;
}

/* 焦点图 */
.hero-slider {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--sh-2);
  background: var(--ink-900);
  height: 430px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  transition: opacity 0.7s var(--ease);
}

.hero-slide.active {
  opacity: 1;
  z-index: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide.active img {
  animation: zoom-in 9s var(--ease) forwards;
}

.hero-slide-mask {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--sp-10) var(--sp-10) var(--sp-8);
  color: #fff;
  background: linear-gradient(
    180deg,
    rgba(12, 31, 24, 0) 30%,
    rgba(12, 31, 24, 0.35) 58%,
    rgba(12, 31, 24, 0.88) 100%
  );
}

.hero-slide-tag {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 4px 14px;
  border-radius: var(--r-pill);
  background: rgba(232, 98, 42, 0.92);
  color: #fff;
  margin-bottom: var(--sp-3);
  box-shadow: 0 6px 14px rgba(207, 78, 25, 0.3);
}

.hero-slide-mask h2 {
  font-size: 34px;
  color: #fff;
  margin: 0 0 var(--sp-2);
  letter-spacing: -0.02em;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.4);
}

.hero-slide-mask p {
  margin: 0;
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.88);
}

.hero-slide-cta {
  margin-top: var(--sp-4);
  align-self: flex-start;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 22px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink-900);
  transition: transform var(--t) var(--ease), background-color var(--t) var(--ease);
}

.hero-slide-cta:hover {
  background: #fff;
  transform: translateX(4px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(12, 31, 24, 0.4);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--t) var(--ease), transform var(--t) var(--ease);
}

.hero-arrow:hover {
  background: rgba(12, 31, 24, 0.78);
  transform: translateY(-50%) scale(1.06);
}

.hero-prev {
  left: var(--sp-4);
}

.hero-next {
  right: var(--sp-4);
}

.hero-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--sp-4);
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: var(--sp-2);
}

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: width var(--t) var(--ease), background-color var(--t) var(--ease);
}

.hero-dots button.active {
  width: 30px;
  background: var(--accent);
}

/* 首页右侧保障面板（深色卡片） */
.hero-side {
  background: linear-gradient(160deg, var(--ink-800) 0%, var(--ink-900) 100%);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-2);
  padding: var(--sp-5);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  position: relative;
  overflow: hidden;
}

.hero-side::after {
  content: '';
  position: absolute;
  width: 190px;
  height: 190px;
  right: -60px;
  top: -70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 98, 42, 0.3), transparent 65%);
}

.hero-side-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
}

.hero-side-head strong {
  font-size: 17px;
  color: #fff;
}

.hero-side-head span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.hero-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.82);
  position: relative;
}

.hero-points li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
}

.hero-points .ico {
  font-size: 15px;
  line-height: 1.5;
}

.hero-side-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  position: relative;
}

.hero-side-actions .btn-outline {
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.hero-side-actions .btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  color: #fff;
}

/* 类目实物图卡片 */
.cat-card-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--sp-4);
}

.cat-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease),
    border-color var(--t) var(--ease);
}

.cat-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--sh-3);
  border-color: var(--brand-soft);
}

.cat-card-pic {
  aspect-ratio: 1 / 1;
  background: var(--bg-alt);
  overflow: hidden;
}

.cat-card-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease);
}

.cat-card:hover .cat-card-pic img {
  transform: scale(1.08);
}

.cat-card-info {
  padding: var(--sp-3) var(--sp-4) var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.cat-card-info strong {
  font-size: 14.5px;
  color: var(--ink-900);
}

.cat-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px var(--sp-2);
  font-size: 12px;
  color: var(--muted);
}

.cat-card-links em {
  font-style: normal;
}

/* 服务保障条 */
.service-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-4);
}

.service-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  padding: var(--sp-4) var(--sp-5);
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

.service-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-2);
}

.service-ico {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  border-radius: 14px;
  background: var(--brand-tint);
  border: 1px solid var(--brand-soft);
}

.service-item strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink-900);
}

.service-item p {
  font-size: 12.5px;
  color: var(--text-sub);
}

/* 区块标题 */
.section {
  margin-bottom: var(--sp-10);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--line);
}

.section-head h2 {
  margin: 0;
  position: relative;
  padding-left: var(--sp-4);
}

.section-head h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  border-radius: var(--r-pill);
  background: linear-gradient(180deg, var(--accent) 0%, var(--brand) 100%);
}

.section-head a {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  padding: 5px 14px;
  border-radius: var(--r-pill);
  transition: all var(--t-fast) var(--ease);
}

.section-head a:hover {
  background: var(--brand-tint);
  color: var(--brand-700);
}

/* 商品网格 */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-4);
}

/* 商品卡片 */
.product-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-1);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease),
    border-color var(--t) var(--ease);
  display: flex;
  flex-direction: column;
  color: var(--text);
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--sh-3);
  border-color: var(--brand-soft);
  color: var(--text);
}

.product-card-cover {
  aspect-ratio: 1 / 1;
  background: var(--bg-alt);
  overflow: hidden;
}

.product-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease);
}

.product-card:hover .product-card-cover img {
  transform: scale(1.07);
}

.product-card-body {
  padding: var(--sp-3) var(--sp-4) var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.product-card-title {
  font-size: 14.5px;
  font-weight: 600;
  margin: 0;
  color: var(--ink-900);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
}

.product-card-sub {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-card-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: auto;
}

.product-card-price .price {
  font-size: 20px;
}

.product-card-price .sales {
  margin-left: auto;
}

.product-card-shop {
  margin-top: 2px;
}

.shop-tag {
  display: inline-block;
  font-size: 12px;
  color: var(--brand-700);
  background: var(--brand-tint);
  border: 1px solid var(--brand-soft);
  border-radius: var(--r-pill);
  padding: 1px 10px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ================= 商品列表页 ================= */
.list-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: var(--sp-6);
  align-items: start;
}

.filter-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  box-shadow: var(--sh-1);
  position: sticky;
  top: 130px;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
}

.filter-panel h4 {
  margin-bottom: var(--sp-3);
  font-size: 14.5px;
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid var(--line);
}

.filter-panel ul {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--sp-4);
}

.filter-panel li a {
  display: block;
  padding: 7px 12px;
  border-radius: var(--r-sm);
  color: var(--text-sub);
  font-size: 13px;
  transition: all var(--t-fast) var(--ease);
}

.filter-panel li a:hover,
.filter-panel li a.active {
  background: var(--brand-soft);
  color: var(--brand-700);
  font-weight: 600;
}

.filter-panel li.lv2 a {
  padding-left: var(--sp-6);
  font-size: 12.5px;
  color: var(--muted);
}

.sort-bar {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: var(--sp-2) var(--sp-4);
  margin-bottom: var(--sp-5);
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  box-shadow: var(--sh-1);
  font-size: 13px;
  flex-wrap: wrap;
}

.sort-bar span.label {
  color: var(--muted);
  margin-right: var(--sp-2);
  font-weight: 600;
}

.sort-bar a {
  padding: 6px 14px;
  border-radius: var(--r-pill);
  color: var(--text-sub);
  font-weight: 500;
  transition: all var(--t-fast) var(--ease);
}

.sort-bar a:hover {
  background: var(--bg-alt);
  color: var(--brand-700);
}

.sort-bar a.active {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-600) 100%);
  color: #fff;
  font-weight: 700;
}

.sort-bar .result-count {
  margin-left: auto;
  color: var(--muted);
  padding-right: var(--sp-2);
}

/* ================= 商品详情 ================= */
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
  gap: var(--sp-8);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  box-shadow: var(--sh-1);
  align-items: start;
}

.gallery-main {
  aspect-ratio: 1 / 1;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-alt);
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumbs {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
  flex-wrap: wrap;
}

.gallery-thumbs img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color var(--t) var(--ease), transform var(--t) var(--ease);
}

.gallery-thumbs img:hover {
  transform: translateY(-2px);
}

.gallery-thumbs img.active {
  border-color: var(--brand);
}

.detail-title {
  font-size: 24px;
  margin-bottom: var(--sp-2);
}

.detail-subtitle {
  color: var(--text-sub);
  margin-bottom: var(--sp-5);
}

.detail-price-box {
  background: linear-gradient(120deg, var(--accent-soft) 0%, var(--brand-tint) 100%);
  border: 1px solid rgba(232, 98, 42, 0.16);
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-5);
  margin-bottom: var(--sp-5);
}

.detail-price-box .price {
  font-size: 32px;
}

.detail-meta {
  display: flex;
  gap: var(--sp-6);
  color: var(--muted);
  font-size: 12px;
  margin-top: var(--sp-2);
}

.spec-group {
  margin-bottom: var(--sp-4);
}

.spec-group .spec-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: var(--sp-2);
}

.spec-values {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.spec-value {
  padding: 8px 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  background: var(--white);
  transition: all var(--t-fast) var(--ease);
}

.spec-value:hover {
  border-color: var(--brand);
  color: var(--brand-700);
  transform: translateY(-1px);
}

.spec-value.active {
  border-color: var(--brand);
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-600) 100%);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(11, 86, 63, 0.24);
}

.spec-value.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  text-decoration: line-through;
}

.buy-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
  flex-wrap: wrap;
}

.quantity-box {
  display: flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  overflow: hidden;
  height: 44px;
}

.quantity-box button {
  width: 40px;
  height: 100%;
  border: none;
  background: var(--bg-alt);
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-sub);
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.quantity-box button:hover {
  background: var(--brand-soft);
  color: var(--brand-700);
}

.quantity-box input {
  width: 58px;
  height: 100%;
  border: none;
  border-left: 1px solid var(--line-strong);
  border-right: 1px solid var(--line-strong);
  text-align: center;
  font-weight: 700;
  border-radius: 0;
  box-shadow: none !important;
}

.stock-hint {
  font-size: 12.5px;
  color: var(--muted);
}

.stock-hint.ok {
  color: var(--success);
  font-weight: 600;
}

.shop-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
  padding: var(--sp-4) var(--sp-5);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.detail-section {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  margin-top: var(--sp-5);
  box-shadow: var(--sh-1);
}

.detail-section h3 {
  padding-left: var(--sp-3);
  border-left: 4px solid var(--accent);
  margin-bottom: var(--sp-4);
}

.detail-content {
  color: var(--text-sub);
  line-height: 1.95;
  word-break: break-all;
  white-space: pre-wrap;
}

.detail-content img {
  max-width: 100%;
  border-radius: var(--r-sm);
  margin: var(--sp-2) 0;
}

/* ================= 购物车 ================= */
.cart-group {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  margin-bottom: var(--sp-4);
  overflow: hidden;
}

.cart-group-head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5);
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-700);
}

.cart-row {
  display: grid;
  grid-template-columns: 36px 92px minmax(0, 1fr) 150px 130px 110px 80px;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--line);
  transition: background-color var(--t-fast) var(--ease);
}

.cart-row:hover {
  background: var(--brand-tint);
}

.cart-row:last-child {
  border-bottom: none;
}

.cart-row img {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: var(--r-sm);
  background: var(--bg-alt);
}

.cart-row .title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: var(--sp-1);
  display: block;
  color: var(--ink-900);
}

.cart-row .title:hover {
  color: var(--brand);
}

.cart-row .spec {
  font-size: 12px;
  color: var(--muted);
}

.cart-row .subtotal {
  font-weight: 800;
  color: var(--accent);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.cart-row.invalid {
  opacity: 0.55;
}

.cart-bar {
  position: sticky;
  bottom: 0;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-3);
  padding: var(--sp-4) var(--sp-5);
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  margin-top: var(--sp-4);
  z-index: 20;
  flex-wrap: wrap;
}

.cart-bar .checkbox-line {
  min-width: 90px;
}

.cart-bar .total-box {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.cart-bar .total-box .price {
  font-size: 26px;
}

/* ================= 结算页 ================= */
.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: var(--sp-5);
  align-items: start;
}

.address-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-3);
}

.address-item {
  display: block;
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  padding: var(--sp-4) var(--sp-5);
  cursor: pointer;
  transition: all var(--t) var(--ease);
  background: var(--white);
}

.address-item:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--sh-1);
}

.address-item input {
  position: absolute;
  opacity: 0;
}

.address-item:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-tint);
  box-shadow: 0 0 0 3px var(--ring);
}

.address-item .name {
  font-weight: 700;
  margin-bottom: var(--sp-1);
  color: var(--ink-900);
}

.address-item .addr {
  font-size: 12.5px;
  color: var(--text-sub);
}

.address-item .default-tag {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
}

.order-preview-item {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-bottom: 1px dashed var(--line);
}

.order-preview-item:last-child {
  border-bottom: none;
}

.order-preview-item img {
  width: 68px;
  height: 68px;
  object-fit: cover;
  border-radius: var(--r-sm);
  background: var(--bg-alt);
}

.summary-box {
  position: sticky;
  top: 120px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  padding: var(--sp-2) 0;
  color: var(--text-sub);
  font-size: 13px;
}

.summary-line.total {
  border-top: 1px solid var(--line);
  margin-top: var(--sp-3);
  padding-top: var(--sp-4);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.summary-line.total .price {
  font-size: 26px;
}

/* ================= 支付 / 结果 ================= */
.pay-box {
  max-width: 720px;
  margin: 0 auto;
}

.pay-amount {
  text-align: center;
  padding: var(--sp-8) 0;
  border-bottom: 1px dashed var(--line);
  margin-bottom: var(--sp-5);
}

.pay-amount .label {
  color: var(--muted);
  font-size: 13px;
}

.pay-amount .price {
  display: block;
  font-size: 44px;
  letter-spacing: -0.03em;
  margin-top: var(--sp-2);
}

.pay-methods {
  display: flex;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}

.pay-method {
  flex: 1;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  padding: var(--sp-4) var(--sp-5);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  background: var(--white);
  transition: all var(--t) var(--ease);
}

.pay-method:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
}

.pay-method.active {
  border-color: var(--brand);
  background: var(--brand-tint);
  box-shadow: 0 0 0 3px var(--ring);
}

.pay-actions {
  display: flex;
  gap: var(--sp-3);
  justify-content: center;
  margin-top: var(--sp-3);
}

.result-box {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.result-icon {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: #e2f4ea;
  color: var(--success);
  font-size: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-4);
  box-shadow: 0 10px 24px rgba(18, 134, 90, 0.18);
}

/* ================= 订单 ================= */
.order-tabs {
  display: flex;
  gap: var(--sp-1);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: var(--sp-1);
  box-shadow: var(--sh-1);
  margin-bottom: var(--sp-5);
  overflow-x: auto;
  scrollbar-width: none;
}

.order-tabs::-webkit-scrollbar {
  display: none;
}

.order-tabs a {
  padding: 8px 18px;
  border-radius: var(--r-pill);
  color: var(--text-sub);
  white-space: nowrap;
  font-size: 13.5px;
  font-weight: 600;
  transition: all var(--t-fast) var(--ease);
}

.order-tabs a:hover {
  background: var(--bg-alt);
  color: var(--brand-700);
}

.order-tabs a.active {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-600) 100%);
  color: #fff;
}

.order-tabs a .count {
  color: var(--brand);
  font-weight: 700;
}

.order-tabs a.active .count {
  color: #fff;
}

.order-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  margin-bottom: var(--sp-4);
  overflow: hidden;
  transition: box-shadow var(--t) var(--ease);
}

.order-card:hover {
  box-shadow: var(--sh-2);
}

.order-card-head {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-3) var(--sp-5);
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--text-sub);
  flex-wrap: wrap;
}

.order-card-head .order-no {
  font-weight: 700;
  color: var(--ink-900);
}

.order-card-head .status {
  margin-left: auto;
  font-weight: 700;
}

.order-card-body {
  display: flex;
}

.order-items {
  flex: 1;
  padding: var(--sp-4) var(--sp-5);
  min-width: 0;
}

.order-item {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-2) 0;
}

.order-item img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--r-sm);
  background: var(--bg-alt);
}

.order-item .info {
  flex: 1;
  min-width: 0;
}

.order-item .info .title {
  font-size: 13.5px;
  font-weight: 600;
  display: block;
  margin-bottom: var(--sp-1);
  color: var(--ink-900);
}

.order-item .info .spec {
  font-size: 12px;
  color: var(--muted);
}

.order-side {
  width: 210px;
  border-left: 1px solid var(--line);
  padding: var(--sp-4);
  text-align: right;
  font-size: 13px;
  color: var(--text-sub);
  flex-shrink: 0;
}

.order-side .amount {
  color: var(--accent);
  font-weight: 800;
  font-size: 17px;
}

.order-actions {
  display: flex;
  gap: var(--sp-2);
  justify-content: flex-end;
  padding: var(--sp-3) var(--sp-5);
  border-top: 1px solid var(--line);
  background: var(--white);
  flex-wrap: wrap;
}

.order-actions form {
  display: inline-block;
}

/* 订单详情时间线 */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline li {
  position: relative;
  padding: 0 0 var(--sp-5) var(--sp-5);
  border-left: 2px solid var(--line);
  font-size: 13px;
}

.timeline li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.timeline li::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.timeline .time {
  color: var(--muted);
  font-size: 12px;
}

/* ================= 账号中心 ================= */
.account-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: var(--sp-5);
  align-items: start;
}

.account-side {
  background: linear-gradient(165deg, var(--ink-800) 0%, var(--ink-900) 100%);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-2);
  padding: var(--sp-6);
  text-align: center;
  color: #fff;
  position: sticky;
  top: 120px;
}

.account-side .muted,
.account-side .text-sub {
  color: rgba(255, 255, 255, 0.6);
}

.account-side a {
  color: rgba(255, 255, 255, 0.8);
}

.account-side a:hover {
  color: var(--accent);
}

.account-side .avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--brand) 100%);
  color: #fff;
  font-size: 26px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-3);
  box-shadow: 0 8px 18px rgba(12, 31, 24, 0.3);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-3);
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  padding: var(--sp-4);
  text-align: center;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-2);
}

.stat-card .value {
  font-size: 26px;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: -0.02em;
}

.stat-card .label {
  font-size: 12.5px;
  color: var(--text-sub);
}

.address-card {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: var(--sp-4) var(--sp-5);
  position: relative;
  background: var(--white);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

.address-card:hover {
  border-color: var(--brand-soft);
  box-shadow: var(--sh-1);
}

.address-card .name {
  font-weight: 700;
  margin-bottom: var(--sp-1);
}

.address-card .addr {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: var(--sp-3);
}

.address-card .ops {
  display: flex;
  gap: var(--sp-2);
}

/* ================= 平台条款文档页 ================= */
.legal-grid {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: var(--sp-5);
  align-items: start;
}

.legal-side {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  position: sticky;
  top: 120px;
  box-shadow: var(--sh-1);
}

.legal-side h4 {
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid var(--line);
}

.legal-side a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--t-fast) var(--ease);
}

.legal-side a:hover {
  background: var(--bg-alt);
  color: var(--brand-700);
}

.legal-side a.active {
  background: var(--brand-soft);
  color: var(--brand-700);
  font-weight: 700;
}

.legal-side .legal-back {
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.legal-doc {
  padding: var(--sp-8);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-1);
}

.legal-lead {
  background: var(--brand-tint);
  color: var(--brand-700);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-sm);
  border-left: 3px solid var(--brand);
}

.legal-section h3 {
  margin: var(--sp-5) 0 var(--sp-2);
  padding-left: var(--sp-3);
  border-left: 4px solid var(--accent);
}

.legal-section p,
.legal-section ul {
  color: var(--text-sub);
}

.legal-section li {
  margin-bottom: var(--sp-2);
}

.legal-foot {
  margin-top: var(--sp-5);
  padding-top: var(--sp-3);
  border-top: 1px dashed var(--line);
  font-size: 12.5px;
}

.legal-table {
  margin: var(--sp-3) 0 var(--sp-4);
}

.legal-table-caption {
  font-size: 12.5px;
  margin-bottom: var(--sp-2);
}

.legal-table .data-table {
  font-size: 12.5px;
}

.legal-table .data-table td {
  color: var(--text-sub);
}

.legal-table .data-table th:first-child,
.legal-table .data-table td:first-child {
  white-space: nowrap;
  font-weight: 600;
  color: var(--text);
}

.legal-note {
  margin-top: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-sm);
  font-size: 12.5px;
  color: var(--text-sub);
}

.legal-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-4);
}

.legal-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease),
    border-color var(--t) var(--ease);
}

.legal-card:hover {
  border-color: var(--brand-soft);
  box-shadow: var(--sh-2);
  transform: translateY(-4px);
}

.legal-card h3 {
  margin-bottom: var(--sp-2);
}

.legal-card p {
  font-size: 13px;
  margin-bottom: var(--sp-3);
}

.legal-card-more {
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
}

/* 文字型操作按钮 */
.link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--muted);
  cursor: pointer;
}

.link-btn:hover {
  color: var(--brand);
}

/* ==========================================================================
 * 新版结构组件（顶部通告条 / 移动抽屉 / 首页滑轨 / 促销卡 / 分类 chips / 底部导航）
 * ========================================================================== */

/* ---------- 顶部通告条 ---------- */
.header-topbar {
  background: var(--ink-900);
  color: rgba(255, 255, 255, 0.72);
  font-size: 12.5px;
}

.header-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  height: 34px;
}

.topbar-note {
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-links {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-shrink: 0;
}

.topbar-links a {
  color: rgba(255, 255, 255, 0.7);
}

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

/* ---------- 移动端汉堡按钮 ---------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  padding: 0 8px;
  border-radius: var(--r-sm);
  cursor: pointer;
  background: var(--bg-alt);
}

.nav-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--ink-800);
  transition: transform var(--t) var(--ease), opacity var(--t) var(--ease);
}

.nav-toggle-input:checked ~ .site-header .nav-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle-input:checked ~ .site-header .nav-toggle span:nth-child(2) {
  opacity: 0;
}
.nav-toggle-input:checked ~ .site-header .nav-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------- 移动端分类抽屉 ---------- */
.mobile-drawer {
  display: none;
}

.drawer-mask {
  position: fixed;
  inset: 0;
  background: rgba(12, 31, 24, 0.45);
  z-index: 55;
}

.mobile-drawer-inner {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 56;
  width: min(84vw, 340px);
  background: var(--white);
  padding: var(--sp-4);
  overflow-y: auto;
  box-shadow: var(--sh-3);
  animation: drawer-in var(--t) var(--ease) both;
}

@keyframes drawer-in {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: none;
  }
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--sp-3);
  margin-bottom: var(--sp-3);
  border-bottom: 1px solid var(--line);
}

.drawer-close {
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}

.drawer-group {
  margin-bottom: var(--sp-4);
}

.drawer-group-title {
  display: inline-block;
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: var(--sp-2);
  padding-bottom: 2px;
  border-bottom: 2px solid var(--accent);
}

.drawer-group-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px var(--sp-2);
}

.drawer-group-links a {
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: var(--bg-alt);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
}

.drawer-group-links a.lv2 {
  background: var(--brand-tint);
  color: var(--brand-700);
}

.drawer-group-links a.lv3 {
  background: transparent;
  border: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
}

.nav-toggle-input:checked ~ .site-header .mobile-drawer {
  display: block;
}

/* ---------- 首页主视觉 ---------- */
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: var(--sp-4);
  margin-bottom: var(--sp-8);
  animation: rise var(--t-slow) var(--ease) both;
}

/* ---------- 类目滑轨 ---------- */
.cat-rail {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--sp-3);
  margin-bottom: var(--sp-8);
}

.cat-rail-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-2);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease),
    border-color var(--t) var(--ease);
}

.cat-rail-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--sh-2);
  border-color: var(--brand-soft);
}

.cat-rail-pic {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-alt);
  border: 2px solid var(--white);
  box-shadow: 0 4px 10px rgba(12, 31, 24, 0.12);
}

.cat-rail-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease);
}

.cat-rail-item:hover .cat-rail-pic img {
  transform: scale(1.1);
}

.cat-rail-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-900);
  white-space: nowrap;
}

/* ---------- 双促销卡 ---------- */
.promo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-4);
  margin-bottom: var(--sp-8);
}

.promo-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-6);
  border-radius: var(--r-xl);
  color: #fff;
  overflow: hidden;
  min-height: 150px;
  box-shadow: var(--sh-2);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

.promo-card::after {
  content: '';
  position: absolute;
  right: -40px;
  bottom: -80px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.promo-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--sh-3);
  color: #fff;
}

.promo-tent {
  background: linear-gradient(135deg, var(--brand) 0%, var(--ink-800) 100%);
}

.promo-cook {
  background: linear-gradient(135deg, var(--accent) 0%, #a63a10 100%);
}

.promo-tag {
  align-self: flex-start;
  padding: 3px 12px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.promo-title {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.promo-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}

.promo-go {
  margin-top: auto;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.promo-card:hover .promo-go {
  transform: translateX(4px);
}

/* ---------- 商品卡角标与行动按钮 ---------- */
.product-card-flag {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: rgba(232, 98, 42, 0.94);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 10px rgba(207, 78, 25, 0.28);
}

.product-card-cover {
  position: relative;
}

.product-card-cta {
  margin-top: var(--sp-1);
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease);
}

.product-card:hover .product-card-cta {
  opacity: 1;
  transform: none;
}

@media (hover: none) {
  .product-card-cta {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 顶部分类筛选 chips ---------- */
.list-layout {
  display: block;
}

.filter-bar {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  padding: var(--sp-4) var(--sp-5);
  margin-bottom: var(--sp-5);
}

.filter-row {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-2) 0;
}

.filter-row + .filter-row {
  border-top: 1px dashed var(--line);
}

.filter-row-label {
  flex: 0 0 76px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  padding-top: 5px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  min-width: 0;
}

.chip {
  padding: 6px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: var(--white);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  transition: all var(--t-fast) var(--ease);
}

.chip:hover {
  border-color: var(--brand);
  color: var(--brand-700);
  background: var(--brand-tint);
  transform: translateY(-1px);
}

.chip.active {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-600) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 5px 12px rgba(11, 86, 63, 0.22);
}

.chip-lv2,
.chip-lv3 {
  border-color: transparent;
  background: var(--bg-alt);
  font-size: 12.5px;
}

.chip-lv2.active,
.chip-lv3.active {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-600) 100%);
  box-shadow: 0 5px 12px rgba(207, 78, 25, 0.22);
}

.filter-keyword {
  margin: var(--sp-2) 0 0;
  font-size: 13px;
  color: var(--text-sub);
}

.filter-keyword strong {
  color: var(--accent-600);
}

.filter-keyword a {
  margin-left: var(--sp-2);
  color: var(--brand);
  font-weight: 600;
}

/* ---------- 页脚新结构 ---------- */
.footer-top {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: var(--sp-8);
  padding: var(--sp-10) 0 var(--sp-8);
}

.footer-brandcol {
  min-width: 0;
}

.footer-brandcol .brand {
  margin-left: calc(var(--sp-3) * -1);
  margin-bottom: var(--sp-3);
}

.footer-slogan {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13.5px;
  font-weight: 600;
}

.footer-kicker {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12.5px;
}

.footer-service {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.55);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-5);
}

/* ---------- 移动端底部标签栏 ---------- */
.mobile-tabbar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 18px rgba(12, 31, 24, 0.08);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.tabbar-item {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 0 7px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-sub);
}

.tabbar-item:hover {
  color: var(--brand);
}

.tabbar-ico {
  font-size: 19px;
  line-height: 1;
}

.tabbar-text {
  line-height: 1.2;
}

.tabbar-dot {
  position: absolute;
  top: 4px;
  right: 26%;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

/* ---------- 结构级响应式 ---------- */
@media (max-width: 1100px) {
  .home-hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .footer-top {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sp-6);
    padding: var(--sp-8) 0 var(--sp-6);
  }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }
  .header-topbar-inner {
    justify-content: center;
  }
  .topbar-links {
    display: none;
  }
  .mobile-tabbar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .page-buyer {
    padding-bottom: 66px;
  }
  .promo-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .cat-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .footer-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .filter-row {
    flex-direction: column;
    gap: var(--sp-2);
  }
  .filter-row-label {
    flex: none;
    padding-top: 0;
  }
}

@media (max-width: 720px) {
  .cat-rail {
    display: flex;
    overflow-x: auto;
    gap: var(--sp-3);
    scrollbar-width: none;
    padding-bottom: var(--sp-1);
  }
  .cat-rail::-webkit-scrollbar {
    display: none;
  }
  .cat-rail-item {
    flex: 0 0 92px;
  }
  .promo-card {
    padding: var(--sp-5);
    min-height: 0;
  }
  .promo-title {
    font-size: 18px;
  }
  .filter-bar {
    padding: var(--sp-3) var(--sp-4);
  }
}

/* ================= 响应式（基础） ================= */
@media (max-width: 1280px) {
  .cat-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .footer-inner {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .footer-about {
    grid-column: span 3;
    padding-left: 0;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: var(--sp-4);
  }
}

@media (max-width: 1180px) {
  .header-bar {
    gap: var(--sp-4);
  }
  .search-hot-item:nth-of-type(n + 5) {
    display: none;
  }
  .cat-panel {
    min-width: 480px;
  }
}

@media (max-width: 1100px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .hero-kitchen {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-slider {
    height: 340px;
  }
  .hero-side {
    flex-direction: row;
    align-items: center;
    gap: var(--sp-5);
    flex-wrap: wrap;
  }
  .hero-side-head {
    flex: 1 1 200px;
  }
  .hero-points {
    flex: 1 1 320px;
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--sp-2) var(--sp-5);
  }
  .hero-side-actions {
    margin-top: 0;
    flex-direction: row;
    flex: 1 1 100%;
  }
  .hero-side-actions .btn {
    flex: 1;
  }
  .service-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .list-layout,
  .detail-layout,
  .checkout-grid,
  .account-grid,
  .legal-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .filter-panel,
  .account-side,
  .legal-side,
  .summary-box {
    position: static;
    max-height: none;
  }
  .cat-panel {
    min-width: 420px;
    grid-template-columns: minmax(0, 1fr);
  }
  .cat-panel-pic {
    display: none;
  }
  .legal-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .header-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--sp-3) var(--sp-4);
  }
  .header-brand {
    grid-column: 1;
    grid-row: 1;
  }
  .header-actions {
    grid-column: 2;
    grid-row: 1;
  }
  .header-search {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .search-hot {
    display: none;
  }
  .cat-panel {
    min-width: 320px;
  }
  .cart-row {
    grid-template-columns: 32px 80px minmax(0, 1fr);
    gap: var(--sp-3);
  }
  .cart-row > :nth-child(n + 4) {
    grid-column: 2 / -1;
  }
  .cart-row img {
    width: 80px;
    height: 80px;
  }
  .order-card-body {
    flex-direction: column;
  }
  .order-side {
    width: auto;
    border-left: none;
    border-top: 1px solid var(--line);
    text-align: left;
  }
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .address-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .legal-doc {
    padding: var(--sp-5);
  }
}

@media (max-width: 720px) {
  .main-content {
    padding: var(--sp-4) 0 var(--sp-10);
  }
  .header-actions {
    gap: 2px;
  }
  .action-item {
    min-width: 46px;
    padding: var(--sp-2);
  }
  .action-text {
    font-size: 11.5px;
  }
  .merchant-entry {
    margin-left: 0;
    padding: 7px 12px;
  }
  .merchant-entry-text {
    display: none;
  }
  .user-chip-name {
    display: none;
  }
  .user-chip {
    padding: 5px 8px 5px 5px;
  }
  .product-grid,
  .cat-card-grid,
  .service-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero-slider {
    height: 260px;
  }
  .hero-slide-mask {
    padding: var(--sp-5);
  }
  .hero-slide-mask h2 {
    font-size: 22px;
  }
  .hero-side {
    padding: var(--sp-4);
  }
  .detail-layout {
    padding: var(--sp-4);
    gap: var(--sp-5);
  }
  .pay-methods {
    flex-direction: column;
  }
  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--sp-4);
    padding: var(--sp-8) 0 var(--sp-6);
  }
  .footer-about {
    grid-column: span 2;
  }
  .pagination {
    gap: 6px;
  }
  .pagination a,
  .pagination span {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
  }
}

@media (max-width: 560px) {
  .product-grid,
  .cat-card-grid,
  .service-strip,
  .stat-grid,
  .legal-cards {
    grid-template-columns: minmax(0, 1fr);
  }
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .cart-bar {
    padding: var(--sp-3) var(--sp-4);
    gap: var(--sp-3);
  }
  .cart-bar .total-box {
    width: 100%;
    justify-content: space-between;
  }
  .detail-title {
    font-size: 20px;
  }
  .pay-amount .price {
    font-size: 34px;
  }
}

/* ==========================================================================
 * 结构级响应式修正（放在最后，覆盖上方同名断点规则）
 * ========================================================================== */
@media (max-width: 1100px) {
  .home-hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-side {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--sp-5);
  }
  .hero-side-head {
    flex: 1 1 200px;
  }
  .hero-points {
    flex: 1 1 320px;
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--sp-2) var(--sp-5);
  }
  .hero-side-actions {
    margin-top: 0;
    flex: 1 1 100%;
    flex-direction: row;
  }
  .hero-side-actions .btn {
    flex: 1;
  }
  .footer-top {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sp-6);
    padding: var(--sp-8) 0 var(--sp-6);
  }
}

@media (max-width: 900px) {
  /* 主导航行：汉堡 / 品牌 / 操作区 + 第二行搜索 */
  .header-bar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: var(--sp-2) var(--sp-3);
  }
  .nav-toggle {
    display: flex;
    grid-column: 1;
    grid-row: 1;
  }
  .header-brand {
    grid-column: 2;
    grid-row: 1;
  }
  .header-actions {
    grid-column: 3;
    grid-row: 1;
  }
  .header-search {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .header-topbar-inner {
    justify-content: center;
  }
  .topbar-links {
    display: none;
  }
  .mobile-tabbar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .page-buyer {
    padding-bottom: 68px;
  }
  .promo-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .cat-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .footer-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .filter-row {
    flex-direction: column;
    gap: var(--sp-2);
  }
  .filter-row-label {
    flex: none;
    padding-top: 0;
  }
}

@media (max-width: 720px) {
  .cat-rail {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: var(--sp-1);
  }
  .cat-rail::-webkit-scrollbar {
    display: none;
  }
  .cat-rail-item {
    flex: 0 0 92px;
  }
  .promo-card {
    padding: var(--sp-5);
    min-height: 0;
  }
  .promo-title {
    font-size: 18px;
  }
  .filter-bar {
    padding: var(--sp-3) var(--sp-4);
  }
  .footer-top {
    padding: var(--sp-6) 0 var(--sp-5);
  }
}

/* ==========================================================================
 * 尾部视觉重构（山脊页脚）
 * 放在最后，覆盖此前所有同名规则
 * ========================================================================== */

/* ---------- 页脚：暖砂底 + 山脊剪影 ---------- */
.site-footer {
  background: linear-gradient(180deg, #f9f4ea 0%, #f3ecdd 100%);
  color: var(--ink-700);
  margin-top: var(--sp-12);
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: none;
}

.footer-ridge {
  line-height: 0;
  margin-bottom: -1px;
}

.footer-ridge svg {
  display: block;
  width: 100%;
  height: 74px;
}

.footer-ridge path {
  fill: #f9f4ea;
}

.footer-main {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: var(--sp-10);
  padding: var(--sp-2) 0 var(--sp-8);
  align-items: start;
}

.footer-eyebrow {
  margin: 0 0 var(--sp-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.3em;
  color: var(--accent-600);
}

.footer-slogan {
  font-family: 'Georgia', 'Songti SC', 'Source Han Serif SC', 'Noto Serif SC', serif;
  font-size: 34px;
  line-height: 1.28;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: var(--sp-3);
}

.footer-desc {
  font-size: 13.5px;
  line-height: 1.95;
  color: var(--text-sub);
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}

.contact-chip {
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(12, 31, 24, 0.1);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-700);
}

/* 编号路径式链接矩阵 */
.footer-trail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-5);
}

.footer-node {
  position: relative;
  padding-top: var(--sp-4);
  border-top: 2px solid rgba(12, 31, 24, 0.14);
}

.node-index {
  position: absolute;
  top: -11px;
  left: 0;
  padding-right: 10px;
  background: #f7f2e8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--accent-600);
}

.footer-node h4 {
  margin-bottom: var(--sp-2);
  font-size: 14.5px;
  color: var(--ink-900);
}

.footer-node p {
  margin-bottom: var(--sp-1);
  font-size: 13px;
  color: var(--text-sub);
}

.footer-node a {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.footer-node a::before {
  content: '›';
  font-weight: 800;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-5px);
  transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}

.footer-node a:hover {
  color: var(--accent-600);
}

.footer-node a:hover::before {
  opacity: 1;
  transform: none;
}

.footer-links {
  background: transparent;
  border-top: 1px dashed rgba(12, 31, 24, 0.16);
}

.footer-links-inner {
  padding: var(--sp-3) 0;
  font-size: 13px;
}

.footer-links-inner a {
  color: var(--text-sub);
  font-weight: 600;
}

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

.footer-links-inner .dot {
  color: rgba(12, 31, 24, 0.25);
}

.footer-bottom {
  background: var(--ink-900);
  border-top: none;
  padding: var(--sp-4) 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.footer-bottom-inner {
  gap: var(--sp-3);
}

.footer-icp {
  color: rgba(255, 255, 255, 0.55);
}

.footer-icp:hover {
  color: var(--accent);
}

.footer-top-link {
  margin-left: var(--sp-2);
  padding: 4px 13px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 700;
}

.footer-top-link:hover {
  background: var(--accent);
  color: #fff;
}

/* ---------- 顶部 / 尾部响应式 ---------- */
@media (max-width: 1100px) {
  .footer-main {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sp-6);
  }
  .footer-slogan {
    font-size: 28px;
  }
}

@media (max-width: 900px) {
  .footer-trail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-ridge svg {
    height: 54px;
  }
}

@media (max-width: 720px) {
  .footer-slogan {
    font-size: 24px;
  }
  .footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .footer-trail {
    grid-template-columns: minmax(0, 1fr);
  }
  .footer-node {
    padding-top: var(--sp-3);
  }
}
