.p-car-gallery { grid-column: 1 / -1; grid-row: 2; min-width: 0; overflow: hidden; padding: 32px 0 12px; border-top: 1px solid #abc2c2; }
#car .p-detail__extra { grid-row: 3; }
#car .p-detail__back { grid-row: 4; }
.p-car-gallery__heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 24px; }
.p-car-gallery__heading h3 { font-size: clamp(22px, 2.5vw, 30px); margin: 8px 0 12px; }
.p-car-gallery__heading p:not(.c-eyebrow) { font-size: 14px; color: #526365; margin: 0; }
.p-car-gallery__toggle { flex: none; border: 1px solid #20818b; color: #146571; background: transparent; border-radius: 3px; padding: 12px 16px; min-height: 44px; font: inherit; font-size: 12px; cursor: pointer; }
.p-car-gallery__toggle:hover { background: #dcebea; }
.p-car-gallery__rail { display: flex; gap: 20px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #20818b #dfe6e3; padding-bottom: 16px; overscroll-behavior-x: contain; }
.p-car-gallery__group { display: flex; flex: none; gap: 20px; }
.p-car-gallery__card { display: block; flex: none; width: clamp(260px, 34vw, 460px); color: #112a2d; text-decoration: none; }
.p-car-gallery__card img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: filter .25s; }
.p-car-gallery__caption { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; padding-top: 12px; }
.p-car-gallery__zoom { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border: 1px solid #20818b; border-radius: 50%; color: #20818b; font-size: 23px; transition: background .2s, color .2s; }
.p-car-gallery__card:hover img { filter: brightness(1.08); }
.p-car-gallery__card:hover .p-car-gallery__zoom { background: #20818b; color: white; }
.p-car-gallery__card:focus-visible, .p-car-gallery button:focus-visible, .p-gallery-dialog button:focus-visible { outline: 3px solid #ff643b; outline-offset: 3px; }
.p-car-gallery__hint { font-size: 12px; color: #146571; text-align: right; margin: 12px 0 0; }
.p-gallery-dialog { width: min(1200px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); padding: 64px 24px 20px; border: 1px solid #356064; background: #071b20; color: #fff; }
.p-gallery-dialog::backdrop { background: rgb(0 8 12 / .92); }
.p-gallery-dialog__close { position: absolute; right: 12px; top: 10px; }
.p-gallery-dialog button { min-width: 48px; min-height: 48px; border: 1px solid #699da2; background: transparent; color: white; font: inherit; cursor: pointer; }
.p-gallery-dialog button:hover { background: #146571; }
.p-gallery-dialog__image { display: block; width: 100%; height: min(65dvh, 675px); object-fit: contain; }
.p-gallery-dialog__bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; }
.p-gallery-dialog__caption { margin: 0; text-align: center; font-size: 14px; }
.p-gallery-dialog__status { text-align: center; font-size: 12px; color: #a9d5d5; }
@media (max-width: 800px) {
  .p-car-gallery { grid-row: 3; padding-top: 24px; }
  #car .p-detail__extra { grid-row: 4; }
  #car .p-detail__back { grid-row: 5; }
  .p-car-gallery__heading { align-items: start; flex-direction: column; gap: 16px; }
  .p-car-gallery__card { width: min(78vw, 420px); }
  .p-car-gallery__rail, .p-car-gallery__group { gap: 14px; }
  .p-gallery-dialog { padding: 62px 12px 16px; }
  .p-gallery-dialog__image { height: 55dvh; }
  .p-gallery-dialog__caption { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .p-car-gallery * { transition: none !important; } }
