:root {
  --bg: #f0f4ff;
  --bg-soft: #e6eaff;
  --bg-card: rgba(255, 255, 255, 0.85);
  --border: #d8e0f5;
  --text: #1a1d26;
  --text-dim: #5a6180;
  --accent: #3730a3;
  --accent-soft: #4f46e5;
  --radius: 10px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(180deg, #f5f7ff, #eef1ff);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ---------- 顶部导航 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 60px;
}
.logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--accent);
  white-space: nowrap;
}
.logo span { color: var(--text); }
.logo small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-dim);
  letter-spacing: 0;
}
.nav {
  display: flex;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
}
.nav a {
  padding: 8px 12px;
  font-size: 14px;
  color: var(--text-dim);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color .15s;
}
.nav a:hover { color: var(--text); }
.nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}
.search {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-soft);
}
.search input {
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 7px 10px;
  width: 150px;
  outline: none;
  font-size: 13px;
}
.search button {
  border: 0;
  background: var(--accent);
  color: #fff;
  padding: 0 14px;
  cursor: pointer;
  font-size: 13px;
}
.category-header {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 20px;
  align-items: flex-start;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
}
.category-header-left {
  grid-column: span 3;
}
.category-header-right {
  grid-column: 4;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.category-header h1 {
  font-size: 24px;
  margin-bottom: 4px;
  color: var(--text);
}
.category-header p {
  color: var(--text-dim);
  font-size: 14px;
}
.btn-login {
  font-size: 13px;
  padding: 7px 14px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent);
}
.btn-login:hover { background: var(--accent); color: #fff; }

/* ---------- 轮播 ---------- */
.carousel-wrap {
  width: 100%;
  margin-top: 0;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}
.carousel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #f0f4ff, #e6eaff);
  aspect-ratio: 16 / 5;
  border-radius: 10px;
}
.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .6s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel-slide.active { opacity: 1; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 767px) {
  .carousel-slide img { object-fit: contain; }
}
.carousel-slide a { position: absolute; inset: 0; z-index: 2; }
.carousel-slide .slide-title {
  position: absolute; bottom: 16px; left: 20px; z-index: 3;
  background: rgba(0,0,0,.55); color: #fff; font-size: 15px;
  padding: 6px 14px; border-radius: 8px;
}
.carousel-dots {
  position: absolute; bottom: 12px; right: 20px; z-index: 10;
  display: flex; gap: 8px;
}
.carousel-dots span {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,.45); cursor: pointer;
  transition: background .2s;
}
.carousel-dots span.active { background: var(--accent); }
.carousel-arrow {
  position: absolute; top: 50%; z-index: 10;
  transform: translateY(-50%);
  background: rgba(255,255,255,.7); color: var(--text);
  border: none; border-radius: 50%; width: 36px; height: 36px;
  cursor: pointer; font-size: 18px; line-height: 36px; text-align: center;
  transition: background .2s;
}
.carousel-arrow:hover { background: #fff; }
.carousel-arrow.prev { left: 12px; }
.carousel-arrow.next { right: 12px; }
.carousel-empty {
  aspect-ratio: 16 / 5;
  background: linear-gradient(135deg, #f0f4ff, #e6eaff);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim);
  font-size: 15px;
}

/* ---------- 促销头部区 ---------- */
.promo-header {
  max-width: 1280px;
  margin: 20px auto 0;
  padding: 0 20px;
}
.promo-header-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
  padding: 28px 22px;
  background: linear-gradient(135deg, #f0f4ff, #e8ecff);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.promo-header-content {
  flex: 1;
}
.promo-header .promo-badge {
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 1.5px;
  margin-bottom: 10px;
}
.promo-header .promo-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 8px;
}
.promo-header .promo-desc {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.6;
}
.promo-header .promo-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.promo-group {
  flex: 1 1 calc(50% - 8px);
  min-width: 0;
  background: #fff;
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.promo-group-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 10px;
  padding-left: 8px;
  border-left: 3px solid var(--accent);
}
.promo-group-btns {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
}
.promo-header .promo-actions a {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--accent);
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  flex: 1;
  min-width: 0;
  min-height: 56px;
  transition: background .15s, transform .15s;
  text-decoration: none;
  border: none;
}
.promo-header .promo-actions a:hover {
  background: var(--accent-soft);
  transform: translateY(-2px);
}

