/* ==========================================================================
   PROMIR-BUD Studio — Chat-First Light Architectural Web App
   Clean, airy Scandinavian-modern aesthetic + interactive 2D configurator
   ========================================================================== */

:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --surface-soft: #f3f1ec;
  --surface-hover: #ece9e1;
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #64748b;
  --accent: #d4622a;
  --accent-hover: #b84f1c;
  --accent-soft: rgba(212, 98, 42, 0.1);
  --accent-ring: rgba(212, 98, 42, 0.22);
  --smart: #15803d;
  --smart-soft: rgba(21, 128, 61, 0.1);
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.15);
  --shadow-xs: 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 6px 20px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 16px 40px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 64px rgba(15, 23, 42, 0.12);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --header-h: 68px;
  --chat-w: 380px;
  --ease: 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  --topbar-bg: rgba(250, 249, 246, 0.9);
  --soft-panel: #fcfbf9;
  --price-bg: #fff7f2;
  --smart-bg-grad: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
  --smart-text: #166534;
  --modal-canvas-bg: #f8fafc;
}

/* ==========================================================================
   DARK MODE THEME (html[data-theme="dark"])
   ========================================================================== */

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c1118;
  --surface: #141b24;
  --surface-soft: #1b2431;
  --surface-hover: #243041;
  --ink: #f1f5f9;
  --ink-2: #b4c0cf;
  --ink-3: #8392a5;
  --accent: #ea783f;
  --accent-hover: #f58b54;
  --accent-soft: rgba(234, 120, 63, 0.16);
  --accent-ring: rgba(234, 120, 63, 0.32);
  --smart: #22c55e;
  --smart-soft: rgba(34, 197, 94, 0.16);
  --border: rgba(241, 245, 249, 0.1);
  --border-strong: rgba(241, 245, 249, 0.2);
  --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 18px 42px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 26px 68px rgba(0, 0, 0, 0.62);
  --topbar-bg: rgba(12, 17, 24, 0.88);
  --soft-panel: #10161f;
  --price-bg: rgba(234, 120, 63, 0.12);
  --smart-bg-grad: linear-gradient(135deg, rgba(21, 128, 61, 0.22) 0%, #141b24 100%);
  --smart-text: #86efac;
  --modal-canvas-bg: #0f1620;
}

html[data-theme="dark"] .nav-pill.active,
html[data-theme="dark"] .variant-pill.active,
html[data-theme="dark"] .filter-pill.active,
html[data-theme="dark"] .filter-pill:hover,
html[data-theme="dark"] .wizard-step-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

html[data-theme="dark"] .btn-dark {
  background: #273446;
  color: #f8fafc;
}

html[data-theme="dark"] .btn-dark:hover {
  background: #334155;
}

html[data-theme="dark"] .chat-input-bar,
html[data-theme="dark"] .dock-quick-bar {
  background: var(--soft-panel);
}

html[data-theme="dark"] .price-box,
html[data-theme="dark"] .wall-detail-box {
  background: var(--price-bg);
}

html[data-theme="dark"] .input,
html[data-theme="dark"] .select,
html[data-theme="dark"] .textarea,
html[data-theme="dark"] .module-row input,
html[data-theme="dark"] .module-row select {
  background: #0f1620;
  color: var(--ink);
  border-color: var(--border-strong);
}

html[data-theme="dark"] .wizard-step-btn.done {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.35);
}

html[data-theme="dark"] .status-banner.ok,
html[data-theme="dark"] .sketch-status.ok {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
}

html[data-theme="dark"] .status-banner.err {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
}

html[data-theme="dark"] .sketch-status.warn {
  background: rgba(245, 158, 11, 0.18);
  color: #fcd34d;
}

html[data-theme="dark"] .viewer3d-card,
html[data-theme="dark"] .canvas-board-wrap {
  background: var(--surface);
  border-color: var(--border-strong);
}

html[data-theme="dark"] .viewer3d-stage {
  background: #0f172a;
}

html[data-theme="dark"] .modal-body {
  background: var(--modal-canvas-bg) !important;
}

html[data-theme="dark"] .smart-feature-box {
  background: var(--smart-bg-grad);
  border-color: rgba(34, 197, 94, 0.28);
}

html[data-theme="dark"] .smart-feature-box p {
  color: var(--smart-text) !important;
}

