/* ==========================================================
   viewer-3d.css — Guided Step-by-Step 3D Spec Studio + Unified Hub
   PD. Beton Karya Persada — v20261127
   Menggunakan tokens.css (Calibrated Brochure Brand Color System):
   Deep Industrial Navy (var(--brand-primary)), Industrial Orange (var(--brand-accent)),
   Clean Canvas & Concrete Slate (var(--surface-canvas) / var(--surface-alt)),
   WA CTA (var(--wa-bg) / var(--wa-bg-hover)).
   ========================================================== */

/* ----- Unified 3-Product Catalog Hub ([data-bkp-hub]) ----- */
.bkp3d-hub {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
}

.bkp3d-hub-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.bkp3d-hub-tab {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 10px 14px;
  border-radius: var(--radius-lg, 16px);
  border: 1px solid var(--p-navy-100);
  background: var(--p-white);
  color: var(--brand-primary);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.bkp3d-hub-tab > picture {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  display: block;
}
.bkp3d-hub-thumb {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
  border: 1px solid rgba(var(--p-navy-rgb), 0.14);
}
.bkp3d-hub-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.bkp3d-hub-badge {
  align-self: flex-start;
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand-navy-soft);
  color: var(--brand-primary);
  font-size: var(--text-xs); /* floor 12px (P1-07) */
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.02em;
}
.bkp3d-hub-tab-title {
  font-family: var(--heading-font, "Plus Jakarta Sans", sans-serif);
  font-weight: 700;
  font-size: 15.5px;
  line-height: 1.25;
}
.bkp3d-hub-tab-sub {
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bkp3d-hub-tab:hover {
  background: var(--surface-alt);
  border-color: var(--p-slate-300);
}
.bkp3d-hub-tab.is-active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: var(--p-white);
  box-shadow: 0 10px 24px rgba(var(--p-navy-rgb), 0.24);
}
.bkp3d-hub-tab.is-active .bkp3d-hub-badge {
  background: rgba(var(--p-white-rgb), 0.16);
  color: var(--p-white);
}
.bkp3d-hub-tab.is-active .bkp3d-hub-tab-title {
  color: var(--p-white);
}
.bkp3d-hub-tab.is-active .bkp3d-hub-tab-sub {
  color: rgba(var(--p-white-rgb), 0.78);
}
.bkp3d-hub-tab.is-active .bkp3d-hub-thumb {
  border-color: rgba(var(--p-white-rgb), 0.4);
}
.bkp3d-hub-tab:focus-visible {
  outline: 3px solid var(--brand-accent);
  outline-offset: 2px;
}

.bkp3d-hub-dots {
  display: none;
}

@media (max-width: 767px) {
  .bkp3d-hub-tabs {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 10px;
    padding: 2px 2px 4px;
    max-width: 100%;
  }
  .bkp3d-hub-tabs::-webkit-scrollbar {
    display: none;
  }
  .bkp3d-hub-tab {
    flex: 0 0 78%;
    scroll-snap-align: start;
    min-height: 68px;
    padding: 9px 12px;
  }
  .bkp3d-hub-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: -4px;
  }
  .bkp3d-hub-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--p-navy-100);
    cursor: pointer;
    transition: width 0.18s ease, background 0.18s ease;
  }
  .bkp3d-hub-dot.is-active {
    width: 22px;
    background: var(--brand-primary);
  }
}

/* ----- Shell 2-Kolom Guided Spec Studio ----- */
.bkp3d-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(360px, 1fr);
  align-items: stretch;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border-radius: var(--radius-xl, 20px);
  overflow: hidden;
  background: var(--surface-canvas);
  color: var(--text-body);
  border: 1px solid var(--border-subtle);
  box-sizing: border-box;
  box-shadow: 0 12px 32px rgba(var(--p-navy-rgb), 0.06);
}
@media (max-width: 991px) {
  .bkp3d-shell {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ----- Stage Kiri (Stage Bar + Viewport 3D / Blueprint 2D + Fallback) ----- */
.cs_studio_section {
  padding: 22px 0 44px;
}
.cs_studio_section .cs_section_title {
  font-size: 28px;
  line-height: 1.22;
  margin-bottom: 4px;
}

.bkp3d-stage {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse at 50% 42%, var(--p-slate-50) 0%, var(--p-slate-100) 64%, var(--p-slate-200) 100%);
}

.bkp3d-stage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: var(--p-slate-100);
  border-bottom: 1px solid var(--p-slate-200);
  min-height: 54px;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.bkp3d-shell[data-view-mode="2d"] .bkp3d-stage-bar {
  background: var(--p-slate-50);
  border-bottom: 1px solid var(--p-slate-200);
}

.bkp3d-view-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, auto));
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: var(--p-slate-100);
  border: 1px solid var(--p-slate-200);
}
.bkp3d-shell[data-view-mode="2d"] .bkp3d-view-switch {
  background: var(--p-slate-100);
  border: 1px solid var(--p-slate-200);
}

