.melix-header {
  position: relative;
  z-index: 30;
  color: #171313;
  background: #fff;
}

.gold-rate-bar {
  color: #f6d29a;
  background: #720f22;
  border-bottom: 1px solid rgb(255 255 255 / 10%);
}

.gold-rate-bar__inner {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(560px, 2.6fr) minmax(180px, 1fr);
  gap: 24px;
  align-items: center;
  width: min(100% - 40px, 1472px);
  min-height: 52px;
  margin-inline: auto;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.gold-rate-bar__title,
.gold-rate-bar__status {
  margin: 0;
  white-space: nowrap;
}

.gold-rate-bar__rates {
  display: grid;
  grid-template-columns: repeat(5, minmax(78px, 1fr));
}

.gold-rate-bar__rate {
  display: flex;
  gap: 11px;
  align-items: baseline;
  justify-content: center;
  padding-inline: 18px;
  border-inline-start: 1px solid rgb(246 210 154 / 45%);
}

.gold-rate-bar__rate:first-child {
  border-inline-start: 0;
}

.gold-rate-bar__rate strong {
  min-width: 50px;
  font-weight: 500;
}

.gold-rate-bar__status {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-self: end;
}

.gold-rate-bar__status-dot {
  width: 7px;
  height: 7px;
  background: #f0c675;
  border-radius: 999px;
}

.gold-rate-bar[data-has-rates='false'] .gold-rate-bar__status-dot {
  opacity: 0.58;
  animation: melix-pulse 1.8s ease-in-out infinite;
}

.melix-header__main {
  border-bottom: 1px solid #eee7df;
  box-shadow: 0 8px 28px rgb(52 20 15 / 3%);
}

.melix-header__inner {
  display: grid;
  grid-template-columns: minmax(210px, 0.9fr) minmax(500px, 1.65fr) minmax(390px, 1.2fr);
  gap: 34px;
  align-items: center;
  width: min(100% - 64px, 1420px);
  min-height: 156px;
  margin-inline: auto;
}

.melix-header__brand {
  display: block;
  width: 228px;
}

.melix-header__navigation ul {
  display: flex;
  gap: clamp(22px, 2.7vw, 50px);
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  list-style: none;
}

.melix-header__nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-size: 17px;
  line-height: 1.2;
  color: #171313;
  white-space: nowrap;
}

.melix-header__nav-link::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  content: '';
  background: #7b1023;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
}

.melix-header__nav-link:hover::after,
.melix-header__nav-link:focus-visible::after,
.melix-header__nav-link[data-active='true']::after {
  transform: scaleX(1);
}

.melix-header__nav-link[data-active='true'] {
  color: #7b1023;
}

.melix-header__tools {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: flex-end;
}

.melix-header__search,
.melix-header__mobile-search {
  display: flex;
  gap: 12px;
  align-items: center;
  height: 52px;
  padding-inline: 17px;
  background: #fff;
  border: 1px solid #ded8d2;
  border-radius: 12px;
}

.melix-header__search {
  width: min(100%, 258px);
}

.melix-header__search svg,
.melix-header__mobile-search svg {
  flex: 0 0 auto;
  width: 21px;
  height: 21px;
  stroke-width: 1.8;
}

.melix-header__search input,
.melix-header__mobile-search input {
  min-width: 0;
  height: 100%;
  padding: 0;
  font-size: 15px;
  color: #171313;
  background: transparent;
  border: 0;
  outline: 0;
}

.melix-header__search input {
  width: 100%;
}

.melix-header__search input::placeholder,
.melix-header__mobile-search input::placeholder {
  color: #9b9591;
}

.melix-header__action,
.melix-cart-button,
.melix-mobile-menu__trigger {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: #171313;
  background: transparent;
  border: 0;
  border-radius: 999px;
  transition:
    color 160ms ease,
    background-color 160ms ease;
}

.melix-header__action:hover,
.melix-cart-button:hover,
.melix-mobile-menu__trigger:hover {
  color: #7b1023;
  background: #fbf4ed;
}

.melix-header__action svg,
.melix-cart-button svg {
  width: 26px;
  height: 26px;
  stroke-width: 1.6;
}

.melix-cart-button {
  position: relative;
}

.melix-cart-button__quantity {
  position: absolute;
  top: 0;
  right: -2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 21px;
  height: 21px;
  padding-inline: 5px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: #7b1023;
  border: 2px solid #fff;
  border-radius: 999px;
}

