/* ============================================
   GROEPENKAST CONFIGURATOR STYLES
   Aligned with MiB  main site design
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Work+Sans:wght@300;400;500;600;700;800&display=swap');

/* Override body background for this page */
body {
  background-color: #ffffff !important;
}

:root {
  --slot-w: 38px;
  --slot-gap: 2px;
}

/* --- Page Layout --- */
.configurator-page {
  font-family: 'Work Sans', sans-serif;
  min-height: 100vh;
  background: #ffffff;
  padding: 80px 0;
  color: #898798;
}

.configurator-page .page-title {
  text-align: center;
  margin-bottom: 40px;
  padding-top: 80px;
}

.configurator-page .page-title .subhead {
  display: block;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: #898798;
  font-weight: 500;
  margin-bottom: 8px;
}

.configurator-page .page-title h1 {
  font-size: 2rem;
  font-weight: bold;
  color: #707780;
  letter-spacing: -0.3px;
}

.configurator-page .page-title .divider {
  display: block;
  margin: 16px auto 25px;
  width: 32px;
  height: 3px;
  border-radius: 40px;
  background-color: #ff9600;
}

.configurator-page .page-title p {
  color: #898798;
  font-size: 1rem;
  margin-top: 0;
}

.configurator-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  flex-wrap: wrap;
  justify-content: center;
}

/* ===== WIZARD STYLES ===== */
.wizard-container {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}

.wizard-progress {
  margin-bottom: 40px;
  text-align: center;
  position: relative;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.progress-track {
  height: 4px;
  background: #f0eef8;
  position: absolute;
  top: 16px;
  left: 40px;
  right: 40px;
  border-radius: 2px;
  z-index: 1;
}

.progress-bar {
  height: 100%;
  background: #ff9600;
  width: 25%;
  /* updated via JS */
  border-radius: 2px;
  transition: width 0.4s ease;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #9090a8;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 80px;
}

.step-circle {
  width: 36px;
  height: 36px;
  background: #ffffff;
  border: 2px solid #e0dcea;
  border-radius: 50%;
  margin-bottom: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  color: #9090a8;
  position: relative;
  z-index: 2;
}

.step-label {
  text-align: center;
  transition: all 0.3s ease;
}

.progress-step:hover .step-circle {
  border-color: #ffb84d;
  color: #ff9600;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(255, 150, 0, 0.15);
}

.progress-step.active {
  color: #ff9600;
  font-weight: 800;
}

.progress-step.active .step-circle {
  border-color: #ff9600;
  color: #ffffff;
  background: linear-gradient(135deg, #ff9600, #ff7b00);
  box-shadow: 0 4px 12px rgba(255, 123, 0, 0.3);
  transform: scale(1.1);
}

.progress-step.completed .step-circle {
  background: #ff9600;
  border-color: #ff9600;
  color: #ffffff;
}

.progress-step.completed .step-label {
  color: #2D2B3A;
  font-weight: 600;
}

.wizard-step {
  display: none;
  animation: fadeIn 0.4s ease;
}

.wizard-step.active {
  display: block;
}

.step-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2D2B3A;
  text-align: center;
  margin-bottom: 8px;
}

.step-desc {
  text-align: center;
  color: #898798;
  margin-bottom: 30px;
}

.info-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #f0f4ff;
  border-left: 4px solid #4a6cf7;
  border-radius: 6px;
  padding: 14px 18px;
  margin-bottom: 28px;
  color: #555;
  font-size: 0.92rem;
  line-height: 1.6;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.info-tip i {
  color: #4a6cf7;
  margin-top: 2px;
  flex-shrink: 0;
}

/* Bouwwijze comparison table */

.wizard-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #f0eef8;
}

.wizard-actions.right-only {
  justify-content: flex-end;
}

