:root {
  color-scheme: light;
  --page: #f5f6f8;
  --ink: #161a20;
  --muted: #667085;
  --teal: #0f8b7c;
  --green: #16854f;
  --next-card: #ffffff;
  --next-green-dark: #1d4ed8;
  --next-line: rgba(27, 39, 56, 0.11);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
}

.empty-note {
  margin-top: 14px;
  color: var(--muted);
}

.scroll-sentinel {
  grid-column: 1 / -1;
  min-height: 32px;
  padding: 4px 0 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.scroll-end-note {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  gap: 4px;
  margin: 4px auto 24px;
  padding: 10px 18px;
  border: 1px solid rgba(143, 157, 177, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: #8b95a5;
  box-shadow: 0 10px 24px rgba(27, 42, 68, 0.06);
  text-align: center;
}

.scroll-end-note strong {
  color: #354155;
  font-size: 13px;
  line-height: 1.2;
}

.scroll-end-note span {
  font-size: 12px;
  line-height: 1.2;
}

body[data-portal="customer"] .eyebrow {
  color: var(--green);
}

.next-car-home {
  min-height: 100vh;
}

.next-header {
  position: sticky;
  top: 0;
  z-index: 110;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 max(24px, calc((100vw - 1480px) / 2));
  border-bottom: 1px solid rgba(24, 36, 52, 0.08);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
}

.next-logo {
  color: inherit;
  text-decoration: none;
}

.next-logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  width: 174px;
  min-height: 48px;
  white-space: nowrap;
}

.next-logo img {
  width: 100%;
  max-height: 48px;
  display: block;
  object-fit: contain;
}

.filter-head button {
  border: 0;
  font: inherit;
  cursor: pointer;
}
body[data-portal="customer"] .customer-header-menu {
  margin-left: auto;
}

.next-main {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 18px 24px 58px;
}

.smart-filter,
.next-car-card {
  border: 1px solid var(--next-line);
  background: var(--next-card);
  box-shadow: 0 18px 44px rgba(24, 35, 51, 0.08);
  backdrop-filter: blur(14px);
}

.smart-filter {
  position: relative;
  z-index: 30;
  width: 100%;
  margin: 12px auto 0;
  overflow: visible;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(24, 35, 51, 0.055);
}

.smart-filter:focus-within {
  z-index: 90;
}

.filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--next-line);
}

.filter-head span {
  display: block;
  margin-bottom: 2px;
  color: var(--next-green-dark);
  font-size: 12px;
  font-weight: 850;
}

.filter-head h2 {
  margin: 0;
  font-size: 17px;
}

.filter-head p {
  max-width: 620px;
  margin: 3px 0 0;
  color: #697586;
  font-size: 13px;
  font-weight: 720;
  line-height: 1.36;
}

.filter-head button {
  min-width: 78px;
  min-height: 34px;
  border: 1px solid var(--next-line);
  border-radius: 8px;
  color: #475163;
  background: #fff;
  font-weight: 760;
}

.filter-matrix {
  display: grid;
  grid-template-columns: repeat(4, minmax(148px, 1fr));
  gap: 9px 12px;
  padding: 12px 16px 8px;
}

.filter-group {
  position: relative;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 5px;
  padding: 0;
  border-bottom: 0;
}

.filter-name {
  color: #8e98a8;
  font-size: 12px;
  font-weight: 820;
}

.filter-menu.is-empty::after,
.brand-menu.is-empty::after {
  min-height: 34px;
  display: grid;
  place-items: center start;
  padding: 0 10px;
  color: #8a95a5;
  font-size: 13px;
  font-weight: 760;
  content: attr(data-empty-text);
}

.brand-combo-control.is-empty {
  grid-template-columns: minmax(0, 1fr);
}

.brand-combo-control.is-empty .brand-logo-mark {
  display: none;
}

.brand-select .brand-logo-mark {
  grid-row: 1 / 3;
}

.brand-logo-mark {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  color: #fff;
  background: #111827;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.08);
  font-size: 10px;
  font-weight: 900;
}

.brand-logo-mark.has-image {
  color: transparent;
  background: #fff;
}

.brand-logo-mark img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
}

.brand-logo-mark.has-image em {
  display: none;
}

.brand-logo-mark em {
  color: #fff;
  font-style: normal;
}

