﻿/* ===== 批量二手车版块（batch lots） ===== */
/* 与站点主色调一致：暖橙 #f97316 + 深墨 #1a2233 + 中性灰 #667085  */

.page-batches .batch-section,
.page-batch-detail .batch-section,
.page-batch-car .batch-detail {
  padding-block: clamp(28px, 5vw, 56px);
}

.batch-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 20px;
  color: #667085;
  font-size: 0.95rem;
}

.batch-summary-sep { color: #cbd5e1; }

/* ---------- 批次卡片 ---------- */
.batch-grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.batch-card {
  border: 1px solid #e7e5e4;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.batch-card:hover,
.batch-card:focus-within {
  border-color: #f97316;
  box-shadow: 0 12px 28px rgba(26, 34, 51, 0.1);
  transform: translateY(-2px);
}

.batch-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.batch-cover {
  aspect-ratio: 16 / 10;
  background: #f5f5f4;
  overflow: hidden;
}

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

.batch-cover-empty {
  display: grid;
  place-items: center;
  color: #a8a29e;
  font-size: 0.9rem;
  padding: 12px;
  text-align: center;
}

.batch-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px 18px;
}

.batch-card-title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.45;
  color: #1a2233;
}

.batch-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  font-size: 0.9rem;
  color: #667085;
}

.batch-card-count { font-weight: 600; color: #1a2233; }

.batch-card-price {
  padding: 1px 8px;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
}

.batch-card-cta,
.batch-car-cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ea580c;
}

