/* v0.0.71 — Balanced, 16:9 photo/video gallery for VinFast model landing pages.
 * Only the preview collage is redesigned. The modal and full media collection stay intact.
 */
.tpa-evv-vehicle .tpa-evx-gallery-preview:not(.only-feature){
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:12px;
  align-items:stretch;
}
.tpa-evv-vehicle .tpa-evx-gallery-preview.only-feature{display:grid;grid-template-columns:minmax(0,1fr)}
.tpa-evv-vehicle .tpa-evx-gallery-hero{
  width:100%;height:100%;min-height:0;aspect-ratio:16/9;
  border-radius:14px;
}
.tpa-evv-vehicle .tpa-evx-gallery-hero>img{
  width:100%;height:100%;aspect-ratio:16/9;object-fit:cover;
}
.tpa-evv-vehicle .tpa-evx-gallery-minis{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  grid-template-rows:repeat(2,minmax(0,1fr));
  gap:12px;min-height:0;min-width:0;
  align-content:stretch;
}
.tpa-evv-vehicle .tpa-evx-gallery-mini{
  min-width:0;min-height:0;width:100%;height:100%;
  aspect-ratio:16/9;
  border-radius:12px;
}
.tpa-evv-vehicle .tpa-evx-gallery-mini img{
  display:block;width:100%;height:100%;object-fit:cover;object-position:center;
}
.tpa-evv-vehicle .tpa-evx-gallery-more{
  position:absolute;right:8px;bottom:8px;
  padding:5px 8px;border-radius:7px;
  background:rgba(7,39,64,.86);color:#fff;
  font-size:12px;font-weight:700;line-height:1.25;
  pointer-events:none;
}
.tpa-evv-vehicle .tpa-evx-gallery-preview button:focus-visible{
  outline:3px solid #028fb0;outline-offset:2px;
}
/* Tablet: leading image stays 16:9; four secondary media form one tidy strip. */
@media (max-width: 900px){
  .tpa-evv-vehicle .tpa-evx-gallery-preview:not(.only-feature){grid-template-columns:minmax(0,1fr);gap:10px}
  .tpa-evv-vehicle .tpa-evx-gallery-hero{height:auto;aspect-ratio:16/9}
  .tpa-evv-vehicle .tpa-evx-gallery-minis{
    grid-template-columns:repeat(4,minmax(0,1fr));
    grid-template-rows:auto;gap:9px;
  }
  .tpa-evv-vehicle .tpa-evx-gallery-mini{height:auto;aspect-ratio:16/9}
}
/* Phone: horizontal, swipeable 16:9 previews; never stack two sparse rows. */
@media (max-width: 600px){
  .tpa-evv-vehicle .tpa-evx-gallery-preview:not(.only-feature){gap:9px}
  .tpa-evv-vehicle .tpa-evx-gallery-minis{
    display:flex;flex-wrap:nowrap;gap:8px;overflow-x:auto;
    overflow-y:hidden;padding:1px 1px 6px;
    scrollbar-width:thin;scroll-snap-type:x proximity;
    overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch;
  }
  .tpa-evv-vehicle .tpa-evx-gallery-mini{
    flex:0 0 calc((100% - 8px)/2.18);height:auto;
    aspect-ratio:16/9;scroll-snap-align:start;
    border-radius:9px;
  }
  .tpa-evv-vehicle .tpa-evx-gallery-more{font-size:10px;padding:4px 6px}
}
