/* Velora Luxe — Gallery Lightbox Styles */

/* Photo count badge on card image */
.yacht-photo-count {
  position: absolute; bottom: 10px; left: 10px;
  background: rgba(0,0,0,0.65); backdrop-filter: blur(6px);
  color: #fff; font-size: 11px; font-weight: 500;
  padding: 4px 9px; border-radius: 20px;
  letter-spacing: 0.04em; pointer-events: none;
  border: 1px solid rgba(255,255,255,0.15);
}

/* Make the card image wrapper feel clickable */
.yacht-img-wrap { cursor: zoom-in; }
.yacht-img-wrap:hover img { transform: scale(1.03); }

/* View Photos button */
.yacht-gallery-btn {
  display: block; width: 100%;
  background: transparent;
  border: 1px solid rgba(201,165,92,0.35);
  color: var(--gold); font-size: 12px; letter-spacing: 0.1em;
  text-transform: uppercase; font-weight: 500; font-family: 'Inter', sans-serif;
  padding: 9px 0; border-radius: 4px; cursor: pointer;
  margin-bottom: 10px; transition: all 0.2s;
}
.yacht-gallery-btn:hover {
  background: rgba(201,165,92,0.1); border-color: var(--gold);
  letter-spacing: 0.14em;
}

/* ── GALLERY OVERLAY ── */
.gal-overlay {
  position: fixed; inset: 0;
  background: #000;
  z-index: 9998;
  display: flex; flex-direction: column;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
  user-select: none;
}
.gal-overlay.open { opacity: 1; pointer-events: all; }

/* Top bar */
.gal-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.85) 0%, transparent 100%);
  gap: 16px;
}
.gal-title-wrap { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gal-name {
  font-family: 'Playfair Display', serif;
  color: #C9A55C; font-size: 1rem; letter-spacing: 0.05em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gal-counter { color: rgba(255,255,255,0.45); font-size: 0.75rem; letter-spacing: 0.1em; }

.gal-header-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.gal-close {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18);
  color: #fff; width: 38px; height: 38px; border-radius: 50%;
  cursor: pointer; font-size: 1.1rem; display: flex; align-items: center;
  justify-content: center; transition: all 0.2s; flex-shrink: 0;
}
.gal-close:hover { background: rgba(255,255,255,0.22); }

/* Main image area */
.gal-main {
  flex: 1; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  padding: 72px 0 0;
  min-height: 0;
}
.gal-img-wrap {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 0 72px;
}
.gal-img-wrap img {
  max-width: 100%; max-height: 100%;
  object-fit: contain; border-radius: 2px;
  transition: opacity 0.22s ease, transform 0.22s ease;
  -webkit-user-drag: none; user-select: none;
  display: block;
}
.gal-img-wrap img.fading { opacity: 0; transform: scale(0.97); }

/* Nav arrows */
.gal-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.13);
  color: #fff; width: 50px; height: 50px; border-radius: 50%;
  cursor: pointer; font-size: 1.6rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; z-index: 3;
  padding-bottom: 1px;
}
.gal-nav:hover { background: rgba(201,165,92,0.2); border-color: #C9A55C; color: #C9A55C; }
.gal-prev { left: 14px; }
.gal-next { right: 14px; }
.gal-nav:disabled { opacity: 0.2; pointer-events: none; }

/* Thumbnail strip */
.gal-thumbs {
  flex-shrink: 0;
  padding: 10px 14px 16px;
  display: flex; gap: 5px; overflow-x: auto;
  background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, transparent 100%);
  scrollbar-width: thin; scrollbar-color: rgba(201,165,92,0.35) transparent;
  -webkit-overflow-scrolling: touch;
}
.gal-thumbs::-webkit-scrollbar { height: 3px; }
.gal-thumbs::-webkit-scrollbar-thumb { background: rgba(201,165,92,0.35); border-radius: 2px; }

.gal-thumb {
  flex-shrink: 0; width: 76px; height: 52px;
  border-radius: 3px; overflow: hidden;
  cursor: pointer; border: 2px solid transparent;
  transition: opacity 0.15s, border-color 0.15s; opacity: 0.42;
}
.gal-thumb:hover { opacity: 0.75; }
.gal-thumb.active { border-color: #C9A55C; opacity: 1; }
.gal-thumb img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; display: block; }

/* Loading spinner inside gallery */
.gal-spinner {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 36px; height: 36px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: #C9A55C;
  border-radius: 50%; animation: galSpin 0.7s linear infinite;
  pointer-events: none; z-index: 1;
}
@keyframes galSpin { to { transform: translate(-50%,-50%) rotate(360deg); } }

/* Mobile */
@media (max-width: 600px) {
  .gal-header { padding: 12px 16px; }
  .gal-name { font-size: 0.9rem; }
  .gal-img-wrap { padding: 0 46px; }
  .gal-nav { width: 38px; height: 38px; font-size: 1.2rem; }
  .gal-prev { left: 4px; }
  .gal-next { right: 4px; }
  .gal-thumb { width: 58px; height: 40px; }
}
