:root {
  --amg-header-bg: #111314;
  --amg-header-bg-2: #16191b;
  --amg-header-line: rgba(255, 255, 255, 0.1);
  --amg-header-text: rgba(255, 255, 255, 0.94);
  --amg-header-muted: rgba(255, 255, 255, 0.68);
  --amg-header-compact-bg: rgba(16, 18, 19, 0.94);
}

html.amg-menu-open,
body.amg-menu-open {
  overflow: hidden;
}

.amg-header {
  position: sticky;
  top: 0;
  z-index: 900;
  color: var(--amg-header-text);
  background: rgba(17, 19, 20, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
  transition: background-color 220ms ease, box-shadow 220ms ease, backdrop-filter 220ms ease, -webkit-backdrop-filter 220ms ease;
}

.amg-header--hero {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

.amg-compact-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 910;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-100%);
  transition: opacity 220ms ease, visibility 220ms ease, transform 220ms ease;
}

.amg-compact-header.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.admin-bar .amg-header,
.admin-bar .amg-compact-header {
  top: 32px;
}

.amg-topbar {
  overflow: visible;
  border-bottom: 1px solid var(--amg-header-line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
  transition: max-height 220ms ease, opacity 180ms ease, transform 220ms ease, border-color 180ms ease, background-color 180ms ease;
}

.amg-header--hero .amg-topbar {
  max-height: 72px;
  background: transparent;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}


.amg-topbar__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  min-height: 58px;
}

.amg-topbar__left,
.amg-topbar__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.amg-topbar__left {
  min-width: 0;
  overflow: visible;
}

.amg-topbar__right {
  justify-content: flex-end;
  gap: 36px;
  overflow: visible;
}

.amg-topbar__center {
  display: flex;
  justify-content: center;
  justify-self: center;
  overflow: visible;
}

.amg-topbar__item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-height: 42px;
  min-width: 0;
  max-width: 46px;
  padding: 0 11px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--amg-header-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: max-width 220ms ease, padding 220ms ease, color 150ms ease, transform 150ms ease, border-color 180ms ease, background-color 180ms ease;
}

.amg-topbar__item .amg-ico {
  flex: 0 0 22px;
}

.amg-topbar__item:hover,
.amg-topbar__item:focus-visible,
.amg-topbar__item.is-open {
  max-width: min(360px, 34vw);
  padding-right: 16px;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: var(--amg-header-text);
  transform: translateY(-1px);
}

.amg-topbar__text {
  max-width: 0;
  margin-left: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  opacity: 0;
  transition: max-width 220ms ease, margin-left 220ms ease, opacity 140ms ease;
}

.amg-topbar__item:hover .amg-topbar__text,
.amg-topbar__item:focus-visible .amg-topbar__text,
.amg-topbar__item.is-open .amg-topbar__text {
  max-width: 260px;
  margin-left: 10px;
  opacity: 1;
}

.amg-search {
  position: relative;
  width: 100%;
  max-width: 320px;
}

.amg-search__input {
  width: 100%;
  height: 38px;
  padding: 0 48px 0 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.02);
  color: var(--amg-header-text);
}

.amg-search__input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.amg-search__input:focus {
  outline: none;
  background: #fff;
  color: #111827;
  border-color: rgba(166, 226, 46, 0.5);
  box-shadow: 0 0 0 3px rgba(166, 226, 46, 0.18);
}

.amg-search__input:focus + .amg-search__btn {
  color: #111827;
}

.amg-search__btn {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
}

.amg-search__btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.amg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 22px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: var(--amg-header-text);
  font-family: var(--font-heading);
  font-weight: 600;
  transition: transform 150ms ease, border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}

.amg-topbar__right > .amg-btn {
  font-family: var(--font-text);
  font-weight: 400;
}

.amg-topbar__right > .amg-btn:hover,
.amg-topbar__right > .amg-btn:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: #111827;
}

.amg-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.28);
}

.amg-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.06);
}

.amg-btn--full {
  width: 100%;
}

.amg-langwrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  overflow: visible;
}

.amg-lang-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  overflow: visible;
}

.amg-langbtn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  border: 0;
  background: transparent;
  color: var(--amg-header-text);
  cursor: pointer;
}

