.tm-compare {
  background: transparent;
  border-radius: 0;
  padding: 0;
  color: #0f172a;
  --tm-compare-thumb-size: 72px;
}

.tm-compare-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 24px;
}

.tm-compare-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}

.tm-compare-subtitle {
  margin: 0;
  color: #475569;
  font-size: 15px;
}

.tm-compare-selection {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.tm-compare-vehicle {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  box-shadow: none;
}

.tm-compare-media {
  position: relative;
  background: #8b5cf6;
  height: 300px;
  min-height: 300px;
  max-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}

.tm-compare-media.is-placeholder {
  background: #e2e8f0;
}

.tm-compare-media img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block;
  max-width: none;
  max-height: none;
}

.tm-compare-media .swiper,
.tm-compare-media .swiper-wrapper,
.tm-compare-media .swiper-slide {
  width: 100%;
  height: 100%;
}

.tm-compare-media .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tm-compare-media .swiper-slide img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block;
  max-width: none;
  max-height: none;
}

.tm-compare-media .swiper-pagination {
  bottom: 12px;
}

.tm-compare-media .swiper-pagination-bullet {
  background: #ffffff;
  opacity: 0.6;
}

.tm-compare-media .swiper-pagination-bullet-active {
  opacity: 1;
}

.tm-compare-media .swiper-button-next,
.tm-compare-media .swiper-button-prev {
  color: #ffffff;
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 50%;
  backdrop-filter: blur(4px);
}

.tm-compare-media .swiper-button-next:after,
.tm-compare-media .swiper-button-prev:after {
  font-size: 16px;
  font-weight: 700;
}

.tm-compare-media-placeholder {
  color: #94a3b8;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tm-compare-card {
  background: #ffffff;
  border-radius: 0 0 8px 8px;
  box-shadow: none;
  display: flex;
  flex-direction: column;
}