html[data-theme="dark"] .msg.user .msg-bubble {
  background: var(--accent);
  color: #ffffff;
}

html[data-theme="dark"] .msg.bot .msg-bubble {
  background: var(--surface-soft);
  color: var(--ink);
}

html[data-theme="dark"] .preset-btn {
  background: var(--surface-soft);
  color: var(--ink-2);
  border-color: var(--border);
}

html[data-theme="dark"] .preset-btn.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

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

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.mono,
.tabular {
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   TOP MINIMAL NAVIGATION BAR
   ========================================================================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 300;
  height: var(--header-h);
  background: var(--topbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  overflow: visible;
  transition: background var(--ease), border-color var(--ease);
}

.topbar-inner {
  height: 100%;
  max-width: 1520px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  cursor: pointer;
}

.brand img {
  height: 32px;
  width: auto;
}

.brand-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-title {
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--ink);
}

.brand-tag {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-pills {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  box-shadow: var(--shadow-xs);
}

.nav-pill {
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-pill:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.nav-pill.active {
  background: var(--ink);
  color: #ffffff;
}

.nav-pill .dot-ai {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.nav-pill.active .dot-ai {
  background: #ff9a62;
  box-shadow: 0 0 0 3px rgba(255, 154, 98, 0.25);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.lang-toggle {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
}

.lang-toggle button {
  border: 0;
  background: transparent;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-3);
  padding: 4px 9px;
  border-radius: 999px;
  cursor: pointer;
  transition: all var(--ease);
}

.lang-toggle button.active {
  background: var(--accent);
  color: #ffffff;
}

.phone-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  transition: all var(--ease);
}

.phone-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.chat-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(212, 98, 42, 0.35);
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-size: 0.83rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--ease);
}

.chat-toggle-btn:hover {
  background: var(--accent);
  color: #ffffff;
}

.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mobile-nav-bar {
  display: none;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-nav-bar .nav-pill {
  padding: 7px 12px;
  font-size: 0.82rem;
  border: 1px solid var(--border);
}

/* ==========================================================================
   HOVER DROPDOWN NAVIGATION, THEME TOGGLE & MOBILE SUBMENU
   ========================================================================== */

.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-trigger .nav-caret {
  width: 13px;
  height: 13px;
  opacity: 0.72;
  transition: transform 0.18s ease;
  flex-shrink: 0;
}

.nav-dropdown:hover .nav-dropdown-trigger,
.nav-dropdown.open .nav-dropdown-trigger {
  background: var(--surface-soft);
  color: var(--ink);
}

.nav-dropdown:hover .nav-dropdown-trigger.active,
.nav-dropdown.open .nav-dropdown-trigger.active {
  background: var(--ink);
  color: #ffffff;
}

html[data-theme="dark"] .nav-dropdown:hover .nav-dropdown-trigger.active,
html[data-theme="dark"] .nav-dropdown.open .nav-dropdown-trigger.active {
  background: var(--accent);
  color: #ffffff;
}

.nav-dropdown:hover .nav-dropdown-trigger .nav-caret,
.nav-dropdown.open .nav-dropdown-trigger .nav-caret {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  padding-top: 8px; /* seamless hover bridge */
  display: none;
  z-index: 500;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-panel {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 5px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

html[data-theme="dark"] .nav-dropdown-panel {
  background: #18212d;
  border-color: rgba(241, 245, 249, 0.2);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.65);
}

.nav-dropdown-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: background 0.14s ease, color 0.14s ease;
}

.nav-dropdown-item strong {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}

.nav-dropdown-item small {
  font-size: 0.72rem;
  color: var(--ink-2);
  font-weight: 500;
}

.nav-dropdown-item:hover {
  background: var(--accent);
  color: #ffffff;
}

.nav-dropdown-item:hover strong,
.nav-dropdown-item:hover small {
  color: #ffffff;
}

.nav-dropdown-item.active {
  background: var(--accent-soft);
}

.nav-dropdown-item.active strong {
  color: var(--accent);
}

.nav-dropdown-item.active:hover {
  background: var(--accent);
}

.nav-dropdown-item.active:hover strong,
.nav-dropdown-item.active:hover small {
  color: #ffffff;
}

/* Light / Dark Theme Toggle */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--ease);
  flex-shrink: 0;
}

