/* ==========================================================================
   LUXBAU INTERNATIONAL — ARCHITECTURAL DESIGN SYSTEM
   Main Stylesheet | Responsive | Three.js | Architectural Space Editor
   ========================================================================== */

/* ==========================================================================
   1. GLOBAL VARIABLES
   ========================================================================== */

:root {
  --color-carbon: #101214;
  --color-carbon-deep: #0a0b0d;
  --color-carbon-surface: #181b1e;
  --color-carbon-border: #262a2e;
  --color-carbon-overlay: rgba(16, 18, 20, .75);

  --color-white: #ffffff;
  --color-offwhite: #f8f9fa;
  --color-surface-light: #f1f3f5;
  --color-border-light: #e5e8eb;
  --color-border-subtle: #d3d7dc;

  --color-petrol: #0e3846;
  --color-petrol-hover: #144e62;
  --color-petrol-light: #3a8ba8;
  --color-petrol-glow: rgba(58, 139, 168, .25);
  --color-petrol-soft: #e5f1f6;

  --color-olive: #566738;
  --color-olive-hover: #657a42;
  --color-olive-light: #8da06b;
  --color-olive-soft: #edf2e6;
  --color-olive-glow: rgba(86, 103, 56, .25);

  --color-cyan: #2ec4b6;
  --color-amber: #e6af2e;

  --color-text-dark: #121417;
  --color-text-muted-dark: #636b75;
  --color-text-light: #f5f7f9;
  --color-text-muted-light: #9ea7b0;

  --font-serif: 'Cinzel', Georgia, 'Times New Roman', serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-inter: 'Inter Tight', sans-serif;

  --text-xs: .75rem;
  --text-sm: .875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.35rem;
  --text-2xl: 1.85rem;
  --text-3xl: 2.6rem;
  --text-4xl: 3.75rem;

  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-8: 3rem;
  --space-10: 4.5rem;
  --space-12: 6.5rem;

  --container-max: 1320px;
  --container-narrow: 1040px;

  --radius-square: 0;
  --radius-subtle: 4px;
  --radius-card: 12px;

  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, .05);
  --shadow-card: 0 15px 35px rgba(0, 0, 0, .4);
  --shadow-modal: 0 25px 60px rgba(0, 0, 0, .45);

  --transition-fast: .2s cubic-bezier(.16, 1, .3, 1);
  --transition-smooth: .35s cubic-bezier(.16, 1, .3, 1);
}

/* ==========================================================================
   2. RESET AND GLOBAL STYLES
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-width: 320px;
  font-family: var(--font-sans);
  background: var(--color-carbon);
  color: var(--color-text-light);
  line-height: 1.6;
  overflow-x: hidden;
}

.editor-main-wrapper {
  zoom: 80%;
}

img,
picture,
video,
svg {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

ul,
ol {
  list-style: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--color-petrol-light);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   3. TYPOGRAPHY AND GLOBAL STRUCTURE
   ========================================================================== */

.heading {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: .02em;
  color: var(--color-white);
}

.heading-1 {
  font-size: clamp(2rem, 4.5vw, var(--text-3xl));
  letter-spacing: .04em;
  text-transform: uppercase;
}

.heading-2 {
  font-size: clamp(1.5rem, 3vw, var(--text-2xl));
  letter-spacing: .03em;
  text-transform: uppercase;
}

.heading-3 {
  font-size: var(--text-xl);
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: .02em;
}

.text {
  font-family: var(--font-inter);
  font-weight: 400;
  line-height: 1.65;
}

.section-tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--color-olive-light);
  margin-bottom: var(--space-3);
}

.container {
  width: min(100% - 40px, var(--container-max));
  margin-inline: auto;
}

.icon {
  display: inline-block;
  vertical-align: middle;
  object-fit: contain;
}

.icon-xs { width: 14px; height: 14px; }
.icon-sm { width: 18px; height: 18px; }
.icon-md { width: 24px; height: 24px; }

