.gallery {
  max-width: 980px;
  margin: 32px auto 48px;
  padding: 0 16px;
}

.gallery-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
  border-radius: 12px;
  overflow: hidden;
  padding: 24px 48px;
  height: 520px;
}

.gallery-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.nav-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  color: #e2e2e2;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  font-size: 22px;
  cursor: pointer;
}

.nav-button:hover,
.nav-button:focus-visible {
  background: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}

.nav-button.prev {
  left: 16px;
}

.nav-button.next {
  right: 16px;
}

.thumbs {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.thumb {
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 0;
  background: none;
  cursor: pointer;
  flex: 0 0 auto;
}

.thumb img {
  display: block;
  width: 110px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
}

.thumb.active {
  border-color: #111111;
}

@media (max-width: 720px) {
  .gallery {
    max-width: 100%;
    width: 100%;
    padding: 0 0.75rem;
  }

  .gallery-frame {
    width: 100%;
    padding: 20px 40px;
    height: 360px;
  }

  .thumbs {
    max-width: 100%;
  }

  .thumb img {
    width: 90px;
    height: 64px;
  }
}
