/* ===== D6: СРАВНЕНИЕ МОДЕЛЕЙ (КАРТОЧКИ) ===== */
.compare {
  padding: 90px 0;
  background: linear-gradient(180deg, #F7FBFC 0%, white 100%);
}
.compare__header {
  text-align: center;
  margin-bottom: 48px;
}
.compare__header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-teal-light);
  color: var(--brand-teal);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.compare__header-badge svg {
  width: 14px; height: 14px; stroke: var(--brand-teal); fill: none; stroke-width: 2;
}
.compare h2 {
  font-size: 32px;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}
.compare__subtitle {
  color: #7A8A8F;
  font-size: 16px;
}
.compare__grid {
  display: grid;
  /* auto-fit + фикс. ширина трека (≈ 1/5 от 1100px) + justify-content: center —
     карточки занимают сколько надо, остаток равномерно по бокам, ряд всегда центрирован.
     Любое количество (3/4/5/6) выглядит сбалансированно. Mobile/tablet @media-правила
     ниже перебивают `repeat(2, 1fr) !important` для своих брейкпойнтов. */
  grid-template-columns: repeat(auto-fit, 207px);
  justify-content: center;
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
}
.compare__card {
  background: white;
  border-radius: 16px;
  border: 1px solid #edf2f3;
  padding: 28px 20px 24px;
  text-align: center;
  position: relative;
  transition: transform 0.25s, box-shadow 0.25s;
  /* Flex column so .compare__bottom can stick to the card bottom (margin-top:auto).
     Grid items already stretch to the row's tallest cell, so all cards share height;
     this just keeps rating/price/btn aligned at the same baseline across cards. */
  display: flex;
  flex-direction: column;
}
.compare__bottom {
  margin-top: auto;
}
.compare__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}
.compare__card--featured {
  border: 2px solid var(--brand-teal);
  background: linear-gradient(180deg, var(--brand-teal-light) 0%, white 40%);
  box-shadow: 0 8px 28px color-mix(in srgb, var(--brand-teal), transparent 82%);
  transform: scale(1.03);
  z-index: 1;
}
.compare__card--featured:hover {
  transform: scale(1.03) translateY(-4px);
  box-shadow: 0 14px 36px color-mix(in srgb, var(--brand-teal), transparent 75%);
}
.compare__ribbon {
  position: absolute;
  top: -1px; left: 50%;
  transform: translateX(-50%);
  background: var(--brand-teal);
  color: white;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 5px 16px;
  border-radius: 0 0 10px 10px;
}
/* Product photo at the top of the compare card */
.compare__image {
  display: block;
  width: 100%;
  max-width: 150px;
  margin: 4px auto 0;
}
.compare__image img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: contain;
}
.compare__card--featured .compare__image { margin-top: 18px; }
.compare__model {
  font-size: 18px;
  font-weight: 900;
  color: var(--brand-dark);
  margin: 16px 0 4px;
}
.compare__card--featured .compare__model { margin-top: 8px; }
.compare__tagline {
  font-size: 12px;
  color: #7A8A8F;
  margin-bottom: 20px;
}
.compare__specs {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}
.compare__specs li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid #f0f3f4;
  font-size: 13px;
  color: #555;
}
.compare__specs li:last-child { border-bottom: none; }
.compare__specs-label { color: #8A9AA0; }
.compare__specs-value { font-weight: 700; color: var(--brand-dark); }
.compare__rating {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 700;
  color: #F5A623;
  min-height: 18px;
  line-height: 1.2;
}
.compare__rating-num { color: var(--brand-dark); }
/* Reserve the rating row when a product has no reviews,
   so price and button stay aligned across all cards. */
.compare__rating--empty {
  visibility: hidden;
}
.compare__price {
  font-size: 22px;
  font-weight: 900;
  color: var(--price-color);
  margin-bottom: 16px;
}
.compare__btn {
  display: block;
  padding: 12px 16px;
  background: var(--brand-teal);
  color: white;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}
.compare__btn:hover {
  background: color-mix(in srgb, var(--brand-teal), black 15%);
  transform: translateY(-1px);
}
.compare__card--featured .compare__btn {
  background: var(--brand-yellow);
  color: var(--brand-dark);
  font-size: 15px;
  padding: 14px 16px;
}
.compare__card--featured .compare__btn:hover {
  background: color-mix(in srgb, var(--brand-yellow), black 7%);
}
/* Carousel dots — JS adds .is-active only when the row overflows (mobile carousel).
   Desktop/tablet grid never overflows, so the dots stay hidden. */
.compare__dots { display: none; }
.compare__dots.is-active {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}
.compare__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #cfdce0;
  cursor: pointer;
  transition: background 0.2s, width 0.2s;
}
.compare__dot.is-active {
  width: 22px;
  border-radius: 4px;
  background: var(--brand-teal);
}