.bkp3d-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--p-slate-700);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.bkp3d-view-btn:not(.is-active):hover:not(:disabled) {
  background: rgba(var(--p-white-rgb), 0.58);
  color: var(--p-navy-950);
}
.bkp3d-view-btn.is-active,
.bkp3d-view-btn.is-active:hover {
  background: var(--p-white);
  color: var(--p-navy-950);
  box-shadow: 0 1px 5px rgba(var(--p-navy-rgb), 0.12);
}
.bkp3d-shell[data-view-mode="2d"] .bkp3d-view-btn {
  color: var(--p-slate-700);
}
.bkp3d-shell[data-view-mode="2d"] .bkp3d-view-btn:not(.is-active):hover:not(:disabled) {
  background: rgba(var(--p-white-rgb), 0.58);
  color: var(--p-navy-950);
}
.bkp3d-shell[data-view-mode="2d"] .bkp3d-view-btn.is-active,
.bkp3d-shell[data-view-mode="2d"] .bkp3d-view-btn.is-active:hover {
  background: var(--p-white);
  color: var(--p-navy-950);
  box-shadow: 0 1px 5px rgba(var(--p-navy-rgb), 0.12);
}
.bkp3d-view-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.bkp3d-stage-actions {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  flex: 0 0 auto;
}
.bkp3d-stage-actions[hidden] {
  display: none;
}

.bkp3d-viewport {
  position: relative;
  flex: 1 1 auto;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse at 50% 42%, var(--p-slate-50) 0%, var(--p-slate-100) 64%, var(--p-slate-200) 100%);
}

.bkp3d-canvas-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 520px;
  height: 100%;
  flex: 1 1 auto;
  background: radial-gradient(ellipse at 50% 42%, var(--p-slate-50) 0%, var(--p-slate-100) 64%, var(--p-slate-200) 100%);
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.28s ease;
}
.bkp3d-shell.is-webgl-ready .bkp3d-canvas-wrap:not(.is-hidden-layer) {
  opacity: 1;
}
.bkp3d-canvas-wrap.is-hidden-layer {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  inset: 0;
  pointer-events: none;
}

@media (max-width: 991px) {
  .bkp3d-viewport {
    min-height: 300px;
  }
  .bkp3d-canvas-wrap {
    aspect-ratio: 4 / 3;
    min-height: 300px;
    max-height: 400px;
    height: auto;
  }
}

.bkp3d-blueprint-wrap {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px 14px;
  background-color: var(--p-slate-50);
  background-image: radial-gradient(var(--p-slate-200) 1px, transparent 1px);
  background-size: 16px 16px;
}
.bkp3d-blueprint-wrap[hidden] {
  display: none;
}
.bkp3d-bp-canvas {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: 0;
}
.bkp3d-bp-canvas svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 500px;
}
.bkp3d-bp-canvas [data-bp-explode-layer] {
  transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}
.bkp3d-bp-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  padding-top: 10px;
  border-top: 1px dashed var(--p-slate-200);
  font-size: var(--text-xs); /* floor 12px (P1-07) */
  color: var(--p-slate-600);
}
.bkp3d-bp-legend[hidden] {
  display: none;
}
.bkp3d-bp-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.bkp3d-bp-swatch {
  width: 14px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}
.bkp3d-bp-swatch--concrete { background: var(--p-slate-300); border: 1px solid var(--p-slate-600); }
.bkp3d-bp-swatch--rebar { background: var(--p-rebar-600); }
.bkp3d-bp-swatch--cavity { background: var(--p-slate-50); border: 1px dashed var(--p-slate-700); }

.bkp3d-canvas-wrap canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  /* Anti-scroll-trap mobile: default halaman tetap bisa di-scroll melewati kanvas */
  pointer-events: none;
  touch-action: pan-y;
}
.bkp3d-shell.is-interactive .bkp3d-canvas-wrap canvas,
.bkp3d-shell.is-interactive canvas {
  pointer-events: auto;
  touch-action: none;
}

