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

/* ==========================================================================
 * 站点头部
 * ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.06);
}

/* ---------- 顶部通告条 ---------- */
.header-topbar {
  background: linear-gradient(90deg, var(--ink-900) 0%, var(--brand-700) 52%, var(--brand) 100%);
  color: rgba(255, 255, 255, 0.76);
  font-size: 12.5px;
}

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

.topbar-note {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #35e39b;
  box-shadow: 0 0 0 3px rgba(53, 227, 155, 0.22);
  animation: topbar-pulse 2.2s var(--ease) infinite;
}

@keyframes topbar-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(53, 227, 155, 0.24);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(53, 227, 155, 0.08);
  }
}

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

.topbar-links a {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 500;
}

.topbar-links a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- 主导航行 ---------- */
.header-bar {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(300px, 1fr) minmax(0, auto);
  align-items: center;
  gap: var(--sp-6);
  padding: var(--sp-4) 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);
  box-shadow: var(--sh-1);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

.search-form:hover {
  border-color: rgba(43, 77, 255, 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: 10px 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: 40px;
  padding: 0 24px;
  border: none;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-600) 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--sh-brand);
  transition: transform var(--t) var(--ease-spring), box-shadow var(--t) var(--ease),
    background 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(-2px);
  background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-700) 100%);
  box-shadow: 0 14px 26px rgba(28, 55, 224, 0.34);
}

.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: 800;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.search-hot-item {
  padding: 2px 10px;
  border-radius: var(--r-xs);
  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(--ink-900);
  border-color: var(--ink-900);
}

/* ---------- 右侧操作区 ---------- */
.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: 58px;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-sm);
  color: var(--text-sub);
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease),
    transform var(--t) var(--ease-spring);
}

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

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

.action-icon svg {
  width: 22px;
  height: 22px;
  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: 1px;
  right: 6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--white), 0 4px 10px rgba(255, 90, 31, 0.4);
}

/* 未登录 */
.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: 9px 16px;
  border: 1px solid var(--ink-700);
  border-radius: var(--r-sm);
  color: var(--ink-800);
  font-weight: 700;
  font-size: 13.5px;
  background: transparent;
  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-900);
  background: var(--ink-900);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--sh-2);
}

/* ---------- 用户下拉 ---------- */
.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: 10px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-700) 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  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: 228px;
  padding: var(--sp-2);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  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-3);
  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: 40px;
  height: 40px;
  border-radius: 12px;
  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: 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: 12px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 var(--r-sm) var(--r-sm);
}

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

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

/* ==========================================================================
 * 类目导航（浅色通栏 + 巨幅下拉）
 * ========================================================================== */
.category-nav {
  background: var(--white);
  border-top: 1px solid var(--line);
}

.category-nav-inner {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 46px;
  padding: 6px 0;
  overflow: visible;
}

.cat-all {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  margin-right: var(--sp-3);
  border-radius: var(--r-sm);
  background: var(--ink-900);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: background var(--t) var(--ease), transform var(--t) var(--ease-spring);
}

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

.cat-all:hover {
  color: #fff;
  background: var(--brand);
  transform: translateY(-1px);
}

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

.cat-item > a {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 13px;
  border-radius: var(--r-sm);
  color: var(--text-sub);
  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: var(--brand-700);
  background: var(--brand-tint);
}

.cat-panel {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  z-index: 55;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-3);
  padding: var(--sp-6);
  display: none;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: var(--sp-4) var(--sp-8);
  animation: rise var(--t) var(--ease) both;
}

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

.cat-panel-groups {
  display: grid;
  grid-template-columns: repeat(3, 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-lg);
  overflow: hidden;
  background: var(--bg-alt);
  position: relative;
  align-self: stretch;
  min-height: 160px;
}

.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-3);
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(180deg, rgba(8, 11, 20, 0), rgba(8, 11, 20, 0.86));
}

.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 {
  position: relative;
  background: linear-gradient(180deg, var(--ink-850) 0%, var(--ink-900) 100%);
  color: rgba(255, 255, 255, 0.66);
  margin-top: var(--sp-16);
  overflow: hidden;
}

