/* ==========================================================================
   Possy — новый каркас публичного сайта + кнопки в цветах логотипа
   Подключается после possy-redesign.css только на публичных страницах
   ========================================================================== */

:root {
  --p-blue-400: #4fc3f7;
  --p-blue-500: #1e88c7;
  --p-green-400: #9ad65c;
  --p-green-500: #5e9e3a;
}

/* --- сбрасываем старую раскладку Matoxi --------------------------------- */
body.site-public { background: #f6f8fc; }
.site-public .main-wrapper { margin: 0 !important; }
.site-public .main-content { padding: 0; }

/* --- верхняя служебная полоса ------------------------------------------ */
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--p-line-2);
  font-size: 12px;
  color: var(--p-muted);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
}
.topbar-left { display: flex; align-items: center; gap: 8px; }
.topbar-right { display: flex; align-items: center; gap: 18px; }
.topbar-right a { color: #667085; text-decoration: none; }
.topbar-right a:hover { color: var(--p-blue-500); }

/* --- шапка -------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: #fff;
  border-bottom: 1px solid var(--p-line);
}
.header-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 0;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.brand img { display: block; height: 34px; width: auto; }

.site-nav { display: flex; align-items: center; gap: 2px; }
.site-nav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: #344054;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav a:hover { background: #eaf5ff; color: var(--p-blue-500); }

.site-search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  max-width: 520px;
  margin-left: auto;
  padding: 3px 3px 3px 38px;
  background: #fff;
  border: 1.5px solid #dfe6ef;
  border-radius: 12px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.site-search:focus-within {
  border-color: var(--p-blue-400);
  box-shadow: 0 0 0 4px rgba(79, 195, 247, .14);
}
.site-search-icon {
  position: absolute;
  left: 12px;
  color: #98a2b3;
  font-size: 18px;
  pointer-events: none;
}
.site-search .search-control {
  border: 0;
  box-shadow: none !important;
  background: transparent;
  height: 38px;
  font-size: 14px;
  padding-left: 0;
  min-width: 0;
}
.site-search .search-control::placeholder { color: #98a2b3; }
.site-search-btn { border-radius: 9px; padding: .38rem .95rem; font-size: 13px; }
.site-search .search-close { display: none; }

.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-left: auto; }
.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 10px;
  color: #475467;
  text-decoration: none;
  font-size: 18px;
}
.icon-btn:hover { background: #eaf5ff; color: var(--p-blue-500); }
.menu-toggle {
  width: 38px; height: 38px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #344054;
  font-size: 22px;
  line-height: 1;
}

/* --- кнопки в цветах логотипа ------------------------------------------ */
.btn-primary {
  --bs-btn-color: #0f5aa8;
  --bs-btn-hover-color: #0b4a8a;
  --bs-btn-active-color: #0b4a8a;
  --bs-btn-disabled-color: #9db6c9;
  --bs-btn-bg: #e3f3ff;
  --bs-btn-border-color: #a6d2f5;
  --bs-btn-hover-bg: #d2e9ff;
  --bs-btn-hover-border-color: #7fbdf0;
  --bs-btn-active-bg: #c3e2fb;
  --bs-btn-active-border-color: #6fb2e9;
  background-image: linear-gradient(135deg, #e8f5ff 0%, #cfe9ff 100%);
  border-color: #a6d2f5;
  color: #0f5aa8;
  box-shadow: 0 2px 8px rgba(30, 136, 199, .14), inset 0 1px 0 rgba(255, 255, 255, .9);
}
.btn-primary:hover, .btn-primary:focus-visible {
  background-image: linear-gradient(135deg, #d9efff 0%, #b8dcff 100%);
  border-color: #7fbdf0;
  color: #0b4a8a;
  box-shadow: 0 4px 14px rgba(30, 136, 199, .20), inset 0 1px 0 rgba(255, 255, 255, .9);
}
.btn-primary:active {
  background-image: linear-gradient(135deg, #c9e6ff 0%, #a7d3fb 100%);
  border-color: #6fb2e9;
  color: #0b4a8a;
}

.btn-success {
  --bs-btn-color: #3f6f1f;
  --bs-btn-hover-color: #365f1a;
  --bs-btn-active-color: #365f1a;
  --bs-btn-border-color: #c3e39c;
  --bs-btn-hover-bg: #e6f7d4;
  --bs-btn-hover-border-color: #a7d67e;
  --bs-btn-active-bg: #d3eeb6;
  --bs-btn-active-border-color: #8fc75f;
  background-image: linear-gradient(135deg, #f1fbe6 0%, #dcf2c7 100%);
  border-color: #c3e39c;
  color: #3f6f1f;
  box-shadow: 0 2px 8px rgba(94, 158, 58, .16), inset 0 1px 0 rgba(255, 255, 255, .9);
}
.btn-success:hover, .btn-success:focus-visible {
  background-image: linear-gradient(135deg, #e6f7d4 0%, #cbe9ad 100%);
  border-color: #a7d67e;
  color: #365f1a;
}
.btn-outline-success {
  --bs-btn-color: #4c7d24;
  --bs-btn-border-color: #c3e39c;
  --bs-btn-hover-bg: #f1fbe6;
  --bs-btn-hover-border-color: #a7d67e;
  --bs-btn-hover-color: #3f6f1f;
  --bs-btn-active-bg: #e6f7d4;
  --bs-btn-active-border-color: #a7d67e;
  --bs-btn-active-color: #3f6f1f;
}
.text-success { color: var(--p-green-500) !important; }

/* «минимальная цена» — зелёная плашка, средняя — янтарная, макс — коралл */
.btn-inverse-success { background: #eef9e3; color: #3f6f1f; border-color: #c3e39c; }
.btn-inverse-success h3 { color: #3f6f1f !important; }
.btn-inverse-success:hover { background: #eef9e3; color: #3f6f1f; border-color: #c3e39c; }

/* --- подвал ------------------------------------------------------------- */
.site-footer {
  background: #fff;
  border-top: 1px solid var(--p-line);
  margin-top: 48px;
  padding: 40px 0 20px;
  font-size: 13px;
  color: #475467;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 28px;
}
.footer-brand img { height: 30px; width: auto; margin-bottom: 14px; }
.footer-brand p { max-width: 340px; margin: 0 0 10px; color: #667085; line-height: 1.5; }
.footer-link-more { color: var(--p-blue-500); text-decoration: none; font-weight: 500; }
.footer-link-more:hover { text-decoration: underline; }
.footer-col h6 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #101828;
  margin: 0 0 12px;
  font-weight: 700;
}
.footer-col a { display: block; padding: 4px 0; color: #475467; text-decoration: none; }
.footer-col a:hover { color: var(--p-blue-500); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--p-line-2);
  font-size: 12px;
  color: #98a2b3;
}

/* --- адаптив ------------------------------------------------------------ */
@media (max-width: 1199.98px) {
  .site-search { max-width: 380px; }
  .site-nav a { padding: 8px 9px; font-size: 13px; }
}

@media (max-width: 991.98px) {
  .header-row { flex-wrap: wrap; row-gap: 10px; }
  .site-search { flex: 1 0 100%; max-width: none; margin-left: 0; order: 5; }
  .topbar-right { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 22px; }
}

@media (max-width: 575.98px) {
  .footer-grid { grid-template-columns: 1fr; }
  .brand img { height: 28px; }
}