/* ---------- 促销卡片区 ---------- */
.promo-wrap {
  max-width: 1280px;
  margin: 20px auto 0;
  padding: 0 20px;
  display: flex;
  gap: 18px;
}
.promo-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.promo-left {
  flex: 1.4;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
}
.promo-right {
  flex: 1;
}
.promo-badge {
  font-size: 8px;
  color: var(--accent);
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}
.promo-title {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 8px;
}
.promo-desc {
  font-size: 10px;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 12px;
}
.part-search-box {
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
}
.part-search-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.part-search-row {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.part-search-row input {
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 10px;
  outline: none;
  color: var(--text);
  height: 24px;
}
.part-search-row input:focus {
  border-color: var(--accent);
}
.part-search-row input[readonly] {
  background: #f9f9f9;
  color: var(--accent);
  font-weight: 600;
}
.part-search-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text);
  padding-bottom: 4px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  min-height: 24px;
}
.part-search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 90px;
}
.part-search-field {
  width: 50px;
  flex: 0 0 50px;
}
.part-search-field-label {
  display: block;
  font-size: 8px;
  color: var(--text-dim);
  text-align: center;
  margin-bottom: 2px;
}
.ps-input {
  min-width: 90px;
}
.ps-price,
.ps-qty,
.ps-total,
.ps-virtual-stock,
.ps-actual-stock {
  text-align: center;
}
/* 新增行没有小标签，输入框顶部需要对齐 */
.part-search-row:has(.part-search-field-label:not(:empty)) .part-search-label {
  padding-top: 18px;
}
.total-row {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(99, 102, 241, 0.2);
  justify-content: center;
  gap: 8px;
}
.total-row .part-search-label {
  color: var(--accent);
  padding-bottom: 0;
}
.total-row .part-search-input-wrap,
.total-row .part-search-field {
  display: none;
}
.total-row .part-search-field:last-child {
  display: block;
}
#machineTotalBox {
  background: #eef2ff;
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  min-width: 100px;
  text-align: center;
}
.part-suggest-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 20;
  display: none;
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
}
.part-suggest-dropdown.open {
  display: block;
}
.part-suggest-item {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background .15s;
}
.part-suggest-item:hover,
.part-suggest-item.active {
  background: var(--bg-soft);
}
.part-suggest-empty {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-dim);
  cursor: default;
}
.promo-actions {
  display: flex;
  gap: 6px;
}
.btn-promo-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-align: center;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  transition: background .15s;
}
.btn-promo-primary:hover {
  background: var(--accent-soft);
}
.btn-promo-secondary {
  display: inline-block;
  background: rgba(255,255,255,.8);
  color: var(--text);
  text-align: center;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 10px;
  border: 1px solid var(--border);
  transition: all .15s;
}
.btn-promo-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.promo-table-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
}
.promo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.promo-table th {
  background: linear-gradient(135deg, #f0f4ff, #e8ecff);
  color: var(--text-dim);
  font-weight: 600;
  padding: 10px 10px;
  text-align: left;
  font-size: 12px;
}
.promo-table td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--border);
}
.promo-table tr:last-child td {
  border-bottom: none;
}
.promo-table .price {
  color: var(--accent);
  font-weight: 700;
}
.promo-table .discount {
  color: var(--accent);
  font-weight: 600;
}

/* ---------- 首页功能入口卡片 ---------- */
.promo-actions-wrap {
  max-width: 1280px;
  margin: 20px auto 0;
  padding: 0 20px;
  display: flex;
  gap: 18px;
}
.promo-action-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  text-decoration: none;
  color: var(--text);
  transition: transform .2s, box-shadow .2s;
  cursor: pointer;
}
.promo-action-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.1);
}
.promo-action-card.promo-action-query {
  background: linear-gradient(135deg, #eef2ff 0%, #ffffff 60%);
  border: 1px solid rgba(99, 102, 241, 0.15);
}
.promo-action-card.promo-action-list {
  background: linear-gradient(135deg, #fff7ed 0%, #ffffff 60%);
  border: 1px solid rgba(249, 115, 22, 0.15);
}
.promo-action-icon {
  font-size: 40px;
  flex-shrink: 0;
}
.promo-action-text {
  flex: 1;
  min-width: 0;
}
.promo-action-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}
.promo-action-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
}
.promo-action-arrow {
  font-size: 28px;
  color: var(--text-dim);
  flex-shrink: 0;
  line-height: 1;
}

