
:root {
  --agg-burgundy: #8C0F14;
  --agg-gold: #C49743;
  --agg-cream: #F4F1EA;
  --agg-white: #FFFFFF;
  --agg-ink: #352D2B;
  --agg-border: #DCD4CA;

  --agg-container: 1440px;
  --agg-gutter: 40px;
  --agg-gap: 24px;

  --agg-header-height: 80px;
}

/* Общие стили */

.agg-header,
.agg-header *,
.agg-header *::before,
.agg-header *::after {
  box-sizing: border-box;
}

.agg-container {
  width: 100%;
  max-width: var(--agg-container);
  margin-inline: auto;
  padding-inline: var(--agg-gutter);
}

.agg-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 20px;
  border: 0;
  border-radius: 40px;
  background: var(--agg-burgundy);
  color: var(--agg-white);
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.agg-button:hover {
  background: var(--agg-ink);
}

/* Шапка сайта */

.agg-header {
  position: relative;
  z-index: 10;
  width: 100%;
  margin: 0;
  padding: 0;
  background: var(--agg-cream);
  color: var(--agg-ink);
}

.agg-header__desktop,
.agg-header__mobile {
  margin: 0;
  padding: 0;
}

.agg-header__mobile {
  display: none;
}

.agg-header__bar {
  width: 100%;
}

.agg-header__desktop-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: center;
  column-gap: var(--agg-gap);
  min-height: var(--agg-header-height);
}

.agg-header__desktop-logo {
  grid-column: span 2;
  display: flex;
  align-items: center;
}

.agg-header__logo {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  color: var(--agg-burgundy);
  text-decoration: none;
}

.agg-header__logo img {
  display: block;
  width: 128px;
  max-width: 100%;
  height: auto;
  max-height: 48px;
  object-fit: contain;
  object-position: left center;
}

.agg-header__desktop-nav {
  grid-column: span 8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-width: 0;
}

.agg-header__desktop-nav a {
  display: inline-block;
  color: var(--agg-ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  text-decoration: none;
  white-space: nowrap;
}

.agg-header__desktop-nav a:hover {
  color: var(--agg-burgundy);
}

.agg-header__desktop-actions {
  grid-column: span 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

/* Мобильная шапка */

.agg-header__mobile-bar {
  width: 100%;
}

.agg-header__mobile-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  align-items: center;
  column-gap: 16px;
  min-height: 72px;
}

.agg-header__mobile-logo {
  grid-column: span 6;
  display: flex;
  align-items: center;
}

.agg-header__mobile-actions {
  grid-column: span 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.agg-header__menu-open,
.agg-header__menu-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 40px;
  background: var(--agg-burgundy);
  color: var(--agg-white);
  font-family: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.agg-header__menu-open svg,
.agg-header__menu-close svg {
  display: block;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* Раскрывающееся меню */

.agg-header__mobile-menu {
  display: none;
  width: 100%;
  margin: 0;
  padding: 0 0 32px;
  border-top: 1px solid var(--agg-border);
  background: var(--agg-cream);
}

.agg-header__mobile-menu.is-open {
  display: block;
}

.agg-header__mobile-menu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 0;
  border-bottom: 1px solid var(--agg-border);
}

.agg-header__mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 16px 0;
}

.agg-header__mobile-nav a {
  display: block;
  width: 100%;
  padding: 16px 0;
  border-bottom: 1px solid var(--agg-border);
  color: var(--agg-ink);
  font-family: inherit;
  font-size: 20px;
  font-weight: 400;
  line-height: 28px;
  text-decoration: none;
}

.agg-header__mobile-nav a:hover {
  color: var(--agg-burgundy);
}

.agg-header__mobile-bottom {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-top: 16px;
}

.agg-header .agg-header__mobile-cta {
  min-height: 48px;
  padding: 12px 32px;
}

.agg-header a:focus-visible,
.agg-header button:focus-visible {
  outline: 2px solid var(--agg-gold);
  outline-offset: 4px;
}

/* Планшет */

@media (max-width: 1199px) {
  :root {
    --agg-gutter: 32px;
    --agg-gap: 16px;
  }

  .agg-header__desktop {
    display: none;
  }

  .agg-header__mobile {
    display: block;
  }
}

/* Смартфон */

@media (max-width: 767px) {
  :root {
    --agg-gutter: 16px;
    --agg-gap: 12px;
  }

  .agg-header__mobile-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: var(--agg-gap);
  }

  .agg-header__mobile-logo {
    grid-column: span 3;
  }

  .agg-header__mobile-actions {
    grid-column: span 1;
  }

  .agg-header__mobile-nav a {
    font-size: 18px;
    line-height: 28px;
  }

  .agg-header__mobile-bottom {
    width: 100%;
  }

  .agg-header .agg-header__mobile-cta {
    width: 100%;
  }
}