.site-footer::after {
  content: '';
  position: absolute;
  right: -120px;
  top: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(43, 77, 255, 0.28), transparent 68%);
  pointer-events: none;
}

.footer-topedge {
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--brand) 46%, var(--accent) 100%);
}

.footer-shell {
  position: relative;
  z-index: 1;
  padding: var(--sp-12) 0 var(--sp-8);
}

.footer-lead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr);
  gap: var(--sp-10);
  align-items: start;
}

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

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

.footer-desc {
  margin-top: var(--sp-4);
  font-size: 13.5px;
  line-height: 1.95;
  color: rgba(255, 255, 255, 0.6);
}

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

.contact-chip {
  padding: 6px 14px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
}

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

.footer-col h4 {
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 14.5px;
  letter-spacing: 0.02em;
}

.footer-col a {
  display: block;
  padding: 5px 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.62);
  transition: color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}

.footer-col a:hover {
  color: var(--accent);
  transform: translateX(3px);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-3);
  margin-top: var(--sp-10);
  padding-top: var(--sp-5);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-legal a {
  padding: 5px 13px;
  border-radius: var(--r-xs);
  background: rgba(255, 255, 255, 0.07);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.66);
  transition: all var(--t-fast) var(--ease);
}

.footer-legal a:hover {
  color: #fff;
  background: var(--brand);
}

.footer-base {
  position: relative;
  z-index: 1;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: var(--sp-4) 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.footer-base-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2) var(--sp-4);
}

.footer-copy {
  max-width: 760px;
  line-height: 1.7;
}

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

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

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

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

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

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

.hero-slider {
  position: relative;
  border-radius: var(--r-2xl);
  overflow: hidden;
  box-shadow: var(--sh-3);
  background: var(--ink-900);
  height: 460px;
}

.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);
  color: #fff;
  background: linear-gradient(
    0deg,
    rgba(8, 11, 20, 0.9) 0%,
    rgba(8, 11, 20, 0.5) 38%,
    rgba(8, 11, 20, 0.06) 74%
  );
}

.hero-slide-tag {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 5px 14px;
  border-radius: var(--r-xs);
  background: var(--accent);
  color: #fff;
  margin-bottom: var(--sp-3);
  box-shadow: var(--sh-accent);
}

.hero-slide-mask h2 {
  font-size: clamp(26px, 2vw + 16px, 38px);
  color: #fff;
  margin: 0 0 var(--sp-2);
  letter-spacing: -0.03em;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

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

.hero-slide-cta {
  margin-top: var(--sp-4);
  align-self: flex-start;
  font-size: 13px;
  font-weight: 700;
  padding: 11px 24px;
  border-radius: var(--r-sm);
  background: #fff;
  color: var(--ink-900);
  transition: transform var(--t) var(--ease-spring), background-color var(--t) var(--ease);
}

.hero-slide-cta:hover {
  background: var(--accent);
  color: #fff;
  transform: translateX(5px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: var(--r-sm);
  background: rgba(8, 11, 20, 0.42);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--t) var(--ease), transform var(--t) var(--ease-spring);
}

.hero-arrow:hover {
  background: var(--brand);
  transform: translateY(-50%) scale(1.08);
}

.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: 32px;
  background: var(--accent);
}

/* 首页右侧保障面板（浅卡 + 顶部色条） */
.hero-side {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  box-shadow: var(--sh-2);
  padding: var(--sp-6) var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  position: relative;
  overflow: hidden;
}

.hero-side::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--accent) 100%);
}

.hero-side::after {
  content: '';
  position: absolute;
  width: 180px;
  height: 180px;
  right: -70px;
  bottom: -80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(43, 77, 255, 0.12), transparent 68%);
}

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

.hero-side-head strong {
  font-size: 18px;
  color: var(--ink-900);
  letter-spacing: -0.02em;
}

.hero-side-head span {
  font-size: 12px;
  color: var(--muted);
}

.hero-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  font-size: 13px;
  color: var(--text-sub);
  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;
}

/* ==========================================================================
 * 通用区块
 * ========================================================================== */
.section {
  margin-bottom: var(--sp-12);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}

.section-head-text {
  min-width: 0;
}