/* ==========================================================================
   4. BUTTON SYSTEM
   ========================================================================== */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 14px 28px;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  border-radius: var(--radius-square);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.button-1 {
  background: var(--color-petrol);
  color: var(--color-white);
  border: 1px solid var(--color-petrol-light);
}

.button-1:hover {
  background: var(--color-petrol-hover);
  border-color: #5ec2e3;
  box-shadow: 0 4px 20px var(--color-petrol-glow);
  transform: translateY(-2px);
}

.button-2 {
  background: transparent;
  color: var(--color-white);
  border: 1px solid rgba(255, 255, 255, .25);
}

.button-2:hover {
  background: rgba(255, 255, 255, .1);
  border-color: var(--color-white);
  transform: translateY(-2px);
}

.button-olive {
  background: var(--color-olive);
  color: var(--color-white);
  border: 1px solid var(--color-olive-light);
}

.button-olive:hover {
  background: var(--color-olive-hover);
  border-color: var(--color-white);
  box-shadow: 0 4px 18px var(--color-olive-glow);
  transform: translateY(-2px);
}

/* ==========================================================================
   5. TOP UTILITY BAR
   ========================================================================== */

.top-bar {
  background: var(--color-carbon-deep);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  padding: 7px 0;
  font-size: 11px;
  color: var(--color-text-muted-light);
  zoom: 90%;
}

.top-bar-inner,
.header-container {
  max-width: 1220px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.top-bar-tag {
  letter-spacing: .12em;
  color: #8c95a0;
}

.top-bar-left {
  display: inline-flex;
  gap: 5px;
  color: var(--color-text-muted-light);
  transition: color var(--transition-fast);
}

.top-bar-left:hover,
.social-link:hover {
  color: var(--color-petrol-light);
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--color-text-muted-light);
}

.social-link .icon {
  width: 14px;
  height: 14px;
  filter: brightness(0) invert(1);
  opacity: .8;
}

.social-link:hover .icon {
  opacity: 1;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .15);
  color: var(--color-white);
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.lang-btn:hover {
  background: var(--color-petrol);
  border-color: var(--color-petrol-light);
}

.lang-btn .icon {
  width: 14px;
  height: 14px;
  filter: brightness(0) invert(1);
}

.lang-badge {
  background: var(--color-olive);
  color: var(--color-white);
  padding: 1px 4px;
  font-size: 9px;
  font-weight: 700;
}

/* ==========================================================================
   6. HEADER AND NAVIGATION
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(16, 18, 20, .96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  transition: all var(--transition-smooth);
  zoom: 90%;
}

.site-header.is-scrolled {
  background: rgba(10, 11, 13, .98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, .45);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 86px;
  gap: 20px;
}

.nav-group {
  flex: 1;
  min-width: 0;
}

.nav-left .nav-list,
.nav-right .nav-list {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 24px);
}

.nav-left .nav-list {
  justify-content: flex-start;
}

.nav-right .nav-list {
  justify-content: flex-end;
}

.nav-link {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-text-muted-light);
  padding: 10px 4px;
  position: relative;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-white);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-petrol-light);
  transition: width var(--transition-fast);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link-highlight {
  color: var(--color-olive-light);
}

/* Dropdown */

.has-dropdown {
  position: relative;
}

.dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dropdown-icon {
  width: 12px;
  height: 12px;
  filter: brightness(0) invert(1);
  opacity: .7;
  transition: transform var(--transition-fast);
}

.has-dropdown:hover .dropdown-icon,
.has-dropdown.is-open .dropdown-icon {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 290px;
  background: var(--color-carbon);
  border: 1px solid var(--color-carbon-border);
  box-shadow: var(--shadow-modal);
  padding: var(--space-2) 0;
  visibility: hidden;
  opacity: 0;
  transform: translateY(10px);
  transition: all var(--transition-fast);
  z-index: 1000;
}

