/* ========================
 * SHOP CONTENT
 * ======================== */
.shop_content {
  height: 100%;
  max-width: 1232px;
  margin-left: auto;
  margin-right: auto;
}

/*  (> tablet + desktop) */
@media only screen and (min-width: 481px) {
  .shop_content {
    padding: 0rem 4rem;
    display: grid;
    grid-template-columns: 1fr 6fr;
    column-gap: 1rem;
  }
}

/* ========================
 * SHOP FILTERS
 * ======================== */
/*  (> phone) */
@media only screen and (max-width: 480px) {
  .shop_filters__price {
    display: none;
  }

  button.shop_filters_toggle {
    color: var(--c-text--lighter);
    cursor: pointer;
    text-transform: capitalize;
    padding-bottom: 0.5rem;
    border: none;
    width: 100%;
    border-radius: 0;
    border-bottom: 1px solid var(--c-text--lighter);
    margin-bottom: 2rem;
    text-transform: uppercase;
  }
  button.shop_filters_toggle:hover {
    color: var(--c-text--light);
    border-bottom-color: var(--c-text--light);
  }

  button.shop_filters_toggle.scrolled {
    color: var(--c-text--light);
    border-bottom-color: var(--c-text--light);
    position: fixed;
    z-index: 99;
    padding-top: 0.5rem;
  }
  button.shop_filters_toggle.scrolled {
    top: calc(var(--h-header) + 2rem);
  }

  .shop_filters {
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    padding: 1rem;
    background-color: white;
    z-index: 999;
    font-size: 1rem;
    transition: opacity 0.25s ease-in-out;
  }
  .shop_filters:not(.open) {
    opacity: 0;
    pointer-events: none;
  }
  .shop_filters.open {
    opacity: 1;
    pointer-events: all;
  }
  
  .shop_filters__top-info {
    justify-content: space-between;
  }

  .shop_filters__main-title {
    font-size: 1.25em;
    font-weight: bold;
    margin-bottom: 0.5rem;
  }

  .shop_filters input[type="checkbox"] ~ label {
    font-size: 0.95rem;
    margin-left: 0.35rem;
  }

  .shop_filters__units__content {
    display: grid;
    grid-template-columns: 3fr 2fr 2fr;
  }

  .shop_filters__sizes__inputs,
  .shop_filters__prices__inputs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}

/*  (> tablet / medium) */
@media only screen and (min-width: 481px) and (max-width: 999px) {
  .shop_filters_mobile,
  .shop_filters__price,
  .shop_filters__top-info {
    display: none;
  }

  .shop_filters {
    padding: 0 1rem 0 0;
    border-right: 1px solid var(--c-border);
    min-width: 15vw;
  }

  .shop_filters input[type="checkbox"] ~ label {
    font-size: 0.85rem;
    margin-left: 0.35rem;
  }

  .shop_filters__units__content {
    display: grid;
    grid-template-columns: 1fr;
  }
  .shop_filters__units__content input {
    margin-left: 1rem;
  }

  .shop_filters__sizes__inputs {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
  }
}
/*  (> desktop) */
@media only screen and (min-width: 1000px) {
  .shop_filters_mobile,
  .shop_filters__price--mobile,
  .shop_filters__top-info {
    display: none;
  }

  .shop_filters {
    padding: 0 1rem 0 0;
    border-right: 1px solid var(--c-border);
    min-width: 15vw;
  }

  .shop_filters input[type="checkbox"] ~ label {
    font-size: 0.85rem;
    margin-left: 0.35rem;
  }

  .shop_filters__units__content {
    display: grid;
    grid-template-columns: 3fr 2fr 2fr;
  }

  .shop_filters__sizes__inputs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}

.shop_filters__title {
  font-weight: bold;
  margin-bottom: 0.35rem;
}
.shop_filters__title:not(:first-child) {
  margin-top: 1rem;
}

.shop_filters__sizes,
.shop_filters__supports {
  margin: 0.5rem 0;
}