.tm-compare-card-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tm-compare-card-heading {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tm-compare-card-title {
  margin: 0;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.tm-compare-card-subtitle {
  margin: 4px 0 0;
  color: #6b7280;
  font-size: 14px;
}

.tm-compare-label {
  display: block;
  font-weight: 600;
  margin: 0;
  color: #6b7280;
  font-size: 13px;
}

.tm-compare-search {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tm-compare-field {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px 14px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tm-compare-field:focus-within {
  border-color: #111827;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}

.tm-compare-input {
  width: 100%;
  padding: 0;
  border-radius: 0;
  border: none;
  background: transparent;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.tm-compare-input:focus {
  outline: none;
  box-shadow: none;
}

.tm-compare-input::placeholder {
  color: #9ca3af;
  font-weight: 500;
}

.tm-compare-results {
  margin-top: 2px;
}

.tm-compare-results.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

.tm-compare-results-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f8fafc;
  border-radius: 8px;
  padding: 10px;
}

.tm-compare-results-empty {
  padding: 12px;
  color: #64748b;
  font-size: 14px;
}

.tm-compare-result {
  display: grid;
  grid-template-columns: var(--tm-compare-thumb-size, 72px) 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
  cursor: pointer;
  text-align: left;
}

.tm-compare-result:hover {
  border-color: #bfdbfe;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.15);
}

.tm-compare-result-thumb {
  width: var(--tm-compare-thumb-size, 72px);
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.tm-compare-result-thumb img,
.tm-compare-result-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  background: #e2e8f0;
  max-width: none;
  max-height: none;
}

.tm-compare-result-placeholder {
  position: static;
}

.tm-compare-result-thumb img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.tm-compare-result-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #64748b;
}

.tm-compare-result-title {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
}

.tm-compare-result-meta {
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
}

.tm-compare-result-price {
  margin-top: 6px;
  font-weight: 700;
  color: #0f172a;
}

.tm-compare-selected {
  margin-top: 0;
}

.tm-compare-selected-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 14px;
}

.tm-compare-selected-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

.tm-compare-selected-title {
  font-size: 16px;
  font-weight: 700;
  margin: 6px 0 4px;
}

.tm-compare-selected-meta {
  font-size: 13px;
  color: #475569;
}

.tm-compare-selected-price {
  margin-top: 8px;
  font-weight: 700;
}

.tm-compare-selected-price-old {
  text-decoration: line-through;
  color: #94a3b8;
  font-size: 13px;
}

.tm-compare-selected-actions {
  margin-top: 10px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.tm-compare-selected-actions a,
.tm-compare-change {
  font-size: 13px;
  font-weight: 600;
  color: #2563eb;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
}

.tm-compare-change:hover,
.tm-compare-selected-actions a:hover {
  text-decoration: underline;
}

.tm-compare-blocks-card {
  background: #ffffff;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
}

.tm-compare-blocks-card[hidden] {
  display: none !important;
}

.tm-compare-blocks-header h3 {
  margin: 0;
  font-size: 20px;
}

.tm-compare-blocks-note {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13px;
}

.tm-compare-blocks-scroll {
  margin-top: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.tm-compare-blocks {
  width: 100%;
}

.tm-compare-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 8px;
  overflow: hidden;
}

.tm-compare-table th,
.tm-compare-table td {
  padding: 16px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #e5e7eb;
}

.tm-compare-table thead th {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
}

.tm-compare-table-label {
  font-weight: 700;
  color: #111827;
  width: 30%;
}

.tm-compare-table-label-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tm-compare-table-icon {
  width: 18px;
  height: 18px;
  color: var(--bde-brand-primary-color, #1d4ed8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tm-compare-table-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}

.tm-compare-table-value {
  font-size: 16px;
  font-weight: 400;
  color: #111827;
}

.tm-compare-table tbody tr:last-child th,
.tm-compare-table tbody tr:last-child td {
  border-bottom: none;
}

.tm-compare-status {
  margin-top: 16px;
  font-size: 14px;
}

.tm-compare-status-info {
  color: #1e40af;
}

.tm-compare-status-error {
  color: #b91c1c;
}

.tm-compare-status-success {
  color: #15803d;
}

@media (max-width: 900px) {
  .tm-compare {
    padding: 0;
    --tm-compare-thumb-size: 64px;
  }

  .tm-compare-selection {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .tm-compare-media {
    height: 220px;
    min-height: 220px;
    max-height: 220px;
  }

  .tm-compare-card-body {
    padding: 16px;
  }

  .tm-compare-card-title {
    font-size: 18px;
  }

  .tm-compare-card-subtitle {
    font-size: 12px;
  }

  .tm-compare-input {
    font-size: 16px;
  }

  .tm-compare-results-list {
    padding: 8px;
    max-height: 260px;
    overflow-y: auto;
  }

  .tm-compare-result {
    grid-template-columns: var(--tm-compare-thumb-size, 64px) 1fr;
    align-items: center;
  }

  .tm-compare-selected-card {
    padding: 12px;
    gap: 6px;
  }

  .tm-compare-result-title {
    font-size: 14px;
  }

  .tm-compare-result-meta {
    font-size: 11px;
  }

  .tm-compare-result-price {
    font-size: 13px;
  }

  .tm-compare-blocks-scroll {
    overflow-x: visible;
  }

  .tm-compare-table thead {
    display: none;
  }

  .tm-compare-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 16px;
    padding: 16px 0;
    border-bottom: 1px solid #e5e7eb;
  }

  .tm-compare-table tbody th,
  .tm-compare-table tbody td {
    border-bottom: none;
    padding: 0;
    display: block;
  }

  .tm-compare-table tbody th {
    grid-column: 1 / -1;
  }

  .tm-compare-table-label {
    width: auto;
  }

  .tm-compare-table-value {
    font-size: 15px;
    font-weight: 400;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .tm-compare-table-value strong {
    font-weight: 400;
  }

  .tm-compare-table-label-wrap {
    font-size: 16px;
  }

  .tm-compare-table-icon {
    width: 14px;
    height: 14px;
  }

  .tm-compare-table-icon svg {
    width: 14px;
    height: 14px;
  }
}
