/* Vehicle gallery containment; loaded after the existing theme. */
.page-vehicle .vehicle-detail { grid-template-columns: minmax(0,1.4fr) minmax(0,1fr); }
.page-vehicle .vehicle-detail > div { min-width:0; }
.page-vehicle .gallery-main { width:100%; min-width:0; min-height:0; aspect-ratio:4/3; }
.page-vehicle .gallery-main img { width:100%; height:100%; object-fit:contain; }
.page-vehicle .gallery-thumbs { width:100%; max-width:100%; min-width:0; overflow-x:auto; overscroll-behavior-x:contain; padding-bottom:8px; }
.page-vehicle .gallery-thumbs img { flex:0 0 84px; width:84px; height:64px; }
.page-vehicle .spec-table { width:100%; table-layout:fixed; }
.page-vehicle .spec-table td { overflow-wrap:anywhere; }
.page-vehicle #lightbox { z-index:10000; }
.page-vehicle #lightbox > img { width:calc(100vw - 32px); height:calc(100vh - 140px); height:calc(100dvh - 140px); max-width:1400px; max-height:100%; object-fit:contain; }
.page-vehicle #lightbox button { min-width:44px; min-height:44px; z-index:1; }
@media (max-width:960px) {
  .page-vehicle .vehicle-detail { display:flex; flex-direction:column; gap:20px; }
  .page-vehicle .vehicle-detail > div:first-child { display:contents; }
  .page-vehicle .vehicle-detail .gallery-main { order:0; flex:none; }
  .page-vehicle .vehicle-detail .gallery-thumbs { order:1; flex:none; margin-top:0; }
  .page-vehicle .vehicle-detail > div:last-child { order:2; width:100%; display:flex; flex-direction:column; gap:20px; }
  .page-vehicle .vehicle-description { order:3; width:100%; min-width:0; }
  .page-vehicle .detail-price-box { order:-1; position:static; width:100%; }
  .page-vehicle .carfax-panel { margin:0; }
  .page-vehicle .vehicle-detail input, .page-vehicle .vehicle-detail textarea { font-size:16px; max-width:100%; }
  .page-vehicle #lightbox .prev { left:8px; }
  .page-vehicle #lightbox .next { right:8px; }
  .page-vehicle #lightbox .lightbox-close { top:12px; right:12px; }
}
