.used-related-section {
  margin-top: 34px;
}

.used-compare-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.used-compare-head h2 {
  margin: 0 0 6px;
  color: #071d3b;
  font-size: 1.75rem;
}

.used-compare-head p {
  margin: 0;
  color: #60738a;
}

.used-compare-head > strong {
  padding: 9px 14px;
  border-radius: 999px;
  background: #eaf3ff;
  color: #0a4f94;
  white-space: nowrap;
}

.used-compare-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.used-compare-card {
  display: flex;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid #d8e1ec;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(22, 49, 82, .08);
}

.used-compare-card[data-swap-payload] {
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.used-compare-card[data-swap-payload]:hover,
.used-compare-card[data-swap-payload]:focus-visible {
  border-color: #9ebbd8;
  box-shadow: 0 16px 36px rgba(22, 49, 82, .14);
  transform: translateY(-2px);
  outline: none;
}

.used-card-title-link {
  color: inherit;
  text-decoration: none;
}

.used-card-title-link:hover,
.used-card-title-link:focus-visible {
  color: #006c7c;
  text-decoration: underline;
}

.used-compare-photo {
  position: relative;
  display: block;
  height: 190px;
  flex: 0 0 190px;
  background: #f1f4f8;
}

.used-compare-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.used-compare-content {
  display: grid;
  min-height: 172px;
  flex: 1;
  grid-template-rows: auto auto auto auto;
  align-content: start;
  gap: 8px;
  padding: 16px;
}

.used-compare-condition-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 900;
  line-height: 1;
  border: 1px solid transparent;
  box-shadow: 0 6px 16px rgba(10, 35, 60, .14);
  pointer-events: none;
}

.used-compare-card.is-new .used-compare-condition-badge {
  background: #e8f7ef;
  color: #087443;
  border-color: #bde8d0;
}

.used-compare-card.is-used .used-compare-condition-badge {
  background: #fff0d6;
  color: #9b5c00;
  border-color: #ffd39a;
}

.used-compare-content h3,
.used-compare-content p {
  margin: 0;
}

.used-compare-content h3 {
  color: #071d3b;
}

.used-compare-content p {
  color: #60738a;
}

.used-card-detail-row {
  display: block;
  min-height: 0;
}

.used-card-detail-row p {
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  line-height: 1.35;
  max-height: 2.7em;
}

.used-card-detail-row[hidden],
.used-card-phone-row[hidden],
.used-color-badge[hidden],
.used-phone-link[hidden] {
  display: none !important;
}

.used-card-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.used-card-price-row b {
  color: #ed1739;
  font-size: 1.45rem;
}

.used-card-price-row .used-color-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  max-width: 48%;
  padding: 5px 10px;
  overflow: hidden;
  border: 1px solid #ffd4a8;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a4d00;
  font-size: .88rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.used-card-phone-row {
  display: flex;
  align-items: center;
  min-height: 34px;
  margin-top: 1px;
}

.used-card-phone-row .used-phone-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  height: auto;
  width: 100%;
  padding: 7px 10px;
  border-radius: 8px;
  background: #1689e8;
  color: #fff;
  overflow: visible;
  overflow-wrap: anywhere;
  text-align: center;
  text-overflow: clip;
  white-space: normal;
  font-weight: 900;
  line-height: 1.22;
  text-decoration: none;
}

.model-swap-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.model-swap-actions a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid #bdd7f2;
  border-radius: 7px;
  color: #006c7c;
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 1100px) {
  .used-compare-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 850px) {
  .used-compare-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

@media (max-width: 560px) {
  .used-compare-grid {
    grid-template-columns: 1fr;
  }

  .used-compare-photo {
    height: 220px;
    flex-basis: 220px;
  }

  .used-compare-content {
    min-height: 0;
  }
}

/* Keep the model-detail hero stable for portrait and landscape source images. */
.model-hero-card {
    align-items: stretch;
}

.model-hero-card .model-photo {
    height: 380px;
    min-height: 380px;
    max-height: 380px;
}

.model-hero-card .model-photo img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}

@media (max-width: 850px) {
    .model-hero-card .model-photo {
        height: 300px;
        min-height: 300px;
        max-height: 300px;
    }
}

@media (max-width: 560px) {
    .model-hero-card .model-photo {
        height: 240px;
        min-height: 240px;
        max-height: 240px;
    }
}
