:root {
  --bg-canvas: #f5f7fb;
  --bg-card: #ffffff;
  --bg-muted: #f8fafc;
  --bg-hover: #f9fbff;

  --border-subtle: #e6ecf4;
  --border-default: #d2dce9;

  --text-strong: #0f1f38;
  --text-body: #334663;
  --text-muted: #64748b;
  --text-faint: #94a3b8;

  /* 克制的海军蓝 + 细微暖金点缀 */
  --navy-deep: #102444;
  --navy-mid: #1c3b6f;
  --indigo: #2948c7;
  --indigo-soft: #eff4ff;
  --indigo-border: #c9d7fc;

  --gold: #d97706;
  --gold-bright: #f59e0b;
  --gold-soft: #fffbeb;
  --gold-border: #fde68a;

  --teal-store: #0369a1;
  --teal-soft: #f0f9ff;
  --teal-border: #bae6fd;

  --green: #059669;
  --red: #dc2626;
  --red-soft: #fef2f2;

  --radius-card: 12px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 2px rgba(15, 31, 56, 0.04);
  --shadow-hover: 0 6px 18px -6px rgba(16, 36, 68, 0.09);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg-canvas);
  color: var(--text-strong);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.48;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 16px;
}

/* 兼容 /cards 页面基础样式 */
.site-header {
  background: var(--navy-deep);
  color: #ffffff;
  border-bottom: 1px solid rgba(253, 230, 138, 0.22);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 12px;
  padding-bottom: 12px;
  flex-wrap: wrap;
}
.brand-block { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--navy-mid);
  border: 1px solid rgba(253, 230, 138, 0.45);
  color: #fde68a;
  font-weight: 800;
  font-size: 13.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.site-title { margin: 0; font-size: 17.5px; font-weight: 800; color: #ffffff; }
.site-subtitle { margin: 2px 0 0; font-size: 12.5px; color: rgba(226, 232, 240, 0.85); }
.header-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.notice-banner {
  background: #fffbeb;
  border-bottom: 1px solid var(--gold-border);
  font-size: 12.5px;
  color: #78350f;
}
.notice-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  padding-top: 7px;
  padding-bottom: 7px;
}
.notice-pill {
  background: var(--navy-deep);
  color: #fde68a;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}
.notice-text { margin: 0; flex: 1 1 240px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 34px;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
}
.btn-sm { min-height: 32px; padding: 4px 11px; font-size: 12.5px; }
.btn-primary { background: var(--gold-bright); color: #0f172a; font-weight: 700; }
.btn-outline-primary { background: rgba(255, 255, 255, 0.12); color: #ffffff; border-color: rgba(255, 255, 255, 0.25); }
.btn-outline-accent { background: rgba(253, 230, 138, 0.15); color: #fde68a; border-color: rgba(253, 230, 138, 0.35); }
.btn-ghost { background: #fff; color: var(--text-body); border-color: var(--border-subtle); }

/* ==================== 紧凑顶栏（细微航海暖金顶线 + 小标志） ==================== */
.top-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-top: 2px solid var(--navy-deep);
  border-bottom: 1px solid var(--border-subtle);
}

.top-header::before {
  content: "";
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(245, 158, 11, 0.45) 50%, transparent 100%);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 54px;
  padding-top: 7px;
  padding-bottom: 7px;
}

.brand-home {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(214, 184, 124, 0.58);
  background: #102438;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(11, 41, 66, 0.16);
  transition: transform 0.16s ease;
}

.brand-crest-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-home:hover .brand-mark {
  transform: translateY(-1px);
}

.brand-name {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--navy-deep);
  letter-spacing: -0.2px;
}

.brand-divider {
  width: 1px;
  height: 13px;
  background: var(--border-default);
}

.brand-sub {
  font-size: 13px;
  font-weight: 650;
  color: var(--text-body);
}

/* 搜索框（完全可收缩，绝不溢出） */
.hero-search {
  display: flex;
  align-items: center;
  flex: 1 1 380px;
  max-width: 480px;
  min-width: 0;
  height: 40px;
  background: var(--bg-muted);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-pill);
  padding: 2px 2px 2px 12px;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.hero-search:focus-within {
  background: #ffffff;
  border-color: var(--navy-mid);
  box-shadow: 0 0 0 3px rgba(28, 59, 111, 0.1);
}

.search-icon {
  display: inline-flex;
  color: var(--text-faint);
  margin-right: 7px;
  flex-shrink: 0;
}

.hero-search input {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: 13.5px;
  color: var(--text-strong);
  outline: none;
}

.hero-search input::placeholder {
  color: var(--text-faint);
}

.search-clear {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
  min-width: 34px;
  height: 36px;
  padding: 0 6px;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.search-submit {
  height: 36px;
  padding: 0 15px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--navy-deep);
  color: #ffffff;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}
.search-submit:hover {
  background: var(--navy-mid);
}

/* 右侧精简工具按钮与「更多」菜单 */
.utility-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.catalog-short-label,
.account-short-label {
  display: none;
}

.account-avatar-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.util-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  padding: 0 10px;
  border-radius: 9px;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  color: var(--text-body);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s;
}

.util-btn:hover {
  border-color: var(--border-default);
  background: var(--bg-muted);
}

.util-btn-account {
  color: #0b2942;
  background: #f8fafd;
  border-color: #c8d6e8;
  font-weight: 650;
}

.util-btn-account:hover {
  background: #eff5fc;
  border-color: #9bb4d4;
  color: #0b2942;
}

.util-btn[aria-pressed="true"] {
  background: var(--gold-soft);
  border-color: #fcd34d;
  color: #92400e;
}

.count-pill {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  background: var(--indigo-soft);
  color: var(--indigo);
  padding: 0 5px;
  border-radius: var(--radius-pill);
}

.more-menu-wrap {
  position: relative;
}

.more-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 176px;
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  padding: 5px;
  box-shadow: 0 10px 26px rgba(15, 31, 56, 0.14);
  z-index: 60;
  display: flex;
  flex-direction: column;
}

.popover-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 7px 10px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text-body);
  font-size: 12.5px;
  font-weight: 550;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.popover-item:hover {
  background: var(--bg-muted);
  color: var(--navy-deep);
}

