.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.photo-item {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  line-height: 0;
}

.photo-item img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.photo-item:hover img {
  transform: scale(1.04);
}

.photo-empty {
  opacity: 0.7;
}

body.photo-lightbox-open {
  overflow: hidden;
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.85);
  cursor: zoom-out;
}

.photo-lightbox[hidden] {
  display: none;
}

.photo-lightbox__figure {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  text-align: center;
  cursor: default;
}

.photo-lightbox__img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 6px;
}

.photo-lightbox__caption {
  margin-top: 0.75rem;
  color: #fff;
  font-size: 0.9rem;
}

.photo-lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  padding: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}
