/* ══════════════════════════════════════════════
   Ren Head Spa — Gallery Page Styles
   assets/css/gallery.css
   ══════════════════════════════════════════════ */

/* ── GALLERY BODY ── */
.gallery-page { background: var(--cream); padding: 64px 60px 100px; }
.gallery-inner { max-width: 1160px; margin: 0 auto; }

/* Filter tabs */
.filter-bar { display: flex; align-items: center; justify-content: center; gap: 0; margin-bottom: 56px; }
.filter-btn {
  padding: 11px 44px;
  font-family: var(--font-sans); font-size: 13px;
  font-weight: 500; letter-spacing: 0.08em;
  background: transparent; border: 1px solid rgba(175,117,95,0.25);
  color: #888; cursor: pointer; transition: all 0.25s; position: relative;
}
.filter-btn + .filter-btn { border-left: none; }
.filter-btn:hover { color: var(--terracotta); }
.filter-btn.active { background: var(--dark); border-color: var(--dark); color: var(--cream); }

/* Grid */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gallery-item {
  position: relative; overflow: hidden;
  cursor: pointer; background: #c4b0a0;
  aspect-ratio: 4/5;
}
.gallery-item.tall { grid-row: span 2; aspect-ratio: auto; }
.gallery-item.wide { grid-column: span 2; aspect-ratio: 4/3; }
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.05); }
.gi-overlay {
  position: absolute; inset: 0;
  background: rgba(34,34,34,0); transition: background 0.35s;
  display: flex; align-items: center; justify-content: center;
}
.gallery-item:hover .gi-overlay { background: rgba(34,34,34,0.22); }
.gi-overlay svg { width: 28px; height: 28px; fill: white; opacity: 0; transition: opacity 0.3s; }
.gallery-item:hover .gi-overlay svg { opacity: 1; }
.gallery-item.hidden { display: none; }
.gallery-item.load-hidden { display: none; }

/* Load more */
.gallery-load-more {
  text-align: center;
  margin-top: 48px;
}
.btn-load-more {
  display: inline-block; padding: 14px 52px;
  border: 1.5px solid var(--terracotta); color: var(--terracotta);
  background: transparent; font-family: var(--font-sans); font-size: 12px;
  font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
  cursor: pointer; transition: all 0.3s;
}
.btn-load-more:hover { background: var(--terracotta); color: var(--cream); }
.btn-load-more.hidden { display: none; }

/* Placeholder fills */
.gp1  { background: linear-gradient(145deg, #3a2820, #6a3e30); aspect-ratio: 4/5; }
.gp2  { background: linear-gradient(145deg, #2e3828, #4e6040); aspect-ratio: 4/5; }
.gp3  { background: linear-gradient(145deg, #3c2818, #7a4830); aspect-ratio: 4/5; }
.gp4  { background: linear-gradient(145deg, #282838, #484870); aspect-ratio: 4/3; }
.gp5  { background: linear-gradient(145deg, #2a3828, #4a6048); aspect-ratio: 4/5; }
.gp6  { background: linear-gradient(145deg, #3e2010, #7a5030); aspect-ratio: 4/3; }
.gp7  { background: linear-gradient(145deg, #1e3020, #3a5038); aspect-ratio: 4/5; }
.gp8  { background: linear-gradient(145deg, #402010, #804030); aspect-ratio: 4/5; }
.gp9  { background: linear-gradient(145deg, #2c2c38, #504868); aspect-ratio: 4/5; }
.gp10 { background: linear-gradient(145deg, #302818, #607040); aspect-ratio: 4/3; }
.gp11 { background: linear-gradient(145deg, #3a3020, #706050); aspect-ratio: 4/5; }
.gp12 { background: linear-gradient(145deg, #1c3228, #345040); aspect-ratio: 4/5; }
.gi-fill-img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.gi-fill-img svg { width: 36px; height: 36px; fill: rgba(255,243,234,0.18); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.92);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lightbox-img { max-width: 90vw; max-height: 88vh; object-fit: contain; }
.lightbox-close {
  position: absolute; top: 24px; right: 28px;
  background: none; border: none; color: rgba(255,243,234,0.7);
  font-size: 24px; cursor: pointer; transition: color 0.2s;
}
.lightbox-close:hover { color: var(--cream); }
.lightbox-prev, .lightbox-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: rgba(255,243,234,0.6);
  font-size: 48px; cursor: pointer; padding: 0 16px; transition: color 0.2s;
}
.lightbox-prev { left: 8px; }
.lightbox-next { right: 8px; }
.lightbox-prev:hover, .lightbox-next:hover { color: var(--cream); }
.lightbox-counter {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  color: rgba(255,243,234,0.5); font-size: 13px; letter-spacing: 0.1em;
}

/* ── GALLERY RESPONSIVE ── */
@media (max-width: 1024px) {
  .gallery-page { padding: 52px 40px 80px; }
}
@media (max-width: 900px) {
  .gallery-page { padding: 44px 24px 64px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .gallery-item.wide { grid-column: span 1; }
  .filter-btn { padding: 10px 28px; font-size: 12px; }
}
@media (max-width: 480px) {
  .gallery-page { padding: 32px 16px 52px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .filter-bar { flex-wrap: wrap; justify-content: center; gap: 6px; }
  .filter-btn { border: 1px solid rgba(175,117,95,0.25) !important; }
  .filter-btn + .filter-btn { border-left: 1px solid rgba(175,117,95,0.25) !important; }
}