.popover-sep {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 4px 2px;
}

/* ==================== 紧凑合一的导航与筛选栏 ==================== */
.page-main {
  padding-top: 10px;
  padding-bottom: 40px;
}

.nav-surface {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 8px 12px;
  margin-bottom: 8px;
}

.family-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--border-subtle);
}
.family-tabs::-webkit-scrollbar {
  display: none;
}

.family-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  padding: 0 11px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.14s, color 0.14s;
}

.family-tab:hover {
  background: var(--bg-muted);
  color: var(--navy-deep);
}

.family-tab.active {
  background: var(--navy-deep);
  color: #ffffff;
}

.family-tab.active::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 30%;
  right: 30%;
  height: 2px;
  border-radius: 2px;
  background: var(--gold-bright);
}

.family-count {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.family-tab.active .family-count {
  color: #fde68a;
}

.control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 7px;
  flex-wrap: wrap;
}

.segmented-group {
  display: inline-flex;
  background: var(--bg-muted);
  padding: 2px;
  border-radius: 9px;
  border: 1px solid var(--border-subtle);
}

.seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  min-height: 36px;
  padding: 0 10px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.seg-btn.active {
  background: #ffffff;
  color: var(--navy-deep);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.seg-badge {
  font-size: 10.5px;
  background: var(--gold-soft);
  color: #92400e;
  border: 1px solid var(--gold-border);
  padding: 0 4px;
  border-radius: 999px;
}

/* 渐进式分层筛选行：套餐 / 细档 / 交付 */
.facet-layer-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.facet-layer-row.is-sub-tier {
  background: #fafcff;
  margin: 0 -12px;
  padding: 5px 12px 5px 22px;
  border-bottom: 1px solid var(--border-subtle);
}

.facet-layer-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 28px;
}

.facet-pills-scroll {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1 1 auto;
  min-width: 0;
}

.facet-pills-scroll::-webkit-scrollbar {
  display: none;
}