.melix-header__mobile-menu,
.melix-header__mobile-search {
  display: none;
}

.melix-mobile-menu__trigger svg {
  width: 25px;
  height: 25px;
  stroke-width: 1.6;
}

.melix-mobile-menu__content {
  color: #241a18;
  background: #fffdf9;
  border-color: #e8ded4;
}

.melix-mobile-menu__header {
  width: 180px;
  padding: 22px 20px 12px;
}

.melix-mobile-menu__links {
  padding: 16px 20px 24px;
  margin: 0;
  list-style: none;
  border-top: 1px solid #e8ded4;
}

.melix-mobile-menu__links a {
  display: flex;
  align-items: center;
  min-height: 52px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 24px;
  color: #281b18;
  border-bottom: 1px solid #eee6de;
}

.melix-mobile-menu__links a[aria-current='page'] {
  color: #7b1023;
}

@keyframes melix-pulse {
  0%,
  100% {
    opacity: 0.35;
  }

  50% {
    opacity: 1;
  }
}

@media (max-width: 1199px) {
  .gold-rate-bar__inner {
    grid-template-columns: auto 1fr;
  }

  .gold-rate-bar__rates {
    order: 3;
    grid-column: 1 / -1;
    padding-bottom: 10px;
  }

  .gold-rate-bar__status {
    grid-column: 2;
  }

  .melix-header__inner {
    grid-template-columns: 190px 1fr 320px;
    gap: 20px;
    width: min(100% - 40px, 1120px);
  }

  .melix-header__brand {
    width: 188px;
  }

  .melix-header__navigation ul {
    gap: 22px;
  }

  .melix-header__nav-link {
    font-size: 15px;
  }

  .melix-header__search {
    width: 210px;
  }
}

@media (max-width: 959px) {
  .gold-rate-bar__inner {
    grid-template-columns: 1fr auto;
    gap: 8px 18px;
    width: min(100% - 28px, 760px);
    padding-block: 8px 9px;
    font-size: 13px;
  }

  .gold-rate-bar__rates {
    display: flex;
    grid-column: 1 / -1;
    gap: 0;
    justify-content: space-between;
    overflow-x: auto;
    padding-bottom: 0;
    scrollbar-width: none;
  }

  .gold-rate-bar__rates::-webkit-scrollbar {
    display: none;
  }

  .gold-rate-bar__rate {
    min-width: 112px;
    padding-inline: 14px;
  }

  .gold-rate-bar__rate:first-child {
    justify-content: flex-start;
    padding-left: 0;
  }

  .gold-rate-bar__status {
    grid-column: 2;
    grid-row: 1;
  }

  .melix-header__inner {
    grid-template-columns: 44px 1fr 44px;
    min-height: 94px;
  }

  .melix-header__mobile-menu {
    display: block;
  }

  .melix-header__brand {
    width: 132px;
    margin-inline: auto;
  }

  .melix-header__navigation,
  .melix-header__search {
    display: none;
  }

  .melix-header__tools {
    gap: 2px;
  }

  .melix-header__mobile-search {
    display: flex;
    width: min(100% - 40px, 720px);
    height: 46px;
    margin: 0 auto 16px;
  }

  .melix-header__mobile-search input {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .gold-rate-bar__rates {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow: visible;
  }

  .gold-rate-bar__rate,
  .gold-rate-bar__rate:first-child {
    flex-direction: column;
    gap: 1px;
    justify-content: center;
    min-width: 0;
    padding-inline: 5px;
    font-size: 11px;
    line-height: 1.25;
    text-align: center;
  }

  .gold-rate-bar__rate:first-child {
    padding-left: 5px;
  }

  .gold-rate-bar__rate strong {
    min-width: 0;
  }

  .gold-rate-bar__status {
    font-size: 10px;
    gap: 4px;
  }

  .melix-header__inner {
    gap: 8px;
    width: calc(100% - 24px);
  }

  .melix-header__brand {
    width: 112px;
  }

  .melix-header__action,
  .melix-cart-button,
  .melix-mobile-menu__trigger {
    width: 40px;
    height: 40px;
  }

  .melix-header__action svg,
  .melix-cart-button svg {
    width: 23px;
    height: 23px;
  }

  .melix-header__mobile-search {
    width: calc(100% - 24px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gold-rate-bar__status-dot {
    animation: none !important;
  }

  .melix-header__nav-link::after {
    transition: none;
  }
}
