/* ═══════════════════════════════════════════════════════════════════
   Voya Indis Co. — voya-lightbox.css
   Shared file: link from every page that has a gallery.
   Replaces the inline VOYA-FIX-START…VOYA-FIX-END block.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Viewport / overflow safety ─────────────────────────────────── */
html, body { max-width: 100vw; overflow-x: hidden; }

/* ── Hide auto-gallery heading + count (sec-label handles it) ─────── */
.auto-gallery-title,
.gallery-count { display: none !important; }

/* ── 4-COLUMN AUTO-GALLERY GRID ──────────────────────────────────── */
.auto-gallery-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 6px !important;
  width: 100% !important;
  max-width: 100% !important;
}

.auto-gallery-grid > div {
  position: relative !important;
  overflow: hidden !important;
  aspect-ratio: 4 / 3 !important;
  width: 100% !important;
  background: #f2ede6;
  cursor: zoom-in;
}

.auto-gallery-grid > div img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
  transition: transform 0.45s ease, opacity 0.45s ease !important;
}

.auto-gallery-grid > div:hover img {
  transform: scale(1.07) !important;
  opacity: 0.9 !important;
}

/* ── OLD GALLERY-GRID (product pages) ───────────────────────────── */
.gallery-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 6px !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

.gallery-grid img {
  display: block !important;
  width: 100% !important;
  aspect-ratio: 4 / 3 !important;
  object-fit: cover !important;
  height: auto !important;
  transition: transform 0.45s ease !important;
}

.gallery-grid img:hover {
  transform: scale(1.07) !important;
  opacity: 0.9 !important;
}

/* Kill hero-first span override */
.gallery-grid img:first-child {
  grid-column: unset !important;
  grid-row: unset !important;
  aspect-ratio: 4 / 3 !important;
  height: auto !important;
}

/* ── RESPONSIVE BREAKPOINTS ──────────────────────────────────────── */
@media (max-width: 1100px) {
  .auto-gallery-grid,
  .gallery-grid { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 700px) {
  .auto-gallery-grid,
  .gallery-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 420px) {
  .auto-gallery-grid,
  .gallery-grid { grid-template-columns: 1fr !important; }
}

/* ═══════════════════════════════════════════════════════════════════
   VOYA LIGHTBOX
   ═══════════════════════════════════════════════════════════════════ */
.voya-lb {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(8, 8, 8, 0.97);
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.voya-lb.open { display: flex !important; }

/* Close button — top right */
.voya-lb-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.28);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.22s;
  z-index: 10;
  padding: 0;
  line-height: 1;
}
.voya-lb-close:hover {
  background: rgba(255,255,255,0.28);
  transform: scale(1.1) rotate(90deg);
}

/* Prev / Next — sides */
.voya-lb-prev,
.voya-lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.22);
  color: #fff;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10;
  user-select: none;
  padding: 0 0 2px 0;
}
.voya-lb-prev { left: 20px; }
.voya-lb-next { right: 20px; }
.voya-lb-prev:hover,
.voya-lb-next:hover { background: rgba(255,255,255,0.24); }

/* Counter */
.voya-lb-counter {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Jost', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  color: rgba(255,255,255,0.42);
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}

/* Label (gallery.html) */
.voya-lb-label {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Jost', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(184,147,90,0.6);
  white-space: nowrap;
  pointer-events: none;
}

/* Main image */
.voya-lb-img-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 66px 96px 12px;
  box-sizing: border-box;
  overflow: hidden;
}
#voyaLBImg {
  max-width: 100%;
  max-height: calc(100vh - 195px);
  object-fit: contain;
  box-shadow: 0 24px 80px rgba(0,0,0,0.65);
  display: block;
  transition: opacity 0.18s ease;
}
#voyaLBImg.voya-fade { opacity: 0; }

/* Thumbnail strip */
.voya-lb-thumbs {
  display: flex;
  gap: 6px;
  padding: 10px 20px 14px;
  justify-content: center;
  overflow-x: auto;
  max-width: 100vw;
  flex-shrink: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(184,147,90,0.5) transparent;
}
.voya-lb-thumbs::-webkit-scrollbar { height: 3px; }
.voya-lb-thumbs::-webkit-scrollbar-thumb {
  background: rgba(184,147,90,0.5);
  border-radius: 2px;
}
.voya-lb-thumb {
  width: 60px;
  height: 44px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.38;
  flex-shrink: 0;
  border: 2px solid transparent;
  border-radius: 2px;
  transition: opacity 0.2s, border-color 0.2s;
}
.voya-lb-thumb:hover { opacity: 0.7; }
.voya-lb-thumb.active {
  opacity: 1;
  border-color: #b8935a;
}

/* Mobile */
@media (max-width: 640px) {
  .voya-lb-prev { left: 8px; width: 42px; height: 42px; font-size: 1.8rem; }
  .voya-lb-next { right: 8px; width: 42px; height: 42px; font-size: 1.8rem; }
  .voya-lb-img-wrap { padding: 56px 62px 10px; }
  #voyaLBImg { max-height: calc(100vh - 168px); }
  .voya-lb-thumb { width: 46px; height: 34px; }
}
