/* =========================================
   1. БАЗОВЫЕ НАСТРОЙКИ (ОБЩИЕ)
   ========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f4f6f8;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =========================================
   2. ШАПКА B2B (ПК ВЕРСИЯ)
   ========================================= */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(5px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* padding: ВЕРХ | ПРАВО | НИЗ | ЛЕВО */
  padding: 15px 20px 10px 20px;
}

.logo {
  display: flex;
  flex-direction: column;
}
.logo-wrapper {
  display: grid;
  grid-template-columns: auto auto; /* Создаем 2 колонки: 1 для лотоса, 2 для SABORG */
  align-items: center;
  text-decoration: none;
  width: max-content; /* Жестко ограничиваем ширину рамками текста */
}

.logo-img {
  width: 85px;
  height: auto;
  margin-right: 15px;
}

.logo-text {
  display: flex;
  align-items: center;
}

.logo-text-top {
  font-family: "Squada One", sans-serif;
  font-size: 45px;
  line-height: 0.8;
  color: #1a1a1a;
  text-transform: uppercase;
  letter-spacing: 1px;
  transform: scaleY(0.8);
  transform-origin: bottom;
}

.logo-text-sub {
  grid-column: 1 / 3; /* Магия здесь: растягиваем полоску ровно на обе верхние колонки */
  font-family: "Albert Sans", sans-serif;
  color: #1a1a1a;
  text-transform: lowercase;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 6.5px;

  border-top: 1px solid #1a1a1a;
  margin-top: 8px;
  padding-top: 5px;
}
.header-contacts {
  display: flex;
  align-items: center;
  gap: 20px;
}
.header-contacts p {
  font-size: 16px;
  margin: 0;
}
.btn-primary {
  background-color: #004494;
  color: #fff;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
  transition: background 0.3s;
  white-space: nowrap;
}
.btn-primary:hover {
  background-color: #002d62;
}

/* =========================================
   3. ГЛАВНЫЙ ЭКРАН И ПРЕИМУЩЕСТВА
   ========================================= */
.hero {
  background-color: #fff;
  padding: 60px 0;
  text-align: center;
  border-bottom: 1px solid #e0e0e0;
}
.hero h1 {
  font-size: 40px;
  margin-bottom: 20px;
  color: #222;
}
.hero p {
  font-size: 18px;
  color: #555;
  max-width: 800px;
  margin: 0 auto 30px;
}
.benefits-row {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}
.benefit-item {
  background-color: #eaf2f8;
  color: #004494;
  padding: 10px 20px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px;
}

/* =========================================
   4. О ПРОИЗВОДСТВЕ И ГАЛЕРЕЯ
   ========================================= */
.production {
  padding: 60px 0 20px;
  background-color: #f8f9fa;
}
.production-info {
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.production-info h2 {
  font-size: 32px;
  color: #1a222b;
  margin-bottom: 20px;
}
.production-info p {
  font-size: 18px;
  color: #4a5568;
  line-height: 1.6;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.gallery-item {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  aspect-ratio: 4 / 3;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-item:hover img {
  transform: scale(1.05);
}

/* =========================================
   5. КАТАЛОГ И КАЛЬКУЛЯТОР
   ========================================= */
.catalog {
  padding: 60px 0;
}
.catalog h2 {
  font-size: 32px;
  margin-bottom: 30px;
  color: #222;
  text-align: center;
}

.table-responsive {
  overflow-x: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.price-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}
.price-table th,
.price-table td {
  padding: 15px 20px;
  text-align: left;
  border-bottom: 1px solid #eee;
}
.price-table th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #333;
}
.price-table tbody tr {
  transition: background-color 0.2s ease;
}
.price-table tbody tr:hover {
  background-color: #f1f7fc;
}

.qty-input {
  width: 80px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
  text-align: center;
  transition: border-color 0.3s;
}
.qty-input:focus {
  outline: none;
  border-color: #004494;
}
.row-total-cell {
  font-weight: 600;
  color: #004494;
  white-space: nowrap;
}

.calculator-summary {
  margin-top: 30px;
  background-color: #fff;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  text-align: right;
}
.summary-text {
  font-size: 24px;
  font-weight: bold;
  color: #222;
  margin-bottom: 15px;
}
#grand-total {
  color: #004494;
}

.threshold-message {
  font-size: 16px;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: 6px;
  display: inline-block;
  transition: all 0.3s ease;
}
.threshold-message.pending {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}
.threshold-message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.btn-whatsapp {
  background-color: #004494;
  color: #fff;
  padding: 15px 40px;
  border: none;
  border-radius: 6px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 20px;
  transition: background-color 0.3s;
  display: inline-block;
}
.btn-whatsapp:hover {
  background-color: #002d62;
}

/* =========================================
   6. ФУТЕР (ПОДВАЛ)
   ========================================= */
.footer {
  background-color: #1a222b;
  color: #b0b8c1;
  padding: 50px 0 30px;
  margin-top: 50px;
  border-top: 4px solid #004494;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
}
.footer-col {
  flex: 1;
  min-width: 250px;
}
.footer-col h4 {
  font-family: "Squada One", sans-serif;
  color: #fff;
  font-size: 24px;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.footer-col p {
  margin-bottom: 10px;
  font-size: 15px;
}
.footer-col strong {
  color: #fff;
}
.copyright {
  margin-top: 20px;
  font-size: 13px !important;
  color: #6c757d;
}

/* =========================================
   7. АДАПТИВНОСТЬ ДЛЯ ПЛАНШЕТОВ И МОБИЛЬНЫХ
   ========================================= */
@media (max-width: 992px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* Шапка */
  .header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    /* padding: ВЕРХ | ПРАВО | НИЗ | ЛЕВО */
    padding: 25px 20px 10px 20px;
  }
  .header-contacts {
    display: contents;
  }

  .logo {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    justify-self: start;
    align-self: center;
    min-width: 0;
  }
  .logo-wrapper {
    width: max-content;
  } /* КРИТИЧЕСКОЕ ИСПРАВЛЕНИЕ: возвращаем блоку плотность */
  .logo-img {
    width: 38px;
    margin-right: 8px;
  }
  .logo-text-top {
    font-size: 28px;
  }

  .logo-text-sub {
    font-size: 11.5px;
    letter-spacing: 2.1px;
    margin-top: 6px;
    padding-top: 4px;
  }

  .btn-primary {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    align-self: center;
    padding: 10px 14px;
    font-size: 13px;
  }
  .header-contacts p {
    grid-column: 1 / 3;
    grid-row: 2 / 3;
    text-align: center;
    font-size: 14px;
    padding-top: 6px;
    border-top: 1px dashed #eee;
  }

  /* Галерея и блоки */
  .gallery {
    grid-template-columns: 1fr;
  }
  .production {
    padding: 40px 0 10px;
  }
  .production-info h2 {
    font-size: 26px;
  }
  .production-info p {
    font-size: 16px;
    text-align: left;
  }

  /* Футер и кнопки */
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
  .btn-whatsapp {
    width: 100%;
  }
}