.theme-toggle-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.theme-toggle-btn .icon-sun {
  display: none;
}

.theme-toggle-btn .icon-moon {
  display: inline-flex;
}

html[data-theme="dark"] .theme-toggle-btn .icon-sun {
  display: inline-flex;
}

html[data-theme="dark"] .theme-toggle-btn .icon-moon {
  display: none;
}

/* Mobile Submenu Strip */
.mobile-submenu-bar {
  display: none;
  background: var(--surface);
  border-bottom: 2px solid var(--accent);
  box-shadow: var(--shadow-sm);
  padding: 10px 14px;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-submenu-bar.open {
  display: flex;
}

.mobile-sub-pill {
  border: 1px solid var(--border-strong);
  background: var(--surface-soft);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--ease);
}

.mobile-sub-pill.active,
.mobile-sub-pill:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

/* Subpages Content Grids (O Nas, Pawilony Technologia, Proces, Współpraca) */
.info-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.info-cards-grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.info-card-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.info-card h3 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
}

.info-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.info-card ul {
  margin: 4px 0 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--ink-2);
}

.timeline-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-xs);
}

.timeline-year {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.timeline-card h3 {
  margin: 0 0 6px;
  font-size: 1.02rem;
}

.timeline-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-2);
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.process-step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-xs);
}

.process-num {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.process-step-card h3 {
  margin: 0;
  font-size: 0.96rem;
}

.process-step-card p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--ink-2);
}

@media (max-width: 1140px) {
  .process-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .info-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .info-cards-grid,
  .info-cards-grid.cols-2,
  .timeline-list,
  .process-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ==========================================================================
   APP SHELL: LIVING STAGE + DOCKED AI CONCIERGE
   ========================================================================== */

.app-shell {
  max-width: 1520px;
  margin: 0 auto;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  position: relative;
}

.stage {
  flex: 1;
  min-width: 0;
  padding: 28px 28px 64px;
  transition: all var(--ease);
}

.view {
  display: none;
  animation: fadeUp 0.28s var(--ease);
}

.view.active {
  display: block;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   VIEW 1: CHAT-FIRST START / ASYSTENT HERO
   ========================================================================== */

.chat-home {
  max-width: 880px;
  margin: 18px auto 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.home-greeting {
  text-align: center;
  padding: 10px 0 4px;
}

.greeting-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-2);
  box-shadow: var(--shadow-xs);
  margin-bottom: 16px;
}

.greeting-badge .pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
}

.home-greeting h1 {
  margin: 0 0 12px;
  font-size: clamp(1.9rem, 3.6vw, 2.85rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.home-greeting h1 span {
  color: var(--accent);
}

.home-greeting p {
  margin: 0 auto;
  max-width: 620px;
  color: var(--ink-2);
  font-size: 1.02rem;
}

/* Main Conversational Box on Start View */
.chat-stage-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.chat-messages {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 360px;
  overflow-y: auto;
}

.msg {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 88%;
}

.msg.bot {
  align-self: flex-start;
}

.msg.user {
  align-self: flex-end;
  align-items: flex-end;
}

.msg-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.94rem;
  line-height: 1.55;
}

.msg.bot .msg-bubble {
  background: var(--surface-soft);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}

.msg.user .msg-bubble {
  background: var(--ink);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.msg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.msg-action-btn {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all var(--ease);
}

.msg-action-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.msg-action-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.msg-action-btn.primary:hover {
  background: var(--accent-hover);
}

.chat-input-bar {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  background: #fcfbf9;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-input-bar input {
  flex: 1;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 0.94rem;
  outline: none;
  transition: border-color var(--ease), box-shadow var(--ease);
}

.chat-input-bar input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.chat-send-btn {
  border: 0;
  background: var(--accent);
  color: #ffffff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--ease);
}

.chat-send-btn:hover {
  background: var(--accent-hover);
  transform: scale(1.04);
}

/* Starter Suggestion Chips */
.starter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.starter-chip {
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 15px 16px;
  cursor: pointer;
  transition: all var(--ease);
  display: flex;
  flex-direction: column;
  gap: 5px;
  box-shadow: var(--shadow-xs);
}

.starter-chip:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.starter-chip strong {
  font-size: 0.9rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 7px;
}

.starter-chip span {
  font-size: 0.8rem;
  color: var(--ink-3);
}

/* Visual Preview Strip on Home */
.home-showcase-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.mini-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  padding: 0;
  transition: all var(--ease);
}

.mini-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.mini-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.mini-card-body {
  padding: 8px 10px;
}

.mini-card-body strong {
  display: block;
  font-size: 0.8rem;
  color: var(--ink);
}

.mini-card-body span {
  font-size: 0.72rem;
  color: var(--ink-3);
}

/* ==========================================================================
   DOCKED AI CONCIERGE SIDEBAR (Active on subpages)
   ========================================================================== */

.chat-dock {
  width: var(--chat-w);
  flex-shrink: 0;
  border-left: 1px solid var(--border);
  background: var(--surface);
  height: calc(100vh - var(--header-h));
  position: sticky;
  top: var(--header-h);
  display: flex;
  flex-direction: column;
  transition: all var(--ease);
}

.app-shell.home-mode .chat-dock,
.app-shell.dock-collapsed .chat-dock {
  display: none;
}

.dock-header {
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dock-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.dock-avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8rem;
}

.dock-title strong {
  display: block;
  font-size: 0.88rem;
}

.dock-title span {
  display: block;
  font-size: 0.74rem;
  color: var(--smart);
  font-weight: 600;
}

.dock-close {
  border: 1px solid var(--border);
  background: transparent;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink-2);
}

