/* ============================================================
   GM FORMULA — стили шапки (перенесено из оригинального
   _customer-header, значения цветов/отступов сохранены).
   Пути к иконкам ведут в /wp-content/uploads/2026/07/ —
   туда, куда вы уже загрузили файлы. Логотип — .webp.
   ============================================================ */

.gmf-header { box-sizing: border-box; margin: 0; padding: 0; font-family: "Exo 2", Arial, sans-serif; color: #091C33; position: relative; z-index: 20; background: #fff; }
.gmf-header *, .gmf-header *::before, .gmf-header *::after { box-sizing: border-box; }
.gmf-header img { max-width: 100%; border: none; display: block; }
.gmf-header ul { list-style: none; margin: 0; padding: 0; }
.gmf-header a { text-decoration: none; }
.gmf-header button { font-family: inherit; }

/* ---------- Верхняя строка ---------- */
._customer-header { box-sizing: border-box; position: relative; z-index: 4; }
._customer-header__container { max-width: 1228px; margin: 0 auto; padding: 0 10px; }
._customer-header__wrapper { display: flex; justify-content: space-between; align-items: center; padding: 11px 0 16px; gap: 20px; flex-wrap: wrap; }

._customer-header__descr { display: flex; justify-content: center; align-items: center; width: 100%; height: 22px; background: #144582; font: 400 12px/14px "Exo 2", sans-serif; color: #fff; text-align: center; }

._customer-header__logo { display: block; text-decoration: none; outline: 0; overflow: hidden; width: 165px; height: 70px; flex-shrink: 0; }
._customer-header__img { display: block; width: 100%; height: 100%; object-fit: contain; }

._customer-header__contacts { display: flex; flex-direction: column; gap: 8px; }

._customer-header__location { display: block; text-decoration: none; outline: 0; background: url("/wp-content/uploads/2026/07/content_location-icon.png") left top 3px no-repeat; font: 400 16px/19px "Exo 2", sans-serif; white-space: nowrap; padding: 0 0 0 24px; color: #091C33 !important; }
._customer-header__location:hover { cursor: pointer; text-decoration: underline; }
._customer-header__location span { display: block; font: 400 12px/14px "Exo 2", sans-serif; color: rgba(9,28,51,.58); margin: 4px 0 0; }

._customer-header__time { background: url("/wp-content/uploads/2026/07/content_time-icon.png") left center no-repeat; font: 400 16px/19px "Exo 2", sans-serif; color: #091C33; white-space: nowrap; padding: 0 0 0 24px; }

._customer-header__phones { display: flex; flex-direction: column; align-items: flex-start; padding: 0 25px 0 20px; position: relative; background: url("/wp-content/uploads/2026/07/content_phone-icon.png") left top 3px no-repeat; }
._customer-header__phones::after { content: ""; width: 11px; height: 7px; position: absolute; top: 6px; right: 9px; background: url("/wp-content/uploads/2026/07/content_arrow-icon.png") center / cover no-repeat; }
._customer-header__phones:hover::after, ._customer-header__phones.is-open::after { transform: rotate(180deg); }

._customer-header .company-phone__link { display: block; text-decoration: none; outline: 0; font: 600 16px/19px "Exo 2", sans-serif; white-space: nowrap; cursor: pointer; color: #091C33 !important; background: none; border: none; padding: 0; text-align: left; }
._customer-header .company-phone__link:hover { text-decoration: underline; cursor: pointer; }

._customer-header__droplist { display: none; position: absolute; background: #fff; top: 100%; left: 0; padding: 8px 0 0 20px; box-shadow: rgba(40,46,64,.15) 0 10px 20px 0; border-radius: 0 0 6px 6px; z-index: 5; }
._customer-header__droplist ._customer-header__phone { margin-bottom: 8px; }
._customer-header__phones:hover ._customer-header__droplist,
._customer-header__phones.is-open ._customer-header__droplist { display: block; }

._customer-header__email { display: block; text-decoration: none; outline: 0; padding-left: 20px; white-space: nowrap; background: url("/wp-content/uploads/2026/07/content_mail-icon.png") left center no-repeat; font: 400 16px/19px "Exo 2", sans-serif; color: #091C33 !important; }
._customer-header__email:hover { cursor: pointer; text-decoration: underline; }

._customer-header__buttons { display: flex; align-items: center; width: 100%; max-width: 320px; gap: 12px; }
._customer-header__callback,
._customer-header__order { display: flex; justify-content: center; align-items: center; width: 100%; max-width: 154px; height: 45px; outline: 0; padding: 0; border-radius: 6px; font: 700 14px "Exo 2", sans-serif; cursor: pointer; }
._customer-header__callback { border: 1px solid #FF6B00; color: #FF6B00; background: none; }
._customer-header__callback:hover { opacity: .85; }
._customer-header__order { border: none; background: linear-gradient(97deg, #FF6B00 0%, #FF951A 55.19%, #FF6B00 100%); color: #fff; font-family: "Exo 2", sans-serif; }
._customer-header__order:hover { opacity: .85; }

/* ---------- Строка меню + поиск ---------- */
._customer-menu-row { border-top: 1px solid #EEF0F3; border-bottom: 1px solid #EEF0F3; background: #fff; }
._customer-menu-row__inner { max-width: 1228px; margin: 0 auto; padding: 10px 10px; display: flex; align-items: center; gap: 20px; flex-wrap: nowrap; }

/* ---------- Выпадающие подменю (штатное меню WordPress) ----------
   Работает для меню из «Внешний вид → Меню»: пункт с вложенными
   подпунктами (например «Каталог» → категории/бренды) автоматически
   получает класс .menu-item-has-children и раскрывается ниже. */
._customer-menu { display: flex; flex-wrap: wrap; align-items: center; }
._customer-menu li.menu-item-has-children { position: relative; }
._customer-menu li.menu-item-has-children > a::after {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px); vertical-align: middle;
}
._customer-menu ul.sub-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 60;
  min-width: 240px; margin: 0; padding: 8px; list-style: none;
  background: #fff; border: 1px solid #E7EAF0; border-radius: 10px;
  box-shadow: rgba(9,28,51,.14) 0 16px 40px 0;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
._customer-menu li.menu-item-has-children:hover > ul.sub-menu,
._customer-menu li.menu-item-has-children.is-open > ul.sub-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
._customer-menu ul.sub-menu li { margin: 0; }
._customer-menu ul.sub-menu a {
  display: block; padding: 9px 12px; border-radius: 6px; line-height: 1.3;
  background: none !important; color: #091C33 !important;
  font: 600 14px "Exo 2", sans-serif; white-space: nowrap;
}
._customer-menu ul.sub-menu a:hover { background: #F6F6F9 !important; color: #144582 !important; }

._customer-menu li { margin: 0 20px 0 0; }
._customer-menu li:last-child { margin-right: 0; }
._customer-menu a { display: block; padding: 0 20px; line-height: 47px; border-radius: 6px; background-color: #F6F6F9; color: #091C33; font: 700 14px "Exo 2", sans-serif; white-space: nowrap; }
._customer-menu a:hover,
._customer-menu li.is-active a { background-color: #144582; color: #fff; }

._customer-add__search { position: relative; margin: 0; flex: 1 1 0%; min-width: 160px; }
._customer-add__search input { display: block; width: 100%; background-color: #F6F6F9; border: none; outline: 0; padding: 0 64px 0 20px; color: #091C33; font-family: "Exo 2", sans-serif; font-size: 14px; font-weight: 700; height: 47px; border-radius: 6px; }
._customer-add__search input::placeholder { color: #7F8996; }
._customer-add__search-btn { display: block; width: 64px; height: 47px; border: none; outline: 0; border-radius: 6px; background: url("/wp-content/uploads/2026/07/content_search-icon.png") center no-repeat transparent; position: absolute; top: 0; right: 0; cursor: pointer; }
._customer-add__search-btn:hover { opacity: .85; }

/* ---------- Бургер (только мобильный) ---------- */
._customer-header__burger { display: none; width: 40px; height: 40px; border: 1px solid rgba(9,28,51,.2); border-radius: 6px; background: none; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
._customer-header__burger span, ._customer-header__burger span::before, ._customer-header__burger span::after { display: block; width: 18px; height: 2px; background: #091C33; position: relative; transition: transform .2s, opacity .2s; }
._customer-header__burger span::before, ._customer-header__burger span::after { content: ""; position: absolute; left: 0; }
._customer-header__burger span::before { top: -6px; }
._customer-header__burger span::after { top: 6px; }
._customer-header__burger.is-active span { background: transparent; }
._customer-header__burger.is-active span::before { transform: translateY(6px) rotate(45deg); }
._customer-header__burger.is-active span::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Адаптив ----------
   Брейкпоинты: 1180 (узкий десктоп), 992 (планшет-альбом),
   900 (планшет-книга → бургер), 640 (мобильный). */
@media (max-width: 1180px) {
  ._customer-header .company-phone__link,
  ._customer-header__email,
  ._customer-header__time,
  ._customer-header__location { font-size: 13px; line-height: 18px; }
  ._customer-header__buttons { max-width: 272px; }
  ._customer-header__callback, ._customer-header__order { max-width: 130px; font-size: 12px; height: 40px; }
}

/* Планшет-альбом: контакты и кнопки в две строки, аккуратный перенос */
@media (max-width: 992px) {
  ._customer-header__wrapper { row-gap: 12px; column-gap: 16px; }
  ._customer-header__buttons { max-width: none; width: auto; margin-left: auto; }
  ._customer-header__callback, ._customer-header__order { max-width: 160px; }
}

@media (max-width: 900px) {
  ._customer-header__burger { display: flex; }
  ._customer-menu-row__inner { display: none; flex-wrap: wrap; }
  ._customer-menu-row__inner.is-open { display: flex; }
  ._customer-menu { flex-direction: column; align-items: stretch; width: 100%; }
  ._customer-menu li { margin: 0 0 8px; }
  ._customer-menu a { text-align: center; line-height: 46px; }

  ._customer-add__search { width: 100%; }

  /* Подменю в мобильном меню — раскрывается в потоке, на всю ширину */
  ._customer-menu ul.sub-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none; min-width: 0; width: 100%;
    padding: 4px 0 4px 12px; margin-top: 4px;
  }
  ._customer-menu li.menu-item-has-children > a::after { float: right; margin-top: 8px; }
}

@media (max-width: 640px) {
  ._customer-header__wrapper { padding: 10px 0 14px; gap: 12px; }
  ._customer-header__logo { width: 130px; height: 55px; }
  ._customer-header__contacts { width: 100%; }
  ._customer-header__buttons { max-width: none; width: 100%; margin-left: 0; }
  ._customer-header__callback, ._customer-header__order { max-width: none; height: 46px; }
  /* точка касания меню-кнопки не меньше 44px */
  ._customer-header__burger { width: 44px; height: 44px; }
}

/* ---------- Доступность ----------
   Видимый фокус для клавиатуры (не мешает мыши), уважение к
   настройке «уменьшить движение». */
.gmf-header a:focus-visible,
.gmf-header button:focus-visible,
._customer-add__search input:focus-visible {
  outline: 2px solid #144582;
  outline-offset: 2px;
  border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  ._customer-menu ul.sub-menu,
  ._customer-header__burger span,
  ._customer-header__burger span::before,
  ._customer-header__burger span::after { transition: none; }
}
