:root {
  --brand: #0EA5E9;
  --brand-light: #38BDF8;
  --brand-dark: #0284C7;
  --brand-muted: #E0F2FE;
  --brand-rgb: 14, 165, 233;
  --wing: var(--brand);
  --wing-light: var(--brand-light);
  --brand-wing: #007dd1;
  --navy: #0F172A;
  --navy-mid: #1E293B;
  --navy-soft: #334155;
  --purple: #7C3AED;
  --purple-deep: #5B21B6;
  --purple-soft: #A78BFA;
  --pro-red: var(--purple);
  --dark: #0F172A;
  --mid: #475569;
  --light: #94A3B8;
  --bg: #F1F5F9;
  --white: #FFFFFF;
  --border: #E2E8F0;
  --card-shadow: 0 2px 16px rgba(15, 23, 42, 0.07);
  --sidebar-w: 240px;
}

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

body {
  font-family: var(--font-sans, 'Noto Sans KR', 'Noto Sans', 'DM Sans', sans-serif);
  background: var(--bg);
  color: var(--dark);
  font-size: 14px;
  line-height: 1.6;
}

/* ── TOP BAR ── */
.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 24px; height: 44px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--light);
}
.topbar-right { display: flex; gap: 16px; }
.topbar-right a { color: var(--mid); text-decoration: none; font-size: 12px; }
.topbar-right a:hover { color: var(--wing); }

/* ── HEADER ── */
header {
  background-color: #ffffff;
  background: var(--white, #ffffff);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px;
  min-height: 84px;
  height: auto;
  display: flex; align-items: center; gap: 24px;
  background-color: #ffffff;
  background: inherit;
}
.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}
.header-logo-img {
  display: block;
  height: 45px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}
.brand-logo {
  font-family: var(--font-sans, 'DM Sans', 'Noto Sans KR', sans-serif);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--dark);
  line-height: 1;
}
.brand-logo .brand-wing { color: var(--brand-wing); }
.logo-text.brand-logo { font-size: 22px; }
.search-wrap {
  flex: 1; max-width: 420px;
  display: flex; align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 8px; overflow: hidden;
}
.search-wrap:focus-within { border-color: var(--wing); }
.search-wrap input {
  flex: 1; border: none; outline: none;
  padding: 10px 14px; font-size: 13px;
  color: var(--dark); background: transparent; font-family: inherit;
}
.search-wrap input::placeholder { color: var(--light); }
.offer-btn {
  background: var(--wing); color: white;
  border: none; cursor: pointer;
  padding: 10px 18px; font-size: 13px; font-weight: 600;
  white-space: nowrap; font-family: inherit; transition: background 0.2s;
}
.offer-btn:hover { background: var(--wing-light); }
.header-icons {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  margin-inline-start: auto;
  margin-inline-end: 0;
  flex-shrink: 0;
}
.header-icon-btn,
.header-icons > a {
  color: var(--mid);
  text-decoration: none;
  font-size: 18px;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}
.header-icon-btn:hover,
.header-icons > a:hover { color: var(--wing); }