.has-dropdown:hover .dropdown-menu,
.has-dropdown.is-open .dropdown-menu {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.dropdown-link {
  display: block;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
}

.dropdown-link:hover {
  background: var(--color-carbon-surface);
}

.dropdown-link strong {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-white);
  margin-bottom: 2px;
}

/* Branding */

.site-branding {
  text-align: center;
  padding: 0 24px;
  flex-shrink: 0;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  width: auto;
  max-width: 100%;
}

.brand-logo {
  height: 88px;
  width: auto;
  object-fit: contain;
  transition: transform var(--transition-fast);
}

.brand-logo:hover {
  transform: scale(1.03);
}

/* Mobile Navigation */

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.hamburger-bar {
  width: 24px;
  height: 2px;
  background: var(--color-white);
  transition: all var(--transition-fast);
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 380px;
  height: 100vh;
  height: 100dvh;
  background-color: var(--color-carbon);
  z-index: 2000;
  border-left: 1px solid var(--color-carbon-border);
  box-shadow: var(--shadow-modal);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: right var(--transition-smooth);
  zoom: 80%; /* mismo tamaño efectivo que about_us */
}

.mobile-drawer.is-active {
  right: 0;
}

.mobile-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--color-carbon-border);
  padding-bottom: var(--space-4);
}

.mobile-drawer .brand-logo-sm {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.drawer-close-btn {
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.drawer-close-btn .icon {
  filter: brightness(0) invert(1);
}

.mobile-drawer-body {
  display: flex;
  flex-direction: column;
  flex: 0 1 auto;
  margin-top: auto;
  overflow-y: auto;
}

.mobile-nav-list {
  padding-top: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.mobile-nav-link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-white);
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: color var(--transition-fast);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--color-petrol-light);
}

.mobile-group-title {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-petrol-light);
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-top: var(--space-2);
}

/* Submenú desplegable: filas con texto más pequeño y liviano */
.mobile-subnav-list {
  margin-top: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: 0;
  background-color: var(--color-carbon);
}

.mobile-subnav-list .mobile-nav-link {
  display: block;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--color-white);
  transition: background-color var(--transition-fast);
}

.mobile-drawer-footer {
  margin-top: auto;
  padding-top: var(--space-4);
}

.lang-btn-mobile {
  width: 100%;
  padding: 12px;
  justify-content: center;
  margin-top: var(--space-4);
}

/* ==========================================================================
   7. ARCHITECTURAL EDITOR
   ========================================================================== */

.editor-main-wrapper {
  position: relative;
  min-height: calc(100vh - 180px);
  background: var(--color-carbon);
  padding: var(--space-8) 0 var(--space-12);
  overflow: hidden;
}

.editor-bg-grid {
  display: none;
}

.editor-header-intro {
  position: relative;
  text-align: left;
  max-width: 800px;
  margin: 0 0 var(--space-6);
}

.editor-main-title {
  color: var(--color-white);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.3;
  margin-bottom: var(--space-2);
}

.editor-main-desc {
  color: #8c959f;
  font-size: var(--text-sm);
  line-height: 1.6;
}

.editor-separator-line {
  display: none;
}

/* Main workspace */

.editor-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: var(--space-6);
  align-items: start;
  width: 100%;
}

/* ==========================================================================
   8. THREE.JS VIEWER
   ========================================================================== */

.editor-viewer-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
}

.editor-viewer-card {
  position: relative;
  width: 100%;
  min-width: 0;
  background: #0b0d10;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .4);
}

.viewer-bracket,
.viewer-top-meta,
.viewer-specs-strip {
  display: none !important;
}

.viewer-display-box {
  position: relative;
  width: 100%;
  height: clamp(380px, 48vw, 580px);
  min-height: 300px;
  background: #0b0d10;
  overflow: hidden;
  isolation: isolate;
}

.viewer-3d-canvas-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  overflow: hidden;
  touch-action: pan-y;
}

.viewer-3d-canvas-wrap:active {
  cursor: grabbing;
}

.viewer-3d-canvas-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  outline: none;
}

/* Floating HUD */

