.vehicle-gallery {
  position: relative;
  width: 100%;
  /* background: #121212; */
}

.vehicle-gallery-main {
  position: relative;
  overflow: hidden;
  /* background: #151515; */
}

.vehicle-gallery-main-slide {
  display: block;
  width: 78%;
  flex-shrink: 0;
  aspect-ratio: 5 / 3;
}

.vehicle-gallery-main .swiper-wrapper {
  align-items: stretch;
}

.vehicle-gallery-main-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  /* background: #151515; */
}

.vehicle-gallery-prev,
.vehicle-gallery-next,
.vehicle-gallery-lightbox-prev,
.vehicle-gallery-lightbox-next,
.vehicle-gallery .swiper-button-prev,
.vehicle-gallery .swiper-button-next {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 64px;
  height: 96px;
  border: 0;
  border-radius: 0;
  background: transparent;
  transform: translateY(-50%);
  cursor: pointer;
  color: rgb(170, 19, 32);
}

.vehicle-gallery-prev::after,
.vehicle-gallery-next::after,
.vehicle-gallery-lightbox-prev::after,
.vehicle-gallery-lightbox-next::after,
.vehicle-gallery .swiper-button-prev::after,
.vehicle-gallery .swiper-button-next::after {
  content: '';
  display: block;
  width: 28px;
  height: 28px;
  margin: 0 auto;
  border-top: 4px solid currentColor;
  border-right: 4px solid currentColor;
}

.vehicle-gallery-prev {
  left: 12px;
  /* left: 4px; */
}

.vehicle-gallery-prev::after,
.vehicle-gallery-lightbox-prev::after,
.vehicle-gallery .swiper-button-prev::after {
  transform: rotate(-135deg);
}

.vehicle-gallery-next {
  /* right: 4px; */
  right: 12px;
}

.vehicle-gallery-next::after,
.vehicle-gallery-lightbox-next::after,
.vehicle-gallery .swiper-button-next::after {
  transform: rotate(45deg);
}

.vehicle-gallery-counter {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 14px;
  line-height: 1;
}

.vehicle-gallery-actions {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 2;
  display: inline-flex;
  gap: 12px;
}

.vehicle-gallery-grid-trigger,
.vehicle-gallery-lightbox-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  flex: 0 0 auto;
  width: auto;
  /* min-height: 48px; */
  /* padding: 12px 20px; */
  /* padding: 8px 16px; */
  padding: 1em 1.5em;
  border: 0;
  border-radius: 999px;
  /* background: rgba(0, 0, 0, 0.65); */
  background: var(--color-black-3);
  color: #fff;
  /* font-size: 14px; */
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  line-height: 1;
  cursor: pointer;
}

.vehicle-gallery-grid-trigger:hover,
.vehicle-gallery-lightbox-trigger:hover {
  background: var(--color-content-primary);
}

.vehicle-gallery-grid-trigger::before,
.vehicle-gallery-lightbox-trigger::before {
  display: inline-block;
  font-family: 'fontawesome';
  font-size: 1rem;
  font-weight: 400;
  line-height: 1;
}

.vehicle-gallery-grid-trigger::before {
  content: '\f00a';
}

.vehicle-gallery-lightbox-trigger::before {
  content: '\f00e';
}

.vehicle-gallery-grid {
  position: fixed;
  inset: 0;
  z-index: 9998;
}

.vehicle-gallery-grid-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
}

.vehicle-gallery-grid-dialog {
  position: relative;
  z-index: 1;
  width: 100vw;
  height: 100dvh;
  margin: 0;
  padding: 0.5rem;
  overflow: auto;
  /* background: #101010; */
  background: var(--color-black-3);
  border-radius: 0;
}

.vehicle-gallery-grid-close {
  position: sticky;
  top: 0;
  right: 0;
  z-index: 2;
  display: block;
  width: 36px;
  height: 36px;
  margin: 0 0 20px auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}

.vehicle-gallery-grid-close::before,
.vehicle-gallery-grid-close::after {
  content: '';
  position: absolute;
  top: 17px;
  left: 8px;
  width: 20px;
  border-top: 2px solid rgb(170, 19, 32);
}

.vehicle-gallery-grid-close::before {
  transform: rotate(45deg);
}

.vehicle-gallery-grid-close::after {
  transform: rotate(-45deg);
}