/* 查询/活动独立页 */
.page-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px;
}
.page-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.page-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-card);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.page-title {
  font-size: 24px;
  font-weight: 800;
}
.query-container,
.promo-container {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.query-container .part-search-box {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}

/* ---------- 公告政策栏 ---------- */
.policies-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 20px;
}
.policies-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.policies-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.policies-header h3::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 16px;
  background: var(--accent);
  margin-right: 10px;
  vertical-align: -2px;
  border-radius: 2px;
}
.policies-header a {
  font-size: 14px;
  color: var(--accent);
}
.policies-list {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.policy-item {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.policy-item:last-child {
  border-bottom: none;
}
.policy-item:hover {
  background: rgba(99, 102, 241, 0.03);
}
.policy-type {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
  padding: 3px 10px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 20px;
  margin-right: 16px;
  white-space: nowrap;
}
.policy-title {
  flex: 1;
  font-size: 15px;
  color: var(--text);
  cursor: pointer;
  transition: color 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.policy-title:hover {
  color: var(--accent);
}
.policy-top {
  font-size: 11px;
  color: #fff;
  background: #ff4d4f;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 16px;
  white-space: nowrap;
}
.policy-time {
  font-size: 13px;
  color: var(--text-dim);
  white-space: nowrap;
}
.policy-author {
  font-size: 13px;
  color: var(--text-dim);
  white-space: nowrap;
  margin-right: 20px;
}

/* ---------- 公告详情页 ---------- */
.policy-detail-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 30px 20px 60px;
}
.policy-detail-header {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.policy-detail-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 12px;
}
.policy-detail-meta {
  font-size: 14px;
  color: var(--text-dim);
}
.policy-detail-meta span {
  margin-right: 20px;
}
.policy-detail-content {
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}
.policy-detail-content p {
  margin-bottom: 16px;
}
.policy-detail-content h1,
.policy-detail-content h2,
.policy-detail-content h3,
.policy-detail-content h4 {
  font-weight: 600;
  margin: 24px 0 12px;
}
.policy-detail-content h1 { font-size: 20px; }
.policy-detail-content h2 { font-size: 18px; }
.policy-detail-content h3 { font-size: 16px; }
.policy-detail-content ul,
.policy-detail-content ol {
  padding-left: 24px;
  margin-bottom: 16px;
}
.policy-detail-content li {
  margin-bottom: 8px;
}
.policy-detail-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 14px;
}
.policy-detail-content th,
.policy-detail-content td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
}
.policy-detail-content th {
  background: var(--bg-soft);
  font-weight: 600;
}
.policy-detail-content strong {
  font-weight: 600;
}
.policy-detail-content img {
  max-width: 100%;
  height: auto;
}
.detail-desc img {
  max-width: 100%;
  height: auto;
}
.detail-cover img {
  max-width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
}
.detail-card {
  max-width: 1000px;
  margin: 0 auto;
}
.policy-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 20px;
  cursor: pointer;
}

/* ---------- 内容区 ---------- */
.container { max-width: 1280px; margin: 0 auto; padding: 24px 20px 60px; }
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 30px 0 18px;
}
.section-title h2 { font-size: 18px; font-weight: 700; }
.section-title h2::before {
  content: "";
  display: inline-block;
  width: 4px; height: 16px;
  background: var(--accent);
  margin-right: 10px;
  vertical-align: -2px;
  border-radius: 2px;
}

/* ---------- 卡片网格 ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
}
.card-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  text-align: center;
  padding: 10px;
  overflow: hidden;
}
.card-cover img { width: 100%; height: 100%; object-fit: cover; }
.card-cover .tag {
  position: absolute;
  top: 8px; left: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
}
.card-body { padding: 12px 14px 14px; }
.card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  height: 40px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.card-meta {
  display: flex;
  gap: 14px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-dim);
}
.card-meta span { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- 页脚 ---------- */
.footer, footer {
  border-top: 1px solid var(--border);
  padding: 30px 20px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  background: var(--bg-soft);
}

.empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-dim);
  padding: 60px 0;
}

/* ---------- 分页器 ---------- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding-bottom: 20px;
  flex-wrap: wrap;
}
.page-btn {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
}
.page-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}
.page-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.page-btn:disabled,
.page-btn.disabled {
  opacity: .5;
  cursor: not-allowed;
}
.page-ellipsis {
  color: var(--text-dim);
  font-size: 13px;
  padding: 0 4px;
}
.page-jump {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-dim);
  margin-left: 4px;
}
.page-jump input {
  width: 52px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card);
  color: var(--text);
  text-align: center;
  font-size: 13px;
  outline: none;
}
.page-jump input:focus { border-color: var(--accent); }

/* ---------- 汉堡菜单按钮 ---------- */
.hamburger {
  display: none;
  width: 36px; height: 36px;
  background: transparent; border: none; cursor: pointer;
  padding: 6px; flex-direction: column; justify-content: center; gap: 5px;
  align-items: center; z-index: 60;
  visibility: hidden;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 响应式：平板 (768px - 1024px) ---------- */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .category-header { grid-template-columns: repeat(3, 1fr); }
  .category-header-left { grid-column: span 2; }
  .category-header-right { grid-column: 3; }
  .topbar-inner { gap: 16px; }
  .nav a { padding: 6px 8px; font-size: 13px; }
  .search input { width: 110px; }
  .carousel { aspect-ratio: 1024 / 320; }
  .carousel-arrow { width: 32px; height: 32px; font-size: 16px; line-height: 32px; }
  .carousel-slide .slide-title { font-size: 14px; padding: 5px 10px; }
  .detail-title { font-size: 20px; }
  .detail-body { padding: 20px; }
  .promo-wrap { flex-direction: column; }
  .promo-card { padding: 18px; }
  .promo-title { font-size: 20px; }
}

