.product-preview {
  margin: 2rem 0;
}

[data-open-product-preview] {
  cursor: zoom-in;
}

.product-preview:has(.preview-grid) {
  padding: clamp(1rem, 3vw, 2rem);
  background: #fff;
  border: 1px solid #dce8ef;
  border-radius: 1rem;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 110px), 1fr));
  gap: .6rem;
}

.preview-page {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: .4rem;
  border: 1px solid #d4e1ed;
  border-radius: .5rem;
  background: #f2f7fa;
  color: #142741;
  text-align: left;
  font: inherit;
  font-size: .82rem;
  line-height: 1.25;
  cursor: zoom-in;
}

.preview-page:hover {
  border-color: #375e81;
}

.preview-page img {
  width: 100%;
  height: auto;
  border-radius: .2rem;
}

.preview-dialog {
  width: min(960px, calc(100vw - 1rem));
  max-width: none;
  max-height: calc(100dvh - 1rem);
  padding: 0;
  border: 0;
  border-radius: .75rem;
  color: #fff;
  background: #12283c;
}

.preview-dialog::backdrop {
  background: #0b1728cc;
}

.preview-dialog-inner {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .4rem;
  padding: 2.8rem .6rem .75rem;
}

.preview-dialog figure {
  margin: 0;
  text-align: center;
}

.preview-dialog figure img {
  display: block;
  max-width: 100%;
  max-height: calc(100dvh - 11rem);
  width: auto;
  height: auto;
  margin: auto;
}

.preview-dialog figcaption {
  margin-top: .5rem;
}

#preview-print-note {
  margin: .35rem auto 0;
  max-width: 42rem;
  font-size: .875rem;
  line-height: 1.4;
}

.preview-dialog button {
  width: 2.45rem;
  height: 2.45rem;
  border: 1px solid #9cb6cb;
  border-radius: .4rem;
  background: #203e58;
  color: #fff;
  font: inherit;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.preview-dialog button:disabled {
  opacity: .38;
  cursor: default;
}

.preview-close {
  position: absolute;
  top: .45rem;
  right: .6rem;
}

.product-video video {
  display: block;
  max-width: 100%;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: .65rem;
  background: #12283c;
}
