/* ================================================================
   Avtoborsa.bg Enterprise v2.1 — Clean Design System
   Refactored: removed all duplicate !important overrides
   ================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

/* ── TOKENS ─────────────────────────────────────────────────── */
:root {
  --red:       #e8001e;
  --red-dark:  #b50018;
  --red-glow:  rgba(232,0,30,.08);
  --ink:       #0d0f12;
  --ink2:      #1a1d23;
  --ink3:      #242830;
  --ink4:      #2f343e;
  --mid:       #4b5261;
  --muted:     #7c8494;
  --subtle:    #b0b8c8;
  --border:    #e2e6ef;
  --surface:   #f5f7fb;
  --white:     #ffffff;
  --gold:      #f59e0b;
  --gold-bg:   #fefbf0;
  --blue:      #3b82f6;
  --blue-bg:   #eff6ff;
  --green:     #10b981;
  --green-bg:  #f0fdf4;
  --purple:    #8b5cf6;
  --purple-bg: #f5f3ff;
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  16px;
  --r-xl:  24px;
  --sh-sm: 0 1px 4px rgba(0,0,0,.06);
  --sh-md: 0 4px 16px rgba(0,0,0,.08);
  --sh-lg: 0 8px 32px rgba(0,0,0,.12);
  --sh-xl: 0 20px 60px rgba(0,0,0,.16);
  --ease:  cubic-bezier(.22,1,.36,1);
}

/* ── RESET ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 15px; -webkit-font-smoothing: antialiased; overflow-x: hidden; background: var(--ink); }
body { font-family: 'DM Sans', sans-serif; background: var(--surface); color: var(--ink); line-height: 1.6; overflow-x: hidden; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; }

/* ── LAYOUT ─────────────────────────────────────────────────── */
.container { max-width: 1320px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 960px; margin: 0 auto; padding: 0 24px; }
.container-xs { max-width: 520px; margin: 0 auto; padding: 0 24px; }

