:root {
  --bg: oklch(0.985 0.008 80);
  --surface: #ffffff;
  --surface-soft: oklch(0.96 0.015 78);
  --surface-deep: oklch(0.92 0.022 75);
  --line: oklch(0.88 0.012 85);
  --text: oklch(0.18 0.01 90);
  --muted: oklch(0.48 0.012 90);
  --nopal-900: oklch(0.28 0.07 145);
  --nopal-800: oklch(0.34 0.08 145);
  --nopal-700: oklch(0.42 0.09 150);
  --nopal-500: oklch(0.55 0.11 152);
  --nopal-300: oklch(0.78 0.08 150);
  --lima-400: oklch(0.82 0.22 128);
  --lima-300: oklch(0.92 0.16 130);
  --sol: oklch(0.84 0.13 80);
  --shadow: 0 24px 60px -20px rgba(20, 30, 22, 0.16), 0 6px 16px rgba(20, 30, 22, 0.08);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Kanit, Inter, Arial, sans-serif;
  background: radial-gradient(circle at top right, rgba(191, 245, 176, 0.22), transparent 30%), var(--bg);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid rgba(40, 50, 35, 0.08);
  padding: 14px 16px 16px;
}
.brand-wrap { max-width: 1180px; margin: 0 auto; }
.brand-kicker, .brand-wrap .brand-kicker {
  color: var(--nopal-700);
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: 11px;
  margin-bottom: 8px;
}
.topbar h1 {
  margin: 0;
  font-size: clamp(26px, 8vw, 46px);
  line-height: .95;
  letter-spacing: -0.04em;
  font-weight: 800;
}
.topbar p {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 780px;
  line-height: 1.45;
}
.top-actions { margin-top: 14px; }
#app { padding: 18px 16px 72px; max-width: 1180px; margin: 0 auto; }
.hero-kicker, .section-kicker {
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255,255,255,.72);
}
.section-kicker { color: var(--muted); }
.brand-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--nopal-900), var(--nopal-800));
  color: #fff;
  border-radius: 28px;
  padding: 22px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
}
.brand-hero::before,
.brand-hero::after {
  content: '';
  position: absolute;
  border-radius: 999px;
  background: rgba(200, 255, 188, 0.08);
  pointer-events: none;
}
.brand-hero::before { width: 220px; height: 220px; right: -40px; top: -40px; }
.brand-hero::after { width: 180px; height: 180px; right: 60px; top: 60px; }
.brand-hero-copy,
.hero-showcase { position: relative; z-index: 1; }
.brand-hero h2 {
  margin: 12px 0 0;
  font-size: clamp(42px, 11vw, 82px);
  line-height: .9;
  letter-spacing: -0.05em;
  font-weight: 800;
  max-width: 10ch;
}
.brand-hero p {
  margin: 16px 0 0;
  max-width: 520px;
  color: rgba(255,255,255,.78);
  line-height: 1.5;
  font-size: 16px;
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.primary-link, .ghost-link, .wa-btn, .ghost-btn, .primary-btn {
  border: none;
  cursor: pointer;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.primary-link {
  background: #fff;
  color: var(--nopal-900);
  padding: 13px 18px;
  font-weight: 700;
}
.hero-ghost, .ghost-link.dark {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,.24);
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}
.hero-stats div {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  padding: 14px;
}
.hero-stats strong {
  display: block;
  font-size: 28px;
  line-height: 1;
  font-weight: 800;
}
.hero-stats span { color: rgba(255,255,255,.68); font-size: 13px; }
.showcase-card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 24px;
  overflow: hidden;
  backdrop-filter: blur(12px);
}
.showcase-art {
  position: relative;
  aspect-ratio: 16 / 11;
  background: rgba(255,255,255,.08);
}
.showcase-art img, .gallery-main img, .img-empty {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.img-empty { display: flex; align-items: center; justify-content: center; color: var(--muted); }
.showcase-price {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(14, 20, 12, .68);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}
.showcase-body { padding: 18px; }
.showcase-topline {
  color: var(--lima-300);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.showcase-body h3 {
  margin: 10px 0 0;
  font-size: 30px;
  line-height: .95;
  letter-spacing: -0.04em;
}
.showcase-body p { margin: 12px 0 0; color: rgba(255,255,255,.72); }
.showcase-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.filters-shell {
  margin-top: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(20, 30, 22, 0.05);
}
.filters-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
}
.filters-head h3 { margin: 6px 0 0; font-size: 28px; line-height: .95; letter-spacing: -0.03em; }
.search-wrap { margin-top: 16px; }
.search-wrap input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  background: var(--surface-soft);
}
.filter-stack { margin-top: 12px; }
.chip-row { display: flex; gap: 8px; overflow-x: auto; padding: 8px 2px 0; }
.chip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  white-space: nowrap;
  color: var(--text);
}
.chip.active { background: var(--nopal-900); color: #fff; border-color: var(--nopal-900); }
.filters-foot, .summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.filters-foot { margin-top: 14px; color: var(--muted); }
.summary-row strong { font-size: 28px; color: var(--text); line-height: 1; }
.summary-row span { color: var(--muted); }
.results-grid { display: grid; gap: 18px; margin-top: 18px; }
.vehicle-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.gallery-card { position: relative; background: var(--surface-deep); }
.gallery-main {
  position: relative;
  aspect-ratio: 16 / 11;
  background: #dbe4ee;
}
.vehicle-badge {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  background: rgba(10,18,10,.78); color: white; border-radius: 999px; padding: 8px 11px; font-size: 12px; font-weight: 700;
}
.vehicle-badge.premium { background: rgba(255,255,255,.92); color: var(--nopal-900); }
.zoom-btn {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  background: rgba(10,18,10,.76); color: white; padding: 9px 12px;
}
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 38px; height: 38px; background: rgba(10,18,10,.72); color: white; font-size: 24px;
}
.carousel-btn.prev { left: 12px; }
.carousel-btn.next { right: 12px; }
.mini-dots { display: flex; gap: 6px; justify-content: center; padding: 10px; background: #fff; }
.mini-dot { width: 8px; height: 8px; border-radius: 999px; border: none; background: #cbd5e1; }
.mini-dot.active { background: var(--nopal-700); width: 22px; }
.vehicle-body { padding: 18px; }
.vehicle-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.vehicle-eyebrow {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.vehicle-head h2 { margin: 8px 0 0; font-size: 30px; line-height: .95; letter-spacing: -0.04em; }
.vehicle-head p { margin: 8px 0 0; color: var(--muted); }
.km-pill {
  background: var(--surface-soft); color: var(--nopal-900); font-weight: 800;
  padding: 10px 12px; border-radius: 16px; white-space: nowrap; border: 1px solid rgba(36, 66, 36, 0.08);
}
.meta-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px;
}
.meta-grid div {
  background: var(--surface-soft); border: 1px solid var(--line); border-radius: 18px; padding: 12px;
}
.meta-grid span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.meta-grid strong { font-size: 14px; overflow-wrap: anywhere; }
.note-list { margin: 14px 0 0; padding-left: 18px; color: #334155; }
.note-list li { margin-bottom: 6px; }
.manager-photos { margin-top: 16px; }
.manager-photos summary { cursor: pointer; font-weight: 700; }
.thumb-row {
  width: 100%; text-align: left; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 12px; margin-top: 10px;
}
.thumb-row small { display: block; color: var(--muted); margin-top: 4px; }
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.wa-btn, .ghost-link {
  padding: 12px 14px; font-weight: 700;
}
.wa-btn { background: #25d366; color: white; flex: 1; min-width: 160px; }
.ghost-link {
  background: white; color: var(--text); border: 1px solid var(--line);
}
.ghost-link.dark { color: var(--text); border-color: rgba(17, 24, 17, 0.12); }
.load-more-wrap { display: flex; justify-content: center; margin-top: 18px; }
.primary-btn {
  background: var(--nopal-900); color: white; padding: 13px 18px; font-weight: 700;
}
.ghost-btn {
  background: rgba(255,255,255,.08); color: white; padding: 10px 14px;
}
.ghost-btn.small { color: var(--text); background: #fff; border: 1px solid var(--line); }
.empty-state {
  background: white; border: 1px dashed #cbd5e1; border-radius: 22px; padding: 36px 20px; text-align: center; color: var(--muted);
}
.lightbox {
  position: fixed; inset: 0; z-index: 60; background: rgba(2,6,23,.92);
  display: grid; grid-template-columns: 56px 1fr 56px; grid-template-rows: 1fr auto; align-items: center;
}
.lightbox.hidden { display: none; }
.lightbox-stage { display: flex; align-items: center; justify-content: center; overflow: auto; padding: 20px; }
#lightbox-image { max-width: 92vw; max-height: 74vh; transform-origin: center center; transition: transform .2s ease; }
.lightbox-nav, .lightbox-close {
  border: none; background: rgba(255,255,255,.1); color: white; width: 44px; height: 44px; border-radius: 999px; justify-self: center;
}
.lightbox-close { position: absolute; top: 16px; right: 16px; z-index: 3; }
.lightbox-toolbar {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center;
  padding: 12px 16px 22px; color: white;
}
.lightbox-toolbar button { border: none; border-radius: 12px; padding: 10px 12px; }
#lightbox-caption { max-width: 90vw; text-align: center; color: #cbd5e1; font-size: 14px; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card {
  width: min(420px, 100%); background: white; border: 1px solid var(--line); border-radius: 24px; padding: 22px; box-shadow: var(--shadow);
}
.login-card h2 { margin-top: 0; font-size: 34px; line-height: .95; letter-spacing: -0.04em; }
.login-card p { color: var(--muted); }
.login-form { display: grid; gap: 12px; margin-top: 14px; }
.login-form label { display: grid; gap: 6px; font-size: 14px; }
.login-form input { border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.login-form button { background: var(--nopal-900); color: white; padding: 12px; border: none; border-radius: 14px; font-weight: 700; }
.login-error { background: #fef2f2; color: #dc2626; padding: 10px 12px; border-radius: 12px; margin-top: 10px; }
.text-link { display: inline-block; margin-top: 14px; color: var(--muted); }
.detail-hero-card {
  display: grid; gap: 18px; background: white; border: 1px solid var(--line); border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); padding: 0;
}
.detail-main { aspect-ratio: 16 / 11; }
.detail-copy { padding: 18px; }
.detail-copy h2 { margin: 10px 0 0; font-size: clamp(34px, 8vw, 58px); line-height: .92; letter-spacing: -0.05em; }
.detail-copy p { color: var(--muted); }
.km-pill.large { display: inline-flex; margin-top: 14px; font-size: 18px; }
.single-detail { margin-top: 16px; }
@media (min-width: 900px) {
  .topbar { padding: 18px 24px 20px; }
  #app { padding: 24px 24px 88px; }
  .brand-hero { grid-template-columns: 1.05fr .95fr; align-items: center; padding: 30px; }
  .results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-hero-card { grid-template-columns: 1.1fr .9fr; align-items: stretch; }
  .detail-main { aspect-ratio: auto; min-height: 560px; }
}
@media (max-width: 760px) {
  .brand-hero h2 { max-width: 8ch; }
  .hero-stats { grid-template-columns: 1fr; }
  .filters-head, .filters-foot, .summary-row { align-items: start; flex-direction: column; }
  .vehicle-head { flex-direction: column; }
  .wa-btn, .ghost-link { width: 100%; }
}