.viewer-3d-floating-hud {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 10;
  display: flex;
  gap: 8px;
  pointer-events: none;
}

.hud-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  pointer-events: auto;
}

.hud-hint-pill {
  display: none !important;
}

.hud-btn {
  background: rgba(18, 22, 27, .85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #cfd6df;
  padding: 8px 13px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .04em;
  border-radius: 6px;
  cursor: pointer;
  transition: all .2s ease;
}

.hud-btn:hover {
  background: rgba(30, 36, 44, .95);
  color: #fff;
  border-color: rgba(255, 255, 255, .25);
}

.hud-btn.is-active {
  background: rgba(209, 177, 135, .15);
  border-color: #d1b187;
  color: #d1b187;
}

/* ==========================================================================
   9. EDITOR CONFIGURATION PANEL
   ========================================================================== */

.editor-controls-panel {
  min-width: 0;
  width: 100%;
  background: #14171b;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .35);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.panel-section-title {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #8c959f;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.panel-step-badge {
  display: none !important;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.control-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.control-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #d1d5db;
}

.control-current-badge {
  font-family: monospace;
  font-size: 11px;
  color: #8c959f;
}

/* ==========================================================================
   10. MATERIAL SELECTION CHIPS
   ========================================================================== */

.materials-palette-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.material-chip {
  min-width: 0;
  background: #1a1e23;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 6px;
  padding: 8px 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all .2s ease;
}

.material-chip:hover {
  background: #22272e;
  border-color: rgba(255, 255, 255, .16);
}

.material-chip.is-active {
  border-color: #d1b187;
  background: rgba(209, 177, 135, .08);
}

.chip-swatch {
  display: block;
  width: 100%;
  height: 32px;
  border-radius: 4px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.chip-name {
  font-size: 11px;
  font-weight: 500;
  color: #8c959f;
  text-align: center;
  overflow-wrap: anywhere;
}

.material-chip.is-active .chip-name {
  color: #fff;
  font-weight: 600;
}

/* ==========================================================================
   11. WALL TEXTURES
   ========================================================================== */

.subcontrol-label-row {
  margin-top: 6px;
  margin-bottom: 6px;
}

.subcontrol-label {
  font-size: 11px;
  font-weight: 600;
  color: #9ba3af;
  letter-spacing: .3px;
  text-transform: uppercase;
}

.wall-textures-palette-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.wall-swatch-limewash {
  background: #c8c5be url('assets/textures/limewash.jpg') center / cover no-repeat;
  position: relative;
  overflow: hidden;
}

.wall-swatch-concreto {
  background: #9ca3af url('assets/textures/concrete_wall.jpg') center / cover no-repeat;
  position: relative;
  overflow: hidden;
}

.wall-swatch-liso {
  background: linear-gradient(135deg, #d8dbe0 0%, #aeb4be 100%);
}

.wall-textures-palette-strip .chip-swatch {
  height: 48px;
}

/* ==========================================================================
   12. CUSTOM COLOR PICKER
   ========================================================================== */

.custom-color-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #1a1e23;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 8px;
  padding: 12px;
}

.color-picker-top-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.color-wheel-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #13161a;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  position: relative;
  flex: 1;
  min-width: 0;
  transition: all .2s ease;
}

.color-wheel-trigger:hover {
  border-color: rgba(255, 255, 255, .25);
}

.color-input-native {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.color-preview-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #fff;
  flex-shrink: 0;
  box-shadow: 0 0 4px rgba(0, 0, 0, .4);
}

.color-trigger-text {
  font-size: 11px;
  font-weight: 500;
  color: #d1d5db;
}

.hex-field-wrap {
  display: inline-flex;
  align-items: center;
  background: #13161a;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 6px;
  padding: 0 10px;
  height: 36px;
  gap: 6px;
  flex-shrink: 0;
}

.hex-label {
  font-family: monospace;
  font-size: 10px;
  color: #8c959f;
  font-weight: 600;
}

.hex-text-input {
  width: 70px;
  max-width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: monospace;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

/* ==========================================================================
   13. RGB SLIDERS
   ========================================================================== */

.rgb-sliders-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #13161a;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, .04);
}

.rgb-slider-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rgb-channel-badge {
  width: 14px;
  font-family: monospace;
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  flex-shrink: 0;
}

.rgb-channel-badge.r-badge { color: #f87171; }
.rgb-channel-badge.g-badge { color: #4ade80; }
.rgb-channel-badge.b-badge { color: #60a5fa; }

.rgb-range {
  flex: 1;
  min-width: 0;
  height: 4px;
  appearance: none;
  -webkit-appearance: none;
  background: #272d34;
  outline: none;
  border-radius: 2px;
  cursor: pointer;
}

.rgb-range::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: #e5e7eb;
  border-radius: 50%;
  cursor: pointer;
}

.rgb-range::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #e5e7eb;
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

.rgb-channel-val {
  width: 28px;
  text-align: right;
  font-family: monospace;
  font-size: 10px;
  color: #8c959f;
  flex-shrink: 0;
}

/* ==========================================================================
   14. QUICK WALL COLOR SWATCHES
   ========================================================================== */

.quick-wall-swatches {
  margin-top: 2px;
}

.swatches-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
}

.wall-swatch-btn {
  width: 100%;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 4px;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease;
}

.wall-swatch-btn:hover {
  transform: scale(1.1);
  border-color: #fff;
}

.wall-swatch-btn.is-active {
  border: 2px solid #d1b187;
  box-shadow: 0 0 6px rgba(209, 177, 135, .4);
}

/* ==========================================================================
   15. LIGHTING CONTROLS
   ========================================================================== */

.lighting-chips-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.lighting-chip {
  min-width: 0;
  background: #1a1e23;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 6px;
  padding: 10px 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all .2s ease;
}

.lighting-chip:hover {
  background: #22272e;
  border-color: rgba(255, 255, 255, .16);
}

.lighting-chip.is-active {
  border-color: #d1b187;
  background: rgba(209, 177, 135, .08);
}

.light-bulb-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.lighting-chip-title {
  font-size: 11px;
  font-weight: 500;
  color: #8c959f;
}

.lighting-chip.is-active .lighting-chip-title {
  color: #fff;
  font-weight: 600;
}

/* Intensity */

.intensity-slider-wrap {
  background: #1a1e23;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.intensity-slider-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: #8c959f;
}

.intensity-slider-val {
  font-family: monospace;
  color: #d1d5db;
  font-weight: 600;
}

.luxbau-range {
  width: 100%;
  height: 4px;
  appearance: none;
  -webkit-appearance: none;
  background: #272d34;
  outline: none;
  border-radius: 2px;
  cursor: pointer;
}

.luxbau-range::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background: #e5e7eb;
  border-radius: 50%;
  cursor: pointer;
}

.luxbau-range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: #e5e7eb;
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

/* ==========================================================================
   16. EDITOR ACTION BUTTONS
   ========================================================================== */

.editor-actions-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .06);
}

