/*
Theme Name: Spark Gallery
Theme URI: https://sparkofthecreator.com
Author: Manish Taneja
Description: Custom gallery theme matching sparkofthecreator.com design language.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: spark-gallery
*/

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:            #0d0b1a;
  --bg-mid:        #13112b;
  --bg-surface:    #1a1838;
  --bg-card:       #1e1c3a;
  --text-bright:   #f0eeff;
  --text-mid:      #c8c2e8;
  --text-soft:     #9a93c8;
  --text-muted:    #6a6398;
  --indigo-deep:   #1e1852;
  --indigo-mid:    #2d2660;
  --indigo-glow:   #4a42a0;
  --indigo-light:  #7a72c8;
  --sky-pale:      #d4dcf5;
  --sky-mist:      #b0bcec;
  --sky-bright:    #e8ecff;
  --gold:          #c9a84c;
  --gold-light:    #e2c87a;
  --gold-pale:     #f0dfa0;
  --divider:       rgba(160,152,220,0.14);
  --white:         #f5f4ff;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text-bright);
  overflow-x: hidden;
  min-height: 100vh;
}

/* ── NAV ── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.2rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, rgba(13,11,26,0.95) 0%, rgba(13,11,26,0.0) 100%);
  backdrop-filter: blur(2px);
}

.site-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 0.04em;
}

.site-logo em {
  font-style: italic;
  color: var(--gold-light);
}

.site-nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.site-nav a {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mid);
  text-decoration: none;
  transition: color 0.3s;
}

.site-nav a:hover { color: var(--gold-light); }

/* ── HERO ── */
.gallery-hero {
  min-height: 55vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5.5rem 2rem 4rem;
  position: relative;
  background: linear-gradient(175deg, #0a0918 0%, #0d0b1a 40%, #100e26 100%);
  overflow: hidden;
}

.gallery-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(180,190,255,0.3) 0%, rgba(120,130,220,0.12) 30%, transparent 55%),
    radial-gradient(ellipse at 50% 110%, rgba(201,168,76,0.18) 0%, rgba(160,100,40,0.06) 40%, transparent 65%);
  pointer-events: none;
}

.hero-mountain {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  opacity: 0.4;
  pointer-events: none;
}

.gallery-hero-inner {
  position: relative;
  z-index: 2;
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--sky-mist);
  margin-bottom: 1.2rem;
}

.gallery-hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 300;
  line-height: 1.05;
  color: var(--white);
  margin-bottom: 0.3rem;
}

.gallery-hero h1 em {
  font-style: italic;
  color: var(--gold-light);
}

.gold-divider {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 1.5rem auto;
}

.hero-tagline {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 300;
  font-style: italic;
  color: var(--text-mid);
  line-height: 1.6;
}

/* ── GALLERY FILTER TABS ── */
.gallery-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 2.5rem 2rem 1rem;
}

.gallery-tab {
  padding: 0.5rem 1.4rem;
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 2px;
  background: transparent;
  color: var(--text-mid);
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
}

.gallery-tab:hover,
.gallery-tab.active {
  border-color: var(--gold);
  color: var(--gold-light);
  background: rgba(201,168,76,0.06);
}

/* ── GALLERY GRID ── */
.gallery-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 2rem 5rem;
}

.gallery-section-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--indigo-light);
  margin-bottom: 0.8rem;
}

.gallery-section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 300;
  color: var(--white);
  margin-bottom: 2.5rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

/* Album card */
.album-card {
  position: relative;
  border: 1px solid rgba(201,168,76,0.18);
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-card);
  text-decoration: none;
  transition: border-color 0.4s, transform 0.4s, box-shadow 0.4s;
  display: block;
}

.album-card:hover {
  border-color: rgba(201,168,76,0.65);
  transform: translateY(-4px);
  box-shadow: 0 8px 40px rgba(74,66,160,0.25), 0 0 0 1px rgba(201,168,76,0.12);
}