.brand-option-list button .brand-logo-mark {
  grid-row: 1 / 3;
}

.brand-cloud .brand-logo-mark {
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.08);
}

.brand-cloud .brand-logo-mark.has-image {
  color: transparent;
  background: #fff;
}

.brand-cloud .brand-logo-mark img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}

.brand-cloud .brand-logo-mark.has-image em {
  display: none;
}

.brand-cloud .brand-logo-mark em {
  color: #fff;
  font-style: normal;
}

.inventory-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 20px auto 0;
}

.inventory-main {
  width: 100%;
}

.customer-vehicle-detail-page .detail-panel-heading span {
  color: #2f6df6;
  background: #edf4ff;
}

.customer-vehicle-detail-page .detail-field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.customer-vehicle-detail-page .customer-vehicle-primary-panel .detail-field-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.customer-vehicle-detail-page .customer-vehicle-detail-field {
  min-height: 54px;
  border-color: #e6ebf2;
  border-radius: 6px;
  background: #f8fafc;
}

.customer-vehicle-detail-page .customer-vehicle-detail-field dt {
  color: #7b8798;
}

.customer-vehicle-detail-page .customer-vehicle-detail-field dd {
  color: #111827;
  line-height: 1.45;
  white-space: pre-line;
}

.customer-vehicle-info-note {
  display: grid;
  gap: 4px;
  border: 1px solid #dce5f2;
  border-radius: 8px;
  padding: 10px 12px;
  color: #64748b;
  background: #f8fafc;
}

.customer-vehicle-info-note strong {
  color: #334155;
  font-size: 13px;
}

.customer-vehicle-info-note span {
  font-size: 12px;
  font-weight: 720;
  line-height: 1.55;
}

.inventory-summary {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 4px 0 14px;
  color: #8b95a5;
  font-weight: 760;
}

.inventory-summary strong {
  color: #293342;
}

.next-car-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  transition: opacity 150ms ease;
}

.next-car-grid.updating {
  opacity: 0.55;
  pointer-events: none;
}

.next-car-card {
  overflow: hidden;
  border-radius: 18px;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.next-car-card:focus-visible {
  outline: 3px solid rgba(47, 109, 246, 0.32);
  outline-offset: 4px;
}

.next-car-card:hover {
  transform: translateY(-3px);
  border-color: rgba(47, 109, 246, 0.28);
  box-shadow: 0 28px 58px rgba(24, 35, 51, 0.14);
}

.card-media {
  position: relative;
  aspect-ratio: 1.42 / 1;
  overflow: hidden;
  background: #dfe6ef;
}

.card-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  height: 42%;
  background: linear-gradient(to top, rgba(8, 14, 22, 0.34), transparent);
}

.vehicle-recommended-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 999px;
  padding: 0 10px;
  color: #fff;
  background: rgba(15, 143, 127, 0.95);
  box-shadow: 0 8px 18px rgba(15, 74, 67, 0.24);
  font-size: 12px;
  font-weight: 900;
}

.card-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(1.04) contrast(1.02);
  transition: transform 220ms ease;
}

.card-media-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #dfe6ef;
}

.card-media.image-failed::before {
  content: "暂无图片";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8e99a8;
  font-size: 12px;
  background: #dfe6ef;
}

.card-media-placeholder::after {
  content: "暂无图片";
  color: #8e99a8;
  font-size: 12px;
}

.next-car-card:hover .card-media img {
  transform: scale(1.035);
}

.card-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.card-body h2 {
  min-height: 44px;
  margin: 0;
  color: #141b26;
  font-size: 16px;
  line-height: 22px;
  font-weight: 900;
}

.card-body p {
  margin: 0;
  color: #858f9f;
  font-size: 13px;
  line-height: 20px;
}

.card-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border-top: 1px solid #eef2f7;
  padding-top: 10px;
}

.card-facts div {
  min-width: 0;
  display: grid;
  gap: 3px;
  align-content: start;
}

.card-facts span {
  color: #97a1b1;
  font-size: 11px;
  font-weight: 780;
}

