html.catalog-page {
  background: #f8f9fa;
}

body.catalog-page {
  background: #f8f9fa;
}

.catalog {
  position: relative;
  width: 1440px;
  height: auto;
  padding: 40px 120px 80px;
  display: grid;
  grid-template-columns: 285px 895px;
  column-gap: 20px;
  row-gap: 0;
  align-items: start;
  background: #f8f9fa;
  box-shadow: 0 0 0 100vmax #f8f9fa;
  clip-path: inset(0 -100vmax);
}

.crumbs {
  grid-column: 1 / -1;
  position: static;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  font-size: 12px;
  letter-spacing: 0.02em;
  line-height: 1.6;
  color: #000;
}

.crumbs a {
  opacity: 0.4;
}

.crumbs span {
  opacity: 0.8;
}

.crumbs .ico {
  opacity: 0.4;
}

.filters {
  position: static;
  grid-column: 1;
  grid-row: 2;
  width: 285px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.filters__toggle {
  display: none;
}

.filter {
  width: 285px;
  padding: 20px;
  background: #fff;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.filter__title {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-align: left;
  color: inherit;
  cursor: default;
}

.filter__title::after {
  display: none;
}

.filter__list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 245px;
}

.filter__item {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  width: 245px;
  min-height: 20px;
  cursor: pointer;
  font-size: 14px;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: #000;
}

.filter__item > span:last-child {
  opacity: 0.8;
}

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

.filter__box {
  position: relative;
  display: block;
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  flex: 0 0 20px;
  flex-shrink: 0;
  box-sizing: border-box;
  isolation: isolate;
  background: #fff;
  border-radius: 4px;
}

/* Frame stays on the 20×20 box; without position:relative, inset:0 covers the page. */
.filter__box::before {
  content: "";
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  border: 2px solid #e6e6e6;
  border-radius: 4px;
  pointer-events: none;
  z-index: 2;
}

.filter__box > .ico:not(.filter__check) {
  display: none;
}

.filter__check {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  overflow: visible;
  z-index: 1;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.filter__item input:checked + .filter__box .filter__check {
  opacity: 1;
  visibility: visible;
}

/* Fill .ico__g (Figma inset), not the 20×20 frame — a 20px img here gets clipped. */
.filter__box .filter__check img {
  position: absolute;
  inset: 0;
  max-width: none;
  max-height: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.filter__range {
  position: relative;
  width: 245px;
  height: 8px;
}

.filter__track {
  position: absolute;
  left: 0;
  top: 2px;
  width: 245px;
  height: 4px;
  border-radius: 90px;
  background: var(--gray-5);
}

.filter__fill {
  position: absolute;
  top: 0;
  height: 4px;
  border-radius: 90px;
  background: var(--pink);
}

.filter__range input[type="range"] {
  position: absolute;
  left: 0;
  top: 0;
  width: 245px;
  height: 8px;
  margin: 0;
  background: none;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}

.filter__range input#priceMin {
  z-index: 2;
}

.filter__range input#priceMax {
  z-index: 3;
}

.filter__range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 90px;
  background: var(--pink);
  pointer-events: auto;
  cursor: pointer;
}

.filter__range input[type="range"]::-moz-range-thumb {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 90px;
  background: var(--pink);
  pointer-events: auto;
  cursor: pointer;
}

.filter__range input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  background: transparent;
}

.filter__range input[type="range"]::-moz-range-track {
  height: 8px;
  background: transparent;
}

.filter__fields {
  display: flex;
  gap: 10px;
  width: 254px;
}

.filter__field {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 1;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--gray-5);
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  letter-spacing: 0.02em;
  line-height: 1.6;
  color: #000;
}

.filter__field span {
  opacity: 0.8;
  white-space: nowrap;
}

.filter__field--to span,
.filter__field--to input {
  opacity: 0.4;
}

.filter__field input {
  width: 100%;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  opacity: 0.8;
  outline: none;
}

.filter__reset {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 0;
  font-size: 12px;
  letter-spacing: 0.02em;
  line-height: 1.6;
  color: #000;
  opacity: 0.8;
  cursor: pointer;
}

.catalog__grid {
  position: static;
  grid-column: 2;
  grid-row: 2;
  width: 895px;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 20px;
}

.pcard {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 437px;
  min-height: 442px;
  height: auto;
  padding-bottom: 20px;
  background: #fff;
  border-radius: 15px;
  overflow: hidden;
  box-sizing: border-box;
}

.pcard__img {
  position: relative;
  left: auto;
  top: auto;
  width: 100%;
  height: 200px;
  display: block;
  flex-shrink: 0;
  margin-top: 20px;
}

.pcard__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pcard__tags {
  position: absolute;
  left: 20px;
  top: 20px;
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 2;
}

