.product-sheet-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.58);z-index:20000}
.product-sheet{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);width:min(92vw,720px);height:76dvh;z-index:20001;background:#fff;border-radius:28px;overflow:hidden;transition:width .25s ease,height .25s ease,border-radius .25s ease;box-shadow:0 12px 40px #0004}
.product-sheet.expanded{width:100vw;height:100dvh;border-radius:0}
.product-sheet[hidden]{display:none!important}
.product-sheet-header{position:absolute;z-index:2;top:max(8px,env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));touch-action:pan-y}
.product-sheet iframe{display:block;width:100%;height:100%;border:0}
.product-sheet .product-sheet-header button.product-sheet-close{position:static!important;z-index:2;display:flex!important;align-items:center!important;justify-content:center!important;flex:0 0 40px!important;width:40px!important;min-width:40px!important;max-width:40px!important;height:40px!important;min-height:40px!important;max-height:40px!important;margin:0!important;padding:0!important;border:0!important;border-radius:50%!important;color:#222!important;background:#f4f4f4!important;box-shadow:none!important;line-height:1!important;opacity:1!important;transform:none!important;appearance:none!important}
.product-sheet .product-sheet-header button.product-sheet-close svg{display:block!important;flex:none!important;width:22px!important;height:22px!important}
body:has(.product-sheet) .back-to-top{display:none!important}
.product-sheet-status{position:absolute;z-index:1;inset:0;display:grid;place-items:center;background:#fff}

.product-image-viewer[open] {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  background: var(--theme-surface, #fff);
  color: var(--theme-text, #222);
  overflow: hidden;
}
.product-image-toolbar { display: flex; align-items: center; justify-content: space-between; }
.product-image-count { padding-inline: 12px; color: var(--theme-text-muted, #61656e); font-variant-numeric: tabular-nums; }
.product-image-stage { position: relative; display: grid; place-items: center; touch-action: pan-y pinch-zoom; }
.product-image-current { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; user-select: none; }
.product-image-viewer button {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--theme-border, #dfe2e8);
  background: var(--theme-surface-elevated, #fff);
  color: inherit;
  cursor: pointer;
}
.product-image-toolbar button, .product-image-stage button { border-radius: 50%; }
.product-image-stage button { position: absolute; z-index: 1; top: 50%; transform: translateY(-50%); }
.product-image-prev { left: 0; }
.product-image-next { right: 0; }
.product-image-viewer button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.product-image-photos { display: flex; max-width: 100%; min-width: 0; width: max-content; justify-self: center; gap: 8px; padding: 8px 4px 4px; overflow: auto; }
.product-image-photos button { width: 54px; height: 54px; padding: 4px; border-radius: 12px; }
.product-image-photos img { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; }
.product-image-photos button[aria-current="true"] { box-shadow: inset 0 0 0 2px var(--theme-primary, #4350f1); }
.product-image-viewer button:focus-visible { outline: 2px solid var(--theme-primary, #4350f1); outline-offset: 2px; }
.product-image-viewer [hidden] { display: none !important; }
@media(prefers-reduced-motion:reduce){.product-sheet{transition:none}}