.card-facts strong {
  min-width: 0;
  color: #243044;
  font-size: 13px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-condition-fact {
  min-width: 0;
  grid-column: 1 / -1;
}

.card-condition-fact span {
  display: block;
}

.card-condition-fact strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vehicle-detail-page {
  width: min(1400px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.detail-crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8a94a5;
  font-size: 13px;
  font-weight: 750;
}

.vehicle-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 408px);
  gap: 24px;
  align-items: start;
}

.vehicle-detail-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.vehicle-detail-side {
  display: grid;
  gap: 10px;
  align-self: start;
  min-width: 0;
  position: sticky;
  top: 78px;
}

.vehicle-detail-gallery {
  --detail-gallery-height: clamp(400px, 26vw, 520px);
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
}

.vehicle-detail-media,
.vehicle-detail-summary,
.vehicle-detail-panel {
  overflow: hidden;
  border: 1px solid rgba(156, 171, 193, 0.22);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(32, 44, 68, 0.06);
}

.vehicle-detail-gallery .vehicle-detail-media {
  border-color: rgba(156, 171, 193, 0.18);
}

.vehicle-detail-gallery .vehicle-detail-media:first-child {
  grid-column: 1 / -1;
}

.vehicle-detail-media {
  position: relative;
  height: var(--detail-gallery-height);
  min-height: 0;
  background: #eef2f6;
  touch-action: pan-y;
  user-select: none;
}

.detail-thumb-shell {
  position: relative;
  align-self: start;
  box-sizing: border-box;
  height: var(--detail-gallery-height);
  max-height: var(--detail-gallery-height);
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(156, 171, 193, 0.22);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.detail-thumb-rail {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  align-content: start;
  gap: 6px;
  box-sizing: border-box;
  height: 100%;
  max-height: 100%;
  overflow-y: auto;
  padding: 7px 5px;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(47, 65, 94, 0.36) transparent;
}

.detail-thumb-rail::-webkit-scrollbar {
  width: 5px;
}

.detail-thumb-rail::-webkit-scrollbar-track {
  background: transparent;
}

.detail-thumb-rail::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(47, 65, 94, 0.32);
}

