body {
  background: var(--site-background-color);
  &.has-offcanvas {
   overflow: hidden;
  }
}

#page-container {
  min-height: 100vh;
  display: flex;
  flex-flow: column;
}
#content-wrapper {
  flex-grow: 1;
  margin: 0 .5em;
  @media (min-width: 1460px) {
    margin: 0;
  }
}

#important-notice {
  background: var(--important-notice-background-color);
  color: var(--important-notice-text-color);
  text-align: center;
  .fourteen-forty {
    padding: 0.5em var(--gutter-x);
  }
}

#site-menu {
  @media (max-width: @media-breakpoint-md - 1px) {
    position: sticky;
    display: block;
    top: 0;
    z-index: 999;
    transition: top 200ms linear;

    .navbar-header a {
      color: var(--navigation-text-color);
    }
  }

  .container {
    @media (max-width: @media-breakpoint-md - 1px) {
      padding: 0 !important;
    }
  }

  .quick-access {
    display: flex;
    font-size: 0.8em;
    align-items: center;
    gap: 1em;

    @media (min-width: @media-breakpoint-sm) {
      font-size: 1em;
    }

    @media (min-width: @media-breakpoint-md) {
      font-size: 1em;
    }
  }

  .navbar {
    padding: .5rem var(--gutter-x);

    @media (min-width: @media-breakpoint-md) {
      margin-top: 6.5em;
      padding: 0;
      .dropdown-menu .nav-link {
        background: var(--dropdown-menu-item-background-color);
        color: var(--dropdown-menu-item-text-color);
        &:hover {
          filter: brightness(.95);
        }
      }
    }
  }

  .dropdown-menu {
    overflow: hidden;
    --gutter-y: .75em;
  }
}

body.scrolling-down #site-menu {
  top: -6em;
}

.navbar-header {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  gap: .5em 1em;
  justify-content: space-between;
  background: var(--header-background-color);
  color: var(--header-text-color);
  width: 100%;

  @media (min-width: @media-breakpoint-sm) {
    gap: var(--gutter-x);
  }

  @media (min-width: @media-breakpoint-md) {
    position: absolute;
    top: -5rem;
    left: 0;
    right: 0;
    margin-bottom: var(--gutter-y);
    padding-left: 1em;
    padding-right: 1em;
  }

  .fourteen-forty {
    display: inherit;
    flex-flow: inherit;
    gap: inherit;
    justify-content: inherit;
    align-items: inherit;
    padding-top: 0;
    padding-bottom: 0;
  }

  .logotype {
    flex-grow: 1;
    img {
      max-width: 140px;
      max-height: 32px;
      @media (min-width: @media-breakpoint-sm) {
        max-width: 250px;
        max-height: 60px;
      }
    }
    @media (min-width: @media-breakpoint-sm) {
      width: auto;
    }
    @media (min-width: @media-breakpoint-md) {
      flex-grow: 0;
    }
  }

  .navbar-brand {
    display: none;
    width: ~"calc(var(--sidebar-width) + var(--gutter-x)/2)";
    font-size: 17px;
    &:hover, &:focus {
      text-decoration: none;
    }
    > img {
      display: block;
    }
    @media (min-width: @media-breakpoint-sm) {
      display: block;
    }
  }

  form[name="search_form"] .input-group {
    background-color: #f1f3f5;
  }

  .navbar-search {
    flex: 1 1 auto;
    margin: 0 auto;
    @media (max-width: @media-breakpoint-md - 1px) {
      width: 100%;
      order: 999;
    }
    @media (min-width: @media-breakpoint-md) {
      max-width: 600px;
    }
  }

  .navbar-icon {
    //@media (min-width: @media-breakpoint-sm) {
      font-size: 1.5em;
    //}
  }
}

#cart {
  position: relative;
  display: inline-block;
  > a {
    position: relative;
    display: flex;
    align-items: center;
    padding: 4px;
    border: 1px transparent solid;
    border-radius: var(--border-radius);
    color: inherit;
    white-space: nowrap;
    &:hover {
      border-color: var(--default-border-color);
      text-decoration: none;
    }
  }
  img {
    max-width: 2em;
    max-height: 2em;
    @media (min-width: @media-breakpoint-sm) {
      font-size: 1.5em;
    }
  }
  .badge {
    background: #c90000;
    border-radius: 2rem;
    padding: 0.25em 0em;
    display: inline-block;
    text-align: center;
    color: #fff;
    position: absolute;
    top: 15px;
    right: -10px;
    width: 2em;
    animation: pulsating 1.5s linear infinite;
    font-size: 10px;
    &:empty {
      display: none;
    }
  }
  @media (max-width: calc(@media-breakpoint-sm - 1px)) {
    .details {
      display: none;
    }
  }
  @media (max-width: calc(@media-breakpoint-md)) {
    #cart .badge {
      top: 15px;
      right: 0;
    }
  }
}

#sidebar {
  position: relative;
  display: flex;
  flex-flow: column;
}

#footer {
  background-color: var(--footer-background-color);
  color: var(--footer-text-color);
  padding: var(--gutter-y) var(--gutter-x);

  a {
    color: inherit;
  }

  .columns {
    display: grid;
    margin-bottom: 0;

    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    grid-gap: var(--gutter-x);

    @media (min-width: (@media-breakpoint-sm)) {
      grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
      grid-template-columns: repeat(4, 1fr);
    }

    @media (min-width: (@media-breakpoint-md)) {
      grid-template-columns: repeat(5, 1fr);
    }
  }

  .title {
    font-size: 1.5em;
    margin: 0 0 0.75em 0;
    color: var(--footer-title-color);
  }

  ul.list-vertical {
    li {
      padding: 0;
    }
  }
}

#copyright {
  background: var(--copyright-background-color);
  color: var(--copyright-text-color);
  .container {
    padding: .75em var(--gutter-x);
  }
  .notice {
    text-align: center;
    a {
      color: inherit;
      text-decoration: underline;
    }
  }
}

#scroll-up {
  bottom: 30px;
  display: none;
  height: 48px;
  opacity: 0.3;
  position: fixed;
  right: 30px;
  width: 48px;
}