.vehicle-gallery-grid-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.vehicle-gallery-grid-item {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.vehicle-gallery-grid-image {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 3;
  object-fit: cover;
  border-radius: 0;
}

.vehicle-gallery-thumbs {
  /* padding: 14px 16px 18px; */
  padding: 1.5rem 0 0 0;
  overflow: hidden;
  /* background: #1a1a1a; */
  /* border-top: 1px solid rgba(255, 255, 255, 0.08); */
}

.vehicle-gallery-thumb-slide {
  width: 110px;
  height: 66px;
  opacity: 0.45;
  cursor: pointer;
  border: 1px solid transparent;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.vehicle-gallery-thumb-slide.swiper-slide-thumb-active {
  opacity: 1;
  border-color: #aa1320;
}

.vehicle-gallery-thumb-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vehicle-gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.vehicle-gallery-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
}

.vehicle-gallery-lightbox-dialog {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0;
}

.vehicle-gallery-lightbox-main {
  position: relative;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  background: #050505;
}

.vehicle-gallery-lightbox-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.vehicle-gallery-lightbox-image {
  display: block;
  width: 100%;
  height: 100dvh;
  object-fit: contain;
}

.vehicle-gallery-lightbox-close,
.vehicle-gallery-lightbox-prev,
.vehicle-gallery-lightbox-next {
  position: absolute;
  z-index: 3;
  width: 72px;
  height: 112px;
  border: 0;
  cursor: pointer;
}

.vehicle-gallery-lightbox-close {
  top: 24px;
  right: 24px;
  width: 36px;
  height: 36px;
  background: transparent;
}

.vehicle-gallery-lightbox-close::before,
.vehicle-gallery-lightbox-close::after {
  content: '';
  position: absolute;
  top: 17px;
  left: 8px;
  width: 20px;
  border-top: 2px solid rgb(170, 19, 32);
}

.vehicle-gallery-lightbox-close::before {
  transform: rotate(45deg);
}

.vehicle-gallery-lightbox-close::after {
  transform: rotate(-45deg);
}

.vehicle-gallery-lightbox-prev,
.vehicle-gallery-lightbox-next {
  top: 50%;
  transform: translateY(-50%);
}

.vehicle-gallery-lightbox-prev {
  left: 24px;
}

.vehicle-gallery-lightbox-next {
  right: 24px;
}

.vehicle-gallery-lightbox-counter {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 3;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  line-height: 1;
}

body.vehicle-gallery-lightbox-open {
  overflow: hidden;
}

body.vehicle-gallery-grid-open {
  overflow: hidden;
}

.vehicle-gallery-lightbox:fullscreen {
  background: #000;
}

.vehicle-gallery-lightbox:fullscreen .vehicle-gallery-lightbox-main {
  width: 100%;
  height: 100%;
}

.vehicle-gallery-lightbox:fullscreen .vehicle-gallery-lightbox-image {
  height: 100%;
}

@media (max-width: 720px) {
  .vehicle-gallery-main-slide {
    width: 100%;
  }

  .vehicle-gallery-prev,
  .vehicle-gallery-next,
  .vehicle-gallery-lightbox-prev,
  .vehicle-gallery-lightbox-next,
  .vehicle-gallery .swiper-button-prev,
  .vehicle-gallery .swiper-button-next {
    width: 52px;
    height: 84px;
  }

  .vehicle-gallery-prev::after,
  .vehicle-gallery-next::after,
  .vehicle-gallery-lightbox-prev::after,
  .vehicle-gallery-lightbox-next::after,
  .vehicle-gallery .swiper-button-prev::after,
  .vehicle-gallery .swiper-button-next::after {
    width: 24px;
    height: 24px;
    border-top-width: 3px;
    border-right-width: 3px;
  }

  .vehicle-gallery-prev {
    left: 10px;
  }

  .vehicle-gallery-next {
    right: 10px;
  }

  .vehicle-gallery-counter {
    right: 10px;
    bottom: 10px;
    font-size: 13px;
  }

  .vehicle-gallery-actions {
    left: 10px;
    bottom: 10px;
    gap: 8px;
  }

  .vehicle-gallery-grid-trigger,
  .vehicle-gallery-lightbox-trigger {
    font-size: 0.875rem;
  }

  .vehicle-gallery-thumbs {
    display: none;
  }

  .vehicle-gallery-grid-trigger {
    display: none;
  }

  .vehicle-gallery-thumb-slide {
    width: 84px;
    height: 58px;
  }

  .vehicle-gallery-grid-dialog {
    width: 100vw;
    height: 100dvh;
    margin: 0;
    padding: 16px;
    border-radius: 0;
  }

  .vehicle-gallery-grid-close {
    width: 32px;
    height: 32px;
    margin-bottom: 16px;
  }

  .vehicle-gallery-grid-close::before,
  .vehicle-gallery-grid-close::after {
    top: 15px;
    left: 7px;
    width: 18px;
  }

  .vehicle-gallery-grid-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.875rem;
  }

  .vehicle-gallery-lightbox-close {
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
  }

  .vehicle-gallery-lightbox-close::before,
  .vehicle-gallery-lightbox-close::after {
    top: 15px;
    left: 7px;
    width: 18px;
  }

  .vehicle-gallery-lightbox-prev {
    left: 12px;
  }

  .vehicle-gallery-lightbox-next {
    right: 12px;
  }

  .vehicle-gallery-lightbox-counter {
    right: 12px;
    bottom: 12px;
    font-size: 13px;
  }
}