.facet-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  padding: 0 11px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-body);
  font-size: 12.5px;
  font-weight: 550;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.14s, border-color 0.14s, color 0.14s;
}

.facet-pill:hover {
  background: var(--bg-muted);
  color: var(--navy-deep);
}

.facet-pill.active {
  background: var(--indigo-soft);
  border-color: var(--indigo-border);
  color: var(--indigo);
  font-weight: 680;
}

.facet-pill.is-zero:not(.active) {
  opacity: 0.45;
}

.facet-pill-count {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.facet-pill.active .facet-pill-count {
  color: var(--indigo);
}

.plan-expand-btn {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.plan-expand-btn[aria-expanded="true"] {
  border-color: var(--indigo-border);
  background: var(--indigo-soft);
  color: var(--indigo);
}

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

.stock-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  padding: 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-body);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.stock-check input {
  accent-color: var(--navy-deep);
  width: 15px;
  height: 15px;
  margin: 0;
}

.compact-select {
  height: 36px;
  padding: 0 8px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.filter-drawer-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.filter-drawer-btn[aria-expanded="true"] {
  border-color: var(--indigo-border);
  background: var(--indigo-soft);
  color: var(--indigo);
}

.secondary-filters {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-subtle);
}

.secondary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.mobile-only-field {
  display: none;
}

.sec-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.sec-field select,
.sec-field input {
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border-subtle);
  border-radius: 7px;
  font-size: 12px;
  color: var(--text-strong);
  background: var(--bg-muted);
}

.price-pair {
  display: flex;
  align-items: center;
  gap: 4px;
}
.price-pair input {
  width: 100%;
  min-width: 0;
}

.secondary-footer {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

.text-reset-btn {
  border: none;
  background: none;
  color: var(--indigo);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 4px;
}

/* ==================== 极简状态条 ==================== */
.status-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  padding: 0 2px;
}

.status-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.result-count {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--text-strong);
}

.active-path-crumb {
  font-size: 12px;
  font-weight: 600;
  color: #0b2942;
  background: #eef4fc;
  border: 1px solid #d4e2f4;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
}

