/* ================================================================
   37MOTORSPORT - main.css
   Fonts: Audiowide (headings), Poppins (body)
   Colors: --red: #cc0000, --black: #0a0a0a, --white: #fff
   ================================================================ */

/* Fonts loaded via <link> in <head> (Audiowide + Poppins) - not @import (render-blocking) */

/* ── Reset & Variables ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand - single red #cc0000 (WCAG AA on white/buttons); --red-dark only for hover */
  --red:        #cc0000;
  --red-dark:   #a30000;

  /* Neutrals */
  --black:      #0a0a0a;
  --black-soft: #111111;
  --gray-900:   #1a1a1a;
  --gray-800:   #222222;
  --gray-700:   #333333;
  --gray-600:   #555555;
  --gray-500:   #666666;
  --gray-400:   #888888;
  --gray-300:   #aaaaaa;
  --gray-200:   #e0e0e0;
  --gray-100:   #f5f5f5;
  --gray-50:    #fafafa;
  --white:      #ffffff;

  /* Borders */
  --border:       #333333;   /* karty, sekcje, dividers */
  --border-input: #666666;   /* inputy - WCAG 3:1 na tle --black-soft */

  /* Semantic */
  --color-success: #00c864;
  --color-error:   #ff4444;
  --color-info:    #4a90ff;

  /* Fonts */
  --font-head:  'Audiowide', sans-serif;
  --font-body:  'Poppins', sans-serif;

  /* Misc */
  --radius:     6px;
  --radius-lg:  12px;
  --shadow:     0 2px 12px rgba(0,0,0,.4);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.6);
  --transition: .2s ease;

  --container:  1280px;
  --header-h:   84px;
  --notif-h:    40px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--white);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

html, body { overflow-x: hidden; }

/* ── Container ─────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Typography ────────────────────────────────────────────────── */
h1, h2, h3, h4, h5 { font-family: var(--font-head); line-height: 1.2; }
h1 { font-size: clamp(24px, 4vw, 42px); }
h2 { font-size: clamp(20px, 3vw, 32px); }
h3 { font-size: clamp(16px, 2vw, 22px); }
p  { line-height: 1.7; }

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--red);
  color: var(--white);
}
.btn-primary:hover { background: var(--red-dark); }

.btn-outline {
  border: 2px solid var(--red);
  color: var(--white); /* white text for AA on dark; red border is decorative (3:1 ok) */
}
.btn-outline:hover { background: var(--red); color: var(--white); }

.btn-ghost {
  color: var(--gray-300);
}
.btn-ghost:hover { color: var(--white); }

.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-lg { padding: 16px 36px; font-size: 16px; }

/* ── Notification Bar ──────────────────────────────────────────── */
.notif-bar {
  background: var(--red);
  color: var(--white);
  text-align: center;
  padding: 0 20px;
  height: var(--notif-h);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  gap: 8px;
}
.notif-bar a { text-decoration: underline; }
.notif-bar.hidden { display: none; }

/* ── Header ────────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(8, 8, 8, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.07);
  box-shadow: 0 4px 24px rgba(0,0,0,.4);
  transition: background .25s, box-shadow .25s;
}
/* Compensate for fixed header */
body { padding-top: var(--header-h); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-img { height: 60px; width: auto; display: block; }
.footer-logo .logo-img { height: 40px; }
.logo-text {
  font-family: var(--font-head);
  font-size: 20px;
  color: var(--white);
  letter-spacing: .05em;
}
.logo-text span { color: var(--red); }

/* Nav desktop */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-desktop a {
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-300);
  transition: var(--transition);
  position: relative;
}
.nav-desktop a:hover,
.nav-desktop a.active { color: var(--white); }
.nav-desktop a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 16px; right: 16px;
  height: 2px;
  background: var(--red);
  border-radius: 2px;
}

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown > a { display: flex; align-items: center; gap: 4px; }
.nav-dropdown > a svg { width: 14px; height: 14px; transition: var(--transition); }
.nav-dropdown:hover > a svg { transform: rotate(180deg); }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  /* overflow: visible - required so nested sub-dropdown isn't clipped */
  overflow: visible;
  background: var(--gray-900);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: var(--transition);
  box-shadow: var(--shadow);
}
.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-menu a {
  display: block;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--gray-300);
  border-radius: 0;
}
.dropdown-menu a:hover { color: var(--white); background: var(--gray-800); }
.dropdown-menu a.active { color: var(--red); }
/* ── Nested sub-dropdown (Rally Cars → subcats) ─────────────────── */
.dropdown-sub-wrap { position: relative; }
.dropdown-sub-trigger {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.dropdown-sub-trigger svg { opacity: .6; flex-shrink: 0; }
.dropdown-sub-menu {
  position: absolute;
  left: 100%;
  top: 0;
  min-width: 200px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--gray-900);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 0;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-6px);
  transition: var(--transition);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  z-index: 10;
}
.dropdown-sub-wrap:hover .dropdown-sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}
.dropdown-sub-menu a {
  display: block;
  padding: 9px 16px;
  font-size: 13px;
  color: var(--gray-300);
}
.dropdown-sub-menu a:hover { color: var(--white); background: var(--gray-800); }

.dropdown-soon { opacity: .55; pointer-events: none; cursor: default; }
.soon-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: var(--gray-700);
  color: var(--gray-400);
  padding: 1px 5px;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 4px;
}

/* ── Mega menu (Makes) ─────────────────────────────────────────── */
.nav-megamenu-wrap { position: static; }
.nav-megamenu {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--gray-900);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: var(--transition);
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  z-index: 999;
}
.nav-megamenu-wrap:hover .nav-megamenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.megamenu-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.megamenu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: var(--radius);
  text-align: center;
  transition: background .15s;
  text-decoration: none;
}
.megamenu-item:hover { background: var(--gray-800); }
.megamenu-logo {
  height: 40px;
  width: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 6px;
  padding: 5px 8px;
}
.megamenu-logo img {
  max-height: 30px;
  max-width: 52px;
  width: auto;
  object-fit: contain;
  filter: none;
  transition: opacity .2s;
}
.megamenu-item:hover .megamenu-logo img { filter: grayscale(0%); }
.megamenu-logo span {
  font-family: var(--font-head);
  font-size: 11px;
  color: var(--gray-400);
  text-transform: uppercase;
}
.megamenu-name {
  font-size: 11px;
  color: var(--gray-400);
  white-space: nowrap;
}

/* Header right actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Hamburger (mobile) */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  border-radius: var(--radius);
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile nav - drill-down panel style ────────────────────────── */
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0; bottom: 0;
  z-index: 999;
  overflow: hidden;
}
.nav-mobile.open { display: block; }

/* Each panel fills the nav-mobile area */
.mob-panel {
  position: absolute;
  inset: 0;
  background: var(--black-soft);
  overflow-y: auto;
  padding: 12px 0 80px;
  display: flex;
  flex-direction: column;
  transform: translateX(0);
  transition: transform .28s cubic-bezier(.4,0,.2,1), opacity .28s ease;
}
.mob-panel--sub {
  transform: translateX(100%);
}
.mob-panel--active {
  transform: translateX(0) !important;
}
/* Push main panel left when sub is open */
.nav-mobile.sub-open #mob-panel-main {
  transform: translateX(-28%);
  opacity: .3;
  pointer-events: none;
}

