@charset "UTF-8";
/* ── reset & tokens ─────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: #f0f2f5;
  color: #1a1d23;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  font: inherit;
  border: none;
  background: none;
}

input,
select {
  font: inherit;
}

ul {
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
}

:root {
  --c-primary: #1b2e4b;
  --c-primary-dark: #111e32;
  --c-accent: #f59e0b;
  --c-accent-light: #fef3c7;
  --c-surface: #fff;
  --c-bg: #f0f2f5;
  --c-border: #e2e5ea;
  --c-text: #1a1d23;
  --c-muted: #6b7280;
  --c-red: #ef4444;
  --c-green: #22c55e;
  --c-yellow: #f59e0b;
  --radius: 10px;
  --shadow: 0 1px 4px rgba(0, 0, 0, .08), 0 4px 16px rgba(0, 0, 0, .05);
  --sidebar: 296px;
  --header-h: 60px;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

/* ── header ─────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--c-primary);
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  cursor: pointer;
}

.logo-icon {
  width: 84px;
  height: auto;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.header-search {
  flex: 1;
  max-width: 560px;
  position: relative;
}

.header-search input {
  width: 100%;
  height: 38px;
  border-radius: 20px;
  border: none;
  outline: none;
  padding: 0 44px 0 16px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  transition: background 0.2s;
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.header-search input:focus {
  background: rgba(255, 255, 255, 0.2);
}

.header-search-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--c-accent);
  border-radius: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.85rem;
  transition: background 0.2s;
}

.header-search-btn:hover {
  background: #d97706;
}

.header-right {
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: center;
}

.header-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.85rem;
  transition: background 0.2s;
}

.header-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.header-btn.accent {
  background: var(--c-accent);
  color: #fff;
}

.header-btn.accent:hover {
  background: #d97706;
}

/* ── listing layout ─────────────────────────────────────────────────────── */
.page-wrap {
  display: flex;
  align-items: flex-start;
  max-width: 1480px;
  margin: 0 auto;
  padding: 20px 16px;
  gap: 20px;
}

/* ── sidebar ────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar);
  flex-shrink: 0;
  background: var(--c-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: sticky;
  top: calc(var(--header-h) + 16px);
  max-height: calc(100vh - var(--header-h) - 32px);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-header {
  padding: 14px 16px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  background: var(--c-surface);
  z-index: 2;
}

.sidebar-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--c-primary);
}

.sidebar-clear {
  font-size: 0.8rem;
  color: var(--c-accent);
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}

.sidebar-clear:hover {
  background: var(--c-accent-light);
}

.filter-section {
  border-bottom: 1px solid var(--c-border);
}

.filter-section:last-child {
  border-bottom: none;
}

.filter-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--c-text);
  transition: background 0.15s;
  user-select: none;
}

.filter-toggle:hover {
  background: #f8f9fb;
}

.filter-toggle svg {
  transition: transform 0.22s;
  flex-shrink: 0;
}

.filter-toggle.open svg {
  transform: rotate(180deg);
}

.filter-body {
  padding: 0 16px 14px;
  animation: slideDown 0.18s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 4px;
}

.chip {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1.5px solid var(--c-border);
  background: #fff;
  color: var(--c-text);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.chip:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
}

.chip.active {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
}

.range-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}

.range-row span {
  font-size: 0.78rem;
  color: var(--c-muted);
  flex-shrink: 0;
}

.field-input {
  flex: 1;
  min-width: 0;
  height: 36px;
  border-radius: 8px;
  border: 1.5px solid var(--c-border);
  padding: 0 10px;
  font-size: 0.85rem;
  color: var(--c-text);
  outline: none;
  transition: border-color 0.15s;
  background: #fff;
}

.field-input:focus {
  border-color: var(--c-primary);
}

.field-select {
  width: 100%;
  height: 36px;
  border-radius: 8px;
  border: 1.5px solid var(--c-border);
  padding: 0 28px 0 10px;
  font-size: 0.85rem;
  color: var(--c-text);
  outline: none;
  transition: border-color 0.15s;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.17l3.71-3.94a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'/%3E%3C/svg%3E") no-repeat right 8px center/18px;
  appearance: none;
  cursor: pointer;
  margin-top: 6px;
}

.field-select:focus {
  border-color: var(--c-primary);
}

.toggle-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.toggle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.85rem;
}

.toggle-item:last-child {
  border-bottom: none;
}

.switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  inset: 0;
  background: #d1d5db;
  border-radius: 11px;
  transition: 0.2s;
  cursor: pointer;
}

.slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
  background: var(--c-primary);
}

input:checked + .slider::before {
  transform: translateX(16px);
}

.color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.color-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  border: 2.5px solid transparent;
  transition: all 0.15s;
  position: relative;
}

.color-dot:hover,
.color-dot.active {
  border-color: var(--c-primary);
  transform: scale(1.12);
}

.color-dot.active::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #fff;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
}

.sidebar-apply {
  position: sticky;
  bottom: 0;
  background: var(--c-surface);
  padding: 12px 16px;
  border-top: 1px solid var(--c-border);
}

.btn-apply {
  width: 100%;
  height: 40px;
  border-radius: 20px;
  background: var(--c-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  transition: background 0.15s;
}

.btn-apply:hover {
  background: var(--c-primary-dark);
}

/* ── main content ───────────────────────────────────────────────────────── */
.main {
  flex: 1;
  min-width: 0;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 0 12px;
}