/* ---------- 等级徽标 / 分布 ---------- */
.batch-grade {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.batch-grade-label { opacity: 0.72; font-weight: 400; }
.batch-grade strong { font-size: 0.95rem; }

.batch-grade.is-grade-s { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.batch-grade.is-grade-r { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.batch-grade.is-grade-d { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }

.batch-grade-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.batch-grade-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.85rem;
  color: #475569;
}

.batch-grade-chip .chip-grade { font-weight: 700; }
.batch-grade-chip.is-grade-s .chip-grade { color: #047857; }
.batch-grade-chip.is-grade-r .chip-grade { color: #1d4ed8; }
.batch-grade-chip.is-grade-d .chip-grade { color: #c2410c; }

/* ---------- 批次详情 ---------- */
.batch-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 12px 0 14px;
  font-size: 0.92rem;
  color: #475569;
}

.batch-detail-price {
  padding: 2px 10px;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
  font-weight: 600;
}

/* 单车页顶部四个关键字段 */
.batch-facts {
  display: grid;
  gap: 0;
  margin: 14px 0 0;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border: 1px solid #e7e5e4;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  max-width: 780px;
}

.batch-facts > div {
  padding: 10px 14px;
  border-inline-end: 1px solid #f1f5f9;
  border-block-end: 1px solid #f1f5f9;
}

.batch-facts dt { margin: 0; font-size: 0.76rem; color: #94a3b8; }
.batch-facts dd { margin: 2px 0 0; font-size: 0.92rem; font-weight: 600; color: #1a2233; }

.batch-car-grid {
  display: grid;
  gap: clamp(14px, 2vw, 22px);
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.batch-car-card {
  border: 1px solid #e7e5e4;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.batch-car-card:hover,
.batch-car-card:focus-within {
  border-color: #f97316;
  box-shadow: 0 10px 24px rgba(26, 34, 51, 0.09);
}

.batch-car-link { display: block; height: 100%; color: inherit; text-decoration: none; }

.batch-car-cover { aspect-ratio: 4 / 3; background: #f5f5f4; overflow: hidden; }
.batch-car-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.batch-car-cover-empty {
  display: grid;
  place-items: center;
  padding: 12px;
  font-size: 0.85rem;
  color: #a8a29e;
  text-align: center;
}

.batch-car-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; }

.batch-car-title {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.4;
  color: #1a2233;
}

.batch-car-facts { margin: 0; display: grid; gap: 6px; }

.batch-car-facts > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  font-size: 0.85rem;
}

.batch-car-facts dt { color: #94a3b8; margin: 0; }
.batch-car-facts dd { margin: 0; color: #334155; font-weight: 600; }

/* ---------- 单车详情 ---------- */
.batch-detail-grid { padding-block: clamp(20px, 3vw, 36px); }

.batch-h2 {
  margin: clamp(24px, 3vw, 34px) 0 12px;
  font-size: 1.12rem;
  color: #1a2233;
  padding-inline-start: 10px;
  border-inline-start: 4px solid #f97316;
  line-height: 1.3;
}

.batch-h2:first-child { margin-top: 0; }

.batch-spec {
  margin: 0;
  display: grid;
  gap: 0;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  border: 1px solid #e7e5e4;
  border-radius: 12px;
  overflow: hidden;
}

.batch-spec-row {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.9rem;
}

.batch-spec-row dt { color: #94a3b8; margin: 0; flex: 0 0 auto; }
.batch-spec-row dd { margin: 0; color: #1a2233; font-weight: 600; text-align: end; word-break: break-word; }

.batch-inspection {
  border: 1px solid #e7e5e4;
  border-radius: 12px;
  padding: 14px 16px;
  background: #fffdfa;
}

.batch-inspection-summary { margin: 0 0 12px; color: #334155; line-height: 1.8; }

.batch-score-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.batch-score-table th,
.batch-score-table td { padding: 7px 10px; border-bottom: 1px solid #f1f5f9; text-align: start; }
.batch-score-table th { font-weight: 500; color: #64748b; }
.batch-score-table td { font-weight: 600; color: #1a2233; }

.batch-meta-list { margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 0.85rem; }
.batch-meta-list > div { display: flex; gap: 6px; }
.batch-meta-list dt { color: #94a3b8; margin: 0; }
.batch-meta-list dd { margin: 0; color: #334155; }

.batch-photo-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.batch-photo { margin: 0; }

.batch-photo a { display: block; border-radius: 10px; overflow: hidden; background: #f5f5f4; }
.batch-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }

.batch-photo figcaption {
  margin-top: 6px;
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.4;
}

.batch-defect-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }

.batch-defect {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  background: #fff;
}

.batch-defect-text { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; font-size: 0.88rem; }
.batch-defect-system {
  padding: 1px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.78rem;
}
.batch-defect-part { color: #1a2233; font-weight: 600; }
.batch-defect-issue { color: #b91c1c; }

.batch-defect-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.batch-defect-thumbs a { display: block; width: 88px; height: 66px; border-radius: 8px; overflow: hidden; background: #f5f5f4; }
.batch-defect-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }

.batch-defect-empty { color: #94a3b8; font-size: 0.9rem; }

.batch-empty {
  padding: 48px 24px;
  text-align: center;
  color: #94a3b8;
  border: 1px dashed #e7e5e4;
  border-radius: 14px;
}

.batch-back { margin: 28px 0 0; }

@media (max-width: 640px) {
  .batch-grid { grid-template-columns: 1fr; }
  .batch-car-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .batch-car-facts > div { font-size: 0.8rem; }
  .batch-photo-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .batch-spec { grid-template-columns: 1fr; }
}
/* 站内图标尺寸约束（列表卡片与 CTA 里的箭头） */
.batch-card-cta svg,
.batch-car-cta svg,
.batch-card-cta .icon,
.batch-car-cta .icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.batch-card-cta { white-space: nowrap; }

/* ---------- 图集放大（灯箱）---------- */
.batch-photo-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: inherit;
  overflow: hidden;
}

/* 瑕疵图保持小图，点击才开灯箱看大图 */
.batch-defect-thumb {
  display: block;
  width: 88px;
  height: 66px;
  padding: 0;
  border: 1px solid #eef2f7;
  border-radius: 8px;
  background: #f5f5f4;
  cursor: zoom-in;
  overflow: hidden;
  flex: 0 0 auto;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.batch-defect-thumb:hover {
  border-color: #f97316;
  transform: translateY(-1px);
}

.batch-defect-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.batch-photo-btn:focus-visible,
.batch-defect-thumb:focus-visible {
  outline: 3px solid #f97316;
  outline-offset: 2px;
}

.batch-photo-btn img { transition: transform 0.25s ease; }
.batch-photo-btn:hover img { transform: scale(1.03); }

/* 灯箱：图片下方显示描述 */
.lightbox--batch .lightbox__figure {
  flex-direction: column;
  gap: clamp(10px, 2vh, 18px);
  height: auto;
  max-height: 100%;
}

.lightbox--batch .lightbox__image {
  max-height: calc(100vh - 220px);
}

.lightbox__caption {
  max-width: min(860px, 92vw);
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(0.86rem, 1.6vw, 1rem);
  line-height: 1.6;
  text-align: center;
  text-wrap: balance;
}

.lightbox__caption[hidden] { display: none; }

@media (max-width: 720px) {
  .lightbox--batch .lightbox__image { max-height: calc(100vh - 260px); }
  .lightbox__caption { font-size: 0.84rem; padding-inline: 8px; }
}

/* 灯箱底部留出图注空间，避免与页码重叠 */
.lightbox--batch {
  padding-bottom: clamp(76px, 9vh, 104px);
}

.lightbox--batch .lightbox__counter {
  bottom: 14px;
}

@media (max-width: 720px) {
  .lightbox--batch { padding-bottom: 84px; }
}
/* ---------- 批次内车辆筛选 ---------- */
.batch-filters {
  border: 1px solid #e7e5e4;
  border-radius: 14px;
  padding: 16px 18px 14px;
  margin-bottom: 22px;
  background: #fff;
}

.batch-filter-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.batch-filter-title {
  margin: 0;
  font-size: 1rem;
  color: #1a2233;
  padding-inline-start: 10px;
  border-inline-start: 4px solid #f97316;
  line-height: 1.3;
}

.batch-filter-count { color: #667085; font-size: 0.88rem; }

.batch-filter-reset {
  margin-inline-start: auto;
  font-size: 0.86rem;
  color: #ea580c;
  text-decoration: none;
}

.batch-filter-reset:hover { text-decoration: underline; }

.batch-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-block: 6px;
}

.batch-filter-label { color: #94a3b8; font-size: 0.85rem; }

.batch-filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }

.batch-filter-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 0.88rem;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.batch-filter-chip input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  margin: 0;
}

.batch-filter-chip:hover { border-color: #f97316; }

.batch-filter-chip.is-on {
  border-color: #f97316;
  background: #fff7ed;
  color: #c2410c;
  font-weight: 600;
}

.batch-filter-chip:focus-within {
  outline: 2px solid #f97316;
  outline-offset: 2px;
}

.batch-filter-chip .chip-grade { font-weight: 700; }
.batch-filter-chip em {
  font-style: normal;
  color: #94a3b8;
  font-size: 0.78rem;
}
.batch-filter-chip.is-on em { color: #c2410c; }

.batch-filter-selects { gap: 14px 20px; }

.batch-filter-field {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: #64748b;
}

.batch-filter-field select {
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #1a2233;
  font-size: 0.86rem;
  max-width: 20rem;
}

.batch-filter-field select:focus-visible {
  outline: 2px solid #f97316;
  outline-offset: 1px;
}

.batch-filter-submit { margin-inline-start: auto; }

@media (max-width: 640px) {
  .batch-filter-field { width: 100%; justify-content: space-between; }
  .batch-filter-field select { flex: 1 1 auto; max-width: 60%; }
  .batch-filter-submit { width: 100%; margin-inline-start: 0; }
}
/* ---------- 首页「批量二手车」栏目 ---------- */
.batch-home-section .section-head { margin-bottom: clamp(18px, 2.5vw, 28px); }

.batch-grid-home {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

@media (min-width: 1000px) {
  .batch-grid-home { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.batch-grid-home .batch-cover { aspect-ratio: 16 / 9; }