/* Gallery Container */
.gallery-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

/* Main Display Area */
.gallery-main {
  width: 100%;
  height: 600px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.gallery-main img,
.gallery-main iframe {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  cursor: pointer;
}

.gallery-main iframe {
  width: 100%;
  height: 100%;
}

/* Thumbnails Wrapper */
.gallery-thumbnails-wrapper {
  position: relative;
  background: #1a1a1a;
}

/* Thumbnail Strip */
.gallery-thumbnails {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: #1a1a1a;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
}

.gallery-thumbnails::-webkit-scrollbar {
  height: 8px;
}

.gallery-thumbnails::-webkit-scrollbar-track {
  background: #2a2a2a;
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 4px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb:hover {
  background: #777;
}

/* Thumbnail Items */
.gallery-thumb {
  position: relative;
  flex-shrink: 0;
  width: 100px;
  height: 75px;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.6;
}

.gallery-thumb:hover {
  opacity: 1;
  border-color: #667eea;
  transform: translateY(-2px);
}

.gallery-thumb.active {
  opacity: 1;
  border-color: #667eea;
  box-shadow: 0 0 12px rgba(102, 126, 234, 0.6);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Video Play Overlay */
.video-thumb .play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.video-thumb:hover .play-overlay {
  opacity: 1;
}

/* Loading State */
.gallery-main.loading::after {
  content: '';
  position: absolute;
  width: 50px;
  height: 50px;
  border: 4px solid #333;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Navigation Buttons */
.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  padding: 0;
}

.gallery-nav-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  border-color: #667eea;
  transform: translateY(-50%) scale(1.1);
}

.gallery-nav-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.gallery-nav-left {
  left: 8px;
}

.gallery-nav-right {
  right: 8px;
}

.gallery-nav-btn svg {
  pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
  .gallery-main {
    height: 400px;
  }

  .gallery-thumb {
    width: 80px;
    height: 60px;
  }

  .gallery-nav-btn {
    width: 40px;
    height: 40px;
  }

  .gallery-nav-btn svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 480px) {
  .gallery-main {
    height: 300px;
  }

  .gallery-thumb {
    width: 70px;
    height: 52px;
  }

  .gallery-thumbnails {
    gap: 6px;
    padding: 8px;
  }

  .gallery-nav-btn {
    width: 36px;
    height: 36px;
  }

  .gallery-nav-left {
    left: 4px;
  }

  .gallery-nav-right {
    right: 4px;
  }
}
