.moto-3d, .moto-3d-dialog {
    --moto-3d-ground: #f0f2f4;
    --moto-3d-ink: #111820;
    --moto-3d-accent: #ff5a14;
    color: var(--moto-3d-ink);
}
.moto-3d { width: 100%; }
.moto-3d [hidden], .moto-3d-dialog [hidden] { display: none !important; }
html.moto-3d-open { overflow: hidden; scrollbar-gutter: auto; }
.moto-3d__button svg { width: 24px; height: 24px; flex-shrink: 0; }
.product_gallery .moto-3d-inline-slide { display: grid; position: relative; }
.moto-3d-inline-slide > a { grid-area: 1 / 1; }
.moto-3d-inline-slide > .moto-3d-inline {
    grid-area: 1 / 1 / 2 / 2;
    position: absolute; inset: 0;
    pointer-events: none;
}
.moto-3d-inline-ready > a { visibility: hidden; }
.moto-3d-inline-slide > .moto-3d-inline-hint {
    display: none; grid-row: 2; margin: 0; padding: 0 16px 10px;
    color: #38434f; font-size: 14px; line-height: 1.45; text-align: center;
}
.moto-3d-inline-ready > .moto-3d-inline-hint { display: block; }
.moto-3d-inline [hidden] { display: none !important; }
.moto-3d-inline .moto-3d__stage { position: absolute; inset: 0; }
.moto-3d-inline model-viewer { display: block; width: 100%; height: 100%; pointer-events: auto; cursor: grab; }
.moto-3d-inline model-viewer:active { cursor: grabbing; }
.moto-3d-inline model-viewer:focus-visible { outline: 2px solid #087bfa; outline-offset: -2px; }
.moto-3d-inline model-viewer.moto-3d__preparing { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.moto-3d-inline model-viewer::part(default-progress-bar), .moto-3d-inline .moto-3d__spinner { display: none; }
.moto-3d-inline .moto-3d__launch, .moto-3d-inline .moto-3d__toolbar {
    position: absolute; bottom: 8px; right: 12px; left: 12px;
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
    width: fit-content; max-width: min(420px, calc(100% - 24px)); margin-inline: auto;
    padding: 6px 12px; border-radius: 6px; background: #f5f7fa; color: #111820;
    font-size: 14px; line-height: 1.4;
}
.moto-3d-inline .moto-3d__quality { flex: auto; }
.moto-3d-inline .moto-3d__transfer { font-size: inherit; line-height: inherit; }
.moto-3d-inline .moto-3d__status, .moto-3d-inline .moto-3d__quality-note { margin: 0; color: inherit; font-size: inherit; }
.moto-3d-inline .moto-3d__upgrade-progress { margin-top: 4px; }
.moto-3d-inline progress {
    display: block; width: 100%; height: 4px; border: 0; border-radius: 3px;
    overflow: hidden; accent-color: #ff5a14;
}
.moto-3d-inline button {
    min-height: 44px; padding: 6px 10px; border: 0; border-radius: 6px;
    background: #111820; color: #fff; font: inherit; pointer-events: auto; cursor: pointer;
}
.moto-3d-inline-controls {
    position: absolute; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right));
    z-index: 3; display: flex; gap: 8px; visibility: hidden;
}
.moto-3d-inline-ready .moto-3d-inline-controls,
.moto-3d-inline:fullscreen .moto-3d-inline-controls,
.moto-3d-inline-fallback[open] .moto-3d-inline-controls { visibility: visible; }
.moto-3d-inline .moto-3d-inline-controls button { display: grid; place-items: center; width: 44px; padding: 0; }
.moto-3d-inline-controls svg {
    width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round;
}
.moto-3d-inline-controls button:hover { background: #29313a; }
.moto-3d-inline-controls button:focus-visible { outline: 2px solid #087bfa; outline-offset: 2px; }
.moto-3d-inline:fullscreen, .moto-3d-inline-fallback {
    position: fixed; inset: 0; width: 100vw; height: 100dvh;
    max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #fff;
}
.moto-3d-inline-fallback > .moto-3d-inline { position: absolute; inset: 0; }
html:has(.moto-3d-inline-fallback[open]) { overflow: hidden; }
.moto-3d-visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.moto-3d-marked { position: relative; }
.moto-3d-mark {
    position: absolute; z-index: 2; top: 5px; right: 5px;
    display: inline-flex; align-items: center; gap: 4px; padding: 3px 5px;
    border-radius: 4px; background: #111820; color: #fff;
    font-family: inherit; font-size: 11px; font-weight: 700; line-height: 1.2;
    white-space: nowrap; pointer-events: none;
}
.moto-3d-mark svg { display: block; width: 13px; height: 13px; flex-shrink: 0; color: #ff743b; }
.tactical-vehicle .moto-3d-mark { top: 6px; right: 6px; }
@media (max-width: 600px) {
    .moto-3d-mark { top: 3px; right: 3px; gap: 3px; padding: 2px 4px; font-size: 10px; }
    .moto-3d-mark svg { width: 11px; height: 11px; }
    .variable-item .moto-3d-mark svg { display: none; }
}
.moto-3d .moto-3d__entry { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px; background: #f0f2f4; }
.moto-3d .moto-3d__entry p { margin: 0; font-size: 16px; line-height: 1.5; }
.moto-3d .moto-3d__entry .moto-3d__entry-title { margin-bottom: 8px; font-size: 24px; font-weight: 700; line-height: 1.2; }
.moto-3d__button, .moto-3d__reset {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 48px; max-width: 100%; padding: 12px 20px; border: 0; border-radius: 6px;
    font: inherit; font-size: 16px; font-weight: 600; line-height: 1.4; cursor: pointer;
}
.moto-3d .moto-3d__button, .moto-3d-dialog .moto-3d__button { background: #ff5a14; color: #111820; }
.moto-3d-dialog .moto-3d__reset { background: #e8ebef; color: #111820; flex-shrink: 0; }
.moto-3d__button:hover, .moto-3d__reset:hover { filter: brightness(.94); }
.moto-3d__button:disabled, .moto-3d__reset:disabled { opacity: .45; cursor: wait; }
.moto-3d-dialog, .moto-3d-dialog * { box-sizing: border-box; }
.moto-3d-dialog {
    width: min(1240px, calc(100vw - 64px)); height: min(880px, calc(100dvh - 64px));
    max-width: none; max-height: calc(100dvh - 64px); margin: auto; padding: 0; border: 0;
    border-radius: 16px; overflow: hidden; background: #fff; color: #111820;
    box-shadow: 0 32px 100px rgba(0,0,0,.3); /* taste-skill-ignore: this is the actual floating dialog. */
}
.moto-3d-dialog::backdrop { background: rgba(8,14,21,.78); }
.moto-3d__shell:fullscreen { width: 100vw; height: 100dvh; background: #fff; }
.moto-3d__shell { display: grid; grid-template-areas: 'header' 'status' 'stage' 'controls'; grid-template-rows: auto auto minmax(0, 1fr) auto; height: 100%; min-height: 0; }
.moto-3d-dialog .moto-3d__header {
    grid-area: header;
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    padding: 20px 24px; margin: 0; background: #111820; color: #fff;
}
.moto-3d-dialog .moto-3d__header h2 { margin: 0; font: inherit; font-size: 28px; font-weight: 700; line-height: 1.15; color: #fff; }
.moto-3d__header-actions { display: flex; gap: 8px; flex-shrink: 0; }
.moto-3d__header-actions button {
    display: grid; place-items: center; width: 44px; height: 44px; padding: 10px;
    border: 0; border-radius: 6px; background: #29313a; color: #fff; cursor: pointer;
}
.moto-3d__header-actions button:hover { background: #46515e; }
.moto-3d__header-actions svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.moto-3d-dialog .moto-3d__toolbar { grid-area: status; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 12px 24px; background: #fff; }
.moto-3d__quality { flex: 1 1 260px; min-width: 0; max-width: 520px; }
.moto-3d__upgrade-progress { margin-top: 8px; }
.moto-3d__transfer { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; color: #38434f; font-size: 16px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.moto-3d__transfer [data-upgrade-percent] { flex-shrink: 0; color: #111820; font-weight: 700; }
.moto-3d-dialog .moto-3d__upgrade-progress progress { width: 100%; height: 6px; }
:is(.moto-3d-inline, .moto-3d-dialog) progress::-moz-progress-bar { background: #ff5a14; }
.moto-3d-dialog .moto-3d__quality-note { margin: 0; color: #38434f; font-size: 16px; line-height: 1.5; }
.moto-3d-dialog .moto-3d__upgrade-retry { min-height: 44px; padding: 10px 16px; border: 0; border-radius: 6px; background: #e8ebef; color: #111820; font: inherit; font-size: 16px; cursor: pointer; }
.moto-3d-dialog .moto-3d__stage { grid-area: stage; position: relative; min-width: 0; min-height: 0; width: 100%; height: 100%; overflow: hidden; background: #f0f2f4; }
.moto-3d-dialog model-viewer { display: block; position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; margin: 0; background: #f0f2f4; }
.moto-3d-dialog model-viewer.moto-3d__preparing { opacity: 0; pointer-events: none; }
.moto-3d-dialog model-viewer::part(default-progress-bar) { display: none; }
.moto-3d-dialog .moto-3d__launch { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 18px; padding: 24px; background: #f0f2f4; }
.moto-3d-dialog .moto-3d__status { margin: 0; padding: 0; color: #111820; font-size: 16px; line-height: 1.5; text-align: center; }
.moto-3d__spinner { width: 36px; height: 36px; border: 3px solid #d7dce2; border-top-color: #ff5a14; border-radius: 50%; animation: moto-3d-spin .85s linear infinite; }
.moto-3d-dialog progress { display: block; width: min(240px, 100%); height: 5px; border: 0; border-radius: 3px; overflow: hidden; accent-color: #ff5a14; }
:is(.moto-3d-inline, .moto-3d-dialog) progress::-webkit-progress-bar { background: #d7dce2; }
:is(.moto-3d-inline, .moto-3d-dialog) progress::-webkit-progress-value { background: #ff5a14; }
.moto-3d-dialog .moto-3d__controls { grid-area: controls; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 24px; background: #fff; }
.moto-3d-dialog .moto-3d__controls p { margin: 0; color: #38434f; font-size: 15px; line-height: 1.5; }
.moto-3d button:focus-visible, .moto-3d-dialog button:focus-visible, .moto-3d-dialog input:focus-visible, .moto-3d-dialog model-viewer:focus-visible { outline: 3px solid #ff5a14; outline-offset: 3px; }
@keyframes moto-3d-spin { to { transform: rotate(360deg); } }
@keyframes moto-3d-appear { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) { .moto-3d-dialog[open] { animation: moto-3d-appear .18s ease-out; } }
@media (max-width: 600px) {
    .moto-3d-inline .moto-3d__launch, .moto-3d-inline .moto-3d__toolbar {
        top: 8px; bottom: auto; left: 58px; right: 8px; max-width: calc(100% - 66px);
        padding-inline: 8px; font-size: 13px;
    }
    .moto-3d-inline .moto-3d__transfer { gap: 6px; }
    .moto-3d-inline .moto-3d__toolbar {
        top: auto; bottom: 8px; left: 12px; right: 12px; max-width: calc(100% - 24px);
    }
    .moto-3d .moto-3d__entry { flex-direction: column; align-items: stretch; padding: 20px; gap: 20px; }
    .moto-3d-dialog { width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
    .moto-3d-dialog .moto-3d__header { padding: 14px 16px; gap: 12px; }
    .moto-3d-dialog .moto-3d__header h2 { font-size: 22px; }
    .moto-3d-dialog .moto-3d__toolbar { padding: 12px 16px; gap: 10px; }
    .moto-3d-dialog .moto-3d__controls { padding: 12px 16px max(12px, env(safe-area-inset-bottom)); gap: 12px; }
    .moto-3d-dialog .moto-3d__controls p { font-size: 13px; }
    .moto-3d-dialog .moto-3d__reset { min-height: 44px; padding: 10px 12px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
    .moto-3d *, .moto-3d-dialog *, .moto-3d-dialog { animation: none !important; transition: none !important; }
}
