* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  list-style: none;
}

html,
body {
  height: 100%;
  min-height: 100vh;
}

html {
  font-size: 18px;
}

body {
  font: 1rem/1.5 system, -apple-system, '.SFNSText-Regular', 'San Francisco',
    'Roboto', 'Segoe UI', 'Helvetica Neue', 'Lucida Grande', sans-serif;
  background: #fff;
  color: #000;
}

#preloader {
  position: fixed;
  width: 100%;
  min-height: 100vh;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  top: 0;
  left: 0;
}

.loader {
  width: 64px;
  aspect-ratio: 1;
  display: grid;
}
.loader:before {
  content: '';
  border: 8px solid #fff;
  border-radius: 50%;
  box-sizing: content-box;
  margin: auto;
  aspect-ratio: 1;
  animation: grow infinite 1s steps(4, jump-none);
}
@keyframes grow {
  0% {
    width: 0%;
  }
  to {
    width: 75%;
  }
}

#preloader.loaded {
  display: none;
}

#app {
    max-width: 1120px;
    margin: 3rem auto;
    padding: 0 1rem;
}

#app-header {
    padding-bottom: 0.6rem;
    border-bottom: 1px solid #dedede;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#app-show-cart,
#app-show-cart:focus,
#app-show-cart:active {
    border: none;
    cursor: pointer;
    padding: 0.3rem 0.65rem;
    background-color: #000;
    font-family: inherit;
    font-size: inherit;
    color: #fff;
    border-radius: 0.3rem;
}

#app-header h1 {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    font-weight: bold;
}

#app-products {
    margin-top: 3rem;
    display: flex;
    flex-wrap: wrap;
}

.app-product {
    width: 100%;
    margin: 1.5rem 0;
}

.app-product figure {
    width: 100%;
}

.app-product figure img {
    display: block;
    max-width: 100%;
    height: auto;
}

@media screen and (min-width: 768px) {
    .app-product {
        width: 48%;
        padding: 1rem;
        border: 1px solid #dedede;
        border-radius: 0.3rem;
        margin: 1.5rem 1%;
    }
}

.app-product header {
    margin-bottom: 1rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid #dedede;
}

.app-product header h2 {
    font-size: 1rem;
    font-weight: bold;
    text-transform: capitalize;
}

.app-product header div {
    margin-top: 0.35rem;
    color: #888;
    font-size: 14px;
    text-transform: lowercase;
}

.app-product footer {
    margin-top: 1rem;
    padding-top: 0.45rem;
    border-top: 1px solid #dedede;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    flex-wrap: wrap;
}

.app-add-to-cart,
.app-add-to-cart:focus,
.app-add-to-cart:active {
    outline-style: none;
    border: none;
    cursor: pointer;
    padding: 0.6rem 1.25rem;
    background-color: #000;
    color: #fff;
    font-family: inherit;
    font-size: inherit;
}

.app-input-qty,
.app-input-qty:focus {
    outline-style: none;
    box-shadow: none;
    padding: 0.6rem;
    background-color: #fff;
    border: 1px solid #dedede;
    border-radius: 0.3rem;
    font-family: inherit;
    font-size: inherit;
    max-width: 60px;
    margin-right: 0.5rem;
}

.app-cart-remove {
    cursor: pointer;
    padding: 0;
    border: none;
    background-color: transparent;
    font-family: inherit;
    font-size: 24px;
    color: #d00;
    font-weight: bold;
}

#app-cart {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    min-height: 100vh;
    background-color: #000;
    justify-content: space-between;
    flex-direction: column;
    align-items: center;
    display: none;
    padding: 0 1rem;
}

#app-cart.visible {
    display: flex;
}

@media  screen and (min-width: 768px) {
    #app-cart {
        width: 15%;
    }
}

#close-app-cart {
    border: none;
    cursor: pointer;
    color: #fff;
    background-color: transparent;
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0;
    font-size: 24px;
}

#app-cart-contents {
    padding: 1rem;
    background-color: #fff;
    border-radius: 0.3rem;
    list-style: none;
    margin-top: 4rem;
    width: 100%;
}

#app-cart-contents li {
    display: block;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dedede;
}

#app-cart-contents .cart-remove-line {
    margin-bottom: 0.65rem;
    text-align: right;
}

#app-cart-contents h4 {
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 0.65rem;
}

#app-cart-contents .cart-price-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;
}

#app-cart-contents .cart-price-line + div {
    font-weight: bold;
}

#app-cart-contents > li:last-child {
    margin-bottom: 0;
}

#app-cart-total {
    text-align: right;
    font-size: 1.5rem;
    color: #fff;
    font-weight: bold;
}

#app-cart-summary {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 1rem 0;
    width: 100%;
}

#app-checkout-button {
    cursor: pointer;
    padding: 0.6rem 1.3rem;
    background-color: #fff;
    color: #000;
    font-size: 1rem;
    font-family: inherit;
    border-radius: 0.35rem;
    display: block;
    font-weight: bold;
}

#app-paypal-form {
    display: none;
}

#app-cart.has-items #app-paypal-form {
    display: block;
}