.dock-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dock-quick-bar {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 6px;
  overflow-x: auto;
  background: #fcfbf9;
}

.dock-quick-bar button {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  cursor: pointer;
}

.dock-quick-bar button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ==========================================================================
   SUBPAGE SHARED HEADER & BUTTONS
   ========================================================================== */

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.page-head h1,
.page-head h2 {
  margin: 6px 0 6px;
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.page-head p {
  margin: 0;
  color: var(--ink-2);
  max-width: 680px;
  font-size: 0.96rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-size: 0.87rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-dark {
  background: var(--ink);
  color: #ffffff;
}

.btn-dark:hover {
  background: #1e293b;
}

.btn-outline {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--ink);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* ==========================================================================
   CATALOG CARDS (DOMY & PAWILONY — 3 CLEAN CARDS EACH)
   ========================================================================== */

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xs);
  transition: all var(--ease);
}

.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.product-card.highlighted {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-ring), var(--shadow-md);
}

.product-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--surface-soft);
  overflow: hidden;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.product-card:hover .product-media img {
  transform: scale(1.03);
}

.media-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.pill-badge {
  background: rgba(15, 23, 42, 0.82);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

.pill-badge.accent {
  background: var(--accent);
}

.photo-switch-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(15, 23, 42, 0.78);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.product-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.product-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.product-title-row h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
}

.product-subtitle {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-3);
}

.product-desc {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-2);
}

.variant-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.variant-pill {
  border: 1px solid var(--border-strong);
  background: var(--surface-soft);
  color: var(--ink-2);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--ease);
}

.variant-pill.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 12px;
  background: var(--surface-soft);
  border-radius: 12px;
}

.spec-cell span {
  display: block;
  font-size: 0.71rem;
  color: var(--ink-3);
}

.spec-cell strong {
  font-size: 0.86rem;
  color: var(--ink);
}

.price-box {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 12px;
  background: #fff7f2;
  border: 1px solid rgba(212, 98, 42, 0.2);
  border-radius: 12px;
}

.price-box span {
  display: block;
  font-size: 0.71rem;
  color: var(--ink-2);
}

.price-box strong {
  font-size: 0.92rem;
  color: var(--accent-hover);
}

.product-actions {
  margin-top: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 6px;
}

.product-actions .full {
  grid-column: 1 / -1;
}

/* ==========================================================================
   GRAPHIC 2D CONFIGURATOR (BLUEPRINT + ELEVATION SVG + AUTO-OFFER)
   ========================================================================== */

.config-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 22px;
  align-items: start;
}

.blueprint-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.blueprint-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.preset-btn {
  border: 1px solid var(--border-strong);
  background: var(--surface-soft);
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 0.77rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--ease);
}

.preset-btn:hover,
.preset-btn.active {
  background: var(--ink);
  color: #ffffff;
  border-color: var(--ink);
}