.detail-thumb-rail button {
  overflow: hidden;
  box-sizing: border-box;
  width: 62px;
  height: 46px;
  border: 1px solid #dce3ee;
  border-radius: 6px;
  padding: 0;
  background: #e8edf4;
  box-shadow: none;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.detail-thumb-rail button:hover {
  border-color: rgba(39, 93, 245, 0.78);
  box-shadow: 0 0 0 2px rgba(39, 93, 245, 0.1);
}

.detail-thumb-rail button.active {
  border-color: #2f6df6;
  box-shadow: 0 0 0 2px rgba(47, 109, 246, 0.14);
}

.detail-thumb-rail button.image-failed {
  display: none;
}

.detail-thumb-rail img,
.detail-thumb-rail video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-thumb-video {
  position: relative;
  color: #fff;
  background: linear-gradient(135deg, #111827, #253044);
}

.detail-thumb-video .detail-media-play {
  width: 24px;
  height: 24px;
}

.detail-thumb-video .detail-media-play,
.detail-thumb-video small {
  position: absolute;
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
}

.detail-thumb-video .detail-media-play {
  top: 9px;
}

.detail-thumb-video small {
  bottom: 5px;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
}

.detail-image-nav {
  position: absolute;
  z-index: 5;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.22);
  cursor: pointer;
  transition: background 160ms ease, opacity 160ms ease, transform 160ms ease;
}

.detail-image-nav:hover {
  background: rgba(15, 23, 42, 0.86);
}

.detail-image-nav {
  top: 50%;
  width: 42px;
  height: 56px;
  opacity: 0.82;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(8px);
}

.detail-image-nav-prev {
  left: 14px;
  transform: translateY(-50%);
}

.detail-image-nav-next {
  right: 14px;
  transform: translateY(-50%);
}

.detail-image-nav::before {
  content: "";
  width: 12px;
  height: 12px;
  border-top: 3px solid #fff;
  border-left: 3px solid #fff;
}

.detail-image-nav-prev::before {
  transform: rotate(-45deg);
  margin-left: 4px;
}

.detail-image-nav-next::before {
  transform: rotate(135deg);
  margin-right: 4px;
}

.detail-main-media-stage,
.detail-main-media-stage > img,
.detail-main-media-stage > video,
.detail-image-placeholder {
  display: block;
  width: 100%;
  height: 100%;
}

.detail-main-media-stage {
  position: absolute;
  inset: 0;
}

.detail-main-media-stage > img,
.detail-main-media-stage > video,
.detail-image-placeholder {
  object-fit: cover;
  backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-user-drag: none;
  user-select: none;
}

.detail-main-media-stage > img {
  cursor: zoom-in;
}

.detail-main-media-stage > video {
  background: #050b16;
  object-fit: contain;
}

.detail-main-media-stage .detail-viewer-video-link {
  width: 100%;
  height: 100%;
  place-content: center;
  background: #050b16;
}

.detail-main-media-stage > img.is-swipe-hidden {
  opacity: 0;
}

.detail-image-placeholder {
  display: grid;
  place-items: center;
  color: #8e99a8;
  font-weight: 760;
}

.detail-image-overlay {
  position: absolute;
  z-index: 6;
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
}

.detail-image-overlay strong {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(23, 32, 51, 0.72);
  font-size: 12px;
  font-weight: 850;
  backdrop-filter: blur(10px);
}

.detail-viewer-video-link .detail-media-play {
  width: 48px;
  height: 48px;
}

.vehicle-detail-summary {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 0;
  padding: 20px;
  border-color: rgba(156, 171, 193, 0.24);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(24, 35, 51, 0.08);
}

.vehicle-detail-summary h1 {
  margin: 0;
  color: #141b26;
  font-size: 22px;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.detail-quick-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid #eef2f7;
  border-radius: 8px;
  background: #fbfdff;
  overflow: hidden;
}

.detail-quick-facts div {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 12px;
  text-align: left;
}

.detail-quick-facts div + div {
  border-left: 1px solid #eef2f7;
}

.detail-quick-facts div:nth-child(2n + 1) {
  border-left: 0;
}

.detail-quick-facts div:nth-child(n + 3) {
  border-top: 1px solid #eef2f7;
}

.detail-quick-facts div:only-child {
  grid-column: 1 / -1;
}

.detail-quick-facts strong {
  overflow: hidden;
  color: #182333;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-quick-facts span {
  color: #8a94a5;
  font-size: 12px;
  font-weight: 750;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-actions {
  margin-top: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.detail-actions a,
.detail-actions button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  color: #fff;
  background: #2f6df6;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.detail-actions .detail-source-link,
.detail-actions button.active {
  color: var(--next-green-dark);
  background: #eaf2ff;
}

.detail-actions .detail-source-link {
  order: 3;
  grid-column: 1 / -1;
}

.detail-anchor-nav {
  position: sticky;
  top: 58px;
  z-index: 2;
  display: flex;
  gap: 8px;
  min-height: 44px;
  align-items: center;
  padding: 6px 8px;
  border: 1px solid rgba(156, 171, 193, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 22px rgba(32, 44, 68, 0.05);
  backdrop-filter: blur(14px);
}

.detail-anchor-nav a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  padding: 0 12px;
  color: #3b4554;
  font-size: 13px;
  font-weight: 820;
  white-space: nowrap;
}

.detail-anchor-nav a:hover {
  color: var(--next-green-dark);
  background: #eaf2ff;
}

.detail-overview-panel {
  padding: 18px;
}

.platform-inspection-head .detail-panel-heading {
  margin-bottom: 0;
}

.detail-overview-panel h2 {
  margin: 0;
  padding: 0;
}

.vehicle-archive-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.vehicle-archive-group {
  min-width: 0;
  border: 1px solid #edf1f6;
  border-radius: 8px;
  padding: 7px 10px 6px;
  background: transparent;
}

.vehicle-archive-group[data-archive-group="identity"] {
  grid-column: 1 / -1;
}

.vehicle-archive-group + .vehicle-archive-group {
  padding-top: 7px;
}

.vehicle-archive-group h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 2px;
  color: #3f4d61;
  font-size: 12px;
  font-weight: 850;
  line-height: 16px;
}

.vehicle-archive-group h3::before {
  content: "";
  width: 3px;
  height: 12px;
  flex: none;
  border-radius: 999px;
  background: #2f6df6;
}

.vehicle-detail-panel.vehicle-archive-panel {
  padding: 10px 14px;
}

.vehicle-archive-panel .detail-panel-heading {
  margin-bottom: 4px;
}

.vehicle-archive-panel .detail-panel-heading h2 {
  margin: 0;
  font-size: 16px;
}

.vehicle-archive-panel .detail-panel-heading span {
  min-height: 18px;
  padding: 0 6px;
  font-size: 10px;
}

.vehicle-detail-panel .vehicle-archive-group .detail-field-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 18px;
  row-gap: 0;
}

.vehicle-detail-panel .vehicle-archive-group[data-archive-group="powertrain"] .detail-field-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.vehicle-detail-panel .vehicle-archive-group[data-archive-group="appearance"] .detail-field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vehicle-detail-panel .vehicle-archive-group .customer-vehicle-detail-field {
  min-height: 42px;
  border: 0;
  border-radius: 0;
  padding: 3px 0 2px;
  background: transparent;
}

.vehicle-detail-panel .vehicle-archive-group .customer-vehicle-detail-field dt {
  margin-bottom: 1px;
  line-height: 14px;
}

.vehicle-detail-panel .vehicle-archive-group .customer-vehicle-detail-field dd {
  line-height: 18px;
}

.detail-panel-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.detail-panel-heading span {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  padding: 0 8px;
  color: var(--next-green-dark);
  background: #eaf2ff;
  font-size: 11px;
  font-weight: 850;
}

.vehicle-detail-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
}

