* {
  box-sizing: border-box;
}

html {
  --primary-color: #BD7694;
  --secondary-color: #FFFAF5;
  --tertiary-color: #65A17B;
  --grey: #eee;
  --medium-grey: #aaa;
  --dark-grey: #777;
  --app-section-even-color: #fff;
  --app-section-odd-color: var(--grey);
  --border-radius: 5px;
  --content-width: 800px;
  --text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
  font-size: 18px;
  line-height: 2rem;
  color: rgba(0, 0, 0, 0.8);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  padding: 0;
}

h1 {
  font-size: 3rem;
  line-height: 1;
  font-weight: 400;
  color: var(--tertiary-color);
  text-shadow: var(--text-shadow);
  padding: 0 1rem;
  margin-bottom: 1rem;
  word-spacing: 100vw;
}

h2 {
  font-size: 2rem;
  line-height: 1;
  font-weight: 300;
  color: var(--tertiary-color);
  text-shadow: var(--text-shadow);
}

h3 {
  font-size: 1.75rem;
  line-height: 1;
  font-weight: 300;
  letter-spacing: 2px;
  color: var(--tertiary-color);
  text-shadow: var(--text-shadow);
}

h4 {
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 300;
  letter-spacing: 2px;
  color: var(--tertiary-color);
  text-shadow: var(--text-shadow);
}

h5 {
  font-size: 1.25rem;
  line-height: 1;
  font-weight: 300;
  color: var(--tertiary-color);
  text-shadow: var(--text-shadow);
  margin-bottom: 1rem;
}

h6 {
  font-size: 1.1rem;
  line-height: 1;
  font-weight: 300;
  letter-spacing: 2px;
  color: var(--dark-grey);
  text-shadow: var(--text-shadow);
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

a {
  color: var(--tertiary-color);
}

p {
  font-size: 1rem;
}

main p {
  text-align: justify;
}

section {
  padding: 1rem 0;
  background: var(--app-section-odd-color);
  border-bottom: 1px solid var(--tertiary-color);
}

section:last-of-type {
  border-bottom: none;
  padding-bottom: 3rem;
}

section > *, footer > *, header > *, nav > * {
  padding: 0 1rem;
  max-width: var(--content-width);
  margin-right: auto;
  margin-left: auto;
}

nav > div {
  padding: 0;
}

section > img {
  padding: 0;
}

header {
  position: absolute;
  width: 100%;
  bottom: 0;
}

nav {
  z-index: 1;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.9);
  position: fixed;
  width: 100%;
}

nav div {
  justify-content: flex-start;
  display: flex;
  width: 100%;
}

footer {
  padding: 3rem 1rem;
  background: var(--dark-grey);
  font-size: .75rem;
}

footer, footer a {
  color: white;
}

footer p, footer a {
  font-size: 0.75rem;
}

nav a {
  flex-grow: 1;
  flex-basis: 0;
  text-align: center;
  text-decoration: none;
  color: var(--tertiary-color);
  padding: 0.25rem 0;
  border-bottom: 3px solid transparent;
}

nav a:hover {
  border-bottom: 3px dashed var(--tertiary-color);
}

nav a.active {
  border-bottom: 3px solid var(--tertiary-color);
}

img {
  display: block;
}

ul.breadcrumb {
  padding: 0;
  list-style: none;
}

small {
  font-size: 0.65em;
}

ul.breadcrumb li {
  display: inline;
}

button {
  margin-top: 1rem;
  background-color: var(--primary-color);
  border: 2px solid var(--primary-color);
  color:#FFF;
  padding: 0.5rem 1.25rem;
  font-size: 1.25rem;
  line-height: 1.25rem;
  border-radius: 5px;
  cursor: pointer;
}

input {
  padding: 0.75rem;
  font-size: 1rem;
  border: none;
}

@keyframes loader {
  0% {
    background-color: var(--tertiary-color);
    width: 0%;
  }

  50% {
    background-color: var(--primary-color);
    width: 100%;
  }

  100% {
    background-color: var(--tertiary-color);
    width: 0%;
  }
}

.loader-overlay {
  display: none;
  opacity: 0;
  position: fixed;
  top: 50%;
  right: 50%;
  width: 100px;
  height: 100px;
  margin-left: -50px;
  margin-top: -50px;
  opacity: 0;
  transition: opacity 1000ms;
}

.loading .loader-overlay {
  display: block;
  opacity: 1;
}

.loader-overlay:before {
  border: solid 11px grey;
  border-radius: 50%;
  content: "";
  height: 101px;
  left: -9px;
  position: absolute;
  top: -9px;
  width: 101px;
}

.loader-overlay:after {
  border: solid 10px var(--tertiary-color);
  border-bottom-color: var(--primary-color);
  border-radius: 50%;
  content: "";
  height: 100px;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate3d(-50%, -50%, 0);
  width: 100px;
  will-change: transform;
  animation: 1s linear infinite spinner;
}