.section-eyebrow {
  margin: 0 0 2px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.24em;
  color: var(--brand);
}

.section-head h2 {
  margin: 0;
}

.section-more {
  flex: 0 0 auto;
  padding: 8px 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-sub);
  transition: all var(--t-fast) var(--ease);
}

.section-more:hover {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--sh-brand);
}

/* ---------- 服务保障 ---------- */
.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-xl);
  box-shadow: var(--sh-1);
  padding: var(--sp-5);
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  transition: transform var(--t) var(--ease-spring), box-shadow var(--t) var(--ease),
    border-color var(--t) var(--ease);
}

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

.service-ico {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  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);
}

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

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

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

.cat-rail-pic {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  transition: border-color var(--t) var(--ease);
}

.cat-rail-item:hover .cat-rail-pic {
  border-color: var(--brand-soft);
}

.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.12);
}

.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-5);
  margin-bottom: var(--sp-12);
}

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

.promo-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.06) 0 10px,
    transparent 10px 22px
  );
  pointer-events: none;
}

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

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

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

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

.promo-tag {
  position: relative;
  align-self: flex-start;
  padding: 4px 13px;
  border-radius: var(--r-xs);
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.36);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.promo-title {
  position: relative;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

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

.promo-go {
  position: relative;
  margin-top: auto;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  transition: transform var(--t) var(--ease);
}

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

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

.product-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--sh-1);
  transition: transform var(--t) var(--ease-spring), 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 {
  position: relative;
  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-flag {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
  padding: 4px 11px;
  border-radius: var(--r-xs);
  background: var(--accent);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  box-shadow: var(--sh-accent);
}

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

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

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

.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;
  padding-top: var(--sp-3);
}

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

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

.product-card-cta {
  margin-top: var(--sp-2);
  padding-top: var(--sp-2);
  border-top: 1px dashed var(--line);
  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;
  }
}

/* ==========================================================================
 * 商品列表页
 * ========================================================================== */
.list-body {
  min-width: 0;
}

.filter-bar {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  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-4);
  padding: var(--sp-3) 0;
}

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

.filter-row-label {
  flex: 0 0 84px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding-top: 6px;
}

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

.chip {
  padding: 7px 15px;
  border-radius: var(--r-sm);
  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(-2px);
}

.chip.active {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-600) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--sh-brand);
}

.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: var(--sh-accent);
}

.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;
}

.sort-bar {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: var(--sp-3) 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-3);
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 12px;
}

.sort-bar a {
  padding: 7px 15px;
  border-radius: var(--r-sm);
  color: var(--text-sub);
  font-weight: 600;
  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(--ink-900) 0%, var(--ink-700) 100%);
  color: #fff;
  font-weight: 700;
  box-shadow: var(--sh-2);
}

.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-2xl);
  padding: var(--sp-6);
  box-shadow: var(--sh-1);
  align-items: start;
}

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

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

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

.gallery-thumbs img {
  width: 76px;
  height: 76px;
  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-spring);
}

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

.gallery-thumbs img.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--ring);
}

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

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

.detail-price-box {
  position: relative;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-5);
  margin-bottom: var(--sp-5);
}

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

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

.detail-meta strong {
  color: var(--text);
}

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

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

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

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

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

.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: var(--sh-brand);
}

.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-sm);
  overflow: hidden;
  height: 46px;
  background: var(--white);
}

.quantity-box button {
  width: 42px;
  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-2xl);
  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-xl);
  box-shadow: var(--sh-1);
  margin-bottom: var(--sp-5);
  overflow: hidden;
}

.cart-group-head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  background: linear-gradient(90deg, var(--bg-alt) 0%, var(--white) 100%);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-700);
}

.cart-row {
  display: grid;
  grid-template-columns: 36px 96px minmax(0, 1fr) 140px 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: 96px;
  height: 96px;
  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-600);
  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(12px);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  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-5);
  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: 28px;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--muted);
  cursor: pointer;
}

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

/* ==========================================================================
 * 结算页
 * ========================================================================== */
.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  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-lg);
  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(-3px);
  box-shadow: var(--sh-2);
}

.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: 132px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-3);
  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: 700;
  color: var(--text);
}

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