/* Menu items */
.mob-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--gray-300);
  border-bottom: 1px solid var(--border);
  transition: color var(--transition), background var(--transition);
  text-decoration: none;
  width: 100%;
  text-align: left;
  background: none;
  font-family: inherit;
  cursor: pointer;
}
.mob-item:hover, .mob-item.active { color: var(--white); background: rgba(255,255,255,.03); }
.mob-item--sub { color: var(--gray-300); }
.mob-item--sub:hover { color: var(--white); }

.mob-divider { height: 1px; background: var(--border); margin: 12px 0; }
.mob-btn { margin: 4px 20px; width: calc(100% - 40px); justify-content: center; }

/* Back button & sub-panel title */
.mob-back {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--red);
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: color var(--transition);
}
.mob-back:hover { color: var(--red-dark); }
.mob-sub-title {
  font-family: var(--font-head);
  font-size: 17px;
  color: var(--white);
  padding: 14px 20px 16px;
  border-bottom: 2px solid var(--red);
  margin-bottom: 4px;
}

/* Mobile bottom bar (po scrollu 10-20%) */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--gray-900);
  border-top: 1px solid var(--border);
  z-index: 1001;
  padding-top: 8px;
  padding-bottom: 8px;
  /* iOS safe-area: pushes nav icons up, background fills gap */
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
}
/* Fill the physical gap below the bar on notch/home-indicator phones */
.mobile-bottom-bar::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: env(safe-area-inset-bottom, 0px);
  background: var(--gray-900);
  pointer-events: none;
}
.mobile-bottom-bar.visible { display: block; }
.mobile-bottom-nav {
  display: flex;
  justify-content: space-around;
}
.mobile-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 12px;
  font-size: 10px;
  color: var(--gray-300);
  transition: var(--transition);
}
.mobile-bottom-nav a:hover,
.mobile-bottom-nav a.active { color: var(--red); }
.mobile-bottom-nav svg { width: 20px; height: 20px; }

/* ── Main content ──────────────────────────────────────────────── */
.main { min-height: 60vh; }

/* ── Breadcrumbs ───────────────────────────────────────────────── */
.breadcrumbs {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}
.breadcrumb-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 13px;
  color: var(--gray-500);
}
.breadcrumb-list a { color: var(--gray-300); }
.breadcrumb-list a:hover { color: var(--white); }
.breadcrumb-sep { color: var(--gray-700); }
.breadcrumb-list .current { color: var(--gray-300); }

/* ── Hero (strona główna) ──────────────────────────────────────── */
/* ── HERO ─────────────────────────────────────────────────────── */
.hero {
  padding: 80px 0 60px;
  text-align: left;
  position: relative;
  overflow: hidden;
  background: var(--black);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 80% at -10% 50%, rgba(204,0,0,.18) 0%, transparent 65%);
  pointer-events: none;
}
.hero-overlay { display: none; }
.hero-content {
  position: relative;
  z-index: 1;
}
.hero-tag {
  display: inline-block;
  color: var(--gray-400);
  font-family: var(--font-head);
  font-size: 15px;
  font-style: italic;
  letter-spacing: .06em;
  margin-bottom: 10px;
}
.hero-title {
  font-family: var(--font-head);
  font-size: clamp(32px, 8vw, 110px);
  color: var(--white);
  line-height: .95;
  margin: 0 0 6px;
  letter-spacing: -.01em;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.hero-title .num { color: var(--red); }

/* Hero search form */
.hero-search {
  margin-top: 40px;
  background: var(--gray-900);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 900px;
}
.hero-search-row {
  display: grid;
  gap: 16px;
  align-items: end;
}
.hero-search-dropdowns { grid-template-columns: repeat(3, 1fr); }
.hero-search-sliders   { grid-template-columns: repeat(3, 1fr) auto; margin-top: 16px; }
.hero-search-row + .hero-search-row { margin-top: 16px; }
.hero-search-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--gray-500);
  margin-bottom: 8px;
}
.hero-search-field select {
  width: 100%;
  background: var(--black);
  border: 1px solid var(--border);
  color: var(--white);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 14px;
  font-family: var(--font-body);
  cursor: pointer;
}
.hero-search-field select:focus {
  outline: none;
  border-color: var(--red);
}
.hero-search-field select option { background: var(--black-soft); color: var(--white); }
.hero-search-btn {
  height: 42px;
  padding: 0 24px;
  white-space: nowrap;
  width: 100%;
  align-self: end;
}

/* Hero range sliders */
.hs-range {
  position: relative;
  height: 28px;
  display: flex;
  align-items: center;
}
.hs-range input[type="range"] {
  position: absolute;
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  pointer-events: none;
}
.hs-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--red);
  cursor: pointer;
  pointer-events: all;
  position: relative;
  z-index: 2;
}
.hs-range input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--red);
  cursor: pointer;
  pointer-events: all;
  border: none;
}
.hs-range::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  z-index: 0;
}
.hs-range-labels {
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 4px;
}

/* Stats (kept for possible reuse) */
.hero-stats {
  margin-top: 60px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.hero-stat {
  background: var(--gray-900);
  padding: 24px 16px;
  text-align: center;
}
.hero-stat-num {
  font-family: var(--font-head);
  font-size: 28px;
  color: var(--red);
  display: block;
}
.hero-stat-label {
  font-size: 12px;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* ── Section ───────────────────────────────────────────────────── */
.section { padding: 40px 0; }
.section-dark {
  background: var(--black);
  margin: 0;
}
.section-dark .section-title,
.section-dark .type-card-name { color: var(--white); }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
  flex-wrap: wrap;
}
.section-title { font-size: clamp(24px, 2.5vw, 28px); }
.section-title span { color: var(--red); }

/* ── Car type cards (grid kafelków typów) ──────────────────────── */
.types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.type-card {
  background: var(--gray-900);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.type-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--red);
  transform: scaleX(0);
  transition: var(--transition);
}
.type-card:hover { border-color: var(--red); transform: translateY(-2px); }
.type-card:hover::before { transform: scaleX(1); }
.type-card-icon { font-size: 32px; margin-bottom: 12px; }
.type-card-name {
  font-family: var(--font-head);
  font-size: 13px;
  color: var(--white);
  letter-spacing: .03em;
}
.type-card-count {
  font-size: 12px;
  color: var(--gray-300);
  margin-top: 4px;
}

/* ── Listing cards (ogłoszenia) ────────────────────────────────── */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
/* 4 per row when inside layout with sidebar */
.listings-layout .listings-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.listing-card {
  background: var(--gray-900);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.listing-card:hover { border-color: rgba(204,0,0,.4); transform: translateY(-2px); box-shadow: var(--shadow); }

.listing-card-img {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--gray-800);
  flex-shrink: 0;
}
.listing-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.listing-card:hover .listing-card-img img { transform: scale(1.04); }

.listing-card-badge {
  position: absolute;
  top: 10px; left: 10px;
  background: var(--red);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 3px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.listing-card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.listing-card-title {
  font-family: var(--font-head);
  font-size: 14px;
  margin-bottom: 8px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--white);
}
.listing-price {
  font-family: var(--font-head);
  font-size: 20px;
  color: var(--white);
  margin-bottom: 10px;
}
.listing-card-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: 14px;
  font-size: 11px;
  color: var(--gray-400);
  flex: 1;
}
.lc-spec {
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}
.lc-spec--class { color: var(--gray-300); }
.lc-btn-full {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: auto;
}
/* Legacy compat */
.listing-card-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 14px; font-size: 12px; color: var(--gray-500); }
.listing-card-meta span { display: flex; align-items: center; gap: 4px; }
.listing-card-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--border); }
.listing-price-label { font-size: 11px; color: var(--gray-400); }

