[data-gallery] {
  display: flex;
  flex-direction: column;
  gap: 8px;
  outline: none;
}

[data-gallery]:focus-visible {
  outline: 2px solid #005fcc;
  outline-offset: 2px;
}

.gallery__stage {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gallery__main {
  position: relative;
  flex: 1;
  overflow: hidden;
  background: #111;
  line-height: 0;
}

.gallery__image {
  display: block;
  width: 100%;
  height: auto;
}

.gallery__description {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-family: sans-serif;
  font-size: 0.9rem;
  line-height: 1.4;
}

.gallery__prev,
.gallery__next {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: none;
  border: 1px solid #ccc;
  border-radius: 50%;
  cursor: pointer;
  color: #333;
}

.gallery__prev:hover,
.gallery__next:hover {
  background: #eee;
}

.gallery__prev svg,
.gallery__next svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gallery__thumbnails {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.gallery__thumb {
  padding: 0;
  background: none;
  border: 2px solid transparent;
  cursor: pointer;
  line-height: 0;
}

.gallery__thumb:hover {
  border-color: #999;
}

.gallery__thumb--active,
.gallery__thumb[aria-current="true"] {
  border-color: #333;
}

.gallery__thumb img {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: cover;
}
