.header{
  position: fixed;
  inset-block-start: 0;
  z-index: 200;
  display: grid;
  width: 100%;
  max-width: 100%;
  grid-template-columns: minmax(0, 1fr) 40px 40px;
  grid-template-areas: "nav cart burger";
  align-items: center;
  gap: 10px;
  min-height: var(--header-height);
  padding: 0 clamp(20px, 2.1vw, 40px);
  border-bottom: 1px solid transparent;
  background: transparent;
  box-shadow: none;
  transform: translateY(var(--header-offset, 0));
  transition:
    background-color 200ms ease,
    border-color 200ms ease,
    backdrop-filter 200ms ease;
}

.header.scrolled{
  background: rgba(0,0,0,.84);
  border-bottom-color: rgba(255,255,255,.16);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

body.menu-open .header{
  position: fixed;
  inset: 0 0 auto;
  background: #000;
  border-bottom-color: rgba(255,255,255,.16);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: auto;
  transform: translateY(0);
}

.logo{
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  transform: translate(-50%, -50%);
}

.logo img{
  width: auto;
  height: auto;
  max-width: min(270px, 22vw);
  max-height: 60px;
  object-fit: contain;
  transition: filter 200ms ease;
}

.logo-picture{
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (hover: hover) and (pointer: fine){
  .logo:hover img{
    filter: brightness(0.75);
  }
}

.header-links{
  grid-area: nav;
  justify-self: start;
  min-width: 0;
}

.header-links ul{
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(22px, 2vw, 38px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.header-links :is(a, span){
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0;
  color: white;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .085em;
  transition: color 200ms ease;
}

@media (hover: hover) and (pointer: fine){
  .header-links a:hover{
    color: rgba(255, 255, 255, 0.7);
  }
}

.header .cart-fab{
  grid-area: cart;
  opacity: 1;
  justify-self: end;
  display: grid;
  width: 40px;
  min-width: 40px;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 0;
  color: rgba(255,255,255,.82);
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.header .cart-icon{
  width: 22px;
  height: 22px;
}

.header .menu-toggle{
  grid-area: burger;
  justify-self: end;
  display: grid;
  width: 40px;
  height: 44px;
}

body.menu-open .header-links{
  display: none;
}

@media (max-width: 1180px){
  .header-links{
    display: none;
  }
}

@media (max-width: 768px){
  .header{
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    grid-template-areas: "burger nav cart";
    gap: 0;
    min-height: var(--header-height);
    padding-right: max(12px, env(safe-area-inset-right));
    padding-left: max(12px, env(safe-area-inset-left));
  }

  .logo img{
    max-width: min(145px, calc(100vw - 170px));
    max-height: 36px;
  }

  .header .cart-fab,
  .header .menu-toggle{
    width: 38px;
    min-width: 38px;
  }

  .header .menu-toggle{
    justify-self: start;
  }
}

@media (max-width: 360px){
  .logo img{
    max-width: min(135px, calc(100vw - 170px));
  }
}
