/* Pinoy Next Gen Auto — clean dealer site. Barlow Condensed headlines, red accent. */
:root {
  --red: #c8102e;
  --red-dark: #9e0c24;
  --ink: #16181d;
  --ink-soft: #3c4048;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #ffffff;
  --bg-soft: #f6f7f8;
  --green: #157347;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 4px 14px rgba(0, 0, 0, .06);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: "Barlow", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink); background: var(--bg); font-size: 16px; line-height: 1.5;
}
h1, h2, h3, h4, .headline { font-family: "Barlow Condensed", "Barlow", sans-serif; font-weight: 600; letter-spacing: .01em; line-height: 1.08; margin: 0 0 .5rem; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.35rem; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-family: "Barlow Condensed", sans-serif; font-weight: 700; font-size: 1.5rem; letter-spacing: .02em; }
.brand:hover { text-decoration: none; }
.brand-mark { background: var(--red); color: #fff; border-radius: 6px; padding: 2px 9px; font-size: 1.25rem; }
.brand small { display: block; font-family: "Barlow", sans-serif; font-weight: 500; font-size: .68rem; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; }
.main-nav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.main-nav a { color: var(--ink-soft); padding: 8px 11px; border-radius: 8px; font-weight: 600; font-size: .95rem; }
.main-nav a:hover { background: var(--bg-soft); text-decoration: none; color: var(--ink); }
.main-nav a.active { color: var(--red); }
.header-phone { font-weight: 700; color: var(--ink); white-space: nowrap; }
.header-phone:hover { color: var(--red); text-decoration: none; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 1.1rem; cursor: pointer; }

/* Buttons */
.btn { display: inline-block; background: var(--red); color: #fff; border: none; border-radius: 8px; padding: 12px 20px; font-weight: 700; font-size: 1rem; cursor: pointer; text-align: center; }
.btn:hover { background: var(--red-dark); text-decoration: none; color: #fff; }
.btn.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.secondary:hover { background: var(--bg-soft); color: var(--ink); }
.btn.dark { background: var(--ink); }
.btn.dark:hover { background: #000; }
.btn.block { display: block; width: 100%; }
.btn:disabled { opacity: .6; cursor: wait; }

/* Hero */
.hero { background: linear-gradient(180deg, #14161b 0%, #23262e 100%); color: #fff; padding: 56px 0 48px; }
.hero h1 { color: #fff; }
.hero h1 span { color: #ff5a6e; }
.hero p.lede { font-size: 1.15rem; color: #d4d7dd; max-width: 640px; }
.hero-search { display: flex; gap: 8px; max-width: 640px; margin: 22px 0 10px; }
.hero-search input { flex: 1; padding: 13px 14px; border-radius: 8px; border: 1px solid transparent; font-size: 1rem; min-width: 0; }
.hero-stats { display: flex; gap: 28px; margin-top: 26px; flex-wrap: wrap; }
.hero-stats b { display: block; font-family: "Barlow Condensed", sans-serif; font-size: 1.9rem; line-height: 1; }
.hero-stats span { color: #b9bec7; font-size: .9rem; }

/* Sections */
.section { padding: 44px 0; }
.section.soft { background: var(--bg-soft); }
.section-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.section-head a { margin-left: auto; font-weight: 700; }

/* Vehicle cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.card:hover { border-color: #d4d7dd; }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #eceff1; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-family: "Barlow Condensed", sans-serif; font-size: 1.35rem; font-weight: 600; line-height: 1.1; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--red); }
.card-price { font-size: 1.3rem; font-weight: 800; color: var(--red); }
.card-price small { font-size: .85rem; font-weight: 600; color: var(--muted); }
.card-meta { color: var(--muted); font-size: .9rem; display: flex; gap: 10px; flex-wrap: wrap; }
.badge { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; }
.badge.new { background: #e8f5ee; color: var(--green); }
.badge.used { background: #eef2ff; color: #2f3a8f; }
.badge.demo { background: #fff4d6; color: #7a5200; }
.badge.sold { background: #fdeaea; color: var(--red); }
.card .btn { margin-top: auto; }

/* Filters */
.filters { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.filters label { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); display: block; margin-bottom: 4px; }
.filters select, .filters input { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 1rem; background: #fff; }
.filter-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-tabs button { border: 1px solid var(--line); background: #fff; padding: 9px 16px; border-radius: 999px; font-weight: 700; cursor: pointer; }
.filter-tabs button.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.result-count { color: var(--muted); margin-bottom: 14px; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }

/* Vehicle detail */
.crumbs { font-size: .9rem; color: var(--muted); margin: 18px 0 12px; }
.vehicle-head { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 18px; }
.vehicle-head h1 { flex: 1; min-width: 260px; }
.vehicle-price { text-align: right; }
.vehicle-price .price { font-size: 2rem; font-weight: 800; color: var(--red); line-height: 1; }
.vehicle-price .biweekly { color: var(--muted); }
.gallery { display: grid; grid-template-columns: 1fr; gap: 10px; }
.gallery-main { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); background: #eceff1; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.gallery-thumbs img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; }
.gallery-thumbs img.active { border-color: var(--red); }
.detail-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 24px; align-items: start; margin-top: 22px; }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td { text-align: left; padding: 10px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table th { color: var(--muted); font-weight: 600; width: 42%; }
.side-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); position: sticky; top: 84px; }
.side-card h3 { margin-bottom: 12px; }
.side-card .btn { margin-bottom: 8px; }
.estimator label { font-size: .85rem; font-weight: 700; color: var(--muted); display: block; margin: 10px 0 4px; }
.estimator input, .estimator select { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 1rem; }
.estimator-output { background: var(--bg-soft); border-radius: 8px; padding: 12px; margin-top: 14px; text-align: center; }
.estimator-output b { font-size: 1.6rem; color: var(--red); }

/* Forms */
.form-card { max-width: 680px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 4px; }
.field label .req { color: var(--red); }
.field input, .field select, .field textarea { width: 100%; padding: 11px; border: 1px solid var(--line); border-radius: 8px; font-size: 1rem; font-family: inherit; }
.field textarea { min-height: 96px; resize: vertical; }
.field .hint { font-size: .82rem; color: var(--muted); margin-top: 3px; }
.hp { position: absolute; left: -9999px; top: -9999px; height: 1px; overflow: hidden; }
.form-success { display: none; background: #e8f5ee; border: 1px solid #bfe3cd; color: #0d4d2a; border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.form-error { display: none; background: #fdeaea; border: 1px solid #f3c1c1; color: #7a1010; border-radius: var(--radius); padding: 14px; margin-bottom: 16px; }

/* Chat widget */
.chat-fab { position: fixed; right: 18px; bottom: 18px; z-index: 90; background: var(--red); color: #fff; border: none; border-radius: 999px; padding: 13px 20px; font-weight: 700; font-size: 1rem; cursor: pointer; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); }
.chat-fab:hover { background: var(--red-dark); }
.chat-panel { position: fixed; right: 18px; bottom: 78px; z-index: 90; width: min(360px, calc(100vw - 36px)); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, .22); display: none; overflow: hidden; }
.chat-panel.open { display: block; }
.chat-head { background: var(--ink); color: #fff; padding: 14px 16px; }
.chat-head b { font-family: "Barlow Condensed", sans-serif; font-size: 1.25rem; }
.chat-head p { margin: 2px 0 0; font-size: .85rem; color: #c8ccd4; }
.chat-body { padding: 16px; }
.chat-body .field { margin-bottom: 10px; }

/* Footer */
.site-footer { background: var(--ink); color: #d4d7dd; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; padding: 40px 0 24px; }
.site-footer h4 { color: #fff; font-size: 1.15rem; }
.site-footer a { color: #fff; }
.footer-bottom { border-top: 1px solid #2b2f38; padding: 16px 0 22px; font-size: .85rem; color: #9aa0ab; display: flex; gap: 16px; flex-wrap: wrap; }
.hours-table td { padding: 2px 12px 2px 0; }

/* Inbox */
.inbox-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.inbox-table th, .inbox-table td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.inbox-table th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.status-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 800; background: #eef2ff; color: #2f3a8f; }
.status-pill.done { background: #e8f5ee; color: var(--green); }

/* Misc */
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.kv .cell { background: var(--bg-soft); border-radius: var(--radius); padding: 16px; }
.pill-list { display: flex; gap: 8px; flex-wrap: wrap; }
.pill-list span { background: var(--bg-soft); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; font-size: .9rem; }
.updated { font-size: .85rem; color: var(--muted); }
@media (max-width: 860px) {
  .detail-grid { grid-template-columns: 1fr; }
  .side-card { position: static; }
  .main-nav { display: none; position: absolute; top: 64px; right: 0; left: 0; background: #fff; flex-direction: column; align-items: stretch; padding: 10px 16px 16px; border-bottom: 1px solid var(--line); }
  .main-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .header-phone { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .vehicle-price { text-align: left; }
}
