/* ===== КАЛЬКУЛЯТОР – MOBILE-FIRST ===== */
.calc-wizard {
  max-width: 100%;
  margin: 0 auto;
  padding: 10px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ===== ПРОГРЕСС-БАР ===== */
.progress-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  padding-left: 30px;
  position: relative;
}
.progress-bar::before {
  content: '';
  position: absolute;
  left: 13px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #e0e0e0;
  z-index: 0;
}
.progress-bar .step {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  color: #999;
  position: relative;
  z-index: 1;
  padding: 8px 0;
}
.progress-bar .step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e0e0e0;
  color: white;
  font-weight: bold;
  font-size: 12px;
  flex-shrink: 0;
}
.progress-bar .step.active {
  color: #0056b3;
}
.progress-bar .step.active::before {
  background: #0056b3;
}
.progress-bar .step.completed::before {
  content: '✓';
  background: #10b981;
}

/* ===== КОНТЕНТ ШАГОВ ===== */
.step-content {
  background: white;
  padding: 20px 15px;
  border-radius: 16px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.05);
  margin-bottom: 80px;
}

/* ===== ПЛАВАЮЩАЯ ПАНЕЛЬ СТОИМОСТИ ===== */
.running-total {
  position: sticky;
  top: 60px;
  background: #fff;
  border: 2px solid #0056b3;
  border-radius: 12px;
  padding: 12px 15px;
  margin-bottom: 20px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  line-height: 1.6;
}
.running-total strong {
  display: inline-block;
  min-width: 80px;
  text-align: right;
  color: #0056b3;
}

/* ===== КАРТОЧКИ (бренды, камеры, аксессуары, диски) ===== */
.brand-cards,
.camera-options,
.hdd-cards,
.accessory-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 15px 0;
}
.brand-card,
.camera-card,
.hdd-card,
.accessory-card {
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  background: #fff;
  transition: 0.2s;
  width: 100%;
  box-sizing: border-box;
}
.brand-card:hover,
.camera-card:hover,
.hdd-card:hover,
.accessory-card:hover {
  border-color: #0056b3;
  box-shadow: 0 4px 12px rgba(0,86,179,0.15);
}
.brand-card img,
.camera-card img,
.accessory-card img {
  max-height: 80px;
  max-width: 100%;
  object-fit: contain;
  margin-bottom: 10px;
}
.camera-card h3,
.hdd-card h3,
.accessory-card h4 {
  font-size: 1rem;
  margin: 5px 0;
}
.camera-card p,
.hdd-card p,
.accessory-card .accessory-price {
  font-size: 0.9rem;
  color: #555;
  margin: 4px 0;
}
.accessory-price {
  font-weight: 600;
  color: #0056b3;
}
.camera-desc {
  font-size: 0.75rem;
  color: #777;
  margin: 5px 0;
  display: none;
}
.lens-select {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 0.9rem;
  background: #fafbfc;
}
.camera-price {
  font-size: 1rem;
  font-weight: 600;
  margin: 5px 0 10px;
  color: #1f2937;
}
.camera-price strong {
  color: #0056b3;
}
.add-camera-btn,
.add-hdd-btn,
.add-accessory-btn {
  background: #0056b3;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  width: 100%;
  margin-top: 8px;
}
.add-camera-btn:hover,
.add-hdd-btn:hover,
.add-accessory-btn:hover {
  background: #004494;
}
.qty-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.accessory-qty {
  width: 70px;
  text-align: center;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
}

/* ===== ТАБЛИЦЫ → КАРТОЧКИ ===== */
.selected-cameras table,
.recorder-table,
.estimate-table {
  width: 100%;
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
}
.selected-cameras tr,
.recorder-table tr {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  border-bottom: 1px solid #eee;
  padding: 10px 0;
}
.selected-cameras td,
.recorder-table td,
.recorder-table th {
  padding: 4px 8px;
  font-size: 0.85rem;
  border: none;
  text-align: left;
}
.selected-cameras th,
.recorder-table th {
  display: none;
}
.remove-camera-btn,
.remove-btn {
  background: #ef4444;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
}

/* ===== КНОПКИ НАВИГАЦИИ ===== */
.navigation-buttons {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  padding: 12px 15px;
  box-shadow: 0 -4px 15px rgba(0,0,0,0.08);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  z-index: 100;
}
.navigation-buttons .btn {
  flex: 1;
  padding: 14px;
  font-size: 1rem;
}

/* ===== ВЫБРАННЫЕ ПОЗИЦИИ ===== */
.selected-item {
  background: #f0f7ff;
  border-left: 4px solid #0056b3;
  padding: 10px;
  border-radius: 6px;
  margin: 8px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.cloud-selection label,
.radio-group label {
  display: block;
  margin-bottom: 8px;
}

/* ===== СМЕТА ===== */
.estimate-wrapper {
  background: #fff;
  border-radius: 16px;
  padding: 15px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}
.estimate-total-badge {
  background: #0056b3;
  color: white;
  padding: 12px 20px;
  border-radius: 30px;
  font-size: 1.2rem;
  font-weight: 700;
  display: inline-block;
  margin: 15px 0;
}
.estimate-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ===== ПЛАНШЕТЫ И ДЕСКТОПЫ ===== */
@media (min-width: 768px) {
  .calc-wizard {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
  }
  .progress-bar {
    flex-direction: row;
    gap: 5px;
    padding-left: 0;
  }
  .progress-bar::before {
    display: none;
  }
  .progress-bar .step {
    flex-direction: column;
    gap: 4px;
  }
  .brand-cards,
  .camera-options,
  .hdd-cards,
  .accessory-grid {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  .brand-card,
  .camera-card,
  .hdd-card,
  .accessory-card {
    width: 220px;
  }
  .camera-desc {
    display: -webkit-box;
  }
  .selected-cameras table,
  .recorder-table,
  .estimate-table {
    display: table;
    overflow-x: visible;
  }
  .selected-cameras tr,
  .recorder-table tr {
    display: table-row;
    flex-wrap: nowrap;
  }
  .selected-cameras th,
  .recorder-table th {
    display: table-cell;
  }
  .navigation-buttons {
    position: static;
    box-shadow: none;
    margin-top: 30px;
  }
  .estimate-actions {
    flex-direction: row;
  }
}