.canvas-dual {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.svg-stage {
  background: #fdfcfa;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  position: relative;
}

.svg-stage-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-3);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.svg-stage svg {
  width: 100%;
  height: auto;
  display: block;
}

.metrics-ribbon {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.metric-box {
  background: var(--surface-soft);
  border-radius: 12px;
  padding: 12px;
}

.metric-box span {
  display: block;
  font-size: 0.72rem;
  color: var(--ink-3);
}

.metric-box strong {
  font-size: 1.05rem;
  color: var(--ink);
}

/* Right side Controls + Auto-Offer Form */
.controls-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.control-section-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin: 0 0 8px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink);
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  font-size: 0.88rem;
  outline: none;
  transition: border-color var(--ease), box-shadow var(--ease);
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.module-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.module-row {
  display: grid;
  grid-template-columns: 1fr 78px 78px 72px 32px;
  gap: 6px;
  align-items: center;
  background: var(--surface-soft);
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.8rem;
}

.module-row input,
.module-row select {
  padding: 6px 8px;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  font-size: 0.8rem;
  width: 100%;
}

.icon-del-btn {
  border: 0;
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.toggle-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.toggle-chip.smart-opt {
  border-color: rgba(21, 128, 61, 0.35);
  background: rgba(21, 128, 61, 0.05);
}

.toggle-chip input {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

.toggle-chip.smart-opt input {
  accent-color: var(--smart);
}

.offer-submit-box {
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.status-banner {
  display: none;
  padding: 13px 15px;
  border-radius: 12px;
  font-size: 0.86rem;
}

.status-banner.show {
  display: block;
}

.status-banner.ok {
  background: #ecfdf5;
  border: 1px solid #86efac;
  color: #14532d;
}

.status-banner.err {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #7f1d1d;
}

/* ==========================================================================
   TECHNOLOGY VIEW (INTERACTIVE PUR WALL + SMART HOME)
   ========================================================================== */

.tech-split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 22px;
  align-items: start;
}

.panel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-xs);
}

.wall-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.wall-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  text-align: left;
  cursor: pointer;
  transition: all var(--ease);
}

.wall-row:hover,
.wall-row.active {
  background: #fff7f2;
  border-color: var(--accent);
}

.wall-row.pur {
  background: rgba(212, 98, 42, 0.1);
  border-color: rgba(212, 98, 42, 0.45);
}

.wall-row.smart {
  border-color: rgba(21, 128, 61, 0.35);
}

.wall-idx {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wall-row.pur .wall-idx {
  background: var(--accent);
}

.wall-row.smart .wall-idx {
  background: var(--smart);
}

.wall-row strong {
  display: block;
  font-size: 0.9rem;
}

.wall-row small {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-2);
}

.wall-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-2);
}

.wall-detail-box {
  margin-top: 14px;
  padding: 15px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: #f8fafc;
  font-size: 0.89rem;
  line-height: 1.55;
}

.smart-feature-box {
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
  border: 1px solid rgba(21, 128, 61, 0.25);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-top: 16px;
}

.smart-feature-box h3 {
  margin: 0 0 8px;
  color: #14532d;
}

/* ==========================================================================
   GALLERY & CONTACT VIEWS
   ========================================================================== */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gal-tile {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border);
  padding: 0;
  cursor: pointer;
  background: var(--surface-soft);
}

.gal-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.gal-tile:hover img {
  transform: scale(1.05);
}

.gal-cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 24px 14px 12px;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.86), transparent);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: left;
}

.history-banner {
  margin-top: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  align-items: center;
}

.partner-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.partner-chips span {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 700;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 22px;
}

.contact-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.contact-item:last-child {
  border-bottom: 0;
}

.contact-item small {
  display: block;
  font-size: 0.75rem;
  color: var(--ink-3);
}

/* ==========================================================================
   MODAL / LIGHTBOX (FLOOR PLANS & REALIZATIONS)
   ========================================================================== */

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(15, 23, 42, 0.84);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal.open {
  display: flex;
}

