/* ==========================
   Multi Image Viewer (final)
   Use with containers: .imgViewer
   ========================== */

.imgViewer{
  position: relative;
  display: inline-block;
  width: var(--viewer-w, auto);
  max-width: 100%;
  line-height: 0;
  user-select: none;
  clear: left;
  -webkit-tap-highlight-color: transparent;
}

.float-right{
  float: right;
  margin: 0 0 12px 18px;
}

.float-left{
  float: left;
  margin: 0 18px 12px 0;
}

/* Image */
.imgViewer img{
  display: block;
  max-width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

/* Click zones (left/right halves) */
.imgViewer .zone{
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  cursor: pointer;
  background: transparent;
  z-index: 1; /* below arrows */
}

.imgViewer .zone.left{ left: 0; }
.imgViewer .zone.right{ right: 0; }

/* Subtle feedback on hover (desktop only) */
@media (hover: hover){
  .imgViewer .zone:hover{
    background: rgba(0,0,0,0.05);
  }
}

/* Overlay arrows */
.imgViewer .nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);

  width: 44px;
  height: 44px;

  border: 0;
  border-radius: 999px;

  background: rgba(0,0,0,0.35);
  color: #fff;

  font-size: 28px;
  line-height: 44px;
  text-align: center;

  cursor: pointer;
  padding: 0;

  z-index: 3; /* above zones */
  opacity: 0;
  transition: opacity 150ms ease;
}

.imgViewer .nav.prev{ left: 10px; }
.imgViewer .nav.next{ right: 10px; }

/* Show arrows on hover on desktop; keep visible on touch */
@media (hover: hover){
  .imgViewer:hover .nav{ opacity: 1; }
}
@media (hover: none){
  .imgViewer .nav{ opacity: 1; }
}

/* Focus visibility (keyboard navigation) */
.imgViewer .nav:focus{
  outline: 2px solid rgba(255,255,255,0.85);
  outline-offset: 2px;
}

/* Optional counter (bottom-right) */
.imgViewer .counter{
  position: absolute;
  right: 10px;
  bottom: 10px;

  background: rgba(0,0,0,0.35);
  color: #fff;

  padding: 6px 10px;
  border-radius: 999px;

  font: 12px/1.2 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  letter-spacing: 0.2px;

  z-index: 2; /* between zones and arrows */
}

/* Small screens: slightly smaller arrows */
@media (max-width: 420px){
  .imgViewer .nav{
    width: 40px;
    height: 40px;
    font-size: 26px;
    line-height: 40px;
  }
}