.album-card-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.album-card:hover .album-card-thumb {
  transform: scale(1.04);
}

.album-card-body {
  padding: 1.4rem 1.6rem;
}

.album-card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 0.4rem;
}

.album-card-meta {
  font-size: 0.78rem;
  font-weight: 300;
  color: var(--text-soft);
  letter-spacing: 0.06em;
}

.album-card-lock {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  background: rgba(13,11,26,0.8);
  border: 1px solid rgba(201,168,76,0.4);
  border-radius: 2px;
  padding: 0.25rem 0.6rem;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ── EMAIL GATE ── */
.gate-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: linear-gradient(175deg, #0a0918 0%, #0d0b1a 100%);
}

.gate-box {
  max-width: 480px;
  width: 100%;
  border: 1px solid rgba(201,168,76,0.22);
  border-radius: 4px;
  padding: 3rem 2.5rem;
  background: linear-gradient(145deg, rgba(210,215,255,0.04) 0%, rgba(30,28,58,0.8) 100%);
  text-align: center;
}

.gate-box h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 300;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.gate-box p {
  font-size: 0.88rem;
  color: var(--text-mid);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.gate-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.gate-divider::before,
.gate-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--divider);
}

/* Form overrides */
.gate-box input[type="text"],
.gate-box input[type="email"],
.gate-box input[type="password"] {
  width: 100%;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  background: rgba(13,11,26,0.6);
  border: 1px solid rgba(160,152,220,0.2);
  border-radius: 2px;
  color: var(--text-bright);
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  transition: border-color 0.3s;
  outline: none;
}

.gate-box input:focus {
  border-color: var(--gold);
}

.gate-box input::placeholder { color: var(--text-muted); }

.btn-gold {
  display: inline-block;
  width: 100%;
  padding: 0.9rem 2rem;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold-light);
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.3s, color 0.3s;
}

.btn-gold:hover {
  background: var(--gold);
  color: var(--bg);
}

/* ── SINGLE GALLERY VIEW ── */
.gallery-view {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 2rem 5rem;
}

.gallery-view-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.gallery-view-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 300;
  color: var(--white);
}

.gallery-view-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-top: 0.3rem;
}

/* Photo grid in single gallery */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.photo-item {
  position: relative;
  overflow: hidden;
  border-radius: 3px;
  cursor: pointer;
  background: var(--bg-card);
}

.photo-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.photo-item:hover img { transform: scale(1.05); }

.photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13,11,26,0.85) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}

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

.photo-download-btn {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-light);
  border: 1px solid rgba(201,168,76,0.5);
  padding: 0.4rem 0.9rem;
  border-radius: 2px;
  background: rgba(13,11,26,0.7);
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
}

.photo-download-btn:hover {
  background: var(--gold);
  color: var(--bg);
  border-color: var(--gold);
}

/* ── DOWNLOAD / DONATION MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,8,24,0.92);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  max-width: 480px;
  width: 100%;
  margin: auto;
  border: 1px solid rgba(201,168,76,0.28);
  border-radius: 4px;
  padding: 2.5rem 2rem;
  background: linear-gradient(145deg, rgba(30,28,58,0.98) 0%, rgba(13,11,26,0.98) 100%);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.modal-close:hover { color: var(--text-bright); }

.modal-thumb {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  border-radius: 2px;
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

.modal-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--white);
  margin-bottom: 0.4rem;
}

.modal-sub {
  font-size: 0.82rem;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 1.8rem;
}

/* ── DONATION SLIDER ── */
.donation-wrap {
  margin-bottom: 1.8rem;
}

.donation-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.donation-label span {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.donation-amount-display {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 300;
  color: var(--gold-light);
  min-width: 5ch;
  text-align: right;
}

.donation-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 2px;
  background: linear-gradient(to right, var(--gold) 0%, var(--gold) 5%, rgba(160,152,220,0.2) 5%);
  border-radius: 1px;
  outline: none;
  cursor: pointer;
  margin-bottom: 0.6rem;
}

