/* ============================================================
 * 澜景云智商城 — 全站样式表
 * 设计 token 为唯一事实源；公共类见 design_spec 第四节
 * ============================================================ */

:root {
  --primary: #2563EB;
  --primary-2: #00C2FF;
  --accent: #FF6B35;
  --danger: #FF4D4F;
  --success: #07C160;
  --warn: #FFB800;
  --bg: #F5F7FB;
  --card: #FFFFFF;
  --text: #1F2937;
  --text-2: #6B7280;
  --border: #E5E7EB;
  --c-laptop: #4F7CFF;
  --c-desktop: #00B8A9;
  --c-accessory: #FF8A00;
  --radius: 12px;
  --shadow: 0 4px 16px rgba(31, 41, 55, .08);
  --grad-primary: linear-gradient(135deg, #2563EB, #00C2FF);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-width: 320px;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 16px; }

/* ============ 布局 ============ */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px;
}

.page-wrap {
  min-height: 60vh;
  padding: 20px 0 40px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  margin: 28px 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before {
  content: '';
  width: 5px;
  height: 20px;
  border-radius: 3px;
  background: var(--grad-primary);
}
.section-more {
  margin-left: auto;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-2);
}
.section-more:hover { color: var(--primary); }

.breadcrumb {
  font-size: 13px;
  color: var(--text-2);
  margin: 12px 0 16px;
}
.breadcrumb a { color: var(--text-2); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span.sep { margin: 0 6px; color: #C0C4CC; }

.page-banner {
  background: var(--grad-primary);
  color: #fff;
  border-radius: var(--radius);
  padding: 36px 28px;
  margin-bottom: 20px;
}
.page-banner h1 { font-size: 26px; margin-bottom: 8px; }
.page-banner p { opacity: .92; font-size: 14px; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

/* ============ 顶部导航 ============ */
.site-header {
  background: var(--card);
  box-shadow: 0 2px 10px rgba(31, 41, 55, .06);
  position: sticky;
  top: 0;
  z-index: 100;
}

/* 顶部独立行：服务语 + 搜索 / 购物车 / 用户区 */
.topbar {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 6px;
  padding-bottom: 6px;
}
.topbar-slogan {
  font-size: 13px;
  color: var(--text-2);
  white-space: nowrap;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}
.logo img { height: 40px; width: auto; border-radius: 8px; object-fit: cover; }

.main-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px 10px;
  flex: 1;
}
.main-nav a {
  padding: 5px 12px;
  font-size: 15px;
  color: var(--text);
  border-radius: 8px;
  white-space: nowrap;
  text-align: center;
}
.main-nav a:hover { background: #EFF4FF; color: var(--primary); }
.main-nav a.active {
  background: var(--grad-primary);
  color: #fff;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 6px 0 14px;
  height: 36px;
  width: 220px;
}
.search-bar input {
  border: none;
  outline: none;
  background: transparent;
  flex: 1;
  font-size: 14px;
  min-width: 0;
}
.search-bar button {
  border: none;
  background: var(--grad-primary);
  color: #fff;
  border-radius: 999px;
  height: 28px;
  padding: 0 14px;
  font-size: 13px;
}

.cart-link {
  position: relative;
  font-size: 15px;
  color: var(--text);
}
.cart-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  border-radius: 999px;
  padding: 0 5px;
}
.cart-badge.hide { display: none; }

.user-area {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.user-area .uname { color: var(--primary); font-weight: 600; }
.user-area a { color: var(--text-2); }
.user-area a:hover { color: var(--primary); }

.hamburger {
  display: none;
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  padding: 6px;
  color: var(--text);
}

/* ============ 页脚 ============ */
.site-footer {
  background: #1F2937;
  color: #D1D5DB;
  margin-top: 40px;
  font-size: 14px;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 36px 0 24px;
}
.footer-col h4 {
  color: #fff;
  font-size: 15px;
  margin-bottom: 12px;
}
.footer-col a {
  display: block;
  color: #9CA3AF;
  padding: 4px 0;
}
.footer-col a:hover { color: #fff; }
.footer-col p { color: #9CA3AF; padding: 4px 0; }
.footer-bottom {
  border-top: 1px solid #374151;
  padding: 16px 0;
  text-align: center;
  color: #9CA3AF;
  font-size: 13px;
}
.footer-bottom a { color: #9CA3AF; }
.footer-bottom a:hover { color: #fff; }

/* ============ 商品网格与商品卡 ============ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.product-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(31, 41, 55, .14);
}
.pc-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #F3F5F9;
  display: block;
}
.pc-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pc-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(255, 77, 79, .92);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
}
.pc-cat {
  padding: 10px 12px 0;
}
.pc-name {
  padding: 6px 12px 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  height: 42px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.pc-name a { color: var(--text); }
.pc-name a:hover { color: var(--primary); }
.pc-merchant {
  padding: 4px 12px 0;
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pc-merchant a { color: var(--text-2); }
.pc-merchant a:hover { color: var(--primary); }
.pc-price {
  padding: 6px 12px 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.pc-original {
  font-size: 12px;
  color: #9CA3AF;
  text-decoration: line-through;
}
.pc-sales {
  padding: 2px 12px 0;
  font-size: 12px;
  color: var(--text-2);
}
.pc-rating {
  padding: 2px 12px 0;
  font-size: 12px;
  color: var(--warn);
}
.pc-actions {
  margin-top: auto;
  padding: 12px;
}
.btn-add {
  width: 100%;
  border: none;
  background: var(--grad-primary);
  color: #fff;
  border-radius: 8px;
  height: 36px;
  font-size: 14px;
}
.btn-add:hover { opacity: .92; }

/* ============ 按钮 ============ */
.btn {
  display: inline-block;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 20px;
  font-size: 14px;
  text-align: center;
  transition: opacity .15s ease, background .15s ease;
}
.btn-primary {
  background: var(--grad-primary);
  color: #fff;
}
.btn-primary:hover { opacity: .92; color: #fff; }
.btn-outline {
  background: #fff;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover { background: #EFF4FF; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: .9; color: #fff; }
.btn-warn { background: var(--warn); color: #fff; }
.btn-warn:hover { opacity: .9; color: #fff; }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-lg { padding: 12px 32px; font-size: 16px; }
.btn-block { display: block; width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ============ 价格 ============ */
.price {
  color: var(--danger);
  font-size: 22px;
  font-weight: 700;
}
.price::before { content: '¥'; font-size: 14px; margin-right: 2px; }
.price-original {
  color: #9CA3AF;
  font-size: 13px;
  text-decoration: line-through;
  margin-left: 8px;
  font-weight: 400;
}
.price-discount {
  display: inline-block;
  background: #FFF1F0;
  color: var(--danger);
  font-size: 12px;
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 8px;
}

/* ============ 分类徽章 ============ */
.cat-badge {
  display: inline-block;
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 999px;
  color: #fff;
}
.cat-badge.c-laptop { background: var(--c-laptop); }
.cat-badge.c-desktop { background: var(--c-desktop); }
.cat-badge.c-accessory { background: var(--c-accessory); }

/* ============ 表单 ============ */
.form-box {
  max-width: 460px;
  margin: 0 auto;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 6px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 16px;
  outline: none;
  background: #fff;
  color: var(--text);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
}
.form-textarea { min-height: 90px; resize: vertical; }
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
}
.form-check input { margin-top: 4px; }
.form-agree { margin: 14px 0; }
.form-agree a { color: var(--primary); }
.form-error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 4px;
  min-height: 18px;
}
.form-success { color: var(--success); font-size: 13px; margin-top: 4px; }
.form-tip {
  background: #EFF6FF;
  border: 1px dashed #93C5FD;
  color: #1D4ED8;
  font-size: 13px;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 16px;
}
.upload-box {
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}
.upload-preview img {
  max-width: 100%;
  max-height: 160px;
  margin: 0 auto;
  border-radius: 8px;
}
.upload-placeholder {
  color: var(--text-2);
  font-size: 13px;
  padding: 20px 0;
}

/* ============ 弹窗 ============ */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.modal-box {
  background: #fff;
  border-radius: var(--radius);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .25);
}
.modal-close {
  float: right;
  border: none;
  background: transparent;
  font-size: 20px;
  color: var(--text-2);
  line-height: 1;
  padding: 8px;
}
.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 17px;
  font-weight: 700;
}
.modal-body { padding: 20px; }
.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* 支付 */
.pay-box { margin-top: 4px; }
.pay-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
}
.pay-item.selected { border-color: #1677FF; background: #F0F7FF; }
.pay-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #1677FF;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.pay-qr {
  width: 140px;
  height: 140px;
  margin: 12px auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background:
    repeating-linear-gradient(45deg, #F3F4F6 0 8px, #fff 8px 16px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  font-size: 12px;
  text-align: center;
}
.pay-ok {
  text-align: center;
  padding: 30px 10px;
}
.pay-ok .ok-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  font-size: 30px;
  line-height: 56px;
  margin: 0 auto 14px;
}
.pay-ok h3 { font-size: 19px; margin-bottom: 6px; }
.pay-ok p { color: var(--text-2); font-size: 14px; }

/* ============ 页签 ============ */
.tab-nav {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 18px;
  overflow-x: auto;
}
.tab-item {
  padding: 10px 18px;
  cursor: pointer;
  font-size: 15px;
  color: var(--text-2);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
}
.tab-item.active {
  color: var(--primary);
  font-weight: 600;
  border-bottom-color: var(--primary);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ============ 详情页 ============ */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.gallery .g-main {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  background: #F3F5F9;
}
.gallery .g-main img { width: 100%; height: 100%; object-fit: cover; }
.g-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 10px;
}
.g-thumb {
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1 / 1;
  background: #F3F5F9;
}
.g-thumb img { width: 100%; height: 100%; object-fit: cover; }
.g-thumb.active { border-color: var(--primary); }

.info-panel .info-merchant {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 8px;
}
.info-panel h1 {
  font-size: 21px;
  line-height: 1.4;
  margin-bottom: 12px;
}
.price-box {
  background: #FFF5F5;
  border-radius: 10px;
  padding: 14px 16px;
  margin: 12px 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.qty-btn {
  width: 34px;
  height: 34px;
  border: none;
  background: var(--bg);
  font-size: 16px;
}
.qty-input {
  width: 50px;
  height: 34px;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  text-align: center;
  font-size: 15px;
}
.buy-bar {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}
.service-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-2);
}
.service-row span {
  background: var(--bg);
  border-radius: 6px;
  padding: 3px 10px;
}

/* ============ 列表页 ============ */
.filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 16px;
  margin-bottom: 16px;
}
.sort-select {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 14px;
  background: #fff;
}
.result-info {
  margin-left: auto;
  font-size: 13px;
  color: var(--text-2);
}

/* ============ 分页 ============ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 24px 0;
  flex-wrap: wrap;
}
.pg-btn, .pg-num {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
}
.pg-num.active {
  background: var(--grad-primary);
  color: #fff;
  border-color: transparent;
}
.pg-disabled {
  opacity: .45;
  cursor: not-allowed;
}
.pg-ellipsis { padding: 0 4px; color: var(--text-2); }
.pg-info {
  width: 100%;
  text-align: center;
  font-size: 13px;
  color: var(--text-2);
  margin-top: 6px;
}

/* ============ 认证页 ============ */
.auth-box {
  max-width: 440px;
  margin: 30px auto;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}
.auth-tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border);
}
.auth-tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-2);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}
.auth-tab.active {
  color: var(--primary);
  font-weight: 700;
  border-bottom-color: var(--primary);
}
.auth-panel { display: none; }
.auth-panel.active { display: block; }
.auth-tip {
  text-align: center;
  font-size: 13px;
  color: var(--text-2);
  margin-top: 14px;
}
.auth-tip a { color: var(--primary); }

/* ============ 商家 ============ */
.merchant-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.merchant-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.merchant-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(31,41,55,.14); }
.mc-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.mc-avatar {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mc-name { font-size: 16px; font-weight: 700; }
.mc-intro {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
  height: 40px;
  overflow: hidden;
  margin-bottom: 10px;
}
.mc-stats {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 10px;
}
.mc-stats b { color: var(--text); }
.mc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.mc-tags .cat-badge { font-size: 11px; }

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 20px 0;
}
.step {
  text-align: center;
  padding: 18px 10px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  color: var(--text-2);
}
.step .step-no {
  width: 36px;
  height: 36px;
  line-height: 36px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--text-2);
  font-weight: 700;
}
.step.active { border: 1px solid var(--primary); }
.step.active .step-no { background: var(--grad-primary); color: #fff; }
.step.done .step-no { background: var(--success); color: #fff; }

.merchant-profile {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
}
.mp-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.mp-info { flex: 1; min-width: 200px; }
.mp-info h2 { font-size: 20px; margin-bottom: 6px; }
.mp-info p { font-size: 14px; color: var(--text-2); }
.mp-products h3 { font-size: 17px; margin: 18px 0 12px; }

/* ============ 个人中心 ============ */
.user-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  align-items: start;
}
.user-side {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.user-side .side-link {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
}
.user-side .side-link.active, .user-side .side-link:hover {
  background: #EFF4FF;
  color: var(--primary);
}
.user-main {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  min-height: 300px;
}
.profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--bg);
  border-radius: 10px;
  margin-bottom: 16px;
}
.profile-card .avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--grad-primary);
  color: #fff;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.order-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
}
.order-status {
  float: right;
  color: var(--success);
  font-size: 13px;
}