/* ----- Fallback SVG sampai WebGL siap ----- */
.bkp3d-fallback {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: radial-gradient(circle at 48% 46%, var(--p-slate-50) 0%, var(--p-slate-100) 68%, var(--p-slate-200) 100%);
  transition: opacity 0.28s ease;
}
.bkp3d-fallback svg {
  width: 100%;
  height: 100%;
  max-height: 360px;
  display: block;
}
.bkp3d-fallback .cs_gallery_meta,
.bkp3d-fallback p {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--p-slate-600);
  margin: 8px 0 0;
  text-align: center;
}
.bkp3d-boot-spinner {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border-radius: 50%;
  border: 2px solid rgba(var(--p-navy-rgb), 0.2);
  border-top-color: var(--brand-primary);
  animation: bkp3d-spin 0.75s linear infinite;
}
html:not(.js) .bkp3d-boot-spinner,
.bkp3d-shell.is-webgl-ready .bkp3d-boot-spinner,
.bkp3d-shell.is-studio-ready .bkp3d-boot-spinner {
  display: none;
}
@keyframes bkp3d-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .bkp3d-boot-spinner { animation: none; }
}
.bkp3d-fallback a {
  color: var(--p-navy-950);
  text-decoration: underline;
}
.bkp3d-shell.is-webgl-ready .bkp3d-fallback {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.bkp3d-topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  box-sizing: border-box;
  pointer-events: none;
}

.bkp3d-reset-btn,
.bkp3d-zoom-btn,
.bkp3d-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 36px;
  padding: 5px 12px;
  border: 1px solid var(--p-slate-200);
  border-radius: 999px;
  background: rgba(var(--p-white-rgb), 0.88);
  color: var(--p-navy-950);
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.bkp3d-zoom-btn {
  min-width: 34px;
  min-height: 34px;
  padding: 0 10px;
  font-size: 15px;
}
.bkp3d-shell[data-view-mode="2d"] .bkp3d-zoom-btn,
.bkp3d-shell[data-view-mode="2d"] .bkp3d-reset-btn {
  display: none;
}
.bkp3d-reset-btn:hover,
.bkp3d-zoom-btn:hover,
.bkp3d-pill:hover {
  background: var(--p-white);
  border-color: var(--p-slate-500);
  color: var(--p-navy-950);
}
.bkp3d-pill.is-active {
  background: var(--p-navy-950);
  border-color: var(--p-navy-950);
  color: var(--p-slate-50);
}

.bkp3d-hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  pointer-events: none;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(var(--p-navy-rgb), 0.82);
  border: 1px solid rgba(var(--p-white-rgb), 0.16);
  color: var(--p-slate-50);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  transition: opacity 0.25s ease;
}
.bkp3d-hint.is-hidden {
  opacity: 0;
}

/* ----- Callout dimensi Light Technical Tag & leader line SVG ----- */
.bkp3d-callouts {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}
.bkp3d-callout-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.bkp3d-callout {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  pointer-events: none;
  background: rgba(var(--p-white-rgb), 0.95);
  color: var(--p-navy-950);
  border: 1px solid var(--p-slate-500);
  border-radius: 8px;
  padding: 3px 8px;
  font-size: var(--text-xs); /* floor 12px (P1-07) */
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 8px rgba(var(--p-navy-rgb), 0.12);
}
@media (max-width: 639px) {
  .bkp3d-callout {
    font-size: var(--text-xs); /* floor 12px (P1-07) */
    padding: 2px 6px;
    border-radius: 6px;
    max-width: 162px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* ----- Panel Kanan Guided Step-by-Step ----- */
.bkp3d-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface-canvas);
  border-left: 1px solid var(--border-subtle);
  box-sizing: border-box;
}
@media (max-width: 991px) {
  .bkp3d-panel {
    border-left: 0;
    border-top: 1px solid var(--border-subtle);
  }
}

.bkp3d-panel-static {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}
.bkp3d-shell.is-studio-ready .bkp3d-panel-static {
  display: none;
}
.bkp3d-panel-dynamic {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  opacity: 0;
  transition: opacity 0.24s ease;
}
.bkp3d-shell.is-studio-ready .bkp3d-panel-dynamic {
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .bkp3d-canvas-wrap,
  .bkp3d-fallback,
  .bkp3d-panel-dynamic {
    transition: none;
  }
}