.donation-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--gold);
  cursor: pointer;
  transition: transform 0.2s;
}

.donation-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }

.donation-presets {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.preset-btn {
  flex: 1;
  padding: 0.4rem;
  border: 1px solid rgba(160,152,220,0.2);
  border-radius: 2px;
  background: transparent;
  color: var(--text-soft);
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}

.preset-btn:hover,
.preset-btn.active {
  border-color: var(--gold);
  color: var(--gold-light);
  background: rgba(201,168,76,0.06);
}

.donation-custom {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.donation-custom input {
  width: 90px;
  padding: 0.4rem 0.6rem;
  background: rgba(13,11,26,0.6);
  border: 1px solid rgba(160,152,220,0.2);
  border-radius: 2px;
  color: var(--text-bright);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  outline: none;
  transition: border-color 0.3s;
}

.donation-custom input:focus { border-color: var(--gold); }

.free-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1.2rem;
  font-style: italic;
}

/* ── FULL-WIDTH DIVIDER ── */
.full-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--divider), transparent);
}

/* ── FOOTER ── */
.site-footer {
  text-align: center;
  padding: 2.5rem 2rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  border-top: 1px solid var(--divider);
}

.site-footer a {
  color: var(--indigo-light);
  text-decoration: none;
  transition: color 0.2s;
}

.site-footer a:hover { color: var(--gold-light); }

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── NGG OVERRIDES ── */

/* Replace NGG's float/inline-block layout with CSS Grid.
   Use #spark-ngg-wrap ID to beat NGG's own !important rules on specificity. */
.ngg-galleryoverview,
#spark-ngg-wrap .ngg-galleryoverview {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
  gap: 1.25rem !important;
  overflow: visible !important;
  margin-top: 1.5rem !important;
  margin-bottom: 2rem !important;
}

/* default-view template sets font-size:0 + inline-block — reset for grid */
.ngg-galleryoverview.default-view {
  text-align: left !important;
  font-size: 1rem !important;
  letter-spacing: normal !important;
}

.ngg-gallery-thumbnail-box {
  float: none !important;
  display: block !important;
  vertical-align: initial !important;
  width: 100% !important;
  margin: 0 !important;
  border: 1px solid rgba(201,168,76,0.18) !important;
  background: var(--bg-card) !important;
  transition: border-color 0.4s, transform 0.4s !important;
  border-radius: 3px !important;
  overflow: hidden !important;
}

/* NGG adds ngg-X-columns width classes — let grid handle sizing instead */
.ngg-gallery-thumbnail-box[class*="ngg-"] {
  width: 100% !important;
}

.ngg-gallery-thumbnail-box:hover {
  border-color: rgba(201,168,76,0.65) !important;
  transform: translateY(-3px) !important;
}

.ngg-gallery-thumbnail {
  border: none !important;
  background: transparent !important;
  margin: 0 !important;
  display: block !important;
  width: 100% !important;
  position: relative;
}

/* Make images fill their grid cells */
.ngg-galleryoverview .ngg-gallery-thumbnail a {
  display: block !important;
  margin: 0 !important;
  width: 100% !important;
}

.ngg-gallery-thumbnail img {
  width: 100% !important;
  height: auto !important;
  display: block !important;
  object-fit: cover !important;
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .site-header { padding: 1rem 1.5rem; }
  .gallery-hero { padding-top: 6.5rem; }
  .gallery-hero .eyebrow { display: none; }
  .site-nav { gap: 1rem; }
  .gallery-grid { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .gallery-view-header { flex-direction: column; align-items: flex-start; }

  /* NGG grid: 2 columns on mobile with proper gap */
  .ngg-galleryoverview,
  #spark-ngg-wrap .ngg-galleryoverview {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem !important;
  }

  /* Reduce single-album cover hero height — 60vh is too tall on mobile */
  .gallery-hero {
    height: 36vh !important;
    min-height: 200px !important;
  }

  /* Cart panel: use svh so it fits within visible viewport, accounting for browser chrome */
  .cart-panel {
    height: 100vh;
    height: 100svh;
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
    overflow-y: auto;
  }
  /* Keep items list from pushing footer off screen */
  .cart-items-list {
    max-height: calc(100svh - 320px);
  }
}

