* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', 'Open Sans', sans-serif;
  scroll-behavior: smooth;
}

a{
  text-decoration: none;
}

/* Шапка */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 4px 0;
  background-color: transparent;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo img {
  width: 50px;
  height: 65px;
  object-fit: cover;
}

.logo-title {
  font-weight: 700;
  color: rgba(0, 0, 0, 0.8);
  font-size: 18px;
  line-height: 1.2;
}

.logo-subtitle {
  font-weight: 500;
  color: rgba(0, 0, 0, 0.8);
  font-size: 10px;
  letter-spacing: 0.6px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 57px;
}

.nav-item {
  color: rgba(0, 0, 0, 0.8);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.3s ease;
  position: relative;
}

.nav-item:hover {
  color: #f34c43;
}

.nav-item.phone {
  font-weight: 600;
  color: rgba(0, 0, 0, 0.8);
}

.search {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.search-icon {
  position: relative;
  width: 14px;
  height: 14px;
}


.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  padding: 0;
}

.mobile-menu-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #fff;
  transition: all 0.3s ease;
}

/* Хлебные крошки */
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  padding: 100px 20px 30px;
  max-width: 1200px;
  margin: 0 auto;
  border-bottom: 1px solid #eee;
  line-height: 1.4;
}

.breadcrumbs a {
  color: rgba(0, 0, 0, 0.8);
  text-decoration: none;
  font-weight: 400;
}

.breadcrumbs span {
  color: rgba(0, 0, 0, 0.8);
  margin: 0 5px;
}

/* Старые стили футера удалены - используются стили из footer.css */

/* Основные стили для страницы продукта */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  margin-top: 0;
}

.product-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

