/* =========================================================
   VentureCommerce gallery.css (CLEAN, SOURCE OF TRUTH)
========================================================= */

/* Wrapper */
.vcom-gallery {
  display: grid;
  gap: var(--vcom-space-sm);
}

/* Stage */
.vcom-gallery__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--vcom-bg);
  border: 1px solid var(--vcom-border);
  border-radius: var(--vcom-radius);
  padding: .75rem;
  overflow: hidden;

  aspect-ratio: 1 / 1;
}

@media (max-width:1024px){
  .vcom-gallery__stage {
    min-height: 380px;
  }
}

/* Slides */
.vcom-gallery__slide {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.vcom-gallery__slide.is-active {
  display: flex;
}

/* Image rule */
.vcom-gallery__slide img,
.vcom-zoom__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: auto;
}

/* Badges – layout ONLY */
.vcom-gallery__badges {
  position: absolute;
  top: .75rem;
  left: .75rem;
  display: flex;
  gap: .5rem;
  z-index: 2;
  pointer-events: none;
}

/* =========================
   THUMBNAILS
========================= */

.vcom-gallery__thumbs-wrap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .5rem;
  margin-top: .75rem;
}

.vcom-gallery__thumbs {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  padding: .25rem;
}

/* THUMB BUTTON */
.vcom-gallery__thumb {
  width: 64px;
  height: 64px;

  border: 1px solid var(--vcom-border);
  border-radius: var(--vcom-radius-sm, 8px);
  background: var(--vcom-bg);

  overflow: hidden;
  padding: 0 !important;

  display: block;
  cursor: pointer;
}

/* THUMB IMAGE */
.vcom-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;     /* fill box */
  display: block;
}

/* ACTIVE STATE */
.vcom-gallery__thumb.is-active {
  border-color: var(--vcom-primary);
}


/* =========================
   LIGHTBOX
========================= */

.vcom-lightbox {
  position: relative;
  border: none;
  padding: 0;
  background: transparent;
}

.vcom-lightbox::backdrop {
  background: rgba(0,0,0,.6);
}

.vcom-lightbox img {
  display: block;
  max-width: 92vw;
  max-height: 82vh;
  margin: auto;
}

.vcom-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
}

.vcom-lightbox__nav--prev { left: 1rem; }
.vcom-lightbox__nav--next { right: 1rem; }

/* =========================
   GALLERY NAV (stage)
========================= */

.vcom-gallery__stage {
  position: relative;
}

/* NAV inside stage */
.vcom-gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
}

.vcom-gallery__nav--prev { left: .5rem; }
.vcom-gallery__nav--next { right: .5rem; }

.vcom-lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 25;
}

.vcom-gallery__nav {
  opacity: 0;
  transition: opacity .2s;
}

.vcom-gallery__stage:hover .vcom-gallery__nav {
  opacity: 1;
}