
/* =============================================================================
   配件卡片 v2 · 推荐综合方案 #50
   桌面 400px / 主图 168px · 手机 420px / 主图 148px
   ============================================================================= */

.wf-pc-v2 {
  display: flex;
  flex-direction: column;
  height: auto;
  background: #fff;
  border: 1px solid var(--wf-line2, #e2e8f0);
  border-radius: var(--wf-radius, 10px);
  overflow: hidden;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.wf-pc-v2:hover {
  border-color: var(--wf-blue-border, #bfdbfe);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.wf-pc-v2--mobile,
.wf-c-results .wf-pc-v2 {
  border-radius: 0;
  box-shadow: none;
}

.wf-pc-v2--mobile:hover,
.wf-c-results .wf-pc-v2:hover {
  box-shadow: none;
}

/* ── 主图 ── */
.wf-pc-v2__hero {
  position: relative;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 0;
  background: #e8edf2;
  cursor: pointer;
  width: 100%;
  overflow: hidden;
  text-align: left;
}

.wf-pc-v2__hero-media {
  position: relative;
  flex-shrink: 0;
  height: 168px;
  overflow: hidden;
  background: #e8edf2;
}

.wf-pc-v2--mobile .wf-pc-v2__hero-media,
.wf-c-results .wf-pc-v2__hero-media {
  height: 148px;
}

.wf-pc-v2__hero-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f1f5f9;
}

.wf-pc-v2__hero-ph {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, #eef2f6 0%, #e2e8f0 100%);
}

.wf-pc-v2__hero-badge {
  position: absolute;
  z-index: 2;
  font-size: 10px;
}

.wf-pc-v2__hero-badge--tl { top: 8px; left: 8px; }
.wf-pc-v2__hero-badge--bl { bottom: 8px; left: 8px; }

.wf-pc-v2__hero-caption {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 34px;
  padding: 6px 10px;
  background: #fff;
  border-top: 1px solid var(--wf-line2, #e2e8f0);
  font-size: 13px;
  font-weight: 600;
}

.wf-pc-v2__hero-name {
  flex: 1 1 100%;
  min-width: 0;
  white-space: normal;
  word-break: break-word;
  line-height: 1.4;
}

/* ── 信息区 ── */
.wf-pc-v2__body {
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  padding: 8px 12px 0;
  overflow: visible;
}

.wf-pc-v2__meta { flex-shrink: 0; }

.wf-pc-v2__fig {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 12px;
}

.wf-pc-v2__fig-k { color: #94a3b8; }
.wf-pc-v2__fig-v {
  font-family: ui-monospace, monospace;
  font-weight: 700;
  font-size: 12px;
}

.wf-pc-v2__summary {
  padding: 5px 8px;
  margin-bottom: 6px;
  border-radius: 6px;
  background: #eff6ff;
  border: 1px solid #93c5fd;
  font-size: 11px;
  color: #1d4ed8;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wf-pc-v2__tab-zone {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.wf-pc-v2__panel {
  flex: 0 1 auto;
  max-height: 140px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 0 4px;
  background: #fafbfc;
  border-radius: 0 0 6px 6px;
}

.wf-pc-v2__panel::-webkit-scrollbar {
  width: 4px;
}

.wf-pc-v2__panel::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.wf-pc-v2__tabs {
  display: flex;
  flex-shrink: 0;
  border-bottom: 1px solid var(--wf-line2, #e2e8f0);
}

.wf-pc-v2__tab {
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
  border: 0;
  background: transparent;
  font-size: 12px;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  text-align: center;
}

.wf-pc-v2__tab.is-active {
  color: var(--wf-blue, #2563eb);
  font-weight: 600;
  border-bottom-color: var(--wf-blue, #2563eb);
}

.wf-pc-v2__tab-badge {
  margin-left: 3px;
  font-size: 10px;
  padding: 0 5px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
}

.wf-pc-v2__tab.is-active .wf-pc-v2__tab-badge {
  background: var(--wf-blue, #2563eb);
  color: #fff;
}

.wf-pc-v2__meta-list {
  list-style: none;
  font-size: 12px;
}

.wf-pc-v2__meta-list li {
  display: flex;
  gap: 8px;
  margin-bottom: 5px;
}

.wf-pc-v2__meta-list .k {
  color: #94a3b8;
  width: 32px;
  flex-shrink: 0;
}

.wf-pc-v2__hint {
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 6px;
}

.wf-pc-v2__empty {
  font-size: 12px;
  color: #94a3b8;
  padding: 8px 0;
}

.wf-pc-v2__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.wf-pc-v2__adapt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 5px 0 5px 8px;
  margin-bottom: 4px;
  border-left: 3px solid #cbd5e1;
}

.wf-pc-v2__adapt.is-match {
  border-left-color: #22c55e;
}

.wf-pc-v2__adapt.is-highlight {
  background: rgba(34, 197, 94, 0.06);
  border-radius: 0 4px 4px 0;
}

.wf-chip--part {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
  font-weight: 600;
}

.wf-chip--cond {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fdba74;
  font-weight: 700;
}

.wf-chip--model {
  background: #fff;
  color: #64748b;
  border: 1px dashed #cbd5e1;
  cursor: pointer;
}

.wf-chip--model:hover {
  border-color: var(--wf-blue, #2563eb);
  color: var(--wf-blue, #2563eb);
}

.wf-chip--more {
  background: #fff;
  color: var(--wf-blue, #2563eb);
  border: 1px dashed var(--wf-blue, #2563eb);
  cursor: pointer;
}

.wf-pc-v2__swap {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid #f1f5f9;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-size: 12px;
}

.wf-pc-v2__swap:hover { background: #f8fafc; }

.wf-pc-v2__swap-pic {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: #f1f5f9;
  border-radius: 6px;
  overflow: hidden;
}

.wf-pc-v2__swap-pic img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.wf-pc-v2__swap-body { flex: 1; min-width: 0; }

.wf-pc-v2__swap-name {
  display: block;
  font-weight: 600;
}

.wf-pc-v2__swap-fig {
  display: block;
  font-family: monospace;
  font-size: 11px;
  color: #64748b;
}

.wf-pc-v2__sale {
  flex-shrink: 0;
  padding: 0 12px;
}

.wf-pc-v2__footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid var(--wf-line2, #e2e8f0);
  background: #fafbfc;
}

.wf-pc-v2__footer-link {
  border: 0;
  background: none;
  padding: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--wf-blue, #2563eb);
  cursor: pointer;
  text-align: left;
}

.wf-pc-v2__footer-link:hover { text-decoration: underline; }

.wf-pc-v2__footer-spacer { flex: 1; }

.wf-pc-v2__footer-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.wf-pc-v2__footer-actions .wf-sale-badge,
.wf-pc-v2__footer-actions .wf-part-ref-inline {
  display: none !important;
}

.wf-btn-compare--sm {
  font-size: 12px;
  padding: 6px 10px;
}

/* =============================================================================
   桌面列表 · 一行三列
   380×3 + gap 16×2 + padding 24×2 = 1240px
   ============================================================================= */

.wf-a {
  max-width: min(100%, 1240px);
}

.wf-a .wf-a-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}

.wf-a-list .wf-pc-v2 {
  width: 100%;
  max-width: none;
  min-width: 0;
}

.wf-a-list .wf-pc-v2__hero-media {
  height: 148px;
}

.wf-a-list .wf-pc-v2__body {
  padding: 6px 10px 0;
}

.wf-a-list .wf-pc-v2__fig {
  margin-bottom: 4px;
}

.wf-a-list .wf-pc-v2__summary {
  margin-bottom: 4px;
  padding: 4px 6px;
}

.wf-a-list .wf-pc-v2__panel {
  max-height: 132px;
  padding: 6px 0 2px;
}

.wf-a-list .wf-pc-v2__adapt {
  padding: 3px 0 3px 6px;
  margin-bottom: 2px;
  gap: 3px;
}

.wf-a-list .wf-pc-v2__adapt .wf-chip {
  font-size: 10px;
  padding: 1px 5px;
}

/* 底栏单行：链接与按钮并列 */
.wf-a-list .wf-pc-v2__footer {
  flex-wrap: nowrap;
  gap: 6px;
  padding: 6px 10px;
  min-height: 36px;
}

.wf-a-list .wf-pc-v2__footer-link {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  text-align: left;
}

.wf-a-list .wf-pc-v2__footer-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
  gap: 4px;
}

.wf-a-list .wf-pc-v2__footer-actions .wf-btn-compare,
.wf-a-list .wf-pc-v2__footer-actions .wf-btn-billing,
.wf-a-list .wf-pc-v2__footer-actions .wf-btn-inquiry-public {
  font-size: 11px;
  padding: 4px 8px;
}

.wf-a-list .wf-pc-v2__tab {
  font-size: 11px;
  padding: 5px 2px;
}

.wf-a-list .wf-pc-v2__fig-v {
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.wf-a-list .wf-pc-v2__hero-caption {
  font-size: 12px;
  padding: 5px 8px;
}

/* 窄桌面（769–1023px）降为两列 */
@media (min-width: 769px) and (max-width: 1023px) {
  .wf-a {
    max-width: min(100%, 840px);
  }

  .wf-a .wf-a-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.wf-c-results .wf-pc-v2 {
  margin-bottom: 12px;
}

/* =============================================================================
   通用车型 Drawer / Bottom Sheet
   ============================================================================= */

.wf-uni-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(15, 23, 42, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.wf-uni-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.wf-uni-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1201;
  width: min(400px, 100vw);
  height: 100vh;
  background: #fff;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.25s ease, visibility 0.25s;
  box-shadow: -4px 0 24px rgba(15, 23, 42, 0.12);
}

.wf-uni-panel.is-open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.wf-uni-panel--sheet {
  top: auto;
  bottom: 0;
  right: 0;
  left: 0;
  width: 100%;
  height: 92vh;
  max-height: 92vh;
  border-radius: 16px 16px 0 0;
  transform: translateY(100%);
  box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.15);
}

.wf-uni-panel--sheet.is-open {
  transform: translateY(0);
}

.wf-uni-panel__handle {
  flex-shrink: 0;
  width: 36px;
  height: 4px;
  margin: 10px auto 0;
  border-radius: 999px;
  background: #cbd5e1;
  cursor: pointer;
}

.wf-uni-panel__head {
  flex-shrink: 0;
  padding: 12px 16px 14px;
  border-bottom: 1px solid var(--wf-line2, #e2e8f0);
}

.wf-uni-panel__head-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.wf-uni-panel__title {
  font-size: 16px;
  font-weight: 700;
}

.wf-uni-panel__sub {
  font-size: 11px;
  color: #64748b;
  font-family: ui-monospace, monospace;
  margin-top: 4px;
}

.wf-uni-panel__close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: #f1f5f9;
  font-size: 18px;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
}

.wf-uni-panel__search {
  width: 100%;
  margin-top: 12px;
  padding: 8px 12px;
  border: 1px solid var(--wf-line2, #e2e8f0);
  border-radius: 8px;
  font-size: 13px;
}

.wf-uni-panel__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 16px;
}

.wf-uni-panel__empty {
  text-align: center;
  color: #94a3b8;
  padding: 24px 0;
  font-size: 13px;
}

.wf-uni-acc {
  border: 1px solid var(--wf-line2, #e2e8f0);
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
}

.wf-uni-acc__head {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border: 0;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.wf-uni-acc.is-open .wf-uni-acc__head {
  background: #eff6ff;
  color: var(--wf-blue, #2563eb);
}

.wf-uni-acc__body {
  display: none;
  padding: 8px 12px 10px;
}

.wf-uni-acc.is-open .wf-uni-acc__body {
  display: block;
}

.wf-uni-panel__foot {
  flex-shrink: 0;
  padding: 12px 16px;
  border-top: 1px solid var(--wf-line2, #e2e8f0);
  font-size: 12px;
  color: #64748b;
}

.wf-uni-panel--sheet .wf-uni-panel__foot {
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}

@media (max-width: 720px) {
  .wf-uni-panel:not(.wf-uni-panel--sheet) {
    display: none;
  }
}