.amg-langbtn:hover {
  background: transparent;
}

.amg-langbtn__flag,
.amg-langmenu2__flag {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
}

.amg-langbtn__flag img,
.amg-langmenu2__flag img {
  width: 22px;
  height: 16px;
  display: block;
  object-fit: cover;
  border-radius: 2px;
}

.amg-langbtn__chev {
  font-size: 11px;
}

.amg-langmenu2 {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  min-width: 180px;
  display: none;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: #0e1011;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
}

.amg-lang-switch.is-open .amg-langmenu2 {
  display: block;
}

.amg-langmenu2__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--amg-header-text);
}

.amg-langmenu2__item:hover,
.amg-langmenu2__item.is-current {
  background: rgba(255, 255, 255, 0.06);
}

.amg-mainbar {
  background: var(--amg-header-bg-2);
  transition: background-color 220ms ease, box-shadow 220ms ease, border-color 220ms ease, min-height 220ms ease;
}

.amg-header--hero .amg-mainbar {
  background: transparent;
}

.amg-compact-header .amg-mainbar {
  background: var(--amg-header-compact-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
}

.amg-mainbar__inner {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  min-height: 76px;
}

.amg-logo img {
  width: auto;
  max-height: 46px;
  transition: max-height 220ms ease;
}

.amg-compact-header .amg-mainbar__inner {
  min-height: 68px;
}

.amg-compact-header .amg-logo img {
  max-height: 40px;
}

.amg-logo-text {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: #fff;
}

.amg-nav {
  display: flex;
  justify-content: center;
  min-width: 0;
}

.amg-menu,
.amg-offmenu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.amg-menu {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.amg-menu li,
.amg-offmenu li {
  position: relative;
}

.amg-menu a {
  position: relative;
  display: inline-block;
  padding: 12px 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
}

.amg-menu > .menu-item-has-children > a {
  padding-right: 14px;
}

.amg-menu > .menu-item-has-children > a::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: 7px;
  height: 7px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: translateY(-68%) rotate(45deg);
  opacity: 0.8;
}

.amg-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5px;
  height: 2px;
  transform: scaleX(0);
  transform-origin: center;
  background: var(--accent);
  transition: transform 150ms ease;
}

.amg-menu .current-menu-item > a::after,
.amg-menu a:hover::after {
  transform: scaleX(1);
}

.amg-menu .sub-menu,
.amg-offmenu .sub-menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.amg-menu .sub-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 50;
  min-width: 220px;
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(13, 15, 16, 0.98);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, visibility 180ms ease, transform 180ms ease;
}

.amg-menu li:hover > .sub-menu,
.amg-menu li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.amg-menu .sub-menu a {
  width: 100%;
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--amg-header-text);
  font-size: 14px;
  line-height: 1.4;
  white-space: nowrap;
}

.amg-menu .sub-menu a::after,
.amg-menu .sub-menu a::before {
  display: none;
}

.amg-menu .sub-menu li:hover > a,
.amg-menu .sub-menu li:focus-within > a,
.amg-menu .sub-menu .current-menu-item > a {
  background: rgba(255, 255, 255, 0.08);
}

.amg-menu .sub-menu .sub-menu {
  top: 0;
  left: calc(100% + 8px);
}

.amg-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.amg-iconbtn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
}

.amg-iconbtn--white {
  background: #fff;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.amg-iconbtn--white:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.28);
}

.amg-ico {
  display: inline-flex;
  width: 22px;
  height: 22px;
  color: currentColor;
}

.amg-ico svg {
  width: 100%;
  height: 100%;
}

.amg-ico--dark {
  color: #111314;
}

.amg-cart {
  position: relative;
}

.amg-header-tool {
  position: relative;
}

.amg-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent);
  color: #111314;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.amg-badge[hidden] {
  display: none !important;
}