.lang-switcher { position: relative; }
.lang-switcher.is-open .lang-switcher-toggle { color: var(--wing); }
.lang-switcher-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: auto;
  min-width: 140px;
  padding: 6px 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  z-index: 200;
}
.lang-switcher-panel[hidden] { display: none !important; }
.lang-switcher-option {
  display: block;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--dark);
  text-decoration: none;
  white-space: nowrap;
}
.lang-switcher-option:hover { background: #f1f5f9; color: var(--wing); }
.lang-switcher-option.is-active {
  font-weight: 700;
  color: var(--wing);
  background: #f0f9ff;
}

[dir="rtl"] .header-inner { direction: ltr; }
[dir="rtl"] .header-icons {
  direction: ltr;
  flex-direction: row;
}
[dir="rtl"] .lang-switcher-panel { right: 0; left: auto; }

/* ── NAV ── */
.site-nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; gap: 0;
}
.nav-inner a {
  display: block; padding: 14px 20px;
  font-size: 13px; font-weight: 500;
  color: var(--mid); text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.nav-inner a:hover, .nav-inner a.active {
  color: var(--wing); border-bottom-color: var(--wing);
}

/* ── PAGE LAYOUT ── */
.page-wrap {
  max-width: 1200px; margin: 0 auto;
  padding: 24px 24px 60px;
  display: flex; gap: 24px; align-items: flex-start;
}

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky; top: 88px;
}
.sidebar-card {
  background: var(--white);
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
}
.sidebar-card > .certified-block:first-child {
  border-radius: 11px 11px 0 0;
}
.sidebar-card > .sidebar-section:last-child {
  border-radius: 0 0 11px 11px;
}
.sidebar-section {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.sidebar-section:last-child { border-bottom: none; }
.sidebar-title {
  font-size: 12px; font-weight: 700; color: var(--dark);
  text-transform: uppercase; letter-spacing: 0.6px;
  margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer;
}
.sidebar-title .arrow { color: var(--light); font-size: 11px; }

/* Wing Certified Toggle */
.certified-block {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.certified-label {
  font-size: 13px; font-weight: 600; color: var(--dark);
}
.toggle {
  position: relative; width: 40px; height: 22px;
  background: var(--border); border-radius: 11px;
  cursor: pointer; transition: background 0.2s;
}
.toggle.on { background: var(--wing); }
.toggle::after {
  content: ''; position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  background: white; border-radius: 50%;
  transition: left 0.2s;
}
.toggle.on::after { left: 21px; }

/* Inspected Badge */
.inspected-block {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}
.inspected-tag {
  display: inline-block;
  background: var(--wing); color: white;
  font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: 5px;
  letter-spacing: 0.3px;
}

/* Vehicle Type Buttons */
.type-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
}
.type-btn {
  border: 1.5px solid var(--border);
  background: var(--white); border-radius: 7px;
  padding: 8px 0; text-align: center;
  font-size: 12px; font-weight: 500; color: var(--mid);
  cursor: pointer; transition: all 0.15s; font-family: inherit;
}
.type-btn:hover { border-color: var(--wing); color: var(--wing); }
.type-btn.active {
  border-color: var(--wing); color: var(--wing);
  background: var(--brand-muted); font-weight: 600;
}

/* Maker List */
.maker-list { list-style: none; }
.maker-item { border-bottom: 1px solid var(--border); }
.maker-item:last-child { border-bottom: none; }
.maker-item-link:hover .maker-name { color: var(--wing); }
.maker-left { display: flex; align-items: center; gap: 8px; }
.maker-logo-dot {
  width: 20px; height: 20px;
  border-radius: 50%; background: var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; font-weight: 700; color: var(--mid);
  flex-shrink: 0;
}
.maker-name { font-size: 12px; color: var(--dark); }
.maker-count { font-size: 11px; color: var(--light); }

.sidebar-maker-filters .filter-select {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--dark);
}
.sidebar-maker-filters .filter-range-label + .filter-range-label {
  margin-top: 10px;
}
.sidebar-subtitle {
  font-size: 11px;
  font-weight: 600;
  color: var(--mid);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.sidebar-popular-makers {
  padding-top: 4px;
}

/* Sidebar filter panels (L-11h) */
.sidebar-filter-panel {
  border-bottom: 1px solid var(--border);
}
.sidebar-filter-panel summary {
  padding: 12px 18px;
  font-size: 12px;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  list-style: none;
}
.sidebar-filter-panel summary::-webkit-details-marker { display: none; }
.sidebar-filter-panel[open] summary { color: var(--wing); }
.filter-panel-body {
  padding: 0 18px 14px;
  display: grid;
  gap: 10px;
}
.filter-range-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--mid);
}
.filter-range-label input {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
}
.filter-select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  background: var(--white);
}
.sidebar-filter-actions {
  padding: 14px 18px;
  display: grid;
  gap: 10px;
}
.sidebar-apply-btn {
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  background: var(--wing);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.sidebar-apply-btn:hover { background: var(--wing-light); }
.sidebar-reset-link {
  text-align: center;
  font-size: 12px;
  color: var(--mid);
  text-decoration: none;
}
.sidebar-reset-link:hover { color: var(--wing); }
.sidebar-clear-btn {
  display: block;
  margin: 8px 18px 0;
  font-size: 11px;
  color: var(--wing);
  text-decoration: none;
}
.sidebar-filter-note {
  margin: 0;
  padding: 10px 18px;
  font-size: 11px;
  color: var(--light);
  border-bottom: 1px solid var(--border);
}
.maker-item-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 0;
  text-decoration: none;
  color: inherit;
}
.type-btn { text-decoration: none; display: block; }
.search-empty {
  grid-column: 1 / -1;
  padding: 40px;
  text-align: center;
  color: var(--light);
}

/* Search Field */
.search-field {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.search-field input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  padding: 8px 10px;
  font-size: 12px;
  font-family: inherit;
  color: var(--dark);
  background: transparent;
}
.search-field input::placeholder { color: var(--light); }
.search-field button {
  flex-shrink: 0;
  border: none;
  background: var(--border);
  padding: 8px 12px;
  cursor: pointer;
  font-size: 12px;
  color: var(--mid);
  transition: background 0.2s;
}
.search-field button:hover { background: var(--wing); color: white; }

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

/* Results Header */
.results-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.results-count {
  font-size: 18px; font-weight: 700; color: var(--dark);
  display: flex; align-items: center; gap: 8px;
}
.results-count .reset-btn {
  background: none; border: none; cursor: pointer;
  color: var(--light); font-size: 14px; transition: color 0.2s;
}
.results-count .reset-btn:hover { color: var(--wing); }
.results-num {
  color: var(--wing); font-weight: 700;
}