.active-filter-tags {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.active-tag {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  background: var(--indigo-soft);
  color: var(--indigo);
  border: 1px solid var(--indigo-border);
  cursor: pointer;
}

.status-right {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.updated-brief {
  font-variant-numeric: tabular-nums;
}

.info-link-btn,
.link-subtle-btn {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: none;
  background: none;
  padding: 0 4px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.data-info-box {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 9px 12px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.data-info-box p {
  margin: 0;
  flex: 1 1 260px;
}

/* ==================== 清爽对齐的比价行与商品列表 ==================== */
@keyframes rowFadeIn {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.compare-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cmp-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  animation: rowFadeIn 0.16s ease-out both;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.cmp-card:hover {
  border-color: var(--border-default);
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

/* 同规对比卡（细左金蓝饰线，克制清爽） */
.cmp-card.is-multi-compare {
  border-left: 3px solid var(--navy-deep);
}

.multi-head {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #fafcff;
  border-bottom: 1px solid var(--border-subtle);
}

.price-spotlight {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.price-main {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy-deep);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.3px;
}

.price-main.is-highlight-price {
  color: var(--indigo);
}

.price-main.is-muted-price {
  color: var(--text-faint);
  font-size: 16px;
}

.price-yen {
  font-size: 13px;
  font-weight: 700;
  margin-right: 1px;
}

.price-dec {
  font-size: 13px;
  font-weight: 700;
}

.price-diff-note {
  font-size: 11px;
  font-weight: 700;
  color: #92400e;
  background: var(--gold-soft);
  border: 1px solid var(--gold-border);
  padding: 0 6px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.multi-summary {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.multi-title {
  margin: 0;
  font-size: 15px;
  font-weight: 750;
  color: var(--navy-deep);
}

.spec-meta-inline {
  font-size: 12.5px;
  color: var(--text-muted);
}

.store-offers-list {
  display: flex;
  flex-direction: column;
}

.store-offer-line {
  padding: 9px 14px;
  border-bottom: 1px solid #f1f5f9;
}
.store-offer-line:last-child {
  border-bottom: none;
}
.store-offer-line:hover {
  background: var(--bg-hover);
}

.store-offer-grid {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) 92px auto;
  align-items: center;
  gap: 12px;
}

/* 单品紧凑报价行（最多 2-3 个关键信息，无药丸墙） */
.single-row-wrap {
  padding: 11px 14px;
}

.single-row-grid {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.single-mid {
  min-width: 0;
}

.item-clean-title {
  margin: 0 0 4px;
  font-size: 14.5px;
  font-weight: 650;
  color: var(--text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-submeta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
}

.shop-name-tag {
  font-size: 11.5px;
  font-weight: 650;
  padding: 1px 6px;
  border-radius: 5px;
  white-space: nowrap;
}

.shop-name-tag.wzyp {
  color: var(--navy-mid);
  background: var(--indigo-soft);
}

.shop-name-tag.m16688 {
  color: var(--teal-store);
  background: var(--teal-soft);
}

.winner-tag {
  font-size: 11px;
  font-weight: 700;
  color: #92400e;
  background: var(--gold-soft);
  border: 1px solid var(--gold-border);
  padding: 0 5px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.meta-text-spec {
  color: var(--text-body);
}

.meta-dot {
  color: #cbd5e1;
}

.stock-text {
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
}
.stock-text.in-stock {
  color: var(--green);
}
.stock-text.unknown {
  color: var(--text-muted);
}
.stock-text.out {
  color: var(--text-faint);
}

.row-price-col {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.row-price-val {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--navy-deep);
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

.icon-fav-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-fav-btn:hover {
  border-color: var(--border-default);
  color: var(--gold);
}
.icon-fav-btn[aria-pressed="true"] {
  background: var(--gold-soft);
  border-color: #fcd34d;
  color: #d97706;
}

.btn-detail {
  height: 36px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.btn-detail:hover,
.btn-detail[aria-expanded="true"] {
  color: var(--navy-deep);
  border-color: var(--border-default);
  background: var(--bg-muted);
}

.btn-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 13px;
  border-radius: 8px;
  background: var(--navy-deep);
  color: #ffffff;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.14s;
}
.btn-buy:hover {
  background: var(--navy-mid);
}

.btn-buy.store-16688 {
  background: #0369a1;
}
.btn-buy.store-16688:hover {
  background: #075985;
}

.btn-buy.is-off {
  background: var(--bg-muted);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.is-dimmed-card {
  opacity: 0.7;
}

/* 展开详情（承载完整原标题、全部7维规格、原采集时间与相近款筛选） */
.detail-panel {
  margin-top: 9px;
  padding: 10px 12px;
  background: var(--bg-muted);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-body);
}

.detail-rows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 16px;
}

.detail-cell.full-span {
  grid-column: 1 / -1;
}

.detail-label {
  color: var(--text-muted);
  font-weight: 600;
}

.detail-similar-btn {
  margin-top: 6px;
  border: 1px solid var(--border-default);
  background: #ffffff;
  color: var(--navy-mid);
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

/* 反馈状态与分页 */
.feedback-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 32px 18px;
  text-align: center;
  margin: 12px 0;
}
.feedback-card.is-error {
  background: var(--red-soft);
  border-color: #fecaca;
}
.feedback-card strong {
  display: block;
  font-size: 15.5px;
  margin-bottom: 5px;
}
.feedback-card p {
  margin: 0 auto 14px;
  color: var(--text-muted);
  max-width: 420px;
}
.feedback-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.btn-indigo {
  height: 36px;
  padding: 0 15px;
  border: none;
  border-radius: 8px;
  background: var(--navy-deep);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.btn-plain {
  height: 36px;
  padding: 0 13px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text-body);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.btn-plain:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pager-bar {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.btn-pager {
  height: 36px;
}
.pager-status {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-body);
  font-variant-numeric: tabular-nums;
}
.pager-size {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-muted);
}
.pager-size select {
  height: 36px;
  border: 1px solid var(--border-subtle);
  border-radius: 7px;
  background: #ffffff;
  padding: 0 8px;
}

.clean-footer {
  border-top: 1px solid var(--border-subtle);
  background: #ffffff;
  padding: 16px 0;
  font-size: 12px;
  color: var(--text-muted);
}
.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--text-body);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--navy-deep);
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy-deep);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.22);
  z-index: 100;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .cmp-card:hover,
  .brand-home:hover .brand-mark {
    transform: none !important;
  }
}

/* ==================== 窄屏与移动端适配 (390px / 360px 零溢出且首屏直见价格与操作) ==================== */
@media (max-width: 920px) {
  .header-bar {
    flex-wrap: wrap;
    gap: 6px 8px;
    min-height: 0;
    padding-top: 6px;
    padding-bottom: 7px;
  }
  .hero-search {
    order: 3;
    flex: 1 1 100%;
    max-width: 100%;
    height: 40px;
  }
  .secondary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 10px;
  }
  .brand-home {
    gap: 6px;
  }
  .brand-mark {
    width: 30px;
    height: 30px;
  }
  .brand-name {
    font-size: 15px;
  }
  .brand-divider,
  .brand-sub,
  .fav-label-text {
    display: none;
  }
  .utility-nav {
    gap: 4px;
  }
  .util-btn {
    height: 36px;
    padding: 0 8px;
    font-size: 12px;
  }
  .page-main {
    padding-top: 7px;
  }
  .nav-surface {
    padding: 6px 9px;
    margin-bottom: 6px;
  }
  .family-tabs {
    padding-bottom: 4px;
  }
  .family-tab {
    height: 36px;
    padding: 0 9px;
    font-size: 12.5px;
  }
  .facet-layer-row {
    padding: 3px 0;
    gap: 6px;
  }
  .facet-layer-row.is-sub-tier {
    margin: 0 -9px;
    padding: 3px 9px 3px 14px;
  }
  .facet-pill {
    height: 36px;
    padding: 0 9px;
    font-size: 12px;
  }
  .control-bar {
    padding-top: 5px;
    gap: 6px;
  }
  .segmented-group {
    width: 100%;
    justify-content: space-between;
  }
  .seg-btn {
    flex: 1;
    justify-content: center;
    height: 36px;
    min-height: 36px;
    padding: 0 4px;
  }
  .control-right {
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }
  .compact-select {
    flex: 1;
    min-width: 0;
    height: 36px;
  }
  .filter-drawer-btn,
  .plan-expand-btn {
    height: 36px;
  }
  .secondary-grid {
    grid-template-columns: 1fr;
  }

  /* 移动端同规对比卡紧凑布局：首屏直接露出价格与两个主购买按钮 */
  .multi-head {
    grid-template-columns: 1fr auto;
    gap: 4px 8px;
    padding: 9px 11px;
  }
  .multi-summary {
    grid-column: 1 / -1;
    order: 2;
    gap: 6px;
  }
  .store-offer-line {
    padding: 8px 11px;
  }
  .store-offer-grid {
    grid-template-columns: 1fr auto;
    gap: 5px 8px;
  }
  .store-offer-grid > .offer-shop-cell {
    grid-column: 1 / -1;
    order: 1;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .store-offer-grid > .offer-mid-cell {
    grid-column: 1 / -1;
    order: 2;
  }
  .store-offer-grid > .row-price-col {
    order: 3;
    text-align: left;
  }
  .store-offer-grid > .row-actions {
    order: 4;
    justify-content: flex-end;
  }

  /* 移动端单品行：上方标题+精简规格，下方左价格+右购买按钮同排对齐 */
  .single-row-wrap {
    padding: 10px 11px;
  }
  .single-row-grid {
    grid-template-columns: 1fr auto;
    gap: 6px 8px;
  }
  .single-row-grid > .single-mid {
    grid-column: 1 / -1;
    order: 1;
  }
  .single-row-grid > .price-spotlight {
    order: 2;
  }
  .single-row-grid > .row-actions {
    order: 3;
  }
  .item-clean-title {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    line-height: 1.38;
  }
  .detail-rows {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 384px) {
  .container {
    padding: 0 8px;
  }
  .brand-divider,
  .brand-sub,
  .account-full-label,
  .catalog-full-label {
    display: none;
  }
  .account-short-label,
  .catalog-short-label {
    display: inline;
  }
  .utility-nav {
    gap: 3px;
  }
  .util-btn {
    padding: 0 7px;
    font-size: 11.5px;
  }
}

@media (max-width: 340px) {
  .brand-mark {
    width: 26px;
    height: 26px;
  }
  .brand-name {
    font-size: 13.5px;
  }
  .more-caret {
    display: none;
  }
  .util-btn {
    padding: 0 6px;
  }
}

/* Buyer storefront */
body:has(.search-mast) {
  --bg-canvas:#f6f5ef; --bg-card:#fffefa; --border-subtle:#e2e2d9;
  --navy-deep:#193d43; --navy-mid:#27565d; --indigo:#226267;
  --text-body:#405654; --text-strong:#163532; --text-muted:#596c69;
}
.top-header .brand-portrait {
  display:block; width:42px; height:42px; flex:0 0 42px; overflow:hidden;
  border-radius:12px; border:1px solid #b1a37c; background:#132e34;
}
.top-header .brand-portrait img { width:100%; height:100%; display:block; object-fit:cover; }
.top-header { background:#fffef9; border:0; border-bottom:1px solid #ddded3; }
.top-header::before { display:none; }
.header-bar { min-height:60px; flex-wrap:nowrap; }
.brand-name { font-size:18px; }
.util-btn { background:transparent; border-color:transparent; }
.util-btn-account { background:#e6ede5; border-color:#d4dfd2; color:#1c4643; }
.search-mast {
  isolation:isolate; position:relative; overflow:hidden; display:flex; align-items:center;
  min-height:166px; margin:8px 0 18px; padding:21px 32px; border-radius:14px; color:#fff9e8;
  background:linear-gradient(146deg, #0c2446 12%, #114c74 61%, #137dba);
}
.mast-art {
  position:absolute; z-index:-3; top:-3%; right:-2px; width:auto; height:106%;
  max-width:none; pointer-events:none; mask-image:linear-gradient(90deg, transparent, #000 25%);
  transform-origin:78% 65%;
}
.search-mast.is-sailing .mast-art {
  animation:mast-swell 9s ease-in-out infinite alternate;
}
@keyframes mast-swell {
  from { transform:translate3d(0, 1px, 0) scale(1); }
  to { transform:translate3d(2px, -2px, 0) scale(1.025); }
}
.mast-scene {
  position:absolute; z-index:-2; inset:0; width:100%; height:100%; pointer-events:none;
}
.search-mast::after {
  content:""; position:absolute; z-index:-1; inset:0; pointer-events:none;
  background:linear-gradient(90deg, #091f42 0%, #091f42a6 39%, #091f4233 58%, transparent 77%);
}
.mast-inner { width:min(58%,490px); }
.mast-inner h1 { margin:0 0 12px; font-family:"Songti SC","STSong",serif; font-weight:850; font-size:42px; letter-spacing:.06em; line-height:1.1; }
.mast-inner .hero-search { width:100%; height:42px; max-width:none; background:#fffef5; border:0; border-radius:8px; }
.mast-inner .search-submit { border-radius:6px; background:#d8b97c; color:#183637; }
.filters-heading { margin:2px 0 11px; font-size:17px; letter-spacing:.05em; color:var(--text-strong); }
.family-tab.active::after { display:none; }
.quote-results { min-width:0; }
.status-strip { margin:0 0 8px; }
.cmp-card { animation:none; }
.cmp-card.is-multi-compare { border:1px solid #b3c4b6; }
.multi-head { background:#e9efe5; }
.price-main.is-highlight-price { color:#1f5146; }
.btn-buy.store-16688:not(.is-off) { background:#245b60; }
@media(min-width:980px) {
  .page-main { display:grid; grid-template-columns:260px minmax(0,1fr); column-gap:20px; align-items:start; }
  .search-mast { grid-column:1/-1; }
  .nav-surface { padding:18px 15px; border-radius:12px; }
  .family-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); padding-bottom:13px; }
  .family-tab { min-width:0; justify-content:space-between; padding-inline:7px; font-size:12px; }
  .facet-layer-row { display:block; padding:12px 0 6px; }
  .facet-layer-label { display:block; margin-bottom:5px; }
  .facet-pills-scroll,.control-bar,.control-right { flex-wrap:wrap; }
  .control-right { margin:0; gap:7px; }
  .segmented-group { width:100%; }
  .secondary-grid { grid-template-columns:1fr; }
  .facet-pills-scroll { overflow:visible; gap:4px; }
  .facet-pill { height:31px; padding-inline:7px; }
  .single-row-wrap { padding:17px 16px; }
  .compare-list { gap:9px; }
  .single-row-grid { grid-template-columns:92px minmax(0,1fr) auto; }
}
@media(max-width:640px) {
  .header-bar { min-height:53px; }
  .top-header .brand-portrait { width:34px; height:34px; flex-basis:34px; border-radius:9px; }
  .brand-name { font-size:15px; }
  .search-mast { min-height:112px; padding:13px 14px; border-radius:10px; margin:3px 0 9px; }
  .mast-art { mask-image:linear-gradient(90deg, transparent, #000 24%); }
  .search-mast::after { background:linear-gradient(90deg, #091f42e8 0%, #091f427a 34%, #091f4220 58%, transparent 76%); }
  .mast-inner { width:min(75%,340px); }
  .mast-inner h1 { font-size:26px; margin-bottom:8px; }
  .mast-inner .hero-search { height:36px; }
  .mast-inner input { font-size:12px; }
  .filters-heading { display:none; }
  .nav-surface { margin-bottom:10px; }
  .item-clean-title { -webkit-line-clamp:2; }
}

/* ---------- 双店同屏低价对照面板 ---------- */
.dual-board {
  margin: 0 0 12px;
  padding: 13px 14px;
  border-radius: 13px;
  border: 1px solid #cbd9e6;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  box-shadow: 0 4px 14px rgba(15, 34, 58, 0.05);
}

.dual-board[hidden] {
  display: none;
}

.dual-board-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  margin-bottom: 10px;
}

.dual-board-title-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.dual-board-title {
  font-size: 14.5px;
  font-weight: 800;
  color: #132c47;
}

.dual-board-spread {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 11.5px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.dual-board-note {
  font-size: 11.5px;
  color: #60758c;
}

.dual-board-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dual-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 11px 12px;
  border-radius: 11px;
  border: 1px solid #dce6f0;
  background: #fff;
  min-width: 0;
}

.dual-col.is-cheaper {
  border-color: #9dc2b3;
  background: linear-gradient(180deg, #f4fbf8 0%, #ffffff 42%);
}

.dual-col-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 7px;
  border-bottom: 1px dashed #e2eaf2;
}

.dual-col-shop {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.dual-win-tag {
  padding: 1px 6px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
}

.dual-col-price-wrap {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.dual-col-lowest {
  font-size: 16px;
  font-weight: 850;
  color: #163b60;
  font-variant-numeric: tabular-nums;
}

.dual-col.is-cheaper .dual-col-lowest {
  color: #14532d;
}

.dual-col-count {
  font-size: 11px;
  color: #64748b;
}

.dual-col-list {
  display: grid;
  gap: 7px;
}

.dual-offer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #f8fafd;
}

.dual-offer-info {
  min-width: 0;
}

.dual-offer-title {
  font-size: 12.5px;
  font-weight: 650;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dual-offer-meta {
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.dual-offer-right {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.dual-offer-price {
  font-size: 13.5px;
  font-weight: 800;
  color: #14365a;
  font-variant-numeric: tabular-nums;
}

.dual-buy-mini {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 9px;
  border-radius: 7px;
  background: #173b63;
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none;
}

.dual-buy-mini.store-16688 {
  background: #245b60;
}

.dual-buy-mini:hover {
  filter: brightness(1.1);
}

.dual-only-btn {
  align-self: flex-start;
  padding: 2px 0 0;
  border: 0;
  background: none;
  color: #25578a;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.dual-only-btn:hover {
  text-decoration: underline;
}

@media (max-width: 720px) {
  .dual-board {
    padding: 11px;
  }

  .dual-board-cols {
    grid-template-columns: 1fr;
  }
}