.vehicle-detail-panel {
  padding: 18px;
}

.vehicle-detail-panel h2 {
  margin: 0 0 16px;
  color: #141b26;
  font-size: 17px;
}

.vehicle-detail-panel dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.vehicle-detail-panel .detail-field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.vehicle-detail-panel dl div,
.vehicle-detail-panel .detail-field-row {
  min-height: 54px;
  border: 1px solid #e6ebf2;
  border-radius: 6px;
  padding: 10px 12px;
  background: #f8fafc;
}

.vehicle-detail-panel dt {
  margin-bottom: 4px;
  color: #7a8596;
  font-size: 11px;
  font-weight: 750;
}

.vehicle-detail-panel dd {
  margin: 0;
  color: #182333;
  font-size: 14px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.detail-field-row.pending dd {
  color: #9aa4b2;
}

.detail-field-row dd a {
  color: #275df5;
  text-decoration: none;
}

.detail-field-row dd a:hover {
  text-decoration: underline;
}

.vehicle-detail-panel p {
  margin: 0;
  color: #667085;
  line-height: 1.8;
}

.detail-media-panel {
  grid-column: 1 / -1;
}

.detail-media-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.detail-media-card {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid #edf1f6;
  border-radius: 10px;
  background: #f5f8fc;
}

.detail-media-card {
  position: relative;
  display: grid;
  place-items: center;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.detail-media-grid img,
.detail-media-grid video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-media-grid .image-failed {
  display: none;
}

.detail-media-video {
  padding: 12px;
  color: #fff;
  background: linear-gradient(135deg, #111827, #26344d);
}

.detail-media-video video {
  position: absolute;
  inset: 0;
  opacity: 0.42;
}

.detail-media-play {
  position: relative;
  z-index: 1;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.58);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.detail-media-play::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid #fff;
}

.detail-media-video strong,
.detail-media-video small {
  position: relative;
  z-index: 1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-media-video strong {
  margin-top: 8px;
  font-size: 14px;
}

.detail-media-video small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

@media (max-width: 1220px) {
  .next-car-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vehicle-detail-layout,
  .vehicle-detail-grid {
    grid-template-columns: 1fr;
  }

  .vehicle-detail-gallery {
    --detail-gallery-height: clamp(360px, 56vw, 680px);
  }

  .vehicle-detail-main {
    display: contents;
  }

  .vehicle-detail-gallery {
    order: 1;
  }

  .vehicle-detail-side {
    order: 2;
    position: static;
  }

  .detail-anchor-nav {
    order: 3;
  }

  .vehicle-detail-main > .vehicle-detail-panel,
  .vehicle-detail-main > .vehicle-detail-grid {
    order: 4;
  }
}

@media (max-width: 980px) {
  .vehicle-detail-gallery {
    --detail-gallery-height: clamp(280px, 62vw, 560px);
    grid-template-columns: 1fr;
  }

  .detail-thumb-shell {
    order: 2;
    height: auto;
    max-height: none;
    min-height: 0;
  }

  .detail-thumb-rail {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 7px;
    scrollbar-gutter: auto;
  }

  .detail-thumb-rail button {
    flex: 0 0 64px;
  }

  .vehicle-detail-media {
    min-height: 0;
  }

  .detail-image-overlay {
    top: 12px;
    right: 12px;
    bottom: auto;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .detail-anchor-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
    top: 54px;
    gap: 8px;
    padding: 10px;
  }

  .detail-anchor-nav a {
    justify-content: center;
    padding: 0 10px;
  }

  .detail-anchor-nav::-webkit-scrollbar {
    display: none;
  }

  .detail-quick-facts,
  .vehicle-detail-panel .detail-field-grid,
  .customer-vehicle-detail-page .detail-field-grid,
  .customer-vehicle-detail-page .customer-vehicle-primary-panel .detail-field-grid,
  .detail-media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-quick-facts div:nth-child(3) {
    border-left: 0;
    border-top: 1px solid #eef2f7;
  }

  .detail-quick-facts div:nth-child(4) {
    border-top: 1px solid #eef2f7;
  }

  .next-header {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 16px;
  }

  .next-main {
    padding: 14px 12px 42px;
  }
}

@media (max-width: 680px) {

  .next-logo {
    width: 158px;
    min-height: 44px;
  }

  .next-logo img {
    max-height: 44px;
  }

  .filter-head,
  .filter-group {
    padding-left: 14px;
    padding-right: 14px;
  }

  .filter-matrix {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px 14px;
  }

  .filter-group {
    grid-template-columns: minmax(0, 1fr);
  }

  .filter-name {
    font-size: 12px;
  }

  .next-car-grid {
    grid-template-columns: 1fr;
  }

  .detail-quick-facts,
  .vehicle-detail-panel .detail-field-grid,
  .customer-vehicle-detail-page .detail-field-grid,
  .customer-vehicle-detail-page .customer-vehicle-primary-panel .detail-field-grid,
  .detail-media-grid {
    grid-template-columns: 1fr;
  }

  .detail-quick-facts div + div {
    border-left: 0;
    border-top: 1px solid #eef2f7;
  }

  .vehicle-detail-panel .vehicle-archive-group .detail-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vehicle-archive-groups {
    grid-template-columns: 1fr;
  }

  .vehicle-archive-group[data-archive-group="identity"] {
    grid-column: auto;
  }

  .vehicle-detail-panel .vehicle-archive-group[data-archive-group] .detail-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-actions a,
  .detail-actions button {
    flex: 1 1 100%;
  }
}

@media (max-width: 430px) {
  .filter-matrix {
    grid-template-columns: 1fr;
  }
}

/* The inventory and online-search detail pages share the same two-column vehicle profile. */
.customer-vehicle-detail-page .inspection-report-card,
.customer-vehicle-detail-page .vehicle-condition-panel {
  grid-column: 1 / -1;
}

.inspection-report-card-content {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 86px;
  border: 1px solid #dbe7ff;
  border-radius: 10px;
  padding: 14px;
  background: linear-gradient(110deg, #f7faff 0%, #eef4ff 100%);
}

.inspection-report-card-content.is-empty {
  border-style: dashed;
  border-color: #d9e0eb;
  background: #fafbfd;
}

.inspection-report-card-icon {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 10px;
  color: #275df5;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(39, 93, 245, 0.16);
  font-size: 14px;
  font-weight: 900;
}

.inspection-report-card-icon.is-link {
  font-size: 24px;
}

.inspection-report-card-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.inspection-report-card-copy strong,
.inspection-report-card-copy p {
  display: block;
  margin: 0;
}

.inspection-report-card-copy strong {
  color: #182333;
  font-size: 15px;
}

.inspection-report-card-copy p {
  margin-top: 4px;
  color: #667085;
  font-size: 13px;
  line-height: 1.55;
}

.inspection-report-card-action {
  min-height: 38px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  padding: 0 15px;
  color: #fff;
  background: #275df5;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.inspection-report-card-action:hover {
  color: #fff;
  background: #1f4bd1;
}

@media (max-width: 640px) {
  .inspection-report-card-content {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .inspection-report-card-action {
    width: 100%;
  }
}
