.product-photo-window { overflow: hidden; isolation: isolate; }
.product-photo-window .nav-btn { z-index: 2; min-width: 44px; min-height: 44px; touch-action: manipulation; }
.product-photo-window .nav-btn > i, .product-photo-window .nav-btn > span { display: none; }
.product-photo-window .nav-btn::before { content: ""; display: inline-block; width: 10px; height: 10px; border: solid #455467; border-width: 0 2px 2px 0; }
.product-photo-window .nav-btn.left-2::before { transform: translateX(2px) rotate(135deg); }
.product-photo-window .nav-btn.right-2::before { transform: translateX(-2px) rotate(-45deg); }
.product-photo-window > img { user-select: none; -webkit-user-drag: none; }
.product-media-trigger { cursor: zoom-in; touch-action: pan-y pinch-zoom; }
.product-media-trigger:focus-visible { outline: 2px solid #1766bb; outline-offset: -2px; }
.product-photo-window #drive-full[hidden], .product-media-lens[hidden], .product-media-pane[hidden], .product-media-dialog:not([open]) { display: none !important; }
.product-photo-window[aria-busy="true"]::after {
  content: ""; position: absolute; z-index: 1; left: 12%; right: 12%; bottom: 2px; height: 2px;
  background: #1c71bd; pointer-events: none; animation: gallery-wait .16s ease-in both;
}
@keyframes gallery-wait { from { opacity: 0; } to { opacity: .75; } }
.product-media-lens {
  position: absolute; z-index: 1; pointer-events: none; box-sizing: border-box;
  border: 1px solid rgba(31,72,117,.48); background: rgba(147,185,216,.22);
}
.product-media-pane {
  position: fixed; z-index: 80; overflow: hidden; pointer-events: none;
  background: white; border: 1px solid #cbd3dc; box-shadow: 0 3px 13px rgba(17,37,61,.16);
}
.product-media-pane img { position: absolute; max-width: none; max-height: none; top: 0; left: 0; object-fit: contain; }
html.product-media-open { overflow: hidden; }
.product-media-dialog {
  width: min(1200px,94vw); height: min(820px,92vh); max-width: none; max-height: none;
  margin: auto; padding: 0; border: 0; border-radius: 8px; color: #17202a; background: white;
  box-shadow: 0 10px 45px rgba(14,23,34,.22); overflow: hidden;
}
.product-media-dialog[open] { display: grid; grid-template-rows: 56px minmax(0,1fr); }
.product-media-dialog::backdrop { background: rgba(10,16,23,.62); }
.product-media-topbar { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 6px 20px; border-bottom: 1px solid #e1e5e9; }
.product-media-dialog button { font: inherit; color: inherit; cursor: pointer; }
.product-media-dialog button:focus-visible { outline: 3px solid #1766bb; outline-offset: 2px; }
.product-media-close,.product-media-scale { background: white; border: 1px solid #bac3cc; border-radius: 6px; padding: 6px 14px; min-height: 40px; }
.product-media-count { color: #485363; font-variant-numeric: tabular-nums; }
.product-media-body { display: grid; grid-template-columns: minmax(0,1fr) minmax(175px,230px); min-height: 0; }
.product-media-stage { position: relative; isolation: isolate; display: grid; place-items: center; overflow: hidden; min-width: 0; min-height: 0; background: white; }
.product-media-original { width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; touch-action: none; cursor: zoom-in; user-select: none; -webkit-user-drag: none; }
.product-media-original.enlarged { cursor: grab; }
.product-media-original.enlarged:active { cursor: grabbing; }
.product-media-step { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; padding: 0; border: 1px solid #cbd2d9; border-radius: 50%; background: rgba(255,255,255,.94); font: 30px/1 Arial,sans-serif!important; z-index: 1; }
.product-media-step.previous { left: 7px; }
.product-media-step.next { right: 7px; }
.product-media-sidebar { border-left: 1px solid #e1e5e9; padding: 16px; overflow: auto; }
.product-media-title { margin: 0 0 12px; font-weight: 600; line-height: 1.4; }
.product-media-thumbnails { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.product-media-thumbnails button { flex: 0 0 52px; height: 52px; padding: 3px; border: 1px solid #c6ccd2; border-radius: 5px; background: white; }
.product-media-thumbnails button[aria-pressed="true"] { outline: 2px solid #1766bb; outline-offset: -2px; }
.product-media-thumbnails img { width: 100%; height: 100%; object-fit: contain; }
.product-media-scale:disabled { opacity: .45; cursor: default; }
@media (max-width: 720px) {
  .product-media-dialog { width: 100vw; height: 100vh; height: 100dvh; border-radius: 0; }
  .product-media-dialog[open] { grid-template-rows: calc(52px + env(safe-area-inset-top)) minmax(0,1fr); }
  .product-media-topbar { padding: calc(5px + env(safe-area-inset-top)) 12px 5px; }
  .product-media-body { grid-template-columns: 1fr; grid-template-rows: minmax(0,1fr) auto; }
  .product-media-sidebar { border-left: 0; border-top: 1px solid #e1e5e9; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); }
  .product-media-title { margin-bottom: 7px; font-size: .86rem; }
  .product-media-thumbnails { flex-wrap: nowrap; overflow-x: auto; margin: 0; padding: 2px; }
  .product-media-scale { margin-top: 7px; }
}
