html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-size: 13px;
  font-family: 'Roboto', Arial, Helvetica, sans-serif;
  color: var(--b-text);
  box-sizing: border-box;

}
body.os-ios * {
  background-attachment: scroll!important;
}
a {
  color: var(--b-background);
  text-decoration: none;
}

.flex-row {
  display: flex;
  flex-direction: row;
}

.flex-column {
  display: flex;
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.search-wrapper {
  position: relative;

  width: 100%;
}

.search-wrapper .results-field {

  width: 100%;
  max-height: 50vh;
  overflow: auto;

}

.search-wrapper .results-field.hide {
  display: none;
}

.search-wrapper .results-field a {
  width: 100%;
  display: flex;
}

nav {
  background-color: var(--b-foreground-b);
  min-height: var(--b-header-height);
  width: 100%;
}

.header-menu {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.header-menu a {
  padding: 8px;
  background-color: var(--b-foreground-b);
  border-bottom: 1px solid var(--c-shade-b)
}

.header-top {
  height: var(--b-header-height);
  align-items: center;
  justify-content: center;
}

.header-title {

  padding: 8px;
  width: 100%;
  overflow: hidden;
  opacity: 0;

  transition: opacity 0.2s ease-in-out
}

.sticky .header-title {

  opacity: 1;
}

.header-nav-icon.active {
  background-color: var(--b-foreground-b);
  border-bottom: 1px solid var(--c-shade-a)
}

.header-nav-icon {
  height: var(--b-header-height);
  min-width: var(--b-header-height);
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

footer {
  height: var(--b-header-height);
  background-color: var(--b-background-dark);
  align-items: center;
}

.copyright {
  padding: 5px;
}

.hidden {
  display: none;
}

.sticky {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}

.overlay {
  position: relative;
}

.overlay::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0px;
  left: 0;
  background-color: #131d1398;
  z-index: 0;
  border-radius: inherit;
}

.overlay>* {
  position: relative;
  z-index: 1;
}

::-webkit-scrollbar {
  width: 10px;
}

/* Track */
::-webkit-scrollbar-track {
  background: var(--b-background-dark)
}

/* Handle */
::-webkit-scrollbar-thumb {
  background: var(--b-foreground-c)
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
  background: var(--b-foreground-d)
}

.show-products .product {
  max-width: 300px;
  overflow: hidden;

  width: 25%;
}

.show-products .product img {

  max-width: 150px;
  border-radius: 2vh;
  left: 0%;
  top: 0px;
}

.side-nav {

  height: calc(100vh - var(--b-header-height));
  top: var(--b-header-height);
  align-self: flex-start;
  z-index: 1111;
  margin-left: auto;
}

.show-product-wrapper {
  max-width: calc(1200px + (1rem * 4) + 6rem);
  margin-right: auto;
}

.image-col img {
  border-radius: 2vh;
  max-width: 300px;
}

.product-col {
  max-width: 500px;
  flex: 1;
  min-width: calc(300px - 7em);
}

.ingredient-list {
  max-width: 300px;
}

.navbar-collapse {
  order: 3
}

.product-wrapper {
  flex: 1 1 100%;
  max-width: 1000px;
}

.ingredient-image-wrapper {
  position: absolute;
  max-width: 150px;
  bottom: 20px;
  left: 20px;
  z-index: 2;
  border-radius: 2vh;
  overflow: hidden;
}

.ingredient {
  background-color: var(--b-foreground-b);
  border-radius: 20px;
}

.ingredient.active {
  background-color: var(--b-foreground-c);
}

.pagination a {
  height: 100%;
  display: flex;
  align-items: center;
}

.image-col .product-image-wrapper {
  max-width: 300px;
  width: 100%;
}

.image-attribution {
  position: absolute;
  font-size: 0.7em;
  left: 0px;
  bottom: 0px;
  width: 100%;
  padding: 5px;
  background-color: var(--c-shade-a);
  color: var(--b-text);
  line-height: 1;
}
.product .nav-link {
  position:unset;
}
.product .nav-link > * {
  position:relative;
  z-index:1
}
.product .product-image-wrapper {
  max-width: 150px;
  width: 100%;
}

.nav-link {
  color: var(--b-text) !important;
}

.active {
  background-color: var(--b-foreground-c) !important;
  color: var(--c-text) !important;
  border-radius: 2vh;
}

.btn-emphasis {
  background-color: var(--b-foreground-c) !important;
}

.pagination .page-item a.page-link {
  background-color: var(--b-foreground-b) !important;
 color:var(--b-text);
 border-color: var(--b-tint-b);
}
.pagination .page-item a.page-link.disabled {
  opacity:.7
}
.pagination .page-item.active {
  border-radius: 0;

}

.pagination .page-item.active a {
  background-color: var(--b-foreground-c) !important;
  border-color: var(--b-foreground-c);
  color:var(--b-text);
}

@media (min-width:992px) {
  .side-nav {
    width: var(--b-sidebar-width);
    z-index: 999;
  }

  .navbar-collapse {
    order: unset;
  }
}

@media screen and (min-width:768px) {
  .header-menu {
    flex-direction: row;
    align-items: center;
    width: auto
  }

  .header-menu a {
    white-space: nowrap;
    background-color: transparent;
    border: 0;
  }

  .header-menu.hidden {
    display: flex;
  }

  .header-nav-icon {
    display: none;
  }

  header nav {
    flex-direction: row;
    justify-content: center;
    ;
  }

  .header-top {
    width: 100%;
  }

}
.sidebar-button {
  position:sticky;
  top:calc(var(--b-header-height) + 5px);
  z-index:111;
  background-color: var(--b-foreground-b)!important;
}