/* ── Filters sidebar ───────────────────────────────────────────── */
.listings-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
}
.filters-panel {
  background: var(--gray-900);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: sticky;
  top: calc(var(--header-h) + 20px);
}
.filter-title {
  font-family: var(--font-head);
  font-size: 14px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.filter-group { margin-bottom: 24px; }
.filter-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--gray-300);
  margin-bottom: 10px;
  display: block;
}
.filter-select {
  width: 100%;
  background: var(--gray-800);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--white);
  padding: 10px 12px;
  font-size: 13px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}
.filter-select:focus { outline: none; border-color: var(--red); }

/* Checkboxes & radios */
.filter-options { display: flex; flex-direction: column; gap: 8px; }
.filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--gray-300);
}
.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
  width: 16px; height: 16px;
  accent-color: var(--red);
  cursor: pointer;
  flex-shrink: 0;
}
.filter-option:hover { color: var(--white); }

/* Range slider */
.filter-range { padding: 4px 0; }
.range-slider {
  width: 100%;
  accent-color: var(--red);
  cursor: pointer;
}
.range-values {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 6px;
}

/* Dual range (price, year) */
.dual-range { position: relative; height: 20px; margin: 12px 0 4px; }
.dual-range input[type="range"] {
  position: absolute;
  width: 100%;
  pointer-events: none;
  background: transparent;
  height: 4px;
  top: 8px;
  accent-color: var(--red);
}
.dual-range input[type="range"]::-webkit-slider-thumb { pointer-events: all; }
.range-track {
  position: absolute;
  top: 8px; left: 0; right: 0;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
}

.filters-reset {
  width: 100%;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--gray-300);
  font-size: 13px;
  margin-top: 8px;
  transition: var(--transition);
}
.filters-reset:hover { border-color: var(--red); color: var(--red); }

/* ── Pagination ────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 48px;
}
.page-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--gray-900);
  color: var(--gray-300);
  font-size: 14px;
  transition: var(--transition);
}
.page-btn:hover { border-color: var(--red); color: var(--white); }
.page-btn.active { background: var(--red); border-color: var(--red); color: var(--white); }
.page-btn.disabled { opacity: .4; pointer-events: none; }

/* ── Single listing ────────────────────────────────────────────── */
.listing-gallery { margin-bottom: 32px; }
.gallery-main {
  aspect-ratio: 16/9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--gray-900);
  margin-bottom: 12px;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.gallery-thumb {
  flex-shrink: 0;
  width: 80px; height: 56px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}
.gallery-thumb:hover, .gallery-thumb.active { border-color: var(--red); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.listing-detail-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}
.listing-specs {
  background: var(--gray-900);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.spec-item {}
.spec-key {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--gray-500);
  margin-bottom: 2px;
}
.spec-val {
  font-weight: 600;
  font-size: 15px;
}
.spec-divider {
  grid-column: 1/-1;
  height: 1px;
  background: var(--border);
}

.listing-contact-card {
  background: var(--gray-900);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: sticky;
  top: calc(var(--header-h) + 20px);
}
.contact-price {
  font-family: var(--font-head);
  font-size: 32px;
  color: var(--red);
  margin-bottom: 4px;
}
.contact-price-note { font-size: 12px; color: var(--gray-500); margin-bottom: 20px; }

/* Read more */
.read-more-wrap { position: relative; }
.read-more-content {
  overflow: hidden;
  transition: max-height .4s ease;
}
.read-more-content.collapsed { max-height: 160px; }
.read-more-fade {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(transparent, var(--black));
  pointer-events: none;
}
.read-more-content.collapsed + .read-more-fade { display: block; }
.read-more-content:not(.collapsed) + .read-more-fade { display: none; }
.read-more-btn {
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.read-more-btn:hover { color: var(--red-dark); }

/* ── Forms ─────────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--gray-300);
}
.form-label .required { color: var(--red); margin-left: 2px; }
.form-control {
  width: 100%;
  background: var(--gray-800);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--white);
  padding: 11px 14px;
  font-size: 14px;
  transition: var(--transition);
}
.form-control:focus { outline: none; border-color: var(--red); background: var(--gray-900); }
.form-control.error { border-color: var(--color-error); }
.form-hint {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 4px;
}
.form-error {
  font-size: 12px;
  color: var(--color-error);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
textarea.form-control { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-section-title {
  font-family: var(--font-head);
  font-size: 15px;
  margin: 32px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* Checkbox w formularzu */
.check-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--gray-300);
}
.check-group input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--red);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── Seller / User card ────────────────────────────────────────── */
.seller-card {
  background: var(--gray-900);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
}
.seller-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 12px;
  border: 3px solid var(--border);
}
.seller-avatar-placeholder {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--gray-800);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-family: var(--font-head);
  font-size: 28px;
  color: var(--gray-500);
}
.seller-name { font-family: var(--font-head); font-size: 16px; margin-bottom: 4px; }
.seller-since { font-size: 12px; color: var(--gray-500); }

/* ── Alerts ────────────────────────────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-success { background: rgba(0,200,100,.08);  border: 1px solid rgba(0,200,100,.25);  color: var(--color-success); }
.alert-error   { background: rgba(204,0,0,.08);   border: 1px solid rgba(204,0,0,.25);   color: var(--color-error); }
.alert-info    { background: rgba(74,144,255,.08); border: 1px solid rgba(74,144,255,.25); color: var(--color-info); }

/* ── Popup ─────────────────────────────────────────────────────── */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.popup-overlay.hidden { display: none; }
.popup-box {
  position: relative;
  max-width: 560px;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.popup-box img { width: 100%; height: auto; display: block; }
.popup-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 36px; height: 36px;
  background: rgba(0,0,0,.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 18px;
  transition: var(--transition);
  border: 1px solid rgba(255,255,255,.2);
}
.popup-close:hover { background: rgba(204,0,0,.8); }

/* ── Footer ────────────────────────────────────────────────────── */
.site-footer {
  background: var(--black-soft);
  border-top: 1px solid var(--border);
  margin-top: 80px;
}
.footer-top {
  padding: 60px 0 40px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-brand {}
.footer-logo { margin-bottom: 16px; }
.footer-desc { font-size: 13px; color: var(--gray-400); line-height: 1.7; max-width: 280px; }
.footer-heading {
  font-family: var(--font-head);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--gray-300);
  margin-bottom: 16px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
  font-size: 13px;
  color: var(--gray-400);
  transition: var(--transition);
}
.footer-links a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--gray-400);
}
.footer-bottom a { color: var(--gray-400); }
.footer-bottom a:hover { color: var(--white); }
.footer-bottom-links { display: flex; align-items: center; gap: 16px; }
.footer-designed { color: var(--gray-400); font-size: 11px; }

.footer-socials { display: flex; gap: 12px; margin-bottom: 4px; }
.footer-social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--gray-400);
  transition: var(--transition);
}
.footer-social-icon:hover { border-color: var(--red); color: var(--white); }
.footer-thanks-badge {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  margin-top: 8px;
  transition: border-color .2s;
}
.footer-thanks-badge:hover { border-color: var(--red); }
.footer-thanks-badge img { display: block; filter: brightness(.85); }

