body {
  font-family: Arial, sans-serif;
}

header, footer {
  background-color: #f8f8f8;
}

h1, h2 {
  margin: 0;
}

nav a {
  margin-right: 10px;
  text-decoration: none;
  color: #2563eb; /* синий Tailwind */
  transition: color 0.2s;
}

nav a:hover {
  text-decoration: underline;
  color: #1d4ed8; /* Более тёмный синий при ховере */
}

/* Карточки */
.catalog-card,
.bg-white.rounded-lg.p-6.shadow {
  transition: box-shadow 0.15s, transform 0.15s;
}
.catalog-card:hover,
.bg-white.rounded-lg.p-6.shadow:hover {
  box-shadow: 0 6px 30px 0 rgba(37, 99, 235, 0.12);
  transform: translateY(-2px) scale(1.01);
}

/* Скрываем заголовок галереи на мобильных устройствах */
@media (max-width: 640px) {
    .gslide-title {
        display: none !important;
    }
}

/* Кнопки */
button, .btn {
  transition: background 0.15s, color 0.15s;
}
button:active, .btn:active {
  filter: brightness(0.92);
}

/* Дополнительные стили для формы заявок */
input, select, textarea {
  outline: none;
  transition: border-color 0.2s;
}
input:focus, select:focus, textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px #3b82f633;
}

/* Скрытие элемента через класс */
.js-hide {
  display: none !important;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

.note {
  font-size: 0.9em;
  color: #555;
  margin-top: 10px;
}

.error {
  color: red;
  margin-top: 10px;
}

.order-item {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 10px;
  background-color: #f9f9f9;
  cursor: pointer;
  transition: background 0.2s;
}
.order-item:hover {
  background-color: #f0f0f0;
}

.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}
.modal.hidden {
  display: none;
}
.modal-content {
  background: white;
  padding: 20px;
  width: 100%;
  max-width: 500px;
  border-radius: 8px;
  position: relative;
}
.close {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 22px;
  cursor: pointer;
}

#chat-box {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  padding: 10px;
  background: #fafafa;
}

.msg-user {
  background: #e0f2fe;
  margin: 5px 0;
  padding: 8px 10px;
  text-align: right;
  border-radius: 6px;
}
.msg-admin {
  background: #fff7ed;
  margin: 5px 0;
  padding: 8px 10px;
  text-align: left;
  border-radius: 6px;
}
/* ====== Фильтры (UI-оформление) ====== */
.filter-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 6px 28px rgba(37, 99, 235, 0.08);
  padding: 16px;
  margin: 16px auto 20px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: flex-end;
  margin-bottom: 12px;
}

.filter-col {
  flex: 1 1 180px;
  min-width: 180px;
}

.filter-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #6b7280; /* gray-500 */
  margin: 0 0 6px 2px;
  text-transform: uppercase;
}

.filter-input {
  width: 100%;
  height: 40px;
  border: 1px solid #e5e7eb; /* gray-200 */
  border-radius: 10px;
  padding: 8px 12px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}

.filter-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
  outline: none;
}

.filter-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  cursor: pointer;
  user-select: none;
  transition: background .15s, border-color .15s, color .15s;
}

.filter-check input[type="checkbox"] {
  accent-color: #2563eb;
  width: 16px;
  height: 16px;
}

.filter-check:hover {
  background: #f8fafc; /* slate-50 */
  border-color: #cbd5e1; /* slate-300 */
}

.filter-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.btn-primary {
  background: #2563eb;
  color: #fff;
  border: 1px solid #2563eb;
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 600;
  transition: transform .08s ease, box-shadow .15s;
}
.btn-primary:hover { box-shadow: 0 6px 22px rgba(37, 99, 235, 0.28); }
.btn-primary:active { transform: translateY(1px); }

.btn-ghost {
  background: #eef2ff; /* indigo-50 */
  color: #3730a3;      /* indigo-800 */
  border: 1px solid #e0e7ff;
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 600;
}

.btn-outlined {
  background: #fff;
  color: #2563eb;
  border: 1px solid #2563eb;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 600;
}

.filter-icon {
  position: absolute;
  width: 18px; height: 18px;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: #9ca3af; /* gray-400 */
  pointer-events: none;
}

/* Мобила: одна колонка, кнопка калькулятора вниз */
@media (max-width: 768px) {
  .filter-col { min-width: 100%; }
  .filter-actions { flex-direction: column; align-items: stretch; }
  .btn-outlined { order: 3; }
}
/* ===== BTU sticky (мобайл-френдли) ===== */
.btu-sticky {
  position: sticky;
  top: 56px;           /* подстрой под реальную высоту шапки */
  z-index: 30;
  margin: 8px 0 10px;
}

.btu-toggle {
  width: 100%;
  border: 1px solid #2563eb;
  color: #2563eb;
  background: #fff;
  height: 42px;
  border-radius: 10px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(37, 99, 235, .10);
}

.btu-card {
  margin-top: 8px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .06);
  max-height: 70vh;        /* НЕ во весь экран */
  overflow: auto;
}

.btu-field { display: grid; gap: 6px; font-size: 14px; }
.btu-input {
  height: 38px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 6px 10px;
  background: #fff;
}
.btu-input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.15); }

.btu-actions {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px;
}
.btu-result { margin-top: 8px; font-size: 14px; color: #111827; }

/* Компактнее на мобильных */
@media (max-width: 768px) {
  .btu-card { padding: 10px; border-radius: 12px; }
  .btu-result { font-size: 13px; }
}

/* Кнопки — используем уже существующие, но на всякий случай: */
.btn-primary {
  background: #2563eb; color: #fff; border: 1px solid #2563eb;
  border-radius: 10px; padding: 10px 16px; font-weight: 600;
}
.btn-ghost {
  background: #eef2ff; color: #3730a3; border: 1px solid #e0e7ff;
  border-radius: 10px; padding: 10px 16px; font-weight: 600;
}
/* Мобильный режим: калькулятор не "липкий", кнопка в фильтрах скрыта */
@media (max-width: 768px) {
  .btu-sticky { position: static !important; top: auto !important; }
  #toggleBtu { display: none !important; }     /* скрываем кнопку в блоке фильтров */
  .btu-card { max-height: 70vh; overflow: auto; } /* компактнее */
}

/* ПК: прячем мобильную кнопку, оставляем кнопки в фильтрах */
@media (min-width: 769px) {
  .btu-toggle { display: none !important; }
}
/* Калькулятор теперь обычный блок в карточке фильтров */
.btu-card {
  margin-top: 10px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .05);
}

@media (max-width: 768px) {
  /* На мобиле — компактнее, но не fullscreen */
  .btu-card { max-height: 70vh; overflow: auto; }
  /* Кнопка в фильтрах оставляем; отдельную "мобильную" кнопку мы убрали */
}

/* Дополнительно уменьшим «внимание» к калькулятору на ПК */
@media (min-width: 769px) {
  .btu-card { box-shadow: 0 3px 12px rgba(15, 23, 42, .06); }
}
