.product-photo-frame { position: relative; }
.product-photo-frame > .product-photo-open {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  cursor: zoom-in;
}
.product-photo-open:focus-visible { outline: 3px solid #16a36c; outline-offset: -4px; }
html.product-photo-opened { overflow: hidden; }
.product-photo-dialog {
  box-sizing: border-box;
  width: min(1100px, calc(100% - 24px));
  height: min(900px, calc(100dvh - 24px));
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 12px;
  border: 1px solid #b8bec4;
  border-radius: 8px;
  background: #fff;
  color: #171b1d;
}
.product-photo-dialog[open] { display: grid; grid-template-rows: 44px minmax(0, 1fr) 44px; gap: 8px; }
.product-photo-dialog::backdrop { background: rgb(0 0 0 / 78%); }
.product-photo-toolbar, .product-photo-navigation { display: flex; align-items: center; gap: 12px; }
.product-photo-toolbar { justify-content: space-between; }
.product-photo-navigation { justify-content: center; }
.product-photo-count { font-size: 14px; font-weight: 600; }
.product-photo-dialog button {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #747b80;
  border-radius: 6px;
  background: #f5f6f6;
  color: #171b1d;
  font: 26px/1 Arial, sans-serif;
  cursor: pointer;
}
.product-photo-dialog button[hidden] { display: none; }
.product-photo-dialog button:focus-visible { outline: 3px solid #07864f; outline-offset: 2px; }
.product-photo-dialog button:hover { background: #e3eee8; }
.product-photo-stage { min-width: 0; min-height: 0; }
.product-photo-stage img { display: block; width: 100%; height: 100%; object-fit: contain; }
.dark-theme .product-photo-dialog { background: #171b1d; color: #f6f7f7; border-color: #646c71; }
.dark-theme .product-photo-dialog button { background: #303637; color: #fff; }
.dark-theme .product-photo-dialog button:hover { background: #3c4942; }