/* ── Admin panel ───────────────────────────────────────────────── */
/* (footer-top grid-template-columns override removed – defined above) */
.admin-wrap {
  display: flex;
  min-height: 100vh;
}
.admin-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--black-soft);
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 24px 0;
}
.admin-logo {
  padding: 0 20px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  font-size: 13px;
  color: var(--gray-300);
  transition: var(--transition);
  border-left: 3px solid transparent;
}
.admin-nav-item:hover { color: var(--white); background: var(--gray-900); }
.admin-nav-item.active { color: var(--red); border-left-color: var(--red); background: rgba(204,0,0,.06); }
.admin-nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.admin-nav-section {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--gray-700);
  padding: 16px 20px 6px;
}

.admin-content { flex: 1; padding: 32px; overflow: hidden; }
.admin-header { margin-bottom: 32px; }
.admin-title { font-size: 24px; margin-bottom: 4px; }
.admin-subtitle { font-size: 14px; color: var(--gray-500); }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-table th {
  text-align: left;
  padding: 10px 14px;
  background: var(--gray-900);
  border-bottom: 2px solid var(--border);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--gray-500);
}
.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tr:hover td { background: rgba(255,255,255,.02); }

.admin-card {
  background: var(--gray-900);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}
.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.admin-stat {
  background: var(--gray-900);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.admin-stat-num {
  font-family: var(--font-head);
  font-size: 32px;
  color: var(--red);
}
.admin-stat-label { font-size: 13px; color: var(--gray-500); margin-top: 4px; }

/* Badge status */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.badge-active   { background: rgba(0,200,100,.15);  color: var(--color-success); }
.badge-inactive { background: rgba(255,68,68,.15);  color: var(--color-error); }
.badge-expired  { background: rgba(136,136,136,.15); color: var(--gray-400); }
.badge-pending  { background: rgba(204,0,0,.15); color: #ff6b6b; }
.badge-sold     { background: rgba(74,144,255,.15);  color: var(--color-info); }
.badge-admin    { background: rgba(204,0,0,.15);     color: var(--red); }
.badge-user     { background: rgba(74,144,255,.15);  color: var(--color-info); }

/* SOLD badge na karcie ogłoszenia */
.listing-card-badge--sold {
  background: var(--gray-700);
  color: var(--white);
  letter-spacing: .12em;
}

/* Modal "czy sprzedałeś?" */
.sold-modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.sold-modal-overlay.is-open { display: flex; }
.sold-modal {
  background: var(--gray-900);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 440px;
  width: calc(100% - 40px);
  text-align: center;
}
.sold-modal h3 { font-size: 18px; margin-bottom: 12px; }
.sold-modal p  { color: var(--gray-400); font-size: 14px; margin-bottom: 28px; line-height: 1.6; }
.sold-modal-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Utilities ─────────────────────────────────────────────────── */
.text-red   { color: var(--red); }
.text-gray  { color: var(--gray-500); }
.text-muted { color: var(--gray-300); }
.text-center { text-align: center; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-8  { gap: 8px; }
.gap-16 { gap: 16px; }
.w-full { width: 100%; }

/* Divider */
.divider { height: 1px; background: var(--border); margin: 32px 0; }

/* ── Listing toolbar (sort + mobile filter toggle) ─────────────── */
.listing-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.sort-links {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-500);
  flex-wrap: wrap;
}
.sort-link {
  color: var(--gray-400);
  padding: 4px 10px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 12px;
  transition: var(--transition);
}
.sort-link:hover { color: var(--white); border-color: var(--border); }
.sort-link.active { color: var(--red); border-color: var(--red); }
.filters-toggle { display: none; }

/* Mobile filter panel */
.filters-panel-mob {
  background: var(--gray-900);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
}

/* Filter range row (min - max inputs) */
.filter-range-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-input {
  flex: 1;
  min-width: 0;
  background: var(--gray-800);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--white);
  padding: 9px 10px;
  font-size: 13px;
  font-family: var(--font-body);
}
.filter-input:focus { outline: none; border-color: var(--red); }
.filter-input::placeholder { color: var(--gray-600); }
.filter-range-sep { color: var(--gray-600); font-size: 13px; flex-shrink: 0; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 80px 0;
  color: var(--gray-500);
}
.empty-state-icon { font-size: 48px; margin-bottom: 16px; }

/* Make header (logo + title) */
.make-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 8px;
}
.make-header-logo {
  max-height: 64px;
  max-width: 120px;
  width: auto;
  object-fit: contain;
  filter: brightness(.9);
}

/* Brand card count badge */
.brand-card-count {
  font-size: 11px;
  color: var(--gray-600);
  background: var(--gray-800);
  border-radius: 20px;
  padding: 1px 8px;
}

/* types-grid-lg (on /types-of-car/ index) */
.types-grid-lg { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.types-grid-lg .type-card-icon { font-size: 40px; margin-bottom: 14px; }

/* brands-grid-lg (on /makes/ index) */
.brands-grid-lg { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

/* ── Brand logo grid ────────────────────────────────────────────── */
.brands-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 900px) { .brands-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 600px) { .brands-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.brand-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 12px 16px;
  background: var(--gray-900);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: var(--transition);
  text-decoration: none;
}
.brand-card:hover {
  border-color: var(--red);
  transform: translateY(-2px);
}
.brand-card-logo {
  height: 64px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 8px;
  padding: 8px 12px;
}
.brand-card-logo img {
  max-height: 44px;
  max-width: 80px;
  width: auto;
  object-fit: contain;
  filter: none;
  transition: opacity .2s;
}
.brand-card:hover .brand-card-logo img { opacity: .85; }
.brand-card-text {
  font-family: var(--font-head);
  font-size: 13px;
  color: #2a2a2a; /* dark text on white logo box - AA */
  text-transform: uppercase;
}
.brand-card-name {
  font-size: 12px;
  color: var(--gray-400);
  font-weight: 500;
}

/* ── Account panel ─────────────────────────────────────────────── */
.account-page { padding: 40px 0 80px; }
.account-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}
.account-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  background: var(--gray-900);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.account-user-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}
.account-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--gray-800);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden; color: var(--gray-500);
}
.account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-user-name  { font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.account-user-email { font-size: 12px; color: var(--gray-500); margin-bottom: 6px; }
.account-nav { padding: 8px 0; }
.account-nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 20px; font-size: 14px; color: var(--gray-300);
  transition: var(--transition);
}
.account-nav-item:hover  { color: var(--white); background: var(--gray-800); }
.account-nav-item.active { color: var(--white); background: var(--gray-800); border-left: 3px solid var(--red); }
.account-nav-item svg { flex-shrink: 0; color: var(--gray-500); }
.account-nav-item.active svg,
.account-nav-item:hover  svg { color: var(--red); }

.account-section       { background: var(--gray-900); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 20px; }
.account-section-head  { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.account-section-title { font-size: 18px; }
.listings-count        { font-size: 14px; color: var(--gray-500); font-family: var(--font-body); font-weight: 400; }

.account-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 20px; }
.stat-card  { background: var(--gray-900); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; text-align: center; }
.stat-value { font-family: var(--font-head); font-size: 28px; margin-bottom: 4px; }
.stat-label { font-size: 12px; color: var(--gray-500); }
.stat-green { color: var(--color-success); }
.stat-red   { color: var(--color-error); }
.stat-gray  { color: var(--gray-400); }