/* ── PHOTO LIGHTBOX ────────────────────────────────────────── */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(6,5,15,0.97);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0;
}
.lightbox-overlay.open { display: flex; }

.lightbox-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100vh;
  position: relative;
  flex-direction: column;
}

.lightbox-img-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  width: 100%;
  max-height: calc(100vh - 90px);
}

.lightbox-img-wrap img#lbImage {
  max-width: 94vw;
  max-height: calc(100vh - 100px);
  object-fit: contain;
  display: block;
  border-radius: 2px;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* Watermark overlay — bottom-right of the image */
.lightbox-watermark {
  position: absolute;
  bottom: 16px;
  right: 16px;
  pointer-events: none;
  opacity: 0.42;
  mix-blend-mode: normal;
}
.lightbox-watermark img {
  width: min(300px, 32vw);
  height: auto;
  display: block;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.8));
}

/* Nav arrows */
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(13,11,26,0.6);
  border: 1px solid rgba(160,152,220,0.15);
  border-radius: 50%;
  width: 3rem;
  height: 3rem;
  font-size: 1.6rem;
  color: rgba(240,238,255,0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  backdrop-filter: blur(4px);
  z-index: 2;
}
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(74,66,160,0.45); color: #f0eeff; }

/* Close button */
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: none;
  border: none;
  color: rgba(240,238,255,0.5);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  z-index: 3;
  transition: color 0.2s;
}
.lightbox-close:hover { color: #f0eeff; }

/* Footer bar */
.lightbox-footer {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.8rem 1rem;
  border-top: 1px solid rgba(160,152,220,0.1);
  background: rgba(13,11,26,0.6);
  backdrop-filter: blur(8px);
  flex-shrink: 0;
}

.lightbox-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #c9a84c, #e2c87a);
  color: #0d0b1a;
  border: none;
  border-radius: 2px;
  padding: 0.6rem 1.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}
.lightbox-download-btn:hover { opacity: 0.88; transform: translateY(-1px); }

.lightbox-footer-btns {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  justify-content: center;
}

.lightbox-cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  color: var(--gold, #c9a84c);
  border: 1px solid rgba(201,168,76,0.5);
  border-radius: 2px;
  padding: 0.6rem 1.2rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  font-family: 'Inter', sans-serif;
}
.lightbox-cart-btn:hover {
  background: rgba(201,168,76,0.12);
}
.lightbox-cart-btn.in-cart {
  color: #6ee7b7;
  border-color: rgba(110,231,183,0.4);
}

.lightbox-footer-note {
  font-size: 0.72rem;
  color: rgba(154,147,200,0.6);
  letter-spacing: 0.04em;
  margin: 0;
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .lightbox-prev { left: 0.25rem; }
  .lightbox-next { right: 0.25rem; }
  .lightbox-watermark img { width: min(200px, 50vw); }
}
/* ─────────────────────────────────────────────────────────── */

/* ── PAYMENT METHOD TOGGLE ─────────────────────────────────────────────────── */
.payment-method-btn {
  flex: 1;
  padding: 0.55rem 1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(160,152,220,0.25);
  border-radius: 3px;
  color: var(--text-mid);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.2s ease;
}
.payment-method-btn:hover {
  border-color: rgba(201,168,76,0.5);
  color: var(--white);
}
.payment-method-btn.active {
  background: rgba(201,168,76,0.12);
  border-color: var(--gold);
  color: var(--gold);
}

/* ── CART SYSTEM ─────────────────────────────────────────────────────────── */

