.vehicle-360-modal {
  border: 0;
  padding: 0;
  width: min(1240px, calc(100vw - 40px));
  max-width: none;
  height: min(1005px, calc(100dvh - 40px));
  max-height: none;
  border-radius: 20px;
  background: #fff;
  color: #111;
}

.vehicle-360-modal::backdrop {
  background: rgb(0 0 0 / 22%);
}

.vehicle-360-modal__header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px 24px;
}

.vehicle-360-modal__header h2 {
  flex: 1;
  margin: 0;
  font-size: 21px;
  font-weight: 700;
}

.vehicle-360-modal__price {
  display: flex;
  align-items: end;
  gap: 10px;
  white-space: nowrap;
  font-weight: 500;
  font-size: 16px;
}


.vehicle-360-modal__price strong {
  display: flex;
  align-items: end;
  color: #d71920;
  font-size: 44px;
  line-height: 1;
}

.vehicle-360-modal__price small {
  color: #111;
  font-size: 20px;
  margin-left: 4px;
}

.vehicle-360-modal__inquiry {
  background: #ef5000;
  color: #fff;
  border-radius: 10px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 50px;
  flex-shrink: 0;
  padding: 0 22px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}

.vehicle-360-modal__close {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 0 0 30px;
  height: 30px;
  border: 1px solid #999;
  border-radius: 50%;
  background: #fff;
  color: #24272A;
  font-size: 18px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  margin-left: 30px;
}

.vehicle-360-modal__viewer {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #f3f6f7;
}

.vehicle-360-modal__viewer #view360 {
  width: 100% !important;
  height: 100% !important;
  margin: 0;
}

.vehicle-360-modal__viewer #view360-canvas-container {
  width: 100%;
  height: 100%;
  touch-action: none;
}

.vehicle-360-modal__viewer canvas {
  display: block;
}

.vehicle-360-modal__badge {
  position: absolute;
  top: 16px;
  left: 22px;
  width: 68px;
  height: 68px;
  z-index: 2;
  pointer-events: none;
}

@media (max-width: 767px) {
  .vehicle-360-modal {
    width: calc(100vw - 20px);
    border-radius: 14px;
  }

  .vehicle-360-modal__header {
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px;
  }

  .vehicle-360-modal__header h2 {
    flex-basis: calc(100% - 45px);
    font-size: 15px;
  }

  .vehicle-360-modal__close {
    order: 1;
  }

  .vehicle-360-modal__header h2 {
    order: 0;
  }

  .vehicle-360-modal__price {
    order: 2;
    font-size: 12px;
  }

  .vehicle-360-modal__price strong {
    font-size: 28px;
  }

  .vehicle-360-modal__inquiry {
    order: 3;
    width: 100%;
    text-align: center;
    font-size: 14px;
    padding: 12px;
  }
}

html.is-detail-modal-open,
body.is-detail-modal-open {
  overflow: hidden !important;
  overscroll-behavior: none;
}

/* Keep modal geometry independent of site header and Swiper slide rules. */
.vehicle-360-modal {
  box-sizing: border-box;
  margin: auto;
  inset: 0;
  overflow: hidden;
  overscroll-behavior: contain;
}

.vehicle-360-modal__header {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 74px;
  height: auto;
  flex-shrink: 0;
}

.vehicle-360-modal[open] {
  display: flex;
  flex-direction: column;
}

.vehicle-360-modal__viewer {
  flex: 1;
  min-height: 0;
  height: auto;
  aspect-ratio: auto;
  overflow: hidden;
}

.vehicle-360-modal__inquiry img {
  width: 24px;
  height: 18px;
  flex-shrink: 0;
  object-fit: contain;
  margin-top: 2px;
}

.vehicle-360-modal__viewer #view360 {
  position: absolute;
  inset: 0;
  display: block;
  visibility: visible;
  opacity: 1;
  transform: none !important;
}

.vehicle-360-modal__viewer #view360-canvas-container {
  position: absolute;
  inset: 0;
}

.vehicle-360-modal__viewer canvas {
  width: 100% !important;
  height: 100% !important;
}

.vehicle-360-modal__inquiry img {
  filter: brightness(0) invert(1);
}

.vehicle-photo-modal {
  height: min(1035px, calc(100dvh - 40px));
}

.vehicle-photo-modal .vehicle-360-modal__header {
  border-bottom: 1px solid #dce2e5;
}