/* ==========================================================================
 * 支付 / 结果
 * ========================================================================== */
.pay-box {
  max-width: 760px;
  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;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.pay-amount .price {
  display: block;
  font-family: var(--font-mono);
  font-size: 46px;
  letter-spacing: -0.04em;
  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-lg);
  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(-3px);
}

.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-4);
  flex-wrap: wrap;
}

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

.result-icon {
  width: 78px;
  height: 78px;
  border-radius: 24px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-4);
  box-shadow: 0 12px 26px rgba(14, 159, 110, 0.2);
  animation: rise var(--t-slow) var(--ease-spring) both;
}

/* ==========================================================================
 * 订单
 * ========================================================================== */
.order-tabs {
  display: flex;
  gap: var(--sp-1);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  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: 9px 18px;
  border-radius: var(--r-sm);
  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(--ink-900) 0%, var(--ink-700) 100%);
  color: #fff;
}

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

.order-tabs a.active .count {
  color: var(--accent);
}

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

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

.order-card-head {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  background: linear-gradient(90deg, var(--bg-alt) 0%, var(--white) 100%);
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--text-sub);
  flex-wrap: wrap;
}

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

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

.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;
  align-items: center;
}

.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: 220px;
  border-left: 1px dashed var(--line);
  padding: var(--sp-4) var(--sp-5);
  text-align: right;
  font-size: 13px;
  color: var(--text-sub);
  flex-shrink: 0;
  background: var(--bg-alt);
}

.order-side .amount {
  color: var(--accent-600);
  font-weight: 800;
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}

.order-actions {
  display: flex;
  gap: var(--sp-2);
  justify-content: flex-end;
  padding: var(--sp-4) 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-6);
  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: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 4px;
  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: 260px minmax(0, 1fr);
  gap: var(--sp-5);
  align-items: start;
}

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

.account-side::after {
  content: '';
  position: absolute;
  left: -60px;
  bottom: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 90, 31, 0.32), transparent 68%);
}

.account-side > * {
  position: relative;
}

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

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

.account-side a:hover {
  color: #fff;
}

.account-side .avatar {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-600) 100%);
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-3);
  box-shadow: 0 12px 24px rgba(224, 67, 0, 0.32);
}

.account-side .btn-outline {
  border-color: rgba(255, 255, 255, 0.42);
  color: #fff;
}

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

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

.stat-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-1);
  padding: var(--sp-5) var(--sp-4);
  text-align: center;
  overflow: hidden;
  transition: transform var(--t) var(--ease-spring), box-shadow var(--t) var(--ease),
    border-color var(--t) var(--ease);
}

.stat-card::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--accent) 100%);
}

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

.stat-card .value {
  font-size: 28px;
  font-weight: 800;
  color: var(--brand-700);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

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

.address-card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  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);
  flex-wrap: wrap;
}

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

.legal-side {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: var(--sp-4);
  position: sticky;
  top: 132px;
  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: 9px 13px;
  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;
  box-shadow: inset 3px 0 0 var(--brand);
}

.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-2xl);
  box-shadow: var(--sh-1);
}

.legal-lead {
  background: var(--brand-tint);
  color: var(--brand-700);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-lg);
  border-left: 4px solid var(--brand);
  font-size: 13.5px;
  line-height: 1.8;
}

.legal-section h3 {
  margin: var(--sp-6) 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-6);
  padding-top: var(--sp-4);
  border-top: 1px dashed var(--line);
  font-size: 12.5px;
}

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

.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-4) var(--sp-5);
  background: var(--warning-soft);
  border-left: 4px solid var(--warning);
  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-5);
}

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

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

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

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

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

/* ==========================================================================
 * 移动端：汉堡 / 抽屉 / 底部标签栏
 * ========================================================================== */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 42px;
  height: 42px;
  padding: 0 9px;
  border-radius: var(--r-sm);
  cursor: pointer;
  background: var(--bg-alt);
  border: 1px solid var(--line);
}

.nav-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--ink-900);
  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(8, 11, 20, 0.5);
  backdrop-filter: blur(2px);
  z-index: 55;
}

