/* ============================================
   WOMANITY — Gallery Page
   Updated: 2026-06-04 20:45
   ============================================ */

/* ===== FILTER BAR ===== */
.gallery-filters {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248,245,242,0.85);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  padding: 0 var(--container-padding);
}
.gallery-filters__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.gallery-filters__inner::-webkit-scrollbar { display: none; }

.filter-btn {
  flex-shrink: 0;
  padding: 10px 22px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.3s var(--ease-out), color 0.3s var(--ease-out), background 0.3s var(--ease-out);
  border: 1px solid rgba(0,0,0,0.1);
  background: transparent;
  color: #888;
}
.filter-btn:hover {
  border-color: var(--blush);
  color: var(--blush);
}
.filter-btn.active {
  background: var(--charcoal);
  border-color: var(--charcoal);
  color: var(--white);
}

/* ===== GALLERY GRID ===== */
.gallery-page {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 60px var(--container-padding) 100px;
}

.gallery-grid {
  columns: 3;
  column-gap: 16px;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 16px;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  display: block;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s var(--ease-out);
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10,10,10,0);
  transition: background 0.4s var(--ease-out);
  border-radius: 16px;
}

.gallery-item:hover img { transform: scale(1.04); }
.gallery-item:hover::after { background: rgba(10,10,10,0.15); }

/* Category badge */
.gallery-item__badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 2;
  background: rgba(10,10,10,0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 100px;
  padding: 5px 12px;
  font-size: 11px;
  color: rgba(255,255,255,0.8);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.gallery-item:hover .gallery-item__badge {
  opacity: 1;
  transform: translateY(0);
}

/* Hidden items (filtered out) */
.gallery-item[hidden] { display: none; }

/* ===== LOAD MORE ===== */
.gallery-loadmore {
  text-align: center;
  padding: 40px 0 20px;
}
.gallery-loadmore[hidden] { display: none; }

/* ===== EMPTY STATE ===== */
.gallery-empty {
  text-align: center;
  padding: 80px 24px;
  color: #aaa;
  display: none;
}
.gallery-empty.visible { display: block; }

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease-out), visibility 0.4s;
}
.lightbox.active {
  opacity: 1;
  visibility: visible;
}
.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.lightbox__content {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 40px 120px rgba(0,0,0,0.6);
}
.lightbox__close {
  position: fixed;
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, transform 0.3s;
  z-index: 2;
}
.lightbox__close:hover {
  background: rgba(255,255,255,0.2);
  transform: scale(1.1);
}
.lightbox__prev,
.lightbox__next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
  z-index: 2;
}
.lightbox__prev { left: 24px; }
.lightbox__next { right: 24px; }
.lightbox__prev:hover,
.lightbox__next:hover {
  background: rgba(255,255,255,0.2);
}
.lightbox__counter {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  z-index: 2;
  letter-spacing: 0.06em;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .gallery-grid { columns: 2; }
}
@media (max-width: 768px) {
  .gallery-filters { padding: 0 var(--container-padding-mobile); }
  .gallery-page { padding: 40px var(--container-padding-mobile) 80px; }
  .gallery-grid { columns: 2; column-gap: 10px; }
  .gallery-item { margin-bottom: 10px; border-radius: 12px; }
  .lightbox__prev { left: 12px; }
  .lightbox__next { right: 12px; }
}
@media (max-width: 480px) {
  .gallery-grid { columns: 1; }
}
