﻿/* Gallery page wrapper is wider */
.page-wrapper {
  max-width: 1360px;
}

/* Utility: ensure tall portraits can expand while capping extreme heights */

/* Page header card */
.gallery-header-card {
  padding: clamp(1.8rem, 3vw, 2.8rem) clamp(1.4rem, 4vw, 3rem);
  text-align: center;
}

.gallery-page-title {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--white-star);
  letter-spacing: 0.03em;
  text-shadow: 0 0 38px rgba(215, 181, 109, 0.18);
  margin-bottom: 0.4rem;
}

.gallery-page-sub {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  color: var(--star-teal);
  text-transform: uppercase;
  margin-bottom: 2rem;
}

/* Filter pills */
.filter-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.7rem;
}

/* Gallery section: wraps controls + grid for tight spacing */
.gallery-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: calc(-1 * clamp(0.5rem, 1vw, 0.75rem));
}

.gallery-section footer {
  margin-top: clamp(1rem, 3vw, 2.25rem);
}

/* Gallery controls bar: layout toggle right-aligned */
.gallery-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 0.25rem;
}

/* Layout toggle (desktop only) */
.layout-toggle {
  display: flex;
  gap: 0.3rem;
}

@media (max-width: 768px) {
  .gallery-controls .layout-toggle { display: none; }
}

.layout-btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid rgba(215, 181, 109, 0.2);
  background: rgba(9, 11, 21, 0.58);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.layout-btn:hover,
.layout-btn.active {
  background: rgba(215, 181, 109, 0.09);
  border-color: rgba(215, 181, 109, 0.6);
  color: var(--white-star);
}

.filter-btn {
  padding: 0.45rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(215, 181, 109, 0.2);
  background: rgba(9, 11, 21, 0.58);
  color: var(--text-muted);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
  background: rgba(215, 181, 109, 0.09);
  border-color: rgba(215, 181, 109, 0.6);
  color: var(--white-star);
  box-shadow: 0 0 16px rgba(215, 181, 109, 0.12);
}

/* Justified grid gallery (row height uniform) */
:root {
  --gap: 10px;
  --radius: 12px;
  --cols: 4;
}

.justified-gallery {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: var(--gap);
  align-items: start;
  /* newest items appear first if prepended in DOM */
}

/* Masonry layout mode */
.justified-gallery.masonry {
  display: block;
  columns: var(--cols);
  column-gap: var(--gap);
}

.justified-gallery.masonry .row-photo {
  aspect-ratio: unset;
  height: auto;
  break-inside: avoid;
  margin-bottom: var(--gap);
}

.justified-gallery.masonry .row-photo img {
  height: auto;
  object-fit: initial;
}

/* Scroll-to-top button */
.scroll-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(215, 181, 109, 0.3);
  background: rgba(9, 11, 21, 0.75);
  backdrop-filter: blur(8px);
  color: var(--star-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 500;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background 0.2s, border-color 0.2s;
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  background: rgba(215, 181, 109, 0.1);
  border-color: rgba(215, 181, 109, 0.6);
}

.scroll-top-btn .iconify {
  font-size: 1.4rem;
}

/* Back button: fixed position at top-left */
.back-btn-fixed {
  position: fixed;
  left: clamp(1rem, 3vw, 1.8rem);
  top: clamp(1rem, 3vh, 1.6rem);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(215, 181, 109, 0.16);
  border-radius: 50%;
  background: rgba(13, 17, 28, 0.25);
  color: var(--white-star);
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  backdrop-filter: blur(8px);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.08),
    0 0 12px rgba(215, 181, 109, 0.06);
}

.back-btn-fixed:hover {
  background: rgba(13, 17, 28, 0.4);
  border-color: rgba(215, 181, 109, 0.35);
  color: var(--white-star);
  box-shadow:
    0 4px 12px rgba(125, 215, 208, 0.08),
    0 0 16px rgba(215, 181, 109, 0.15);
}

.back-btn-fixed .iconify {
  font-size: 1.25rem;
  display: block;
  line-height: 1;
}

.back-btn-fixed .back-text {
  display: none;
}