.shop_filters #form-button {
  margin-top: 1rem;
  width: 100%;
  background-color: var(--c-text);
  border-color: var(--c-text);
  color: white;
}
.shop_filters #form-button:hover {
  background-color: var(--c-text--light);
}

.shop_filters #form-clear {
  display: block;
  font-size: 0.8rem;
  margin-top: 0.5rem;
  text-align: center;
}
.shop_filters #form-clear a {
  color: var(--c-text--light);
}

.shop_filters__show_sold {
  margin: 0.5rem 0;
  border-top: 1px solid var(--c-border);
  border-radius: 0;
  padding-top: 0.5rem;
}

.shop_filters__price_on_request {
  border-bottom: 1px solid var(--c-border);
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
}

/*  (> phone) */
@media only screen and (max-width: 480px) {
  .shop_filters #form-terms {
    display: none;
  }
}
/*  (> tablet + desktop) */
@media only screen and (min-width: 481px) {
  .shop_filters #form-terms {
    width: 100%;
    text-align: center;
    margin: 0.5rem 0;
    font-size: 0.65rem;
    border-top: 1px solid var(--c-border);
    border-radius: 0;
    padding-top: 0.5rem;
  }
}

#form-terms-mobile {
  width: 100%;
  text-align: center;
  margin: 0.5rem 0;
  font-size: 0.65rem;
  border-bottom: 1px solid var(--c-border);
  border-radius: 0;
  padding-bottom: 0.5rem;
  display: block;
}

/* ==================
 * SHOP GALLERY
 * ================== */
.shop_gallery {
  position: relative;
}

.shop_gallery_buttons {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.shop_gallery__items {
  display: grid;
  row-gap: 1rem;
  column-gap: 1rem;
}

.shop_gallery__fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 10%;
  background: linear-gradient(transparent, white);
  pointer-events: none;
}

/*  (> phone) */
@media only screen and (max-width: 480px) {
  .shop_gallery {
    margin-bottom: 2rem;
    padding: 0rem 2rem;
  }
  
  .shop_gallery__items {
    grid-template-columns: repeat(3, 1fr) !important;
    align-items: center;
  }

  .shop_gallery__item {
    font-size: 0.8rem;
  }

  .shop_gallery__fade {
    display: none;
  }
}
/*  (> tablet) */
@media only screen and (min-width: 481px) and (max-width: 768px) {
  .shop_gallery__items {
    height: calc(100vh - var(--h-header) - 35vh - 2rem);
    overflow: auto;
    grid-template-columns: repeat(4, 1fr) !important;
  }
}
/*  (> desktop) */
@media only screen and (min-width: 769px) {  
  .shop_gallery__items {
    height: calc(100vh - var(--h-header) - 35vh - 2rem);
    overflow: auto;
    grid-template-columns: repeat(6, 1fr) !important;
  }
}

.shop_gallery__items img {
  height: auto;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  box-shadow: 3px 3px 6px 1px rgba(0, 0, 0, 0.25);
}

.shop_gallery__item,
.shop_gallery__item__noprice {
  background-color: transparent;
  padding-bottom: 0.5rem;
  position: relative;
}
.shop_gallery__item:hover,
.shop_gallery__item__noprice:hover {
  background-color: #f5f5f5;
  border-radius: 0 0 0.25rem 0.25rem;
  transition: background-color 0.35s ease-in-out;
}

.shop_gallery__item__name {
  text-align: center;
  color: var(--c-text);
  font-size: 1.05em;
  margin-top: 0.5rem;
}

.shop_gallery__item__size,
.shop_gallery__item__price {
  text-align: center;
  color: var(--c-text--light);
  font-style: italic;
  transition: opacity 0.35s ease-in-out;
}
.shop_gallery__item .shop_gallery__item__price {
  margin-top: -1.15em;
}