/* ============ 购物车 ============ */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
  align-items: start;
}
.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  margin-bottom: 12px;
}
.cart-item img {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  background: #F3F5F9;
}
.cart-check { width: 20px; height: 20px; }
.cart-item .ci-info { flex: 1; min-width: 0; }
.cart-item .ci-name { font-size: 14px; font-weight: 600; }
.cart-item .ci-price { color: var(--danger); font-weight: 700; }
.cart-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.cart-qty button {
  width: 28px; height: 28px;
  border: none; background: var(--bg);
}
.cart-qty input {
  width: 44px; height: 28px;
  border: none; border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  text-align: center; font-size: 14px;
}
.cart-summary {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  position: sticky;
  top: 80px;
}
.cart-summary .sum-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 10px;
}
.cart-summary .sum-total { color: var(--danger); font-size: 20px; font-weight: 700; }

/* ============ 首页特色块 ============ */
.home-hero {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  margin-bottom: 20px;
  height: 340px;
  box-shadow: 0 10px 30px rgba(31, 41, 55, .14);
}
.home-hero .slide {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--grad-primary);
}
.home-hero .slide img {
  width: 100%; height: 100%; object-fit: cover;
}
.home-hero .hero-caption {
  position: absolute;
  left: 24px;
  bottom: 20px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.home-hero .hero-caption h2 { font-size: 23px; margin-bottom: 6px; }
.home-hero .hero-caption p { font-size: 14px; }
.swiper-dots {
  position: absolute;
  bottom: 12px;
  right: 20px;
  display: flex;
  gap: 6px;
}
.swiper-dots .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  cursor: pointer;
}
.swiper-dots .dot.active { background: #fff; }

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 20px;
}
.stat-strip .stat-item { text-align: center; }
.stat-strip .stat-num { font-size: 24px; font-weight: 700; color: var(--primary); }
.stat-strip .stat-label { font-size: 13px; color: var(--text-2); }

