/* ==========================================================================
   ABSON INTERIORS · 3D CONFIGURATOR STUDIO & SPECIFICATION MODAL
   ========================================================================== */

/* Studio Layout */
    .studio-container {
      display: grid;
      grid-template-columns: 1fr 380px;
      border: 1px solid #383b31;
      background: #1e211a;
      box-shadow: 0 30px 90px rgba(0,0,0,0.6);
      border-radius: 4px;
      overflow: hidden;
    }

    /* 3D Viewport */
    .room-viewport {
      position: relative;
      min-height: 680px;
      background: radial-gradient(ellipse at 50% 45%, #2a2e24, #12140f);
      overflow: hidden;
    }
    .room-viewport canvas {
      display: block;
      width: 100%;
      height: 100%;
      position: absolute;
      inset: 0;
      touch-action: none;
    }

    /* Floating Viewport Overlays */
    .room-top-bar {
      position: absolute;
      top: 20px;
      left: 20px;
      right: 20px;
      z-index: 10;
      display: flex;
      justify-content: space-between;
      align-items: center;
      pointer-events: none;
    }
    .room-title-tag {
      background: rgba(22, 24, 19, 0.78);
      backdrop-filter: blur(12px);
      border: 1px solid rgba(255, 255, 255, 0.12);
      padding: 10px 18px;
      border-radius: 40px;
      font-size: 11px;
      letter-spacing: 0.15em;
      text-transform: uppercase;
      font-weight: 600;
      color: #dfba8e;
      pointer-events: auto;
    }
    .room-quick-actions {
      display: flex;
      gap: 10px;
      pointer-events: auto;
    }
    .viewport-btn {
      background: rgba(22, 24, 19, 0.82);
      backdrop-filter: blur(12px);
      border: 1px solid rgba(255, 255, 255, 0.15);
      color: #eeeae1;
      padding: 8px 16px;
      border-radius: 30px;
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.04em;
      display: inline-flex;
      align-items: center;
      gap: 7px;
      transition: all 0.2s;
    }
    .viewport-btn:hover {
      background: #eeeae1;
      color: #171914;
      border-color: #eeeae1;
    }
    .viewport-btn svg { width: 14px; height: 14px; fill: currentColor; }

    /* Bottom Camera Angles Bar */
    .room-bottom-bar {
      position: absolute;
      bottom: 20px;
      left: 20px;
      right: 20px;
      z-index: 10;
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 12px;
      pointer-events: none;
    }
    .camera-presets {
      display: flex;
      gap: 6px;
      background: rgba(22, 24, 19, 0.85);
      backdrop-filter: blur(14px);
      padding: 6px;
      border-radius: 40px;
      border: 1px solid rgba(255, 255, 255, 0.12);
      pointer-events: auto;
    }
    .cam-btn {
      background: none;
      border: 0;
      color: #a5a797;
      padding: 7px 14px;
      border-radius: 30px;
      font-size: 10.5px;
      font-weight: 600;
      letter-spacing: 0.04em;
      transition: all 0.2s;
    }
    .cam-btn:hover { color: #fff; }
    .cam-btn.selected {
      background: var(--bronze);
      color: #fff;
    }
    .room-hint-badge {
      background: rgba(22, 24, 19, 0.7);
      backdrop-filter: blur(8px);
      padding: 7px 14px;
      border-radius: 30px;
      font-size: 10.5px;
      color: #929586;
      border: 1px solid rgba(255, 255, 255, 0.08);
      pointer-events: auto;
    }

    /* Studio Controls Sidebar */
    .studio-panel {
      display: flex;
      flex-direction: column;
      height: 100%;
      background: #1c1f17;
      border-left: 1px solid #36392d;
    }
    .studio-panel-header {
      padding: 24px 24px 18px;
      border-bottom: 1px solid #2f3227;
    }
    .studio-panel-header h3 { font-size: 26px; color: #fff; margin-bottom: 12px; }
    
    /* Room Switcher Tabs */
    .room-tabs {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 6px;
      background: #141610;
      padding: 5px;
      border-radius: 6px;
      border: 1px solid #2e3126;
    }
    .room-tab {
      background: none;
      border: 0;
      padding: 8px 6px;
      border-radius: 4px;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: #8c8f80;
      transition: all 0.2s;
    }
    .room-tab:hover { color: #fff; }
    .room-tab.selected {
      background: var(--bronze);
      color: #fff;
      box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    }

    /* Control Tabs Navigation */
    .control-subtabs {
      display: flex;
      overflow-x: auto;
      border-bottom: 1px solid #2f3227;
      padding: 0 16px;
      gap: 16px;
      scrollbar-width: none;
    }
    .control-subtabs::-webkit-scrollbar { display: none; }
    .subtab-btn {
      background: none;
      border: 0;
      border-bottom: 2px solid transparent;
      padding: 14px 4px;
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: #86887a;
      white-space: nowrap;
      transition: all 0.2s;
    }
    .subtab-btn:hover { color: #eeeae1; }
    .subtab-btn.selected {
      color: var(--bronze-light);
      border-color: var(--bronze-light);
    }

    /* Scrollable Controls Body */
    .studio-controls-body {
      flex: 1;
      overflow-y: auto;
      padding: 24px;
      display: flex;
      flex-direction: column;
      gap: 26px;
      max-height: 520px;
    }
    .studio-controls-body::-webkit-scrollbar { width: 5px; }
    .studio-controls-body::-webkit-scrollbar-thumb { background: #383c2e; border-radius: 10px; }

    .control-group {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }
    .control-label-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .control-label {
      font-size: 10px;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: #b0b3a3;
      font-weight: 600;
    }
    .active-val-name {
      font-size: 11px;
      color: #dfba8e;
      font-weight: 500;
    }

    /* Swatches Grid */
    .swatches-grid {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
    }
    .swatch-btn {
      width: 38px;
      height: 38px;
      border-radius: 50%;
      border: 2px solid #1c1f17;
      outline: 1px solid #454939;
      cursor: pointer;
      position: relative;
      transition: transform 0.2s, outline 0.2s;
    }
    .swatch-btn:hover { transform: scale(1.12); }
    .swatch-btn.selected {
      outline: 2px solid #dfba8e;
      outline-offset: 3px;
      transform: scale(1.08);
    }

    /* Light Presets */
    .light-presets {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
    }
    .light-btn {
      background: #141610;
      border: 1px solid #35382b;
      color: #aaa99e;
      padding: 10px 12px;
      border-radius: 4px;
      font-size: 11px;
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 8px;
      transition: all 0.2s;
    }
    .light-btn:hover { border-color: #5b604b; color: #fff; }
    .light-btn.selected {
      background: #dfba8e;
      color: #171914;
      border-color: #dfba8e;
    }

    /* Slider Row */
    .slider-row {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .slider-row input[type="range"] {
      -webkit-appearance: none;
      width: 100%;
      height: 4px;
      background: #35382b;
      border-radius: 2px;
      outline: none;
    }
    .slider-row input[type="range"]::-webkit-slider-thumb {
      -webkit-appearance: none;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: #dfba8e;
      cursor: pointer;
      border: 2px solid #1c1f17;
    }

    /* Feature Toggles */
    .toggle-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 10px 14px;
      background: #141610;
      border-radius: 4px;
      border: 1px solid #2d3024;
    }
    .toggle-row span { font-size: 11px; color: #c0c2b3; }
    .toggle-switch {
      position: relative;
      width: 40px;
      height: 22px;
    }
    .toggle-switch input { opacity: 0; width: 0; height: 0; }
    .toggle-slider {
      position: absolute;
      cursor: pointer;
      inset: 0;
      background-color: #35382b;
      transition: 0.3s;
      border-radius: 20px;
    }
    .toggle-slider:before {
      position: absolute;
      content: "";
      height: 16px;
      width: 16px;
      left: 3px;
      bottom: 3px;
      background-color: white;
      transition: 0.3s;
      border-radius: 50%;
    }
    .toggle-switch input:checked + .toggle-slider { background-color: var(--bronze); }
    .toggle-switch input:checked + .toggle-slider:before { transform: translateX(18px); }

    /* Custom Form & Select Controls matching design system */
    .studio-select {
      width: 100%;
      background: #141610;
      border: 1px solid #35382b;
      color: #dfba8e;
      padding: 9px 12px;
      border-radius: 4px;
      font-size: 11px;
      font-weight: 500;
      outline: none;
      cursor: pointer;
      transition: border-color 0.2s;
    }
    .studio-select:focus { border-color: var(--bronze); }
    .studio-select option { background: #1c1f17; color: #eeeae1; }

    .room-opt-group { display: none; }
    .room-opt-group.active { display: flex; flex-direction: column; gap: 16px; }

    .control-subheading {
      font-size: 10.5px;
      letter-spacing: 0.16em;
      text-transform: uppercase;
      color: var(--bronze-light);
      font-weight: 700;
      padding-bottom: 6px;
      border-bottom: 1px solid #2b2f23;
      margin-top: 10px;
    }

    .incompatible-badge {
      display: none;
      background: rgba(239, 68, 68, 0.14);
      border: 1px solid rgba(239, 68, 68, 0.45);
      color: #fca5a5;
      padding: 8px 12px;
      border-radius: 4px;
      font-size: 10.5px;
      line-height: 1.45;
      margin-top: 6px;
    }
    .incompatible-badge.visible { display: block; }

    /* Studio Footer Actions */
    .studio-panel-footer {
      padding: 18px 24px;
      border-top: 1px solid #2f3227;
      background: #161912;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }
    .studio-btn-primary {
      width: 100%;
      background: var(--bronze);
      color: #fff;
      border: 0;
      padding: 14px 20px;
      border-radius: 4px;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      transition: background 0.2s;
    }
    .studio-btn-primary:hover { background: #9d7546; }
    .studio-btn-secondary {
      width: 100%;
      background: transparent;
      color: #dfba8e;
      border: 1px solid #574632;
      padding: 11px 20px;
      border-radius: 4px;
      font-size: 10.5px;
      font-weight: 600;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      transition: all 0.2s;
    }
    .studio-btn-secondary:hover {
      background: rgba(181, 137, 87, 0.15);
      border-color: #dfba8e;
    }

/* Spec Sheet Modal Specifics */
    .spec-table {
      width: 100%;
      border-collapse: collapse;
      margin: 24px 0;
    }
    .spec-table th, .spec-table td {
      padding: 12px 16px;
      border-bottom: 1px solid var(--line);
      text-align: left;
      font-size: 13px;
    }
    .spec-table th {
      text-transform: uppercase;
      font-size: 10px;
      letter-spacing: 0.12em;
      color: var(--muted);
    }
    .spec-color-dot {
      display: inline-block;
      width: 14px;
      height: 14px;
      border-radius: 50%;
      margin-right: 8px;
      vertical-align: middle;
      border: 1px solid rgba(0,0,0,0.15);
    }

    .skip-link {
      position: fixed;
      top: -60px;
      left: 20px;
      padding: 15px;
      background: var(--paper);
      z-index: 100;
    }
    .skip-link:focus { top: 15px; }