/* ── TOPBAR ──────────────────────────────────────────────────── */
.topbar { background: var(--ink); border-bottom: 1px solid var(--ink3); padding: 6px 0; font-size: 12px; color: var(--muted); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar a { color: var(--muted); transition: color .15s; }
.topbar a:hover { color: var(--white); }
.topbar-links { display: flex; gap: 20px; }
.topbar-right { display: flex; gap: 16px; align-items: center; }

/* ── NAVBAR ──────────────────────────────────────────────────── */
.nav { background: var(--white); position: sticky; top: 0; z-index: 200; border-bottom: 1px solid var(--border); box-shadow: var(--sh-sm); }
.nav-inner { display: flex; align-items: center; gap: 8px; height: 68px; }
.nav-logo { font-family: 'Syne', sans-serif; font-size: 24px; font-weight: 800; color: var(--ink); letter-spacing: -.5px; white-space: nowrap; margin-right: 8px; }
.nav-logo span { color: var(--red); }
.nav-brands { display: flex; gap: 2px; flex: 1; overflow: hidden; }
.nav-brand-btn { padding: 6px 12px; border-radius: var(--r-sm); font-size: 13px; font-weight: 500; color: var(--mid); background: none; border: none; white-space: nowrap; transition: .15s; }
.nav-brand-btn:hover { background: var(--surface); color: var(--ink); }
.nav-actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.nav-icon-btn { width: 40px; height: 40px; border-radius: var(--r-sm); border: 1.5px solid var(--border); background: none; display: flex; align-items: center; justify-content: center; font-size: 17px; color: var(--mid); position: relative; transition: .15s; }
.nav-icon-btn:hover { border-color: var(--red); color: var(--red); background: var(--red-glow); }
.nav-badge { position: absolute; top: -4px; right: -4px; background: var(--red); color: #fff; font-size: 10px; font-weight: 800; min-width: 16px; height: 16px; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0 3px; }
.btn-post { background: var(--red); color: #fff; padding: 0 18px; height: 40px; border-radius: var(--r-sm); font-size: 13px; font-weight: 700; white-space: nowrap; display: flex; align-items: center; transition: .15s; }
.btn-post:hover { background: var(--red-dark); transform: translateY(-1px); }

/* ── CATEGORIES BAR ──────────────────────────────────────────── */
.cats-bar { background: var(--white); border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.cats-bar::-webkit-scrollbar { display: none; }
.cats-inner { display: flex; gap: 0; padding: 0 16px; min-width: max-content; }
.cat-link { display: flex; align-items: center; gap: 6px; padding: 10px 16px; font-size: 13px; font-weight: 600; color: var(--mid); white-space: nowrap; border-bottom: 2px solid transparent; transition: .15s; }
.cat-link:hover { color: var(--red); }
.cat-link.active { color: var(--red); border-bottom-color: var(--red); font-weight: 700; }

/* ── HERO ────────────────────────────────────────────────────── */
.hero { position: relative; background: var(--ink); overflow: hidden; padding: 28px 0 36px; }
.hero-bg { position: absolute; inset: 0; background: radial-gradient(ellipse 80% 60% at 60% 50%, rgba(232,0,30,.12) 0%, transparent 70%); pointer-events: none; }
.hero-grid { position: absolute; inset: 0; background-image: linear-gradient(var(--ink3) 1px, transparent 1px), linear-gradient(90deg, var(--ink3) 1px, transparent 1px); background-size: 40px 40px; opacity: .3; pointer-events: none; }
.hero-inner { position: relative; z-index: 2; }
.hero-eyebrow { font-size: 12px; font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 16px; }
.hero h1 { font-family: 'Syne', sans-serif; font-size: clamp(32px,5vw,56px); font-weight: 800; color: var(--white); line-height: 1.1; margin-bottom: 16px; }
.hero h1 em { color: var(--red); font-style: normal; }
.hero-sub { font-size: 16px; color: var(--subtle); max-width: 520px; margin-bottom: 32px; }
.hero-stats { display: flex; gap: 32px; margin-top: 32px; flex-wrap: wrap; }
.hero-stat .num { font-family: 'Syne', sans-serif; font-size: 28px; font-weight: 800; color: var(--white); }
.hero-stat .lbl { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ── SEARCH PANEL ────────────────────────────────────────────── */
.search-panel { background: rgba(255,255,255,.97); backdrop-filter: blur(12px); border-radius: var(--r-xl); box-shadow: var(--sh-xl); padding: 20px; max-width: 740px; }
.search-tabs { display: grid; grid-template-columns: repeat(4,1fr); background: var(--surface); border-radius: 10px; padding: 4px; gap: 2px; margin-bottom: 16px; }
.search-tab { padding: 8px 4px; font-size: 12px; border: none; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 600; cursor: pointer; transition: .15s; text-align: center; }
.search-tab.active { background: var(--white); color: var(--ink); font-weight: 800; box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.sf label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; display: block; margin-bottom: 5px; }
.sf select, .sf input { width: 100%; height: 40px; border: 1.5px solid var(--border); border-radius: var(--r-sm); padding: 0 12px; font-size: 13px; color: var(--ink); background: var(--white); transition: .15s; }
.sf select:focus, .sf input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-glow); }
.btn-search { background: var(--red); color: #fff; border: none; border-radius: var(--r-sm); height: 50px; font-size: 16px; font-weight: 700; width: 100%; justify-content: center; display: flex; align-items: center; gap: 8px; transition: .15s; }
.btn-search:hover { background: var(--red-dark); transform: translateY(-1px); box-shadow: 0 4px 20px rgba(232,0,30,.35); }
.search-meta { font-size: 12px; color: var(--muted); }
.link-advanced { font-size: 12px; color: var(--red); font-weight: 600; }
.bchip { padding: 6px 14px; border: 1.5px solid var(--border); border-radius: 20px; font-size: 12px; font-weight: 600; color: var(--mid); background: rgba(255,255,255,.9); cursor: pointer; transition: .15s; white-space: nowrap; flex-shrink: 0; }
.bchip:hover, .bchip.active { border-color: var(--red); color: var(--red); background: var(--white); }
.qbtn { padding: 5px 11px; border: 1.5px solid var(--border); border-radius: 20px; font-size: 11px; font-weight: 600; color: var(--mid); background: var(--surface); cursor: pointer; transition: .15s; white-space: nowrap; }
.qbtn:hover { border-color: var(--red); color: var(--red); }

/* ── BRANDS STRIP ────────────────────────────────────────────── */
.brands-strip { background: var(--white); border-bottom: 1px solid var(--border); padding: 10px 0; overflow: hidden; }
.brands-strip-inner { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.brands-strip-inner::-webkit-scrollbar { display: none; }
.brand-chip { padding: 6px 14px; border: 1.5px solid var(--border); border-radius: 20px; font-size: 12px; font-weight: 600; color: var(--mid); transition: .15s; white-space: nowrap; }
.brand-chip:hover, .brand-chip.active { border-color: var(--red); color: var(--red); background: var(--red-glow); }

/* ── PAGE LAYOUT ─────────────────────────────────────────────── */
.page-layout { display: grid; grid-template-columns: 1fr; gap: 24px; padding: 24px 0; }
.sidebar { display: none; }

/* ── LISTINGS HEAD ───────────────────────────────────────────── */
.listings-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.listings-title { font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 800; }
.listings-count { font-size: 13px; color: var(--muted); margin-left: 8px; }
.sort-row { display: flex; align-items: center; gap: 8px; }
.sort-select { height: 36px; border: 1.5px solid var(--border); border-radius: var(--r-sm); padding: 0 12px; font-size: 13px; background: var(--white); }
.view-toggle { display: flex; gap: 4px; }
.view-btn { width: 34px; height: 34px; border: 1.5px solid var(--border); border-radius: var(--r-sm); background: var(--white); font-size: 16px; display: flex; align-items: center; justify-content: center; transition: .15s; }
.view-btn.active, .view-btn:hover { border-color: var(--red); color: var(--red); background: var(--red-glow); }

/* ── CAR CARD — LIST VIEW ────────────────────────────────────── */
.listings-stack { display: flex; flex-direction: column; gap: 12px; }
.car-card { display: grid; grid-template-columns: 280px 1fr 200px; background: var(--white); border: 1.5px solid var(--border); border-radius: var(--r-lg); overflow: hidden; transition: box-shadow .2s, border-color .2s, transform .2s; }
.car-card:hover { border-color: var(--red); box-shadow: var(--sh-md); transform: translateY(-2px); }

/* Promotion tiers */
.car-card.promo-vip { grid-template-columns: 320px 1fr 200px; border-color: var(--gold); background: linear-gradient(135deg,#fffbeb 0%,#fff 100%); }
.car-card.promo-premium { grid-template-columns: 320px 1fr 200px; border-color: var(--purple); background: linear-gradient(135deg,#faf5ff 0%,#fff 100%); }
.car-card.promo-top { grid-template-columns: 300px 1fr 200px; border-color: var(--blue); }

.car-img-wrap { position: relative; overflow: hidden; height: 200px; }
.car-card.promo-vip .car-img-wrap,
.car-card.promo-premium .car-img-wrap { height: 220px; }
.car-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.car-card:hover .car-img-wrap img { transform: scale(1.04); }
.img-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.3) 0%, transparent 50%); }
.img-count { position: absolute; bottom: 8px; left: 8px; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 4px; }
.promo-badge { position: absolute; top: 8px; left: 8px; font-size: 10px; font-weight: 800; padding: 3px 9px; border-radius: 4px; color: #fff; text-transform: uppercase; letter-spacing: .5px; z-index: 2; }
.promo-badge.vip { background: var(--gold); }
.promo-badge.premium { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.promo-badge.top { background: var(--blue); }
.promo-badge.none { display: none; }
.compare-check { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 6px; border: 1.5px solid rgba(255,255,255,.7); background: rgba(0,0,0,.4); color: #fff; font-size: 13px; display: flex; align-items: center; justify-content: center; transition: .15s; z-index: 2; }
.compare-check:hover, .compare-check.checked { background: var(--red); border-color: var(--red); }

.car-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.car-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.car-title { font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color .15s; }
.car-title:hover { color: var(--red); }
.car-specs { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.spec { display: inline-flex; align-items: center; gap: 3px; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; font-size: 11px; font-weight: 600; color: var(--mid); padding: 3px 8px; }
.spec-icon { font-size: 11px; }
.car-footer { margin-top: auto; }
.car-meta { display: flex; gap: 12px; font-size: 11px; color: var(--muted); flex-wrap: wrap; }

.car-side { border-left: 1px solid var(--border); padding: 16px; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.car-price-wrap { display: flex; flex-direction: column; gap: 3px; }
.car-price { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800; color: var(--red); line-height: 1.1; }
.car-card.promo-vip .car-price,
.car-card.promo-premium .car-price { font-size: 26px; }
.car-price-eur { font-size: 12px; color: var(--muted); font-weight: 500; }
.negotiable-tag { font-size: 11px; color: var(--green); font-weight: 600; }
.price-drop { font-size: 11px; color: var(--green); font-weight: 700; display: flex; align-items: center; gap: 4px; }
.ai-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: 10px; font-weight: 700; color: #fff; width: fit-content; margin-bottom: 6px; }
.side-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.btn-view { background: var(--ink); color: #fff; border: none; border-radius: var(--r-sm); height: 36px; font-size: 13px; font-weight: 700; padding: 0 16px; transition: .15s; display: flex; align-items: center; justify-content: center; }
.btn-view:hover { background: var(--red); }
.side-micro { display: flex; gap: 5px; }
.micro-btn { width: 34px; height: 34px; border: 1.5px solid var(--border); border-radius: var(--r-sm); background: none; font-size: 15px; display: flex; align-items: center; justify-content: center; transition: .15s; color: var(--mid); }
.micro-btn:hover { border-color: var(--red); color: var(--red); background: var(--red-glow); }

/* ── CAR CARD — COMPACT LIST (mobile.bg style) ───────────────── */
.car-card-compact { display: flex; background: var(--white); border-bottom: 1px solid var(--border); position: relative; color: var(--ink); transition: background .15s; }
.car-card-compact:hover { background: var(--surface); }
.car-card-compact:last-child { border-bottom: none; }
.cc-img { width: 130px; height: 98px; flex-shrink: 0; object-fit: cover; }
.cc-body { flex: 1; padding: 10px 12px; min-width: 0; }
.cc-title { font-size: 14px; font-weight: 700; line-height: 1.3; margin-bottom: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cc-price { font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 800; color: var(--red); line-height: 1.2; }
.cc-meta { font-size: 11px; color: var(--muted); margin-top: 3px; }
.cc-time { font-size: 10px; color: var(--muted); margin-top: 3px; }
.best-badge { position: absolute; top: 0; left: 0; background: var(--gold); color: #fff; font-size: 9px; font-weight: 800; padding: 3px 7px; border-radius: 0 0 6px 0; letter-spacing: .5px; z-index: 2; }

/* ── CAR CARD — GRID VIEW ────────────────────────────────────── */
.listings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 16px; }
.car-card-grid { background: var(--white); border: 1.5px solid var(--border); border-radius: var(--r-lg); overflow: hidden; transition: .2s; position: relative; }
.car-card-grid:hover { border-color: var(--red); box-shadow: var(--sh-md); transform: translateY(-2px); }
.car-card-grid .car-img-wrap { height: 170px; }
.car-card-grid .car-body { padding: 12px 14px; }
.car-card-grid .car-price { font-size: 20px; }

/* ── PAGINATION ──────────────────────────────────────────────── */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.page-link { width: 38px; height: 38px; border: 1.5px solid var(--border); border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; color: var(--mid); background: var(--white); transition: .15s; }
.page-link:hover, .page-link.active { border-color: var(--red); color: var(--white); background: var(--red); }
.page-link.dots { border: none; background: none; cursor: default; }

/* ── CATEGORY CARDS ──────────────────────────────────────────── */
.main-cat-card { display: flex; align-items: center; gap: 16px; background: linear-gradient(135deg, var(--red) 0%, #c0392b 100%); color: #fff; border-radius: var(--r-lg); padding: 20px 24px; box-shadow: 0 4px 20px rgba(232,0,30,.25); transition: .2s; }
.main-cat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(232,0,30,.35); }
.sub-cat-card { display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--white); border: 1.5px solid var(--border); border-radius: var(--r-lg); padding: 18px 8px; text-align: center; transition: .2s; box-shadow: var(--sh-sm); }
.sub-cat-card:hover { border-color: var(--red); background: var(--red-glow); transform: translateY(-2px); }

/* ── LISTING DETAIL PAGE ─────────────────────────────────────── */
.detail-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; padding: 24px 0 48px; align-items: start; }
.detail-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px; margin-bottom: 16px; }
.detail-card h3 { font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 800; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }

/* Gallery */
.gallery-main { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--ink); aspect-ratio: 16/9; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; background: rgba(0,0,0,.55); color: #fff; border: none; border-radius: 50%; font-size: 20px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: .2s; backdrop-filter: blur(4px); }
.gallery-nav:hover { background: var(--red); }
.gallery-nav.prev { left: 12px; }
.gallery-nav.next { right: 12px; }
.gallery-count { position: absolute; bottom: 12px; right: 12px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 20px; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px,1fr)); gap: 6px; margin-top: 10px; }
.gallery-thumb { height: 56px; border-radius: 6px; overflow: hidden; cursor: pointer; border: 2px solid transparent; transition: .15s; opacity: .75; }
.gallery-thumb:hover { opacity: 1; }
.gallery-thumb.active { border-color: var(--red); opacity: 1; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Spec grid */
.spec-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--border); border-radius: var(--r-md); overflow: hidden; }
.spec-item { background: var(--white); padding: 12px 14px; }
.spec-item .label { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 3px; }
.spec-item .value { font-size: 14px; font-weight: 700; color: var(--ink); }

/* Features */
.features-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.feature-chip { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 5px 12px; font-size: 12px; font-weight: 600; color: var(--mid); }

/* Contact card */
.contact-card { background: var(--ink); border-radius: var(--r-xl); padding: 24px; position: sticky; top: 88px; }
.contact-price-main { font-family: 'Syne', sans-serif; font-size: 32px; font-weight: 800; color: var(--white); line-height: 1.1; margin-bottom: 4px; }
.contact-price-eur { font-size: 14px; color: #6b7280; margin-bottom: 16px; }

/* AI Score */
.ai-score-bar { background: var(--ink3); border-radius: var(--r-md); padding: 14px; margin-bottom: 16px; }
.ai-score-label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 12px; color: #9ca3af; }
.ai-score-track { height: 6px; background: var(--ink4); border-radius: 3px; overflow: hidden; }
.ai-score-fill { height: 100%; border-radius: 3px; transition: width .6s var(--ease); }

/* Contact buttons */
.btn-call { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 50px; background: var(--green); color: #fff; border-radius: var(--r-sm); font-size: 15px; font-weight: 800; margin-bottom: 10px; transition: .2s; }
.btn-call:hover { background: #059669; transform: translateY(-1px); }
.btn-viber { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 44px; background: #7360f2; color: #fff; border-radius: var(--r-sm); font-size: 14px; font-weight: 700; margin-bottom: 10px; transition: .2s; }
.btn-viber:hover { background: #5b4bc4; }
.btn-whatsapp { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 44px; background: #25d366; color: #fff; border: none; border-radius: var(--r-sm); font-size: 14px; font-weight: 700; margin-bottom: 10px; transition: .2s; cursor: pointer; }
.btn-whatsapp:hover { background: #128c7e; }
.btn-phone { width: 100%; height: 44px; background: var(--ink3); color: var(--white); border: 1.5px solid var(--ink4); border-radius: var(--r-sm); font-size: 14px; font-weight: 700; margin-bottom: 10px; transition: .2s; }
.btn-phone:hover { border-color: var(--red); }
.btn-message { width: 100%; height: 44px; background: none; color: var(--white); border: 1.5px solid var(--ink4); border-radius: var(--r-sm); font-size: 14px; font-weight: 600; margin-bottom: 10px; transition: .2s; }
.btn-message:hover { border-color: var(--blue); color: var(--blue); }
.btn-fav-detail { width: 100%; height: 40px; background: none; color: #9ca3af; border: 1.5px solid var(--ink4); border-radius: var(--r-sm); font-size: 13px; font-weight: 600; margin-bottom: 10px; transition: .2s; }
.btn-fav-detail:hover, .btn-fav-detail.active { color: var(--red); border-color: var(--red); }

/* Seller block */
.seller-block { border-top: 1px solid var(--ink3); margin-top: 16px; padding-top: 16px; }
.seller-name { font-weight: 700; color: var(--white); font-size: 15px; margin-bottom: 4px; }
.seller-verified { font-size: 12px; color: var(--green); font-weight: 600; }
.seller-since { font-size: 12px; color: #6b7280; }
.seller-rating { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.stars { color: var(--gold); letter-spacing: 1px; }

/* Price history chart */
.ph-chart-wrap { margin-top: 12px; }
.ph-chart-svg { width: 100%; height: 80px; overflow: visible; }
.ph-line { fill: none; stroke: var(--red); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.ph-area { fill: url(#phGrad); opacity: .3; }
.ph-dot { fill: var(--red); stroke: var(--white); stroke-width: 2; cursor: pointer; transition: .2s; }
.ph-dot:hover { r: 6; }
.ph-label { font-size: 10px; fill: var(--muted); }
.ph-drop { color: var(--green); font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.ph-rise { color: var(--red); font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 4px; margin-top: 8px; }

/* Leasing calc */
.leasing-calc { background: var(--ink3); border-radius: var(--r-md); padding: 16px; margin-top: 12px; }
.leasing-calc h4 { color: var(--white); font-size: 13px; font-weight: 700; margin-bottom: 12px; }
.leasing-row { display: flex; gap: 8px; margin-bottom: 10px; }
.leasing-field { flex: 1; }
.leasing-field label { font-size: 10px; color: #9ca3af; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; display: block; margin-bottom: 4px; }
.leasing-field input, .leasing-field select { width: 100%; height: 36px; padding: 0 10px; background: var(--ink); border: 1px solid var(--ink4); border-radius: 6px; color: var(--white); font-size: 13px; }
.leasing-result { background: var(--red); border-radius: 8px; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.leasing-result .monthly { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800; color: #fff; }
.leasing-result .label { font-size: 11px; color: rgba(255,255,255,.7); }

/* Recently viewed */
.recently-viewed { padding: 32px 0; background: var(--white); border-top: 1px solid var(--border); }
.recently-viewed h2 { font-family: 'Syne', sans-serif; font-size: 20px; font-weight: 800; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.rv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 12px; }
.rv-card { border: 1.5px solid var(--border); border-radius: var(--r-md); overflow: hidden; transition: .2s; background: var(--white); }
.rv-card:hover { border-color: var(--red); transform: translateY(-2px); box-shadow: var(--sh-md); }
.rv-card img { width: 100%; height: 110px; object-fit: cover; }
.rv-card-body { padding: 10px 12px; }
.rv-card-title { font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.rv-card-price { font-family: 'Syne', sans-serif; font-size: 15px; font-weight: 800; color: var(--red); margin-top: 3px; }
.rv-card-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ── HERO SLIDER ─────────────────────────────────────────────── */
.hero-slider { height: 260px; position: relative; overflow: hidden; }
.hs-track { display: flex; flex-wrap: nowrap; height: 100%; }
.hs-slide { min-width: 100%; max-width: 100%; height: 100%; position: relative; flex-shrink: 0; overflow: hidden; background-size: cover; background-position: center; background-repeat: no-repeat; }
.hs-slide-inner { position: relative; z-index: 2; height: 100%; display: flex; align-items: center; }

/* ── FORMS ───────────────────────────────────────────────────── */
.form-wrap { max-width: 900px; margin: 32px auto; padding: 0 24px 48px; }
.form-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-md); }
.form-card-head { background: var(--ink); padding: 28px 32px; }
.form-card-head h2 { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800; color: var(--white); margin-bottom: 6px; }
.form-card-head p { font-size: 14px; color: #9ca3af; }
.form-card-body { padding: 32px; }
.form-section { margin-bottom: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.form-section:last-child { border-bottom: none; }
.form-section-title { font-family: 'Syne', sans-serif; font-size: 14px; font-weight: 800; color: var(--ink); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.form-grid { display: grid; gap: 14px; }
.form-grid.cols2 { grid-template-columns: 1fr 1fr; }
.form-grid.cols3 { grid-template-columns: 1fr 1fr 1fr; }
.form-grid.cols4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.fg label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; display: block; margin-bottom: 5px; }
.fg input, .fg select, .fg textarea { width: 100%; border: 1.5px solid var(--border); border-radius: var(--r-sm); padding: 10px 12px; font-size: 14px; color: var(--ink); background: var(--white); transition: .15s; }
.fg input:focus, .fg select:focus, .fg textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-glow); }
.fg textarea { resize: vertical; line-height: 1.6; }
.hint { font-size: 11px; color: var(--muted); margin-top: 5px; }
.btn-submit { background: var(--red); color: #fff; border: none; border-radius: var(--r-sm); height: 52px; padding: 0 32px; font-size: 16px; font-weight: 700; transition: .15s; }
.btn-submit:hover { background: var(--red-dark); transform: translateY(-1px); }

/* Upload zone */
.upload-zone { border: 2px dashed var(--border); border-radius: var(--r-lg); padding: 32px; text-align: center; cursor: pointer; transition: .2s; position: relative; overflow: hidden; }
.upload-zone:hover, .upload-zone.over { border-color: var(--red); background: var(--red-glow); }
.upload-zone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-icon { font-size: 40px; margin-bottom: 10px; }
.upload-text { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.upload-hint { font-size: 12px; color: var(--muted); }
.upload-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px,1fr)); gap: 8px; margin-top: 14px; }
.preview-item { position: relative; border-radius: var(--r-sm); overflow: hidden; aspect-ratio: 4/3; }
.preview-item img { width: 100%; height: 100%; object-fit: cover; }
.remove-btn { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; background: rgba(0,0,0,.7); color: #fff; border: none; border-radius: 50%; font-size: 11px; display: flex; align-items: center; justify-content: center; }
.primary-tag { position: absolute; bottom: 4px; left: 4px; background: var(--red); color: #fff; font-size: 9px; font-weight: 800; padding: 2px 6px; border-radius: 3px; text-transform: uppercase; }

/* Features checklist */
.features-check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 6px; }
.feat-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1.5px solid var(--border); border-radius: var(--r-sm); font-size: 13px; cursor: pointer; transition: .15s; }
.feat-item:hover { border-color: var(--red); background: var(--red-glow); }
.feat-item input:checked + span { color: var(--red); font-weight: 600; }
.feat-item:has(input:checked) { border-color: var(--red); background: var(--red-glow); }
.checkbox-item { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }

/* ── FILTER BOX ──────────────────────────────────────────────── */
.filter-box { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.filter-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.filter-head h3 { font-size: 14px; font-weight: 800; }
.filter-reset { font-size: 12px; color: var(--red); font-weight: 600; background: none; border: none; cursor: pointer; }
.filter-body { padding: 16px; }
.ff { margin-bottom: 14px; }
.ff label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; display: block; margin-bottom: 5px; }
.ff select, .ff input { width: 100%; height: 36px; border: 1.5px solid var(--border); border-radius: var(--r-sm); padding: 0 10px; font-size: 13px; }
.ff select:focus, .ff input:focus { outline: none; border-color: var(--red); }
.ff-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.checkboxes { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.btn-apply { width: 100%; height: 42px; background: var(--red); color: #fff; border: none; border-radius: var(--r-sm); font-size: 14px; font-weight: 700; margin-top: 14px; transition: .15s; }
.btn-apply:hover { background: var(--red-dark); }
.save-search-btn { width: 100%; height: 38px; background: none; color: var(--mid); border: 1.5px solid var(--border); border-radius: var(--r-sm); font-size: 13px; font-weight: 600; margin-top: 8px; transition: .15s; }
.save-search-btn:hover { border-color: var(--red); color: var(--red); }

/* ── COMPARE BAR ─────────────────────────────────────────────── */
.compare-bar { position: fixed; bottom: 0; left: 0; right: 0; background: var(--ink); border-top: 1px solid var(--ink3); padding: 12px 0; z-index: 300; transform: translateY(100%); transition: transform .3s var(--ease); }
.compare-bar.visible { transform: translateY(0); }
.compare-bar-inner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.compare-count { font-size: 13px; color: var(--white); font-weight: 700; white-space: nowrap; }
.compare-slots { display: flex; gap: 8px; }
.compare-slot { width: 44px; height: 44px; border: 1.5px solid var(--ink4); border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; }
.btn-compare { background: var(--red); color: #fff; border: none; border-radius: var(--r-sm); height: 40px; padding: 0 20px; font-size: 13px; font-weight: 700; white-space: nowrap; }

/* ── FOOTER ──────────────────────────────────────────────────── */
.footer { background: var(--ink); color: #9ca3af; padding: 56px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand .logo { font-family: 'Syne', sans-serif; font-size: 24px; font-weight: 800; color: var(--white); margin-bottom: 12px; }
.footer-brand .logo span { color: var(--red); }
.footer-brand p { font-size: 13px; line-height: 1.7; }
.footer-col h4 { font-size: 13px; font-weight: 700; color: var(--white); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 16px; }
.footer-col a { display: block; font-size: 13px; color: #6b7280; margin-bottom: 10px; transition: color .15s; }
.footer-col a:hover { color: var(--white); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 24px; border-top: 1px solid var(--ink3); font-size: 12px; color: #4b5261; flex-wrap: wrap; gap: 10px; }
.footer-badges { display: flex; gap: 10px; flex-wrap: wrap; }
.footer-badge { background: var(--ink3); border: 1px solid var(--ink4); border-radius: 4px; padding: 4px 10px; font-size: 11px; color: #6b7280; }

/* ── ALERTS / FLASH ──────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: var(--r-sm); margin-bottom: 14px; font-size: 14px; font-weight: 500; }
.alert-success { background: var(--green-bg); color: #065f46; border: 1px solid #6ee7b7; }
.alert-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-info    { background: var(--blue-bg); color: #1e40af; border: 1px solid #bfdbfe; }
.alert-warning { background: var(--gold-bg); color: #92400e; border: 1px solid #fde68a; }

/* ── AUTH ────────────────────────────────────────────────────── */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--ink); padding: 24px; }
.auth-card { background: var(--white); border-radius: var(--r-xl); padding: 36px 40px; max-width: 440px; width: 100%; box-shadow: var(--sh-xl); }
.auth-logo-text { font-family: 'Syne', sans-serif; font-size: 30px; font-weight: 800; color: var(--ink); text-align: center; margin-bottom: 4px; }
.auth-logo-text span { color: var(--red); }
.auth-sub { text-align: center; font-size: 14px; color: var(--muted); margin-bottom: 28px; }

/* ── DASHBOARD ───────────────────────────────────────────────── */
.dashboard-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.kpi-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; margin-bottom: 20px; }
.kpi-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; }
.kpi-val { font-family: 'Syne', sans-serif; font-size: 28px; font-weight: 800; color: var(--ink); }
.kpi-label { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ── ADMIN ───────────────────────────────────────────────────── */
.admin-wrap { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.admin-nav { background: var(--ink); padding: 24px 0; }
.admin-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 20px; font-size: 13px; color: #9ca3af; transition: .15s; }
.admin-nav a:hover, .admin-nav a.active { background: var(--ink3); color: var(--white); }
.admin-content { padding: 28px; background: var(--surface); }
.admin-title { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800; margin-bottom: 24px; }

/* ── PILLS / BADGES ──────────────────────────────────────────── */
.pill { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.pill-active  { background: var(--green-bg); color: var(--green); }
.pill-pending { background: var(--gold-bg); color: #92400e; }
.pill-premium { background: var(--purple-bg); color: var(--purple); }

/* ── UTILITIES ───────────────────────────────────────────────── */
.hidden { display: none !important; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.mb-16 { margin-bottom: 16px; }
.gap-8 { gap: 8px; }
.text-red { color: var(--red); }
.text-muted { color: var(--muted); }
.text-center { text-align: center; }

/* ── DROPDOWN MENU ───────────────────────────────────────────── */
#userMenu:not(.hidden) { display: block; }
#userMenu a:hover { background: var(--surface); border-radius: var(--r-sm); }

/* ── AI CHAT ─────────────────────────────────────────────────── */
.ai-chat-btn { position: fixed; bottom: 24px; right: 20px; width: 56px; height: 56px; background: linear-gradient(135deg,#7c3aed,#5b21b6); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; box-shadow: 0 4px 20px rgba(124,58,237,.4); cursor: pointer; z-index: 1000; transition: .2s; border: none; }
.ai-chat-btn:hover { transform: scale(1.1); }
.ai-chat-panel { position: fixed; bottom: 90px; right: 20px; width: 320px; max-height: 480px; background: var(--white); border-radius: 20px; box-shadow: var(--sh-xl); z-index: 1001; display: none; flex-direction: column; overflow: hidden; border: 1.5px solid var(--border); }
.ai-chat-panel.open { display: flex; }
.ai-chat-head { background: linear-gradient(135deg,#7c3aed,#5b21b6); padding: 14px 16px; color: #fff; display: flex; justify-content: space-between; align-items: center; }
.ai-chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.ai-msg { padding: 10px 14px; border-radius: 12px; font-size: 13px; line-height: 1.5; max-width: 90%; }
.ai-msg.bot { background: var(--surface); color: var(--ink); align-self: flex-start; border-radius: 4px 12px 12px 12px; }
.ai-msg.user { background: #7c3aed; color: #fff; align-self: flex-end; border-radius: 12px 4px 12px 12px; }
.ai-chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.ai-chat-input input { flex: 1; border: 1.5px solid var(--border); border-radius: 20px; padding: 8px 14px; font-size: 13px; outline: none; }
.ai-chat-input input:focus { border-color: #7c3aed; }
.ai-chat-input button { background: #7c3aed; color: #fff; border: none; border-radius: 50%; width: 36px; height: 36px; cursor: pointer; font-size: 16px; }

/* ── PRICING SECTION ─────────────────────────────────────────── */
.promo-section { padding: 56px 0; background: var(--ink); }
.promo-section h2 { font-family: 'Syne', sans-serif; font-size: 28px; font-weight: 800; color: var(--white); text-align: center; margin-bottom: 8px; }
.promo-section .sub { text-align: center; color: #9ca3af; margin-bottom: 36px; }
.promo-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.promo-card { background: var(--ink3); border: 1px solid var(--ink4); border-radius: var(--r-xl); padding: 28px; position: relative; }
.promo-card.featured { background: var(--red); border-color: var(--red); }
.popular-tag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--gold); color: var(--ink); font-size: 11px; font-weight: 800; padding: 4px 14px; border-radius: 20px; white-space: nowrap; }
.plan-name { font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 800; color: var(--white); margin-bottom: 10px; }
.plan-price { font-family: 'Syne', sans-serif; font-size: 36px; font-weight: 800; color: var(--white); margin-bottom: 20px; }
.plan-price sup { font-size: 16px; vertical-align: top; margin-top: 8px; display: inline-block; }
.plan-price sub { font-size: 14px; font-weight: 400; color: rgba(255,255,255,.6); }
.promo-card ul { list-style: none; margin-bottom: 24px; }
.promo-card ul li { font-size: 13px; color: rgba(255,255,255,.8); padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: 8px; }
.promo-card ul li::before { content: '✓'; color: var(--green); font-weight: 800; }
.promo-card ul li.no::before { content: '✗'; color: #6b7280; }
.promo-card ul li.no { color: #4b5261; }
.btn-plan { width: 100%; height: 44px; border-radius: var(--r-sm); font-size: 14px; font-weight: 700; transition: .15s; }
.btn-plan-primary { background: var(--white); color: var(--red); border: none; }
.btn-plan-outline { background: none; color: var(--white); border: 1.5px solid rgba(255,255,255,.3); }
.btn-plan-outline:hover { border-color: var(--white); }

/* ── PWA / PUSH ──────────────────────────────────────────────── */
#pushPromptBar { display: none; position: fixed; bottom: 80px; left: 16px; right: 16px; max-width: 400px; margin: 0 auto; background: var(--ink); border: 1px solid var(--ink3); border-radius: var(--r-lg); padding: 16px; z-index: 900; box-shadow: var(--sh-xl); align-items: center; gap: 12px; }

/* ── ANIMATIONS ──────────────────────────────────────────────── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.fade-up   { animation: fadeUp .5s var(--ease) both; }
.fade-up-2 { animation: fadeUp .5s .1s var(--ease) both; }
.fade-up-3 { animation: fadeUp .5s .2s var(--ease) both; }
.fade-up-4 { animation: fadeUp .5s .3s var(--ease) both; }
.valuation-result { animation: fadeUp .4s var(--ease) both; }

/* ── MAP / VALUATION / MISC ──────────────────────────────────── */
.map-filters { font-family: 'DM Sans', sans-serif; }
.promo-badge.barter { background: #7c3aed; }
#stripe-card-element { min-height: 44px; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (min-width: 600px) {
  .hero-slider { height: 380px; }
  .kpi-grid { grid-template-columns: repeat(4,1fr); }
}
@media (min-width: 900px) {
  .hero-slider { height: 480px; }
  .page-layout { grid-template-columns: 260px 1fr; }
  .sidebar { display: block; }
}
@media (min-width: 1024px) {
  .form-grid.cols2 { grid-template-columns: 1fr 1fr; }
  .form-grid.cols3 { grid-template-columns: 1fr 1fr 1fr; }
  .form-grid.cols4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
}

@media (max-width: 1023px) {
  .detail-layout { grid-template-columns: 1fr; }
  .contact-card { position: static; }
  .spec-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .promo-cards { grid-template-columns: 1fr; gap: 16px; }
  .admin-wrap { grid-template-columns: 1fr; }
  .admin-nav { display: none; }
}
@media (max-width: 768px) {
  .container { padding: 0 14px; }
  .topbar { display: none; }
  .nav-brands { display: none; }
  .nav-inner { height: 60px; }
  .car-card { grid-template-columns: 1fr; }
  .car-img-wrap { height: 200px; }
  .car-side { border-left: none; border-top: 1px solid var(--border); flex-direction: row; align-items: center; justify-content: space-between; padding: 12px 14px; }
  .car-price { font-size: 20px; }
  .side-actions { flex-direction: row; width: auto; margin-top: 0; }
  .car-card.promo-vip, .car-card.promo-premium, .car-card.promo-top { grid-template-columns: 1fr; }
  .hero { padding: 28px 0 36px; }
  .hero h1 { font-size: 28px; }
  .hero-stats { gap: 16px; }
  .search-panel { border-radius: var(--r-lg); }
  .listings-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  table { display: block; overflow-x: auto; width: 100%; }
  .ai-chat-panel { width: calc(100vw - 32px); right: 16px; }
  .auth-card { padding: 24px 16px; }
}
@media (max-width: 480px) {
  .listings-grid { grid-template-columns: 1fr; }
  .spec-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 24px; }
  .kpi-grid { grid-template-columns: 1fr; }
  .car-card-compact .cc-img { width: 110px; height: 84px; }
}

/* ── FULL-WIDTH LOGO + ACTION BAR ───────────────────────────── */
.nav-top { border-bottom: 1px solid var(--border); background: var(--white); }
.nav-top .container { padding-top: 10px; padding-bottom: 0; }
.nav-logo-full {
  display: block;
  font-family: 'Syne', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -1px;
  line-height: 1;
  padding: 4px 0 8px;
  width: auto;
}
.nav-logo-full span { color: var(--red); }

/* Action bar — icon buttons row */
.nav-action-bar {
  display: flex;
  align-items: stretch;
  gap: 2px;
  border-top: 1px solid var(--border);
  margin: 0 -14px;
  padding: 0 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-action-bar::-webkit-scrollbar { display: none; }

.nab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 12px;
  border-radius: 0;
  color: var(--mid);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  position: relative;
  transition: color .15s, background .15s;
  text-decoration: none;
  flex-shrink: 0;
}
.nab-btn:hover { color: var(--red); background: var(--red-glow); }
.nab-btn.nab-active { color: var(--red); }
.nab-icon { font-size: 20px; line-height: 1; }
.nab-label { font-size: 10px; font-weight: 600; color: inherit; }
.nab-badge {
  position: absolute;
  top: 4px; right: 6px;
  background: var(--red);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  min-width: 15px;
  height: 15px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}
.nab-post {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 6px 16px;
  background: var(--red);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  white-space: nowrap;
  align-self: center;
  flex-shrink: 0;
  transition: .15s;
}
.nab-post:hover { background: var(--red-dark); }

/* ── GALLERY UPGRADE ─────────────────────────────────────────── */
.gallery-main {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--ink);
  aspect-ratio: 16/9;
  cursor: zoom-in;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; transition: opacity .15s ease; }
.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
  gap: 6px;
  margin-top: 8px;
}
.gallery-thumb {
  height: 54px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: .15s;
  opacity: .65;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb:hover { opacity: 1; border-color: var(--muted); }
.gallery-thumb.active { opacity: 1; border-color: var(--red); }
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px; height: 42px;
  background: rgba(0,0,0,.5);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: .2s;
  backdrop-filter: blur(4px);
  z-index: 3;
}
.gallery-nav:hover { background: var(--red); transform: translateY(-50%) scale(1.1); }
.gallery-nav.prev { left: 12px; }
.gallery-nav.next { right: 12px; }
.gallery-count {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  z-index: 3;
}

/* Lightbox */
#lightbox { animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
#lbImg { box-shadow: 0 8px 40px rgba(0,0,0,.6); }

/* Detail breadcrumb */
.detail-wrap { max-width: 1320px; margin: 0 auto; padding: 0 24px; }
.detail-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 0;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
}
.detail-breadcrumb a { color: var(--mid); transition: color .15s; }
.detail-breadcrumb a:hover { color: var(--red); }

/* ── SPEC TABLE — compact modern ────────────────────────────── */
.spec-table { display: flex; flex-direction: column; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--border); }
.st-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; border-bottom: 1px solid var(--border); font-size: 13px; transition: background .15s; }
.st-row:last-child { border-bottom: none; }
.st-row:nth-child(even) { background: var(--surface); }
.st-row:hover { background: var(--red-glow); }
.st-label { color: var(--muted); font-weight: 500; flex-shrink: 0; margin-right: 12px; }
.st-value { font-weight: 700; color: var(--ink); text-align: right; }
.st-yes { color: var(--green); }

/* ── POST.PHP MOBILE FIXES ───────────────────────────────────── */
@media (max-width: 768px) {
  .form-grid.cols2 { grid-template-columns: 1fr 1fr; }
  .form-grid.cols3 { grid-template-columns: 1fr 1fr; }
  .form-grid.cols4 { grid-template-columns: 1fr 1fr; }
  .form-wrap { padding: 0 0 48px; }
  .form-card { border-radius: 0; border-left: none; border-right: none; }
  .form-card-body { padding: 20px 16px; }
  .form-card-head { padding: 20px 16px; }
  .fg input, .fg select, .fg textarea { font-size: 16px; }
  .features-check-grid { grid-template-columns: 1fr 1fr; }
  .feat-item { font-size: 12px; padding: 8px; }
}
@media (max-width: 480px) {
  .form-grid.cols3 { grid-template-columns: 1fr 1fr; }
  .form-grid.cols4 { grid-template-columns: 1fr 1fr; }
}

/* ── UPLOAD ZONE iOS FIX ─────────────────────────────────────── */
.upload-zone-wrap {
  position: relative;
  border: 2px dashed var(--red);
  border-radius: var(--r-lg);
  background: var(--red-glow);
  padding: 32px 20px;
  text-align: center;
  overflow: hidden;
}
.upload-zone-visual .upload-icon { font-size: 40px; margin-bottom: 10px; }
.upload-zone-visual .upload-text { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.upload-zone-visual .upload-hint { font-size: 12px; color: var(--muted); }

/* ── USERMENU OVERFLOW FIX ───────────────────────────────────── */
.nav-action-bar { overflow: visible !important; }
.nav-top { overflow: visible !important; }
#userMenuWrap { position: relative !important; }
#userMenu {
  position: absolute !important;
  top: calc(100% + 4px) !important;
  right: 0 !important;
  z-index: 9999 !important;
}

/* ── USERMENU MOBILE FIX ─────────────────────────────────────── */
#userMenu {
  min-width: 220px !important;
}
#userMenu .umenu-link {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 10px 14px !important;
  font-size: 14px !important;
  color: var(--mid) !important;
  border-radius: var(--r-sm) !important;
  white-space: nowrap !important;
}
#userMenu .umenu-link:hover { background: var(--surface) !important; color: var(--ink) !important; }

/* ── LISTING GALLERY OVERFLOW FIX ───────────────────────────── */
.gallery-wrap { overflow: hidden; border-radius: var(--r-lg); }
.detail-wrap { overflow-x: hidden; }

/* ── NAB-POST OVERFLOW FIX ───────────────────────────────────── */
.nab-post {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  font-size: 12px !important;
  padding: 6px 12px !important;
}
.nav-action-bar {
  padding-right: 0 !important;
}

/* ── NAB MOBILE COMPACT ──────────────────────────────────────── */
@media (max-width: 480px) {
  .nab-label { display: none !important; }
  .nab-btn { padding: 6px 8px !important; min-width: 40px !important; }
  .nab-icon { font-size: 22px !important; }
  .nab-post { font-size: 12px !important; padding: 7px 10px !important; gap: 4px !important; }
  .nab-post span { font-size: 16px !important; }
  .nav-logo-full { font-size: 28px !important; }
  .nav-action-bar { gap: 0 !important; }
}
@media (max-width: 380px) {
  .nab-post { padding: 7px 8px !important; }
}

/* ── NAB FINAL FIX ───────────────────────────────────────────── */
@media (max-width: 500px) {
  .nav-top .container { padding: 0 10px !important; }
  .nav-action-bar { margin: 0 -10px !important; padding: 0 10px !important; }
  .nab-post { font-size: 11px !important; padding: 7px 8px !important; border-radius: 6px !important; }
  .nab-btn { padding: 6px 6px !important; }
}

/* ── USERMENU FINAL FIX ──────────────────────────────────────── */
#userMenu {
  position: fixed !important;
  top: 110px !important;
  right: 8px !important;
  left: auto !important;
  z-index: 99999 !important;
}

/* ── HERO SLIDER IMAGE FIX ───────────────────────────────────── */
.hs-slide {
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  min-height: 260px !important;
}
.hs-track {
  transition: transform .5s cubic-bezier(.22,1,.36,1) !important;
}
.hs-nav {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 44px !important;
  height: 44px !important;
  background: rgba(0,0,0,.5) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 50% !important;
  font-size: 24px !important;
  cursor: pointer !important;
  z-index: 10 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.hs-prev { left: 12px !important; }
.hs-next { right: 12px !important; }
.hs-dots {
  position: absolute !important;
  bottom: 12px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  display: flex !important;
  gap: 6px !important;
  z-index: 10 !important;
}
.hs-dot {
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,.5) !important;
  border: none !important;
  cursor: pointer !important;
  transition: .2s !important;
}
.hs-dot.active { background: #fff !important; width: 24px !important; border-radius: 4px !important; }
.hs-counter {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  background: rgba(0,0,0,.5) !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  padding: 4px 10px !important;
  border-radius: 20px !important;
  z-index: 10 !important;
}
@media(min-width: 600px) { .hs-slide { min-height: 380px !important; } }
@media(min-width: 900px) { .hs-slide { min-height: 480px !important; } }

/* ── HERO SLIDER TRACK FIX ───────────────────────────────────── */
.hero-slider {
  position: relative !important;
  overflow: hidden !important;
  width: 100% !important;
}
.hs-track {
  display: flex !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
  height: 100% !important;
  transition: transform .5s cubic-bezier(.22,1,.36,1) !important;
}
.hs-slide {
  flex: 0 0 100% !important;
  min-width: 100% !important;
  width: 100% !important;
  position: relative !important;
  overflow: hidden !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

/* ── SLIDER DEFINITIVE FIX ───────────────────────────────────── */
#heroSlider {
  position: relative !important;
  overflow: hidden !important;
  width: 100% !important;
}
#hsTrack {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  will-change: transform !important;
  transition: transform 0.5s ease !important;
}
#hsTrack .hs-slide {
  flex: 0 0 100vw !important;
  width: 100vw !important;
  max-width: 100vw !important;
  min-height: 260px !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  position: relative !important;
}
@media(min-width:600px) { #hsTrack .hs-slide { min-height: 380px !important; } }
@media(min-width:900px) { #hsTrack .hs-slide { min-height: 480px !important; } }

/* ── ADMIN MOBILE FIX ────────────────────────────────────────── */
@media (max-width: 768px) {
  .admin-wrap { grid-template-columns: 1fr !important; }
  .kpi-grid { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
  .kpi-card { padding: 14px !important; }
  .kpi-val, .kpi-num { font-size: 22px !important; }
  .admin-content { padding: 0 !important; }
  .admin-page-title { padding: 12px 14px !important; font-size: 16px !important; }
}

/* ── COMPACT CARD UPGRADE ────────────────────────────────────── */
.car-card-compact {
  display: grid !important;
  grid-template-columns: 140px 1fr !important;
  background: var(--white) !important;
  border-bottom: 1px solid var(--border) !important;
  position: relative !important;
  color: var(--ink) !important;
  transition: background .15s !important;
  text-decoration: none !important;
  min-height: 110px !important;
}
.car-card-compact:hover { background: var(--surface) !important; }
.car-card-compact:last-child { border-bottom: none !important; }
.cc-img {
  width: 140px !important;
  height: 110px !important;
  object-fit: cover !important;
  flex-shrink: 0 !important;
}
.cc-body {
  padding: 10px 12px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  min-width: 0 !important;
}
.cc-title {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--ink) !important;
  line-height: 1.3 !important;
  margin-bottom: 4px !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}
.cc-price {
  font-family: 'Syne', sans-serif !important;
  font-size: 17px !important;
  font-weight: 800 !important;
  color: var(--red) !important;
  line-height: 1.2 !important;
}
.cc-meta {
  font-size: 11px !important;
  color: var(--muted) !important;
  margin-top: 3px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.cc-time { font-size: 10px !important; color: var(--subtle) !important; margin-top: 2px !important; }
.best-badge {
  position: absolute !important;
  top: 0 !important; left: 0 !important;
  font-size: 9px !important;
  font-weight: 800 !important;
  padding: 3px 8px !important;
  border-radius: 0 0 6px 0 !important;
  color: #fff !important;
  z-index: 2 !important;
  text-transform: uppercase !important;
  letter-spacing: .3px !important;
}
.best-badge.vip { background: var(--gold) !important; }
.best-badge.premium { background: var(--purple) !important; }
.best-badge.top { background: var(--blue) !important; }

/* ── ADMIN TOPBAR OVERFLOW FIX ───────────────────────────────── */
.admin-content > div:first-child {
  overflow-x: auto !important;
  scrollbar-width: none !important;
}
.admin-content > div:first-child::-webkit-scrollbar { display: none !important; }

/* ── ADMIN TABLE SCROLL FIX ──────────────────────────────────── */
@media (max-width: 768px) {
  .admin-content table { display: block !important; overflow-x: auto !important; white-space: nowrap !important; width: 100% !important; }
  .admin-content .detail-card { overflow-x: auto !important; }
  .kpi-grid { grid-template-columns: 1fr 1fr !important; }
  .admin-content > div:first-child { overflow-x: scroll !important; -webkit-overflow-scrolling: touch !important; }
}

/* ── ADMIN DASHBOARD FINAL FIX ───────────────────────────────── */
@media (max-width: 900px) {
  .kpi-grid { grid-template-columns: 1fr !important; }
  .admin-content > div[style*="grid-template-columns:1fr 1fr"] { 
    grid-template-columns: 1fr !important; 
  }
  .detail-card[style*="grid"] { grid-template-columns: 1fr !important; }
}

/* ── ADMIN TOPBAR SCROLL ─────────────────────────────────────── */
.admin-content > main > div:first-child,
.admin-content > div:first-child {
  overflow-x: auto !important;
  flex-wrap: nowrap !important;
  scrollbar-width: none !important;
  -webkit-overflow-scrolling: touch !important;
}

/* ── ADMIN BRANDS CHART FIX ──────────────────────────────────── */
.admin-content .detail-card { overflow: hidden !important; }
.admin-content .detail-card > div { max-width: 100% !important; }

/* ── ADMIN RECENT LISTINGS TABLE ─────────────────────────────── */
@media (max-width: 768px) {
  .admin-table th:nth-child(2),
  .admin-table td:nth-child(2) { display: none !important; }
  .admin-table th:nth-child(5),
  .admin-table td:nth-child(5) { display: none !important; }
  .admin-table { font-size: 11px !important; }
  .admin-table td, .admin-table th { padding: 6px 4px !important; }
}

/* ── MOBILE FILTER BUTTON ────────────────────────────────────── */
@media (max-width: 767px) {
  #mobileFilterBtn { display: block !important; }
  #mobileFilterDrawer { display: none !important; }
  #mobileFilterDrawer.open { display: block !important; }
}

/* ── MOBILE LOGO FULL WIDTH ──────────────────────────────────── */
@media (max-width: 767px) {
  .nav-top .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
  }
  .nav-logo-full {
    text-align: center;
    padding: 10px 0 8px !important;
    font-size: clamp(36px, 10vw, 52px) !important;
    border-bottom: 1px solid var(--border);
  }
}

/* ── MOBILE LOGO SIZE FIX ──────────────────────────────────── */
@media (max-width: 767px) {
  .nav-logo-full {
    font-size: 42px !important;
  }
}

/* ── MOBILE LOGO SIZE FIX 2 ────────────────────────────────── */
@media (max-width: 767px) {
  .nav-logo-full {
    font-size: 32px !important;
  }
}

/* ── DESKTOP FIXES ───────────────────────────────────────────── */
@media (min-width: 768px) {
  .hero { padding: 32px 0 40px !important; }
  .search-panel { max-width: 600px !important; }
  .hero h1 { font-size: 36px !important; }
  .hero-sub { font-size: 15px !important; }
  .nav-logo-full { font-size: 28px !important; width: auto !important; }
}
@media (min-width: 1024px) {
  .hero { padding: 40px 0 48px !important; }
  .hero h1 { font-size: 42px !important; }
}

/* ── DESKTOP HERO LAYOUT ─────────────────────────────────────── */
@media (min-width: 900px) {
  .hero { padding: 40px 0 48px !important; }
  .hero-inner { max-width: 760px !important; margin: 0 auto !important; }
  .search-panel { max-width: 100% !important; width: 100% !important; }
  .hero h1 { font-size: 40px !important; }
}

/* ── SLIDER FULL WIDTH ───────────────────────────────────────── */
#hs { width: 100% !important; margin: 0 !important; }
#hs img { width: 100% !important; height: 380px !important; object-fit: cover !important; }

/* ── SEARCH PANEL DESKTOP FULL WIDTH ────────────────────────── */
@media (min-width: 900px) {
  .hero { padding: 40px 0 48px !important; }
  .hero-inner { max-width: 900px !important; margin: 0 auto !important; }
  .search-panel { max-width: 100% !important; width: 100% !important; }
  .hero h1 { font-size: 40px !important; }
}

/* ── CATEGORIES DESKTOP ──────────────────────────────────────── */
@media (min-width: 768px) {
  .cats-desktop-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 12px !important;
  }
  .cats-desktop-grid .main-cat-card {
    grid-column: 1 / -1 !important;
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    padding: 20px 24px !important;
    border-radius: 12px !important;
    background: var(--red) !important;
    color: #fff !important;
    text-decoration: none !important;
    margin-bottom: 0 !important;
  }
  .cats-desktop-grid .sub-cat-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px 12px !important;
    border: 1.5px solid var(--border) !important;
    border-radius: 12px !important;
    text-decoration: none !important;
    color: var(--ink) !important;
    transition: .15s !important;
    background: var(--white) !important;
    min-height: 100px !important;
  }
  .cats-desktop-grid .sub-cat-card:hover {
    border-color: var(--red) !important;
    box-shadow: 0 4px 12px rgba(232,0,30,.1) !important;
    transform: translateY(-2px) !important;
  }
}

/* ── HIDE HERO ON DESKTOP, SHOW SEARCH BELOW SLIDER ─────────── */
@media (min-width: 768px) {
  .hero-bg, .hero-grid, .hero-eyebrow, .hero-sub, .hero h1, .hero-stats { 
    display: none !important; 
  }
  .hero {
    background: transparent !important;
    padding: 0 !important;
  }
  .hero-inner {
    max-width: 1000px !important;
    margin: 0 auto !important;
    padding: 32px 24px !important;
  }
  .search-panel {
    max-width: 100% !important;
    width: 100% !important;
    box-shadow: 0 4px 24px rgba(0,0,0,.12) !important;
    border: 1.5px solid var(--border) !important;
  }
}

/* ── CATEGORIES DESKTOP GRID ─────────────────────────────────── */
@media (min-width: 768px) {
  .cats-desktop-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 10px !important;
    margin-top: 10px !important;
  }
  .sub-cat-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 14px 16px !important;
    border: 1.5px solid var(--border) !important;
    border-radius: 10px !important;
    background: var(--white) !important;
    color: var(--ink) !important;
    text-decoration: none !important;
    transition: .15s !important;
    font-size: 14px !important;
    font-weight: 700 !important;
  }
  .sub-cat-card:hover {
    border-color: var(--red) !important;
    color: var(--red) !important;
    box-shadow: 0 2px 8px rgba(232,0,30,.1) !important;
  }
  .sub-cat-card span:first-child { font-size: 24px !important; flex-shrink: 0; }
  .main-cat-card {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    padding: 16px 20px !important;
    background: var(--red) !important;
    border-radius: 10px !important;
    color: #fff !important;
    text-decoration: none !important;
    margin-bottom: 10px !important;
  }
  .main-cat-card span:first-child { font-size: 32px !important; }
  .main-cat-card div:last-child div:first-child { font-size: 18px !important; font-weight: 800 !important; }
  .main-cat-card div:last-child div:last-child { font-size: 13px !important; opacity: .85; }
}

/* ── SLIDER FULL HEIGHT DESKTOP ──────────────────────────────── */
@media (min-width: 768px) {
  #hs img { height: auto !important; max-height: 600px !important; }
  #hs .hs-slide img { height: auto !important; max-height: 600px !important; }
}

/* ── SLIDER CORRECT ASPECT RATIO ────────────────────────────── */
@media (min-width: 768px) {
  #hs { aspect-ratio: 3/1 !important; height: auto !important; }
  #hs img { 
    width: 100% !important; 
    height: 100% !important; 
    object-fit: cover !important;
    object-position: center !important;
  }
  #hs .hs-slide { height: 100% !important; }
}
@media (min-width: 768px) {
  #hs { aspect-ratio: unset !important; height: auto !important; }
  #hs img { height: auto !important; width: 100% !important; object-fit: unset !important; }
}

/* ── CATS NEW GRID ───────────────────────────────────────────── */
.cats-new-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.cat-new-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 12px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
  background: var(--white);
  transition: .15s;
  text-align: center;
}
.cat-new-card:hover {
  border-color: var(--cat-color, var(--red));
  color: var(--cat-color, var(--red));
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  transform: translateY(-2px);
}
.cat-new-card--main {
  grid-column: 1 / -1;
  flex-direction: row;
  justify-content: flex-start;
  gap: 16px;
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  padding: 18px 24px;
}
.cat-new-card--main:hover { background: #c8001a; color: #fff; }
.cat-new-icon { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; }
.cat-new-icon svg { width: 40px; height: 40px; }
.cat-new-card--main .cat-new-icon svg { width: 48px; height: 48px; color: #fff; }
.cat-new-label { font-size: 14px; font-weight: 700; margin-top: 8px; }
.cat-new-card--main .cat-new-label { font-size: 18px; font-weight: 800; margin-top: 0; color: #fff; }
.cat-new-count { font-size: 12px; color: var(--muted); margin-top: 3px; }
.cat-new-card--main .cat-new-count { color: rgba(255,255,255,.8); margin-top: 2px; }
@media (max-width: 767px) {
  .cats-new-grid { grid-template-columns: 1fr 1fr; }
  .cat-new-card--main { grid-column: 1 / -1; }
  .cat-new-icon svg { width: 32px; height: 32px; }
}

/* ── CATS GRID FIX ───────────────────────────────────────────── */
.cats-new-grid {
  grid-template-columns: repeat(4, 1fr) !important;
}
.cat-new-icon { width: 64px !important; height: 64px !important; }
.cat-new-icon svg { width: 52px !important; height: 52px !important; }
.cat-new-card { min-height: 130px !important; }

/* ── CATS NEW GRID V2 ────────────────────────────────────────── */
.cats-new-grid {
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 12px !important;
}
.cat-new-card {
  min-height: 160px !important;
  padding: 24px 16px !important;
  border-radius: 14px !important;
}
.cat-new-card--main {
  grid-column: 1 / -1 !important;
  min-height: 80px !important;
}
.cat-new-icon { width: 90px !important; height: 90px !important; background: var(--surface); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.cat-new-icon svg { width: 60px !important; height: 60px !important; }
.cat-new-card--main .cat-new-icon { background: rgba(255,255,255,.2) !important; width: 56px !important; height: 56px !important; margin-bottom: 0 !important; }
.cat-new-card--main .cat-new-icon svg { width: 36px !important; height: 36px !important; }
.cat-new-label { font-size: 15px !important; font-weight: 800 !important; }
.cat-new-count { font-size: 13px !important; }
@media (min-width: 1024px) {
  .cats-new-grid { grid-template-columns: repeat(4, 1fr) !important; }
}
@media (max-width: 767px) {
  .cats-new-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .cat-new-icon { width: 64px !important; height: 64px !important; }
  .cat-new-icon svg { width: 44px !important; height: 44px !important; }
  .cat-new-card { min-height: 120px !important; }
}

/* ── CATS V3 GRID ────────────────────────────────────────────── */
.cats-v3-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.cat-v3-card {
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 16px;
  min-height: 160px;
  position: relative;
  transition: transform .2s, box-shadow .2s;
}
.cat-v3-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.cat-v3-main {
  grid-column: 1 / -1;
  flex-direction: row;
  justify-content: flex-start;
  min-height: 100px;
  gap: 20px;
  padding: 20px 28px;
}
.cat-v3-img {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}
.cat-v3-img svg { width: 100%; max-width: 160px; height: auto; }
.cat-v3-main .cat-v3-img { width: 180px; flex: 0 0 180px; }
.cat-v3-main .cat-v3-img svg { max-width: 180px; }
.cat-v3-info { text-align: center; }
.cat-v3-main .cat-v3-info { text-align: left; }
.cat-v3-name { font-size: 14px; font-weight: 800; margin-bottom: 4px; }
.cat-v3-main .cat-v3-name { font-size: 22px; }
.cat-v3-count { font-size: 12px; opacity: .8; }
.cat-v3-main .cat-v3-count { font-size: 14px; opacity: .9; }
@media (max-width: 767px) {
  .cats-v3-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
  .cat-v3-main { grid-column: 1 / -1; flex-direction: row; min-height: 80px; padding: 14px; }
  .cat-v3-main .cat-v3-img { width: 100px; flex: 0 0 100px; }
  .cat-v3-main .cat-v3-name { font-size: 16px; }
  .cat-v3-card { min-height: 130px; }
}

/* ── CATS PHOTO GRID ─────────────────────────────────────────── */
.cats-photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.cat-photo-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  display: block;
  aspect-ratio: 4/3;
}
.cat-photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}
.cat-photo-card:hover img { transform: scale(1.05); }
.cat-photo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 14px;
  background: linear-gradient(to top, rgba(0,0,0,.75) 0%, transparent 100%);
  color: #fff;
}
.cat-photo-name {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}
.cat-photo-count {
  font-size: 12px;
  opacity: .85;
  margin-top: 2px;
}
.cat-photo-main {
  grid-column: 1 / 3;
  aspect-ratio: 2/1;
}
@media (max-width: 767px) {
  .cats-photo-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
  }
  .cat-photo-main {
    grid-column: 1 / -1 !important;
    aspect-ratio: 16/7 !important;
  }
}

/* ── CATS PHOTO GRID V2 ──────────────────────────────────────── */
.cats-photo-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  grid-template-rows: auto auto !important;
  gap: 10px !important;
}
.cat-photo-main {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
  aspect-ratio: 5/1.2 !important;
}
.cats-photo-grid .cat-photo-card:not(.cat-photo-main) {
  grid-column: auto !important;
  grid-row: auto !important;
  aspect-ratio: 1/1 !important;
}
@media (max-width: 767px) {
  .cat-photo-main { aspect-ratio: 16/7 !important; }
  .cats-photo-grid .cat-photo-card:not(.cat-photo-main) { aspect-ratio: 1/1 !important; }
}

/* ── CATS PHOTO GRID V3 ──────────────────────────────────────── */
.cats-photo-grid {
  display: grid !important;
  grid-template-columns: repeat(6, 1fr) !important;
  gap: 10px !important;
}
.cats-photo-grid .cat-photo-card:nth-child(1) {
  grid-column: 1 / 4 !important;
  aspect-ratio: 3/2 !important;
}
.cats-photo-grid .cat-photo-card:nth-child(2) {
  grid-column: 4 / 7 !important;
  aspect-ratio: 3/2 !important;
}
.cats-photo-grid .cat-photo-card:nth-child(n+3) {
  grid-column: auto !important;
  aspect-ratio: 1/1 !important;
}
@media (max-width: 767px) {
  .cats-photo-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .cats-photo-grid .cat-photo-card:nth-child(1),
  .cats-photo-grid .cat-photo-card:nth-child(2) {
    grid-column: auto !important;
    aspect-ratio: 4/3 !important;
  }
}

/* ── AUTH PAGE ───────────────────────────────────────────────── */
.auth-page {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
}
.auth-card {
  background: var(--white) !important;
  border-radius: 20px !important;
  padding: 40px !important;
  max-width: 420px !important;
  width: 100% !important;
  box-shadow: 0 20px 60px rgba(0,0,0,.1) !important;
  border: 1px solid var(--border) !important;
}
.auth-title {
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 24px;
  text-align: center;
}
.auth-logo { text-align: center; margin-bottom: 20px; }
.auth-footer { text-align: center; font-size: 13px; color: var(--muted); margin-top: 20px; }
.auth-footer a { color: var(--red); font-weight: 600; }
.fg label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; display: block; margin-bottom: 6px; }
.fg input { width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 14px; transition: .15s; }
.fg input:focus { border-color: var(--red); outline: none; box-shadow: 0 0 0 3px rgba(232,0,30,.08); }
.btn-submit { background: var(--red); color: #fff; border: none; padding: 14px 24px; border-radius: 10px; font-weight: 700; font-size: 15px; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: .15s; }
.btn-submit:hover { background: #c8001a; transform: translateY(-1px); }
@media (max-width: 480px) {
  .auth-card { padding: 28px 20px !important; }
}







/* ── CATEGORIES GRID ─────────────────────────────────────────── */
@media (min-width: 768px) {
  .cats-photo-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }
  .cat-photo-main {
    grid-column: 1 / 3 !important;
    aspect-ratio: 2/1 !important;
  }
}
@media (max-width: 767px) {
  .cats-photo-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .cat-photo-main {
    grid-column: 1 / -1 !important;
    aspect-ratio: 16/7 !important;
  }
  .cat-photo-name { font-size: 13px !important; }
  .cat-photo-count { font-size: 11px !important; }
}



/* ── BANNER DIMENSIONS ───────────────────────────────────────── */
/* Десктоп: 1920x600 = 16:5 ratio */
@media (min-width: 768px) {
  #hs { aspect-ratio: 16/5; overflow: hidden; }
  .hs-img-desktop { width: 100% !important; height: 100% !important; object-fit: cover !important; display: block !important; }
}
/* Мобилен: 800x600 = 4:3 ratio */
@media (max-width: 767px) {
  #hs { aspect-ratio: 4/3; overflow: hidden; }
  .hs-img-mobile { width: 100% !important; height: 100% !important; object-fit: cover !important; display: block !important; }
  .hs-slide { height: 100%; }
}
