/* =========================================================================
   THREADS & BEADS — GALLERY PAGE
   Palette: #01130d · #012316 · #0f2e23 · gold #d4af37 #caa343 · cream #fff6d8
   ========================================================================= */

.gallery-page { background: #01130d; color: #f5f5f5; overflow-x: hidden; }
.gallery-page h1, .gallery-page h2 { font-family: "Playfair Display", Georgia, serif; letter-spacing: 2px; }

.gold-progress {
  position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 9999;
  background: rgba(212, 175, 55, 0.08);
}
.gold-progress span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, #caa343, #f5e6a5, #d4af37);
}

/* =========================================================================
   TOP BAR
   ========================================================================= */
.gal-topbar {
  position: relative; z-index: 30; padding: 18px 0;
  border-bottom: 1px solid rgba(212, 175, 55, 0.16); background: #01130d;
}
.gal-topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 14px; }

.topbar-back, .topbar-cta {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; font-size: 13px; letter-spacing: 1px;
  transition: color 0.3s ease, background 0.3s ease;
}
.topbar-back { color: #a9bcb1; }
.topbar-back:hover { color: #e8c873; }
.topbar-back i { font-size: 15px; transition: transform 0.3s ease; }
.topbar-back:hover i { transform: translateX(-3px); }

.topbar-brand {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 17px; letter-spacing: 4px; text-transform: uppercase;
  color: #fff6d8; text-decoration: none;
}
.topbar-brand:hover { color: #e8c873; }

.topbar-cta {
  padding: 8px 20px; border: 1px solid rgba(212, 175, 55, 0.55);
  border-radius: 40px; color: #d4af37; text-transform: uppercase; font-size: 12px;
}
.topbar-cta:hover { background: #d4af37; color: #01130d; }

/* =========================================================================
   HERO
   ========================================================================= */
.gallery-hero {
  position: relative; min-height: 42vh; display: flex; align-items: center;
  padding: 54px 20px 46px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, rgba(15, 46, 35, 0.9) 0%, rgba(1, 19, 13, 0) 70%), #01130d;
}
.hero-inner { position: relative; z-index: 2; }
.hero-rule {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: min(560px, 80%); height: 1px; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.75), transparent);
}
.hero-eyebrow { color: #caa343; letter-spacing: 6px; text-transform: uppercase; font-size: 11px; margin-bottom: 16px; }
.gallery-title { font-size: clamp(38px, 6.5vw, 72px); font-weight: 600; line-height: 1.05; margin: 0 0 18px; color: #fff6d8; }
.gallery-title .ch {
  display: inline-block;
  background: linear-gradient(90deg, #d4af37, #f7ecc4, #d4af37);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: goldShine 5s linear infinite;
}
.hero-sub { max-width: 540px; margin: 0 auto; color: #b9c8bf; font-size: 14.5px; line-height: 1.85; }

/* =========================================================================
   TABS
   ========================================================================= */
.gallery-tabs-wrap {
  position: sticky; top: 0; z-index: 60; padding: 18px 0;
  transition: background 0.35s ease, padding 0.35s ease, box-shadow 0.35s ease;
}
.gallery-tabs-wrap.stuck {
  background: #011a12; padding: 10px 0;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}
.gallery-tabs {
  position: relative; display: flex; gap: 6px; padding: 6px;
  border: 1px solid rgba(212, 175, 55, 0.26); border-radius: 60px;
  background: rgba(15, 46, 35, 0.72); overflow-x: auto;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.gallery-tabs::-webkit-scrollbar { display: none; }
.gallery-tabs.many {
  justify-content: flex-start;
  mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent);
}
.gallery-tabs.many .gtab { flex: 0 0 auto; }

.tab-indicator {
  position: absolute; top: 0; left: 0; height: auto; border-radius: 50px; z-index: 0;
  background: linear-gradient(45deg, #d4af37, #f5e6a5, #caa343);
  will-change: transform;
}
.gtab {
  position: relative; z-index: 1; flex: 1 0 auto;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border: 0; background: transparent; color: #dfe6e1;
  font-family: "Poppins", sans-serif; font-size: 13px; letter-spacing: 1px;
  white-space: nowrap; border-radius: 50px; cursor: pointer; transition: color 0.3s ease;
}
.gtab i { font-size: 14px; color: #caa343; transition: color 0.3s; }
.gtab em {
  font-style: normal; font-size: 11px; padding: 2px 8px; border-radius: 20px;
  background: rgba(212, 175, 55, 0.16); color: #e8c873; transition: 0.3s;
}
.gtab:hover { color: #fff6d8; }
.gtab.active { color: #01130d; font-weight: 600; }
.gtab.active i { color: #01130d; }
.gtab.active em { background: rgba(1, 19, 13, 0.24); color: #01130d; }

/* =========================================================================
   GRID
   ========================================================================= */
.gallery-main { padding: 30px 0 80px; }
.grid-count {
  text-align: center; color: #8fa89b; font-size: 12px;
  letter-spacing: 2px; text-transform: uppercase; margin: 8px 0 30px;
}
.lux-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 300px; gap: 16px; }

.lux-card {
  position: relative; margin: 0; border-radius: 14px; overflow: hidden; cursor: pointer;
  background: #0f2e23;
  content-visibility: auto; contain-intrinsic-size: 300px;
  opacity: 0; transform: translate3d(0, 34px, 0);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.lux-card.in { opacity: 1; transform: none; }
.lux-card.is-tall { grid-row: span 2; contain-intrinsic-size: 616px; }

.lux-media { position: relative; width: 100%; height: 100%; overflow: hidden; }
.lux-card img {
  width: 100%; height: 100%; object-fit: cover; display: block; background: #0f2e23;
  transform: scale(1); transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.lux-card:hover img { transform: scale(1.07); }

.lux-card::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  border: 1px solid rgba(212, 175, 55, 0.18); border-radius: 14px;
  transition: border-color 0.35s ease;
}
.lux-card:hover::after { border-color: #d4af37; }

/* "4 views" badge */
.lux-views {
  position: absolute; top: 11px; left: 11px; z-index: 5;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 30px;
  background: rgba(1, 19, 13, 0.72); border: 1px solid rgba(212, 175, 55, 0.4);
  color: #e8c873; font-size: 10.5px; letter-spacing: 0.5px;
}
.lux-views i { font-size: 11px; }

.lux-meta {
  position: absolute; inset: auto 0 0 0; z-index: 4;
  padding: 54px 14px 14px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 7px;
  background: linear-gradient(to top, rgba(1, 15, 10, 0.95), rgba(1, 15, 10, 0.5) 50%, transparent);
  opacity: 0; transform: translate3d(0, 14px, 0);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.lux-card:hover .lux-meta { opacity: 1; transform: none; }

.lux-tag { font-size: 9.5px; letter-spacing: 2px; text-transform: uppercase; color: #caa343; }
.lux-desc {
  font-size: 12.5px; line-height: 1.5; color: #fff6d8;
  font-family: "Playfair Display", Georgia, serif;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.lux-btn {
  margin-top: 3px; padding: 8px 18px; border: 0; border-radius: 40px;
  background: linear-gradient(45deg, #d4af37, #f5e6a5); color: #01130d;
  font-size: 11.5px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase;
  cursor: pointer; transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.lux-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3); }

/* =========================================================================
   AUTO-LOAD SENTINEL
   ========================================================================= */
.grid-sentinel {
  display: flex; justify-content: center; align-items: center; gap: 8px;
  height: 70px; margin-top: 26px;
}
.grid-sentinel.done { display: none; }
.sentinel-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #d4af37; opacity: 0.35;
  animation: sentinelPulse 1.1s ease-in-out infinite;
}
.sentinel-dot:nth-child(2) { animation-delay: 0.16s; }
.sentinel-dot:nth-child(3) { animation-delay: 0.32s; }
@keyframes sentinelPulse {
  0%, 100% { opacity: 0.25; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.15); }
}

.grid-end {
  display: none; text-align: center; margin-top: 34px;
  color: #6f8479; font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
}
.grid-end.show { display: block; }

/* =========================================================================
   VIEWER — big image with thumbnail strip
   ========================================================================= */
.lux-viewer {
  position: fixed; inset: 0; z-index: 9990; display: none;
  align-items: center; justify-content: center; padding: 24px;
  background: rgba(1, 12, 8, 0.96);
}
.lux-viewer.open { display: flex; }

.vw-inner {
  display: flex; flex-direction: column; align-items: center;
  width: 100%; max-width: 1000px; max-height: 100%;
}

.vw-stage {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 58vh; margin-bottom: 14px;
}
.vw-stage img {
  max-width: 100%; max-height: 100%;
  object-fit: contain; border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  transition: opacity 0.25s ease;
}
.vw-stage.swapping img { opacity: 0.25; }

/* thumbnail strip */
.vw-thumbs {
  display: flex; gap: 10px; padding: 4px 2px 8px;
  max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.vw-thumbs::-webkit-scrollbar { display: none; }
.vw-thumbs:empty { display: none; }

.vw-thumb {
  flex: 0 0 auto; width: 72px; height: 90px;
  border-radius: 8px; overflow: hidden; cursor: pointer; padding: 0;
  background: #0f2e23; border: 2px solid transparent;
  opacity: 0.6;
  transition: opacity 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.vw-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vw-thumb:hover { opacity: 1; transform: translateY(-3px); border-color: rgba(212, 175, 55, 0.6); }
.vw-thumb.active { opacity: 1; border-color: #d4af37; }

.vw-caption {
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  margin-top: 12px; text-align: center;
}
.vw-index { color: #caa343; font-size: 11px; letter-spacing: 3px; text-transform: uppercase; }
.vw-text {
  color: #e2e8e4; font-size: 13.5px; max-width: 640px; line-height: 1.7;
  font-family: "Playfair Display", Georgia, serif;
}
.vw-btn {
  margin-top: 2px; padding: 11px 30px; border: 0; border-radius: 50px;
  background: linear-gradient(45deg, #d4af37, #f5e6a5); color: #01130d;
  font-size: 12.5px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 600;
  cursor: pointer; transition: transform 0.25s ease;
}
.vw-btn:hover { transform: translateY(-2px); }

.vw-close, .vw-nav {
  position: absolute; border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.4); background: rgba(15, 46, 35, 0.78);
  color: #d4af37; cursor: pointer; z-index: 4;
  transition: background 0.3s ease, color 0.3s ease;
}
.vw-close:hover, .vw-nav:hover { background: #d4af37; color: #01130d; }
.vw-close { top: 18px; right: 22px; width: 44px; height: 44px; font-size: 25px; line-height: 1; }
.vw-nav { top: 50%; transform: translateY(-50%); width: 50px; height: 50px; font-size: 19px; }
.vw-prev { left: 20px; }
.vw-next { right: 20px; }

/* =========================================================================
   ENQUIRY POPUP
   ========================================================================= */
.enq-overlay {
  position: fixed; inset: 0; z-index: 9995; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(1, 12, 8, 0.9); overflow-y: auto;
}
.enq-overlay.open { display: flex; }

.enq-box {
  position: relative; width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto;
  padding: 34px 30px 30px; border-radius: 18px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: linear-gradient(150deg, #0f2e23, #011a12);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
}
.enq-box::-webkit-scrollbar { width: 6px; }
.enq-box::-webkit-scrollbar-thumb { background: rgba(212, 175, 55, 0.4); border-radius: 6px; }

.enq-close {
  position: absolute; top: 14px; right: 16px; width: 36px; height: 36px;
  border-radius: 50%; border: 1px solid rgba(212, 175, 55, 0.35);
  background: transparent; color: #d4af37; font-size: 22px; line-height: 1;
  cursor: pointer; transition: background 0.3s, color 0.3s;
}
.enq-close:hover { background: #d4af37; color: #01130d; }

.enq-head { text-align: center; margin-bottom: 22px; }
.enq-title { font-size: 25px; color: #fff6d8; margin: 0 0 8px; letter-spacing: 2px; }
.enq-ref { font-size: 12px; color: #a9bcb1; line-height: 1.6; margin: 0; font-style: italic; }

.enq-form .form-group { margin-bottom: 14px; }
.enq-form .label { display: block; font-size: 12px; color: #b9c8bf; margin-bottom: 6px; letter-spacing: 1px; }
.enq-form .opt { color: #7f948a; }

.enq-form .luxury-input {
  width: 100%; padding: 12px 14px; border-radius: 8px;
  border: 1px solid rgba(212, 175, 55, 0.3); background: rgba(1, 19, 13, 0.6);
  color: #f1f4f2; font-family: "Poppins", sans-serif; font-size: 14px;
  outline: none; transition: border-color 0.3s ease;
}
.enq-form .luxury-input:focus { border-color: #d4af37; }
.enq-form .luxury-input::placeholder { color: #7f948a; }
.enq-form select.luxury-input option { background: #0f2e23; color: #f1f4f2; }
.enq-form .luxury-textarea { resize: vertical; }

.enq-error { min-height: 18px; margin: 4px 0 0; font-size: 12.5px; color: #ff9d94; text-align: center; }

.enq-submit {
  width: 100%; margin-top: 8px; padding: 13px; border: 0; border-radius: 50px;
  background: linear-gradient(45deg, #d4af37, #f5e6a5, #d4af37); background-size: 200% auto;
  color: #01130d; font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
  font-size: 13px; cursor: pointer;
  transition: background-position 0.5s ease, opacity 0.3s ease;
}
.enq-submit:hover { background-position: right center; }
.enq-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.enq-success { display: none; text-align: center; padding: 26px 6px 10px; }
.enq-success.show { display: block; }
.enq-success i { font-size: 46px; color: #d4af37; }
.enq-success p { margin-top: 14px; color: #dfe6e1; font-size: 14.5px; line-height: 1.7; }

/* =========================================================================
   FOOTER BUTTONS
   ========================================================================= */
.footer-cta-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 24px; }
.footer-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 18px; border-radius: 50px; font-size: 11.5px; letter-spacing: 1.2px;
  text-transform: uppercase; text-decoration: none; white-space: nowrap; transition: 0.35s ease;
}
.footer-btn-ghost { border: 1px solid rgba(212, 175, 55, 0.6); color: #d4af37; background: transparent; }
.footer-btn-ghost:hover { background: rgba(212, 175, 55, 0.12); color: #f5e6a5; transform: translateY(-2px); }
.footer-btn-gold {
  border: 1px solid #d4af37; color: #0f2e23; font-weight: 600;
  background: linear-gradient(45deg, #d4af37, #f5e6a5, #d4af37); background-size: 200% auto;
}
.footer-btn-gold:hover { background-position: right center; color: #0f2e23; transform: translateY(-2px); }
@media (min-width: 992px) { .footer-cta-row { flex-wrap: nowrap; } }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 1200px) {
  .lux-grid { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 280px; }
  .lux-card { contain-intrinsic-size: 280px; }
  .lux-card.is-tall { contain-intrinsic-size: 576px; }
}

@media (max-width: 992px) {
  .gallery-hero { min-height: 38vh; padding: 44px 18px 38px; }
  .gtab em { display: none; }
  .gtab { padding: 11px 18px; }
  .vw-nav { width: 42px; height: 42px; }
  .vw-prev { left: 8px; }
  .vw-next { right: 8px; }
  .vw-stage { height: 52vh; }
}

@media (max-width: 768px) {
  .topbar-brand { display: none; }
  .gallery-hero { min-height: 34vh; }
  .hero-sub { font-size: 13.5px; }

  .lux-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 240px; gap: 11px; }
  .lux-card { contain-intrinsic-size: 240px; }
  .lux-card.is-tall { grid-row: span 1; contain-intrinsic-size: 240px; }

  /* no hover on touch — keep caption and button visible */
  .lux-meta { opacity: 1; transform: none; padding: 40px 10px 10px; }
  .lux-desc { -webkit-line-clamp: 2; font-size: 11px; }
  .lux-tag { font-size: 8.5px; }
  .lux-btn { padding: 7px 14px; font-size: 10.5px; }
  .lux-views { font-size: 9.5px; padding: 4px 9px; top: 8px; left: 8px; }

  .lux-viewer { padding: 14px; }
  .vw-stage { height: 44vh; margin-bottom: 10px; }
  .vw-thumb { width: 56px; height: 70px; }
  .vw-close { top: 10px; right: 12px; width: 38px; height: 38px; font-size: 22px; }
  .vw-text { font-size: 12px; }
  .vw-caption { margin-top: 8px; gap: 7px; }

  .enq-box { padding: 28px 20px 24px; max-height: 94vh; }
  .enq-title { font-size: 21px; }
}

@media (max-width: 480px) {
  .lux-grid { grid-auto-rows: 205px; }
  .lux-card { contain-intrinsic-size: 205px; }
  .vw-stage { height: 40vh; }
  .vw-thumb { width: 48px; height: 60px; }
  .footer-cta-row { flex-direction: column; align-items: stretch; }
  .footer-btn { width: 100%; padding: 12px 18px; font-size: 12.5px; }
}

/* accessibility */
.gtab:focus-visible, .lux-card:focus-visible, .lux-btn:focus-visible,
.vw-thumb:focus-visible, .topbar-cta:focus-visible,
.footer-btn:focus-visible, .enq-submit:focus-visible {
  outline: 2px solid #f5e6a5; outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .lux-card { opacity: 1; transform: none; }
}







/* the wrapper is transparent on small screens */
.vw-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* ---- desktop: thumbnails and text to the right of a much larger image ---- */
@media (min-width: 992px) {
  .lux-viewer { padding: 30px 40px; }

  .vw-inner {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 48px;                /* was 32px — more breathing room */
    width: auto;
    max-width: 1280px;
  }

  .vw-stage {
    flex: 0 0 auto;           /* no longer shrinks or grows */
    width: min(48vw, 580px);  /* fixed box — the layout can't move */
    height: 78vh;
    margin-bottom: 0;
  }
  .vw-stage img {
    width: 100%;
    height: 100%;
    object-fit: contain;      /* image fits the box, box never fits the image */
    max-width: none;
    max-height: none;
  }

  .vw-side {
    flex: 0 0 280px;
    align-items: flex-start;
    width: 280px;
    max-height: 78vh;
    overflow-y: auto;
    gap: 18px;
    scrollbar-width: thin;
  }
  .vw-side::-webkit-scrollbar { width: 5px; }
  .vw-side::-webkit-scrollbar-thumb { background: rgba(212, 175, 55, 0.35); border-radius: 5px; }

  .vw-thumbs { flex-wrap: wrap; gap: 10px; overflow: visible; padding: 0; }
  .vw-thumb { width: 82px; height: 102px; }

  .vw-caption { align-items: flex-start; text-align: left; margin-top: 0; gap: 11px; }
  .vw-text { max-width: none; font-size: 14px; }
  .vw-btn { align-self: flex-start; }

  .vw-prev { left: 26px; }
  .vw-next { right: 26px; }
}

@media (min-width: 1400px) {
  .vw-side { flex-basis: 330px; width: 330px; }
  .vw-thumb { width: 96px; height: 118px; }
}