/* Add to Cart button — icon only, below the heart */
.add-to-cart-btn {
  position: absolute; top: 42px; right: 6px;
  background: rgba(8,6,20,0.6); border: none;
  border-radius: 50%; width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.2s, transform 0.15s;
  z-index: 2;
}
.add-to-cart-btn svg { fill: rgba(240,238,255,0.6); transition: fill 0.2s; }
.add-to-cart-btn:hover { background: rgba(8,6,20,0.85); transform: scale(1.1); }
.add-to-cart-btn:hover svg { fill: var(--gold, #c9a84c); }
.add-to-cart-btn.in-cart { background: rgba(201,168,76,0.2); }
.add-to-cart-btn.in-cart svg { fill: var(--gold, #c9a84c); }

/* Floating cart widget — always visible */
.cart-widget {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  display: block;
}
.cart-widget-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gold);
  border: none;
  cursor: pointer;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  position: relative;
  transition: transform 0.2s;
}
.cart-widget-btn:hover { transform: scale(1.08); }
.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #e53e3e;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
}

/* Cart panel */
.cart-panel {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  max-width: 95vw;
  height: 100vh;
  height: 100svh; /* use small viewport height on supporting browsers (iOS Safari 15.4+, Chrome 108+) */
  background: #0d0b1a;
  border-left: 1px solid rgba(201,168,76,0.2);
  z-index: 1100;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.cart-panel.open { right: 0; }
.cart-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.cart-panel-header h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--white);
  margin: 0;
}
.cart-panel-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.2rem;
}
.cart-items-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin-bottom: 1rem;
}
.cart-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cart-item-thumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.05);
}
.cart-item-info {
  flex: 1;
  min-width: 0;
}
.cart-item-name {
  font-size: 0.75rem;
  color: var(--text-mid);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item-amount {
  font-size: 0.85rem;
  color: var(--gold);
  font-family: 'Inter', sans-serif;
}
.cart-item-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.2rem;
  flex-shrink: 0;
}
.cart-item-remove:hover { color: #e53e3e; }

.cart-price-note {
  font-size: 0.72rem;
  color: rgba(160,152,220,0.7);
  font-style: italic;
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.75rem;
  background: rgba(160,152,220,0.07);
  border-radius: 2px;
  line-height: 1.5;
}

.cart-item-price-row {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin-top: 0.2rem;
}

.cart-price-symbol {
  font-size: 0.8rem;
  color: var(--gold, #c9a84c);
  font-family: 'Inter', sans-serif;
}

.cart-item-price-input {
  width: 60px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 2px;
  color: var(--gold, #c9a84c);
  font-size: 0.82rem;
  font-family: 'Inter', sans-serif;
  padding: 0.15rem 0.4rem;
  outline: none;
  -moz-appearance: textfield;
}
.cart-item-price-input::-webkit-outer-spin-button,
.cart-item-price-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.cart-item-price-input:focus {
  border-color: rgba(201,168,76,0.7);
}
.cart-footer {
  flex-shrink: 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1rem;
  padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
}
.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-family: 'Inter', sans-serif;
}
.cart-total-label { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.cart-total-amount { font-size: 1.1rem; color: var(--white); font-weight: 500; }

/* Cart contact fields */
.cart-contact-fields {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.cart-contact-fields input {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 2px;
  padding: 0.55rem 0.75rem;
  color: var(--white);
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  width: 100%;
  box-sizing: border-box;
}
.cart-contact-fields input:focus { outline: none; border-color: var(--gold); }
.cart-contact-row { display: flex; gap: 0.5rem; }
.cart-contact-row input { flex: 1; }

/* Cart payment method */
.cart-pm-selector {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}
.cart-pm-btn {
  flex: 1;
  padding: 0.45rem;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: 'Inter', sans-serif;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-muted);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.15s;
}
.cart-pm-btn.active { border-color: var(--gold); color: var(--gold); background: rgba(201,168,76,0.08); }

.cart-stripe-wrap { margin-bottom: 0.8rem; display: none; }
.cart-checkout-btn { width: 100%; margin-bottom: 0.5rem; }
.cart-clear-btn {
  width: 100%;
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-muted);
  padding: 0.4rem;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  font-family: 'Inter', sans-serif;
  transition: all 0.15s;
}
.cart-clear-btn:hover { border-color: #e53e3e; color: #e53e3e; }

/* Cart amount mini-modal */
.cart-amount-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  display: none;
}
.cart-amount-modal.open { display: flex; }
.cart-amount-box {
  background: #0d0b1a;
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 4px;
  padding: 1.5rem;
  width: 320px;
  max-width: 90vw;
}
.cart-amount-box h4 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 1.1rem;
  color: var(--white);
  margin: 0 0 1rem;
}

/* Download all section */
.download-all-section {
  margin: 2rem 0;
  padding: 1.5rem;
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 4px;
  background: rgba(201,168,76,0.04);
  text-align: center;
}
.download-all-section h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--white);
  margin: 0 0 0.4rem;
}
.download-all-section p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
}
.download-all-price {
  font-size: 1rem;
  color: var(--gold);
  font-family: 'Inter', sans-serif;
  margin-bottom: 1rem;
}

