/* Точная копия дизайна калькулятора кровли по скриншотам */

/* === ЧАСТО ИЩУТ (Фото 1) === */
.frequent-section {
  background: #fff;
  padding: 25px 30px;
  margin-bottom: 25px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.frequent-section h2 {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 0 0 18px 0;
}

.frequent-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.freq-tag {
  background: #f5f5f5;
  border: none;
  border-radius: 20px;
  padding: 8px 18px;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
}

.freq-tag:hover {
  background: #fff;
  color: #db2c2c;
  box-shadow: 0 0 0 2px #db2c2c;
}

/* === СЕРВИСЫ РАСЧЕТА (Фото 2) === */
.services-list-section {
  background: #fff;
  padding: 30px;
  margin-bottom: 25px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.services-list-section h2 {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin: 0 0 25px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.services-list-section h2 i {
  color: #db2c2c;
  font-size: 18px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 15px;
}

.service-card {
  background: #fff;
  border: 2px solid #e5e5e5;
  border-radius: 8px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
  color: #333;
  transition: all 0.25s ease;
  cursor: pointer;
}

.service-card:hover {
  border-color: #db2c2c;
  background: #fff5f5;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.service-card.active {
  border-color: #db2c2c;
  background: #fff5f5;
}

.service-card i {
  font-size: 24px;
  color: #666;
  width: 30px;
  text-align: center;
}

.service-card:hover i,
.service-card.active i {
  color: #db2c2c;
}

.service-card span {
  font-size: 15px;
  font-weight: 500;
  color: #333;
}

.service-card:hover span,
.service-card.active span {
  color: #db2c2c;
}

/* === ПРОГРЕСС-ИНДИКАТОР === */
.progress-indicator {
  background: #fff;
  padding: 35px 50px;
  margin-bottom: 30px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
}

.progress-line-bg {
  position: absolute;
  top: 68px;
  left: 15%;
  right: 15%;
  height: 3px;
  background: #e5e5e5;
  z-index: 0;
}

.progress-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  flex: 1;
}

.progress-number {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #f0f0f0;
  color: #aaa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  transition: all 0.3s;
}

.progress-item.active .progress-number {
  background: #db2c2c;
  color: #fff;
}

.progress-label {
  font-size: 14px;
  color: #999;
  text-align: center;
  max-width: 200px;
  line-height: 1.4;
}

.progress-item.active .progress-label {
  color: #333;
  font-weight: 600;
}

/* === ШАГИ КАЛЬКУЛЯТОРА === */
.calc-step {
  background: #fff;
  padding: 40px;
  margin-bottom: 25px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.calc-step h2 {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin: 0 0 30px 0;
}

/* === ТИПЫ КРОВЛИ С 3D ИЗОБРАЖЕНИЯМИ (как на Фото 2) === */
.roof-scroll-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 15px;
}

.scroll-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #db2c2c;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(219,44,44,0.3);
  z-index: 2;
}

.scroll-btn:hover {
  background: #c02525;
  transform: scale(1.1);
}

.scroll-btn:active {
  transform: scale(0.95);
}

.scroll-btn i {
  display: flex;
  align-items: center;
  justify-content: center;
}

.roof-scroll-wrapper {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 10px 0;
  flex: 1;
}

.roof-scroll-wrapper::-webkit-scrollbar {
  height: 8px;
}

.roof-scroll-wrapper::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 4px;
}

.roof-scroll-wrapper::-webkit-scrollbar-thumb {
  background: #db2c2c;
  border-radius: 4px;
}

.roof-card {
  background: #fff;
  border: 3px solid #e5e5e5;
  border-radius: 12px;
  padding: 25px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 0 0 220px;
  min-width: 220px;
}

.roof-card:hover {
  border-color: #ff9800;
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  transform: translateY(-5px);
}

.roof-card.active {
  border-color: #ff9800;
  background: #fff9f0;
  box-shadow: 0 4px 12px rgba(255,152,0,0.2);
}

.roof-img-3d {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  padding: 10px;
}

.roof-img-3d svg {
  width: 100%;
  height: 100%;
  max-width: 150px;
}

.roof-img-3d img {
  width: 100%;
  height: 100%;
  max-width: 150px;
  object-fit: contain;
}

.roof-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.roof-card.active h3 {
  color: #ff9800;
}

.question-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #db2c2c;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 700;
  margin: 0 auto;
}