.mobile-drawer-inner {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 56;
  width: min(86vw, 350px);
  background: var(--white);
  padding: var(--sp-5) var(--sp-4);
  overflow-y: auto;
  box-shadow: var(--sh-4);
  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-4);
  border-bottom: 1px solid var(--line);
}

.drawer-head strong {
  font-size: 16px;
}

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

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

.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: 6px 13px;
  border-radius: var(--r-sm);
  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;
}

.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(14px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 22px rgba(16, 24, 40, 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: 3px;
  padding: 9px 0 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-sub);
  transition: color var(--t-fast) var(--ease);
}

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

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

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

.tabbar-dot {
  position: absolute;
  top: 5px;
  right: 26%;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(255, 90, 31, 0.4);
}

/* ==========================================================================
 * 响应式
 * ========================================================================== */
@media (min-width: 1440px) {
  .product-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .header-bar {
    gap: var(--sp-4);
  }
  .search-hot-item:nth-of-type(n + 5) {
    display: none;
  }
  .cat-panel {
    grid-template-columns: minmax(0, 1fr) 180px;
  }
  .cat-panel-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@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;
  }
  .service-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .detail-layout,
  .checkout-grid,
  .account-grid,
  .legal-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .account-side,
  .legal-side,
  .summary-box {
    position: static;
  }
  .cat-panel-pic {
    display: none;
  }
  .cat-panel {
    grid-template-columns: minmax(0, 1fr);
  }
  .legal-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-lead {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sp-8);
  }
}

@media (max-width: 900px) {
  /* 主导航行：汉堡 / 品牌 / 操作区 + 第二行搜索 */
  .header-bar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: var(--sp-3);
    padding: var(--sp-3) 0;
  }
  .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;
  }
  .search-hot {
    display: none;
  }
  .category-nav {
    display: none;
  }
  .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: 70px;
  }
  .promo-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .cat-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .footer-board {
    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;
  }
  .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 dashed 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);
  }
  .footer-shell {
    padding: var(--sp-8) 0 var(--sp-6);
  }
  .footer-legal {
    margin-top: var(--sp-8);
  }
}

@media (max-width: 760px) {
  .main-content {
    padding: var(--sp-5) 0 var(--sp-12);
  }
  .header-actions {
    gap: 2px;
  }
  .action-item {
    min-width: 48px;
    padding: var(--sp-2);
  }
  .action-text {
    font-size: 11.5px;
  }
  .merchant-entry {
    margin-left: 0;
    padding: 9px 12px;
  }
  .merchant-entry-text {
    display: none;
  }
  .user-chip-name {
    display: none;
  }
  .user-chip {
    padding: 5px 8px 5px 5px;
  }
  .product-grid,
  .service-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--sp-4);
  }
  .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 96px;
    padding: var(--sp-3) var(--sp-2);
  }
  .promo-card {
    padding: var(--sp-6);
    min-height: 0;
  }
  .promo-title {
    font-size: 20px;
  }
  .filter-bar {
    padding: var(--sp-4);
  }
  .hero-slider {
    height: 300px;
  }
  .hero-slide-mask {
    padding: var(--sp-5);
  }
  .hero-slide-mask h2 {
    font-size: 22px;
  }
  .hero-side {
    padding: var(--sp-5);
  }
  .detail-layout {
    padding: var(--sp-4);
    gap: var(--sp-5);
  }
  .pay-methods {
    flex-direction: column;
  }
  .footer-base-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .pagination {
    gap: 6px;
  }
  .pagination a,
  .pagination span {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
  }
}

@media (max-width: 560px) {
  .product-grid,
  .service-strip,
  .stat-grid,
  .legal-cards {
    grid-template-columns: minmax(0, 1fr);
  }
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-3);
  }
  .cart-bar {
    padding: var(--sp-4);
    gap: var(--sp-3);
  }
  .cart-bar .total-box {
    width: 100%;
    justify-content: space-between;
  }
  .detail-title {
    font-size: 21px;
  }
  .pay-amount .price {
    font-size: 36px;
  }
  .footer-board {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-slider {
    height: 240px;
  }
  .buy-row .btn {
    flex: 1 1 140px;
  }
}
