/* ============================================================
   CONFIGURATOR — Layout principal del configurador
   Figma: Frame "Overview" (1440×860, row)
   ============================================================ */

/* ── Subencabezado "Personaliza tu configuración" ── */
/* Figma: Frame 427319801, padding 0 40px, Geist 400 24px #222222 */
.configurator__subheader {
  display: flex;
  align-items: center;
  padding: 0 var(--page-px);
  height: 48px;
  flex-shrink: 0;
}

.configurator__title {
  font-size: var(--text-h6);
  font-weight: var(--fw-regular);
  line-height: var(--lh-display);
  color: var(--c-text-primary);
}

/* ── Divisor horizontal ── */
/* Figma: Vector 2, stroke rgba(76,75,74,0.2), height 0 */
.configurator__divider-h {
  flex-shrink: 0;
  width: 100%;
  height: 1px;
  background: rgba(76, 75, 74, 0.20);
  margin: 0;
}

/* ── Cuerpo principal: 3D + divisor + panel ── */
/* Figma: Frame 427319803, row, gap 42px, padding 0 40px 40px, fill */
.configurator__body {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: var(--panel-gap);
  padding: 0 var(--page-px) var(--sp-7);
  overflow: hidden;
  min-height: 0;
}

/* ── Zona del visor 3D ── */
/* Figma: Frame 427319802, fill × fill */
.configurator__scene {
  position: relative;
  flex: 65;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--r-sm);
}

/* Placeholder hasta que Three.js renderice */
.scene__placeholder {
  position: absolute;
  inset: 0;
  background: #d8d4ce;
  overflow: hidden;
}

/* Grid de referencia */
.scene__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,0,0,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.06) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Contenedor donde scene.js inyecta el canvas — debe rellenar .configurator__scene */
#scene-container {
  position: absolute;
  inset: 0;
}

/* Canvas de Three.js (inyectado por scene.js) */
#scene-container canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
}

/* ── Controles de cámara (esquina inferior derecha de la escena) ── */
.scene__controls {
  position: absolute;
  bottom: var(--sp-4);
  right: var(--sp-4);
  z-index: 10;
  display: flex;
  flex-direction: row;
  gap: var(--sp-2);
}

.scene__ctrl {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--r-full);
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--c-text-body);
  transition: background 0.15s;
}
.scene__ctrl:hover { background: rgba(255,255,255,0.35); }

/* ── Picker de vistas (dropdown sobre el botón ojo) ── */
.scene__view-picker {
  position: relative;
}

.scene__view-dropdown {
  position: absolute;
  bottom: calc(100% + var(--sp-2));
  right: 0;
  display: none;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--sp-2);
}

.scene__view-dropdown--open {
  display: flex;
}

.scene__view-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 56px;
  height: 56px;
  padding: 6px 4px 4px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  transition: background 0.15s;
}

.scene__view-option:hover {
  background: rgba(255, 255, 255, 0.35);
}

.scene__view-option img {
  width: 24px;
  height: 24px;
  pointer-events: none;
}

.scene__view-option span {
  font-size: 9px;
  color: var(--c-text-body);
  line-height: 1;
  white-space: nowrap;
}

/* ── Divisor vertical ── */
/* Figma: Vector 2, stroke rgba(76,75,74,0.2), width 0, fill height */
.configurator__vdivider {
  flex-shrink: 0;
  width: 1px;
  background: rgba(76, 75, 74, 0.20);
  margin-top: var(--sp-5);
  margin-bottom: 0;
}

/* ── Panel de configuración derecho ── */
/* Figma: Frame 427319805, fixed width, fill height */
.configurator__panel {
  flex: 35;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

/* ── Vistas del panel (acordeón vs detalle) ── */
.panel-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.panel-view--hidden {
  display: none;
}

/* ── Footer del panel (botón Finalizar) ── */
.panel-footer {
  flex-shrink: 0;
  padding-top: var(--sp-5);
  padding-bottom: var(--sp-2);
}
