/* Gallery wrapper */
.gallery {
  max-width: 900px;
  margin: 20px auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Preview area */
.gallery-preview {
  width: 100%;
  max-height: 700px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.gallery-preview img,
.gallery-preview video {
  max-width: 100%;
  max-height: 500px; /* scale previews */
  object-fit: contain;
  display: block;
  margin: 0 auto; /* center */
}

/* Thumbnails container (scrollable) */
.gallery-thumbs-container {
  overflow-x: auto;
  scroll-behavior: smooth;
  width: 100%;
  display: flex;
  align-items: center;
  padding: 8px 0;
  position: relative;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.gallery-thumbs-container::-webkit-scrollbar {
  display: none;
}

/* Thumbnails row */
.gallery-thumbs {
  display: flex;
  flex-wrap: nowrap; /* horizontal scroll */
}

.gallery-thumbs img,
.gallery-thumbs video {
  width: 100px;
  height: 75px;
  object-fit: cover;
  cursor: pointer;
  border-radius: 4px;
  flex: 0 0 auto;
  margin-right: 6px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-thumbs img.active,
.gallery-thumbs video.active {
  transform: scale(1.15);
  outline: 3px solid var(--accent, #007bff);
}

/* Gallery arrows */
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.2);
  border: none;
  font-size: 2rem;
  cursor: pointer;
  padding: 8px;
  z-index: 2;
  transition: background 0.2s, transform 0.2s;
}

.gallery-arrow.left {
  left: -10px;
}

.gallery-arrow.right {
  right: -10px;
}

.gallery-arrow:hover {
  background: rgba(0,0,0,0.4);
  color: #0077cc;
  transform: translateY(-50%) scale(1.2);
}