.my-listings-table { display: flex; flex-direction: column; gap: 2px; }
.my-listing-row {
  display: grid;
  grid-template-columns: 80px 1fr auto auto auto;
  gap: 16px; align-items: center;
  padding: 12px;
  background: var(--gray-800);
  border-radius: var(--radius);
  transition: background var(--transition);
}
.my-listing-row:hover { background: var(--gray-700); }
.my-listing-thumb { width: 80px; height: 54px; border-radius: var(--radius); overflow: hidden; flex-shrink: 0; }
.my-listing-thumb img { width: 100%; height: 100%; object-fit: cover; }
.my-listing-no-img { width:100%; height:100%; background: var(--gray-700); display:flex; align-items:center; justify-content:center; color: var(--gray-500); }
.my-listing-title { font-weight: 600; font-size: 14px; display: block; margin-bottom: 4px; }
.my-listing-title:hover { color: var(--red); }
.my-listing-meta  { font-size: 12px; color: var(--gray-500); }
.my-listing-date  { font-size: 11px; color: var(--gray-500); margin-top: 2px; }
.my-listing-price { font-weight: 700; font-size: 14px; white-space: nowrap; }
.my-listing-actions { display: flex; gap: 6px; }
.form-actions { display: flex; gap: 12px; margin-top: 8px; }

.seller-header { display: flex; align-items: center; gap: 24px; margin-bottom: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--border); }
.seller-header .seller-avatar { width: 80px; height: 80px; border-radius: 50%; background: var(--gray-800); display:flex; align-items:center; justify-content:center; overflow:hidden; flex-shrink:0; color: var(--gray-500); margin: 0; border: none; }
.seller-avatar img { width:100%; height:100%; object-fit:cover; }
.seller-name    { font-size: 26px; margin-bottom: 4px; }
.seller-company { font-size: 14px; color: var(--gray-400); margin-bottom: 4px; }
.seller-since   { font-size: 13px; color: var(--gray-500); }
.seller-about   { max-width: 680px; color: var(--gray-300); line-height: 1.7; margin-bottom: 32px; }
.seller-listings-head { margin-bottom: 24px; }
.seller-listings-head h2 { font-size: 20px; }

/* ── Alerts ────────────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.5;
}
.alert p { margin: 0; }
.alert p + p { margin-top: 4px; }
.alert strong { display: block; margin-bottom: 2px; }
.alert svg { flex-shrink: 0; margin-top: 2px; }
/* alert colours defined above - no duplicate */

/* ── Forms ─────────────────────────────────────────────────────── */
.form-group   { display: flex; flex-direction: column; gap: 6px; }
.form-row     { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-label   { font-size: 13px; font-weight: 600; color: var(--gray-300); display: flex; justify-content: space-between; align-items: center; }
.form-label-link { font-weight: 400; color: var(--red); font-size: 12px; }
.form-label-link:hover { color: var(--red-dark); }
.form-optional { font-weight: 400; color: var(--gray-500); }
.req { color: var(--red); }
.form-hint { font-size: 11px; color: var(--gray-500); }

.form-input {
  background: var(--black-soft);
  border: 1.5px solid var(--border-input);
  border-radius: var(--radius);
  color: var(--white);
  padding: 11px 14px;
  font-size: 14px;
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(204,0,0,.15);
}
.form-input.is-invalid { border-color: var(--color-error); }
.form-input::placeholder { color: var(--gray-500); }
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 40px var(--black-soft) inset !important;
  -webkit-text-fill-color: var(--white) !important;
  caret-color: var(--white);
}

select.form-input { appearance: none; cursor: pointer; }
textarea.form-input { resize: vertical; min-height: 100px; }

.input-password-wrap { position: relative; }
.input-password-wrap .form-input { padding-right: 46px; }
.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
  padding: 4px;
  transition: color var(--transition);
}
.toggle-password:hover { color: var(--white); }
.eye-icon { display: block; }

.btn-full { width: 100%; justify-content: center; }

/* ── Auth pages ────────────────────────────────────────────────── */
.auth-page {
  padding: 60px 20px 80px;
}
.auth-card {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: var(--gray-800);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-lg);
  padding: 44px 40px;
  box-shadow: 0 4px 32px rgba(0,0,0,.5);
}
.auth-card-wide { max-width: 700px; }
.auth-card-header { margin-bottom: 28px; }
.auth-title { font-size: 26px; margin-bottom: 6px; }
.auth-subtitle { color: var(--gray-500); font-size: 14px; }
.auth-form { display: flex; flex-direction: column; gap: 18px; }
.auth-terms { font-size: 12px; color: var(--gray-500); line-height: 1.5; }
.auth-terms a { color: var(--gray-300); text-decoration: underline; }
.forgot-link {
  display: block;
  text-align: center;
  font-size: 13px;
  color: var(--gray-400);
  margin-top: 4px;
  transition: color var(--transition);
}
.forgot-link:hover { color: var(--red); }

.auth-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--gray-500);
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.auth-footer a { color: var(--red); font-weight: 600; }
.auth-footer a:hover { color: var(--red-dark); }

/* ── Vehicle single page ───────────────────────────────────────── */
.vehicle-gallery-section { padding: 40px 0 0; }

.vehicle-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: start;
}

/* Gallery */
.vehicle-gallery { margin-bottom: 32px; }
.gallery-main {
  position: relative;
  background: var(--gray-900);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/9;
}
.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.gallery-thumb {
  width: 92px;
  aspect-ratio: 4/3;
  flex: 0 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--transition);
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.active,
.gallery-thumb:hover { border-color: var(--red); }

/* Gallery nav arrows + zoom */
.gallery-main { cursor: zoom-in; }
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.55);
  color: #fff;
  border: none; border-radius: 50%;
  font-size: 26px; line-height: 1;
  cursor: pointer;
  transition: background .15s;
  z-index: 2;
}
.gallery-nav:hover { background: var(--red); }
.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }
.gallery-zoom {
  position: absolute;
  top: 12px; right: 12px;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.55);
  color: #fff; border: none; border-radius: 8px;
  cursor: pointer; font-size: 16px; z-index: 2;
  transition: background .15s;
}
.gallery-zoom:hover { background: var(--red); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 2000;
  display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox-img {
  max-width: 92vw; max-height: 86vh;
  object-fit: contain;
  border-radius: 6px;
}
.lightbox-close {
  position: absolute; top: 18px; right: 22px;
  background: none; border: none; color: #fff;
  font-size: 38px; line-height: 1; cursor: pointer;
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 54px; height: 54px;
  background: rgba(255,255,255,.12); color: #fff;
  border: none; border-radius: 50%;
  font-size: 32px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.lightbox-nav:hover { background: var(--red); }
.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }
.lightbox-counter {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 14px; background: rgba(0,0,0,.5);
  padding: 4px 12px; border-radius: 20px;
}

/* Head */
.vehicle-head { margin-bottom: 32px; }
.vehicle-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.vehicle-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  background: var(--gray-800);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-300);
  transition: var(--transition);
}
a.vehicle-badge:hover { background: var(--red); color: var(--white); }
.vehicle-badge-country { color: var(--gray-300); }

.vehicle-title {
  font-size: clamp(20px, 3vw, 30px);
  margin-bottom: 16px;
  line-height: 1.2;
}
.vehicle-price-row { display: flex; align-items: baseline; gap: 10px; }
.vehicle-price {
  font-family: var(--font-head);
  font-size: clamp(26px, 4vw, 38px);
  color: var(--red);
}
.vehicle-price-label { font-size: 13px; color: var(--gray-400); }

