.image-viewer-trigger:not(.grid-price-trigger) {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
}

.pb-box-visual .image-viewer-trigger:not(.grid-price-trigger) {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.image-viewer-trigger:focus-visible,
.image-viewer-toolbar button:focus-visible,
.image-viewer-viewport:focus-visible {
  outline: 2px solid #d4af62;
  outline-offset: 3px;
}

html:has(.image-viewer[open]) {
  overflow: hidden;
}

.image-viewer-trigger {
  cursor: zoom-in;
  touch-action: manipulation;
}

.image-viewer {
  box-sizing: border-box;
  width: min(1440px, calc(100% - 24px));
  height: calc(100dvh - 24px);
  max-width: none;
  max-height: none;
  padding: 8px;
  overflow: hidden;
  border: 1px solid #354c60;
  border-radius: 12px;
  background: #0c1b2a;
  color: #e7edf1;
}

.image-viewer[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}

.image-viewer::backdrop {
  background: rgba(3, 13, 23, .82);
}

.image-viewer-toolbar {
  display: flex;
  gap: 6px;
}

.image-viewer-toolbar button {
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid #4b6276;
  border-radius: 6px;
  background: #172b3d;
  color: #fff;
}

.image-viewer-toolbar button:disabled {
  opacity: .45;
  cursor: default;
}

.image-viewer-toolbar [data-viewer-close] {
  margin-inline-start: auto;
  font-size: 1.5rem;
}

.image-viewer-viewport {
  overflow: auto;
  overflow-anchor: none;
  overscroll-behavior: contain;
  touch-action: none;
  min-width: 0;
  min-height: 0;
}

.image-viewer-viewport.is-zoomed {
  cursor: grab;
}

.image-viewer-viewport.is-zoomed:active {
  cursor: grabbing;
}

.image-viewer-canvas {
  display: grid;
  place-items: center;
  width: max-content;
  height: max-content;
  min-width: 100%;
  min-height: 100%;
}

.image-viewer-canvas img {
  display: block;
  height: auto;
  max-width: none;
  user-select: none;
}

.image-viewer-canvas [hidden] {
  display: none;
}