/* Секция изображений */
.product-images {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.product-details {
  min-width: 0;
}

.main-image-container {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.main-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.main-image:hover {
  transform: scale(1.05);
}

.thumbnail-images {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.thumbnail {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.thumbnail:hover {
  border-color: #f34c43;
  transform: scale(1.05);
}

.thumbnail.active {
  border-color: #f34c43;
  box-shadow: 0 0 10px rgba(243, 76, 67, 0.3);
}

/* Секция деталей продукта */
.product-details {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.product-title {
  font-size: 32px;
  font-weight: 700;
  color: #333;
  margin: 0;
  line-height: 1.2;
}

.product-title .product-code {
  color: #f34c43;
  font-weight: 800;
}

.product-short-description {
  font-size: 18px;
  color: #666;
  line-height: 1.6;
}

/* Вкладки */
.product-tabs {
  border-top: 1px solid #eee;
  padding-top: 30px;
}

.tab-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
  border-bottom: 1px solid #eee;
  flex-wrap: wrap;
}

.tab-btn {
  background: none;
  border: none;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.tab-btn:hover {
  color: #f34c43;
}

.tab-btn.active {
  color: #f34c43;
  border-bottom-color: #f34c43;
}

.tab-content {
  min-height: 150px;
}

.tab-pane {
  display: none;
  font-size: 16px;
  line-height: 1.7;
  color: #555;
}

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

.tab-pane p {
  margin: 0 0 15px 0;
}

.tab-pane p:last-child {
  margin-bottom: 0;
}

/* Кнопка заказать */
.order-btn {
  background: linear-gradient(135deg, #f34c43, #e63946);
  color: white;
  border: none;
  padding: 18px 40px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(243, 76, 67, 0.3);
}

.order-btn:hover {
  background: linear-gradient(135deg, #e63946, #d32f2f);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(243, 76, 67, 0.4);
}

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

/* Секция характеристик */
.specifications-section {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid #eee;
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  color: #333;
  margin-bottom: 30px;
  text-align: center;
}

.specifications-table {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.specifications-table table {
  width: 100%;
  border-collapse: collapse;
}

.specifications-table th {
  background: #f8f9fa;
  padding: 15px 20px;
  text-align: left;
  font-weight: 700;
  font-size: 15px;
  color: #1a1a1a;
  border-bottom: 2px solid #eee;
  letter-spacing: 0.3px;
}

.specifications-table td {
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
  color: #1a1a1a;
  font-weight: 600;
  font-size: 14px;
}

.specifications-table tr:last-child td {
  border-bottom: none;
}

.specifications-table tr:nth-child(even) {
  background: #f8f9fa;
}

/* Адаптивность */
@media (max-width: 768px) {
  .main-content {
    padding: 0 15px;
    margin-top: 0;
  }

  .breadcrumbs {
    padding: 92px 15px 20px;
  }
  
  .product-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .product-title {
    font-size: 26px;
  }
  
  .product-short-description {
    font-size: 16px;
  }
  
  .tab-buttons {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .tab-buttons::-webkit-scrollbar {
    display: none;
  }
  
  .tab-btn {
    flex-shrink: 0;
    font-size: 13px;
    padding: 10px 15px;
    scroll-snap-align: start;
  }
  
  .order-btn {
    width: 100%;
    padding: 15px;
  }
  
  .section-title {
    font-size: 24px;
  }
  
  .specifications-table th,
  .specifications-table td {
    padding: 12px 15px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .thumbnail-images {
    justify-content: center;
  }
  
  .thumbnail {
    width: 70px;
    height: 70px;
  }
  
  .product-title {
    font-size: 22px;
  }
  
  .nav {
    gap: 20px;
  }
  
  .nav-item {
    font-size: 12px;
  }
}

/* Стили загрузки */
.loading-spinner {
  display: inline-block;
  color: #666;
  font-style: italic;
}

/* Стили ошибки */
.error-container {
  text-align: center;
  padding: 60px 20px;
}

.error-container h1 {
  color: #e74c3c;
  margin-bottom: 20px;
  font-size: 28px;
}

.error-container p {
  font-size: 18px;
  color: #666;
  margin-bottom: 30px;
  line-height: 1.5;
}

.error-container a {
  display: inline-block;
  background: #f34c43;
  color: white;
  padding: 12px 24px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  transition: background 0.3s ease;
}

.error-container a:hover {
  background: #e63946;
}

/* Стили для таблицы спецификаций */
.specifications-info {
  padding: 15px 20px;
  background: #e7f3ff;
  border-radius: 8px;
  margin-bottom: 20px;
  border-left: 4px solid #2196f3;
}

.specifications-info p {
  margin: 5px 0;
  font-size: 14px;
  color: #555;
}

.specifications-info strong {
  color: #333;
  font-weight: 600;
}

.specifications-table-wrapper {
  overflow-x: auto;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.specs-table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.specs-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 700;
  font-size: 15px;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.specs-table th:last-child {
  border-right: none;
}

.specs-table tbody tr {
  border-bottom: 1px solid #eee;
  transition: background 0.2s ease;
}

.specs-table tbody tr:hover {
  background: #f8f9fa;
}

.specs-table tbody tr:last-child {
  border-bottom: none;
}

.specs-table td {
  padding: 12px 16px;
  color: #1a1a1a;
  font-weight: 600;
  font-size: 14px;
  border-right: 1px solid #eee;
}

.specs-table td:last-child {
  border-right: none;
}

.specs-table tbody tr:nth-child(even) {
  background: #fafbfc;
}

.specs-table tbody tr:nth-child(even):hover {
  background: #f0f2f5;
}

.specifications-loading,
.specifications-error,
.specifications-empty {
  padding: 40px;
  text-align: center;
  background: #f8f9fa;
  border-radius: 10px;
}

.specifications-loading p,
.specifications-empty p {
  color: #666;
  font-size: 16px;
  margin: 0;
}

.specifications-error {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
}

.specifications-error p {
  color: #856404;
  font-size: 16px;
  margin-bottom: 20px;
}

.specifications-download-footer {
  text-align: center;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
}

.download-specifications-btn,
.download-specifications-btn-small {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #28a745;
  color: white;
  padding: 14px 30px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.download-specifications-btn-small {
  background: #6c757d;
  padding: 10px 20px;
  font-size: 14px;
  box-shadow: 0 2px 10px rgba(108, 117, 125, 0.3);
}

.download-specifications-btn:hover {
  background: #218838;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.download-specifications-btn-small:hover {
  background: #5a6268;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
}

.download-specifications-btn:active,
.download-specifications-btn-small:active {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .specifications-info {
    padding: 12px 15px;
    font-size: 13px;
  }
  
  .specs-table {
    font-size: 12px;
  }
  
  .specs-table th,
  .specs-table td {
    padding: 10px 12px;
  }
  
  .download-specifications-btn,
  .download-specifications-btn-small {
    padding: 12px 24px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .specifications-table-wrapper {
    border-radius: 6px;
  }
  
  .specs-table {
    font-size: 11px;
  }
  
  .specs-table th,
  .specs-table td {
    padding: 8px 10px;
  }
}

/* ========== Калькулятор Арзамит-5 ========== */

/* Кнопка калькулятора */
.calculator-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  color: #333;
  border: 2px solid #e0e0e0;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Roboto', sans-serif;
}

.calculator-btn:hover {
  border-color: #f34c43;
  color: #f34c43;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(243, 76, 67, 0.15);
}

.calculator-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.product-actions {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}

/* Модальное окно калькулятора */
.calculator-modal-content {
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
}

.calculator-body {
  padding: 24px 30px 30px;
}

/* Секции калькулятора */
.calc-section {
  margin-bottom: 24px;
}

.calc-label {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  margin-bottom: 12px;
}

/* Радио-кнопки режима */
.calc-mode-switch {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.calc-radio {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 16px;
  user-select: none;
}

.calc-radio input {
  display: none;
}

.calc-radio-mark {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #ccc;
  position: relative;
  flex-shrink: 0;
  transition: border-color 0.2s ease;
}

.calc-radio input:checked + .calc-radio-mark {
  border-color: #333;
}

.calc-radio input:checked + .calc-radio-mark::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #333;
}

.calc-radio-text {
  font-weight: 500;
  color: #333;
}

/* Карточки типов поверхности */
.calc-surface-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.calc-surface-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.calc-surface-card input {
  display: none;
}

.calc-surface-check {
  position: absolute;
  top: -4px;
  left: -4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.2s ease;
  z-index: 2;
}

.calc-surface-check svg {
  width: 16px;
  height: 16px;
}

.calc-surface-card.active .calc-surface-check {
  opacity: 1;
  transform: scale(1);
}

.calc-surface-img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  transition: border-color 0.2s ease;
  overflow: hidden;
}

.calc-surface-img svg {
  width: 70%;
  height: 70%;
}

.calc-surface-card.active .calc-surface-img {
  border-color: #333;
}

.calc-surface-name {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  text-align: center;
  line-height: 1.3;
}

/* Поле ввода */
.calc-input-label {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #333;
  margin-bottom: 10px;
}

.calc-input {
  width: 100%;
  padding: 16px 20px;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  font-size: 16px;
  font-family: 'Roboto', sans-serif;
  background: white;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -moz-appearance: textfield;
}

.calc-input::-webkit-outer-spin-button,
.calc-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.calc-input:focus {
  outline: none;
  border-color: #333;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.calc-input::placeholder {
  color: #bbb;
}

/* Результаты */
.calc-results {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.calc-result-group {
  /* Группа результатов */
}

.calc-result-title {
  font-size: 17px;
  font-weight: 700;
  color: #333;
  margin-bottom: 10px;
}

.calc-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.calc-result-name {
  font-size: 16px;
  color: #555;
  font-weight: 400;
}

.calc-result-value {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

/* Адаптивность калькулятора */
@media (max-width: 768px) {
  .calculator-modal-content {
    max-width: none;
    width: 95%;
    margin: 5% auto;
  }

  .calculator-body {
    padding: 20px;
  }

  .calc-surface-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }

  .calc-surface-name {
    font-size: 11px;
  }

  .calc-surface-check {
    width: 24px;
    height: 24px;
  }

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

  .calculator-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .calc-surface-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .calculator-body {
    padding: 15px;
  }

  .calc-label,
  .calc-input-label,
  .calc-result-title {
    font-size: 16px;
  }

  .calc-result-name,
  .calc-result-value {
    font-size: 14px;
  }
}

/* Стили модального окна */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: #f5f5f5;
  margin: 5% auto;
  padding: 0;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  color: #999;
  cursor: pointer;
  z-index: 1;
  transition: color 0.3s ease;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  line-height: 1;
}

.modal-close:hover {
  color: #f34c43;
}

.modal-close:focus-visible {
  outline: 2px solid #f34c43;
  outline-offset: 2px;
  border-radius: 4px;
}

.modal-title {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  color: #333;
  margin: 0;
  padding: 30px 30px 20px;
  border-bottom: 1px solid #eee;
}

.consultation-form {
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: flex;
  gap: 15px;
}

.form-row input {
  flex: 1;
}

.consultation-form input {
  width: 100%;
  padding: 15px 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  font-family: 'Roboto', sans-serif;
  background-color: white;
  transition: all 0.3s ease;
}

.consultation-form input:focus {
  outline: none;
  border-color: #f34c43;
  box-shadow: 0 0 0 3px rgba(243, 76, 67, 0.1);
}

.consultation-form input::placeholder {
  color: #999;
  font-weight: 400;
}

.submit-btn {
  background: linear-gradient(135deg, #f34c43, #e63946);
  color: white;
  border: none;
  padding: 18px 40px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(243, 76, 67, 0.3);
  font-family: 'Roboto', sans-serif;
  width: 100%;
}

.submit-btn:hover {
  background: linear-gradient(135deg, #e63946, #d32f2f);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(243, 76, 67, 0.4);
}

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

.submit-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Адаптивность модального окна */
@media (max-width: 768px) {
  .modal-content {
    margin: 10% auto;
    width: 95%;
    max-width: none;
  }
  
  .modal-title {
    font-size: 20px;
    padding: 25px 20px 15px;
  }
  
  .consultation-form {
    padding: 20px;
    gap: 15px;
  }
  
  .form-row {
    flex-direction: column;
    gap: 15px;
  }
  
  .consultation-form input {
    padding: 12px 15px;
    font-size: 14px;
  }
  
  .submit-btn {
    padding: 15px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .modal-content {
    margin: 5% auto;
    width: 95%;
  }
  
  .modal-title {
    font-size: 18px;
    padding: 20px 15px 15px;
  }
  
  .consultation-form {
    padding: 15px;
    gap: 12px;
  }
  
  .consultation-form input {
    padding: 10px 12px;
    font-size: 13px;
  }
  
  .submit-btn {
    padding: 12px;
    font-size: 13px;
  }
}