/* ---------- 响应式：手机 (< 768px) ---------- */
@media (max-width: 767px) {
  .hamburger { display: none; }
  .nav {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 4px;
    flex: 1;
    padding: 0;
    position: static;
    background: transparent;
    border-bottom: none;
    box-shadow: none;
    z-index: auto;
  }
  .nav a { padding: 8px 10px; font-size: 12px; border-bottom: 2px solid transparent; border-left: none; white-space: nowrap; }
  .nav a.active { border-bottom-color: var(--accent); border-left-color: transparent; }
  .topbar-inner { gap: 10px; }
  .topbar-right { gap: 8px; }
  .category-header { grid-template-columns: 1fr; }
  .category-header-left { grid-column: 1; }
  .category-header-right { grid-column: 1; justify-content: flex-start; margin-top: 10px; }
  .topbar-inner .search { display: none; }
  .topbar-inner .mobile-search {
    display: flex; margin-top: 8px; width: 100%;
  }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-body { padding: 10px 12px; }
  .card-title { font-size: 13px; height: 36px; }
  .card-meta { font-size: 11px; gap: 10px; }
  .card-actions .act-btn { font-size: 11px; padding: 3px 8px; }
  .container { padding: 16px 12px 40px; }
  .carousel { aspect-ratio: 4 / 3; }
  .carousel-arrow { width: 28px; height: 28px; font-size: 14px; line-height: 28px; }
  .carousel-arrow.prev { left: 6px; }
  .carousel-arrow.next { right: 6px; }
  .carousel-slide .slide-title { font-size: 13px; padding: 4px 10px; bottom: 10px; left: 10px; }
  .carousel-dots span { width: 8px; height: 8px; }
  .carousel-dots { bottom: 8px; right: 10px; gap: 6px; }
  .section-title h2 { font-size: 16px; }
  .section-title { margin: 20px 0 14px; }
  .logo { font-size: 18px; }
  .logo small { font-size: 10px; }
  .btn-login { font-size: 12px; padding: 6px 10px; }
  .footer, footer { padding: 20px 12px; font-size: 12px; }
  .detail { padding: 0 12px; margin: 16px auto; }
  .detail-title { font-size: 18px; }
  .detail-body { padding: 16px; }
  .detail-desc { font-size: 14px; }
  .detail-cover { aspect-ratio: 16/10; }
  .detail-like-btn { padding: 8px 16px; font-size: 14px; }
  .comment-form { flex-wrap: wrap; }
  .comment-form input { min-width: 0; }
  .comment-form input:first-child { width: 100% !important; }
  .download-item { flex-wrap: wrap; gap: 6px; }
  .download-item .dl-btn { width: 100%; text-align: center; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .promo-header { padding: 0 12px; }
  .promo-header-inner { flex-direction: column; align-items: flex-start; }
  .promo-header .promo-title { font-size: 16px; }
  .promo-header .promo-desc { font-size: 11px; }
  .promo-header .promo-actions { align-self: stretch; flex-direction: column; gap: 12px; }
  .promo-group { width: 100%; padding: 12px 12px; border-radius: 8px; }
  .promo-group-title { font-size: 12px; margin-bottom: 8px; }
  .promo-group-btns { gap: 8px; }
  .promo-group-btns a {
    flex: 1;
    min-width: 0;
    font-size: 11px;
    padding: 10px 8px;
    min-height: 44px;
    height: auto;
  }
  .promo-wrap { padding: 0 12px; gap: 12px; }
  .promo-card { padding: 14px; }
  .promo-left { padding: 0; }
  .promo-title { font-size: 18px; }
  .promo-desc { font-size: 12px; }
  .promo-table { font-size: 11px; }
  .promo-table th, .promo-table td { padding: 8px 6px; }
  .promo-actions-wrap {
    flex-direction: column;
    padding: 0 12px;
    gap: 12px;
  }
  .promo-action-card {
    padding: 18px 20px;
    gap: 12px;
  }
  .promo-action-icon { font-size: 32px; }
  .promo-action-title { font-size: 16px; }
  .promo-action-desc { font-size: 12px; }
  .promo-action-arrow { font-size: 24px; }
  .page-wrap { padding: 16px 12px; }
  .page-title { font-size: 20px; }
  .query-container,
  .promo-container { padding: 16px; }
  .policies-wrap { padding: 16px 12px; }
  .policies-header { margin-bottom: 12px; }
  .policies-header h3 { font-size: 14px; }
  .policies-header h3::before { height: 12px; margin-right: 6px; }
  .policies-header a { font-size: 11px; }
  .policy-item { padding: 8px 10px; }
  .policy-type { font-size: 9px; padding: 1px 5px; margin-right: 6px; }
  .policy-title { font-size: 10px; white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.4; }
  .policy-top { font-size: 8px; padding: 1px 3px; margin-right: 6px; }
  .policy-time { font-size: 9px; }
  .policy-author { font-size: 9px; margin-right: 8px; }
  .footer, footer { padding: 16px 12px; font-size: 10px; }
  .part-search-row { flex-wrap: nowrap; }
  .part-search-label { 
    white-space: normal; 
    font-size: 9px;
    min-width: 32px;
    flex: 0 0 auto;
    padding-bottom: 0;
    min-height: 20px;
  }
  .part-search-input-wrap { min-width: 50px; flex: 1; }
  .part-search-field { width: 36px; flex: 0 0 36px; }
  .part-search-row input { font-size: 9px; height: 20px; padding: 2px 3px; }
  .part-search-field-label { font-size: 7px; margin-bottom: 1px; }
  .part-suggest-dropdown { max-height: 180px; right: -30px; left: -30px; min-width: 300px; max-width: 500px; overflow-x: auto; overflow-y: auto; }
  .part-suggest-item { font-size: 9px; padding: 5px 10px; white-space: nowrap; overflow: visible; text-overflow: clip; line-height: 1.3; }

/* ---------- 响应式：小手机 (< 480px) ---------- */
@media (max-width: 480px) {
  .grid { grid-template-columns: 1fr; }
  .card-cover { aspect-ratio: 16 / 9; }
  .card-meta { flex-wrap: wrap; }
  .topbar-inner { padding: 0 12px; height: 54px; }
  .carousel { aspect-ratio: 4 / 2; }
  .cat-grid { grid-template-columns: 1fr; }
  .pwd-btn-row { flex-direction: column; align-items: flex-start; }
  .part-search-row { flex-wrap: nowrap; }
  .part-search-label { 
    white-space: normal; 
    font-size: 8px;
    min-width: 28px;
    flex: 0 0 auto;
    padding-bottom: 0;
    min-height: 18px;
  }
  .part-search-input-wrap { min-width: 45px; flex: 1; }
  .part-search-field { width: 32px; flex: 0 0 32px; }
  .part-search-row input { font-size: 8px; height: 18px; padding: 1px 2px; }
  .part-search-field-label { font-size: 6px; margin-bottom: 1px; }
  .part-suggest-dropdown { max-height: 160px; right: -25px; left: -25px; min-width: 280px; max-width: 450px; overflow-x: auto; overflow-y: auto; }
  .part-suggest-item { font-size: 8px; padding: 4px 8px; white-space: nowrap; overflow: visible; text-overflow: clip; line-height: 1.3; }
}

/* ---------- 卡片交互：点赞/评论/下载 ---------- */
.card-actions {
  display: flex; gap: 8px; margin-top: 10px; align-items: center;
}
.card-actions .act-btn {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--text-dim); cursor: pointer;
  border: 1px solid var(--border); border-radius: 6px;
  padding: 4px 10px; background: var(--bg-soft); transition: all .15s;
}
.card-actions .act-btn:hover { border-color: var(--accent); color: var(--accent); }
.card-actions .act-btn.liked { color: var(--accent); border-color: var(--accent); background: rgba(255,106,0,.08); }
.card-actions .act-btn.download-btn { background: var(--accent); color: #fff; border-color: var(--accent); }
.card-actions .act-btn.download-btn:hover { background: var(--accent-soft); }

/* ---------- 详情页评论 ---------- */
.comment-section {
  margin-top: 30px; padding-top: 20px;
  border-top: 1px solid var(--border);
}
.comment-section h4 { font-size: 16px; margin-bottom: 14px; }
.comment-form {
  display: flex; gap: 10px; margin-bottom: 18px;
}
.comment-form input {
  flex: 1; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--bg-soft); font-size: 14px;
  color: var(--text); outline: none;
}
.comment-form input:focus { border-color: var(--accent); }
.comment-form button {
  background: var(--accent); color: #fff; border: none;
  border-radius: 8px; padding: 10px 18px; cursor: pointer; font-size: 14px;
}
.comment-list { list-style: none; }
.comment-item {
  padding: 12px 0; border-bottom: 1px solid var(--border);
  font-size: 14px; line-height: 1.6;
}
.comment-item .c-time { color: var(--text-dim); font-size: 12px; margin-left: 8px; }
.comment-item .c-name { font-weight: 600; color: var(--accent); }

/* ---------- 详情页附件下载 ---------- */
.download-section {
  margin-top: 24px; padding: 18px 20px;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 12px;
}
.download-section h4 { font-size: 15px; margin-bottom: 12px; }
.download-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 8px;
  margin-bottom: 8px; transition: border-color .15s;
}
.download-item:hover { border-color: var(--accent); }
.download-item .dl-icon { font-size: 20px; }
.download-item .dl-name { flex: 1; font-size: 14px; font-weight: 500; }
.download-item .dl-size { font-size: 12px; color: var(--text-dim); }
.download-item .dl-btn {
  background: var(--accent); color: #fff; font-size: 12px;
  padding: 5px 14px; border-radius: 6px; cursor: pointer;
  border: none; font-weight: 600;
}