@keyframes spinner {
  0% {
    transform: translate3d(-50%, -50%, 0) rotate(0deg);
  }
  50% {
    transform: translate3d(-50%, -50%, 0) rotate(100deg);
  }
  75% {
    transform: translate3d(-50%, -50%, 0) rotate(230deg);
  }
  100% {
    transform: translate3d(-50%, -50%, 0) rotate(360deg);
  }
}

.loader {
  display: none;
}

.loader.loading {
  display: block;
  margin: 1rem auto;
  height: 3px;
  width: 0%;
  animation: loader 1s infinite;
}

label {
  display: inline-block;
}

#postal-code-container {
  width: 100%;
  margin: 0 1rem;
}

#postal-code, #shipping-cost {
  display: block;
  background-color: #FFF;
  color: var(--primary-color);
  padding: 0.5rem 1.25rem;
  border: 0;
  font-size: 1.5rem;
  line-height: 1.5rem;
  width: 100%;
}

#postal-code {
  font-size: calc(1.5rem - 4px);
  line-height: calc(1.5rem - 4px);
  border-radius: 0;
  box-shadow: inset 0 0 10px var(--grey);
  border-bottom: 3px solid var(--grey);
  top: -1px;
  position: relative;
}

#postal-code:focus {
  outline: none;
  border-bottom: 3px solid var(--primary-color);
}

#postal-code::placeholder {
  color: var(--medium-grey);
}

.install-app {
  display: block;
  margin-bottom: 2rem;
}

#charge-code {
  padding: 0.5rem;
  background: white;
  border-radius: 3px;
}

.show-if-email {
  display: none;
}

.show-if-no-email {
  display: none;
}

.checkout {
  font-size: 0;
}

.checkout button {
  font-size: 1.5rem;
  line-height: 1.5rem;
  border-radius: 0 5px 5px 0;
  width: 50%;
}

.checkout button:disabled {
  background-color: var(--dark-grey);
  color: var(--grey);
  cursor: default;
}

#total-cost {
  border-radius: 5px 0 0 5px;
  width: 50%;
}

#total-cost, #postal-code-label {
  display: inline-block;
  background-color: #FFF;
  color: var(--primary-color);
  padding: 0.5rem 1.25rem;
  border:0;
  font-size: 1.5rem;
  line-height: 1.5rem;
  box-sizing: border-box;
}

#postal-code-label {
  width: 100%;
}

.postal-code-container {
  font-size: 0;
  display: inline-block;
  width: 100%;
}

ul.breadcrumb li+li:before {
  padding: 8px;
  content: "/\00a0";
}

.header-container {
  border-top: 3px solid var(--primary-color);
  position: relative;
}

img {
  width: 100%;
}

.cart.has-items {
  color: white;
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.desktop {
  display: none;
}

.stock {
  text-align: right;
}

.transparency {
  transition: opacity 1000ms;
}

.transparent {
  opacity: 0;
}

.add-to-cart-outer {
  position: relative;
  height: 4rem;
}

.add-to-cart-container {
  position: absolute;
  right: 1rem;
  display: flex;
}

.add-to-cart-container-preview {
  position: unset;
  right: unset;
}

.cart-count {
  margin-top: 1rem;
  background-color: var(--primary-color);
  color:#FFF;
  border: 2px solid var(--primary-color);
  padding: 0.5rem 1.25rem;
  font-size: 1.25rem;
  line-height: 1.25rem;
}

.add-to-cart {
  transition: background-color 200ms ease;
  cursor: pointer;
  border-radius:4px;
}

.add-to-cart:hover {
  background-color: #FFF;
  color: var(--primary-color);
}

.add-to-cart:focus {
  outline: none;
  background-color: #FFF;
  color: var(--primary-color);
}

.added-to-cart .add-to-cart {
  display: none;
}

.add-more-to-cart {
  display: none;
}

.added-to-cart .add-more-to-cart {
  display: block;
  border-radius: 0 4px 4px 0;
}

.added-to-cart .remove-from-cart {
  border-radius: 4px 0 0 4px;
}

.add-to-cart:disabled {
  background-color: var(--dark-grey);
}

.cart-count {
  display: none;
  border-left: 1px solid white;
  border-right: 1px solid white;
}

.added-to-cart .cart-count {
  display: block;
}

.remove-from-cart {
  display: none;
  cursor: pointer;
  transition: background-color 200ms ease;
}

.added-to-cart .remove-from-cart {
  display: block;
}

.remove-from-cart:hover {
  background-color: #FFF;
  color: var(--primary-color);
}

.remove-from-cart:focus {
  outline: none;
  background-color: #FFF;
  color: var(--primary-color);
}

.product-link {
  transition: background-color 200ms ease-in-out;
}

.product-link > a {
  display: block;
  text-decoration: none;
  color: rgba(0, 0, 0, 0.8);
}

.product-link:hover {
  background-color: #fefefe;
}

.product-preview {
  margin-bottom: 2rem;
  padding-left: 1rem;
  border-left: 1px solid var(--tertiary-color);
}

.product-preview-image {
  width: 100px;
}

.sku-preview img {
  border-radius: 100px;
}

.added-to-cart .add-more-to-cart, .added-to-cart .add-to-cart, .added-to-cart .remove-from-cart, .added-to-cart .cart-count {
  background-color: #FFF;
  color: var(--primary-color);
}

.hidden {
  display: none !important;
}

.disclaimer {
  background: var(--light-grey);
  box-sizing: border-box;
  font-style: italic;
}

.disclaimer p {
  font-size: 0.75rem;
  line-height: 1rem;
}

.product-category-link {
  font-size: 0.8rem;
  margin-top: 2rem;
}

.product-category-list {
  font-size: 0;
}

.product-category-overview {
  font-size: 1rem;
  display: inline-block;
  position: relative;
  width: 50%;
  box-shadow: 0 3px 3px 0 rgba(0, 0, 0, 0.16),
              0 3px 3px 0 rgba(0, 0, 0, 0.23);
  border: 1px solid white;
  border-radius: 10px;
  overflow: hidden;
  transition: all 300ms;
  width: 100%;
  height: 400px;
  margin-right: 1rem;
}

.product-category-overview:last-of-type {
  margin-right: 0;
}

.product-category-overview:hover {
  box-shadow: 0 14px 14px 0 rgba(0, 0, 0, 0.19), 0 10px 5px 0 rgba(0, 0, 0, 0.23);
  border: 1px solid var(--tertiary-color);
}

.product-category-overview img {
  width: 100%;
}

.product-category-overview h4 {
  position: absolute;
  width: 100%;
  padding: 1rem;
  text-align: center;
  font-size: 2.5rem;
  font-weight: 400;
  color: white;
  margin-top: 0rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 1);
  line-height: 3rem;
}