/* === ИНДИКАТОР ПРОГРЕССА СКРОЛЛА === */
.scroll-progress-bar {
  width: 100%;
  height: 4px;
  background: #e5e5e5;
  border-radius: 2px;
  margin-top: 20px;
  overflow: hidden;
}

.scroll-progress-fill {
  height: 100%;
  background: #db2c2c;
  width: 50%;
  transition: width 0.3s ease;
}

/* === СЕТКА МАТЕРИАЛОВ (Фото 4) === */
.material-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
  margin-bottom: 35px;
}

.material-card {
  background: #fff;
  border: 3px solid #e5e5e5;
  border-radius: 10px;
  padding: 20px 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.material-card:hover {
  border-color: #db2c2c;
  transform: translateY(-2px);
}

.material-card.active {
  border-color: #db2c2c;
  background: #fff5f5;
}

.material-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #f0f0f0;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 12px;
}

.material-card h3 {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.material-card.active h3 {
  color: #db2c2c;
}

/* === ПОДТИПЫ КРОВЛИ (горизонтальный скролл) === */
.roof-subtypes {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid #e5e5e5;
}

.subtypes-scroll {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.subtypes-scroll::-webkit-scrollbar {
  height: 6px;
}

.subtypes-scroll::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 3px;
}

.subtypes-scroll::-webkit-scrollbar-thumb {
  background: #db2c2c;
  border-radius: 3px;
}

.subtype-card {
  flex: 0 0 160px;
  background: #fff;
  border: 2px solid #e5e5e5;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.subtype-card:hover {
  border-color: #db2c2c;
}

.subtype-card.active {
  border-color: #db2c2c;
  background: #fff5f5;
}

.subtype-card svg {
  width: 100%;
  height: 80px;
  margin-bottom: 10px;
}

.subtype-card span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

.subtype-card.active span {
  color: #db2c2c;
}

.question-icon-small {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #db2c2c;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  margin: 0 auto 10px;
}

/* === РАЗМЕРЫ КРОВЛИ (Фото 6-10) === */
.dimensions-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin-top: 25px;
}

.dimensions-inputs {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.help-text {
  font-size: 14px;
  color: #666;
  margin: 0 0 10px 0;
}

.help-link-underline {
  color: #db2c2c;
  text-decoration: underline;
}

.dimension-form-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.input-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f9f9f9;
  padding: 12px 18px;
  border-radius: 8px;
  transition: all 0.2s;
}

.input-row:focus-within {
  background: #fff;
  box-shadow: 0 0 0 2px rgba(219,44,44,0.2);
}

.input-row label {
  font-size: 14px;
  color: #333;
  font-weight: 500;
  margin: 0;
}

.input-badge-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dim-input {
  width: 80px;
  padding: 8px 12px;
  border: 2px solid #e5e5e5;
  border-radius: 6px;
  font-size: 15px;
  text-align: center;
  transition: all 0.2s;
}

.dim-input:focus {
  outline: none;
  border-color: #db2c2c;
}

.badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #666;
  transition: all 0.2s;
}

.badge-gray {
  background: #e5e5e5;
}

.badge-red {
  background: #db2c2c;
  color: #fff;
}

.input-row:focus-within .badge-gray {
  background: #db2c2c;
  color: #fff;
}

/* === ЧЕКБОКСЫ === */
.checkboxes {
  margin-top: 25px;
  padding-top: 25px;
  border-top: 1px solid #e5e5e5;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  margin: 0;
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #db2c2c;
}

/* === ПАРАМЕТРЫ СОФИТА (Фото 11) === */
.soffit-section {
  margin-top: 25px;
  padding: 25px;
  background: #f9f9f9;
  border-radius: 8px;
  border-left: 4px solid #db2c2c;
}

.soffit-section h3 {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 0 0 20px 0;
}

.soffit-inputs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 25px;
}

.material-toggle {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
}

.toggle-btn {
  flex: 1;
  padding: 12px 20px;
  border: 2px solid #e5e5e5;
  background: #fff;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
}

.toggle-btn:hover {
  border-color: #db2c2c;
  color: #db2c2c;
}

.toggle-btn.active {
  background: #db2c2c;
  border-color: #db2c2c;
  color: #fff;
}

.soffit-section h4 {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin: 0 0 15px 0;
}

.soffit-types-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.soffit-type-card {
  background: #fff;
  border: 2px solid #e5e5e5;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.soffit-type-card:hover {
  border-color: #db2c2c;
}