/* Soft 3-Tab Segmented Stepper (1 baris 3 kolom desktop & mobile) */
.bkp3d-stepper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  margin: 12px 16px 0;
  border-radius: 14px;
  background: var(--surface-alt);
  border: 1px solid var(--border-subtle);
}
.bkp3d-stepper[data-steps="1"] {
  grid-template-columns: minmax(0, 1fr);
}
@media (max-width: 479px) {
  .bkp3d-stepper {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 10px 12px 0;
    padding: 6px;
    gap: 4px;
  }
}

.bkp3d-step-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 5px 8px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-body);
  font: inherit;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  text-align: center;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.bkp3d-step-tab:hover {
  background: rgba(var(--p-white-rgb), 0.6);
  color: var(--p-navy-950);
}
.bkp3d-step-tab.is-active {
  background: var(--p-white);
  border-color: var(--p-navy-100);
  color: var(--p-navy-950);
  box-shadow: 0 2px 6px rgba(var(--p-navy-rgb), 0.08);
}

/* Step Body */
.bkp3d-step-body {
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto;
  min-width: 0;
}
.bkp3d-step-title {
  margin: 0;
  font-family: var(--heading-font, "Plus Jakarta Sans", sans-serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--brand-primary);
}

/* Declarative Controls */
.bkp3d-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bkp3d-ctrl-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.bkp3d-ctrl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 24px;
}
.bkp3d-ctrl-label {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--brand-primary);
}

/* Inline Mini Switch (34x18px, borderless) */
.bkp3d-inline-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--brand-primary);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.bkp3d-inline-toggle-track {
  position: relative;
  width: 34px;
  height: 18px;
  border-radius: 999px;
  background: var(--p-navy-100);
  transition: background 0.16s ease;
}
.bkp3d-inline-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--p-white);
  box-shadow: 0 1px 2px rgba(var(--p-navy-rgb), 0.25);
  transition: transform 0.16s ease;
}
.bkp3d-inline-toggle.is-active .bkp3d-inline-toggle-track {
  background: var(--brand-primary);
}
.bkp3d-inline-toggle.is-active .bkp3d-inline-toggle-thumb {
  transform: translateX(16px);
}

.bkp3d-pills,
.bkp3d-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.bkp3d-pills--5 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}
.bkp3d-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--p-slate-50);
  color: var(--brand-primary);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.bkp3d-pill-btn--2line {
  flex-direction: column;
  gap: 1px;
  min-height: 44px;
  padding: 5px 4px;
  border-radius: 10px;
}
.bkp3d-pill-code {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.15;
}
.bkp3d-pill-sub {
  font-size: var(--text-xs); /* floor 12px (P1-07) */
  font-weight: 600;
  line-height: 1.15;
  color: var(--text-muted);
}
.bkp3d-pill-btn.is-active .bkp3d-pill-sub {
  color: var(--p-navy-950);
}
.bkp3d-pill-btn:hover {
  background: var(--surface-alt);
  border-color: var(--p-slate-300);
}
.bkp3d-pill-btn.is-active {
  background: var(--p-navy-100);
  border: 1.5px solid var(--brand-primary);
  color: var(--p-navy-950);
  font-weight: 700;
}