.amg-burger {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.amg-burger:hover {
  background: rgba(255, 255, 255, 0.06);
}

.amg-burger__lines,
.amg-burger__lines::before,
.amg-burger__lines::after {
  width: 20px;
  height: 2px;
  display: block;
  background: currentColor;
}

.amg-burger__lines {
  position: relative;
  margin: 0 auto;
}

.amg-burger__lines::before,
.amg-burger__lines::after {
  content: "";
  position: absolute;
  left: 0;
}

.amg-burger__lines::before {
  top: -6px;
}

.amg-burger__lines::after {
  top: 6px;
}

.amg-overlay {
  position: fixed;
  inset: 0;
  z-index: 998;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 180ms ease;
}

.amg-overlay.is-visible {
  opacity: 1;
}

.amg-offcanvas {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 999;
  width: min(380px, 88vw);
  display: flex;
  flex-direction: column;
  padding-bottom: 26px;
  background: #0d0f10;
  color: #fff;
  transform: translateX(-100%);
  transition: transform 220ms ease;
}

.amg-offcanvas.is-open {
  transform: translateX(0);
}

.amg-offcanvas__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 18px;
}

.amg-offcanvas__close {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.amg-offcanvas__close:hover {
  background: rgba(255, 255, 255, 0.06);
}

.amg-offcanvas__nav {
  padding: 0 24px;
}

.amg-offmenu {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.amg-offmenu a {
  display: block;
  padding: 12px 0;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 21px;
  line-height: 1.15;
}

.amg-offmenu .menu-item-has-children > a {
  padding-right: 52px;
}

.amg-offmenu .sub-menu {
  display: none;
  gap: 4px;
  margin: 4px 0 10px 16px;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.amg-offmenu .menu-item-has-children.is-open > .sub-menu {
  display: grid;
}

.amg-offmenu .sub-menu a {
  padding: 8px 0;
  color: rgba(255, 255, 255, 0.82);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.45;
}

.amg-subtoggle {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.86);
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.amg-subtoggle:hover,
.amg-subtoggle:focus-visible {
  background: rgba(255, 255, 255, 0.08);
}

.amg-subtoggle__chev {
  width: 9px;
  height: 9px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform 150ms ease;
}

.amg-offmenu > .menu-item-has-children > .amg-subtoggle {
  position: absolute;
  top: 4px;
  right: 0;
}

.amg-offmenu .menu-item-has-children.is-open > .amg-subtoggle {
  background: rgba(166, 226, 46, 0.16);
  color: var(--accent);
}

.amg-offmenu .menu-item-has-children.is-open > .amg-subtoggle .amg-subtoggle__chev {
  transform: rotate(225deg) translateY(1px);
}

.amg-offcanvas__bottom {
  margin-top: 20px;
  padding: 0 24px;
  display: grid;
  gap: 12px;
}

.amg-langwrap--mobile,
.amg-langwrap--mobile .amg-lang-switch,
.amg-langwrap--mobile .amg-langbtn {
  width: 100%;
}

.amg-langwrap--mobile .amg-langbtn {
  justify-content: space-between;
}

.amg-offcanvas .amg-langmenu2 {
  left: 0;
  right: auto;
  width: 100%;
}

.amg-search--mobile {
  max-width: none;
}

.amg-offcanvas__contacts {
  margin-top: auto;
  padding: 24px 24px 0;
  display: grid;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.amg-offcanvas__contact {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 15px;
}

@media (max-width: 1180px) {
  .amg-topbar__inner {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }

  .amg-mainbar__inner {
    grid-template-columns: 220px minmax(0, 1fr) auto;
  }

  .amg-menu {
    gap: 22px;
  }

  .amg-topbar__item:hover,
  .amg-topbar__item:focus-visible,
  .amg-topbar__item.is-open {
    max-width: min(300px, 30vw);
  }
}

@media (max-width: 980px) {
  .amg-topbar {
    display: none;
  }

  .amg-mainbar__inner {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .amg-nav {
    display: none;
  }

  .amg-burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .amg-header--hero {
    background: transparent;
  }

  .amg-compact-header .amg-mainbar__inner {
    min-height: 64px;
  }
}

@media (max-width: 640px) {
  .amg-actions {
    gap: 10px;
  }

  .amg-iconbtn,
  .amg-burger {
    width: 38px;
    height: 38px;
  }

  .amg-offmenu a {
    font-size: 19px;
  }
}

@media (max-width: 782px) {
  .admin-bar .amg-header,
  .admin-bar .amg-compact-header {
    top: 46px;
  }

}
