/* Configurator Layout */
.configurator {
  display: grid;
  grid-template-columns: 1fr 350px;
  grid-template-rows: auto 1fr;
  gap: 32px;
  max-width: 1600px;
  margin: 0 auto;
  padding: 40px;
  min-height: calc(100vh - 143px);
}

.configurator-header {
  grid-column: 1 / -1;
  text-align: center;
}

.configurator-header h1 {
  font-size: 42px;
  font-weight: 800;
  color: #0a0a0a;
  margin-bottom: 32px;
  letter-spacing: -1px;
}

/* Progress Bar */
.progress-bar {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: #f8fafc;
  border-radius: 8px;
  border: 2px solid #e2e8f0;
  transition: all 0.3s;
}

.progress-step.active {
  background: #eff6ff;
  border-color: #3b82f6;
}

.progress-step.completed {
  background: #f0fdf4;
  border-color: #10b981;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #64748b;
  transition: all 0.3s;
}

.progress-step.active .step-number {
  background: #3b82f6;
  color: white;
}

.progress-step.completed .step-number {
  background: #10b981;
  color: white;
}

.step-label {
  font-weight: 600;
  font-size: 14px;
  color: #64748b;
}

.progress-step.active .step-label {
  color: #3b82f6;
}

.progress-step.completed .step-label {
  color: #10b981;
}

/* Configurator Body */
.configurator-body {
  background: white;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
}

.step-content {
  margin-bottom: 40px;
}

.step-header {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 2px solid #e2e8f0;
}

.step-header h2 {
  font-size: 32px;
  font-weight: 700;
  color: #0a0a0a;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.step-header p {
  font-size: 16px;
  color: #64748b;
}

.step-loading {
  text-align: center;
  padding: 60px 20px;
  color: #64748b;
}

/* Configurator Actions */
.configurator-actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