.af-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--c-accent-light);
  border: 1.5px solid var(--c-accent);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #92400e;
}

.af-chip button {
  width: 14px;
  height: 14px;
  font-size: 0.8rem;
  line-height: 1;
  color: #92400e;
  flex-shrink: 0;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--c-surface);
  border-radius: var(--radius);
  padding: 10px 14px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}

.result-count {
  font-size: 0.88rem;
  color: var(--c-muted);
  margin-right: auto;
}

.result-count strong {
  color: var(--c-text);
  font-weight: 700;
}

.sort-select {
  height: 34px;
  border-radius: 8px;
  border: 1.5px solid var(--c-border);
  padding: 0 28px 0 10px;
  font-size: 0.82rem;
  outline: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.17l3.71-3.94a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'/%3E%3C/svg%3E") no-repeat right 8px center/16px;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.15s;
}

.sort-select:focus {
  border-color: var(--c-primary);
}

.view-btns {
  display: flex;
  gap: 2px;
  background: #f0f2f5;
  border-radius: 8px;
  padding: 2px;
}

.view-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--c-muted);
  transition: all 0.15s;
}

.view-btn.active {
  background: #fff;
  color: var(--c-primary);
  box-shadow: var(--shadow);
}

.mobile-filter-btn {
  display: none;
  align-items: center;
  gap: 6px;
  background: var(--c-primary);
  color: #fff;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* ── vehicle cards ──────────────────────────────────────────────────────── */
.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.vehicle-grid.list-view {
  grid-template-columns: 1fr;
}

.v-card {
  background: var(--c-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s, box-shadow 0.18s;
  position: relative;
  cursor: pointer;
}

.v-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}

.list-view .v-card {
  flex-direction: row;
  height: 150px;
}

.list-view .v-card-img {
  width: 220px;
  flex-shrink: 0;
  height: 100%;
}

.list-view .v-card-img img {
  height: 100%;
  object-fit: cover;
}

.list-view .v-card-body {
  padding: 12px 14px;
  justify-content: center;
}

.v-card-img {
  aspect-ratio: 16/10;
  overflow: hidden;
  position: relative;
  background: #f0f2f5;
}

.v-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.v-card:hover .v-card-img img {
  transform: scale(1.04);
}

.badge {
  position: absolute;
  top: 8px;
  background: var(--c-primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.badge-left {
  left: 8px;
}

.badge-right {
  right: 8px;
}

.badge-discount {
  background: #ef4444;
}

.badge-new {
  background: #22c55e;
}

.badge-unavailable {
  background: #6b7280;
}

.v-card-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.v-card-title {
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.3;
  color: var(--c-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.v-card-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--c-primary);
  margin-top: 2px;
}

.v-card-price.on-request {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--c-muted);
}

.v-card-price .old-price {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--c-muted);
  text-decoration: line-through;
  margin-left: 6px;
}

.v-card-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: auto;
}

