.pcb-compare {
  margin: 24px 0;
  background: #fff;
  border: 1px solid #e7e7ef;
  border-radius: 18px;
  overflow: hidden;
}

.pcb-compare__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid #ececf4;
}

.pcb-compare__title {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 700;
}

.pcb-compare__toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.pcb-compare__toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  margin: 0;
}

.pcb-show-all {
  border: 1px solid #d6d8e5;
  background: #fff;
  color: #333;
  padding: 9px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s ease;
}

.pcb-show-all:hover {
  border-color: #bfc4dc;
}

.pcb-compare__body {
  padding: 0 18px 18px;
}

.pcb-compare__scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding-top: 16px;
  -webkit-overflow-scrolling: touch;
}

.pcb-grid {
  display: grid;
  grid-template-columns: repeat(var(--pcb-cols), minmax(220px, 1fr));
}

.pcb-compare__products {
  gap: 0;
  min-width: max-content;
  border-top: 1px solid #ececf4;
  border-left: 1px solid #ececf4;
}

.pcb-product-card {
  border-right: 1px solid #ececf4;
  border-bottom: 1px solid #ececf4;
  background: #fff;
  min-width: 220px;
}

.pcb-product-card__inner {
  position: relative;
  padding: 18px 14px 12px;
  text-align: center;
  min-height: 100%;
}

.pcb-product-card.is-current {
  background: #fafbff;
}

.pcb-product-card.is-current .pcb-product-card__inner {
  box-shadow: inset 0 0 0 2px rgba(108, 99, 255, 0.06);
}

.pcb-product-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
  text-transform: uppercase;
  color: #1b8f63;
  background: #e7f7ef;
  border-radius: 999px;
  padding: 6px 8px;
  z-index: 2;
}

.pcb-product-card__image {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 150px;
  margin: 8px 0 14px;
}

.pcb-product-card__image img {
  max-width: 100%;
  max-height: 150px;
  width: auto;
  height: auto;
}

.pcb-product-card__name {
  display: block;
  min-height: 40px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: #222;
  text-decoration: none;
  margin-bottom: 14px;
}

.pcb-product-card__price {
  min-height: 30px;
  margin-bottom: 12px;
  font-size: 14px;
}

.pcb-price-old {
  text-decoration: line-through;
  color: #9c9caa;
  margin-right: 6px;
}

.pcb-price-new {
  color: #db4336;
  font-size: 16px;
  font-weight: 700;
}

.pcb-price {
  color: #505061;
  font-size: 16px;
  font-weight: 600;
}

.pcb-product-card__buttons {
  display: grid;
  gap: 8px;
}

.pcb-product-card__buttons button {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 11px 10px;
  cursor: pointer;
  background: #32a56f;
  color: #fff;
  font-weight: 600;
}

.pcb-product-card__buttons .pcb-btn-secondary {
  background: #f1f3f9;
  color: #52566b;
}

.pcb-compare__table-wrap {
  min-width: max-content;
  border-left: 1px solid #ececf4;
  border-bottom: 1px solid #ececf4;
}

.pcb-group {
  position: relative;
}

.pcb-group__title {
  background: #f6f7fb;
  border-top: 1px solid #ececf4;
  border-right: 1px solid #ececf4;
  padding: 14px 16px;
  font-size: 18px;
  font-weight: 700;
  position: relative;
  z-index: 2;
}

.pcb-spec {
  position: relative;
}

.pcb-spec__name {
  border: 1px solid #ececf4;
  background: #fff;
  padding: 13px 16px;
  font-size: 14px;
  font-weight: 700;
  color: #35384a;
  position: relative;
  z-index: 2;
}

.pcb-spec__values {
  min-width: max-content;
}

.pcb-spec__value {
  border: 1px solid #ececf4;
  padding: 13px 16px;
  font-size: 14px;
  line-height: 1.45;
  color: #4b4f63;
  min-height: 52px;
  display: flex;
  align-items: center;
  background: #fff;
}

.pcb-spec.is-diff .pcb-spec__name {
  background: #fbfbfe;
}

.pcb-spec.is-diff .pcb-spec__value {
  background: #fff;
}

@media (max-width: 991px) {
  .pcb-compare__header {
    padding: 18px 16px 14px;
    align-items: flex-start;
    flex-direction: column;
  }

  .pcb-compare__body {
    padding: 0 12px 12px;
  }

  .pcb-grid {
    grid-template-columns: repeat(var(--pcb-cols), 190px);
  }

  .pcb-product-card {
    min-width: 190px;
  }

  .pcb-product-card:first-child {
    position: sticky;
    left: 0;
    z-index: 18;
    background: #fafbff;
    box-shadow: 8px 0 12px -12px rgba(0, 0, 0, 0.24);
  }

  .pcb-group__title {
    position: sticky;
    left: 0;
    z-index: 30;
    min-width: 160px;
    width: 160px;
    background: #f6f7fb;
    box-shadow: 8px 0 12px -12px rgba(0, 0, 0, 0.18);
  }

  .pcb-spec__name {
    position: sticky;
    left: 0;
    z-index: 29;
    min-width: 160px;
    width: 160px;
    background: #fff;
    box-shadow: 8px 0 12px -12px rgba(0, 0, 0, 0.18);
    white-space: normal;
    word-break: break-word;
  }

  .pcb-spec.is-diff .pcb-spec__name {
    background: #fbfbfe;
  }

  .pcb-spec__values .pcb-spec__value:first-child {
    position: sticky;
    left: 160px;
    z-index: 17;
    background: #fff;
    box-shadow: 8px 0 12px -12px rgba(0, 0, 0, 0.12);
  }
}

@media (max-width: 575px) {
  .pcb-compare {
    border-radius: 14px;
  }

  .pcb-compare__title {
    font-size: 18px;
  }

  .pcb-grid {
    grid-template-columns: repeat(var(--pcb-cols), 170px);
  }

  .pcb-product-card {
    min-width: 170px;
  }

  .pcb-product-card__image {
    height: 120px;
  }

  .pcb-product-card__image img {
    max-height: 120px;
  }

  .pcb-product-card__name {
    min-height: 38px;
    font-size: 13px;
  }

  .pcb-product-card__buttons button {
    padding: 10px 8px;
    font-size: 13px;
  }

  .pcb-group__title {
    font-size: 16px;
    padding: 12px 14px;
    min-width: 145px;
    width: 170px;
  }

  .pcb-spec__name,
  .pcb-spec__value {
    padding: 11px 12px;
    font-size: 13px;
  }

  .pcb-spec__name {
    min-width: 145px;
    width: 170px;
  }

  .pcb-spec__values .pcb-spec__value:first-child {
    left: 0px;
  }
}