/* ---------- 详情页点赞 ---------- */
.detail-like {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 16px; cursor: pointer;
  padding: 8px 16px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg-soft);
  font-size: 14px; transition: all .2s;
}
.detail-like:hover { border-color: var(--accent); }
.detail-like.liked { color: var(--accent); border-color: var(--accent); background: rgba(255,106,0,.08); }

/* ---------- 登录态：右上角用户菜单 ---------- */
.user-box { position: relative; }
.user-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 140px; background: #fff; border: 1px solid var(--border);
  border-radius: 10px; padding: 8px; box-shadow: 0 12px 30px rgba(0,0,0,.12); z-index: 60;
}
.user-menu-name {
  font-size: 13px; color: var(--text); padding: 6px 8px;
  border-bottom: 1px solid var(--border); margin-bottom: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-menu button {
  width: 100%; text-align: left; background: transparent; border: none; cursor: pointer;
  color: var(--text-dim); font-size: 13px; padding: 8px; border-radius: 6px;
}
.user-menu button:hover { background: var(--bg-soft); color: var(--accent); }

/* ---------- 登录/注册弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 200; display: none;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,.5); backdrop-filter: blur(2px);
}
.modal {
  position: relative; width: 360px; max-width: 92vw;
  background: #fff; border-radius: 14px; padding: 28px 26px 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.modal-close {
  position: absolute; top: 12px; right: 14px; width: 30px; height: 30px;
  border: none; background: var(--bg-soft); border-radius: 8px; cursor: pointer;
  font-size: 18px; color: var(--text-dim); line-height: 30px;
}
.modal-close:hover { background: var(--border); color: var(--text); }
.modal-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.modal-tab {
  flex: 1; text-align: center; padding: 10px 0; font-size: 15px; cursor: pointer;
  color: var(--text-dim); border-bottom: 2px solid transparent; transition: all .15s;
}
.modal-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.modal-panel .field { margin-bottom: 14px; }
.modal-panel .field label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; }
.modal-panel .field input {
  width: 100%; padding: 11px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg-soft); font-size: 14px; color: var(--text); outline: none;
}
.modal-panel .field input:focus { border-color: var(--accent); background: #fff; }
.modal-submit {
  width: 100%; margin-top: 6px; padding: 12px; border: none; border-radius: 8px;
  background: var(--accent); color: #fff; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background .15s;
}
.modal-submit:hover { background: var(--accent-soft); }
.modal-msg { margin-top: 12px; font-size: 13px; color: var(--text-dim); min-height: 18px; }
.modal-msg.err { color: #e03131; }



/* ---------- 评论：已登录昵名提示 ---------- */
.comment-as {
  font-size: 13px; color: var(--accent); background: rgba(255,106,0,.06);
  border: 1px solid rgba(255,106,0,.2); border-radius: 8px;
  padding: 8px 12px; margin-bottom: 12px;
}

/* ---------- 后台会员列表 ---------- */
.member-list { margin-top: 6px; }
.member-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; }
.member-table { width: 100%; min-width: 900px; border-collapse: collapse; font-size: 13px; }
.member-table th, .member-table td {
  text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border);
  vertical-align: middle; white-space: nowrap;
}
.member-table th { color: var(--text-dim); font-weight: 600; background: var(--bg-soft); }
.member-table tr:hover td { background: var(--bg-soft); }
.member-table td:nth-child(9) { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-table input, .member-table select { padding: 6px 8px; border: 1px solid var(--border); border-radius: 4px; background: var(--bg-card); font-size: 13px; }
.member-table input:focus, .member-table select:focus { border-color: var(--accent); outline: none; }

#externalContent {
  display: none;
  width: 100%;
  min-height: calc(100vh - 60px);
  background: #6366f1;
  z-index: 30;
  overflow-y: auto;
  position: relative;
}