/* Sections */
.vehicle-section { margin-bottom: 40px; }
.vehicle-section-title {
  font-size: 18px;
  color: var(--white);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* Specs grid */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.spec-item {
  background: var(--gray-900);
  padding: 16px 20px;
}
.spec-label { font-size: 11px; color: var(--gray-400); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.spec-value { font-size: 15px; font-weight: 600; color: var(--white); display: flex; flex-wrap: wrap; gap: 6px; }

/* Surface chips */
.surface-chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.surface-tarmac  { background: #1a1a2e; color: #7b7bff; }
.surface-gravel  { background: #1e1200; color: #c8941a; }
.surface-snow    { background: #0d1a2e; color: #5fc8ff; }

/* Description */
.vehicle-content { font-size: 15px; color: var(--gray-300); line-height: 1.8; }
.read-more-content { overflow: hidden; }
.read-more-content.collapsed { max-height: 120px; }
.read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  color: var(--red);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}
.read-more-btn:hover { color: var(--red-dark); }

/* Components accordion */
.components-list { display: flex; flex-direction: column; gap: 2px; }
.component-item {
  background: var(--gray-900);
  border-radius: var(--radius);
  overflow: hidden;
}
.component-summary {
  padding: 14px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  color: var(--white);
  user-select: none;
}
.component-summary::-webkit-details-marker { display: none; }
.component-summary::after {
  content: '+';
  font-size: 20px;
  color: var(--red);
  line-height: 1;
}
details[open] .component-summary::after { content: '−'; }
.component-body {
  padding: 0 20px 16px;
  font-size: 14px;
  color: var(--gray-300);
  line-height: 1.7;
}

/* ── Contact card (sidebar) ────────────────────────────────────── */
.vehicle-sidebar { position: sticky; top: calc(var(--header-h) + 20px); }

.contact-card {
  background: var(--gray-900);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
}
.contact-card-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.contact-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.contact-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-800);
  color: var(--gray-500);
}
.contact-name { font-weight: 700; font-size: 16px; }
.contact-company { font-size: 12px; color: var(--gray-400); margin-top: 2px; }
.contact-about { font-size: 13px; color: var(--gray-400); line-height: 1.6; margin-bottom: 20px; }

.contact-actions { display: flex; flex-direction: column; gap: 10px; }
.btn-contact { justify-content: center; width: 100%; }
.btn-whatsapp { background: #157a45; color: #fff; }
.btn-whatsapp:hover { background: #0f5e36; }
.btn-seller-page { font-size: 13px; color: var(--gray-400); justify-content: center; }
.btn-seller-page:hover { color: var(--white); }

.contact-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  font-size: 11px;
  color: var(--gray-400);
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

/* Safety notice */
.safety-notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--gray-900);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  font-size: 12px;
  color: var(--gray-300);
  line-height: 1.5;
}
.safety-notice svg { flex-shrink: 0; color: var(--gray-400); margin-top: 2px; }

/* ── Responsive ────────────────────────────────────────────────── */
/* ── Listing Form ──────────────────────────────────────────────── */
.container--narrow { max-width: 860px; }

.listing-form { display: flex; flex-direction: column; gap: 24px; }

.lf-card {
  background: var(--gray-900);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.lf-card-title {
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--white);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.lf-hint { font-size: .8rem; color: var(--gray-400); margin-top: -8px; }

.form-label--required::after {
  content: ' *';
  color: var(--red);
}

/* File upload */
.file-upload-area {
  border: 2px dashed var(--border-input);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.file-upload-area:hover,
.file-upload-area.dragover {
  border-color: var(--red);
  background: rgba(204,0,0,.04);
}
.file-upload-input {
  display: none;
}
.file-upload-body { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--gray-400); }
.file-upload-body svg { color: var(--gray-500); }
.file-upload-browse { color: var(--red); cursor: pointer; text-decoration: underline; }

.file-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.file-preview-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--gray-800);
}
.file-preview-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-preview-remove {
  position: absolute;
  top: 4px; right: 4px;
  background: rgba(0,0,0,.7);
  color: var(--white);
  border: none; border-radius: 50%;
  width: 22px; height: 22px;
  font-size: 11px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.file-preview-badge {
  position: absolute;
  bottom: 4px; left: 4px;
  background: var(--red);
  color: var(--white);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
}
.file-preview-item { cursor: grab; }
.file-preview-item.dragging { opacity: .4; }
.file-preview-cover {
  position: absolute;
  bottom: 4px; left: 4px;
  background: rgba(0,0,0,.7);
  color: var(--white);
  border: none; border-radius: 3px;
  font-size: 10px; padding: 2px 6px; cursor: pointer;
  opacity: 0; transition: opacity .15s;
}
.file-preview-item:hover .file-preview-cover { opacity: 1; }

/* Existing photos (edit mode) */
.existing-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}
.existing-photo {
  position: relative;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  border: 2px solid transparent;
  transition: border-color var(--transition);
}
.existing-photo input[type=checkbox] { position: absolute; opacity: 0; }
.existing-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity var(--transition); }
.existing-photo:has(input:checked) { border-color: var(--color-success); }
.existing-photo.photo-removed img { opacity: .3; }
.existing-photo.photo-removed { border-color: var(--color-error); }
.existing-photo-remove {
  position: absolute;
  top: 4px; right: 4px;
  background: rgba(0,0,0,.7);
  color: var(--white);
  font-size: 11px;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}

/* Checkbox group (surfaces) */
.checkbox-group { display: flex; flex-wrap: wrap; gap: 8px; }
.checkbox-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--gray-800);
  border: 1.5px solid var(--border-input);
  border-radius: 20px;
  padding: 5px 14px;
  cursor: pointer;
  font-size: .85rem;
  color: var(--gray-300);
  transition: border-color var(--transition), color var(--transition), background var(--transition);
  user-select: none;
}
.checkbox-chip input { display: none; }
.checkbox-chip:has(input:checked) {
  border-color: var(--red);
  color: var(--white);
  background: rgba(204,0,0,.08);
}

/* Checkbox label (whatsapp) */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: .9rem;
  color: var(--gray-300);
  line-height: 1.4;
}
.checkbox-label input[type=checkbox] { margin-top: 2px; accent-color: var(--red); }

.form-textarea--sm { min-height: 80px; }

/* Small variant for filters inside sidebars */
.form-input--sm {
  padding: 8px 12px;
  font-size: .82rem;
}

/* Submit area */
.lf-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 8px 0 24px;
}