.spec-pill {
  display: flex;
  align-items: center;
  gap: 3px;
  background: #f0f2f5;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.75rem;
  color: var(--c-muted);
}

.v-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-top: 1px solid var(--c-border);
  font-size: 0.76rem;
  color: var(--c-muted);
}

.v-card-dealer {
  display: flex;
  align-items: center;
  gap: 5px;
  max-width: 60%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dealer-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
}

.fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all 0.15s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.fav-btn:hover,
.fav-btn.active {
  background: #fff;
  color: #ef4444;
}

/* ── skeleton ───────────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #f0f2f5 25%, #e2e5ea 50%, #f0f2f5 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
  border-radius: 6px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
.sk-img {
  width: 100%;
  aspect-ratio: 16/10;
  border-radius: 0;
}

.sk-line {
  height: 14px;
  margin: 6px 14px;
}

.sk-line.short {
  width: 55%;
  margin: 3px 14px;
}

.sk-line.price {
  height: 20px;
  width: 45%;
  margin: 6px 14px;
}

/* ── pagination ─────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 24px 0 8px;
  flex-wrap: wrap;
}

.pg-btn {
  min-width: 36px;
  height: 36px;
  border-radius: 8px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1.5px solid var(--c-border);
  background: #fff;
  transition: all 0.15s;
  color: var(--c-text);
}

.pg-btn:hover:not(:disabled) {
  border-color: var(--c-primary);
  color: var(--c-primary);
}

.pg-btn.active {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
}

.pg-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.pg-ellipsis {
  padding: 0 6px;
  color: var(--c-muted);
  line-height: 36px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--c-muted);
  background: var(--c-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.empty-state .icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.empty-state h3 {
  font-size: 1.1rem;
  color: var(--c-text);
  margin-bottom: 6px;
}

/* ── mobile sidebar overlay ─────────────────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 300;
}

.sidebar-overlay.open {
  display: block;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DETAIL VIEW
═══════════════════════════════════════════════════════════════════════════ */
.detail-view {
  display: none;
  background: var(--c-bg);
  min-height: calc(100vh - var(--header-h));
}

.detail-view.open {
  display: block;
  animation: fadeUp 0.2s ease;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* topbar */
.detail-topbar {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: var(--header-h);
  z-index: 50;
}

.detail-back {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--c-primary);
  padding: 6px 12px;
  border-radius: 8px;
  background: #f0f2f5;
  transition: background 0.15s;
  flex-shrink: 0;
}

.detail-back:hover {
  background: #e2e5ea;
}

.detail-breadcrumb {
  font-size: 0.82rem;
  color: var(--c-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-breadcrumb span {
  color: var(--c-text);
  font-weight: 500;
}

.detail-topbar-fav {
  margin-left: auto;
  font-size: 1.1rem;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.15s;
  color: var(--c-muted);
}

.detail-topbar-fav:hover,
.detail-topbar-fav.active {
  color: #ef4444;
  background: #fef2f2;
}

/* body grid */
.detail-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 16px;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
}

/* ── gallery ── */
.gallery-wrap {
  background: var(--c-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: sticky;
  top: calc(var(--header-h) + 56px);
  max-width: 750px;
  padding: 45px;
}

.gallery-main {
  position: relative;
  aspect-ratio: 16/10;
  background: #0a0f1a;
  overflow: hidden;
  cursor: zoom-in;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s;
}

.gallery-main:hover img {
  transform: scale(1.02);
}

.gallery-main .no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: #334155;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--c-primary);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.15s;
  z-index: 2;
}

.gallery-nav:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.08);
}

.gallery-nav.prev {
  left: 10px;
}

.gallery-nav.next {
  right: 10px;
}