.pcard__tag {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 90px;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

.pcard__tag--hit {
  background: var(--hit);
  color: #fff;
}

.pcard__tag--new {
  background: var(--premium);
  color: #fff;
}

.pcard__tag--best {
  background: var(--best);
  color: #fff;
}

.pcard__tag--prem {
  background: var(--premium);
  color: #fff;
}

.pcard__tag--ru {
  background: rgba(65, 200, 133, 0.2);
  color: #000;
}

.pcard__fav {
  position: absolute;
  right: 20px;
  top: 20px;
  width: 20px;
  height: 20px;
  padding: 0;
  z-index: 2;
  opacity: 0.2;
  cursor: pointer;
}

.pcard__fav.is-active,
.pcard__fav[aria-pressed="true"] {
  opacity: 1;
}

.pcard__fav.is-active img {
  filter: none;
}

.pcard__name {
  position: static;
  width: auto;
  margin: 20px 20px 8px;
  display: block;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  overflow-wrap: break-word;
}

.pcard__meta {
  position: static;
  margin: 0 20px 8px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 12px;
  letter-spacing: 0.02em;
  line-height: 1.6;
  color: #000;
  opacity: 0.4;
  white-space: normal;
}

.pcard__price {
  position: static;
  margin: 0 20px 8px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.pcard__pay {
  position: static;
  margin: 0 20px 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  letter-spacing: 0.04em;
  line-height: 1.6;
  color: #000;
}

.pcard__pay .ico {
  opacity: 0.4;
}

.pcard__pay-l {
  opacity: 0.4;
}

.pcard__pay-v {
  opacity: 0.8;
}

.pcard__btns {
  position: static;
  width: auto;
  margin: auto 20px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pcard__btns .btn {
  flex: 1;
  height: 40px;
  padding: 0 20px;
  border-radius: 8px;
  font-size: 12px;
  letter-spacing: 0.02em;
  line-height: 1.6;
}

.pcard__btns .btn--black {
  font-weight: 600;
}

.pcard__btns .btn--ghost {
  font-weight: 400;
}

.pcard__btn-more {
  display: none;
}

.chelp {
  position: relative;
  width: 894px;
  height: 218px;
  background: var(--pink-soft);
  border-radius: 15px;
  overflow: hidden;
}

.chelp__title {
  position: absolute;
  left: 30px;
  top: 30px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.chelp__text {
  position: absolute;
  left: 30px;
  top: 62px;
  width: 336px;
  font-size: 14px;
  letter-spacing: 0.02em;
  line-height: 1.6;
  opacity: 0.8;
}

.chelp__btn {
  position: absolute;
  left: 30px;
  top: 148px;
  height: 40px;
  padding: 0 20px;
  border-radius: 8px;
  background: var(--pink);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.6;
}

.chelp__bg {
  position: absolute;
  right: 80px;
  top: 0;
  width: 411px;
  height: 218px;
  pointer-events: none;
}

.chelp__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chelp__img {
  position: absolute;
  right: 80px;
  top: 0;
  z-index: 1;
  width: 243px;
  height: 218px;
  pointer-events: none;
}

.chelp__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.catalog__grid > .pager {
  position: static;
  flex: 0 0 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.pager__btn {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  letter-spacing: 0.02em;
  line-height: 1.6;
  color: #000;
  opacity: 0.2;
}

.pager__btn.is-active {
  background: var(--pink);
  color: #fff;
  opacity: 1;
}

.pager__btn.is-near {
  background: #fff;
  color: #000;
  opacity: 1;
}

.pager__nav,
.pager__dots {
  display: none;
}

/* Phone stacking: 767 and below. 768–1439 keeps the scaled 1440 PC canvas. */
@media (max-width: 767px) {
  .catalog {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    height: auto;
    padding: 24px 32px 64px;
    gap: 20px;
    overflow: visible;
    clip-path: none;
    box-shadow: none;
  }

  .crumbs {
    position: static;
    left: auto;
    top: auto;
    width: 100%;
    margin: 0;
    flex-wrap: wrap;
    overflow: visible;
  }

  .crumbs a,
  .crumbs span {
    white-space: nowrap;
    flex: 0 0 auto;
    min-width: auto;
  }

  .crumbs .ico {
    flex: 0 0 auto;
    min-width: auto;
  }

  .filters {
    position: static;
    left: auto;
    top: auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
    padding: 16px 20px;
    gap: 0;
    background: #fff;
    border-radius: 15px;
  }

  .filters__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 24px;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
    text-align: left;
    color: #000;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .filters__toggle::after {
    content: "";
    display: block;
    flex: 0 0 12px;
    width: 12px;
    height: 12px;
    background: url("../images/chevron-sm.svg") center / 12px 12px no-repeat;
    transform: rotate(0deg);
    transition: transform 0.2s ease;
  }

  .filters.is-open .filters__toggle {
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }

  .filters.is-open .filters__toggle::after {
    transform: rotate(180deg);
  }

  .filters:not(.is-open) {
    padding: 15px 20px;
  }

  .filters:not(.is-open) > :not(.filters__toggle) {
    display: none;
  }

  .filters.is-open {
    gap: 20px;
    padding: 16px 20px 20px;
  }

  .filter {
    width: 100%;
    padding: 0;
    background: transparent;
    border-radius: 0;
  }

  .filter__list,
  .filter__item,
  .filter__range,
  .filter__track,
  .filter__fields {
    width: 100%;
  }

  .filter__range input[type="range"] {
    width: 100%;
  }

  .catalog__grid {
    position: static;
    left: auto;
    top: auto;
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .pcard {
    width: 100%;
    min-height: 442px;
    height: auto;
  }

  .pcard__img {
    width: 100%;
  }

  .chelp {
    grid-column: 1 / -1;
    width: 100%;
    height: 218px;
  }

  .chelp__title {
    left: 24px;
    top: 24px;
    width: min(336px, calc(100% - 220px));
  }

  .chelp__text {
    left: 24px;
    top: 56px;
    width: min(336px, calc(100% - 220px));
  }

  .chelp__btn {
    left: 24px;
    top: 148px;
  }

  .chelp__bg {
    right: 24px;
    width: min(320px, calc(100% - 48px));
  }

  .chelp__img {
    right: 24px;
    width: 200px;
    height: 218px;
  }

  .catalog__grid > .pager {
    grid-column: 1 / -1;
    width: 100%;
    margin: 8px 0 0;
    justify-content: center;
  }
}

@media (max-width: 767px) and (min-width: 601px) {
  .catalog {
    padding: 20px 24px 56px;
  }

  .filters.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
  }

  .filters__toggle,
  .filter__reset {
    grid-column: 1 / -1;
  }

  .catalog__grid {
    margin-top: 8px;
  }

  .chelp__title,
  .chelp__text {
    width: min(300px, calc(100% - 200px));
  }
}

/* Phone: Figma 375, node 219:7118. */
@media (max-width: 600px) {
  .catalog {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 20px 80px;
    overflow-x: hidden;
  }

  .crumbs {
    width: 100%;
    margin: 0 auto;
    flex-wrap: wrap;
    overflow: visible;
  }

  .filters {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0 auto;
  }

  .filter {
    width: 100%;
    padding: 0;
    background: transparent;
    border-radius: 0;
    gap: 10px;
  }

  .filter:not(.is-open) {
    gap: 0;
  }

  .filter:not(.is-open) > :not(.filter__title) {
    display: none;
  }

  .filter__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    cursor: pointer;
  }

  .filter__title::after {
    content: "";
    display: block;
    flex: 0 0 12px;
    width: 12px;
    height: 12px;
    background: url("../images/chevron-sm.svg") center / 12px 12px no-repeat;
    transform: rotate(0deg);
  }

  .filter.is-open .filter__title::after {
    transform: rotate(180deg);
  }

  .filter__list {
    gap: 10px;
  }

  .filter__reset {
    margin-top: 4px;
  }

  .catalog__grid {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    width: 100%;
    margin: 10px auto 0;
    gap: 10px;
  }

  .pcard__btn-compare {
    display: none;
  }

  .pcard__btn-more {
    display: flex;
  }

  .chelp {
    width: 100%;
    height: 460px;
    overflow: hidden;
    border-radius: 15px;
    margin: 40px auto 0;
  }

  .chelp__title {
    left: 20px;
    top: 20px;
    width: calc(100% - 40px);
    font-size: 18px;
  }

  .chelp__text {
    left: 20px;
    top: 74px;
    width: calc(100% - 40px);
  }

  .chelp__btn {
    left: 20px;
    top: 182px;
  }

  .chelp__bg {
    display: none;
  }

  .chelp__img {
    left: 50%;
    right: auto;
    top: 242px;
    transform: translateX(-50%);
    width: 243px;
    height: 218px;
  }

  .pager {
    width: 100%;
    margin: 50px auto 0;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    justify-self: center;
  }

  .pager__nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 30px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 12px;
    letter-spacing: 0.02em;
    line-height: 1.6;
    color: #000;
    white-space: nowrap;
  }

  .pager__nav.is-disabled {
    opacity: 0.2;
    pointer-events: none;
  }

  .pager__nav--prev .ico {
    transform: scaleX(-1);
  }

  .pager__dots {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    font-size: 12px;
    letter-spacing: 0.02em;
    line-height: 1.6;
    color: #000;
  }

  .pager__btn {
    border-radius: 8px;
    opacity: 1;
  }

  .pager__btn.is-active {
    background: #000;
    color: #fff;
  }

  .pager__btn.is-near {
    background: transparent;
  }

  .pager__btn.is-desk {
    display: none;
  }
}
