.vehicle-page {
  min-height: calc(100vh - 72px);
  padding: 36px 0 70px;
  background:
    radial-gradient(circle at 90% 0, rgba(40, 96, 232, .10), transparent 27%),
    var(--background);
}

.back-link {
  display: inline-flex;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.back-link:hover {
  color: var(--primary);
}

.vehicle-loading {
  padding: 55px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  color: var(--muted);
  text-align: center;
}

.vehicle-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 28px;
}

.vehicle-source,
.section-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.vehicle-heading h1 {
  margin-bottom: 13px;
  font-size: clamp(34px, 4vw, 52px);
  letter-spacing: -.045em;
}

.vehicle-heading-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 13px;
  color: var(--muted);
  font-size: 14px;
}

.heading-actions {
  display: flex;
  gap: 10px;
}

.vehicle-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, .5fr);
  gap: 22px;
}

.vehicle-photo-card,
.price-summary-card,
.analytics-main-card,
.insight-card,
.timeline-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
}

.vehicle-photo-card {
  overflow: hidden;
}

.vehicle-photo-placeholder {
  min-height: 450px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle, rgba(40, 96, 232, .16), transparent 52%),
    linear-gradient(145deg, #edf3ff, #f7fbff);
  font-size: 170px;
}

.photo-caption {
  padding: 13px 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.price-summary-card {
  padding: 25px;
}

.summary-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.summary-price {
  display: block;
  font-size: 38px;
  letter-spacing: -.04em;
}

.summary-divider {
  height: 1px;
  margin: 25px 0 12px;
  background: var(--line);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.summary-row span {
  color: var(--muted);
}

.summary-row strong {
  text-align: right;
}

.analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, .6fr);
  gap: 22px;
  margin-top: 22px;
}

.analytics-main-card,
.insight-card,
.timeline-section {
  padding: 25px;
}

.card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.card-heading h2,
.insight-card h2,
.timeline-section h2 {
  margin-bottom: 0;
  font-size: 23px;
}

.period-badge {
  padding: 8px 11px;
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.large-chart {
  min-height: 315px;
  display: grid;
  place-items: center;
  margin-top: 20px;
  border: 1px dashed #ccd6e5;
  border-radius: 14px;
  background:
    linear-gradient(rgba(225, 231, 240, .45) 1px, transparent 1px),
    linear-gradient(90deg, rgba(225, 231, 240, .45) 1px, transparent 1px);
  background-size: 45px 45px;
}

.chart-empty {
  max-width: 390px;
  text-align: center;
}

.chart-empty span {
  display: block;
  margin-bottom: 10px;
  font-size: 45px;
}

.chart-empty strong {
  display: block;
  margin-bottom: 8px;
}

.chart-empty p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.insight-message {
  display: flex;
  gap: 13px;
  margin-top: 20px;
  padding: 17px;
  border-radius: 13px;
  background: var(--primary-soft);
}

.insight-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--primary);
  color: white;
  font-weight: 900;
}

.insight-message p {
  margin: 0;
  color: #395070;
  font-size: 13px;
  line-height: 1.6;
}

.insight-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.insight-metrics div {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.insight-metrics span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
}

.insight-metrics strong {
  font-size: 20px;
}

.timeline-section {
  margin-top: 22px;
}

.timeline {
  position: relative;
  display: grid;
  gap: 25px;
  margin-top: 25px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 7px;
  width: 2px;
  background: var(--line);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 14px;
}

.timeline-dot {
  position: relative;
  z-index: 1;
  width: 16px;
  height: 16px;
  border: 4px solid white;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 2px var(--primary);
}

.timeline-item strong {
  display: block;
  margin-bottom: 5px;
}

.timeline-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 900px) {
  .vehicle-heading {
    flex-direction: column;
  }

  .vehicle-overview,
  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .vehicle-photo-placeholder {
    min-height: 360px;
  }
}

@media (max-width: 600px) {
  .heading-actions {
    width: 100%;
    flex-direction: column;
  }

  .heading-actions .button {
    width: 100%;
  }

  .vehicle-photo-placeholder {
    min-height: 260px;
    font-size: 100px;
  }

  .insight-metrics {
    grid-template-columns: 1fr;
  }
}

/* AUTOSEKLYS PRICE CHART */

.price-chart {
  width: 100%;
  height: 100%;
  display: none;
}

.price-chart.visible {
  display: block;
}

.chart-grid-line {
  stroke: #e7ecf4;
  stroke-width: 1;
}

.chart-line {
  fill: none;
  stroke: var(--primary);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-area {
  fill: rgba(40, 96, 232, 0.10);
}

.chart-point {
  fill: white;
  stroke: var(--primary);
  stroke-width: 3;
}

.chart-label {
  fill: var(--muted);
  font-size: 12px;
}

/* AUTOSEKLYS VEHICLE PHOTO */

.vehicle-photo-placeholder {
  position: relative;
  overflow: hidden;
}

.vehicle-photo {
  width: 100%;
  height: 450px;
  display: block;
  object-fit: contain;
  background: #f3f6fb;
}

.vehicle-photo-placeholder.has-photo {
  display: block;
  min-height: 0;
}

.vehicle-photo-placeholder.has-photo > span {
  display: none;
}

@media (max-width: 900px) {
  .vehicle-photo {
    height: 360px;
  }
}

@media (max-width: 600px) {
  .vehicle-photo {
    height: 260px;
  }
}