.modal-box {
  max-width: 980px;
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.modal-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-head strong {
  font-size: 0.95rem;
}

.modal-close {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.15rem;
}

.modal-body {
  padding: 16px;
  background: #f8fafc;
  display: flex;
  justify-content: center;
}

.modal-body img {
  max-height: 76vh;
  width: auto;
  object-fit: contain;
  border-radius: 8px;
}

/* Floating mobile chat button */
.mobile-chat-fab {
  display: none;
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 95;
  border: 0;
  background: var(--accent);
  color: #ffffff;
  padding: 13px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.88rem;
  box-shadow: 0 12px 30px rgba(212, 98, 42, 0.4);
  cursor: pointer;
  align-items: center;
  gap: 8px;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.site-mini-footer {
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--ink-3);
}

.site-mini-footer a:hover {
  color: var(--accent);
}

/* ==========================================================================
   4-STEP CONFIGURATOR WIZARD & INTERACTIVE CANVAS 2D SKETCHER
   ========================================================================== */

.wizard-stepper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.wizard-step-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: all var(--ease);
}

.wizard-step-btn:hover {
  border-color: var(--border-strong);
}

.wizard-step-btn.active {
  background: var(--ink);
  color: #ffffff;
  border-color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.wizard-step-btn.done {
  border-color: rgba(21, 128, 61, 0.35);
  background: #f0fdf4;
}

.wizard-step-btn.done .wstep-num {
  background: var(--smart);
  color: #ffffff;
}

.wstep-num {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wizard-step-btn.active .wstep-num {
  background: var(--accent);
  color: #ffffff;
}

.wstep-text strong {
  display: block;
  font-size: 0.84rem;
  line-height: 1.2;
}

.wstep-text span {
  display: block;
  font-size: 0.72rem;
  opacity: 0.72;
}

.wizard-pane {
  display: none;
  animation: fadeUp 0.22s var(--ease);
}

.wizard-pane.active {
  display: block;
}

.wizard-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.wizard-footer-nav {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.sketch-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: 18px;
  align-items: start;
}

.sketch-shell > *,
.wizard-cards-grid > *,
.summary-preview-grid > *,
.panel-card {
  min-width: 0;
  max-width: 100%;
}

.canvas-board-wrap {
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  max-width: 100%;
}

.canvas-board-wrap canvas {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  touch-action: none;
  cursor: grab;
  background: #fdfcfa;
}

.canvas-board-wrap canvas:active {
  cursor: grabbing;
}

.sketch-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.sketch-status.ok {
  background: #dcfce7;
  color: #166534;
}

.sketch-status.warn {
  background: #fef3c7;
  color: #92400e;
}

.sketch-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.sketch-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.filter-pill {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink-2);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--ease);
}

.filter-pill.active,
.filter-pill:hover {
  background: var(--ink);
  color: #ffffff;
  border-color: var(--ink);
}

.summary-preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.sketch-thumb {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fdfcfa;
}

.tool-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  background: var(--surface-soft);
  border-radius: 12px;
  margin-bottom: 12px;
  align-items: center;
}

.tool-btn {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  padding: 7px 11px;
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--ease);
}

.tool-btn:hover {
  border-color: var(--accent);
}

