/* Публичная витрина — карточки как на главном сайте AeroMobilis */
:root {
  --brand: #70859a;
  --brand-deep: #5f7388;
  --accent: #e63946;
  --ink: #1b2430;
  --muted: #6b7685;
  --surface: #f0f3f7;
  --bg: #ffffff;
  --border: #dde3eb;
  --radius: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.45;
}

.site-bar {
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: #fff;
  padding: 14px 16px;
  box-shadow: 0 2px 12px rgba(27, 38, 59, 0.08);
}
.site-bar-inner {
  max-width: 720px;
  margin: 0 auto;
}
.site-brand {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}
.site-brand span { font-weight: 600; opacity: 0.92; }

.catalog {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 12px 40px;
}

.empty-state { min-height: 40vh; }
.hidden { display: none !important; }

.car-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.rz-card {
  border: 1px solid var(--border);
  border-radius: var(--radius, 12px);
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 10px rgba(13, 27, 42, 0.05);
}
.rz-card--click { cursor: pointer; }
.rz-card--click:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(13, 27, 42, 0.12);
  transition: transform 0.15s, box-shadow 0.15s;
}

.rz-card .card-photo {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #e8edf3, #d3dce6);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.rz-card .card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rz-card .card-photo-empty {
  display: block;
  width: 42%;
  height: 28%;
  border-radius: 4px;
  background: #b7c3d3;
  opacity: 0.7;
}

.rz-card .card-status-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
  color: #fff;
}
.rz-card .card-status-badge--done { background: #2a9d4e; }
.rz-card .card-status-badge--dismantled { background: #7c3aed; }

.rz-card .card-body--catalog {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rz-card .card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  min-height: 22px;
  width: 100%;
}
.rz-card .card-meta-date {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted);
  white-space: nowrap;
}
.rz-card .card-meta-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.rz-card .card-lot {
  font-size: 0.88rem;
  font-weight: 600;
}
.rz-card .card-trim-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  padding: 5px 8px;
  border-radius: 6px;
  color: #fff;
  background: #1a5fb4;
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rz-card .card-title {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.25;
  color: #0d1b2a;
}
.rz-card .card-vin {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  word-break: break-all;
}
.rz-card .card-accepted-line {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #2a9d4e;
}

.detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(13, 27, 42, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
}
@media (min-width: 720px) {
  .detail-overlay { align-items: center; }
}
.detail-overlay.hidden { display: none !important; }
.detail-panel {
  position: relative;
  width: min(40rem, 100%);
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  padding: 1.1rem 1rem 1.25rem;
  box-shadow: 0 12px 40px rgba(13, 27, 42, 0.2);
}
.detail-close {
  position: sticky;
  top: 0;
  float: right;
  border: 0;
  background: #eef2f6;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1rem;
}
.detail-title {
  margin: 0 2.5rem 0.25rem 0;
  font-size: 1.15rem;
}
.detail-vin {
  margin: 0 0 0.35rem;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.85rem;
  color: var(--muted);
}
.detail-status {
  margin: 0 0 1rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #2a9d4e;
}
.detail-h {
  margin: 0.85rem 0 0.45rem;
  font-size: 0.9rem;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.detail-thumb {
  display: block;
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  background: #eef2f6;
}
.detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}
