/* Product image viewer: hover zoom + fullscreen lightbox
   (assets/js/modules/product-image-viewer.js). */

/* Hover zoom (desktop) */
.ebv-zoomable .embla__slide { cursor: zoom-in; overflow: hidden; }
.ebv-zoomable .embla__slide img { transition: transform .2s ease-out; will-change: transform; }

/* Tap target hint when only the lightbox is on */
.ebv-has-lightbox:not(.ebv-zoomable) .embla__slide { cursor: zoom-in; }

/* Expand button (top-end corner of the gallery frame) */
.ecombridge-gallery-expand {
  position: absolute; top: .75rem; inset-inline-end: .75rem; z-index: 10;
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem; border-radius: 9999px;
  border: 1px solid hsl(var(--border)); background: hsl(var(--card) / .9);
  color: hsl(var(--foreground)); box-shadow: 0 1px 3px rgb(0 0 0 / .12);
  cursor: pointer; transition: background-color .15s, color .15s;
}
.ecombridge-gallery-expand:hover { background: hsl(var(--card)); color: hsl(var(--primary)); }

/* Lightbox */
.ebv-lock, .ebv-lock body { overflow: hidden; }
.ebv-overlay {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  background: rgb(10 10 10 / .92);
  animation: ebv-fade .18s ease-out;
}
.ebv-overlay[hidden] { display: none; }
.ebv-stage {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  padding: 3.5rem 1rem;
}
.ebv-image {
  max-width: 100%; max-height: 100%; object-fit: contain;
  user-select: none; -webkit-user-drag: none;
  border-radius: .5rem; background: #fff;
}
.ebv-btn {
  position: absolute; display: inline-flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem; border-radius: 9999px; border: 0;
  background: rgb(255 255 255 / .12); color: #fff; cursor: pointer;
  transition: background-color .15s;
}
.ebv-btn:hover, .ebv-btn:focus-visible { background: rgb(255 255 255 / .25); outline: none; }
.ebv-btn[hidden] { display: none; }
.ebv-close { top: .75rem; inset-inline-end: .75rem; }
.ebv-prev { top: 50%; transform: translateY(-50%); inset-inline-start: .75rem; }
.ebv-next { top: 50%; transform: translateY(-50%); inset-inline-end: .75rem; }
[dir="rtl"] .ebv-prev svg, [dir="rtl"] .ebv-next svg { transform: scaleX(-1); }
.ebv-counter {
  position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%);
  padding: .25rem .75rem; border-radius: 9999px;
  background: rgb(255 255 255 / .12); color: #fff;
  font-size: .8125rem; font-weight: 700; direction: ltr;
}
.ebv-counter[hidden] { display: none; }
@media (min-width: 768px) {
  .ebv-stage { padding: 4rem 5rem; }
  .ebv-prev { inset-inline-start: 1.5rem; }
  .ebv-next { inset-inline-end: 1.5rem; }
}
@keyframes ebv-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .ebv-overlay { animation: none; }
  .ebv-zoomable .embla__slide img { transition: none; }
}
