body.vehicle-detail-open {
  overflow: hidden;
}

dialog.vehicle-detail {
  --vd-accent: var(--gtsc-red, #d4290e);
  width: min(1280px, calc(100vw - 48px));
  max-width: none;
  max-height: calc(100dvh - 48px);
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: #fff;
  color: #22272e;
  box-shadow: 0 24px 100px #10182040;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

dialog.vehicle-detail::backdrop {
  background: #16212cba;
  backdrop-filter: blur(5px);
}

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

.vehicle-detail :focus-visible {
  outline: 3px solid #2075bb;
  outline-offset: 4px;
}

.vd-toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 15px 32px;
  border-bottom: 1px solid #e9ebee;
  background: #fffffff5;
  backdrop-filter: blur(12px);
}

.vd-eyebrow {
  margin: 0 0 10px;
  color: #777e87;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.6;
}

.vd-toolbar .vd-eyebrow {
  margin: 0;
  overflow-wrap: anywhere;
}

.vd-toolbar .vd-eyebrow span {
  color: #a1a7af;
}

.vd-close {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 5px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #505863;
  font-size: 13px;
  white-space: nowrap;
}

.vd-close span {
  font-size: 26px;
  line-height: 1;
}

.vd-close:hover {
  background: #f1f3f5;
  color: #111;
}

.vd-content {
  padding: 30px 36px 0;
}

.vd-heading {
  padding: 20px 0 24px;
  border-top: 2px solid var(--vd-accent);
}

.vd-heading h2 {
  margin: 0;
  font-size: clamp(26px, 2.8vw, 38px);
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.vd-version {
  margin: 10px 0 0;
  color: #6c737d;
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.vd-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr);
  gap: 32px;
  align-items: start;
}

.vd-gallery {
  min-width: 0;
}

.vd-stage {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  background: #eef0f2;
}

.vd-stage > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.vd-gallery-arrow {
  position: absolute;
  top: calc(50% - 21px);
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0 0 4px;
  border: 1px solid #ffffff75;
  border-radius: 50%;
  background: #ffffffed;
  color: #23272d;
  box-shadow: 0 2px 10px #0002;
  font-size: 32px;
  line-height: 1;
  transition: background 0.15s;
}

.vd-gallery-arrow:hover {
  background: #fff;
}

.vd-gallery-prev {
  left: 14px;
}

.vd-gallery-next {
  right: 14px;
}

.vd-photo-count {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 6px 12px;
  border: 1px solid #ffffff40;
  border-radius: 30px;
  background: #20272ce0;
  color: #fff;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.vd-thumbnails {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 2px 10px;
  scrollbar-width: thin;
}

.vd-thumbnail {
  flex: 0 0 76px;
  overflow: hidden;
  height: 60px;
  padding: 3px;
  border: 2px solid transparent;
  border-radius: 6px;
  background: #f4f5f6;
  opacity: 0.65;
}

.vd-thumbnail[aria-pressed="true"] {
  border-color: var(--vd-accent);
  opacity: 1;
}

.vd-thumbnail:hover {
  opacity: 1;
}

.vd-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 2px;
  object-fit: cover;
}

.vd-overview {
  padding: 24px;
  border: 1px solid #e6e8eb;
  border-radius: 10px;
  background: #fafbfc;
}

.vd-price-label {
  margin: 0 0 3px;
  color: #737b85;
  font-size: 12px;
}

.vd-price {
  margin: 0;
  color: #161c23;
  font-size: clamp(28px, 2.7vw, 37px);
  font-weight: 750;
  letter-spacing: -0.045em;
  line-height: 1.2;
}

.vd-price-note {
  margin: 6px 0 22px;
  color: #6b737d;
  font-size: 12px;
}

.vd-key-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 14px;
  padding: 20px 0;
  border-top: 1px solid #e1e5e9;
  border-bottom: 1px solid #e1e5e9;
}

.vd-key-specs span,
.vd-key-specs strong {
  display: block;
  overflow-wrap: anywhere;
}

.vd-key-specs span {
  margin-bottom: 4px;
  color: #7a828c;
  font-size: 11px;
}

.vd-key-specs strong {
  font-size: 13px;
  font-weight: 650;
}

.vd-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.vd-badges span {
  padding: 4px 7px;
  border: 1px solid #dce4df;
  border-radius: 4px;
  background: #f2f6f3;
  color: #42604e;
  font-size: 10px;
}