.soffit-type-card.active {
  border-color: #db2c2c;
  background: #fff5f5;
}

.soffit-type-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #f0f0f0;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 12px;
}

.soffit-type-card span {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.soffit-type-card.active span {
  color: #db2c2c;
}

/* === ВИЗУАЛИЗАЦИЯ КРОВЛИ (справа) === */
.dimensions-visual {
  background: #fafafa;
  border-radius: 8px;
  padding: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  border: 2px solid #e5e5e5;
}

.dimensions-visual img {
  max-width: 100%;
  max-height: 500px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.dimensions-visual svg {
  width: 100%;
  max-width: 500px;
}

#roofVisualization {
  width: 100%;
  max-width: 500px;
  height: auto;
}

/* === КНОПКА РАСЧЕТА (Фото 12) === */
.calc-button-container {
  display: flex;
  justify-content: center;
  margin-top: 50px;
}

.btn-calculate-final {
  background: #db2c2c;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 20px 80px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(219,44,44,0.3);
}

.btn-calculate-final:hover {
  background: #c02525;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(219,44,44,0.4);
}

.btn-calculate-final:active {
  transform: translateY(0);
}

/* === РЕЗУЛЬТАТЫ РАСЧЕТА === */
.calc-results {
  background: #fff;
  padding: 40px;
  margin-bottom: 30px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.calc-results h2 {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin: 0 0 30px 0;
}

.results-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 35px;
}

.result-box {
  background: #f9f9f9;
  padding: 25px;
  border-radius: 8px;
  text-align: center;
  border: 2px solid #e5e5e5;
}

.result-box.highlight {
  border-color: #db2c2c;
  background: #fff5f5;
}

.result-label {
  display: block;
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
}

.result-value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: #333;
}

.result-value-big {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: #db2c2c;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 30px;
}

.results-table thead {
  background: #f5f5f5;
}

.results-table th,
.results-table td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid #e5e5e5;
}

.results-table th {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.results-table td {
  font-size: 14px;
  color: #666;
}

.results-table tbody tr:hover {
  background: #fafafa;
}

.results-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  padding-top: 25px;
  border-top: 1px solid #e5e5e5;
}

.btn-action {
  padding: 14px 28px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-cart {
  background: #db2c2c;
  color: #fff;
}

.btn-cart:hover {
  background: #c02525;
  transform: translateY(-2px);
}

.btn-print {
  background: #161b2e;
  color: #fff;
}

.btn-print:hover {
  background: #0f1322;
  transform: translateY(-2px);
}

.btn-reset {
  background: #f0f0f0;
  color: #333;
}

.btn-reset:hover {
  background: #e0e0e0;
  transform: translateY(-2px);
}

/* === АДАПТИВНОСТЬ === */
@media (max-width: 1200px) {
  .dimensions-layout {
    grid-template-columns: 1fr;
  }
  
  .dimensions-visual {
    order: -1;
  }
}

@media (max-width: 992px) {
  .material-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .results-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .progress-indicator {
    flex-direction: column;
    padding: 25px;
    gap: 20px;
  }
  
  .progress-line-bg {
    display: none;
  }
  
  .progress-item {
    width: 100%;
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    padding: 15px;
    background: #fafafa;
    border-radius: 8px;
  }
  
  .progress-number {
    margin-bottom: 0;
    margin-right: 15px;
  }
  
  .progress-label {
    text-align: left;
  }
  
  .roof-scroll-container {
    gap: 10px;
  }
  
  .scroll-btn {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  
  .roof-card {
    flex: 0 0 180px;
    min-width: 180px;
    padding: 20px 15px;
  }
  
  .roof-img-3d {
    height: 120px;
  }
  
  .material-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .calc-step {
    padding: 25px;
  }
  
  .results-actions {
    flex-direction: column;
  }
  
  .btn-action {
    width: 100%;
  }
  
  .soffit-types-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .frequent-section {
    padding: 20px;
  }
  
  .frequent-buttons {
    flex-direction: column;
  }
  
  .freq-tag {
    text-align: center;
  }
  
  .services-list-section {
    padding: 20px;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .roof-grid {
    grid-template-columns: 1fr;
  }
  
  .material-grid {
    grid-template-columns: 1fr;
  }
  
  .input-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  
  .input-badge-wrapper {
    justify-content: space-between;
  }
  
  .dim-input {
    flex: 1;
  }
  
  .btn-calculate-final {
    width: 100%;
    padding: 18px 40px;
  }
}
