#shopbar {
  background-color: #777;
  color: #ddd;
  font: normal 12px/28px Arial, Helvetica, sans-serif;
  height: 28px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  min-width: 0;
  text-align: left;
}

#shopbar * {
  height: auto;
  width: auto;
  margin: 0;
  padding: 0;
  position: static;
  text-transform: none;
  letter-spacing: normal;
  line-height: 1;
}

#shopbar ul,
#shopbar ul li {
  background: none;
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 9999;
}

#shopbar ul li {
  float: left;
}

#shopbar .popup a > span {
  display: inline;
  padding-right: 0.8em;
}

#shopbar .popup ul {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.97);
  display: none;
  position: absolute;
  border: 1px solid #dfdfdf;
  border-top: none;
  float: none;
  width: 200px;
  max-height: calc(100vh - 28px);
  overflow-y: auto;
}

#shopbar .popup:hover ul {
  display: block;
}

#shopbar .popup:hover ul li {
  display: block;
}

#shopbar .popup li:hover > a {
  color: white;
  text-shadow: #666 0 -1p 0;
}
#shopbar .popup ul li {
  float: none;
}

#shopbar .popup li:hover {
  background: #888;
}

#shopbar .popup li a {
  color: #555;
  text-shadow: none;
  white-space: nowrap;
  min-width: 140px;
}
#shopbar a {
  outline: none;
  border: none;
  text-decoration: none;
  background: none;
  color: #ddd;
  height: 28px;
  text-shadow: #555 0 -1px 0;
  display: block;
  font: normal 13px/28px Arial, Helvetica, sans-serif;
  padding: 0 0.85em;
  margin: 0;
}

#shopbar a > span {
  line-height: 28px;
}

/* Burger menu on narrow screens: the checkbox holds the open state. */
#shopbar .shopbar-toggle {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

#shopbar .shopbar-burger {
  display: none;
}

@media (max-width: 600px) {
  #shopbar .shopbar-burger {
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    width: 48px;
    height: 28px;
    cursor: pointer;
  }

  #shopbar .shopbar-burger span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto 0;
    background: #ddd;
    transition: transform 0.15s;
  }

  #shopbar .shopbar-burger span:first-child {
    margin-top: 7px;
  }

  #shopbar .shopbar-toggle:focus-visible + .shopbar-burger {
    outline: 2px solid #fff;
    outline-offset: -4px;
  }

  #shopbar .shopbar-toggle:checked + .shopbar-burger span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  #shopbar .shopbar-toggle:checked + .shopbar-burger span:nth-child(2) {
    transform: scaleX(0);
  }

  #shopbar .shopbar-toggle:checked + .shopbar-burger span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  #shopbar .popup:hover ul {
    display: none;
  }

  #shopbar .shopbar-toggle:checked ~ ul .popup ul {
    display: block;
    position: fixed;
    top: 28px;
    left: 0;
    right: 0;
    width: auto;
    max-height: calc(100vh - 28px);
    max-height: calc(100dvh - 28px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    box-sizing: border-box;
  }

  #shopbar .popup li a {
    height: 44px;
    font-size: 15px;
    line-height: 44px;
    padding: 0 16px;
    border-top: 1px solid #eee;
  }
}