.back-btn-fixed::after {
  content: "Back";
  position: absolute;
  left: calc(100% + 0.6rem);
  top: 50%;
  transform: translateY(-50%);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white-star);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.back-btn-fixed:hover::after {
  opacity: 1;
}

@media (max-width: 768px) {
  .back-btn-fixed {
    left: clamp(0.8rem, 2vw, 1.2rem);
    top: clamp(0.8rem, 2vh, 1.2rem);
  }
}

@media (max-width: 480px) {
  .back-btn-fixed {
    left: 0.7rem;
    top: 0.7rem;
  }

  .back-btn-fixed::after {
    display: none;
  }
}

@media (max-width: 1100px) {
  :root {
    --cols: 4;
  }
}
@media (max-width: 900px) {
  :root {
    --cols: 3;
  }
}
@media (max-width: 750px) {
  :root {
    --cols: 2;
  }
}
@media (max-width: 480px) {
  :root {
    --cols: 1;
  }
}

.row-photo {
  /* use same aspect ratio as index thumbnails (3:4) */
  aspect-ratio: 3 / 4;
  width: 100%;
  transition: opacity 0.18s ease;
  height: auto;
  border-radius: var(--radius);
  overflow: hidden;
  /* match index preview background gradient for visual consistency */
  background: linear-gradient(
    180deg,
    rgba(24, 28, 48, 0.72),
    rgba(6, 8, 16, 0.9)
  );
  border: 1px solid rgba(215, 181, 109, 0.12);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  display: block;
  position: relative;
}

.row-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* protect against squish by cropping */
  object-position: center;
  display: block;
}

.row-photo .caption {
  position: absolute;
  left: 8px;
  bottom: 8px;
  color: #fff;
  font-size: 0.82rem;
  background: rgba(0, 0, 0, 0.32);
  padding: 6px 8px;
  border-radius: 6px;
}

.gallery-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(215, 181, 109, 0.42),
    transparent
  );
  z-index: 1;
}

.gallery-item:hover {
  border-color: rgba(215, 181, 109, 0.52);
  transform: translateY(-4px);
  box-shadow:
    0 24px 56px rgba(0, 0, 0, 0.34),
    0 0 20px rgba(215, 181, 109, 0.1);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  display: block;
  transition: transform 0.5s, opacity 0.4s ease;
  object-fit: cover;
  object-position: center;
  background: rgba(5, 6, 13, 0.4);
  opacity: 0;
}

.gallery-item img.img-loaded {
  opacity: 1;
}

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

/* Hover overlay */
.item-overlay {
  position: absolute;
  inset: 0;
  /* match index's thumb-overlay gradient for consistent dark fade */
  background: linear-gradient(
    to top,
    rgba(5, 6, 13, 0.94) 0%,
    rgba(5, 6, 13, 0.24) 55%,
    transparent 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0.85rem;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.gallery-item:hover .item-overlay {
  opacity: 1;
}

.item-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  color: var(--white-star);
  margin-bottom: 0.4rem;
}

.item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.item-tag {
  font-size: 0.6rem;
  color: var(--star-teal);
  background: rgba(125, 215, 208, 0.1);
  border: 1px solid rgba(125, 215, 208, 0.28);
  padding: 0.15rem 0.5rem;
  border-radius: 1rem;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.08em;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(5, 6, 13, 0.2);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 2rem 1.5rem;
  overflow: hidden;
  /* Prevent content from causing scrollbars on mobile */
  max-width: 100vw;
  box-sizing: border-box;
}

.lightbox.open {
  display: flex;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  font-family: "Space Grotesk", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  transition:
    color 0.3s,
    transform 0.3s;
}

.lightbox-close:hover {
  color: var(--star-gold);
  transform: scale(1.05);
}

.lightbox-content {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  align-content: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  max-width: 96vw;
  max-height: 90vh;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.lightbox-spacer {
  min-height: 1px;
}

.lightbox-content.image-only {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: auto;
  height: auto;
  max-width: min(96vw, 1400px);
  padding: 2rem 2.5rem;
  gap: 1.2rem;
}

.lightbox-content.image-only .lightbox-spacer {
  display: none;
}

.lightbox-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  min-width: 260px;
  max-width: 380px;
  width: 100%;
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.5);
  padding: 1rem;
  border-radius: 12px;
  backdrop-filter: blur(6px);
}