.btn-screenshot-full {
  width: 100%;
  padding: 14px 20px;
  background: #1b3847;
  border: 1px solid #2d5568;
  border-radius: 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all .2s ease;
}

.btn-screenshot-full:hover {
  background: #23485b;
  border-color: #41758f;
  transform: translateY(-1px);
}

.btn-screenshot-full.is-downloading {
  background: #3e5634;
  border-color: #5d7e4f;
}

.btn-reset-full {
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: none;
  color: #8c959f;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .2s ease;
  text-align: center;
}

.btn-reset-full:hover {
  color: #fff;
}

/* ==========================================================================
   17. MODERN WINDOW CONFIGURATION
   ========================================================================== */

.list-ventanales {
  background: #171b1f;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 8px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ventanal-step-counter {
  font-family: monospace;
  font-size: 11px;
  color: #38bdf8;
  font-weight: 600;
  background: rgba(56, 189, 248, .1);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Slider */

.ventanal-slider-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #13161a;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 6px;
  padding: 12px 10px;
}

.ventanal-range-track-container {
  position: relative;
  width: 100%;
  padding: 6px 0;
}

.ventanal-range {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 6px;
  appearance: none;
  -webkit-appearance: none;
  background: #252b33;
  outline: none;
  border-radius: 3px;
  cursor: pointer;
}