.btn-wizard {
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.btn-wizard i {
  margin-left: 6px;
}

.btn-wizard.btn-outline-secondary i {
  margin-left: 0;
  margin-right: 6px;
}

.fase-cards-container {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.fase-card {
  cursor: pointer;
  flex: 1;
  min-width: 250px;
  max-width: 320px;
}

.fase-card input[type="radio"] {
  display: none;
}

.fase-card-content {
  background: #fff;
  border: 2px solid #e0dcea;
  border-radius: 12px;
  padding: 30px 20px;
  text-align: center;
  transition: all 0.3s ease;
  height: 100%;
}

.fase-card-content i {
  color: #e0dcea;
  margin-bottom: 15px;
  transition: color 0.3s ease;
}

.fase-card-content h3 {
  font-size: 1.25rem;
  color: #2D2B3A;
  margin-bottom: 10px;
  font-weight: 700;
}

.fase-card-content p {
  font-size: 0.9rem;
  color: #898798;
  margin: 0;
  line-height: 1.5;
}

.fase-card input[type="radio"]:checked+.fase-card-content {
  border-color: #ff9600;
  box-shadow: 0 4px 15px rgba(255, 150, 0, 0.15);
}

.fase-card input[type="radio"]:checked+.fase-card-content i {
  color: #ff9600;
}

.central-card {
  max-width: 500px;
  margin: 0 auto;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Notification --- */
.config-notification {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 9999;
  transition: all 0.3s ease;
  font-family: 'Work Sans', sans-serif;
  box-shadow: 0 3px 12px rgba(95, 92, 120, 0.2);
}

.config-notification.warning {
  background: #FF4943;
  color: #fff;
}

.config-notification.success {
  background: #35bb78;
  color: #fff;
}

.config-notification i {
  margin-right: 8px;
}

/* ===== LEFT PANEL: MODULES ===== */
.modules-panel,
.summary-panel {
  width: 340px;
  flex-shrink: 0;
}

.config-card {
  background: #ffffff;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 3px 12px rgba(95, 92, 120, 0.12);
  margin-bottom: 20px;
  position: relative;
}

.config-card h4 {
  color: #2D2B3A;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.config-card h4 i {
  color: #ff9600;
}

/* Module row */
.module-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 10px;
  border-radius: 6px;
  margin-bottom: 4px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.module-row:hover {
  background: #F6F5FC;
}

.module-row.has-items {
  background: #FFF8F0;
  border-color: rgba(255, 150, 0, 0.2);
}

.module-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.module-info-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.module-info-btn {
  color: #B4B2C5;
  font-size: 14px;
  cursor: help;
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.module-info-btn:hover {
  color: #ff9600;
}

.module-name {
  font-size: 0.78rem;
  color: #2D2B3A;
  font-weight: 500;
  line-height: 1.3;
}

.module-slots-tag {
  font-size: 0.6rem;
  color: #898798;
  background: #F6F5FC;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

/* Quantity controls */
.module-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: 10px;
}

.module-toggle-label {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: 10px;
  margin-bottom: 0px;
  line-height: 0;
}

.qty-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid #EDECF5;
  background: #F6F5FC;
  color: #707780;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.2s ease;
}

.qty-btn:hover {
  background: #ff9600;
  border-color: #ff9600;
  color: #fff;
}

.qty-btn:active {
  transform: scale(0.92);
}

.qty-plus {
  background: #ff9600;
  border-color: #ff9600;
  color: #fff;
}

.qty-plus:hover {
  background: #e08600;
  border-color: #e08600;
}

.qty-display {
  width: 28px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #2D2B3A;
}

/* ===== CENTER PANEL: KAST VISUAL ===== */
.kast-panel {
  flex: 1;
  min-width: 520px;
  max-width: 600px;
}

.kast-container {
  background: #ffffff;
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 3px 12px rgba(95, 92, 120, 0.12);
  position: relative;
}

.kast-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.kast-header h3 {
  color: #2D2B3A;
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.kast-header .icon {
  width: 32px;
  height: 32px;
  background: #ff9600;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
  box-shadow: 0 2px 4px rgba(95, 92, 120, 0.16);
}

/* Capacity bar */
.capacity-section {
  margin-bottom: 20px;
}

.capacity-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #898798;
  margin-bottom: 6px;
}

.capacity-labels strong {
  color: #ff9600;
}

.capacity-track {
  height: 6px;
  background: #EDECF5;
  border-radius: 3px;
  overflow: hidden;
}

.capacity-bar {
  height: 100%;
  background: linear-gradient(90deg, #ff9600, #ffb347);
  border-radius: 3px;
  transition: width 0.5s ease, background 0.3s ease;
  width: 0%;
}

.capacity-free {
  font-size: 0.72rem;
  color: #898798;
  text-align: right;
  margin-top: 4px;
}

/* Center the kast visual */
#kast-visual {
  display: flex;
  justify-content: center;
}

/* --- The Groepenkast (Distribution Board) --- */
.groepenkast {
  background: linear-gradient(180deg, #d4d8e0, #bcc2cc, #a8aeb8);
  border-radius: 8px;
  padding: 20px 16px 16px;
  position: relative;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -2px 4px rgba(0, 0, 0, 0.1);
  border: 2px solid #9aa0ac;
  /* Standard width: 12 modules × 40px per slot + gaps + padding = ~520px */
  width: 520px;
  max-width: 100%;
  transition: all 0.4s ease;
}

/* ABB → matte black kast */
.groepenkast.kast-abb {
  background: linear-gradient(180deg, #2a2a2a, #1a1a1a, #111111);
  border-color: #000;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -2px 4px rgba(0, 0, 0, 0.4);
}

.groepenkast.kast-abb .din-rail {
  background: linear-gradient(180deg, #555 0%, #444 50%, #555 100%);
}

.groepenkast.kast-abb .blind-plate {
  background: linear-gradient(180deg, #2e2e2e, #222);
  border-color: #111;
}

.groepenkast.kast-abb::before,
.groepenkast.kast-abb::after,
.groepenkast.kast-abb .kast-screws-bottom::before,
.groepenkast.kast-abb .kast-screws-bottom::after {
  background: radial-gradient(circle at 40% 40%, #555, #222);
}

/* Hager → off-white / light grey kast */
.groepenkast.kast-hager {
  background: linear-gradient(180deg, #f5f5f5, #e8e8e8, #dcdcdc);
  border-color: #c0c0c0;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -2px 4px rgba(0, 0, 0, 0.05);
}

.groepenkast.kast-hager .din-rail {
  background: linear-gradient(180deg, #aaa 0%, #999 50%, #aaa 100%);
}

.groepenkast.kast-hager .blind-plate {
  background: linear-gradient(180deg, #e8e8e8, #d8d8d8);
  border-color: #c8c8c8;
}

.groepenkast.kast-hager::before,
.groepenkast.kast-hager::after,
.groepenkast.kast-hager .kast-screws-bottom::before,
.groepenkast.kast-hager .kast-screws-bottom::after {
  background: radial-gradient(circle at 40% 40%, #ddd, #aaa);
}

/* Screw holes at corners */
.groepenkast::before,
.groepenkast::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #bbb, #888);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(255, 255, 255, 0.3);
  z-index: 5;
}

.groepenkast::before {
  top: 6px;
  left: 6px;
}

.groepenkast::after {
  top: 6px;
  right: 6px;
}

.kast-screws-bottom::before,
.kast-screws-bottom::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #bbb, #888);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(255, 255, 255, 0.3);
  z-index: 5;
}

.kast-screws-bottom::before {
  bottom: 6px;
  left: 6px;
}

.kast-screws-bottom::after {
  bottom: 6px;
  right: 6px;
}

/* DIN Rail */
.din-rail {
  background: linear-gradient(180deg, #8a9099 0%, #717880 50%, #8a9099 100%);
  height: 8px;
  border-radius: 2px;
  margin: 2px 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  position: relative;
  z-index: 0;
}

/* Row within the kast */
.kast-row {
  margin-bottom: 6px;
  position: relative;
}

.kast-row-slots {
  display: flex;
  gap: var(--slot-gap);
  min-height: 95px;
  padding: 6px 2px;
  position: relative;
  z-index: 1;
}

/* --- Empty Slot (blind plate) --- */
.slot-empty {
  width: var(--slot-w);
  height: 90px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.blind-plate {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #c8cdd6, #b0b8c4);
  border-radius: 3px;
  border: 1px solid #a0a8b4;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* --- Circuit Breaker Base (shared) --- */
.breaker {
  width: calc(var(--slots, 1) * var(--slot-w) + (var(--slots, 1) - 1) * var(--slot-gap));
  min-width: calc(var(--slots, 1) * var(--slot-w) + (var(--slots, 1) - 1) * var(--slot-gap));
  height: 90px;
  border-radius: 4px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.breaker:hover {
  transform: translateY(-2px);
  z-index: 10;
}

.breaker.appearing {
  animation: breakerAppear 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes breakerAppear {
  from {
    opacity: 0;
    transform: scale(0.6) translateY(15px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Toggle switch on breaker */
.breaker-toggle {
  width: 16px;
  height: 12px;
  background: linear-gradient(180deg, #444, #333);
  border-radius: 2px;
  margin-top: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  position: relative;
  flex-shrink: 0;
}

.breaker-toggle.on {
  background: linear-gradient(180deg, #45d67f, #2ebd65);
  box-shadow: 0 0 6px rgba(69, 214, 127, 0.3);
}

.breaker-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 2px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 1px;
}

/* Breaker label area */
.breaker-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1px;
}

.breaker-amp {
  font-size: 0.60rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.breaker-type-label {
  font-size: 0.42rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: rgba(255, 255, 255, 0.7);
}

.breaker-ma {
  font-size: 0.48rem;
  color: #81c995;
  font-weight: 600;
}

.breaker-name {
  font-size: 0.38rem;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  margin-top: auto;
  margin-bottom: 3px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 2px;
}

/* Color band */
.breaker-color-band {
  width: 100%;
  height: 3px;
  flex-shrink: 0;
}

/* Connection terminals at bottom */
.breaker-terminals {
  display: flex;
  justify-content: center;
  gap: 3px;
  margin-bottom: 3px;
  flex-shrink: 0;
}

.terminal {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #555;
  border: 1px solid #444;
}

/* Test button (RCD/RCBO) */
.breaker-test-btn {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  margin-top: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

/* --- Installatieautomaat (MCB) — 1 slot wide --- */
.breaker-mcb {
  background: linear-gradient(180deg, #2c3e50, #1a252f);
  border: 1px solid #3d5166;
}

/* --- Aardlekschakelaar (RCD) — 2 slots wide --- */
.breaker-rcd {
  background: linear-gradient(180deg, #1e3a2f, #132a20);
  border: 1px solid #2a5940;
}

/* --- Aardlekautomaat (RCBO) — 2 slots wide --- */
.breaker-rcbo {
  background: linear-gradient(180deg, #1a3535, #0f2828);
  border: 1px solid #2a5050;
}

/* --- Hoofdschakelaar (Main Switch) --- */
.breaker-main {
  background: linear-gradient(180deg, #8e1e1e, #5c1414);
  border: 1px solid #a52a2a;
}

.breaker-main .breaker-toggle {
  width: 22px;
  height: 14px;
}

/* --- Fornuisgroep --- */
.breaker-fornuis {
  background: linear-gradient(180deg, #5a3a1a, #3a2510);
  border: 1px solid #7a5030;
}

/* --- Beltrafo --- */
.breaker-beltrafo {
  background: linear-gradient(180deg, #3a2a5a, #251a3a);
  border: 1px solid #5a3a7a;
}

/* --- Tooltip --- */
.breaker-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: #2D2B3A;
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.72rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: all 0.2s ease;
  box-shadow: 0 3px 12px rgba(95, 92, 120, 0.3);
  z-index: 100;
  line-height: 1.4;
}

.breaker-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #2D2B3A;
}

.breaker:hover .breaker-tooltip {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.breaker-tooltip strong {
  color: #ff9600;
}

/* Kast cover clips at bottom */
.kast-cover-clips {
  display: flex;
  justify-content: space-around;
  margin-top: 8px;
  padding: 0 20px;
}

.cover-clip {
  width: 30px;
  height: 6px;
  background: linear-gradient(180deg, #999, #888);
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* --- Kast summary below --- */
.kast-summary {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #EDECF5;
}

.kast-summary h5 {
  color: #2D2B3A;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.kast-summary h5 i {
  color: #ff9600;
  margin-right: 6px;
}

.summary-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.summary-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #EDECF5;
  color: #707780;
  font-size: 0.82rem;
}

.summary-list li:last-child {
  border-bottom: none;
}

.summary-list .summary-empty {
  justify-content: center;
  color: #898798;
  font-style: italic;
  gap: 6px;
}

.summary-list .summary-empty i {
  color: #ff9600;
}

.summary-item-name {
  display: flex;
  align-items: center;
  gap: 8px;
}

.summary-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.summary-item-slots {
  font-weight: 600;
  color: #898798;
  font-size: 0.72rem;
}

/* --- Actions below kast --- */
.kast-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.btn-clear-all {
  flex: 1;
  padding: 12px;
  background: #fff;
  color: #FF4943;
  border: 1px solid #EDECF5;
  border-radius: 40px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'Work Sans', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  box-shadow: 0 2px 4px rgba(95, 92, 120, 0.08);
}

.btn-clear-all:hover {
  background: #FF4943;
  color: #fff;
  border-color: #FF4943;
  text-decoration: none !important;
}

.btn-request-quote {
  flex: 2;
  padding: 12px;
  background: #ff9600;
  color: #fff !important;
  border: none;
  border-radius: 40px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: 'Work Sans', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none !important;
  box-shadow: 0 2px 4px rgba(95, 92, 120, 0.16);
}

.btn-request-quote:hover {
  background: #707780;
  text-decoration: none;
  color: #fff;
}

/* ===== RIGHT PANEL: CABINET SELECTOR ===== */
.cabinet-panel {
  width: 260px;
  flex-shrink: 0;
}

.cabinet-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid #EDECF5;
  margin-bottom: 8px;
}

.cabinet-option:hover {
  background: #F6F5FC;
  border-color: #B4B2C5;
}

.cabinet-option.active {
  background: #FFF8F0;
  border-color: #ff9600;
  box-shadow: 0 2px 6px rgba(255, 150, 0, 0.15);
}

.cabinet-option input[type="radio"] {
  display: none;
}

.cabinet-option.active::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff9600;
  flex-shrink: 0;
  margin-left: auto;
}

.cabinet-visual {
  flex-shrink: 0;
}

.cabinet-icon {
  width: 40px;
  background: linear-gradient(180deg, #d4d8e0, #c0c6ce);
  border-radius: 4px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  justify-content: center;
  border: 1px solid #b0b8c4;
}

.cabinet-icon-rail {
  height: 3px;
  background: linear-gradient(90deg, #888, #aaa, #888);
  border-radius: 1px;
}

.cabinet-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cabinet-text strong {
  color: #2D2B3A;
  font-size: 0.82rem;
}

.cabinet-text span {
  color: #898798;
  font-size: 0.7rem;
}

/* --- Templates --- */
.template-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.template-btn {
  background: #fff;
  border: 1px solid #EDECF5;
  border-radius: 6px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  color: #707780;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Work Sans', sans-serif;
}

.template-btn:hover {
  background: #F6F5FC;
  border-color: #ff9600;
  transform: translateX(4px);
}

.template-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FFF8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ff9600;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(95, 92, 120, 0.08);
}

.template-info {
  flex: 1;
}

.template-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #2D2B3A;
}

.template-desc {
  font-size: 0.65rem;
  color: #898798;
  margin-top: 2px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .configurator-layout {
    flex-wrap: wrap;
  }

  .modules-panel {
    width: 100%;
    order: 1;
  }

  .kast-panel {
    width: 100%;
    order: 2;
  }

  .summary-panel {
    width: 100%;
    order: 3;
  }

  .cabinet-option {
    display: inline-flex;
    margin-right: 8px;
    margin-bottom: 8px;
  }
}

@media (max-width: 768px) {
  .configurator-page {
    padding: 40px 0;
  }

  .configurator-page .page-title h1 {
    font-size: 1.5rem;
  }

  .kast-container {
    padding: 16px;
  }

  .groepenkast {
    padding: 18px 10px 10px;
  }

  :root {
    --slot-w: 24px;
  }

  .progress-step {
    width: 65px;
    font-size: 0.7rem;
  }

  .breaker {
    height: 80px;
  }

  .slot-empty {
    height: 80px;
  }

  .kast-row-slots {
    min-height: 85px;
  }

  .modules-panel {
    width: 100%;
  }

  .summary-panel {
    width: 100%;
  }

  .kast-panel {
    min-width: 0;
    width: 100%;
  }

  .kast-actions {
    flex-direction: column;
  }
}

/* --- RCD Auto Notice --- */
.rcd-notice {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  padding: 10px 14px;
  background: #f0faf4;
  border: 1px solid #b7e4c7;
  border-radius: 6px;
  color: #27ae60;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.6;
}

.rcd-notice i {
  font-size: 14px;
  flex-shrink: 0;
}

.rcd-notice-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

/* Auto tag in summary */
.auto-tag {
  display: inline-block;
  padding: 1px 6px;
  background: #f0faf4;
  color: #27ae60;
  font-size: 0.6rem;
  font-weight: 600;
  border-radius: 3px;
  border: 1px solid #b7e4c7;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* --- Click interactions on kast --- */
.clickable-slot {
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.clickable-slot:hover .blind-plate {
  background: linear-gradient(180deg, #d4f5d4, #b8e8b8);
  border-color: #27ae60;
  opacity: 0.9;
}

.clickable-slot:hover {
  transform: scaleY(1.04);
}

.clickable-breaker {
  cursor: pointer;
  position: relative;
}

.clickable-breaker::after {
  content: '✕';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 1.2rem;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.clickable-breaker:hover::after {
  opacity: 1;
}

.clickable-breaker:hover {
  filter: brightness(0.75);
}

/* ===== PRICE FEATURE ===== */
.price-config-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  margin-bottom: 0 !important;
}

.price-config-toggle:hover {
  color: #ff9600;
}

#price-config-chevron {
  font-size: 0.8rem;
  color: #b0aab8;
  transition: transform 0.2s ease;
}

#price-config-body {
  margin-top: 14px;
}

.price-config-section {
  margin-bottom: 12px;
}

.price-config-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #b0aab8;
  margin-bottom: 8px;
}

.price-input-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid #f0eef8;
  font-size: 0.85rem;
  color: #4a4560;
}

.price-input-row:last-child {
  border-bottom: none;
}

.price-input-row label {
  flex: 1;
  font-size: 0.83rem;
}

.price-input-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.83rem;
  color: #707780;
}

.price-input-wrap input {
  width: 72px;
  border: 1px solid #e0dcea;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.83rem;
  font-family: 'Work Sans', sans-serif;
  color: #2D2B3A;
  text-align: right;
  outline: none;
  transition: border-color 0.2s;
}

.price-input-wrap input:focus {
  border-color: #ff9600;
}

/* Price Total */
.price-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #fff8ee, #fff3e0);
  border: 1px solid #ffd699;
  border-radius: 8px;
}

.price-total-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #e08000;
  display: flex;
  align-items: center;
  gap: 6px;
}

.price-total-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ff9600;
  letter-spacing: -0.5px;
}

/* Summary list item layout */
.summary-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid #f5f3fc;
  font-size: 0.84rem;
}

.summary-list li:last-child {
  border-bottom: none;
}

.summary-item-name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.summary-item-price {
  font-weight: 600;
  color: #ff9600;
  white-space: nowrap;
  font-size: 0.84rem;
}

/* Read-only price list */
.price-list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #f0eef8;
  font-size: 0.84rem;
  color: #4a4560;
  font-weight: 500;
}

.price-list-row:last-child {
  border-bottom: none;
}

.price-list-row--light {
  color: #9090a8;
  font-size: 0.78rem;
  font-weight: 400;
}

.price-list-separator {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #b0aab8;
  padding: 10px 0 4px;
}

.price-list-value {
  font-weight: 700;
  color: #ff9600;
}

/* ===== FASE TOGGLE ===== */
.fase-toggle {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.fase-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  border: 2px solid #e0dcea;
  border-radius: 10px;
  background: #faf9ff;
  cursor: pointer;
  font-family: 'Work Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: #9090a8;
  transition: all 0.2s ease;
}

.fase-btn:hover {
  border-color: #ff9600;
  color: #ff9600;
}

.fase-btn.active {
  border-color: #ff9600;
  background: linear-gradient(135deg, #fff8ee, #fff3e0);
  color: #ff9600;
  font-weight: 700;
}

.fase-icon {
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1px;
}

.option-description {
  font-size: 0.8rem;
  color: #9090a8;
  margin: -4px 0 10px;
}

.modules-divider {
  border-top: 1px solid #f0eef8;
  margin: 12px 0;
}


/* Option checkbox row (kookgroep etc.) */
.option-checkbox-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.option-checkbox-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #2D2B3A;
}

.option-checkbox-desc {
  font-size: 0.77rem;
  color: #9090a8;
  margin-top: 2px;
}

/* Hide native checkbox */
.option-checkbox {
  display: none;
}

/* Toggle track */
.option-checkbox-toggle {
  flex-shrink: 0;
  display: block;
  width: 44px;
  height: 24px;
  background: #e0dcea;
  border-radius: 12px;
  position: relative;
  transition: background 0.2s ease;
}

/* Toggle thumb */
.option-checkbox-toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

/* Checked state */
.option-checkbox:checked+.option-checkbox-toggle {
  background: #ff9600;
}

.option-checkbox:checked+.option-checkbox-toggle::after {
  transform: translateX(20px);
}

/* ===== MOBILE RESPONSIVENESS ===== */
@media (max-width: 768px) {

  /* General Layout */
  .configurator-layout {
    flex-direction: column;
    padding: 0 10px;
  }

  .modules-panel,
  .kast-panel,
  .summary-panel {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
  }

  /* Wizard Progress Bar */
  .wizard-progress {
    margin-bottom: 25px;
    max-width: 100%;
    padding: 0 5px;
  }

  .progress-step {
    width: auto;
    font-size: 0.7rem;
  }

  .step-circle {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
    margin-bottom: 4px;
  }

  .progress-track {
    top: 13px;
    left: 20px;
    right: 20px;
  }

  /* Wizard step content padding on mobile */
  .wizard-container {
    padding: 0 16px;
  }

  .wizard-progress {
    padding: 0 4px;
  }

  /* Fase Cards Step 1 */
  .fase-cards-container {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

  .fase-card {
    min-width: unset;
    max-width: 100%;
  }

  .fase-card-content {
    padding: 20px 15px;
  }

  /* Step Titles & Typography */
  .step-title {
    font-size: 1.4rem;
  }

  .step-desc {
    font-size: 0.9rem;
    margin-bottom: 20px;
  }

  /* Wizard Buttons */
  .wizard-actions {
    flex-direction: column-reverse;
    /* Put 'Next' above 'Previous' on mobile */
    gap: 10px;
  }

  .btn-wizard {
    width: 100%;
    text-align: center;
    padding: 14px 20px;
  }

  /* Step 4 Kast Container */
  .kast-container {
    padding: 15px 10px;
    max-width: 100vw;
    overflow: hidden;
  }

  .kast-wrapper {
    padding: 10px 5px;
    max-width: 100%;
    overflow-x: auto;
  }

  .groepenkast-wrap {
    transform: scale(0.8);
    transform-origin: top left;
    margin: 0 auto;
  }

  /* Wrap action buttons under the cabinet */
  .kast-actions {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .kast-actions .btn-clear-all,
  .kast-actions .btn-request-quote {
    width: 100%;
    justify-content: center;
  }
}

/* ===== MERK (BRAND) SELECTOR ===== */
.merk-cards-container {
  /* Override to allow 3 cards side by side */
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.merk-card {
  max-width: 280px;
}

.merk-card-content {
  padding: 22px 16px !important;
}

/* Brand logo badge — image-based */
.merk-logo {
  height: 64px;
  width: 140px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  background: #fff;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  padding: 10px 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.merk-logo-img {
  height: 100%;
  width: 100%;
  max-height: 36px;
  max-width: 110px;
  object-fit: contain;
  display: block;
}

.fase-card input[type="radio"]:checked~.merk-card-content .merk-logo,
.fase-card:hover .merk-logo {
  transform: scale(1.05);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.13);
}

/* When merk radio is checked, apply active state to merk card */
.merk-card input[type="radio"]:checked~.fase-card-content {
  border-color: #ff9600 !important;
  background: #fff8f0 !important;
  box-shadow: 0 4px 12px rgba(255, 150, 0, 0.18) !important;
}

@media (max-width: 768px) {
  .merk-card {
    max-width: 100%;
  }
}