@media (max-width: 1024px) {
  .listings-layout { grid-template-columns: 240px 1fr; }
  .listings-layout .listings-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr 1fr; }
  .listing-detail-layout { grid-template-columns: 1fr; }
  .listing-contact-card { position: static; }
  .vehicle-layout { grid-template-columns: 1fr; }
  .vehicle-sidebar { position: static; }
  .specs-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --header-h: 60px; }

  .nav-desktop { display: none; }
  .hamburger   { display: flex; }

  .listings-layout { grid-template-columns: 1fr; }
  .filters-panel { display: none; }
  .filters-toggle { display: flex; }
  .make-header { flex-direction: column; align-items: flex-start; gap: 12px; }

  .footer-top { grid-template-columns: 1fr 1fr; gap: 24px; }
  .megamenu-grid { grid-template-columns: repeat(5, 1fr); }

  .form-row { grid-template-columns: 1fr; }

  .hero { padding: 50px 0 40px; min-height: 0; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
  .hero-search-dropdowns { grid-template-columns: 1fr 1fr; }
  .hero-search-sliders { grid-template-columns: 1fr 1fr; }
  .hero-search-sliders .hero-search-btn { grid-column: 1 / -1; }

  .admin-wrap { flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; position: static; }
  .account-layout { grid-template-columns: 1fr; }
  .account-sidebar { position: static; }
  .account-stats { grid-template-columns: repeat(2, 1fr); }
  .my-listing-row { grid-template-columns: 60px 1fr auto; }
  .my-listing-price, .my-listing-actions { display: none; }

  .spec-grid { grid-template-columns: 1fr; }
  .specs-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-thumbs { grid-template-columns: repeat(4, 1fr); }
  .brands-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .listings-grid { grid-template-columns: repeat(2, 1fr); }
  .listings-layout .listings-grid { grid-template-columns: repeat(2, 1fr); }

  /* Padding bottom for mobile bottom bar */
  body.has-bottom-bar { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-stats { grid-template-columns: 1fr; }
  .hero-search-dropdowns,
  .hero-search-sliders { grid-template-columns: 1fr; }
  .hero-search-sliders .hero-search-btn { grid-column: 1; }
  .types-grid { grid-template-columns: repeat(2, 1fr); }
  .listings-grid { grid-template-columns: 1fr; }
  /* Footer: 2 cols on mobile - brand spans both, then 2+2+1 */
  .footer-top { grid-template-columns: 1fr 1fr; gap: 24px 20px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-brand .footer-desc { max-width: 100%; }
  .admin-content { padding: 16px; }
  .brands-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .listings-grid { grid-template-columns: 1fr; }
  .listings-layout .listings-grid { grid-template-columns: 1fr; }
  .specs-grid { grid-template-columns: 1fr; }
  .gallery-thumbs { grid-template-columns: repeat(3, 1fr); }
}

/* ── Listing card - improved ────────────────────────────────────── */
.listing-card-type-pill {
  position: absolute;
  bottom: 10px; left: 10px;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(4px);
  color: var(--gray-300);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 3px 9px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.1);
}
.listing-card-img::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 48%;
  background: linear-gradient(transparent, rgba(0,0,0,.5));
  pointer-events: none;
}
.listing-card-make {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--red);
  margin-bottom: 4px;
}
.listing-card-specs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-bottom: 14px;
}
.lc-spec {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--gray-300);
  white-space: nowrap;
}
.lc-spec--hp { color: var(--gray-400); font-weight: 600; }
.lc-spec--loc { color: var(--gray-500); }
.lc-spec svg { flex-shrink: 0; }
.lc-price-wrap {}
.lc-btn { flex-shrink: 0; }

/* ── Error pages (404, 403, 500) ────────────────────────────────── */
.error-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding: 60px 0;
}
.error-inner {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}
.error-code {
  font-family: var(--font-head);
  font-size: clamp(80px, 20vw, 160px);
  line-height: 1;
  color: var(--red);
  letter-spacing: -.04em;
  text-shadow: 0 0 60px rgba(204,0,0,.25);
  margin-bottom: -8px;
}
.error-flag {
  font-size: 52px;
  margin-bottom: 20px;
  display: block;
}
.error-title {
  font-size: clamp(22px, 4vw, 34px);
  margin-bottom: 14px;
  color: var(--white);
}
.error-desc {
  font-size: 15px;
  color: var(--gray-500);
  line-height: 1.7;
  margin-bottom: 36px;
}
.error-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── CookieYes - push above mobile bottom bar ───────────────────── */
@media (max-width: 1024px) {
  /* Banner / consent bar */
  .cky-consent-container,
  #cky-consent,
  .cky-consent-bar,
  div[class*="cky-consent"],
  div[id*="cky-consent"] {
    bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
  }
  /* Revisit / floating button */
  .cky-btn-revisit-wrapper,
  #cky-btn-revisit,
  .cky-revisit-bottom-left,
  .cky-revisit-bottom-right {
    bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* ── CookieYes - enforce accessible brand red (#cc0000), overrides inline styles ── */
.cky-btn-customize {
  color: #cc0000 !important;
  border-color: #cc0000 !important;
}
.cky-btn-accept,
.cky-btn-reject,
[data-cky-tag="accept-button"],
[data-cky-tag="reject-button"] {
  background-color: #cc0000 !important;
  border-color: #cc0000 !important;
  color: #ffffff !important;
}

/* ── Breadcrumbs - ensure list-style none ──────────────────────── */
.breadcrumb-list { list-style: none; }

/* ── Rally class chip ─────────────────────────────────────────── */
.lc-spec--class { color: var(--primary); font-weight: 600; }

/* ── Type page: short_desc and long_desc ─────────────────────── */
.type-short-desc {
  color: var(--gray-400);
  font-size: 15px;
  max-width: 780px;
  margin-top: 12px;
  line-height: 1.6;
}

/* ── Light section - breaks up the dark theme ────────────────── */
.section--light {
  background: var(--gray-100);
  color: var(--gray-700);
}
.section--light .section-title      { color: var(--black-soft); }
.section--light .section-title span { color: var(--red); }
.section--light .section-head .btn-ghost {
  color: var(--gray-600);
  border-color: var(--gray-300);
}
.section--light .section-head .btn-ghost:hover {
  color: var(--red-dark);
  border-color: var(--red-dark);
}
/* type-card and brand-card stay dark - contrast cards on light bg */
.section--light .type-card  { box-shadow: 0 2px 12px rgba(0,0,0,.12); }
.section--light .brand-card { box-shadow: 0 2px 12px rgba(0,0,0,.12); }
.section--light .brand-card-name   { color: var(--gray-300); }
.section--light .brand-card-text   { color: #2a2a2a; } /* dark on white logo box - AA */

.type-long-desc-section {
  border-top: 1px solid var(--border);
  background: var(--gray-100);
}
.type-long-desc {
  font-size: 15px;
  line-height: 1.85;
  color: var(--gray-700);
}
.type-long-desc h2 {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 28px 0 10px;
  color: var(--black);
}
.type-long-desc h3 {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  margin: 20px 0 8px;
  color: var(--black-soft);
}
.type-long-desc p  { margin: 0 0 14px; }
.type-long-desc ul,
.type-long-desc ol { margin: 0 0 14px 20px; }
.type-long-desc li { margin-bottom: 4px; }
.type-long-desc strong { color: var(--black); }
.type-long-desc a  { color: var(--red-dark); text-decoration: underline; }

/* read-more inside a light section - fade to gray-100 */
.type-long-desc-section .read-more-content.collapsed { max-height: 280px; overflow: hidden; }
.type-long-desc-section .read-more-fade {
  background: linear-gradient(to bottom, transparent, var(--gray-100));
}
.type-long-desc-section .read-more-btn {
  color: var(--black-soft);
  border-color: var(--gray-400);
}
.type-long-desc-section .read-more-btn:hover { color: var(--red-dark); border-color: var(--red-dark); }

/* ── Ads hub page ─────────────────────────────────────────────── */
.ads-categories {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.ads-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: .15s;
}
.ads-cat--active {
  background: var(--primary);
  color: #fff;
  cursor: pointer;
}
.ads-cat--soon {
  background: var(--gray-100);
  color: var(--gray-400);
  border-color: var(--gray-200);
}
.ads-cat--soon small {
  font-size: 10px;
  font-weight: 400;
  opacity: .7;
}

/* ── Static page content ─────────────────────────────────────────── */
.page-content.prose {
  color: var(--gray-300);
  line-height: 1.8;
  font-size: 1rem;
}
.page-content.prose h2 { font-family: var(--font-head); font-size: 1.35rem; color: var(--white); margin: 2em 0 .6em; }
.page-content.prose h3 { font-family: var(--font-head); font-size: 1.1rem; color: var(--gray-200); margin: 1.6em 0 .5em; }
.page-content.prose p  { margin-bottom: 1em; }
.page-content.prose ul,
.page-content.prose ol { margin: 0 0 1em 1.4em; }
.page-content.prose li { margin-bottom: .4em; }
.page-content.prose a  { color: var(--red); text-decoration: underline; }
.page-content.prose strong { color: var(--white); }

/* ── Type subcategory navigation chips ──────────────────────────── */
.type-subcats-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.type-subcat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--gray-900);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--gray-300);
  font-size: 13px;
  text-decoration: none;
  transition: var(--transition);
}
.type-subcat-chip:hover {
  border-color: var(--red);
  color: var(--white);
  background: var(--red);
}
.type-subcat-count {
  background: var(--red);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  border-radius: 20px;
  padding: 1px 6px;
  line-height: 1.4;
}

/* ── Browse more (vehicle page internal linking) ────────────────── */
.browse-more-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.browse-more-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: var(--transition);
}
.browse-more-card:hover { border-color: var(--red); transform: translateY(-2px); box-shadow: var(--shadow); }
.browse-more-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--gray-500); }
.browse-more-title { font-family: var(--font-head); font-size: 1.05rem; color: var(--black); }
.browse-more-arrow { font-size: 13px; color: var(--red); margin-top: 4px; }