/* 7-Step Compact Pill Grid + Borderless Nav Strip */
.bkp3d-step-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.bkp3d-step-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 4px 9px;
  border-radius: 8px;
  border: 1px solid var(--p-navy-100);
  background: var(--p-slate-50);
  color: var(--brand-primary);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.bkp3d-step-pill[data-optional="true"] {
  border-style: dashed;
  border-color: var(--p-slate-300);
  color: var(--text-muted);
}
.bkp3d-step-pill:hover {
  background: var(--surface-alt);
  border-color: var(--border-control);
}
.bkp3d-step-pill.is-active {
  background: var(--p-navy-100);
  border: 1.5px solid var(--brand-primary);
  border-style: solid;
  color: var(--p-navy-950);
  font-weight: 700;
}
.bkp3d-step-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 2px;
}
.bkp3d-step-nav-btn {
  border: 0;
  background: transparent;
  padding: 4px 6px;
  border-radius: 6px;
  color: var(--brand-primary);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.bkp3d-step-nav-btn:hover:not(:disabled) {
  background: var(--surface-alt);
}
.bkp3d-step-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.bkp3d-step-play-btn {
  color: var(--wa-bg);
}

.bkp3d-chip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 5px 11px;
  border-radius: 8px;
  border: 1px solid var(--p-navy-100);
  background: var(--p-white);
  color: var(--brand-primary);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.bkp3d-chip-btn:hover {
  background: var(--surface-alt);
}
.bkp3d-chip-btn.is-active {
  background: var(--p-navy-100);
  border: 1.5px solid var(--brand-primary);
  color: var(--p-navy-950);
  font-weight: 700;
}

.bkp3d-segment {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface-alt);
  border: 1px solid var(--p-navy-100);
}
.bkp3d-seg-btn {
  min-height: 40px;
  padding: 6px 10px;
  border: 1.5px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--brand-primary);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.bkp3d-seg-btn.is-active {
  background: var(--p-white);
  border-color: var(--brand-primary);
  color: var(--p-navy-950);
  box-shadow: 0 1px 4px rgba(var(--p-navy-rgb), 0.08);
}

/* Native Grouped Select & Pill Switch 42×24px */
.bkp3d-select {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--p-slate-300);
  background-color: var(--p-white);
  color: var(--p-navy-950);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.bkp3d-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 40px;
  padding: 4px 0;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: var(--p-navy-950);
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: opacity 0.18s ease;
}
.bkp3d-switch:hover {
  opacity: 0.85;
}
.bkp3d-switch-track {
  position: relative;
  flex: 0 0 auto;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: var(--p-navy-100);
  transition: background 0.18s ease;
}
.bkp3d-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--p-white);
  box-shadow: 0 1px 3px rgba(var(--p-navy-rgb), 0.25);
  transition: transform 0.18s ease;
}
.bkp3d-switch.is-active .bkp3d-switch-track {
  background: var(--brand-primary);
}
.bkp3d-switch.is-active .bkp3d-switch-thumb {
  transform: translateX(18px);
}

.bkp3d-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid var(--p-navy-100);
  background: var(--p-white);
  color: var(--brand-primary);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}
.bkp3d-toggle-btn:hover {
  background: var(--surface-alt);
}
.bkp3d-toggle-state {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--surface-alt);
  color: var(--brand-primary);
}
.bkp3d-toggle-btn.is-active {
  border-color: var(--brand-primary);
  background: var(--surface-alt);
}
.bkp3d-toggle-btn.is-active .bkp3d-toggle-state {
  background: var(--brand-primary);
  color: var(--surface-canvas);
}

/* Stepper Slider (borderless tenang menyatu di panel) */
.bkp3d-stepper-slider {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 0;
  border-radius: 0;
  background: transparent;
  border: 0;
}
.bkp3d-slider-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.bkp3d-slider-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-primary);
  font-variant-numeric: tabular-nums;
}
.bkp3d-range {
  width: 100%;
  min-height: 32px;
  accent-color: var(--brand-primary);
  cursor: pointer;
}
.bkp3d-slider-ends {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.bkp3d-slider-end {
  border: 0;
  background: transparent;
  padding: 2px 0;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}
.bkp3d-slider-end:hover {
  color: var(--p-navy-950);
  text-decoration: underline;
}

/* Info Card */
.bkp3d-info-card {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--border-subtle);
  border-radius: 0;
  padding: 14px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bkp3d-info-head-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.bkp3d-preview-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--brand-primary);
  font-size: var(--text-xs); /* floor 12px (P1-07) */
  font-weight: 700;
}
.bkp3d-info-heading {
  margin: 0;
  font-family: var(--heading-font, "Plus Jakarta Sans", sans-serif);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--p-navy-950);
}
.bkp3d-info-lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-body);
}
.bkp3d-spec-grid {
  margin: 2px 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
}
@media (max-width: 419px) {
  .bkp3d-spec-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.bkp3d-spec-item {
  margin: 0;
  min-width: 0;
}
.bkp3d-spec-item dt {
  font-size: var(--text-xs); /* floor 12px (P1-07) */
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.bkp3d-spec-item dd {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--p-navy-950);
  font-variant-numeric: tabular-nums;
}
.bkp3d-info-bullets {
  margin: 2px 0 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--text-body);
}
.bkp3d-info-note {
  margin: 2px 0 0;
  padding: 2px 0 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
}

