/* Tosa Tool — 3D plate configurator demo.
   The live page, unchanged; the product image is now a live 3D model. */

:root {
  --tosa-line: #e6e8eb;
  --tosa-faint: #9aa2ab;
}

/* two product columns, same proportions as the theme */
.product.tosa-product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 48px;
  align-items: start;
  overflow: visible;
}

.tosa-product > .avada-single-product-gallery-wrapper,
.tosa-product > .summary.entry-summary {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
}

.tosa-product > .avada-single-product-gallery-wrapper {
  align-self: stretch;
  overflow: visible !important;
}

.tosa-product .tosa-stage {
  position: sticky;
  top: 24px;
}

.tosa-product > .woocommerce-tabs,
.tosa-product > .up-sells,
.tosa-product > .related,
.tosa-product > .social-share,
.tosa-product > .fusion-clearfix {
  grid-column: 1 / -1;
}

@media (max-width: 1024px) {
  .product.tosa-product { grid-template-columns: 1fr; }
  .tosa-product .tosa-stage { position: static; }
  .tosa-product > .summary.entry-summary { margin-top: 26px !important; }
}

/* the 3D "product image" */
.tosa-stage {
  position: relative;
  width: 100%;
  height: clamp(320px, 38vw, 530px);
  border: 0;
  border-radius: 0;
  background: #fff;
  overflow: hidden;
  cursor: grab;
}
.tosa-stage:active { cursor: grabbing; }
.tosa-stage canvas { display: block; width: 100%; height: 100%; }

@media (max-width: 1024px) { .tosa-stage { height: 420px; } }
@media (max-width: 640px) { .tosa-stage { height: 330px; } }

.tosa-stage__hint,
.tosa-stage__stats {
  position: absolute;
  bottom: 11px;
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--tosa-faint);
  pointer-events: none;
}
.tosa-stage__hint { left: 13px; }
.tosa-stage__stats { right: 13px; font-variant-numeric: tabular-nums; }
.tosa-stage__stats b { color: #7b838c; font-weight: 700; }

.tosa-stage__busy {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(246, 248, 250, .45);
  color: var(--tosa-faint);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.tosa-stage.is-busy .tosa-stage__busy { display: grid; }

@media (max-width: 640px) {
  .tosa-stage__hint { display: none; }
  .tosa-stage__stats { left: 13px; right: auto; }
}

/* the builder's own "Total" field reads a little better when populated */
#ezfc_element-158-child { font-weight: 700; color: #333; }