/* ── EMAIL GATE COVER ───────────────────────────────────────────────── */
.gate-cover-wrap {
  position: fixed; inset: 0; z-index: 9000;
  background: #0d0b1a center/cover no-repeat;
  display: flex; align-items: center; justify-content: center;
}
.gate-cover-overlay {
  position: absolute; inset: 0;
  background: rgba(8,6,20,0.72);
  backdrop-filter: blur(12px);
}
.gate-cover-box {
  position: relative; z-index: 1;
  background: rgba(18,16,38,0.9);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 6px; padding: 2.5rem 2rem;
  width: min(420px, 92vw); text-align: center;
}
.gate-cover-box input {
  width: 100%; box-sizing: border-box;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(160,152,220,0.25);
  border-radius: 2px; padding: 0.6rem 0.8rem;
  color: var(--white, #f0eeff);
  font-family: 'Inter', sans-serif; font-size: 0.85rem;
  margin-bottom: 0.6rem; outline: none;
}
.gate-cover-box input:focus { border-color: rgba(201,168,76,0.5); }

/* ── GALLERY HERO ───────────────────────────────────────────────────── */
.gallery-hero {
  width: 100%; height: 60vh; min-height: 320px;
  background: #0d0b1a center/cover no-repeat;
  position: relative; display: flex; flex-direction: row;
  align-items: flex-end; justify-content: center;
  margin-bottom: 2rem;
}
.gallery-hero-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.70);
}
.gallery-hero-content {
  position: relative; z-index: 1;
  text-align: center; padding: 2rem 1rem 2.5rem;
}
.gallery-hero-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c9a84c;
  margin: 1.8rem 0 0.8rem;
  font-family: "Inter", sans-serif;
  font-weight: 700;
}
.gallery-hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700; color: #fff;
  margin: 0 0 0.3rem;
}
.gallery-hero-sub {
  font-size: 0.85rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: #c9a84c;
  margin: 0 0 0.3rem;
  font-weight: 700;
}
.gallery-hero-count {
  font-size: 0.75rem; color: rgba(255,255,255,0.9); margin: 0 0 1rem;
  font-weight: 600;
}
.gallery-hero-scroll {
  font-size: 0.72rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: rgba(255,255,255,0.8);
  font-weight: 600;
}

