.vehicle-gallery-opener {
  cursor: zoom-in;
}

.vehicle-gallery-thumbnail {
  display: block;
  --fn-aspect-ratio: 75%;
}

.vehicle-detail-page #vehicleGallery,
.vehicle-detail-page .main-image-wrapper {
  border-radius: 1rem;
  background: var(--fn-tertiary-bg);
}

.vehicle-detail-page .main-image-wrapper {
  height: auto;
  max-height: none;
  aspect-ratio: 4 / 3;
}

.vehicle-detail-page .main-image-wrapper img {
  width: 100%;
  height: 100%;
  border-radius: 0;
}

.vehicle-detail-page #thumbs {
  --swiper-thumbnail-active-border-color: var(--fn-primary);
  --swiper-thumbnail-border-radius: .75rem;
}

.vehicle-detail-gallery-nav .btn {
  width: 2.75rem;
  height: 2.75rem;
}

/* Los controles conservan su lugar sobre la foto retenida durante la descarga. */
#vehicleGallery > .vehicle-detail-gallery-nav,
#vehicleGallery > .publication-detail-gallery-count,
#vehicleGallery > .publication-detail-gallery-status {
  z-index: 7 !important;
}

#vehicleGallery > .panva-image-retained {
  border-radius: inherit;
}

#vehicleLightbox .service-lightbox__stage {
  position: relative;
  min-height: 10rem;
}

.vehicle-detail-equipment .accordion-item {
  margin-top: 1rem;
  border: 0;
  background: transparent;
}

.vehicle-detail-equipment .accordion-button,
.vehicle-detail-equipment .accordion-button:not(.collapsed) {
  padding: .5rem 0;
  background: transparent;
  color: var(--fn-heading-color);
  box-shadow: none;
  font-size: 1rem;
  font-weight: 600;
}

.vehicle-detail-equipment .accordion-body {
  padding: .5rem 0 0;
}

.vehicle-detail-equipment .vehicle-detail-equipment-items {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: .5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vehicle-detail-equipment .vehicle-detail-equipment-items li {
  display: inline-flex;
  flex: 0 1 auto;
  flex-direction: column;
  width: fit-content;
  max-width: 100%;
  padding: .5rem .75rem;
  border-radius: 999px;
  background: var(--fn-tertiary-bg);
  color: var(--fn-heading-color);
  font-size: .875rem;
  overflow-wrap: anywhere;
}

.vehicle-detail-equipment-items span {
  display: block;
  color: var(--fn-secondary-color);
}

.vehicle-detail-page .financing-card {
  border-radius: 1.5rem;
}

.vehicle-detail-page .financing-card .btn {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
}

.vehicle-detail-page .financing-title {
  white-space: normal;
}

.vehicle-detail-page .financing-text {
  overflow-wrap: anywhere;
}

.vehicle-detail-page .financing-image {
  max-width: 28%;
}

.vehicle-gallery-opener:focus-visible {
  outline: 3px solid var(--fn-primary);
  outline-offset: -3px;
}

/* Reutiliza el indicador y las medidas del visor de servicios. */
.vehicle-gallery-zoom {
  position: absolute;
  right: 1rem;
  top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--fn-body-bg);
  color: var(--fn-body-color);
  pointer-events: none;
}

#vehicleLightbox .service-lightbox__image {
  max-height: calc(100dvh - 8rem);
  touch-action: pan-y pinch-zoom;
}

.vehicle-lightbox-count {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

#vehicleLightbox[hidden],
#vehicleLightbox [hidden] {
  display: none !important;
}

@media (max-width: 575.98px) {
  #vehicleLightbox .service-lightbox__image {
    max-height: calc(100dvh - 5rem);
  }
}