/* Filter Tabs */
.filter-tabs {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.filter-tab {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--mid); cursor: pointer;
}
.filter-tab input[type="checkbox"] {
  accent-color: var(--wing); cursor: pointer;
}
.sort-select {
  margin-left: auto;
  border: 1px solid var(--border); border-radius: 6px;
  padding: 6px 10px; font-size: 12px;
  color: var(--mid); background: var(--white);
  cursor: pointer; outline: none; font-family: inherit;
  appearance: none; padding-right: 24px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
}

/* Car Grid 3-col */
.car-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.car-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  position: relative;
}
.car-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.car-img {
  position: relative; aspect-ratio: 4/3;
  background: #e8e8e8; overflow: hidden;
}
.car-img .img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #888;
}
.car-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.3s;
}
.car-card:hover .car-img img { transform: scale(1.04); }
.inspected-badge {
  position: absolute; top: 8px; left: 8px;
  background: var(--wing); color: white;
  font-size: 9px; font-weight: 700;
  padding: 3px 8px; border-radius: 4px;
  letter-spacing: 0.5px; z-index: 2;
}
.fav-btn {
  position: absolute; top: 8px; right: 8px;
  width: 26px; height: 26px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; z-index: 2;
  transition: background 0.2s;
}
.fav-btn:hover { background: white; }

.car-info { padding: 12px 14px 14px; }
.car-year-make {
  font-size: 10px; color: var(--light);
  text-transform: uppercase; letter-spacing: 0.4px;
  margin-bottom: 3px;
}
.car-name {
  font-size: 13px; font-weight: 600; color: var(--dark);
  margin-bottom: 8px; line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.car-specs {
  display: flex; flex-wrap: wrap; gap: 4px 8px;
  margin-bottom: 10px;
}
.car-spec {
  font-size: 10px; color: var(--light);
  display: flex; align-items: center; gap: 3px;
}
.car-spec::before {
  content: ''; display: inline-block;
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--border);
}
.car-spec:first-child::before { display: none; }
.car-price {
  font-size: 17px; font-weight: 700; color: var(--dark);
  letter-spacing: -0.5px;
}
.car-price sup { font-size: 12px; font-weight: 500; color: var(--mid); }
.car-price .original {
  font-size: 12px; color: var(--light);
  text-decoration: line-through; font-weight: 400;
  margin-right: 4px;
}
.car-price .sale {
  color: var(--pro-red); font-size: 17px; font-weight: 700;
}

/* ── PAGINATION ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 32px 0 0;
  background: transparent;
  border: none;
}
.page-btn {
  min-width: 32px; height: 32px;
  border: 1px solid var(--border); background: var(--white);
  border-radius: 6px; font-size: 13px;
  color: var(--mid); cursor: pointer; font-family: inherit;
  transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.page-btn:hover { border-color: var(--wing); color: var(--wing); }
.page-btn.active {
  background: var(--wing); border-color: var(--wing);
  color: white; font-weight: 600;
}
.page-btn.arrow { font-size: 12px; color: var(--light); }

/* ── FOOTER ── */
footer {
  background: var(--dark);
  padding: 48px 24px;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 40px;
}
.footer-col h4 {
  font-size: 13px; font-weight: 700; color: white;
  margin-bottom: 12px;
}
.footer-col p, .footer-col a {
  font-size: 11px; color: rgba(255,255,255,0.45);
  line-height: 2; display: block; text-decoration: none;
}
.footer-col a:hover { color: var(--wing); }
.footer-logo.brand-logo {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 10px;
}
.footer-logo.brand-logo .brand-wing { color: var(--brand-wing); }
.footer-social {
  display: flex; gap: 10px; margin-top: 12px;
}
.footer-social a {
  width: 28px; height: 28px;
  border-radius: 6px; background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: rgba(255,255,255,0.5);
  transition: all 0.2s; text-decoration: none;
}
.footer-social a:hover { background: var(--wing); color: white; }
.footer-bottom {
  max-width: 1200px; margin: 32px auto 0;
  padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.07);
  display: flex; justify-content: space-between;
  font-size: 11px; color: rgba(255,255,255,0.3);
}
.footer-links { display: flex; gap: 20px; }
.footer-links a {
  color: rgba(255,255,255,0.3); text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: rgba(255,255,255,0.7); }

/* ── QUICK BTN ── */
.quick-btn {
  position: fixed; right: 0; top: 50%;
  transform: translateY(-50%);
  background: var(--wing); color: white;
  padding: 14px 10px;
  writing-mode: vertical-rl;
  font-size: 11px; font-weight: 700; letter-spacing: 1px;
  cursor: pointer; border-radius: 8px 0 0 8px; z-index: 200;
  box-shadow: -2px 0 12px rgba(var(--brand-rgb), 0.35);
}

@media (max-width: 960px) {
  .sidebar { display: none; }
  .header-logo-img { height: 38px; max-width: 152px; }
  .car-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .car-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}
