/* ══════════════════════════════════════════════════════════════
   GALLERY
══════════════════════════════════════════════════════════════ */
#gallery {
  padding: var(--section-py) 0;
}

/* Filter tabs */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.filter-btn {
  padding: 0.4rem 1.1rem;
  border-radius: var(--r-full);
  border: 1.5px solid var(--border);
  font-size: 0.75rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  transition: all var(--ease);
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Masonry grid — CSS columns */
.gallery-grid {
  columns: 2;
  column-gap: 0.75rem;
}
@media (min-width: 640px)  { .gallery-grid { columns: 3; } }
@media (min-width: 1024px) { .gallery-grid { columns: 4; } }

.gallery-item {
  break-inside: avoid;
  margin-bottom: 0.75rem;
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  role: listitem;
  /* Placeholder background while image loads */
  background: var(--bg-alt);
}
.gallery-item img {
  width: 100%;
  display: block;
  transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(196, 150, 90, 0);
  transition: background var(--ease);
  pointer-events: none;
}
.gallery-item:hover::after { background: rgba(196, 150, 90, 0.08); }

.gallery-item.filtered-out {
  display: none;
}

/* "Order similar" button — bottom bar */
.similar-btn {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: 0.45rem 0.5rem;
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  border-radius: 0 0 var(--r-md) var(--r-md);
  transition: background 0.2s, color 0.15s;
  z-index: 2;
  line-height: 1.2;
}
.similar-btn:hover { background: rgba(0, 0, 0, 0.5); }
.similar-btn.inspired {
  background: var(--accent);
  color: #fff;
}

/* Empty state */
.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 3rem 0;
}

/* Instagram link */
.gallery-footer {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}
.gallery-footer .btn-outline {
  gap: 0.5rem;
  font-size: 0.78rem;
}


/* ══════════════════════════════════════════════════════════════
   LIGHTBOX
══════════════════════════════════════════════════════════════ */
.lightbox {
  max-width: 100vw;
  max-height: 100dvh;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(0, 0, 0, 0.94);
}
.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.94);
}
.lightbox-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.lightbox-img {
  max-width: min(90vw, 960px);
  max-height: 88dvh;
  object-fit: contain;
  border-radius: var(--r-md);
  display: block;
}
.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  color: rgba(255,255,255,0.75);
  font-size: 1.4rem;
  line-height: 1;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background var(--ease), color var(--ease);
}
.lightbox-close:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.65);
  font-size: 2.8rem;
  line-height: 1;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background var(--ease), color var(--ease);
}
.lightbox-prev { left: 0.75rem; }
.lightbox-next { right: 0.75rem; }
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
