.site-header {
  height: 78px;
  padding: 0 clamp(22px, 4vw, 68px);
  background: rgba(247, 242, 232, 0.96);
  border-bottom-color: rgba(112, 88, 69, 0.18);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
}

.site-header .brand {
  gap: 11px;
  min-width: 210px;
  letter-spacing: -0.035em;
  transition: color 180ms ease;
}

.site-header .brand:hover {
  color: var(--red);
}

.site-header .brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #fff8ed;
  background: var(--red);
  border-radius: 9px;
  font-size: 17px;
  box-shadow: 0 5px 14px rgba(167, 45, 37, 0.2);
  transform: rotate(-4deg);
}

.site-header .brand-name {
  font-size: 17px;
  font-weight: 750;
}

.main-nav {
  align-self: stretch;
  align-items: center;
  gap: clamp(28px, 3vw, 48px);
  margin-left: 0;
}

.main-nav a {
  position: relative;
  display: inline-flex;
  height: 100%;
  align-items: center;
  color: #4e453f;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.01em;
  transition: color 180ms ease;
}

.main-nav a::after {
  position: absolute;
  right: 0;
  bottom: 17px;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--red);
  content: "";
  opacity: 0;
  transform: scaleX(0.55);
  transition: opacity 180ms ease, transform 180ms ease;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  opacity: 1;
  transform: scaleX(1);
}

.cart-button {
  display: inline-flex;
  min-width: 112px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 9px 10px 9px 14px;
  border: 1px solid rgba(167, 45, 37, 0.26);
  border-radius: 999px;
  color: var(--red-dark);
  background: #fffaf1;
  box-shadow: 0 5px 16px rgba(82, 50, 31, 0.06);
  font-size: 13px;
  font-weight: 700;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.cart-button:hover {
  border-color: var(--red);
  background: #fff4e8;
  box-shadow: 0 8px 20px rgba(112, 51, 33, 0.11);
  transform: translateY(-1px);
}

.cart-button .cart-button-label {
  display: inline;
  width: auto;
  height: auto;
  margin: 0;
  border-radius: 0;
  color: inherit;
  background: transparent;
  font-size: 13px;
}

.cart-button:focus-visible,
.main-nav a:focus-visible,
.site-header .brand:focus-visible {
  outline: 3px solid rgba(207, 63, 47, 0.22);
  outline-offset: 3px;
}

.cart-button .cart-count {
  display: grid;
  width: 23px;
  height: 23px;
  margin-left: 1px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--red);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 800px) {
  .site-header {
    height: 68px;
    padding: 0 18px;
  }

  .site-header .brand {
    min-width: 0;
  }

  .site-header .brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 16px;
  }

  .site-header .brand-name {
    font-size: 15px;
  }

  .cart-button {
    min-width: 94px;
    min-height: 39px;
    padding: 7px 8px 7px 12px;
  }
}

@media (max-width: 410px) {
  .site-header {
    padding-inline: 14px;
  }

  .site-header .brand-name {
    max-width: 104px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .cart-button {
    min-width: 76px;
    gap: 6px;
  }

  .cart-button-label {
    position: absolute;
    display: block;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header *,
  .site-header *::after {
    transition: none !important;
  }
}