/* Panel Footer */
.bkp3d-panel-footer {
  margin-top: auto;
  padding: 12px 20px 14px;
  border-top: 0;
  background: var(--surface-canvas);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bkp3d-trust-line {
  margin: 0;
  font-size: var(--text-xs); /* floor 12px (P1-07) */
  line-height: 1.35;
  color: var(--text-muted);
  text-align: center;
}

.bkp3d-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--brand-accent);
  background: var(--brand-accent);
  color: var(--p-white);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(var(--p-navy-rgb), 0.20);
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.bkp3d-cta:hover {
  background: var(--wa-bg-hover);
  border-color: var(--wa-bg-hover);
  color: var(--surface-canvas);
}

/* Focus rings */
.bkp3d-shell button:focus-visible,
.bkp3d-shell a:focus-visible,
.bkp3d-shell select:focus-visible,
.bkp3d-shell input:focus-visible {
  outline: 3px solid var(--brand-primary);
  outline-offset: 2px;
}

/* Desktop fine-pointer */
@media (hover: hover) and (pointer: fine) {
  .bkp3d-canvas-wrap canvas {
    pointer-events: auto;
    touch-action: none;
  }
  .bkp3d-pill {
    display: none;
  }
}
.bkp3d-shell.is-fine-pointer .bkp3d-pill {
  display: none;
}

@media (max-width: 767px) {
  .bkp3d-topbar {
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 6px;
    padding: 8px 10px;
  }
  .bkp3d-hint {
    left: 10px;
    right: auto;
    bottom: 8px;
  }
  .bkp3d-step-body {
    padding: 14px 14px;
  }
  .bkp3d-panel-footer {
    padding: 12px 14px 16px;
  }
}

@media (max-width: 639px) {
  .cs_studio_section {
    padding: 14px 0 32px;
  }
  .cs_studio_section .cs_section_title {
    font-size: 21px;
    margin-bottom: 4px;
  }
  .bkp3d-stage-bar {
    padding: 7px 10px;
    min-height: 44px;
  }
  .bkp3d-view-btn {
    min-height: 32px;
    padding: 4px 10px;
    font-size: 12px;
  }
  .bkp3d-viewport {
    min-height: 240px;
  }
  .bkp3d-canvas-wrap {
    min-height: 240px;
    max-height: 280px;
  }
  .bkp3d-step-tab {
    font-size: var(--text-xs); /* floor 12px (P1-07) */
    padding: 5px 4px;
  }
  .bkp3d-step-body {
    padding: 10px 12px;
    gap: 10px;
  }
  .bkp3d-step-pill {
    font-size: var(--text-xs); /* floor 12px (P1-07) */
    padding: 4px 7px;
    min-height: 30px;
  }
  .bkp3d-blueprint-wrap {
    padding: 10px 10px;
  }
  .bkp3d-reset-label {
    display: none;
  }
  .bkp3d-zoom-btn {
    min-width: 30px;
    min-height: 30px;
    padding: 0 8px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .bkp3d-reset-btn,
  .bkp3d-pill {
    min-width: 40px;
    min-height: 40px;
    padding: 6px 11px;
    font-size: 12.5px;
  }
  .bkp3d-hint {
    font-size: var(--text-xs); /* floor 12px (P1-07) */
    padding: 4px 9px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .bkp3d-shell *,
  .bkp3d-shell *::before,
  .bkp3d-shell *::after {
    animation-duration: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0ms !important;
    scroll-behavior: auto !important;
  }
}

/* P0-06: catatan/disclaimer pada kartu info Studio 3D (info.note) */
.bkp3d-info-note {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-left: 3px solid var(--brand-accent-vivid);
  border-radius: 0 var(--radius-sm, 8px) var(--radius-sm, 8px) 0;
  background: var(--brand-accent-soft);
  color: var(--brand-accent-ink);
  font-size: var(--text-sm, 0.875rem);
  line-height: 1.5;
}

/* P1-07: target sentuh minimal 44px pada pointer kasar (touch) */
@media (pointer: coarse) {
  .bkp3d-zoom-btn,
  .bkp3d-view-btn,
  .bkp3d-step-pill,
  .bkp3d-step-nav-btn,
  .bkp3d-inline-toggle {
    min-height: 44px;
    min-width: 44px;
  }
  .bkp3d-zoom-btn { padding: 0 14px; }
  .bkp3d-step-pill { padding: 8px 14px; }
}
