/* Preserve the existing verified product-detail and WebGL viewer contract. */
.product-dialog {
  width: min(760px, calc(100% - 32px)); max-height: min(90dvh, 850px);
  overflow-y: auto; padding: 32px; border: 1px solid #536d87;
  border-radius: 22px; background: linear-gradient(150deg,#172637,#0b121b 72%);
  color: #edf3fa; box-shadow: 0 30px 100px #02070da8;
}
.product-dialog::backdrop { background: #02070dcc; backdrop-filter: blur(18px) saturate(.7); -webkit-backdrop-filter: blur(18px) saturate(.7); }
.product-dialog h2 { margin: 9px 0 18px; font-size: clamp(26px, 4vw, 36px); line-height: 1.2; }
.product-dialog p { color: #d3d8dd; font-size: 16px; line-height: 1.7; }
.product-dialog .section-label { color: #8bb7d7; font-size: 12px; letter-spacing: .15em; }
.product-dialog .dialog-disclaimer { margin-top: 24px; padding-top: 20px; border-top: 1px solid #3a4650; color: #93a1ac; font-size: 13px; }
.product-dialog .dialog-close { position: sticky; top: 0; z-index: 3; float: right; width: 40px; height: 40px; margin: -8px -8px 0 8px; border: 1px solid #7793ab55; border-radius: 50%; background: #132232e6; color: #fff; font-size: 28px; cursor: pointer; }
.product-dialog .dialog-close:hover { background: #27435e; }
.product-dialog[data-view="preview"] { width: min(900px,calc(100% - 28px)); max-height: min(94dvh,870px); overflow: hidden; padding: 24px; }
.dialog-product-stage[hidden],.dialog-product-details[hidden],.dialog-details-back[hidden] { display: none; }
.dialog-product-stage { display: grid; gap: 16px; }
.dialog-product-media { position: relative; isolation: isolate; display: grid; place-items: center; width: 100%; height: min(58dvh,560px); min-height: 340px; padding: 0; border: 1px solid #91b6d43d; border-radius: 17px; background: radial-gradient(ellipse 64% 58% at 50% 50%,#30475e 0%,#1a2c3e 48%,#0b1521 100%); color: #edf7ff; overflow: hidden; cursor: pointer; perspective: 1000px; }
.dialog-product-media::before { content: ""; position: absolute; width: 74%; height: 72%; border-radius: 50%; background: #7aa2bf38; filter: blur(55px); pointer-events: none; }
.dialog-product-media::after { content: ""; position: absolute; width: 60%; height: 9%; bottom: 9%; border-radius: 50%; background: #020711b8; filter: blur(25px); pointer-events: none; }
.dialog-product-orbit { position: relative; z-index: 1; display: grid; place-items: center; width: min(88%,590px); height: 95%; transform-style: preserve-3d; }
.dialog-product-media.is-3d .dialog-product-orbit { visibility: hidden; }
.dialog-product-media .board3d-canvas { position: absolute; z-index: 2; inset: 0; display: block; width: 100%; height: 100%; cursor: grab; }
.dialog-product-media .board3d-canvas:active { cursor: grabbing; }
.dialog-product-media img { display: block; width: min(82%,460px); height: min(82%,460px); object-fit: contain; filter: drop-shadow(0 28px 18px #01060dbb) drop-shadow(0 1px 1px #c1dffa55); }
.dialog-product-media[data-orientation="clockwise"] img { transform: rotate(90deg); }
.dialog-stage-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.dialog-stage-footer p { margin: 0; color: #b9c9d7; font-size: 14px; }
.dialog-stage-next { flex: none; min-height: 45px; padding: 0 21px; border: 1px solid #b9d8f3; border-radius: 12px; background: #cae2f8; color: #122235; font-size: 14px; font-weight: 700; cursor: pointer; }
.dialog-stage-next:hover { background: #e1effb; }
.dialog-stage-next:active { transform: translateY(1px); }
.dialog-details-back { margin: 7px 0 14px; padding: 0 0 6px; border: 0; border-bottom: 1px solid #7899b4; background: transparent; color: #d5eafb; cursor: pointer; }
.dialog-product-details > p:first-of-type { margin-top: 0; }
.dialog-specs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 24px; }
.dialog-spec-group { min-width: 0; padding: 20px; border: 1px solid #384752; border-radius: 12px; background: linear-gradient(150deg,#1b2a35,#121d26); }
.dialog-spec-group h3 { margin: 0 0 16px; color: #e9f4fb; font-size: 17px; font-weight: 600; }
.dialog-spec-group dl { display: grid; grid-template-columns: minmax(90px,.7fr) minmax(0,1.3fr); gap: 10px 12px; margin: 0; font-size: 14px; line-height: 1.55; }
.dialog-spec-group dt { color: #8fa4b2; }
.dialog-spec-group dd { margin: 0; color: #e7edf2; overflow-wrap: anywhere; }
.dialog-spec-source { display: inline-block; margin-top: 19px; color: #80c7f6; font-size: 13px; text-underline-offset: 4px; }
.product-dialog .dialog-spec-caveat { grid-column: 1 / -1; margin: 3px 0 0; color: #b2c2cd; font-size: 13px; line-height: 1.6; }
@media (max-width: 700px) {
  .product-dialog { padding: 20px; }
  .product-dialog[data-view="preview"] { width: calc(100% - 18px); padding: 16px; max-height: 92dvh; }
  .dialog-product-media { height: min(52dvh,440px); min-height: 270px; }
  .dialog-product-orbit { width: 96%; }
  .dialog-product-media img { width: min(100%,340px); height: min(100%,340px); }
  .dialog-stage-footer { align-items: stretch; flex-direction: column; gap: 10px; }
  .dialog-stage-next { width: 100%; }
  .dialog-specs { grid-template-columns: 1fr; }
  .dialog-spec-group { padding: 17px; }
}