.ventanal-range::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  background: #252b33;
  border-radius: 3px;
}

.ventanal-range::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -7px;
  background: #38bdf8;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(56, 189, 248, .6);
  cursor: pointer;
  transition: transform .15s ease;
}

.ventanal-range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.ventanal-range::-moz-range-track {
  height: 6px;
  background: #252b33;
  border-radius: 3px;
}

.ventanal-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #38bdf8;
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: pointer;
}

/* Slider ticks */

.ventanal-ticks-bar {
  position: absolute;
  top: 50%;
  left: 9px;
  right: 9px;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 1;
}

.ventanal-tick {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3b424e;
  pointer-events: auto;
  cursor: pointer;
  transition: all .2s ease;
}

.ventanal-tick:hover {
  background: #93c5fd;
  transform: scale(1.4);
}

.ventanal-tick.is-active {
  background: #38bdf8;
  box-shadow: 0 0 4px rgba(56, 189, 248, .6);
}

.ventanal-tick.is-current {
  background: #fff;
  transform: scale(1.3);
  box-shadow: 0 0 6px #38bdf8;
}

/* Slider labels */

.ventanal-slider-labels {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
  margin-top: 2px;
}

.v-label-btn {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 10px;
  font-weight: 500;
  color: #7b8491;
  text-align: center;
  padding: 4px 2px;
  cursor: pointer;
  border-radius: 4px;
  transition: all .18s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v-label-btn:hover {
  color: #cbd5e1;
  background: rgba(255, 255, 255, .04);
}

.v-label-btn.is-active {
  color: #38bdf8;
  font-weight: 700;
  background: rgba(56, 189, 248, .08);
}

/* Window information card */

.ventanal-card {
  background: #1e2329;
  border: 1px solid rgba(56, 189, 248, .2);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
  transition: border-color .25s, box-shadow .25s;
}

.ventanal-card:hover {
  border-color: rgba(56, 189, 248, .35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .35);
}

.ventanal-card-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.ventanal-card-icon-wrap {
  width: 38px;
  height: 38px;
  min-width: 38px;
  background: rgba(56, 189, 248, .1);
  border: 1px solid rgba(56, 189, 248, .25);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #38bdf8;
}

.ventanal-card-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.ventanal-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.ventanal-card-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  letter-spacing: .02em;
}

.ventanal-tag-pill {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 700;
  padding: 2px 6px;
  background: rgba(209, 177, 135, .15);
  border: 1px solid rgba(209, 177, 135, .3);
  color: #d1b187;
  border-radius: 4px;
  white-space: nowrap;
}

.ventanal-card-cat {
  font-size: 10.5px;
  color: #94a3b8;
}

.ventanal-card-desc {
  font-size: 11.5px;
  line-height: 1.45;
  color: #cbd5e1;
}

.ventanal-features-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.v-feat-badge {
  font-size: 10px;
  color: #93c5fd;
  background: rgba(147, 197, 253, .08);
  border: 1px solid rgba(147, 197, 253, .18);
  padding: 2px 7px;
  border-radius: 12px;
}

/* Quick window chips */

.ventanal-quick-chips {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.ventanal-chip {
  min-width: 0;
  background: #1a1e23;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 6px;
  padding: 7px 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-family: inherit;
  font-size: 10.5px;
  color: #9ca3af;
  transition: all .2s ease;
}

.ventanal-chip:hover {
  background: #242a32;
  border-color: rgba(255, 255, 255, .18);
  color: #f3f4f6;
}

.ventanal-chip.is-active {
  background: rgba(56, 189, 248, .1);
  border-color: #38bdf8;
  color: #fff;
  font-weight: 600;
}

.v-chip-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #64748b;
  flex-shrink: 0;
}

