/* ═══════════════════════════════════════════════════════════════════════
 * AutoScout Pro · Public auction (Round 79 — Bootstrap 5)
 * Тонкі overrides поверх Bootstrap + кастомні acccents (orange #FF7A00).
 * Більшість компонентів — нативний Bootstrap (cards, navbar, grid, forms).
 * ═══════════════════════════════════════════════════════════════════════ */

:root {
  --as-accent: #ff7a00;
  --as-accent-2: #ff9930;
  --as-accent-soft: #fff5e8;
  --as-accent-grad: linear-gradient(135deg, #ff8c1f 0%, #ff6a00 100%);
  --bs-primary: #ff7a00;     /* override Bootstrap primary */
  --bs-primary-rgb: 255, 122, 0;
  --bs-link-color: #ff7a00;
  --bs-link-hover-color: #c95900;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Monaco, monospace;
}

html, body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif; }
body { background: #fafbfc; color: #1a1f2e; }

.font-monospace { font-family: var(--font-mono) !important; font-variant-numeric: tabular-nums; }
.accent-link { color: var(--as-accent) !important; }
.accent-link:hover { color: #c95900 !important; }
.text-accent { color: var(--as-accent); }
.bg-accent { background-color: var(--as-accent); }

/* SVG icon system */
.ic {
  display: inline-block;
  width: 1em; height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -2px;
  flex-shrink: 0;
}

/* ── Navbar ──────────────────────────────────────────────────────────── */
.pub-navbar { backdrop-filter: saturate(180%) blur(14px); background-color: rgba(255,255,255,0.92) !important; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--as-accent-grad);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 4px 14px rgba(255, 122, 0, 0.25);
}
.navbar .nav-link {
  font-weight: 500;
  color: #3f4757;
  letter-spacing: -0.005em;
}
.navbar .nav-link.active { color: #0a0d14; font-weight: 600; }

/* ── Hero ────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 80px 0 90px;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
}
.hero::before, .hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
  pointer-events: none;
}
.hero::before {
  width: 460px; height: 460px;
  background: radial-gradient(circle, rgba(255, 122, 0, 0.20), transparent 70%);
  top: -120px; left: -80px;
}
.hero::after {
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.18), transparent 70%);
  bottom: -200px; right: -100px;
}
.hero-inner { position: relative; z-index: 1; }
.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: -0.032em;
  line-height: 1.05;
}
.hero h1 .accent { color: var(--as-accent); }
.hero-sub {
  margin: 0 auto 38px;
  font-size: clamp(15px, 1.55vw, 19px);
  color: #525a6b;
  max-width: 680px;
}

.live-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.16);
  animation: pulse-dot 2.4s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(1.18); }
}

.hero-stat-value {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* ── Car cards ───────────────────────────────────────────────────────── */
.car-card {
  border: 1px solid rgba(10, 13, 20, 0.08);
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.4,0,0.2,1), box-shadow 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
  color: inherit;
  display: block;
  background: #fff;
}
.car-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(10, 13, 20, 0.08);
  border-color: rgba(10, 13, 20, 0.14);
  color: inherit;
}
.car-photo {
  position: relative;
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #f3f4f7 0%, #e8eaef 100%);
  overflow: hidden;
}
.car-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
}
.car-card:hover .car-photo img { transform: scale(1.04); }
.car-photo-empty {
  display: flex; align-items: center; justify-content: center;
  color: #b4bbc7;
  width: 100%; height: 100%;
  font-size: 40px;
}

/* Status pills (top-left overlay) */
.status-pills {
  position: absolute; top: 10px; left: 10px;
  display: flex; gap: 5px; flex-wrap: wrap;
  z-index: 2;
}
.status-pills .badge {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 4px 9px;
}
.badge-live { background-color: rgba(255,255,255,0.95) !important; color: #16a34a !important; backdrop-filter: blur(8px); }
.badge-live .dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #16a34a; margin-right: 4px;
                   animation: pulse-dot 1.8s ease-in-out infinite; }