.tool-btn.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.viewer3d-card {
  margin-top: 14px;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.viewer3d-bar {
  padding: 10px 14px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.viewer3d-stage {
  width: 100%;
  max-width: 100%;
  height: 360px;
  background: #f1f5f9;
  position: relative;
  overflow: hidden;
}

.viewer3d-stage canvas {
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  display: block;
}

.metrics-ribbon-5 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

@media (max-width: 900px) {
  .metrics-ribbon-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1220px) {
  .wizard-cards-grid,
  .sketch-shell,
  .summary-preview-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .wizard-stepper {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .viewer3d-stage {
    height: 270px;
  }
  .btn {
    white-space: normal;
    max-width: 100%;
    text-align: center;
  }
  .wizard-footer-nav .btn {
    width: 100%;
  }
}

/* ==========================================================================
   RESPONSIVE (Tested across 375px, 768px, 1024px, 1280px, 1440px+)
   ========================================================================== */

@media (max-width: 1460px) {
  :root {
    --chat-w: 340px;
  }

  .app-shell:not(.dock-collapsed):not(.home-mode) .config-layout {
    grid-template-columns: 1fr;
  }

  .app-shell:not(.dock-collapsed):not(.home-mode) .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1360px) {
  .nav-pill {
    padding: 7px 11px;
    font-size: 0.81rem;
  }

  .phone-chip {
    display: none;
  }
}

@media (max-width: 1220px) {
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .config-layout,
  .tech-split,
  .contact-grid,
  .history-banner {
    grid-template-columns: 1fr;
  }

  .partner-chips {
    justify-content: flex-start;
  }

  .chat-dock {
    position: fixed;
    right: 0;
    top: var(--header-h);
    z-index: 98;
    width: 360px;
    max-width: 100vw;
    box-shadow: var(--shadow-lg);
  }
}

@media (max-width: 1180px) {
  .brand-tag,
  .theme-toggle-btn .theme-label,
  .chat-toggle-btn {
    display: none;
  }
  .topbar-inner {
    padding: 0 12px;
    gap: 6px;
  }
  .brand-title {
    font-size: 0.86rem;
  }
  .brand img {
    height: 26px;
  }
  .nav-pills {
    gap: 2px;
    padding: 3px;
  }
  .nav-pill {
    padding: 5px 8px;
    font-size: 0.77rem;
    gap: 4px;
  }
  .topbar-right {
    gap: 6px;
  }
}

@media (min-width: 781px) {
  .mobile-submenu-bar,
  .mobile-submenu-bar.open {
    display: none !important;
  }
}

@media (max-width: 780px) {
  .nav-pills {
    display: none;
  }
  .mobile-nav-bar {
    display: flex;
  }
  .starter-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .home-showcase-strip {
    grid-template-columns: repeat(3, 1fr);
  }
  .mobile-chat-fab {
    display: inline-flex;
  }
  .app-shell.home-mode .mobile-chat-fab {
    display: none;
  }
  .chat-dock {
    width: 100%;
    max-width: 420px;
    height: calc(100dvh - var(--header-h));
  }
}

@media (max-width: 760px) {
  .stage {
    padding: 18px 14px 92px;
  }

  .catalog-grid,
  .gallery-grid,
  .starter-grid,
  .field-grid,
  .toggle-grid {
    grid-template-columns: 1fr;
  }

  .metrics-ribbon {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-showcase-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .module-row {
    grid-template-columns: repeat(3, 1fr) 32px;
  }

  .module-row input[data-field="description"] {
    grid-column: 1 / -1;
  }

  .product-actions {
    grid-template-columns: 1fr;
  }

  .chat-toggle-btn {
    display: none;
  }

  .brand-tag {
    display: none;
  }

  .chat-messages {
    padding: 16px;
    max-height: 44dvh;
  }

  .modal {
    padding: 12px;
  }

  .modal-box {
    max-height: 92dvh;
    overflow-y: auto;
  }
}

/* ==========================================================================
   PROMIR-BUD 3D HOME STUDIO (HOMESTYLER-GRADE 2D + 3D WORKSPACE)
   ========================================================================== */

.studio-info-callout {
  margin: 0 0 12px;
  font-size: 0.84rem;
  color: var(--ink-2);
  background: var(--price-bg);
  border: 1px solid rgba(212, 98, 42, 0.25);
  padding: 10px 12px;
  border-radius: 10px;
}

.studio-shell {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.studio-topbar {
  padding: 10px 14px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.studio-top-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.studio-seg {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}

.studio-seg-btn {
  border: 0;
  background: transparent;
  color: var(--ink-2);
  padding: 6px 11px;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--ease);
}

.studio-seg-btn:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.studio-seg-btn.active {
  background: var(--accent);
  color: #ffffff;
}

.studio-floor-pills {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}

.studio-btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.studio-cmd-btn {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--ease);
}

.studio-cmd-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.studio-cmd-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.studio-cmd-btn.accent-soft {
  background: var(--accent-soft);
  border-color: rgba(212, 98, 42, 0.35);
  color: var(--accent);
}

.studio-cmd-btn.accent-soft:hover {
  background: var(--accent);
  color: #ffffff;
}

.studio-cmd-btn.danger:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

.studio-autosave-strip {
  padding: 8px 14px;
  background: var(--accent-soft);
  border-bottom: 1px solid rgba(212, 98, 42, 0.25);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
}

.studio-workspace {
  display: grid;
  grid-template-columns: 296px minmax(0, 1fr);
  min-height: 540px;
}

.studio-sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-height: 620px;
}

.studio-cat-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
  padding: 6px 6px 0;
  gap: 3px;
}

.studio-cat-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--ink-2);
  padding: 7px 2px 8px;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 0.92rem;
  transition: all var(--ease);
}