.gallery-counter {
  position: absolute;
  bottom: 10px;
  right: 12px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border-radius: 12px;
  padding: 3px 10px;
  font-size: 0.76rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.gallery-thumbs {
  display: flex;
  gap: 6px;
  padding: 8px;
  overflow-x: auto;
  background: var(--c-surface);
  scroll-snap-type: x mandatory;
}

.gallery-thumbs::-webkit-scrollbar {
  height: 4px;
}

.gallery-thumbs::-webkit-scrollbar-thumb {
  background: #cbd5e1;
}

.thumb {
  flex-shrink: 0;
  width: 72px;
  height: 52px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s;
  scroll-snap-align: start;
}

.thumb:hover {
  border-color: var(--c-primary);
  opacity: 0.9;
}

.thumb.active {
  border-color: var(--c-primary);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── info panel ── */
.detail-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.detail-badge.new {
  background: #dcfce7;
  color: #166534;
}

.detail-badge.used {
  background: #f0f2f5;
  color: #475569;
}

.detail-badge.unavailable {
  background: #fee2e2;
  color: #991b1b;
}

.detail-badge.discount {
  background: #fef3c7;
  color: #92400e;
}

.detail-badge.leasing {
  background: #ede9fe;
  color: #5b21b6;
}

.detail-badge.oldtimer {
  background: #fce7f3;
  color: #9d174d;
}

.detail-h1 {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--c-text);
}

.detail-price-box {
  background: var(--c-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.detail-price {
  font-size: 2rem;
  font-weight: 900;
  color: var(--c-primary);
  line-height: 1;
}

.detail-price.on-request {
  font-size: 1.2rem;
  color: var(--c-muted);
}

.detail-price-sub {
  font-size: 0.82rem;
  color: var(--c-muted);
  margin-top: 4px;
}

.detail-price-sub .discount-tag {
  color: var(--c-red);
  font-weight: 600;
}

.detail-keyspecs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ks-item {
  background: #f8f9fb;
  border-radius: 8px;
  padding: 10px 12px;
}

.ks-label {
  font-size: 0.72rem;
  color: var(--c-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 3px;
}

.ks-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--c-text);
}

/* dealer card */
.dealer-card {
  background: var(--c-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
}

.dealer-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.dealer-avatar-lg {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.dealer-avatar-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dealer-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--c-text);
}

.dealer-meta {
  font-size: 0.8rem;
  color: var(--c-muted);
}

.dealer-badges {
  display: flex;
  gap: 5px;
  margin-top: 4px;
}

.dealer-badge-sm {
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 10px;
  background: #f0f2f5;
  color: var(--c-muted);
  font-weight: 500;
}

.dealer-badge-sm.verified {
  background: #dcfce7;
  color: #166534;
}

.dealer-badge-sm.delivery {
  background: #dbeafe;
  color: #1e40af;
}

.dealer-response {
  font-size: 0.8rem;
  color: var(--c-muted);
  padding: 6px 0;
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
  margin: 8px 0;
}

.dealer-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.btn-primary {
  height: 42px;
  border-radius: 22px;
  background: var(--c-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.btn-primary:hover {
  background: var(--c-primary-dark);
}

.btn-outline {
  height: 40px;
  border-radius: 22px;
  border: 1.5px solid var(--c-border);
  color: var(--c-text);
  font-weight: 600;
  font-size: 0.88rem;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.btn-outline:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
}

/* ── tabs ── */
.detail-tabs-outer {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px 32px;
}

.detail-tabs-bar {
  display: flex;
  gap: 2px;
  background: var(--c-surface);
  border-radius: var(--radius);
  padding: 5px;
  box-shadow: var(--shadow);
  overflow-x: auto;
  margin-bottom: 14px;
}

.detail-tabs-bar::-webkit-scrollbar {
  height: 3px;
}

.dtab {
  flex-shrink: 0;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--c-muted);
  transition: all 0.15s;
  white-space: nowrap;
}

.dtab:hover {
  color: var(--c-text);
  background: #f0f2f5;
}

.dtab.active {
  background: var(--c-primary);
  color: #fff;
}

.detail-tab-content {
  background: var(--c-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

/* spec table */
.spec-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.spec-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 9px 12px;
  border-bottom: 1px solid #f3f4f6;
}

.spec-row:nth-child(odd) {
  background: #fafbfc;
}

.spec-row:last-child,
.spec-row:nth-last-child(2):nth-child(odd) {
  border-bottom: none;
}

.spec-label {
  font-size: 0.82rem;
  color: var(--c-muted);
  flex-shrink: 0;
  margin-right: 8px;
}

.spec-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--c-text);
  text-align: right;
}

/* equipment grid */
.oprema-section {
  margin-bottom: 20px;
}

.oprema-section:last-child {
  margin-bottom: 0;
}

.oprema-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--c-muted);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--c-border);
}