.shop_gallery__item:not(hover) .shop_gallery__item__size {
  opacity: 1;
}
.shop_gallery__item:hover .shop_gallery__item__size {
  opacity: 0;
}
.shop_gallery__item:not(hover) .shop_gallery__item__price {
  opacity: 0;
}
.shop_gallery__item:hover .shop_gallery__item__price {
  opacity: 1;
}

.shop_gallery__item__sold {
  position: absolute;
  top: 0;
  right: 0;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  color: #333;
  background-color: #fdfded;
  font-weight: bold;
}

/* ==================
 * SHOP PRODUCT
 * ================== */
#back-to-shop {
  display: block;
  color: var(--c-text--lighter);
  cursor: pointer;
  margin-bottom: 2rem;
}
#back-to-shop:hover {
  color: var(--c-text--light);
}

.shop_product__thumbnails {
  display: grid;
  justify-content: center;
  column-gap: 0.5rem;
}

.shop_product__info__wrapper {
  margin-top: 0.5rem;
}

.shop_product__info__name {
  font-size: 1.2rem;
  border-bottom: 1px solid #888;
  padding-bottom: 0.35rem;
  margin-bottom: 0.35rem;
  position: relative;
}

.shop_product__info div[class^='size'] {
  font-style: italic;
}

/*  (> phone) */
@media only screen and (max-width: 480px) {
  .shop_product_wrapper {
    padding: 0rem 2rem;
  }
  
  #shop_product__prev-arrow,
  #shop_product__next-arrow {
    display: none;
  }

  .shop_product__thumbnails {
    grid-template-columns: repeat(auto-fit, 40px);
  }

  .shop_product__info__name {
    text-align: center;
  }
}
/*  (> tablet + desktop) */
@media only screen and (min-width: 481px) {
  .shop_product__img {
    position: relative;
    user-select: none;
  }

  #shop_product__prev-arrow,
  #shop_product__next-arrow {
    position: absolute;
    top: 50%;
    transform: translate(0%, -50%);
    color: var(--c-text);
    cursor: pointer;
  }
  #shop_product__prev-arrow:hover,
  #shop_product__next-arrow:hover {
    color: var(--c-text--light);
  }
  #shop_product__prev-arrow {
    left: 2rem;
  }
  #shop_product__next-arrow {
    right: 2rem;
  }

  .shop_product__thumbnails {
    grid-template-columns: repeat(auto-fit, 60px);
  }

  .shop_product {
    display: grid;
    grid-template-columns: 3fr 2fr;
    column-gap: 1rem;
  }
}

.shop_product__img img {
  width: 66%;
  height: auto;
  margin: 0 auto;
}

.shop_product__thumbnails img {
  width: 100%;
  height: auto;
  cursor: pointer;
  transition: opacity 0.15s ease-in-out;
  border: 1px solid #333;
}
.shop_product__thumbnails img:not(:hover):not(.active) {
  opacity: 0.5;
}
.shop_product__thumbnails img:hover,
.shop_product__thumbnails img.active {
  opacity: 1;
}

.shop_product__info .additional-info {
  margin-top: 1rem;
  font-style: italic;
}

.shop_product__info__sold {
  display: inline;
  margin-left: 1rem;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  color: white;
  background-color: var(--c-link);
  font-weight: bold;
  font-size: 1.1rem;
  border-radius: 4px;
}

/* ==================
 * SHOP MISC
 * ================== */
#terms-popup {
  position: fixed;
  z-index: 9999;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.25);
  display: grid;
  place-items: center;
  transition: opacity 0.25s ease-in-out;
}
#terms-popup:not(.open) {
  opacity: 0;
  pointer-events: none;
}
#terms-popup.open {
  opacity: 1;
  pointer-events: all;
}

#terms-popup-content {
  font-size: 0.8rem;
  border-radius: 3px;
  background-color: white;
  padding: 1rem;
  width: 80vw;
  height: 80vh;
  overflow-y: auto;
  position: relative;
}