.category-entry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.cat-entry-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform .18s ease;
}
.cat-entry-card:hover { transform: translateY(-3px); }
.cat-entry-card .cat-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
}
.cat-entry-card h3 { font-size: 17px; }
.cat-entry-card p { font-size: 13px; color: var(--text-2); }

/* ============ 通用状态 ============ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-2);
}
.empty-state .empty-icon { font-size: 44px; margin-bottom: 12px; }

.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(31, 41, 55, .92);
  color: #fff;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 14px;
  z-index: 2000;
  opacity: 0;
  transition: opacity .2s ease, top .2s ease;
  pointer-events: none;
}
.toast.show { opacity: 1; top: 90px; }
.toast.toast-success { background: rgba(7, 193, 96, .95); }
.toast.toast-error { background: rgba(255, 77, 79, .95); }

.notice-bar {
  display: none;
  background: #FFF7E6;
  border: 1px solid #FFE58F;
  color: #AD6800;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
}

/* 表格固定列宽 */
.table-fixed { width: 100%; table-layout: fixed; border-collapse: collapse; }
.table-fixed th, .table-fixed td {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  text-align: left;
  word-break: break-all;
}

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .merchant-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-layout { grid-template-columns: 1fr; }
  .cart-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
}

@media (max-width: 768px) {
  .topbar-inner { flex-wrap: wrap; gap: 6px 12px; }
  .topbar-slogan { font-size: 12px; }
  .header-inner { flex-wrap: wrap; padding: 8px 16px; gap: 10px; }
  .hamburger { display: block; margin-left: auto; }
  .main-nav {
    display: none;
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 10px;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px; border-radius: 8px; }
  .search-bar { width: 140px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .merchant-grid { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
  .user-layout { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .category-entry { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .home-hero { height: 190px; border-radius: 12px; }
  .home-hero .hero-caption h2 { font-size: 18px; }
  .home-hero .hero-caption { left: 16px; bottom: 16px; }
  .page-banner h1 { font-size: 20px; }
}

@media (max-width: 420px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .search-bar { display: none; }
}