.studio-cat-tab span {
  font-size: 0.67rem;
  font-weight: 700;
  line-height: 1.1;
}

.studio-cat-tab:hover {
  color: var(--ink);
  background: var(--surface-hover);
}

.studio-cat-tab.active {
  background: var(--surface);
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.studio-cat-pane {
  display: none;
  padding: 12px;
  overflow-y: auto;
  flex: 1;
}

.studio-cat-pane.active {
  display: block;
}

.studio-sec-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin-bottom: 6px;
}

.studio-hint-small {
  margin: 0 0 10px;
  font-size: 0.76rem;
  color: var(--ink-2);
  line-height: 1.4;
}

.studio-info-pill {
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  font-size: 0.77rem;
  font-weight: 700;
  color: var(--ink);
}

.studio-preset-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

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

.studio-catalog-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.studio-catalog-group {
  font-size: 0.69rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin: 8px 0 2px;
}

.studio-catalog-group:first-child {
  margin-top: 0;
}

.studio-item-card {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--ink);
  border-radius: 10px;
  padding: 8px 9px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  transition: all 0.16s ease;
}

.studio-item-card:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
}

.studio-item-card.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-ring);
}

.studio-item-card .s-ico {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  overflow: hidden;
}

.studio-item-card .s-ico img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2px;
  background: #ffffff;
}

.studio-item-card strong {
  display: block;
  font-size: 0.79rem;
  font-weight: 700;
  line-height: 1.2;
}

.studio-item-card small {
  display: block;
  font-size: 0.7rem;
  color: var(--ink-3);
  line-height: 1.25;
}

.studio-inspector {
  border-top: 1px solid var(--border);
  background: var(--surface-soft);
  padding: 11px 12px;
}

/* Viewport & View Modes */
.studio-viewport {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-width: 0;
  background: var(--bg);
}

.studio-shell[data-view-mode="2d"] .studio-viewport {
  grid-template-columns: minmax(0, 1fr);
}

.studio-shell[data-view-mode="2d"] .studio-pane-3d {
  display: none;
}

.studio-shell[data-view-mode="3d"] .studio-viewport {
  grid-template-columns: minmax(0, 1fr);
}

.studio-shell[data-view-mode="3d"] .studio-pane-2d {
  display: none;
}

.studio-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
}

.studio-pane-2d {
  border-right: 1px solid var(--border);
}

.studio-shell[data-view-mode="2d"] .studio-pane-2d {
  border-right: 0;
}

.studio-hud {
  padding: 8px 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.studio-hud-btn {
  border: 1px solid var(--border-strong);
  background: var(--surface-soft);
  color: var(--ink);
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.studio-hud-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.studio-hud-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.studio-hud-hint {
  font-size: 0.73rem;
  color: var(--ink-2);
  font-weight: 600;
  flex: 1;
  min-width: 140px;
  text-align: center;
}

.studio-zoom-readout {
  font-size: 0.73rem;
  font-weight: 800;
  min-width: 38px;
  text-align: center;
  color: var(--ink-2);
}

.studio-canvas-wrap {
  border: 0;
  border-radius: 0;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 460px;
  max-height: 560px;
  overflow: hidden;
}

.studio-canvas-wrap canvas {
  width: 100%;
  height: 100%;
  max-height: 560px;
  object-fit: contain;
}

.studio-3d-stage {
  flex: 1;
  min-height: 460px;
  height: 560px;
}

.studio-toast {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%) translateY(10px);
  background: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 0.22s ease;
  z-index: 20;
  max-width: 92%;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.studio-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.metrics-ribbon-6 {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 14px;
  background: var(--surface-soft);
  border-top: 1px solid var(--border);
}

@media (max-width: 1280px) {
  .studio-viewport {
    grid-template-columns: minmax(0, 1fr);
  }
  .studio-pane-2d {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .metrics-ribbon-6 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .studio-workspace {
    grid-template-columns: minmax(0, 1fr);
  }
  .studio-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    max-height: 360px;
  }
  .studio-canvas-wrap,
  .studio-canvas-wrap canvas {
    min-height: 310px;
  }
  .studio-3d-stage {
    min-height: 320px;
    height: 320px;
  }
}

@media (max-width: 760px) {
  .metrics-ribbon-6 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .studio-hud-hint {
    display: none;
  }
}
