/* Preserve the existing full-width presentation when a theme offsets its product
   column for a sidebar. Only wrappers measured by viewport-alignment.js opt in. */
body.single-product.destinxpc-has-configurator .destinxpc-wrap--pixart.cc-pro-viewport-aligned,
body.destinxpc-shortcode-page .destinxpc-shortcode-shell--full.cc-pro-viewport-aligned {
  width: var(--cc-pro-viewport-width) !important;
  max-width: var(--cc-pro-viewport-width) !important;
  margin-left: calc(50% - 50vw + var(--cc-pro-viewport-shift)) !important;
}
body.single-product.destinxpc-has-configurator .destinxpc-wrap--pixart.cc-pro-viewport-aligned.cc-pro-viewport-rtl,
body.destinxpc-shortcode-page .destinxpc-shortcode-shell--full.cc-pro-viewport-aligned.cc-pro-viewport-rtl {
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw - var(--cc-pro-viewport-shift)) !important;
}

/* Studio replaces the core presentation modifier. Retain its float clearance
   so native WooCommerce gallery/summary columns cannot collapse the 3D grid. */
body.single-product section.destinxpc-wrap.cc3d-studio {
  clear: both;
}

/* The core can stack columns because the container is narrow even on a wide
   screen. Stepper must use its existing stacked sizing in that context too. */
section.destinxpc-wrap.cc3d-studio.cc3d-layout-stepper.is-container-narrow .destinxpc-row {
  height: auto;
  min-height: 0;
  grid-template-rows: none;
}
section.destinxpc-wrap.cc3d-studio.cc3d-layout-stepper.is-container-narrow > .destinxpc-container {
  display: block;
  height: auto;
}
section.destinxpc-wrap.cc3d-studio.cc3d-layout-stepper.is-container-narrow .cc3d-host {
  height: 42svh;
  min-height: 280px;
}
section.destinxpc-wrap.cc3d-studio.cc3d-layout-stepper.is-container-narrow .cc3d {
  height: 100%;
  min-height: 0;
}
section.destinxpc-wrap.cc3d-studio.cc3d-layout-stepper.is-container-narrow .cc3d-studio__panel {
  height: auto;
  overflow: visible;
}

/* Keep the original light-viewer palette readable when Studio uses a light
   model background. The purchase panel and the selected background stay intact. */
section.destinxpc-wrap.cc3d-studio .cc3d[data-light-surface="true"] .cc3d__header,
section.destinxpc-wrap.cc3d-studio .cc3d[data-light-surface="true"] .cc3d__status {
  color: #263730;
}
section.destinxpc-wrap.cc3d-studio .cc3d[data-light-surface="true"] .cc3d__button {
  color: #263730;
  background: #fff;
  border-color: #b6c5b9;
}
section.destinxpc-wrap.cc3d-studio .cc3d[data-light-surface="true"] .cc3d__button:hover,
section.destinxpc-wrap.cc3d-studio .cc3d[data-light-surface="true"] .cc3d__button[aria-pressed="true"] {
  color: #fff;
  background: #263f30;
}
section.destinxpc-wrap.cc3d-studio:not(.cc3d-template):has(.cc3d[data-light-surface="true"]) .cc3d-studio__back {
  color: #263730;
}