.iframe-crop-wrap {
  width: 100%;
  min-height: calc(100vh - 60px);
}

#externalIframe {
  width: 100%;
  height: 1800px;
  border: none;
}

@media (max-width: 767px) {
  #externalContent {
    min-height: calc(100vh - 54px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .iframe-crop-wrap {
    min-height: calc(100vh - 54px);
  }
  #externalIframe {
    height: 2200px;
  }
}

/* =========================================================
   移动端适配优化
   ========================================================= */

/* ---------- 移动端：手机 (< 768px) ---------- */
@media (max-width: 767px) {
  body { -webkit-text-size-adjust: 100%; }
  
  /* 顶部导航 */
  .topbar-inner { 
    gap: 8px; 
    padding: 0 12px; 
    height: 50px;
    max-width: 100%;
  }
  .logo { font-size: 16px; }
  .logo small { font-size: 9px; }
  .topbar-right .search { display: none; }
  .btn-login { 
    font-size: 12px; 
    padding: 5px 10px; 
    white-space: nowrap;
  }
  
  /* 导航栏改为可横向滚动 */
  .nav {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex: 1;
    min-width: 0;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { 
    padding: 6px 10px; 
    font-size: 13px; 
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    flex-shrink: 0;
  }
  .nav a.active { border-bottom-color: var(--accent); }
  
  /* 主内容区 */
  main { padding-bottom: 60px; }
  
  /* 轮播 */
  .carousel-wrap { padding: 0 12px; }
  .carousel { aspect-ratio: 16/10; border-radius: 8px; }
  .carousel-arrow { width: 28px; height: 28px; font-size: 14px; line-height: 28px; }
  .carousel-arrow.prev { left: 6px; }
  .carousel-arrow.next { right: 6px; }
  .carousel-slide .slide-title { font-size: 12px; padding: 4px 10px; bottom: 8px; left: 8px; }
  .carousel-dots { bottom: 6px; right: 8px; gap: 4px; }
  .carousel-dots span { width: 6px; height: 6px; }
  
  /* 促销头部 */
  .promo-header { padding: 0 12px; margin-top: 12px; }
  .promo-header-inner { 
    flex-direction: column; 
    padding: 16px 14px;
    gap: 12px;
  }
  .promo-header .promo-title { font-size: 16px; }
  .promo-header .promo-desc { font-size: 12px; }
  .promo-header .promo-actions { 
    align-self: stretch;
    flex-direction: column;
    gap: 10px;
  }
  .promo-group { width: 100%; padding: 10px 10px; border-radius: 8px; }
  .promo-group-title { font-size: 11px; margin-bottom: 6px; }
  .promo-group-btns { gap: 6px; }
  .promo-group-btns a {
    flex: 1;
    min-width: 0;
    font-size: 10px;
    padding: 8px 4px;
    min-height: 40px;
    height: auto;
  }
  
  /* 促销卡片区 */
  .promo-wrap { 
    flex-direction: column; 
    padding: 0 12px; 
    gap: 12px;
    margin-top: 12px;
  }
  .promo-card { padding: 14px; }
  .promo-title { font-size: 15px; }
  .promo-desc { font-size: 12px; }
  .promo-table { font-size: 11px; }
  .promo-table th, .promo-table td { padding: 6px 4px; }
  
  /* 产品卡片网格 */
  .container { padding: 16px 12px 40px; }
  .grid { 
    grid-template-columns: repeat(2, 1fr); 
    gap: 10px; 
  }
  .card { border-radius: 10px; }
  .card-body { padding: 10px 12px 12px; }
  .card-title { 
    font-size: 13px; 
    height: 36px; 
    line-height: 1.35;
  }
  .card-meta { font-size: 11px; gap: 8px; margin-top: 8px; }
  .card-actions { padding: 0 12px 12px; }
  .card-actions .act-btn { font-size: 11px; padding: 3px 8px; }
  
  /* 分类页网格 */
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  
  /* 公告政策 */
  .policies-wrap { padding: 16px 12px; }
  .policies-header { margin-bottom: 12px; }
  .policies-header h3 { font-size: 15px; }
  .policies-header h3::before { height: 14px; margin-right: 8px; }
  .policies-header a { font-size: 12px; }
  .policy-item { 
    padding: 10px 12px; 
    flex-wrap: wrap;
    gap: 6px;
  }
  .policy-type { font-size: 11px; padding: 2px 6px; margin-right: 0; }
  .policy-title { 
    font-size: 13px; 
    white-space: normal; 
    overflow: visible; 
    text-overflow: clip; 
    line-height: 1.4;
    width: 100%;
    flex: none;
  }
  .policy-top { font-size: 10px; padding: 1px 4px; margin-right: 0; }
  .policy-time { font-size: 11px; }
  .policy-author { font-size: 11px; margin-right: 0; }
  
  /* 查询区域 */
  .part-search-box { padding: 8px; }
  .part-search-title { font-size: 12px; margin-bottom: 8px; }
  .part-search-row { 
    flex-wrap: nowrap; 
    gap: 4px;
    margin-bottom: 8px;
    align-items: flex-end;
  }
  .part-search-label { 
    font-size: 12px;
    min-width: auto;
    flex: 0 0 auto;
    padding-bottom: 0;
    min-height: auto;
    white-space: nowrap;
  }
  .part-search-input-wrap { 
    min-width: 0; 
    flex: 2;
  }
  .part-search-field { 
    width: auto; 
    flex: 0 0 48px;
    min-width: 48px;
  }
  .part-search-field:has(.ps-qty) {
    flex: 0 0 32px;
    min-width: 32px;
  }
  .part-search-row input { 
    font-size: 12px; 
    height: 32px; 
    padding: 4px 4px; 
  }
  .part-search-field-label { font-size: 10px; margin-bottom: 2px; }
  
  /* 合计行 */
  .total-row { 
    flex-wrap: wrap; 
    gap: 8px;
    justify-content: center;
  }
  .total-row .part-search-label { 
    flex: 0 0 auto;
    min-width: auto;
  }
  #machineTotalBox { 
    font-size: 14px; 
    min-width: 120px;
    text-align: center;
  }
  
  /* 搜索建议下拉 */
  .part-suggest-dropdown { 
    max-height: 200px; 
    left: 0; 
    right: 0;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
  }
  .part-suggest-item { 
    font-size: 12px; 
    padding: 6px 10px; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    line-height: 1.4; 
  }
  
  /* 页脚 */
  .footer, footer { 
    padding: 20px 12px 80px; 
    font-size: 11px; 
  }
  
  /* 详情页 */
  .detail { padding: 0 12px; margin: 12px auto; }
  .detail-title { font-size: 18px; }
  .detail-body { padding: 14px; }
  .detail-desc { font-size: 14px; }
  .detail-cover { aspect-ratio: 16/10; }
  .detail-like-btn { padding: 8px 18px; font-size: 14px; }
  
  /* 评论 */
  .comment-section { margin-top: 20px; padding-top: 16px; }
  .comment-section h4 { font-size: 15px; }
  .comment-form { flex-wrap: wrap; gap: 8px; }
  .comment-form input:first-child { width: 100%; }
  .comment-form button { width: 100%; }
  
  /* 下载项 */
  .download-section { margin-top: 16px; padding: 14px; }
  .download-item { flex-wrap: wrap; gap: 6px; }
  .download-item .dl-btn { width: 100%; text-align: center; }
  
  /* 分页器 */
  .pagination { gap: 6px; }
  .page-btn { padding: 6px 10px; font-size: 12px; }
  .page-jump { display: none; }
  
  /* section 标题 */
  .section-title h2 { font-size: 16px; }
  .section-title { margin: 20px 0 12px; }
  
  /* iframe 外部内容 */
  #externalContent {
    min-height: calc(100vh - 50px);
  }
  .iframe-crop-wrap {
    min-height: calc(100vh - 50px);
  }
  #externalIframe { height: 2200px; }
}