.lightbox-info-header {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.lightbox-media {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  pointer-events: auto;
  position: relative;
}

/* ── Lightbox image loading spinner ── */
.lb-spinner {
  display: none;
  width: 28px;
  height: 28px;
  border: 2px solid rgba(215, 181, 109, 0.2);
  border-top-color: var(--star-gold);
  border-radius: 50%;
  animation: lb-spin 0.7s linear infinite;
  position: absolute;
  pointer-events: none;
}

.lb-spinner.active {
  display: block;
}

@keyframes lb-spin {
  to { transform: rotate(360deg); }
}

/* ── Gpose landscape overlay ── */
.lb-landscape-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 3rem 1.25rem 1.1rem;
  background: linear-gradient(to top, rgba(5, 6, 13, 0.92) 0%, rgba(5, 6, 13, 0.4) 60%, transparent 100%);
  border-radius: 0 0 1rem 1rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox-media:hover .lb-landscape-overlay {
  opacity: 1;
}

.lb-overlay-caption {
  font-family: "Cormorant Garamond", serif;
  font-size: 1rem;
  letter-spacing: 0.18em;
  color: var(--white-star);
}

.lb-overlay-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.lightbox img {
  max-width: min(88vw, 1100px);
  max-height: 90vh;
  object-fit: contain;
  border-radius: 1rem;
  border: 1px solid var(--card-border);
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.34);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.lightbox img.is-landscape {
  max-width: min(96vw, 1400px);
  max-height: 92vh;
}

/* Gpose uses image-only layout — let all images fill the screen generously */
.lightbox-content.image-only .lightbox-media img {
  max-width: 94vw;
  max-height: 94vh;
}

.lightbox-content.image-only .lightbox-media {
  width: auto;
  max-width: none;
}

.lightbox-content.image-only .lightbox-info {
  max-width: min(92vw, 900px);
  align-items: center;
  text-align: center;
}

/* For gpose (no gear) make the lightbox caption/tags float without a dark card */
.lightbox[data-type="gpose"] .lightbox-info {
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
}

.lightbox[data-type="gpose"] .lightbox-caption {
  background: rgba(0, 0, 0, 0) !important;
  padding: 0.2rem 0 !important;
}

.lightbox-content.image-only .lightbox-info-header {
  align-items: center;
}

.lightbox-content.image-only .lightbox-info,
.lightbox-content.image-only .lightbox-media {
  flex: 0 0 auto;
}

.lightbox-content.image-only .lightbox-gear {
  max-width: min(92vw, 900px);
}

.lightbox-content.image-only .lightbox-gear-row {
  width: 100%;
}

/* ── Glamour lightbox layout ── */
/* 80px margin each side — keeps gear panel clear of the 44px nav buttons */
.lightbox[data-type="glamour"] .lightbox-content:not(.image-only) {
  max-width: calc(100vw - 160px);
}

/* Portrait: match gpose height */
.lightbox[data-type="glamour"] img:not(.is-landscape) {
  max-height: 94vh;
}

/* Landscape: image width sized so both 1fr columns (spacer + gear) are exactly 260px each,
   keeping the image centered. Formula: content(100vw-160px) - 260px - 260px - 64px(gaps) */
.lightbox[data-type="glamour"] img.is-landscape {
  max-width: calc(100vw - 744px);
}

.lightbox img.is-loaded {
  opacity: 1;
}

.lightbox-caption {
  font-family: "Cormorant Garamond", serif;
  font-size: 1rem;
  letter-spacing: 0.18em;
  color: var(--white-star);
  text-transform: none;
}

.lightbox-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.lightbox-tag {
  font-size: 0.62rem;
  color: var(--star-teal);
  background: rgba(125, 215, 208, 0.1);
  border: 1px solid rgba(125, 215, 208, 0.3);
  padding: 0.15rem 0.6rem;
  border-radius: 1rem;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.08em;
}

.lightbox-gear {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: grid;
  gap: 0.4rem;
  min-width: 0;
  max-width: none;
  width: 100%;
  pointer-events: auto;
}

.lightbox-gear-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid rgba(215, 181, 109, 0.12);
  padding-top: 0.4rem;
}

