#inventory .stock-card {
  border: 1px solid var(--line);
  background: #fff;
  overflow-wrap: anywhere;
}
.stock-cover {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #f3f3f3;
  cursor: zoom-in;
}
.stock-cover:focus-visible { outline-offset: -4px; }
#inventory .stock-cover img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
#inventory .stock-card-body { display: flex; flex-direction: column; }
#inventory .stock-card h3 {
  font: 700 clamp(30px, 2.5vw, 42px)/1.03 var(--display);
  letter-spacing: -.015em;
  margin: 10px 0;
}
.stock-status { color: var(--red); }
.stock-card-facts { line-height: 1.5; }
#inventory .stock-price {
  font: 700 20px/1.3 var(--body);
  padding: 18px 0 14px;
  margin-top: auto;
}
.stock-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0 12px;
  border-top: 1px solid var(--line);
}
.stock-card-actions .text-button { min-height: 44px; display: inline-flex; align-items: center; }
.stock-card-actions .text-button:first-child { color: var(--ink); }
.stock-card-actions .text-button:hover, .vehicle-photo-bar a:hover { text-decoration: underline; text-underline-offset: 4px; }
#vehicle-details {
  box-sizing: border-box;
  width: min(1160px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  margin: auto;
  overscroll-behavior: contain;
  overflow-y: auto;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}
#vehicle-details::backdrop { background: rgb(15 15 15 / .78); }
.vehicle-detail-header {
  padding: clamp(16px, 2vw, 28px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}
.vehicle-detail-header form { margin: 0; flex-shrink: 0; }
.vehicle-detail-header .label { color: var(--red); margin: 0 0 5px; }
#vehicle-detail-title {
  font: 700 clamp(28px, 3vw, 46px)/1 var(--display);
  letter-spacing: -.015em;
  margin: 0;
  overflow-wrap: anywhere;
}
.vehicle-detail-close, .vehicle-photo-navigation button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  min-width: 44px;
  min-height: 44px;
  padding: 0 9px;
  font: 22px/1 var(--body);
}
.vehicle-detail-close:hover, .vehicle-photo-navigation button:hover { border-color: var(--ink); }
.vehicle-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(240px, 1fr);
  align-items: start;
  gap: clamp(20px, 3vw, 40px);
  padding: clamp(16px, 2vw, 28px);
}
.vehicle-detail-layout > * { min-width: 0; }
.vehicle-photo-view {
  display: grid;
  place-items: center;
  background: #f3f3f3;
  margin: 0;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 58dvh;
}
#vehicle-detail-image {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
}
.vehicle-photo-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0 12px;
  padding-top: 8px;
}
.vehicle-photo-bar a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 600; }
.vehicle-photo-navigation { display: inline-flex; align-items: center; gap: 8px; }
#vehicle-photo-count { font: 12px var(--mono); font-variant-numeric: tabular-nums; }
.vehicle-detail-price { font: 700 clamp(24px, 2.3vw, 36px)/1.1 var(--body); }
#vehicle-detail-specs { margin: 16px 0; }
#vehicle-detail-specs > div { display: flex; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); padding: 9px 0; font-size: 14px; }
#vehicle-detail-specs dd { margin: 0; text-align: right; font-weight: 600; overflow-wrap: anywhere; }
#vehicle-detail-description { white-space: pre-line; overflow-wrap: anywhere; line-height: 1.55; font-size: 15px; }
#vehicle-detail-inquiry { margin-top: 18px; }
@media(max-width:760px) {
  #vehicle-details { width: calc(100% - 16px); max-height: calc(100dvh - 16px); }
  .vehicle-detail-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .vehicle-detail-header { position: sticky; top: 0; z-index: 1; background: #fff; }
  .vehicle-photo-view { max-height: 46dvh; }
}
