/* ==========================================================================
   GALLERY PAGE — ROXY Interiors
   ========================================================================== */

/* ---------- Filter Bar ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: var(--space-lg);
}

.filter-pill {
  padding: 10px 24px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  border-radius: 100px;
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-pill:hover {
  background: rgba(26, 26, 26, 0.05);
}

.filter-pill.active {
  background: var(--color-primary);
  color: var(--color-surface);
}

/* ---------- Masonry Grid ---------- */
.masonry {
  columns: 3;
  column-gap: 24px;
}

.masonry__item {
  break-inside: avoid;
  margin-bottom: 24px;
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, box-shadow;
}

.masonry__item:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 20px 40px rgba(196, 168, 130, 0.22);
  z-index: 5;
  position: relative;
}

.masonry__img {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
}

.masonry__img--landscape {
  aspect-ratio: 4/3;
}

.masonry__img--portrait {
  aspect-ratio: 3/4;
}

.masonry__img--square {
  aspect-ratio: 1/1;
}

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

/* Hidden state for filtering */
.masonry__item.hidden {
  display: none;
}

/* ---------- Gallery Section ---------- */
.gallery-section {
  background: var(--color-background);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .masonry {
    columns: 2;
  }
}

@media (max-width: 600px) {
  .masonry {
    columns: 1;
  }

  .filter-bar {
    gap: 8px;
  }

  .filter-pill {
    padding: 11px 20px;
    font-size: 13px;
  }
}

/* ---------- Premium Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background-color: rgba(17, 17, 17, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox__content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateY(30px) scale(0.9);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox.open .lightbox__content {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.lightbox__image {
  max-width: 100%;
  max-height: 70vh;
  border-radius: var(--border-radius);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.3s ease;
}

.lightbox__image:hover {
  transform: scale(1.02);
}

.lightbox__caption {
  color: var(--color-surface);
  margin-top: 16px;
  font-family: var(--font-heading);
  font-size: clamp(18px, 2.5vw, 26px);
  text-align: center;
  font-weight: 500;
}

.lightbox__category {
  color: var(--color-tertiary);
  font-family: var(--font-body);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-top: 6px;
  font-weight: 600;
}

.lightbox__close {
  position: absolute;
  top: -48px;
  right: 0;
  background: transparent;
  border: none;
  color: var(--color-surface);
  font-size: 36px;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.lightbox__close:hover {
  color: var(--color-tertiary);
  transform: scale(1.1);
}