.lightbox-gear-row span:last-child {
  color: var(--white-star);
  text-transform: none;
  letter-spacing: 0.02em;
}

.gear-detail {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
}

.gear-dyes {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.dye-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  white-space: nowrap;
  color: var(--white-star);
  background: rgba(13, 17, 28, 0.72);
  border: 1px solid rgba(215, 181, 109, 0.24);
}

.dye-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
  flex: 0 0 auto;
}

@media (max-width: 768px) {
  .lightbox {
    padding: 1.2rem 0.5rem;
    overflow: hidden;
    max-width: 100vw;
    box-sizing: border-box;
  }

  .lightbox-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 1rem;
    max-height: none;
    height: 100%;
    overflow-y: auto;
    width: 100%;
    padding-right: 4px;
    pointer-events: auto;
  }

  .lightbox-content::-webkit-scrollbar {
    width: 6px;
  }

  .lightbox-content::-webkit-scrollbar-track {
    background: rgba(215, 181, 109, 0.05);
    border-radius: 3px;
  }

  .lightbox-content::-webkit-scrollbar-thumb {
    background: rgba(215, 181, 109, 0.25);
    border-radius: 3px;
  }

  .lightbox-content::-webkit-scrollbar-thumb:hover {
    background: rgba(215, 181, 109, 0.4);
  }

  .lightbox-spacer {
    display: none;
  }

  .lightbox-info {
    max-width: min(92vw, 420px);
    align-items: center;
    text-align: center;
    flex-shrink: 0;
  }

  .lightbox-info-header {
    align-items: center;
  }

  .lightbox-media {
    max-width: 100%;
    align-items: center;
    flex-shrink: 0;
  }

  .lightbox img {
    max-width: 88vw;
    max-height: 60vh;
  }

  .lightbox img.is-landscape,
  .lightbox-content.image-only .lightbox-media img.is-landscape {
    max-width: 96vw !important;
    max-height: 56vw !important;
  }

  .lightbox-content.image-only .lightbox-media img:not(.is-landscape) {
    max-width: 90vw;
    max-height: 85vh;
  }

  .lightbox-content.image-only {
    padding: 0;
    gap: 0;
  }

  /* Override desktop glamour container width (160px nav margin not needed on mobile) */
  .lightbox[data-type="glamour"] .lightbox-content:not(.image-only) {
    max-width: 100%;
  }

  /* Override desktop 94vh glamour portrait rule (which has higher specificity than .lightbox img) */
  .lightbox[data-type="glamour"] img:not(.is-landscape) {
    max-height: 50vh;
  }

  /* Override desktop glamour landscape rule which computes negative on small screens */
  .lightbox[data-type="glamour"] img.is-landscape {
    max-width: 96vw;
    max-height: 56vw;
  }

  .lightbox-gear {
    max-width: 100%;
    flex-shrink: 0;
  }

  .gallery-header-card {
    padding: 1.6rem 1.25rem;
  }

  .gallery-page-title {
    font-size: 2rem;
  }

  .gallery-page-sub {
    letter-spacing: 0.18em;
    margin-bottom: 1.4rem;
  }
}

@media (max-width: 480px) {
  .lightbox-content {
    padding-right: 2px;
  }

  .lightbox img {
    max-width: 90vw;
    max-height: 55vh;
  }

  .lightbox-info {
    max-width: min(90vw, 380px);
  }
}


/* ── Lightbox prev/next navigation buttons ── */
.lb-nav-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
  background: rgba(9, 11, 21, 0.55);
  color: var(--white-star);
  border: 1px solid rgba(215, 181, 109, 0.2);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, opacity 0.2s;
  opacity: 0.65;
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.lightbox.open .lb-nav-btn {
  display: flex;
}

.lb-nav-btn:hover {
  background: rgba(215, 181, 109, 0.12);
  border-color: rgba(215, 181, 109, 0.5);
  opacity: 1;
}

.lb-prev {
  left: clamp(0.75rem, 2vw, 1.5rem);
}