/* Meter Grid */
.meter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.meter-card {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.meter-card:hover {
  border-color: #3b82f6;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

.meter-card.selected {
  border-color: #3b82f6;
  background: #eff6ff;
}

.meter-image {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  overflow: hidden;
}

.meter-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.meter-info {
  padding: 20px;
}

.meter-info h3 {
  font-size: 18px;
  font-weight: 600;
  color: #0a0a0a;
  margin-bottom: 8px;
}

.meter-subtype {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 12px;
}

.meter-description {
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meter-price {
  font-size: 20px;
  font-weight: 700;
  color: #0a0a0a;
}

.selected-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #3b82f6;
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Module Selection */
.module-selection {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.module-group {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  background: #f8fafc;
}

.module-group h3 {
  font-size: 20px;
  font-weight: 700;
  color: #0a0a0a;
  margin-bottom: 8px;
}

.module-group-description {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 20px;
}

.module-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.module-option {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.module-option:hover {
  border-color: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.module-option.selected {
  border-color: #3b82f6;
  background: #eff6ff;
}

.module-option-image {
  aspect-ratio: 16/9;
  background: #f1f5f9;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 12px;
}

.module-option-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.module-option-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.module-option-content strong {
  font-size: 15px;
  color: #0a0a0a;
  font-weight: 600;
}

.module-subtype {
  font-size: 12px;
  color: #64748b;
}

.module-price {
  font-size: 14px;
  font-weight: 700;
  color: #3b82f6;
  margin-top: 4px;
}

.selected-check {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  background: #3b82f6;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.none-option {
  background: #fafafa;
}

.module-info {
  text-align: center;
  padding: 60px 40px;
  color: #64748b;
}

.module-info p {
  font-size: 16px;
  margin-bottom: 12px;
}

/* Customer Form */
.customer-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 28px;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: #0a0a0a;
  margin-bottom: 8px;
  font-size: 15px;
}

.form-control {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.2s;
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-help {
  display: block;
  font-size: 13px;
  color: #64748b;
  margin-top: 6px;
}

.form-info {
  display: flex;
  gap: 16px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 20px;
  margin-top: 32px;
}

.form-info svg {
  flex-shrink: 0;
  color: #3b82f6;
}

.form-info strong {
  display: block;
  color: #0a0a0a;
  margin-bottom: 6px;
  font-size: 15px;
}

.form-info p {
  font-size: 14px;
  color: #334155;
  line-height: 1.6;
  margin: 0;
}

/* Confirmation */
.confirmation {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.confirmation-header {
  margin-bottom: 40px;
}

.confirmation-header svg {
  margin-bottom: 24px;
}

.confirmation-header h3 {
  font-size: 28px;
  font-weight: 700;
  color: #0a0a0a;
  margin-bottom: 12px;
}

.confirmation-header p {
  font-size: 16px;
  color: #64748b;
}

.confirmation-details {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-bottom: 40px;
}

.detail-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  text-align: left;
}

.detail-section h4 {
  font-size: 16px;
  font-weight: 700;
  color: #0a0a0a;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-section p {
  margin-bottom: 8px;
  color: #334155;
  font-size: 15px;
}

.product-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e2e8f0;
}

.product-line:last-child {
  border-bottom: none;
}

.product-line strong {
  display: block;
  color: #0a0a0a;
  font-size: 15px;
  margin-bottom: 4px;
}

.product-type-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: #64748b;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 4px;
}

.product-line .product-price {
  font-weight: 700;
  color: #0a0a0a;
  font-size: 16px;
}

.total-section {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-color: #bfdbfe;
}

.total-amount {
  font-size: 36px;
  font-weight: 800;
  color: #0a0a0a;
  margin-bottom: 8px;
}

.total-note {
  font-size: 13px;
  color: #64748b;
  font-style: italic;
}

.btn-large {
  padding: 18px 48px;
  font-size: 17px;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

/* Success Message */
.success-message {
  text-align: center;
  padding: 40px;
}

.success-message svg {
  margin-bottom: 24px;
}

.success-message h2 {
  font-size: 36px;
  font-weight: 800;
  color: #0a0a0a;
  margin-bottom: 12px;
}

.success-message > p {
  font-size: 18px;
  color: #64748b;
  margin-bottom: 32px;
}

.success-details {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
}

.success-details p {
  margin-bottom: 12px;
  color: #334155;
  font-size: 15px;
}

.success-details p:last-child {
  margin-bottom: 0;
}

.success-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

/* Configuration Sidebar */
.configurator-sidebar {
  position: sticky;
  top: 183px;
  height: fit-content;
}

.config-summary {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
}

.config-summary h3 {
  font-size: 18px;
  font-weight: 700;
  color: #0a0a0a;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid #e2e8f0;
}

.summary-content {
  margin-bottom: 20px;
}

.summary-empty {
  text-align: center;
  padding: 40px 20px;
  color: #94a3b8;
  font-size: 14px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}

.summary-item:last-child {
  border-bottom: none;
}

.item-name {
  font-size: 14px;
  color: #334155;
  line-height: 1.4;
  flex: 1;
}

.item-price {
  font-weight: 600;
  color: #0a0a0a;
  font-size: 14px;
  white-space: nowrap;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 2px solid #e2e8f0;
  font-size: 16px;
}

.total-price {
  font-size: 24px;
  font-weight: 800;
  color: #3b82f6;
}

/* Responsive */
@media (max-width: 1200px) {
  .configurator {
    grid-template-columns: 1fr;
  }

  .configurator-sidebar {
    position: static;
    order: -1;
  }

  .config-summary {
    max-width: 600px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .configurator {
    padding: 20px;
  }

  .configurator-header h1 {
    font-size: 32px;
  }

  .progress-bar {
    flex-direction: column;
  }

  .configurator-body {
    padding: 24px;
  }

  .meter-grid {
    grid-template-columns: 1fr;
  }

  .module-options {
    grid-template-columns: 1fr;
  }

  .configurator-actions {
    flex-direction: column;
  }

  .btn-back,
  .btn-next {
    width: 100%;
  }

  .success-actions {
    flex-direction: column;
  }

  .success-actions .btn {
    width: 100%;
  }
}