.ventanal-chip.is-active .v-chip-dot {
  background: #38bdf8;
  box-shadow: 0 0 6px #38bdf8;
}

/* ==========================================================================
   18. FOOTER
   ========================================================================== */

.site-footer {
  background: #0b0c0e;
  color: var(--color-text-light);
  border-top: 1px solid var(--color-carbon-border);
  padding: var(--space-10) 0 var(--space-6);
  zoom: 80%;
}

.footer-top-grid {
  display: grid;
  grid-template-columns: 1.5fr 1.2fr 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-10);
}

.footer-col-title {
  font-size: var(--text-base);
  color: var(--color-white);
  margin-bottom: var(--space-5);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  padding-bottom: var(--space-2);
}

.footer-contact-list li {
  margin-bottom: var(--space-3);
  display: flex;
  flex-direction: column;
}

.contact-lbl {
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--color-olive-light);
  text-transform: uppercase;
}

.contact-val {
  font-size: var(--text-sm);
  color: #cfd6df;
}

.footer-social-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-social-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px 14px;
  background: var(--color-carbon-surface);
  border: 1px solid var(--color-carbon-border);
  color: var(--color-white);
  font-size: var(--text-xs);
  letter-spacing: .08em;
  transition: all var(--transition-fast);
}

.footer-social-btn:hover {
  background: var(--color-petrol);
  border-color: var(--color-petrol-light);
}

.footer-social-btn .icon {
  filter: brightness(0) invert(1);
}

.footer-nav-list li {
  margin-bottom: var(--space-3);
}

.footer-nav-list a {
  font-size: var(--text-sm);
  color: var(--color-text-muted-light);
}

.footer-nav-list a:hover {
  color: var(--color-white);
}

.footer-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding-top: var(--space-5);
}

.footer-bottom-left {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.footer-brand-logo {
  height: 28px;
  width: auto;
  filter: brightness(0) invert(1);
}

.copyright-text {
  font-size: var(--text-xs);
  color: var(--color-text-muted-dark);
}

.back-to-top {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: .15em;
  color: var(--color-petrol-light);
}

.back-to-top:hover {
  color: var(--color-white);
}

/* ==========================================================================
   19. RESPONSIVE — TABLETS
   ========================================================================== */

@media (max-width: 1100px) {
  .nav-left .nav-list,
  .nav-right .nav-list {
    gap: 10px;
  }

  .nav-link {
    font-size: 10px;
    letter-spacing: .08em;
  }

  .editor-workspace-grid {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 20px;
  }

  .editor-controls-panel {
    padding: 18px;
  }
}

@media (max-width: 992px) {
  .nav-group,
  .nav-left,
  .nav-right {
    display: none !important;
  }

  .header-container {
    min-height: 75px;
    justify-content: space-between;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .site-branding {
    padding: 0;
    text-align: left;
  }

  .brand-link {
    width: auto;
    display: flex;
    align-items: center;
  }

  .brand-logo {
    height: 60px;
    width: auto;
  }

  .mobile-drawer .brand-logo-sm {
    height: 48px;
  }

  /* Hamburguesa más grande, con área táctil cómoda */
  .mobile-menu-btn {
    display: flex !important;
    align-items: center;
    gap: 7px;
    width: 44px;
    height: 44px;
    padding: 0;
  }

  .hamburger-bar {
    width: 27px;
    height: 2px;
  }

  .editor-workspace-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-6);
  }

  .editor-controls-panel {
    width: 100%;
  }

  .viewer-display-box {
    height: 460px;
  }

  .footer-top-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-6);
  }
}

/* ==========================================================================
   20. RESPONSIVE — MOBILE
   ========================================================================== */