/* ── Browse by location (home) ──────────────────────────────────── */
.location-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.location-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--gray-900);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--gray-300);
  text-decoration: none;
  transition: var(--transition);
}
.location-card:hover { border-color: var(--red); color: var(--white); background: rgba(204,0,0,.06); }
.location-card svg { color: var(--red); flex-shrink: 0; }
.location-name { flex: 1; font-size: 14px; }
.location-count {
  background: var(--gray-800); color: var(--gray-300);
  font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
  white-space: nowrap; flex-shrink: 0;
  text-align: center; line-height: 1.4;
}

/* ── Section subtitle (under section-title) ─────────────────────── */
.section-subtitle {
  color: var(--gray-400);
  font-size: 15px;
  max-width: 720px;
  margin: -8px 0 22px;
  line-height: 1.6;
}
.section--light .section-subtitle { color: var(--gray-600); }

/* ── Required field validation highlight (listing form) ─────────── */
.field-invalid .form-input,
.field-invalid .form-input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 2px rgba(204,0,0,.25);
}
.field-invalid .form-label { color: var(--red); }

/* ── Admin toolbar (WordPress-style, only for logged-in admin) ──── */
.admin-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 38px;
  background: #1d1d1d;
  border-bottom: 1px solid #333;
  z-index: 1100;
}
.admin-bar-inner {
  display: flex;
  align-items: center;
  height: 38px;
  padding: 0 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.admin-bar-inner::-webkit-scrollbar { display: none; }
.admin-bar a {
  color: #cfcfcf;
  font-size: 13px;
  line-height: 38px;
  padding: 0 12px;
  white-space: nowrap;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.admin-bar a:hover { color: #fff; background: #2a2a2a; }
.admin-bar-brand { font-weight: 700; color: #fff !important; }
.admin-bar-brand span { color: var(--red); }
.admin-bar-add { color: #fff !important; }
.admin-bar-spacer { flex: 1 1 auto; }

/* Push header + content down when the admin bar is present */
body.has-admin-bar .site-header { top: 38px; }
body.has-admin-bar { padding-top: calc(var(--header-h) + 38px); }

/* Read more on dark vehicle description - white (red fails contrast on dark) */
.vehicle-section .read-more-btn { color: var(--white); text-decoration: underline; }
.vehicle-section .read-more-btn:hover { color: var(--gray-300); }

/* ── Language switcher ────────────────────────────────────────────── */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}
.lang-switch a,
.lang-switch span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 20px;
  border-radius: 3px;
  font-size: 17px;
  line-height: 1;
  text-decoration: none;
  transition: opacity .15s, transform .15s;
  cursor: pointer;
  border: 1.5px solid transparent;
}
.lang-switch a:hover { opacity: .75; transform: scale(1.1); }
.lang-switch .lang-active {
  border-color: var(--red);
  opacity: 1;
  pointer-events: none;
}
/* Footer variant - slightly smaller */
.footer-lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
}
.footer-lang-switch a,
.footer-lang-switch span {
  font-size: 20px;
  text-decoration: none;
  transition: opacity .15s, transform .15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 24px;
  border-radius: 4px;
  border: 1.5px solid transparent;
}
.footer-lang-switch a:hover { opacity: .75; transform: scale(1.08); }
.footer-lang-switch .lang-active { border-color: var(--red); pointer-events: none; }
/* Mobile nav lang switch */
.mob-lang-switch {
  display: flex;
  gap: 8px;
  padding: 12px 20px 4px;
  border-top: 1px solid var(--gray-800);
  margin-top: 8px;
}
.mob-lang-switch a,
.mob-lang-switch span {
  font-size: 22px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 26px;
  border-radius: 4px;
  border: 1.5px solid transparent;
  transition: opacity .15s;
}
.mob-lang-switch a:hover { opacity: .75; }
.mob-lang-switch .lang-active { border-color: var(--red); pointer-events: none; }

/* ── Parts / Rent sub-tabs (type pages) ──────────────────────────── */
.type-sub-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.type-sub-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-300);
  text-decoration: none;
  transition: border-color .15s, color .15s, background .15s;
}
.type-sub-tab:hover {
  border-color: var(--red);
  color: #fff;
}
.type-sub-tab--active {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}
.type-sub-tab--soon {
  opacity: .5;
  cursor: default;
  pointer-events: none;
}

/* ── Category chips (rent/parts index pages) ─────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}
.chip--outline {
  border: 1.5px solid var(--border);
  color: var(--gray-300);
}
.chip--outline:hover {
  border-color: var(--red);
  color: #fff;
  background: var(--red);
}

/* ── Listing count inline (H1) ───────────────────────────────────── */
.listing-count-inline {
  font-size: 0.55em;
  font-weight: 400;
  color: var(--gray-500);
  vertical-align: middle;
}

/* ── Part / Rental card badges ───────────────────────────────────── */
.listing-card-badge--part { background: #2563eb; }
.listing-card-badge--rent { background: #7c3aed; }

/* ════════════════════════════════════════════════════════════════════
   Unified Add Listing — type picker & animated sections
   ════════════════════════════════════════════════════════════════════ */

/* Info banner */
.al-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--red);
  color: #fff;
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 24px;
}

/* Type picker row */
.al-type-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

/* Individual type button */
.al-type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 16px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  transition: border-color .18s, background .18s, transform .12s;
  color: var(--gray-300);
}
.al-type-btn:hover {
  border-color: var(--gray-500);
  background: var(--surface-2);
}
.al-type-btn--active {
  border-color: var(--red);
  background: rgba(220,38,38,.08);
  color: #fff;
}
.al-type-btn--active .al-type-icon {
  color: var(--red);
}
.al-type-icon {
  color: var(--gray-500);
  transition: color .18s;
  line-height: 1;
}
.al-type-label {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
}
.al-type-desc {
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.4;
}
.al-type-btn--active .al-type-desc {
  color: var(--gray-400);
}

/* Animated section reveal */
.al-section {
  transition: opacity .22s ease, transform .22s ease;
}
.al-section[hidden] {
  display: none !important;
}
.al-section.al-in {
  animation: alFadeIn .22s ease both;
}
@keyframes alFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Mobile: stack type picker */
@media (max-width: 540px) {
  .al-type-picker {
    grid-template-columns: 1fr;
  }
  .al-type-btn {
    flex-direction: row;
    text-align: left;
    padding: 14px 16px;
    gap: 14px;
  }
  .al-type-desc { display: none; }
}