/* ---------- 小屏手机 (< 480px) ---------- */
@media (max-width: 480px) {
  .grid { grid-template-columns: 1fr; gap: 12px; }
  .cat-grid { grid-template-columns: 1fr; gap: 12px; }
  .card-cover { aspect-ratio: 16/10; }
  .topbar-inner { padding: 0 10px; height: 48px; }
  .logo { font-size: 15px; }
  .card-title { font-size: 14px; height: auto; }
  .card-meta { flex-wrap: wrap; }
  .card-actions { flex-wrap: wrap; }
  
  /* 产品卡片更紧凑 */
  .card-cover { aspect-ratio: 16/10; }
  .card-body { padding: 10px 14px 14px; }
  
  /* 查询区域更紧凑 */
  .part-search-row input { font-size: 11px; height: 30px; }
  .part-search-field { flex: 0 0 42px; min-width: 42px; }
  .part-search-field:has(.ps-qty) { flex: 0 0 28px; min-width: 28px; }
  .part-search-input-wrap { flex: 2; }
  
  /* 模态框 */
  .modal { 
    width: 340px; 
    padding: 24px 20px 20px;
  }
  .modal-tabs { margin-bottom: 14px; }
  .modal-tab { font-size: 14px; padding: 8px 0; }
  .modal-panel .field input { padding: 10px; font-size: 14px; }
  .modal-submit { padding: 11px; font-size: 15px; }
}

