/* ==== GALLERY LAYOUT ==== */
.nly-gallery{ display:grid; gap:12px; }

/* ==== STAGE ==== */
.nly-gallery__stage{
  position:relative; width:100%;
  background:#f7f7f7; border-radius:12px; overflow:hidden;
  display:flex; align-items:center; justify-content:center;
  aspect-ratio:4/5;
}
.nly-gallery__stage.nly-animating{ pointer-events:none; }

/* прибрати будь-які рамки/тіні сцени */
.nly-gallery__stage, .nly-gallery__stage *{
  border:0!important; outline:0!important; box-shadow:none!important;
}
.nly-gallery__stage::before, .nly-gallery__stage::after{ content:none!important; }

.nly-gallery__main{
  position:relative; z-index:1;
  width:100%; height:100%; object-fit:cover; object-position:50% 50%;
  backface-visibility:hidden; transform:translateZ(0);
  background:#f7f7f7;
}

/* ==== SMOOTH CROSSFADE (ghost завжди в DOM) ==== */
.nly-gallery__ghost{
  position:absolute; inset:0; width:100%; height:100%;
  object-fit:cover; object-position:50% 50%;
  pointer-events:none; display:block; opacity:0;
  transition:opacity 260ms cubic-bezier(.22,.61,.36,1);
  will-change:opacity; transform:translateZ(0); z-index:2;
  background:#f7f7f7;
}
.nly-gallery__ghost.is-visible{ opacity:1; }

/* прибрати lazy-fade плагінів */
.nly-gallery img.lazyload,
.nly-gallery img.lazyloading,
.nly-gallery img.lazyloaded{ opacity:1!important; transition:none!important; filter:none!important; }

/* ==== THUMBS STRIP ==== */
.nly-gallery__strip-wrap{ display:block; overflow:hidden; }
.nly-gallery__strip{
  display:flex; gap:8px; overflow-x:auto; overflow-y:hidden;
  padding-bottom:0; -webkit-overflow-scrolling:touch; scroll-snap-type:x mandatory;
}
/* сховати скролбар */
.nly-gallery__strip::-webkit-scrollbar{ width:0; height:0; background:transparent; display:none; }
.nly-gallery__strip{ scrollbar-width:none; -ms-overflow-style:none; }

/* ==== THUMBS (no borders, soft highlight) ==== */
.nly-gallery .nly-thumb{
  --thumb-size:72px;
  position:relative; flex:0 0 auto;
  width:var(--thumb-size); height:var(--thumb-size);
  padding:0; border:0; outline:0;
  background:#f1f1ec; border-radius:10px; overflow:hidden;
  cursor:pointer; scroll-snap-align:start; opacity:.95;
  transition:background-color .18s ease, transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.nly-gallery .nly-thumb, .nly-gallery .nly-thumb *, .nly-gallery .nly-thumb::before, .nly-gallery .nly-thumb::after{
  border:0!important; outline:0!important; box-shadow:none!important;
}
.nly-gallery .nly-thumb__img{
  width:100%; height:100%; display:block; object-fit:cover; border-radius:inherit;
  transition:transform .18s ease, filter .18s ease; filter:saturate(.95) contrast(.98);
}
.nly-gallery .nly-thumb:hover .nly-thumb__img{ transform:scale(1.02); }

.nly-gallery .nly-thumb.is-active{
  background:#fff; transform:translateY(-2px) scale(1.03);
  box-shadow:0 10px 24px rgba(0,0,0,.15), 0 0 0 1px rgba(17,17,17,.05) inset;
}
.nly-gallery .nly-thumb.is-active .nly-thumb__img{
  transform:scale(1.04); filter:saturate(1.10) contrast(1.04);
}
.nly-gallery .nly-thumb:focus-visible{
  outline:none!important; box-shadow:0 0 0 4px rgba(17,17,17,.12)!important;
}

/* reduce motion */
@media (prefers-reduced-motion: reduce){
  .nly-gallery .nly-thumb, .nly-gallery .nly-thumb__img{ transition:none!important; }
}

/* ==== ARROWS — білі круглі з чорними символами ‹ › ==== */
.nly-stage__arrow::before, .nly-stage__arrow::after{ content:none!important; }
.nly-stage__arrow{
  position:absolute; top:50%; transform:translateY(-50%);
  width:48px; height:48px; line-height:48px; border-radius:999px;
  background:#fff!important; color:#111!important;
  font-size:24px!important; font-weight:700; text-align:center;
  border:0!important; box-shadow:0 2px 8px rgba(0,0,0,.12)!important;
  cursor:pointer; user-select:none; z-index:3; -webkit-tap-highlight-color:transparent;
  transition:transform .14s ease, box-shadow .14s ease, opacity .14s ease;
}
.nly-stage__arrow[data-dir="prev"]{ left:12px; }
.nly-stage__arrow[data-dir="next"]{ right:12px; }
.nly-stage__arrow:hover{ transform:translateY(-50%) scale(1.05); }
.nly-stage__arrow:active{ transform:translateY(-50%) scale(.96); }
.nly-stage__arrow:focus-visible{ outline:none!important; }

@media (max-width:768px){
  .nly-stage__arrow{ width:56px; height:56px; line-height:56px; font-size:26px!important;
    box-shadow:0 3px 10px rgba(0,0,0,.14)!important; }
  .nly-stage__arrow[data-dir="prev"]{ left:10px; }
  .nly-stage__arrow[data-dir="next"]{ right:10px; }
}
@media (min-width:1200px){
  .nly-stage__arrow{ width:44px; height:44px; line-height:44px; font-size:22px!important; }
}

/* ==== SINGLE-MODE (1 фото) ==== */
.nly-gallery--single{ gap:0; }
.nly-gallery--single .nly-stage__arrow{ display:none!important; }
.nly-gallery--single .nly-gallery__strip-wrap{ display:none!important; }

.nly-gallery__strip-wrap { 
  display: none !important; 
}