.badge-new  { background-color: rgba(219,234,254,0.95) !important; color: #1d4ed8 !important; }
.badge-drop { background-color: rgba(254,243,199,0.95) !important; color: #ea580c !important; }
.badge-hot  { background-color: rgba(254,226,226,0.95) !important; color: #ef4444 !important; }
.badge-hot .dot { display:inline-block; width:5px; height:5px; border-radius:50%; background:#ef4444; margin-right:4px;
                  animation: pulse-dot 1.2s ease-in-out infinite; }
.badge-src-auto1 { background-color: rgba(29, 78, 216, 0.92) !important; color: #fff !important; }
.badge-src-vwfs  { background-color: rgba(22, 101, 52, 0.92) !important; color: #fff !important; }

/* AI score badge (top-right) */
.score-pill {
  position: absolute; top: 10px; right: 10px;
  z-index: 2;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  padding: 5px 10px;
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.score-pill.score-high { color: #16a34a; }
.score-pill.score-mid  { color: #ea580c; }
.score-pill.score-low  { color: #ef4444; }

/* Bottom countdown overlay */
.photo-time {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 22px 14px 12px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.65) 90%);
  color: #fff;
  display: flex; align-items: flex-end; justify-content: space-between;
  z-index: 2;
}
.photo-time .time-label {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
  font-weight: 600;
}
.photo-time .time-value {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
}
.photo-time .time-value.urgent { color: #ffb066; }
.photo-time .time-value.soon { color: #ffd560; }

.price-tag {
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: -0.018em;
}
.price-tag.drop { color: #ea580c; }

/* Spec rows у car card */
.car-spec {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px;
  color: #3f4757;
  min-width: 0;
}
.car-spec .ic { width: 13px; height: 13px; color: #6b7280; flex-shrink: 0; }
.car-spec b { font-weight: 500; color: #1a1f2e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* H-scroll для sections (Round 73 carry-over) */
.h-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
}
.h-scroll > .car-card {
  scroll-snap-align: start;
  flex: 0 0 280px;
}

/* ── Detail page ─────────────────────────────────────────────────────── */
.gallery-count {
  position: absolute;
  bottom: 12px; right: 12px;
  padding: 5px 11px;
  background: rgba(10, 13, 20, 0.72);
  backdrop-filter: blur(8px);
  color: #fff;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
}
.gallery-hero img { cursor: zoom-in; }
.gallery-thumb {
  width: 80px; height: 58px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease, border-color 0.15s ease;
  flex-shrink: 0;
}
.gallery-thumb:hover { transform: translateY(-2px); }
.gallery-thumb.active { border-color: var(--as-accent); }

/* Paint thickness table colors */
.paint-row-danger { background: linear-gradient(90deg, rgba(239, 68, 68, 0.05), transparent); }
.paint-row-warn   { background: linear-gradient(90deg, rgba(234, 88, 12, 0.05), transparent); }

.paint-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
}
.paint-pill .dot { width: 6px; height: 6px; border-radius: 50%; }
.paint-pill.ok { background: rgba(22, 163, 74, 0.10); color: #16a34a; }
.paint-pill.ok .dot { background: #16a34a; }
.paint-pill.warn { background: rgba(234, 88, 12, 0.10); color: #ea580c; }
.paint-pill.warn .dot { background: #ea580c; }
.paint-pill.danger { background: rgba(239, 68, 68, 0.10); color: #ef4444; }
.paint-pill.danger .dot { background: #ef4444; }

/* Damage photos grid (Round 74) */
.dmg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}
.dmg-photo {
  aspect-ratio: 4/3;
  background: #f5f6f8;
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
  border: 1px solid rgba(10,13,20,0.08);
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.dmg-photo:hover { transform: translateY(-2px); border-color: rgba(10,13,20,0.14); }
.dmg-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.dmg-photo:hover img { transform: scale(1.06); }

/* Highlight cards */
.highlight-card {
  background: #f5f6f8;
  border: 1px solid rgba(10,13,20,0.08);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.highlight-card:hover { transform: translateY(-2px); border-color: rgba(10,13,20,0.14); }
.hl-photo { aspect-ratio: 4/3; background: #ecedf0; overflow: hidden; }
.hl-photo img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; transition: transform 0.4s ease; }
.highlight-card:hover .hl-photo img { transform: scale(1.05); }

/* AI score big display у detail page */
.ai-score-big {
  font-family: var(--font-mono);
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* Countdown text variants на price card */
.countdown.urgent { color: var(--as-accent); animation: pulse-dot 1.4s ease-in-out infinite; }
.countdown.soon { color: #ea580c; }
.countdown.normal { color: #1a1f2e; }

/* Price-card sticky на desktop */
@media (min-width: 992px) {
  .price-card-sticky { position: sticky; top: 86px; }
}

/* Sidebar filters sticky на desktop */
@media (min-width: 992px) {
  .filters-sticky { position: sticky; top: 86px; max-height: calc(100vh - 110px); overflow-y: auto; }
}

/* Lightbox (Bootstrap modal-style, але кастомний бо хочемо click-out) */
.lightbox {
  position: fixed; inset: 0;
  z-index: 9999;
  background: rgba(10, 13, 20, 0.92);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  cursor: zoom-out;
}
.lightbox img {
  max-width: 100%; max-height: 92vh;
  border-radius: 12px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.5);
}
.lightbox-close {
  position: absolute; top: 20px; right: 20px;
  width: 42px; height: 42px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.16);
  color: #fff;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255,255,255,0.18); }

/* Footer accent link */
.pub-footer a:hover { color: var(--as-accent) !important; }

/* Card hover animations stagger (Round 73 carry-over) */
.cars-grid > [class*="col-"] { animation: card-fade-in 0.4s cubic-bezier(0.4,0,0.2,1) backwards; }
.cars-grid > [class*="col-"]:nth-child(1) { animation-delay: 0.02s; }
.cars-grid > [class*="col-"]:nth-child(2) { animation-delay: 0.04s; }
.cars-grid > [class*="col-"]:nth-child(3) { animation-delay: 0.06s; }
.cars-grid > [class*="col-"]:nth-child(4) { animation-delay: 0.08s; }
.cars-grid > [class*="col-"]:nth-child(5) { animation-delay: 0.10s; }
.cars-grid > [class*="col-"]:nth-child(6) { animation-delay: 0.12s; }
@keyframes card-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Round 79 override: outline-primary та btn-primary з orange */
.btn-primary {
  background-color: var(--as-accent);
  border-color: var(--as-accent);
}
.btn-primary:hover, .btn-primary:focus {
  background-color: #ea6c00;
  border-color: #ea6c00;
}
.btn-outline-primary {
  color: var(--as-accent);
  border-color: var(--as-accent);
}
.btn-outline-primary:hover {
  background-color: var(--as-accent);
  border-color: var(--as-accent);
  color: #fff;
}

/* Form-control focus з orange */
.form-control:focus, .form-select:focus, .form-check-input:focus {
  border-color: var(--as-accent);
  box-shadow: 0 0 0 0.2rem rgba(255, 122, 0, 0.18);
}
.form-check-input:checked {
  background-color: var(--as-accent);
  border-color: var(--as-accent);
}

/* Pagination з orange active */
.page-item.active .page-link {
  background-color: var(--as-accent);
  border-color: var(--as-accent);
}
.page-link {
  color: var(--as-accent);
}
.page-link:hover { color: #c95900; }


/* ── Round 105.2: source badges (повернено публічно за вимогою клієнта) ─── */
.badge-src-auto1     { background: rgba(229, 231, 235, 0.95) !important; color: #374151 !important; font-size: 10.5px !important; font-weight: 600 !important; }
.badge-src-vwfs      { background: rgba(26, 58, 107, 0.95)   !important; color: #fff !important;     font-size: 10.5px !important; font-weight: 600 !important; }
.badge-src-autobid   { background: rgba(124, 58, 237, 0.95)  !important; color: #fff !important;     font-size: 10.5px !important; font-weight: 600 !important; }
.badge-src-caronsale { background: rgba(234, 88, 12, 0.95)   !important; color: #fff !important;     font-size: 10.5px !important; font-weight: 600 !important; }