.vd-primary-action,
.vd-secondary-action {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  min-height: 44px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.vd-primary-action {
  margin-top: 20px;
  padding: 12px 15px;
  background: var(--vd-accent);
  color: #fff;
}

.vd-primary-action:hover {
  background: #aa2412;
  color: #fff;
}

.vd-secondary-action {
  margin-top: 8px;
  padding: 8px;
  border: 1px solid #dde1e6;
  background: #fff;
  color: #343b44;
}

.vd-seller {
  display: grid;
  gap: 3px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #e1e5e9;
  font-size: 12px;
}

.vd-seller span {
  color: #7a828c;
  font-size: 11px;
}

.vd-section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  margin-top: 28px;
  padding: 17px 0;
  border-bottom: 1px solid #dfe3e7;
}

.vd-section-nav a {
  color: #525b67;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.vd-section-nav a:hover {
  color: var(--vd-accent);
}

.vd-section-nav a span {
  margin-left: 3px;
  color: #939ba5;
  font-size: 11px;
}

.vd-information-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 48px;
}

.vd-section {
  min-width: 0;
  padding: 32px 0;
  scroll-margin-top: 90px;
}

.vd-section h3 {
  margin: 0 0 22px;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.vd-description {
  overflow-wrap: anywhere;
  color: #69717c;
  font-size: 13px;
  line-height: 1.9;
}

.vd-description p {
  margin-bottom: 16px;
}

.vd-description strong {
  color: #353d47;
}

.vd-description h3,
.vd-description h4 {
  margin: 20px 0 10px;
  font-size: 16px;
}

.vd-description-collapsed {
  overflow: hidden;
  max-height: 280px;
  mask-image: linear-gradient(#000 75%, transparent);
}

.vd-text-button {
  padding: 10px 0;
  border: 0;
  background: transparent;
  color: var(--vd-accent);
  font-size: 12px;
  font-weight: 650;
}

.vd-specs {
  margin: 0;
}

.vd-spec-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  padding: 10px 0;
  border-bottom: 1px solid #e7e9ec;
  font-size: 12px;
  line-height: 1.5;
}

.vd-spec-row dt {
  color: #808791;
  font-weight: 400;
}

.vd-spec-row dd {
  margin: 0;
  color: #343c46;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.vd-equipment-section {
  border-top: 1px solid #dfe3e7;
}

.vd-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.vd-option-count {
  padding: 6px 10px;
  border: 1px solid #e2e5e9;
  border-radius: 20px;
  color: #7c858f;
  font-size: 11px;
  white-space: nowrap;
}

.vd-equipment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.vd-equipment-group {
  align-self: start;
  padding: 20px;
  border: 1px solid #e6e9ec;
  border-radius: 8px;
  background: #f9fafb;
}

.vd-equipment-group h4 {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 16px;
  color: #343c46;
  font-size: 14px;
  font-weight: 650;
}

.vd-equipment-group h4 span {
  color: #a2a9b1;
  font-size: 11px;
  font-weight: 400;
}

.vd-equipment-group ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vd-equipment-group li {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 6px;
  color: #707985;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.vd-equipment-group li > span {
  color: #8eaaa0;
}

.vd-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid #e7e9ec;
  color: #939aa3;
  font-size: 11px;
}

@media (max-width: 991px) {
  .vd-content {
    padding: 24px 24px 0;
  }

  .vd-top-grid {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.85fr);
    gap: 20px;
  }

  .vd-overview {
    padding: 18px;
  }

  .vd-equipment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vd-information-grid {
    gap: 28px;
  }
}

@media (max-width: 767px) {
  dialog.vehicle-detail {
    width: 100%;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }

  .vd-toolbar {
    padding: 12px 18px;
  }

  .vd-toolbar .vd-eyebrow span {
    display: none;
  }

  .vd-content {
    padding: 18px 18px 0;
  }

  .vd-top-grid,
  .vd-information-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .vd-information-grid {
    gap: 0;
  }

  .vd-version {
    font-size: 13px;
  }

  .vd-heading {
    padding-top: 16px;
  }

  .vd-key-specs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vd-key-specs strong {
    font-size: 13px;
  }

  .vd-description {
    font-size: 14px;
  }

  .vd-spec-row,
  .vd-equipment-group li {
    font-size: 13px;
  }

  .vd-section-nav {
    gap: 16px;
  }

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

  .vd-section-heading {
    align-items: start;
  }

  .vd-section h3 {
    font-size: 21px;
  }

  .vd-footer {
    flex-direction: column;
    align-items: start;
    gap: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vehicle-detail *,
  .vehicle-detail *::before,
  .vehicle-detail *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
