/* ============================================================
   ArtLux – gallery.css  ·  Gallery Page
   ============================================================ */
/* ─── GALLERY PAGE HERO BACKGROUND ────────────────────────── */
.page-hero__bg {
  background:
    radial-gradient(circle at 20% 72%, rgba(226, 201, 130, 0.24), transparent 34%),
    radial-gradient(circle at 82% 28%, rgba(43, 71, 122, 0.2), transparent 36%),
    linear-gradient(135deg, #101421 0%, #0d0b09 54%, #070605 100%);
}

.page-hero__bg::after {
  background:
    linear-gradient(to bottom, rgba(7, 6, 5, 0.08), rgba(7, 6, 5, 0.72)),
    linear-gradient(90deg, rgba(7, 6, 5, 0.78), rgba(7, 6, 5, 0.22), rgba(7, 6, 5, 0.74));
}

/* ─── GALLERY CONTROLS BAR ────────────────────────────────── */
.gallery-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-block: 2.2rem;
  border-bottom: 1px solid rgba(0,0,0,.07);
}

.gallery-filters {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  padding: .42rem 1.15rem;
  border-radius: 100px;
  border: 1.5px solid rgba(0,0,0,.12);
  background: transparent;
  font-family: 'Inter', sans-serif;
  font-size: .76rem;
  font-weight: 500;
  letter-spacing: .06em;
  color: #5a5855;
  cursor: pointer;
  transition: all .24s cubic-bezier(.22,.61,.36,1);
}

.filter-pill:hover {
  border-color: var(--gold-500);
  color: var(--gold-600);
}

.filter-pill.active {
  background: var(--gold-500);
  border-color: var(--gold-500);
  color: #fff;
}

.gallery-count {
  font-size: .82rem;
  color: #8a8885;
  letter-spacing: .04em;
  white-space: nowrap;
}

.gallery-count span { color: #1a1918; font-weight: 600; }

/* ─── MASONRY GRID ────────────────────────────────────────── */
.gallery-section {
  padding-block: 2.5rem 5rem;
}

.gallery-masonry {
  columns: 3;
  column-gap: 1.1rem;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 1.1rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  background: #111;
  border-radius: 6px;
  display: block;
}

.gallery-item__inner {
  position: relative;
  overflow: hidden;
  line-height: 0;
}

.gallery-item__inner img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform .55s cubic-bezier(.22,.61,.36,1);
}

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

/* Hover overlay slides up */
.gallery-item__overlay {
  position: absolute;
  inset: auto 0 0;
  padding: 3.5rem 1.25rem 1.25rem;
  background: linear-gradient(to top, rgba(0,0,0,.82) 0%, transparent 100%);
  transform: translateY(100%);
  transition: transform .4s cubic-bezier(.22,.61,.36,1);
  line-height: 1.4;
}

.gallery-item:hover .gallery-item__overlay {
  transform: translateY(0);
}

/* Always show overlay on touch devices (no hover) */
@media (hover: none) {
  .gallery-item__overlay {
    transform: translateY(0);
  }
}

.gallery-item__name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: .98rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: .2rem;
}

.gallery-item__med {
  font-size: .75rem;
  color: rgba(255,255,255,.58);
  font-style: italic;
}

/* Commissioned badge */
.gallery-item[data-avail="out"]::before {
  content: 'Commissioned';
  position: absolute;
  top: .8rem;
  right: .8rem;
  z-index: 10;
  background: rgba(201,163,58,.92);
  color: #fff;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .28rem .7rem;
  border-radius: 100px;
  line-height: 1;
}

/* ─── LIGHTBOX ────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s cubic-bezier(.22,.61,.36,1);
}

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

.lightbox__bd {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

.lightbox__box {
  position: relative;
  z-index: 1;
  max-width: min(88vw, 860px);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.lightbox__close {
  position: absolute;
  top: -3.2rem;
  right: 0;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .22s;
}
.lightbox__close:hover { background: rgba(255,255,255,.22); }
.lightbox__close svg {
  width: 18px; height: 18px;
  stroke: #fff; fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.lightbox__prev,
.lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .22s;
  z-index: 2;
}
.lightbox__prev { left: -3.8rem; }
.lightbox__next { right: -3.8rem; }
.lightbox__prev:hover,
.lightbox__next:hover { background: rgba(255,255,255,.22); }
.lightbox__prev svg,
.lightbox__next svg { width: 20px; height: 20px; stroke: #fff; fill: none; }

@media (max-width: 860px) {
  .lightbox__prev,
  .lightbox__next {
    position: fixed;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
  }
  .lightbox__prev { left: .5rem; }
  .lightbox__next { right: .5rem; }
}

.lightbox__img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  display: block;
  border-radius: 6px;
  box-shadow: 0 32px 80px rgba(0,0,0,.6);
}

.lightbox__info { text-align: center; }

.lightbox__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.lightbox__meta {
  font-size: .8rem;
  color: rgba(255,255,255,.45);
  margin-top: .3rem;
  font-style: italic;
}

/* ─── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 960px) {
  .gallery-masonry { columns: 2; }
}

@media (max-width: 560px) {
  .gallery-masonry {
    columns: 2;   /* keep 2 columns on phones so images aren't huge */
    column-gap: 0.6rem;
  }

  .gallery-item {
    margin-bottom: 0.6rem;
  }

  .gallery-controls {
    flex-direction: column;
    align-items: flex-start;
    padding-block: 1.6rem;
  }

  .gallery-section {
    padding-block: 1.5rem 3.5rem;
  }
}

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