/* Container */
#rock-variation-gallery {
  width: 100%;
}

/* Gallery layout */
#rock-variation-gallery .rock-gallery {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Main image */
#rock-variation-gallery .rock-main {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #fff;
  overflow: hidden;
}

#rock-variation-gallery .rock-main img {
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Prev / Next arrows */
#rock-variation-gallery .rock-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0px !important;
}

#rock-variation-gallery .rock-prev { left: 10px; }
#rock-variation-gallery .rock-next { right: 10px; }

#rock-variation-gallery .rock-nav:hover {
  background: rgba(0,0,0,.75);
}

/* Zoom button */
#rock-variation-gallery .rock-zoom {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0px !important;
}

#rock-variation-gallery .rock-zoom:hover {
  background: rgba(0,0,0,.75);
}

#rock-variation-gallery .rock-zoom svg {
  width: 20px;
  height: 20px;
}

/* ========== THUMBNAILS / CAROUSEL ========== */

/* Wrapper: volle breedte, pijltjes liggen er overheen */
#rock-variation-gallery .rock-thumbs-wrap{
  position: relative;
  width: 100%;
}

/* Track: volle breedte uitgelijnd met main */
#rock-variation-gallery .rock-thumbs{
  display: flex;
  gap: 12px;
  margin-top: 16px;

  /* GEEN halve thumb zichtbaar */
  overflow: hidden;

  /* ruimte binnenin zodat pijltjes niet over thumbs heen zitten */
  box-sizing: border-box;

  scroll-behavior: smooth;

  /* optioneel: touch scroll gedrag (ook al is overflow hidden) */
  -webkit-overflow-scrolling: touch;
}

/* Thumbnail pijltjes – over de track heen (zelfde stijl als main) */
#rock-variation-gallery .rock-thumbs-nav{
  position: absolute;
  top: calc(50% + 8px); /* +8px omdat track margin-top 16px heeft */
  transform: translateY(-50%);
  z-index: 6;

  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 24px;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

#rock-variation-gallery .rock-thumbs-nav:hover{
  background: rgba(0,0,0,.75);
}

#rock-variation-gallery .rock-thumbs-prev{ left: 10px; }
#rock-variation-gallery .rock-thumbs-next{ right: 10px; }

/* 4 thumbnails zichtbaar */
#rock-variation-gallery .rock-thumb{
  flex: 0 0 calc((100% - (12px * 3)) / 4);
  max-width: calc((100% - (12px * 3)) / 4);

  border: 2px solid transparent;
  border-radius: 6px;
  padding: 0;
  background: none;
  cursor: pointer;
}

#rock-variation-gallery .rock-thumb img{
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  border-radius: 4px;
}

#rock-variation-gallery .rock-thumb.is-active{
  border-color: #000;
}

/* Hidden Elementor lightbox slides (zichtbaar voor JS, niet voor user) */
#rock-variation-gallery .rock-lightbox-slides {
  position: absolute;
  left: -99999px;
  top: -99999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* Overlay (mag dezelfde blijven als je al had) */
#rock-variation-gallery .rock-loading {
  position: absolute;
  inset: 0;
  z-index: 98;
  background: rgba(255,255,255,0.55);
  display: none;
  cursor: default;
}

#rock-variation-gallery.is-loading .rock-loading {
  display: block;
  background: rgba(255,255,255,0.55);
  z-index: 98;
}

/* Spinner: donkergrijze cirkel + wit bolletje dat draait */
#rock-variation-gallery .rock-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;

  border-radius: 50%;
  background: rgba(0,0,0,0.35);

  animation: rockdotspin 0.8s linear infinite;
  transform-origin: 50% 50%;
}

#rock-variation-gallery .rock-spinner::before {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;

  /* bolletje aan de rand */
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
}

@keyframes rockdotspin {
  to { transform: rotate(360deg); }
}

/* Thumbnail loader overlay */
#rock-variation-gallery .rock-thumbs-wrap {
  position: relative;
}

#rock-variation-gallery .rock-thumbs-loading {
  position: absolute;
  inset: 0;
  z-index: 7;
  background: rgba(255,255,255,0.55);
  display: none;
  pointer-events: none;
}

/* Toon loader ook over thumbnails */
#rock-variation-gallery.is-loading .rock-thumbs-loading {
  display: block;
}

/* Spinner centreren in thumbnail track */
#rock-variation-gallery .rock-thumbs-loading .rock-spinner {
  top: 50%;
  left: 50%;
}

/* Mobile tweaks */
@media (max-width: 767px) {
  #rock-variation-gallery .rock-zoom {
    width: 40px;
    height: 40px;
    top: 10px;
    right: 10px;
  }

  #rock-variation-gallery .rock-nav {
    width: 38px;
    height: 38px;
  }
}