.image-zoom-scope {
  position: relative;
}

.image-hover-zoom-frame {
  overflow: hidden;
  isolation: isolate;
}

.image-hover-zoom-frame::after {
  content: "";
  position: absolute;
  inset: -35% auto -35% -55%;
  z-index: 6;
  width: 38%;
  transform: translateX(-120%) rotate(9deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.32), transparent);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.7s ease, opacity 0.25s ease;
}

.image-hover-zoom-frame > img.is-zoomable-image {
  transform: translateZ(0) scale(1);
  transform-origin: center center;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.45s ease;
  will-change: transform;
}

.image-hover-zoom-frame:hover > img.is-zoomable-image,
.image-hover-zoom-frame.is-hovering-image > img.is-zoomable-image {
  transform: translateZ(0) scale(1.065);
  filter: saturate(1.08) contrast(1.04) drop-shadow(0 20px 28px rgba(7, 17, 31, 0.18));
}

.image-hover-zoom-frame:hover::after,
.image-hover-zoom-frame.is-hovering-image::after {
  opacity: 1;
  transform: translateX(430%) rotate(9deg);
}

.image-zoom-trigger {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 8;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 14px;
  background: rgba(6, 16, 28, 0.78);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  cursor: zoom-in;
  opacity: 0;
  transform: translateY(-4px) scale(0.96);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.image-zoom-trigger i {
  pointer-events: none;
}

.image-zoom-scope:hover .image-zoom-trigger,
.image-zoom-trigger:focus-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.image-zoom-trigger:hover {
  background: #009688;
}

img.is-zoomable-image:not(a img) {
  cursor: zoom-in;
}

.image-zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  padding: 22px;
  background: rgba(5, 12, 22, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.image-zoom-overlay.is-open {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
}

.image-zoom-topbar,
.image-zoom-controls {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.image-zoom-title {
  min-width: 0;
  color: #fff;
  font-weight: 800;
  font-size: clamp(14px, 2vw, 18px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.image-zoom-actions,
.image-zoom-controls {
  justify-content: center;
}

.image-zoom-topbar .image-zoom-actions {
  display: flex;
  gap: 8px;
}

.image-zoom-btn {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.image-zoom-btn:hover {
  background: #009688;
  transform: translateY(-1px);
}

.image-zoom-stage {
  width: min(1120px, 100%);
  min-height: 0;
  margin: 0 auto;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 30px 90px rgba(0, 0, 0, 0.34);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}

.image-zoom-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: center center;
  transition: transform 0.12s ease;
  will-change: transform;
}

.image-zoom-image.is-dragging {
  cursor: grabbing;
  transition: none;
}

.image-zoom-counter {
  color: rgba(255, 255, 255, 0.75);
  font-weight: 800;
  min-width: 80px;
  text-align: center;
}

body.image-zoom-locked {
  overflow: hidden;
}

@media (max-width: 720px) {
  .image-zoom-trigger {
    opacity: 1;
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .image-zoom-overlay {
    padding: 12px;
  }

  .image-zoom-stage {
    border-radius: 16px;
  }

  .image-zoom-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }
}
