.custom-gallery-wrap {
  display: block;
  width: 100%;
  margin: 32px 0;
}

.custom-gallery {
  display: grid;
  gap: 16px;
  width: 100%;
}

.custom-gallery__main {
  position: relative;
  background: #0f1115;
  border-radius: 16px;
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.custom-gallery__stage {
  position: relative;
}

.custom-gallery__link {
  display: block;
  background: #0f1115;
}

.custom-gallery__link img {
  width: 100%;
  height: 480px;
  display: block;
  object-fit: cover;
}

.custom-gallery__caption {
  position: absolute;
  inset: auto 0 0 0;
  margin: 0;
  padding: 14px 18px;
  color: #f7f9fb;
  font-size: 0.95rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.75) 100%);
  box-sizing: border-box;
}

.custom-gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  width: 44px;
  height: 64px;
  border-radius: 12px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s ease, transform 0.2s ease;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  font-size: 28px;
  line-height: 1;
  z-index: 2;
}

.custom-gallery__nav:hover {
  background: rgba(0, 0, 0, 0.75);
  transform: translateY(-50%) translateY(-1px);
}

.custom-gallery__nav--prev {
  left: 12px;
}

.custom-gallery__nav--next {
  right: 12px;
}

.custom-gallery__thumbs {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 6px 2px 2px;
}

.custom-gallery__thumb {
  border: 2px solid transparent;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  padding: 3px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.custom-gallery__thumb img {
  width: 140px;
  height: 90px;
  object-fit: cover;
  display: block;
  border-radius: 10px;
}

.custom-gallery__thumb.is-active {
  border-color: #27ae60;
  box-shadow: 0 8px 18px rgba(39, 174, 96, 0.3);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .custom-gallery {
    gap: 12px;
  }

  .custom-gallery__link img {
    height: 320px;
  }

  .custom-gallery__thumb img {
    width: 100px;
    height: 68px;
  }

  .custom-gallery__nav {
    width: 38px;
    height: 56px;
  }
}