@media (max-width: 640px) {
  .container {
    width: calc(100% - 28px);
  }

  .top-bar {
    padding: 8px 0 10px;
  }

  .top-bar-inner {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
  }

  .top-bar-left {
    justify-content: center;
  }

  .top-bar-tag {
    letter-spacing: 0.12em;
    text-align: center;
  }

  .top-bar-right {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 14px;
  }

  .header-container {
    min-height: 75px;
  }

  .brand-logo {
    height: 60px;
    width: auto;
  }

  .editor-main-wrapper {
    padding: 32px 0 48px;
  }

  .editor-header-intro {
    margin-bottom: 22px;
  }

  .editor-main-title {
    font-size: 1.45rem;
  }

  .editor-main-desc {
    font-size: 12px;
  }

  .viewer-display-box {
    height: 350px;
    min-height: 280px;
  }

  .editor-viewer-card {
    border-radius: 8px;
  }

  .viewer-3d-floating-hud {
    bottom: 10px;
    right: 10px;
  }

  .hud-actions {
    gap: 5px;
  }

  .hud-btn {
    padding: 7px 9px;
    font-size: 10px;
  }

  .editor-controls-panel {
    padding: 16px;
    gap: 18px;
    border-radius: 8px;
  }

  .materials-palette-strip,
  .wall-textures-palette-strip,
  .lighting-chips-strip {
    gap: 6px;
  }

  .chip-swatch {
    height: 28px;
  }

  .wall-textures-palette-strip .chip-swatch {
    height: 40px;
  }

  .swatches-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .wall-swatch-btn {
    height: 28px;
  }

  .color-picker-top-row {
    flex-wrap: wrap;
  }

  .color-wheel-trigger {
    min-width: 120px;
  }

  .ventanal-slider-labels {
    gap: 1px;
  }

  .v-label-btn {
    font-size: 9px;
  }

  .ventanal-quick-chips {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-top-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .footer-bottom-bar {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }

  .footer-bottom-left {
    flex-direction: column;
    gap: 10px;
  }
}

/* ==========================================================================
   21. SMALL MOBILE DEVICES
   ========================================================================== */

@media (max-width: 380px) {
  .container {
    width: calc(100% - 22px);
  }

  .editor-controls-panel {
    padding: 12px;
  }

  .viewer-display-box {
    height: 300px;
  }

  .material-chip {
    padding: 6px 3px;
  }

  .chip-name {
    font-size: 9px;
  }

  .color-picker-top-row {
    flex-direction: column;
    align-items: stretch;
  }

  .hex-field-wrap {
    width: 100%;
  }

  .hex-text-input {
    flex: 1;
  }

  .ventanal-chip {
    font-size: 9px;
  }

  .ventanal-card-name {
    font-size: 12px;
  }
}

/* ==========================================================================
   22. ACCESSIBILITY AND MOTION
   ========================================================================== */

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

/* ==========================================================================
   END OF LUXBAU INTERNATIONAL ARCHITECTURAL DESIGN SYSTEM
   ========================================================================== */

/* ==========================================================================
   23. BOTÓN MODO TOUR VIRTUAL (WASD + MOUSELOOK - SOLO PC)
   ========================================================================== */
.hud-btn-tour {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.hud-btn-tour.is-active {
  background: rgba(56, 189, 248, 0.22) !important;
  border-color: #38bdf8 !important;
  color: #38bdf8 !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.45);
}

.tour-instructions-hud {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(18, 22, 27, 0.90);
  border: 1px solid rgba(56, 189, 248, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #e2e8f0;
  font-size: 11px;
  padding: 7px 16px;
  border-radius: 20px;
  pointer-events: none;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  user-select: none;
}

.tour-instructions-hud kbd {
  background: #252b34;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 10.5px;
  font-family: monospace;
  font-weight: 600;
  color: #38bdf8;
}

/* Desactivar completamente en versión móvil y dispositivos táctiles puros */
@media (max-width: 992px), (hover: none) and (pointer: coarse) {
  .hud-btn-tour {
    display: none !important;
  }
  .tour-instructions-hud {
    display: none !important;
  }
}