.oprema-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px;
}

.oprema-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.83rem;
  background: #f8f9fb;
}

.oprema-item.yes {
  background: #f0fdf4;
}

.oprema-item.no {
  background: #fef2f2;
  opacity: 0.6;
}

.oprema-item.info {
  background: #eff6ff;
}

.oprema-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}

.oprema-item.yes .oprema-icon {
  background: #dcfce7;
  color: #16a34a;
}

.oprema-item.no .oprema-icon {
  background: #fee2e2;
  color: #dc2626;
}

.oprema-item.info .oprema-icon {
  background: #dbeafe;
  color: #2563eb;
}

.oprema-label {
  color: var(--c-text);
  flex: 1;
}

.oprema-val {
  font-weight: 600;
  font-size: 0.82rem;
}

.oprema-item.yes .oprema-val {
  color: #16a34a;
}

.oprema-item.no .oprema-val {
  color: #dc2626;
}

.oprema-item.info .oprema-val {
  color: #2563eb;
}

/* description */
.desc-html {
  line-height: 1.7;
  font-size: 0.9rem;
  color: #374151;
}

.desc-html h1,
.desc-html h2,
.desc-html h3 {
  margin: 12px 0 6px;
  font-size: 1rem;
  color: var(--c-text);
}

.desc-html p {
  margin-bottom: 8px;
}

.desc-html ul,
.desc-html ol {
  margin: 8px 0 8px 20px;
}

.desc-html li {
  margin-bottom: 3px;
}

/* detail skeleton */
.detail-sk-gallery {
  width: 100%;
  aspect-ratio: 16/10;
}

.detail-sk-title {
  height: 28px;
  width: 75%;
  margin: 12px 0 8px;
}

.detail-sk-price {
  height: 40px;
  width: 40%;
  margin-bottom: 12px;
}

.detail-sk-row {
  height: 16px;
  margin-bottom: 8px;
}

.detail-sk-row.s {
  width: 60%;
}

/* ── lightbox ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 4px;
  user-select: none;
}

.lb-close {
  position: absolute;
  top: 16px;
  right: 20px;
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.lb-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 3rem;
  line-height: 1;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  transition: background 0.15s;
  user-select: none;
}

.lb-nav:hover {
  background: rgba(255, 255, 255, 0.18);
}

.lb-nav.prev {
  left: 12px;
}

.lb-nav.next {
  right: 12px;
}

.lb-counter {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.82rem;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 14px;
  border-radius: 12px;
}

/* ── responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .detail-container {
    grid-template-columns: 1fr;
  }

  .gallery-wrap {
    position: static;
  }
}
@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 400;
    transform: translateX(-110%);
    transition: transform 0.25s ease;
    border-radius: 0;
    max-height: 100vh;
    width: min(var(--sidebar), 90vw);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .page-wrap {
    padding: 14px 10px;
  }

  .mobile-filter-btn {
    display: flex;
  }

  .toolbar {
    flex-wrap: wrap;
  }

  .spec-table {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .detail-keyspecs {
    grid-template-columns: 1fr 1fr;
  }

  .oprema-grid {
    grid-template-columns: 1fr;
  }

  .detail-h1 {
    font-size: 1.15rem;
  }

  .detail-price {
    font-size: 1.6rem;
  }
}
@media (max-width: 520px) {
  .vehicle-grid {
    grid-template-columns: 1fr;
  }
}