.gallery__filters {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: clamp(28px, 4vw, 44px) 0 clamp(34px, 5vw, 54px);
}

.gallery__filter {
  min-width: 160px;
  min-height: 46px;
  padding: 0 24px;
  border: 1px solid rgba(216, 166, 74, 0.28);
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}

.gallery__filter:hover,
.gallery__filter:focus-visible {
  border-color: var(--gold-light);
  color: var(--cream);
  outline: none;
}

.gallery__filter.is-active {
  background: var(--gold-grad);
  border-color: transparent;
  color: var(--bg-darkest);
  box-shadow: 0 12px 30px -16px rgba(216, 166, 74, 0.8);
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.5vw, 28px);
}

.gallery__card {
  display: block;
  padding: clamp(10px, 1.5vw, 14px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(44, 27, 16, 0.72), rgba(26, 18, 11, 0.92));
  box-shadow: 0 18px 38px -26px rgba(0, 0, 0, 0.85);
  cursor: pointer;
  overflow: hidden;
}

.gallery__card:hover,
.gallery__card:focus-visible {
  border-color: rgba(216, 166, 74, 0.42);
  outline: none;
}

.gallery__media {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 4;
  background: rgba(9, 6, 4, 0.72);
  border-radius: 6px;
  overflow: hidden;
}

.gallery__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 46px);
  background: rgba(4, 3, 2, 0.9);
}

.gallery-lightbox.is-open {
  display: flex;
}

.gallery-lightbox__img {
  max-width: min(94vw, 1280px);
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.82);
}

.gallery-lightbox__close,
.gallery-lightbox__nav {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(216, 166, 74, 0.38);
  background: rgba(15, 10, 6, 0.74);
  color: var(--cream);
  cursor: pointer;
}

.gallery-lightbox__close {
  top: clamp(12px, 2vw, 22px);
  right: clamp(12px, 2vw, 22px);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1;
}

.gallery-lightbox__nav {
  top: 50%;
  width: 46px;
  height: 56px;
  border-radius: 999px;
  transform: translateY(-50%);
  font-size: 2rem;
}

.gallery-lightbox__prev {
  left: clamp(12px, 2vw, 24px);
}

.gallery-lightbox__next {
  right: clamp(12px, 2vw, 24px);
}

@media (max-width: 900px) {
  .gallery__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .gallery__filters {
    gap: 10px;
  }

  .gallery__filter {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 12px;
    font-size: 0.72rem;
  }

  .gallery__grid {
    grid-template-columns: 1fr;
  }

  .gallery-lightbox {
    padding: 58px 12px 22px;
  }

  .gallery-lightbox__img {
    max-width: 100%;
    max-height: 78vh;
  }

  .gallery-lightbox__nav {
    top: auto;
    bottom: 12px;
    width: 44px;
    height: 44px;
    transform: none;
  }
}