.lb-next {
  right: clamp(0.75rem, 2vw, 1.5rem);
}

/* Hide nav buttons on touch devices — swipe is used instead */
@media (hover: none) and (pointer: coarse) {
  .lb-nav-btn {
    display: none !important;
  }
}

/* ── Image shimmer placeholder & fade-in ── */
.gallery-item.img-loading {
  background: linear-gradient(
    90deg,
    rgba(255, 248, 234, 0.04) 25%,
    rgba(255, 248, 234, 0.09) 50%,
    rgba(255, 248, 234, 0.04) 75%
  );
  background-size: 1200px 100%;
  animation: skel-shimmer 1.6s infinite linear;
}

/* ── Lightbox keyboard hint ── */
.lb-keyboard-hint {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.75rem;
  border-radius: 100px;
  background: rgba(9, 11, 21, 0.65);
  border: 1px solid rgba(215, 181, 109, 0.45);
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.lb-keyboard-hint.visible {
  opacity: 1;
}

/* ── Lightbox actions bar (copy + close) ── */
.lightbox-actions {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 10;
}

.lightbox-copy-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  height: 32px;
  padding: 0 0.85rem;
  background: rgba(9, 11, 21, 0.55);
  border: 1px solid rgba(215, 181, 109, 0.2);
  border-radius: 999px;
  color: var(--text-muted);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: all 0.2s;
}

.lightbox-copy-btn:hover {
  background: rgba(215, 181, 109, 0.1);
  border-color: rgba(215, 181, 109, 0.45);
  color: var(--white-star);
}

.lightbox-copy-btn.lb-copy-success {
  border-color: rgba(125, 215, 208, 0.5);
  color: var(--star-teal);
}

/* Override close button positioning since it's now inside .lightbox-actions */
.lightbox-actions .lightbox-close {
  position: static;
  transform: none;
  margin: 0;
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(9, 11, 21, 0.55);
  border: 1px solid rgba(215, 181, 109, 0.2);
  border-radius: 50%;
  backdrop-filter: blur(6px);
  color: var(--text-muted);
  transition: all 0.2s;
}

.lightbox-actions .lightbox-close:hover {
  background: rgba(215, 181, 109, 0.1);
  border-color: rgba(215, 181, 109, 0.45);
  color: var(--white-star);
  transform: none;
}

/* ── Filter count badges ── */
.filter-count {
  font-size: 0.62rem;
  opacity: 0.65;
  letter-spacing: 0.06em;
}

/* ── Empty state ── */
.gallery-empty-state {
  grid-column: 1 / -1;
  column-span: all;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 5rem 2rem;
  color: var(--text-muted);
}

.gallery-empty-symbol {
  font-size: 2.5rem;
  opacity: 0.3;
}

.gallery-empty-text {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.5;
}

@media (max-width: 768px) {
  .lightbox-actions {
    top: 1rem;
    right: 1rem;
    gap: 0.4rem;
  }

  .lb-copy-label {
    display: none;
  }

  .lightbox-copy-btn {
    padding: 0;
  }
}

/* Prevent horizontal scroll on mobile when lightbox is open */
body:has(.lightbox.open) {
  overflow: hidden;
  max-width: 100vw;
}

body:has(.lightbox.open) .back-btn-fixed,
body:has(.lightbox.open) .scroll-top-btn {
  display: none;
}

/* ── Mobile touch targets ── */
@media (max-width: 768px) {
  .filter-btn {
    min-height: 44px;
    padding: 0.65rem 1.3rem;
  }

  .lightbox-actions .lightbox-close {
    width: 40px;
    height: 40px;
  }

  .lightbox-copy-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    justify-content: center;
  }
}

/* ── Touch devices: always show item overlay, disable hover lifts ── */
@media (hover: none) and (pointer: coarse) {
  .item-overlay {
    opacity: 1;
    background: linear-gradient(
      to top,
      rgba(5, 6, 13, 0.85) 0%,
      rgba(5, 6, 13, 0.08) 52%,
      transparent 100%
    );
  }

  .gallery-item:hover {
    transform: none;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
    border-color: rgba(215, 181, 109, 0.12);
  }

  .gallery-item:hover img {
    transform: none;
  }
}