/* ── FAVORITES ──────────────────────────────────────────────────────── */
.fav-btn {
  position: absolute; top: 6px; right: 6px;
  background: rgba(8,6,20,0.6); border: none;
  border-radius: 50%; width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.2s, transform 0.15s;
  z-index: 2;
}
.fav-btn svg { fill: rgba(240,238,255,0.5); transition: fill 0.2s; }
.fav-btn:hover { background: rgba(8,6,20,0.85); transform: scale(1.1); }
.fav-btn.active svg { fill: var(--gold, #c9a84c); }

/* ── LIGHTBOX FAV BUTTON ──────────────────────────────────────────── */
.lightbox-fav-btn {
  background: transparent;
  border: 1px solid rgba(160,152,220,0.3);
  border-radius: 50%;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: border-color 0.2s;
  flex-shrink: 0;
}
.lightbox-fav-btn svg { fill: rgba(240,238,255,0.4); transition: fill 0.2s; }
.lightbox-fav-btn:hover { border-color: rgba(201,168,76,0.5); }
.lightbox-fav-btn.active svg { fill: var(--gold, #c9a84c); }
.lightbox-fav-btn.active { border-color: rgba(201,168,76,0.5); }

/* ── FAVORITES BAR ────────────────────────────────────────────────── */
#spark-favs-bar {
  position: fixed; bottom: 1.5rem; left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 0.6rem;
  background: rgba(13,11,26,0.95);
  border: 1px solid rgba(201,168,76,0.35);
  border-radius: 50px; padding: 0.5rem 0.9rem;
  z-index: 900; backdrop-filter: blur(8px);
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
  white-space: nowrap;
}
.favs-bar-btn {
  display: flex; align-items: center; gap: 0.4rem;
  background: none; border: none; color: var(--gold, #c9a84c);
  font-family: Inter, sans-serif; font-size: 0.8rem;
  cursor: pointer; padding: 0;
}
.favs-bar-add-btn {
  background: var(--gold, #c9a84c); border: none;
  color: #0d0b1a; font-family: Inter, sans-serif;
  font-size: 0.75rem; font-weight: 600;
  padding: 0.3rem 0.8rem; border-radius: 50px; cursor: pointer;
}
.favs-bar-clear-btn {
  background: none; border: none;
  color: rgba(240,238,255,0.4); font-size: 0.8rem; cursor: pointer;
}
.favs-download-btn {
  display: flex; align-items: center; gap: 0.45rem;
  background: var(--gold, #c9a84c); border: none;
  color: #0d0b1a; font-family: Inter, sans-serif;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em;
  padding: 0.35rem 1rem; border-radius: 50px; cursor: pointer;
  transition: opacity 0.2s;
}
.favs-download-btn:hover { opacity: 0.88; }
.cart-total-slider-row {
  padding: 1rem 1.2rem 0.6rem;
  border-bottom: 1px solid rgba(160,152,220,0.12);
  margin-bottom: 0.25rem;
}

/* Hide NGG pagination — infinite scroll handles it */
.ngg-navigation,
.ngg-pages-navigation,
.ngg-page-nav { display: none !important; }

.gallery-infinite-sentinel {
  height: 1px;
  margin-top: 2rem;
}

.gallery-loading-more {
  text-align: center;
  padding: 2rem;
  color: rgba(201,168,76,0.6);
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: none;
}
.gallery-loading-more.active { display: block; }

/* ── EMAIL GATE NOTICE ────────────────────────────────────── */
.gallery-email-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.6rem;
  background: rgba(201,168,76,0.07);
  border: 1px solid rgba(201,168,76,0.22);
  border-radius: 4px;
  padding: 0.7rem 1.1rem;
  margin: 0 auto 2rem;
  max-width: 600px;
  color: rgba(201,168,76,0.85);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  line-height: 1.5;
}
.gallery-email-notice span {
  text-align: center;
}
.gallery-email-notice svg {
  flex-shrink: 0;
  opacity: 0.75;
}
@media (max-width: 640px) {
  .gallery-email-notice { font-size: 0.78rem; padding: 0.65rem 0.9rem; }
}

@media (max-width: 640px) {
  .modal-overlay {
    padding: 0.5rem;
  }
  .modal-box {
    padding: 2rem 1.25rem 1.5rem;
  }
  .modal-thumb {
    max-height: 110px;
    margin-bottom: 1rem;
  }
  .modal-title { font-size: 1.25rem; }
  .modal-sub { margin-bottom: 1.2rem; }
}
