.shop-page {
  padding: 28px 0 60px;
}

.shop-page__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.shop-page__heading h1 {
  margin: 0;
}

.shop-filters__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #dedede;
  border-radius: 4px;
  background: #fff;
  padding: 9px 12px;
}

.shop-filters__toggle span {
  color: var(--header-red);
}

.shop-filters {
  display: none;
  margin-bottom: 20px;
  border: 1px solid #e4e4e4;
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.shop-filters.is-open {
  display: block;
}

.shop-filters fieldset {
  min-width: 0;
  margin: 0 0 20px;
  padding: 0;
  border: 0;
}

.shop-filters legend {
  margin-bottom: 12px;
  color: #222;
  font-weight: 600;
}

.shop-filters__categories,
.shop-filters__categories ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.shop-filters__categories ul {
  padding-left: 16px;
}

.shop-filters__category {
  margin-bottom: 9px;
}

.shop-category__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.shop-category__link,
.shop-category__toggle {
  border: 0;
  background: transparent;
  color: #777;
  padding: 0;
  text-align: left;
}

.shop-category__link {
  flex: 1;
  cursor: pointer;
}

.shop-category__link.is-active {
  color: var(--header-red);
}

.shop-category__toggle {
  width: 24px;
  cursor: pointer;
}

.shop-category__toggle span[aria-hidden="true"] {
  display: inline-block;
  line-height: 0;
  transition: transform 0.2s ease;
}

.shop-category__toggle[aria-expanded="true"] span[aria-hidden="true"] {
  transform: rotate(180deg);
}

.shop-category-clear,
.shop-results__toolbar select {
  border: 1px solid #dedede;
  border-radius: 4px;
  background: #fff;
  padding: 9px;
}

.shop-category-clear {
  margin-bottom: 14px;
  color: #777;
}

.shop-filters__submit {
  width: 100%;
  border: 0;
  border-radius: 20px;
  background: var(--header-red);
  color: #fff;
  padding: 10px 16px;
}

.shop-results__toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.shop-results__toolbar select {
  width: auto;
  border: 1px solid rgba(146, 146, 146, 0.38);
  min-width: 160px;
  border-radius: var(--radius);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23fd0013' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.shop-results__toolbar select:focus {
  border-color: var(--brand-primary);
  outline: none;
}

.shop-active-filters {
  margin: 0 0 18px;
  color: var(--brand-primary);
}

.shop-active-filters[hidden] {
  display: none;
}

.shop-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #777;
  cursor: pointer;
  white-space: nowrap;
}

.shop-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.shop-switch span {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 18px;
  border-radius: 20px;
  background: #d5d5d5;
}

.shop-switch span::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  content: "";
  transition: transform 0.2s ease;
}

.shop-switch input:checked + span {
  background: var(--brand-primary);
}

.shop-switch input:checked + span::after {
  transform: translateX(16px);
}

.shop-switch.is-active span {
  background: var(--brand-primary);
}

.shop-switch.is-active span::after {
  transform: translateX(16px);
}

.shop-products-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shop-results__empty {
  padding: 35px 0;
  text-align: center;
}

.shop-results__empty[hidden] {
  display: none !important;
}

.shop-load-more {
  display: block;
  margin: 38px auto 0;
  border: 0;
  background: transparent;
  color: var(--header-red);
  padding: 0;
  text-decoration: underline;
  text-decoration-color: var(--header-red);
  cursor: pointer;
}

.shop-load-more[hidden] {
  display: none;
}

.shop-load-more:disabled {
  opacity: 0.5;
  cursor: wait;
}

@media (min-width: 768px) {
  .shop-page {
    padding-top: 48px;
    padding-bottom: 100px;
  }

  .shop-page__heading {
    margin-bottom: 24px;
  }

  .shop-filters__toggle {
    display: none;
  }

  .shop-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    align-items: start;
    gap: 38px;
  }

  .shop-filters {
    display: block;
    margin: 0;
    position: sticky;
    top: 20px;
  }

  .shop-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media only screen and (min-width: 992px) {
  .shop-products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .shop-layout {
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 44px;
  }

  .shop-results__toolbar {
    gap: 40px;
  }

  .shop-products-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .shop-results__toolbar select {
    min-width: 200px;
  }
}

@media only screen and (min-width: 1600px) {
  .shop-results__toolbar {
    gap: 60px;
  }
}
