.gallery {
  margin-bottom: var(--spacing-xl);
}

.gallery__main {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 720px;
  background: var(--color-bg-light);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

@media (max-width: 600px) {
  .gallery__main {
    aspect-ratio: 3 / 4;
    max-height: none;
    border-radius: 8px;
  }
}

.gallery__main-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery__main-img.is-active {
  opacity: 1;
}

.gallery__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.9);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: var(--transition);
  z-index: 2;
}

.gallery__btn--prev { left: 12px; }
.gallery__btn--next { right: 12px; }

@media (max-width: 600px) {
  .gallery__btn { width: 36px; height: 36px; }
  .gallery__btn--prev { left: 8px; }
  .gallery__btn--next { right: 8px; }
}

@media (hover: hover) {
  .gallery__btn:hover {
    background: var(--color-white);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  }
}

.gallery__dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.gallery__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.6);
  cursor: pointer;
  padding: 0;
  transition: var(--transition);
}

.gallery__dot--active {
  background: var(--color-white);
  transform: scale(1.3);
}

.gallery__thumbs {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.gallery__thumb {
  flex-shrink: 0;
  width: 80px;
  height: 56px;
  border-radius: 6px;
  overflow: hidden;
  outline: 2px solid transparent;
  outline-offset: 1px;
  cursor: pointer;
  padding: 0;
  background: var(--color-bg-light);
  transition: var(--transition);
  border: none;
}

.gallery__thumb--active {
  outline-color: var(--color-secondary);
}

.gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 600px) {
  .gallery__thumbs {
    display: none;
  }
}