/* =========================================================
   移动端底部导航栏
   ========================================================= */
.mobile-tabbar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}

.mobile-tabbar-inner {
  display: flex;
  height: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.mobile-tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-dim);
  font-size: 11px;
  text-decoration: none;
  transition: color 0.2s;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
}

.mobile-tab-item:active {
  background: var(--bg-soft);
}

.mobile-tab-item.active {
  color: var(--accent);
}

.mobile-tab-icon {
  font-size: 22px;
  line-height: 1;
}

.mobile-tab-label {
  font-size: 11px;
  font-weight: 500;
}

/* 移动端显示底部导航 */
@media (max-width: 767px) {
  .mobile-tabbar {
    display: block;
  }
  body {
    padding-bottom: 60px;
  }
  main {
    padding-bottom: 10px;
  }
}

/* 悬浮客服按钮 */
.floating-service {
  position: fixed;
  right: 16px;
  bottom: 76px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 16px rgba(55, 48, 163, 0.3);
  cursor: pointer;
  z-index: 90;
  transition: transform 0.2s, box-shadow 0.2s;
  border: none;
}

.floating-service:active {
  transform: scale(0.95);
  box-shadow: 0 2px 8px rgba(55, 48, 163, 0.3);
}

.floating-service .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  background: #ff4d4f;
  border-radius: 8px;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  color: #fff;
  font-weight: 600;
}

@media (min-width: 768px) {
  .floating-service {
    display: none;
  }
}

/* =========================================================
   移动端分组按钮强制样式修复
   ========================================================= */
@media (max-width: 767px) {
  .promo-header .promo-actions {
    display: flex !important;
    flex-direction: column !important;
    align-self: stretch !important;
    gap: 12px !important;
    width: 100% !important;
  }
  
  .promo-group {
    flex: none !important;
    width: 100% !important;
    margin: 0 !important;
  }
  
  .promo-group-btns {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
  }
  
  .promo-group-btns a {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    font-size: 10px !important;
    padding: 8px 4px !important;
    min-height: 40px !important;
    height: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }
}

/* PC端分组按钮样式 */
@media (min-width: 768px) {
  .promo-header .promo-actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
  }
  
  .promo-group {
    flex: 1 1 calc(50% - 8px) !important;
    min-width: 0 !important;
  }
  
  .promo-group-btns {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
  }
  
  .promo-group-btns a {
    flex: 1 1 0% !important;
    min-width: 0 !important;
  }
}
