/* место под полосу прокрутки резервируем всегда: ширина страницы не прыгает при переходе */
html { scrollbar-gutter: stable; }

/* Шапка MINFOTO — единый источник для всех страниц.
   Подключается после основных стилей страницы, использует переменные:
   --ink, --red, --inset. Ничего не переопределяет вне .top. */

.top {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
  font-size: 16px;
  position: fixed;
  inset: 12px clamp(16px, 3vw, 56px) auto;
  z-index: 40;
}

.top .bar {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
  padding: 11px 22px 11px 30px;
  border-radius: 999px;
  background: rgba(14, 13, 15, .62);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .2),
    inset 0 -1px 0 rgba(0, 0, 0, .28),
    0 20px 46px -26px rgba(0, 0, 0, .9);
}

.top .brand {
  display: flex;
  align-items: center;
  gap: 17px;
  text-decoration: none;
  color: var(--ink);
}

.top .brand img { height: 27px; width: auto; display: block; opacity: .95; }

.top .brand b {
  font-weight: 500;
  font-size: 23px;
  line-height: 1;
  letter-spacing: .055em;
  text-transform: uppercase;
  white-space: nowrap;
}

.top .tabs {
  position: relative;
  display: flex;
  gap: 2px;
  margin-left: auto;
  padding: 4px;
  border-radius: 999px;
}

.top .pill {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .9);
  transition: transform .34s cubic-bezier(.45, 0, .25, 1), width .34s cubic-bezier(.45, 0, .25, 1);
  will-change: transform, width;
  pointer-events: none;
  opacity: 0;
}

html.pill-ready .top .pill { opacity: 1; }

.top .tab {
  position: relative;
  z-index: 1;
  padding: 12px;
  border-radius: 999px;
  text-decoration: none;
  color: rgba(247, 245, 242, .66);
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  transition: color .1s ease .34s;
}

.top .tab:hover { color: #fff; }

.top .tab.on {
  color: #0a0a0a;
  transition: color 0s linear .34s, background-color 0s linear .34s;
  background: #fff;
}

.top .btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #c03d2d;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 15.5px;
  line-height: 1.2;
  padding: 12px 22px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 12px 28px -14px rgba(228, 80, 63, .85), inset 0 1px 0 rgba(255, 255, 255, .28);
  transition: background .25s ease, box-shadow .3s ease;
}

.top .btn:hover { background: #d34b3b; }

/* кнопка-элемент в шапке: сбрасываем браузерные стили */
button.btn { border: 0; font: inherit; font-weight: 500; cursor: pointer; }

.top a:focus-visible,
.top button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, .85);
  outline-offset: 3px;
  border-radius: 999px;
}

@media (max-width: 900px) {
  .top .brand b { display: none; }
  .top .brand img { height: 24px; }
  .top .tabs { display: none; }
  .top .btn { margin-left: auto; font-size: 13px; padding: 10px 14px; }
}

/* мобильное меню: бургер вместо вкладок до 900 px */
.top .burger {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: 8px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .06);
  cursor: pointer;
  position: relative;
}
.top .burger span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 1.5px;
  background: #f7f5f2;
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.top .burger span:nth-child(1) { top: 15px; }
.top .burger span:nth-child(2) { top: 20px; }
.top .burger span:nth-child(3) { top: 25px; }
.top .burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.top .burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.top .burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.mnav {
  position: fixed;
  inset: 0;
  z-index: 39;
  padding: 96px clamp(16px, 6vw, 40px) 32px;
  background: rgba(10, 9, 9, .96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.mnav[hidden] { display: none; }
.mnav nav { display: flex; flex-direction: column; }
.mnav nav a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 15px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  color: #f7f5f2;
  text-decoration: none;
  font-size: 21px;
  letter-spacing: -.01em;
}
.mnav nav a small { font-size: 12.5px; color: rgba(247, 245, 242, .55); letter-spacing: 0; }
.mnav nav a[aria-current="page"] { color: #e4503f; }
.mnav .btn { align-self: flex-start; }
.mnav__tel {
  color: rgba(247, 245, 242, .75);
  text-decoration: none;
  font-size: 17px;
  letter-spacing: .02em;
}
html.mnav-open body { overflow: hidden; }

@media (max-width: 900px) {
  .top .burger { display: block; }
  .top .btn { margin-left: auto; }
}
/* меню на телефоне выше баннера cookie, шапка — выше меню */
.mnav { z-index: 85; }
.top { z-index: 86; }
@media (max-width: 900px) {
  .mnav { padding-bottom: 120px; }
}
/* кнопка внутри меню — та же красная пилюля, что в шапке */
.mnav .btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  background: #c03d2d;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.2;
  padding: 14px 26px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  box-shadow: 0 12px 28px -14px rgba(228, 80, 63, .85), inset 0 1px 0 rgba(255, 255, 255, .28);
}
.mnav .btn:hover { background: #d34b3b; }