/* ============================================================
   Towncar 차량검색 — 공용 스타일 (타운카 디자인 시스템 기반)
   ============================================================ */
/* 기존 변수 → 타운카 디자인 시스템(tds v0.2.3) 토큰 매핑
   tds.css(토큰)가 먼저 로드되어야 한다 */
:root {
  --color-white: var(--tds-static-white);
  --color-neutral-50: var(--tds-background-general-alternative);
  --color-neutral-800: var(--tds-secondary-general);
  --text-general: var(--tds-text-general);
  --text-heavy: var(--tds-text-heavy);
  --text-neutral: var(--tds-text-neutral);
  --text-alternative: var(--tds-text-alternative);
  --text-assistive: var(--tds-text-assistive);
  --bg-general: var(--tds-background-general-general);
  --bg-alternative: var(--tds-background-general-alternative);
  --line-general: var(--tds-line-general-general);
  --line-heavy: var(--tds-line-general-heavy);
  --line-alternative: var(--tds-line-general-alternative);
  --primary: var(--tds-primary-general);
  --primary-dark: color-mix(in srgb, var(--tds-primary-general) 88%, black);
  --primary-tint: color-mix(in srgb, var(--tds-primary-general) 15%, transparent);
  --point-yellow: var(--tds-point-general-yellow);
  --point-yellow-tint: var(--tds-point-soft-yellow);
  --inverse-bg: var(--tds-inverse-background);
  --inverse-text: var(--tds-inverse-text);
  --status-negative: var(--tds-status-negative);
  --radius-card: 16px;
  --radius-btn: 10px;
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-card-hover: 0 4px 24px rgba(0, 0, 0, 0.10);
  --shadow-float: 0 8px 32px rgba(0, 0, 0, 0.14);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
/* 모바일: 탭 하이라이트 제거 + 더블탭 확대 방지 (핀치 줌은 유지) */
html, body { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
body {
  font-family: 'Pretendard', 'Noto Sans KR', -apple-system, sans-serif;
  color: var(--text-general);
  background: var(--bg-general);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .container { padding: 0 16px; } }

/* ---------- 헤더 (towncar.co.kr 동일) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-alternative);
}
.site-header .inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 67px;
}
.nav-left { display: flex; align-items: center; gap: 28px; }
.logo { display: flex; align-items: center; }
.logo img { height: 19px; }
.nav-menu { display: flex; align-items: center; }
.nav-menu a {
  font-size: 15px; font-weight: 500; color: #354044;
  padding: 14px 12px;
}
.nav-menu a:hover { color: var(--text-heavy); }
.nav-cta {
  display: inline-flex; align-items: center; justify-content: center;
  background: #50DCAE; color: #fff;
  font-size: 14px; font-weight: 500;
  border-radius: 8px; padding: 12px 32px;
  transition: filter .2s;
}
.nav-cta:hover { filter: brightness(0.95); }
@media (max-width: 640px) {
  .nav-menu { display: none; }
  .nav-cta { padding: 10px 20px; }
}

/* ---------- 버튼 ---------- */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--primary); color: #fff;
  border: none; border-radius: var(--radius-btn);
  padding: 13px 24px; font-size: 16px; font-weight: 700;
  transition: background .2s;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary.sm { padding: 9px 16px; font-size: 14px; }
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: transparent; color: var(--text-general);
  border: 1px solid var(--line-heavy); border-radius: var(--radius-btn);
  padding: 12px 23px; font-size: 15px; font-weight: 600;
  transition: border-color .2s, background .2s;
}
.btn-outline:hover { border-color: var(--text-general); }
.btn-ghost {
  background: transparent; border: none; color: var(--text-neutral);
  padding: 10px 14px; font-size: 14px; font-weight: 500; border-radius: 8px;
}
.btn-ghost:hover { background: var(--bg-alternative); }

/* ---------- 뱃지 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--primary-tint); color: var(--primary);
  border-radius: 999px; padding: 4px 12px;
  font-size: 12.5px; font-weight: 600; line-height: 1.4;
}
.badge-neutral { background: var(--bg-alternative); color: var(--text-neutral); }
.badge-yellow { background: var(--point-yellow-tint); color: #8B6A00; }
.badge-outline { background: #fff; color: var(--text-neutral); border: 1px solid var(--line-general); }

/* ---------- 푸터 (towncar.co.kr 동일: 라이트 그레이) ---------- */
.site-footer {
  background: #F6F6F6;
  padding: 80px 0 100px; margin-top: 96px;
  line-height: 1.7;
}
.footer-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px;
  padding-bottom: 48px; border-bottom: 1px solid rgba(23, 23, 25, 0.08);
}
@media (max-width: 960px) { .footer-grid { grid-template-columns: repeat(3, 1fr); row-gap: 36px; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
.footer-col { display: flex; flex-direction: column; gap: 9px; }
.footer-col .col-title { font-size: 14px; font-weight: 600; color: #354044; margin-bottom: 4px; }
.footer-col a { font-size: 12px; font-weight: 500; color: #616F72; }
.footer-col a:hover { color: #354044; }
.footer-info { padding-top: 40px; }
.footer-logo { height: 36px; margin-bottom: 20px; }
.footer-info .company { font-size: 12px; color: #616F72; margin-bottom: 16px; }
.legal-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; }
.legal-links a { font-size: 12px; font-weight: 500; color: #616F72; text-decoration: underline; text-underline-offset: 2px; }
.legal-links a:hover { color: #354044; }

/* ---------- 스켈레톤 ---------- */
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
.skeleton {
  background: linear-gradient(90deg, #f0f0f1 25%, #f8f8f9 50%, #f0f0f1 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
}

/* ---------- 유틸 ---------- */
.text-alt { color: var(--text-alternative); }
.divider { border: none; border-top: 1px solid var(--line-general); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- 차량 카드 (검색·상세 공용) ---------- */
.car-card { display: block; border-radius: var(--radius-card); }
.car-card .thumb {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-card);
  overflow: hidden; background: var(--bg-alternative);
}
.car-card .thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s ease;
}
.car-card:hover .thumb img { transform: scale(1.04); }
.car-card .meta { padding: 12px 4px 0; }
/* 주소 (차량명 아래, 상세모델명 자리) */
.car-card .region {
  font-size: 12.5px; color: var(--text-alternative); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.car-card .region .dist { color: var(--primary); font-weight: 500; }
.car-card .name { font-size: 16.5px; font-weight: 700; letter-spacing: -0.3px; margin-top: 2px; }
.car-card .trim {
  font-size: 12.5px; color: var(--text-alternative); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.car-card .price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.car-card .price { font-size: 17px; font-weight: 700; }
.car-card .price small { font-size: 13px; font-weight: 500; color: var(--text-alternative); }
.car-card .perkm { font-size: 12px; color: var(--text-assistive); }
