html.compare-page,
body.compare-page {
  background: #f8f9fa;
}

.compare {
  position: relative;
  width: 1440px;
  height: 1921px;
  background: #f8f9fa;
  box-shadow: 0 0 0 100vmax #f8f9fa;
  clip-path: inset(0 -100vmax);
}

.compare.is-empty {
  height: 720px;
}

.compare .crumbs {
  position: absolute;
  left: 120px;
  top: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.02em;
  line-height: 1.6;
  color: #000;
}

.compare .crumbs a { opacity: 0.4; }
.compare .crumbs span { opacity: 0.8; }
.compare .crumbs .ico { opacity: 0.4; }

.compare__title {
  position: absolute;
  left: 120px;
  top: 99px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.compare__lead {
  position: absolute;
  left: 943px;
  top: 110px;
  width: 377px;
  font-size: 14px;
  letter-spacing: 0.02em;
  line-height: 1.6;
  opacity: 0.8;
}

.compare__back {
  position: absolute;
  left: 120px;
  top: 173px;
  z-index: 4;
}

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

.compare__clear {
  position: absolute;
  left: 120px;
  top: 217px;
  z-index: 4;
}

.compare__empty {
  position: absolute;
  left: 120px;
  top: 280px;
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.02em;
  line-height: 1.6;
  opacity: 0.8;
}

.compare.is-empty .chelp {
  top: 380px;
}

.compare.is-empty .chelp__dl {
  display: none;
}

.cgrid {
  --cmp-lab: 257px;
  --cmp-col: 236px;
  position: absolute;
  left: 120px;
  top: 175px;
  width: 1200px;
  overflow-x: auto;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.cgrid.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.cgrid__track {
  display: grid;
  grid-template-columns: var(--cmp-lab) repeat(var(--cmp-n, 4), minmax(var(--cmp-col), 1fr));
  grid-template-rows: 372px 30px auto;
  min-width: 100%;
}

.ccards__spacer {
  grid-column: 1;
  grid-row: 1;
  position: sticky;
  left: 0;
  z-index: 3;
  background: #f8f9fa;
  pointer-events: none;
}

.ccards {
  display: contents;
}

.ccard {
  position: relative;
  grid-row: 1;
  min-width: 0;
  height: 372px;
  background: #fff;
}

.ccard:first-child {
  border-radius: 15px 0 0 15px;
}

.ccard:last-child {
  border-radius: 0 15px 15px 0;
}

.ccard:only-child {
  border-radius: 15px;
}

.ccard + .ccard {
  box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.08);
}

.ccard[hidden],
.ctable__val[hidden] {
  display: none !important;
}

.ccard__img {
  position: absolute;
  left: 0;
  top: 20px;
  width: 100%;
  height: 140px;
}

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

.ccard__x {
  position: absolute;
  right: 20px;
  top: 20px;
  width: 20px;
  height: 20px;
}

.ccard__name {
  position: absolute;
  left: 21px;
  top: 170px;
  width: 195px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ccard__meta {
  position: absolute;
  left: 21px;
  top: 202px;
  width: 195px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  letter-spacing: 0.02em;
  line-height: 1.6;
  opacity: 0.4;
  white-space: nowrap;
  overflow: hidden;
}

.ccard__meta .dot { opacity: 0.8; }

.ccard__price {
  position: absolute;
  left: 21px;
  top: 241px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
}

.ccard__pay {
  position: absolute;
  left: 21px;
  top: 273px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  letter-spacing: 0.04em;
  line-height: 1.6;
}

.ccard__pay .ico { opacity: 0.4; }
.ccard__pay-l { opacity: 0.4; }
.ccard__pay-v { opacity: 0.8; }

.ccard__btn {
  position: absolute;
  left: 21px;
  top: 312px;
}

.ctable {
  grid-column: 1 / -1;
  grid-row: 3;
  display: grid;
  grid-template-columns: subgrid;
  background: #fff;
  border-radius: 15px;
  min-height: 1046px;
}

.ctable__h {
  grid-column: 1 / -1;
  position: sticky;
  left: 0;
  z-index: 2;
  padding: 20px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
  background: #fff;
}

.ctable__h:first-child {
  border-radius: 15px 15px 0 0;
}

.ctable__block {
  display: contents;
}

.ctable__row {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1 / -1;
  align-items: center;
  height: 35px;
  border-top: 1px solid #e6e6e6;
}

.ctable__block .ctable__row:nth-child(odd) {
  background: var(--gray-3);
}

.ctable__block .ctable__row:last-child {
  border-bottom: 1px solid #e6e6e6;
}

.ctable__lab,
.ctable__val {
  min-width: 0;
  height: 100%;
  font-size: 12px;
  letter-spacing: 0.02em;
  line-height: 1.6;
}

.ctable__lab {
  position: sticky;
  left: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  padding: 0 8px 0 20px;
  text-align: left;
  opacity: 0.4;
  background: #fff;
}

.ctable__block .ctable__row:nth-child(odd) .ctable__lab {
  background: var(--gray-3);
}

.ctable__val {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0.8;
  border-left: 1px solid #e6e6e6;
}

.chelp {
  position: absolute;
  left: 120px;
  top: 1643px;
  width: 1200px;
  height: 198px;
  background: #fff;
  border-radius: 15px;
  overflow: hidden;
}

.chelp__img {
  position: absolute;
  left: 0;
  top: 0;
  width: 218px;
  height: 218px;
  pointer-events: none;
}

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

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

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

.chelp__rec {
  position: absolute;
  left: 305px;
  top: 126px;
}

.chelp__dl {
  position: absolute;
  left: 500px;
  top: 126px;
}

.chelp__line {
  position: absolute;
  left: 792px;
  top: 30px;
  width: 1px;
  height: 136px;
  background: rgba(0, 0, 0, 0.1);
}

.chelp__list {
  position: absolute;
  left: 832px;
  top: 42px;
  width: 348px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.chelp__item {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.chelp__item p {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.6;
  opacity: 0.8;
}

.cgrid__hint {
  display: none;
}

@media (max-width: 767px) {
  .compare {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    width: 100%;
    height: auto;
    padding: 24px 32px 64px;
    overflow: visible;
    clip-path: none;
    box-shadow: none;
  }

  .compare .crumbs,
  .compare__title,
  .compare__lead,
  .compare__back,
  .compare__clear,
  .compare__empty,
  .cgrid__hint,
  .cgrid,
  .chelp,
  .compare.is-empty .chelp {
    position: relative;
    left: auto;
    top: auto;
    right: auto;
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .compare .crumbs {
    flex-wrap: wrap;
    overflow: visible;
    z-index: 2;
  }

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

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

  .compare__title {
    font-size: 28px;
    margin: 8px 0 0;
  }

  .compare__lead {
    max-width: 520px;
    margin: 0;
  }

  .compare__back,
  .compare__clear {
    z-index: 4;
    width: auto;
    align-self: flex-start;
  }

  .cgrid__hint {
    display: none;
    margin: 8px 0 0;
    font-size: 12px;
    letter-spacing: 0.02em;
    line-height: 1.6;
    color: #000;
    opacity: 0.45;
  }

  .compare:has(.cgrid.is-wide) .cgrid__hint {
    display: block;
  }

  .cgrid {
    --cmp-lab: 200px;
    --cmp-col: 200px;
    margin-top: 8px;
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: thin;
    touch-action: pan-x pan-y;
  }

  .cgrid__track {
    grid-template-rows: auto 16px auto;
    min-width: calc(var(--cmp-lab) + var(--cmp-n, 2) * var(--cmp-col));
  }

  .ccards__spacer {
    background: #f8f9fa;
  }

  .ccard {
    height: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 16px 20px;
    box-sizing: border-box;
  }

  .ccard__img,
  .ccard__x,
  .ccard__name,
  .ccard__meta,
  .ccard__price,
  .ccard__pay,
  .ccard__btn {
    position: relative;
    left: auto;
    top: auto;
    right: auto;
    width: auto;
    max-width: 100%;
  }

  .ccard__img {
    width: 100%;
    height: 120px;
    margin-bottom: 8px;
  }

  .ccard__x {
    position: absolute;
    right: 12px;
    top: 12px;
    z-index: 2;
  }

  .ccard__name {
    width: 100%;
    margin-top: 4px;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: unset;
  }

  .ccard__meta {
    width: 100%;
    flex-wrap: wrap;
    white-space: normal;
    overflow: visible;
    margin-top: 6px;
  }

  .ccard__price {
    margin-top: 10px;
    white-space: normal;
  }

  .ccard__pay {
    flex-wrap: wrap;
    margin-top: 6px;
  }

  .ccard__btn {
    margin-top: auto;
    padding-top: 12px;
    white-space: nowrap;
  }

  .ctable {
    min-height: 0;
  }

  .ctable__h {
    white-space: normal;
    padding: 16px 16px 12px;
  }

  .ctable__row {
    height: auto;
    min-height: 40px;
  }

  .ctable__lab,
  .ctable__val {
    padding-top: 8px;
    padding-bottom: 8px;
    white-space: normal;
    align-items: flex-start;
  }

  .ctable__lab {
    padding-left: 16px;
    padding-right: 8px;
  }

  .chelp {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 20px;
    overflow: hidden;
    margin-top: 8px;
  }

  .chelp__img,
  .chelp__title,
  .chelp__text,
  .chelp__rec,
  .chelp__dl,
  .chelp__line,
  .chelp__list {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    max-width: 100%;
    height: auto;
    white-space: normal;
  }

  .chelp__img {
    width: 180px;
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
  }

  .chelp__line {
    display: none;
  }

  .chelp__list {
    width: 100%;
    margin-top: 8px;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px 24px;
  }

  .chelp__item {
    width: auto;
    flex: 1 1 220px;
  }
}
@media (max-width: 767px) {
  .cgrid__hint {
    display: block;
  }

  .cgrid {
    --cmp-lab: 148px;
    --cmp-col: 196px;
  }

  .ctable__lab {
    box-shadow: 6px 0 10px rgba(0, 0, 0, 0.04);
  }

  .chelp__img {
    width: 100%;
    max-width: 280px;
    height: 160px;
  }
}

@media (max-width: 600px) {
  .compare {
    padding: 20px 20px 40px;
    gap: 12px;
  }

  .compare__title {
    font-size: 24px;
  }

  .cgrid {
    --cmp-lab: 120px;
    --cmp-col: 176px;
    width: calc(100% + 40px);
    margin-left: -20px;
    margin-right: -20px;
    padding: 0 0 8px;
  }

  .ctable__lab {
    padding-left: 12px;
    font-size: 11px;
  }

  .ctable__val {
    font-size: 11px;
    padding-left: 6px;
    padding-right: 6px;
  }

  .ccard {
    padding: 12px 12px 16px;
  }

  .ccard__img {
    height: 100px;
  }

  .ccard__name {
    font-size: 14px;
    width: 100%;
  }

  .chelp__list {
    flex-direction: column;
  }

  .chelp__item {
    flex: 1 1 auto;
  }
}
