@import url("./core-ibCN2xu5.css");

#nav-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-bottom: 1em;
  background-color: var(--background);
  color: var(--dark-text);
  white-space: nowrap;
  top: 0;
  width: 100%;
  text-transform: uppercase;
  -webkit-user-select: none;
  user-select: none;
  z-index: 999;
}

#nav-content {
  display: grid;
  grid-template-columns: 150px 1fr 0.1fr;
  align-items: center;
  justify-items: center;
  padding-top: 1em;
  padding-bottom: 1em;
}

.nav-logo {
  width: 100%;
  justify-self: start;
  padding-left: 1vw;
  text-decoration: none;
  color: var(--dark-text);
}

.hamburger {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  justify-self: start;
}

.nav-links {
  justify-self: center;
  flex-direction: row;
  justify-content: center;
  width: 100%;
  height: 100%;
  gap: 3vw;
  display: flex;
  align-items: center;
  padding-left: 1em;
  padding-right: 1em;
}

.nav-section {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-content: center;
}

.wide-nav-section {
  position: unset;
}

.nav-section > summary {
  list-style: none;
  cursor: pointer;
}

.dropdown {
  background-color: var(--background);
  position: absolute;
  left: 0;
  display: none;
  flex-direction: column;
  box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.1);
  padding: 1em;
  padding-left: 0.35em;
}

.dropdown > a:hover {
  text-decoration: underline;
}

.sub-dropdown {
  display: flex;
  flex-direction: column;
}

.sub-dropdown > a:hover {
  text-decoration: underline;
}

.nav-section:hover .dropdown {
  display: flex;
}

.wide-section {
  flex-direction: row;
  justify-content: space-around;
  padding-top: 2em;
  padding-bottom: 2em;
  width: 100vw;
  left: 0;
}

.wide-section summary {
  font-weight: bold;
}

.dropdown a {
  padding: 0.5rem 0rem;
  text-decoration: none;
}

/* Cart icon */

#nav-cart-container {
  justify-self: end;
  display: flex;
  align-items: center;
  padding-right: 2em;
  gap: 0.35em;
}

#nav-cart-container img {
  margin-bottom: 5px;
}

#nav-cart-container span:hover {
  color: var(--less-dark-text);
}

#nav-cart-icon-container {
  display: flex;
  flex-direction: column;
  position: relative;
}

#nav-cart-count {
  display: none;
}

#nav-cart-count.active, #nav-cart-count:hover {
  position: absolute;
  display: flex;
  height: var(--font--2);
  width: var(--font--2);
  font-size: var(--font--2);
  top: -0px;
  right: -5px;
  font-weight: bold;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background-color: var(--dark-text);
  color: var(--background) !important;
}

/* Mobile */
@media (max-width: 1100px) or (hover: none) {

  #nav-content {
    position: relative;
    grid-template-columns: 1fr 150px 1fr;
  }

  .nav-section > summary {
    list-style: revert;
  }

  .nav-section > summary::-webkit-details-marker {
    font-size: 0.66em;
  }

  .nav-section > summary::marker {
    font-size: 0.66em;
  }

  .nav-logo {
    justify-self: center;
    font-size: 4vw;
  }

  .nav-links {
    flex-direction: column;
    display: none;
    width: 100%;
    gap: 0;
    top: 100%;
    left: 0;
    padding-left: 0;
    height: unset;
    position: absolute;
    background-color: var(--background);
    box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.1);
  }

  .nav-links > *:last-child {
    border-bottom: 1px solid var(--dark-text);
  }

  .wide-section {
    flex-direction: column;
    padding-top: 0;
    padding-bottom: 0;
  }

  .nav-section .wide-section summary {
    font-weight: unset;
    padding-left: 2rem;
  }

  .nav-links.show {
    display: flex;
  }

  .hamburger {
    display: block;
  }

  .nav-section {
    position: static;
    width: 100%;
  }

  .dropdown {
    position: static;
    display: flex;
    box-shadow: unset;
  }

  /* On mobile do not allow a tags inside summary to be clickable */
  summary > a {
    pointer-events: none;
    vertical-align: text-top;
  }

  @supports (-webkit-touch-callout: none) {
    summary > a {
      vertical-align: middle;
    }
  }

  .nav-section:hover .dropdown {
    display: flex;
  }

  .nav-section > *:first-child {
    padding: 1rem;
    border-top: 1px solid var(--dark-text);
  }

  .dropdown > a {
    padding-left: 2rem;
  }

  .dropdown > a:last-child {
    padding-bottom: 1rem;
  }

  .sub-dropdown {
    font-weight: normal;
  }

  .sub-dropdown > *:last-child {
    padding-bottom: 1rem;
  }

  .sub-dropdown a {
    padding-left: 4rem;
  }
}