.no-mobile-gutter {
  padding-left: 0;
  padding-right: 0;
}

.carousel {
  position: relative;
  display: flex;
  width: 100%;
  padding: 0;
  overflow: hidden;
}

.carousel .previous, .carousel .next {
  position: absolute;
  top: calc(50% - 1.5rem);
  font-size: 2.5rem;
  color: rgba(255, 255, 255, 0.8);
  text-shadow: 3px 3px 5px #000000;
  transition: all 200ms;
  cursor: pointer;
}

.carousel img {
  transition: left 300ms ease-in-out;
  position: relative;
  left: 0%;
}

.carousel .previous:hover, .carousel .next:hover {
  color: var(--primary-color);
  text-shadow: 3px 3px 10px #000000;
}

.carousel .previous {
  content: '<';
  left: 1rem;
}

.carousel .next{
  content: '>';
  right: 1rem;
}

@media only screen and (min-width : 500px) {
  .product-category-overview {
    width: calc(49% - 1rem);
  }
}

@media only screen and (min-width : 800px) {
  nav {
    top: 0;
    bottom: auto;
  }

  .small-overview {
    display: flex;
  }

  .small-overview img {
    width: 60%;
  }

  .small-overview p {
    margin: 0 0 0 1rem;
  }

  .mobile {
    display: none;
  }

  .desktop {
    display: block;
  }

  .no-mobile-gutter {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .carousel .previous, .carousel .next {
    font-size: 4rem;
    color: rgba(255, 255, 255, 1);
  }

  nav a {
    font-size: 1.25rem;
    letter-spacing: 2px;
    padding: 0.5rem 0;
  }

  h1 {
    font-size: 5rem;
    padding: 0;
  }

  h2 {
    font-size: 3rem;
  }

  h3 {
    font-size: 2.5rem;
  }

  h4 {
    font-size: 2rem;
  }

  h5 {
    font-size: 1.5rem;
  }

  h6 {
    font-size: 1.15rem;
  }

  section > img {
    max-width: calc(800px - 2rem);
    /* This assumes a 3:2 image ratio and is designed to preserve the vertical space while the image loads. */
    padding-top: 66%;
    margin-top: -66%;
  }

  img {
    max-width: unset;
  }

  .header-container img {
    width: 100%;
  }

  nav > div {
    padding: 0 1rem;
  }

  .blog-overview {
    padding-bottom: 3rem;
  }

  .add-to-cart, .cart-count, .remove-from-cart {
    font-size: 1.5rem;
  }

  #postal-code-label {
    width: auto;
    border-radius: 5px 0 0 5px;
  }

  #postal-code, #shipping-cost {
    width: auto;
    display: inline-block;
    margin: 0;
  }

  #total-cost {
    width: auto;
  }

  #shipping-cost {
    border-radius: 0 5px 5px 0;
  }

  #postal-code {
    width: 200px;
    border-radius: 0;
  }

  .checkout button {
    width: auto;
  }

  nav {
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 15px 25px -10px rgba(0,0,0,0.3),
                0 30px 30px -15px rgba(0,0,0,0.2),
                0 45px 40px -20px rgba(0,0,0,0.1),
                0 30px 40px -5px rgba(255,255,255,0.1);
  }

  .add-to-cart-container {
    right: 0rem;
  }
}