.vehicle-photo-modal__body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: min(960px, calc(100% - 120px));
  margin: 20px auto 60px;
  gap: 14px;
}

.vehicle-photo-modal__stage {
  position: relative;
  flex: 0 1 720px;
  height: 720px;
  min-height: 0;
}

.vehicle-photo-modal__slider {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.vehicle-photo-modal__slider .swiper-slide {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vehicle-photo-modal__slider .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.vehicle-photo-modal__prev,
.vehicle-photo-modal__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 45px;
  height: 45px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .5);
  color: #fff;
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.vehicle-photo-modal__prev {
  left: -60px;
}

.vehicle-photo-modal__next {
  right: -60px;
}

.vehicle-photo-modal__caption {
  flex-shrink: 0;
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  max-height: 3em;
  overflow: hidden;
}

.vehicle-photo-modal__caption[hidden] {
  display: none;
}

.vehicle-photo-modal__preview {
  display: flex;
  gap: 14px;
  height: 90px;
  flex-shrink: 0;
  min-width: 0;
}

.vehicle-photo-modal__thumbs {
  position: relative;
  display: flex;
  gap: 8px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.vehicle-photo-modal__thumbs::-webkit-scrollbar {
  display: none;
}

.vehicle-photo-modal__thumbs button {
  box-sizing: border-box;
  flex: 0 0 120px;
  height: 90px;
  border: 4px solid transparent;
  padding: 0;
  background: #fff;
  cursor: pointer;
}

.vehicle-photo-modal__thumbs button[aria-current="true"] {
  border-color: #00a5df;
}

.vehicle-photo-modal__thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vehicle-photo-modal__thumb-prev,
.vehicle-photo-modal__thumb-next {
  flex: 0 0 26px;
  border: 0;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 0 6px #bbb;
  color: #00a5df;
  font-size: 32px;
  cursor: pointer;
}

.vehicle-photo-modal button:focus-visible {
  outline: 2px solid #007cbf;
  outline-offset: -2px;
}

.vehicle-photo-modal .swiper-button-lock {
  display: none;
}

@media (max-width: 767px) {
  .vehicle-photo-modal {
    height: fit-content;
    min-height: 0;
    max-height: calc(100dvh - 20px);
    overflow-y: auto;
  }

  .vehicle-photo-modal__body {
    flex: 0 0 auto;
    width: calc(100% - 24px);
    margin: 12px auto 20px;
    gap: 10px;
  }

  .vehicle-photo-modal__prev {
    left: 4px;
  }

  .vehicle-photo-modal__next {
    right: 4px;
  }

  .vehicle-photo-modal__prev,
  .vehicle-photo-modal__next {
    width: 32px;
    height: 32px;
    font-size: 28px;
  }

  .vehicle-photo-modal__preview {
    height: 60px;
    gap: 6px;
  }

  .vehicle-photo-modal__thumbs button {
    flex-basis: 80px;
    height: 60px;
  }

  .vehicle-photo-modal .vehicle-360-modal__close {
    margin-left: 0;
  }
}

.vehicle-photo-modal__prev,
.vehicle-photo-modal__next,
.vehicle-photo-modal__thumb-prev,
.vehicle-photo-modal__thumb-next {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.vehicle-photo-modal__prev span,
.vehicle-photo-modal__next span {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 12px;
  height: 12px;
  border-top: 2.5px solid #fff;
  border-right: 2.5px solid #fff;
}

.vehicle-photo-modal__prev span {
  transform: translate(-40%, -50%) rotate(-135deg);
}

.vehicle-photo-modal__next span {
  transform: translate(-60%, -50%) rotate(45deg);
}

@media (max-width: 767px) {
  .vehicle-photo-modal__stage {
    flex: none;
    height: auto;
    aspect-ratio: 4 / 3;
  }
}

.search_detail .vehicle-gallery__caption,
.vehicle-photo-modal__caption {
  padding-right: 0;
}

.vehicle-photo-modal__caption {
  max-height: none;
  overflow: visible;
}

.search_detail .vehicle-gallery__caption-text,
.vehicle-photo-modal__caption-text {
  display: block;
  margin: 0;
  max-height: none;
  overflow: visible;
  overflow-wrap: anywhere;
}

.vehicle-caption-info {
  position: static;
  display: inline-flex;
  margin-left: 4px;
  vertical-align: middle;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 2px;
  border: 0;
  background: none;
  cursor: pointer;
}

.vehicle-caption-info img {
  width: 16px;
  height: 16px;
}

.vehicle-caption-dialog {
  box-sizing: border-box;
  width: min(342px, calc(100% - 32px));
  max-width: none;
  margin: auto;
  padding: 40px 15px;
  border: 0;
  border-radius: 14px;
  overflow: visible;
  color: #111;
  background: #fff;
}

.vehicle-caption-dialog::backdrop {
  background: rgba(0, 0, 0, .55);
}

.search_detail .vehicle-caption-dialog h2 {
  margin: 0 0 20px;
  padding: 0 0 18px;
  border: 0;
  border-bottom: 1px solid #ddd;
  background: none;
  color: #111;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 700;
}

.vehicle-caption-dialog p {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
}

.vehicle-caption-dialog__close {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  top: -42px;
  right: 0;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid #aaa;
  border-radius: 50%;
  background: #fff;
  color: #59636a;
  font-size: 20px;
  font-weight: 300;
  line-height: 26px;
  cursor: pointer;
}

@media (max-width: 767px) {

  .search_detail .vehicle-caption-dialog h2,
  .vehicle-caption-dialog p {
    font-size: 14px;
  }
}

.vehicle-interest-dialog {
  width: min(480px, calc(100% - 34px));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 16px;
  overflow: visible;
  color: #222;
  background: #fff;
}

.vehicle-interest-dialog::backdrop {
  background: rgba(0, 0, 0, .55);
}

.vehicle-interest-dialog__body {
  padding: 28px;
  max-height: calc(100dvh - 100px);
  overflow-y: auto;
  border-radius: inherit;
  box-sizing: border-box;
}

.vehicle-interest-dialog__close {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  right: 0;
  top: -42px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid #aaa;
  border-radius: 50%;
  background: #fff;
  color: #555;
  font-size: 20px;
  line-height: 26px;
  cursor: pointer;
}

.search_detail .vehicle-interest-dialog h2 {
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 22px;
  line-height: 1.5;
  text-align: center;
}

.vehicle-interest-dialog__lead {
  margin: 0 0 20px;
  color: #ef5000;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 700;
  text-align: center;
}

.vehicle-interest-dialog__car {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 16px;
  margin-bottom: 20px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.vehicle-interest-dialog__image {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  align-self: center;
}

.vehicle-interest-dialog__prices p {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.3;
}

.vehicle-interest-dialog__prices p:last-child {
  margin-bottom: 0;
}

.vehicle-interest-dialog__prices strong {
  font-size: 26px;
}

.vehicle-interest-dialog__prices .vehicle-interest-dialog__total {
  color: #df111b;
  font-size: 32px;
}

.vehicle-interest-dialog__specs {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 6px 10px;
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
}

.vehicle-interest-dialog__specs dt,
.vehicle-interest-dialog__specs dd {
  margin: 0;
}

.vehicle-interest-dialog__action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 8px;
  box-sizing: border-box;
  border-radius: 12px;
  background: #ed5000;
  color: #fff;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 700;
  text-decoration: none;
}

.vehicle-interest-dialog__action--phone {
  background: #2bc650;
  margin-top: 10px;
}

.vehicle-interest-dialog__action img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.vehicle-interest-dialog__optout {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  font-size: 14px;
  cursor: pointer;
}

.vehicle-interest-dialog__optout input {
  appearance: auto;
  width: 18px;
  height: 18px;
  margin: 0;
}

@media (max-width: 767px) {
  .vehicle-interest-dialog {
    width: min(400px, calc(100% - 34px));
  }

  .vehicle-interest-dialog__body {
    padding: 22px 15px 20px;
  }

  .search_detail .vehicle-interest-dialog h2 {
    font-size: 18px;
    margin-bottom: 12px;
  }

  .vehicle-interest-dialog__lead {
    font-size: 14px;
    margin-bottom: 18px;
  }

  .vehicle-interest-dialog__car {
    gap: 12px 15px;
  }

  .vehicle-interest-dialog__specs {
    font-size: 14px;
    grid-template-columns: 80px 1fr;
  }

  .vehicle-interest-dialog__prices strong {
    font-size: 24px;
  }

  .vehicle-interest-dialog__prices .vehicle-interest-dialog__total {
    font-size: 30px;
  }

  .vehicle-interest-dialog__optout {
    font-size: 12px;
  }
}
