:root {
  --ink: #14161a;
  --muted: #6b7280;
  --bg: #f5f3ef;
  --card: #ffffff;
  --line: #e6e2da;
  --accent: #e8501f;
  --accent-dark: #c43f14;
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .brand { font-family: 'Sora', 'Inter', sans-serif; letter-spacing: -0.02em; }

a { color: inherit; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 1030;
  background: rgba(245,243,239,.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .inner {
  max-width: 1240px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { font-weight: 800; font-size: 1.35rem; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.brand .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); display: inline-block; }
.topnav { display: flex; gap: 6px; align-items: center; }
.topnav a {
  text-decoration: none; font-weight: 500; font-size: .95rem;
  padding: 8px 16px; border-radius: 999px; color: var(--muted);
  transition: all .2s;
}
.topnav a:hover { color: var(--ink); background: rgba(0,0,0,.05); }
.topnav a.active { background: var(--ink); color: #fff; }

@media (max-width: 575px) {
  .topnav a { padding: 7px 12px; font-size: .88rem; }
}

/* ---------- Buttons ---------- */
.btn-accent {
  background: var(--accent); color: #fff; border: 0; border-radius: 999px;
  padding: 12px 26px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
  transition: background .2s, transform .2s;
}
.btn-accent:hover { background: var(--accent-dark); color: #fff; transform: translateY(-2px); }
.btn-ghost {
  background: transparent; color: var(--ink); border: 1.5px solid var(--ink); border-radius: 999px;
  padding: 11px 24px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
  transition: all .2s;
}
.btn-ghost:hover { background: var(--ink); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  max-width: 1240px; margin: 28px auto 0; padding: 0 20px;
}
.hero-box {
  position: relative; overflow: hidden; border-radius: 28px; color: #fff;
  padding: clamp(40px, 8vw, 96px) clamp(24px, 6vw, 72px);
  background:
    linear-gradient(100deg, rgba(10,12,16,.85) 20%, rgba(10,12,16,.35) 100%),
    url('https://images.unsplash.com/photo-1503736334956-4c8f8e92946d?auto=format&fit=crop&w=1800&q=80') center/cover;
}
.hero-box h1 { font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 800; max-width: 620px; line-height: 1.05; }
.hero-box p { max-width: 460px; opacity: .85; margin: 18px 0 28px; font-size: 1.05rem; }
.hero-stats { display: flex; gap: 36px; margin-top: 44px; flex-wrap: wrap; }
.hero-stats b { display: block; font-family: 'Sora'; font-size: 1.6rem; }
.hero-stats span { opacity: .7; font-size: .85rem; }

.section { max-width: 1240px; margin: 64px auto 0; padding: 0 20px; }
.section-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 22px; gap: 12px; }
.section-head h2 { font-size: 1.7rem; font-weight: 700; margin: 0; }
.section-head a { color: var(--accent); font-weight: 600; text-decoration: none; }

/* Body-type tiles */
.type-tile {
  display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; text-decoration: none; height: 100%;
  transition: all .2s;
}
.type-tile i { font-size: 1.6rem; color: var(--accent); }
.type-tile b { font-family: 'Sora'; }
.type-tile small { color: var(--muted); }
.type-tile:hover { transform: translateY(-4px); border-color: var(--ink); box-shadow: 0 12px 28px rgba(0,0,0,.08); }

/* ---------- Car cards ---------- */
.car-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; height: 100%; display: flex; flex-direction: column; text-decoration: none;
  transition: transform .25s, box-shadow .25s;
}
.car-card:hover { transform: translateY(-5px); box-shadow: 0 16px 34px rgba(0,0,0,.1); }
.car-card .thumb { position: relative; aspect-ratio: 4/3; background: #d9d5cc; overflow: hidden; }
.car-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.car-card:hover .thumb img { transform: scale(1.06); }
.badge-type {
  position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,.92);
  font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  padding: 5px 11px; border-radius: 999px;
}
.car-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.car-card h3 { font-size: 1.05rem; font-weight: 700; margin: 0; }
.car-card .specs { display: flex; flex-wrap: wrap; gap: 6px; }
.car-card .specs span {
  font-size: .75rem; color: var(--muted); background: var(--bg);
  padding: 4px 10px; border-radius: 999px;
}
.car-card .price { margin-top: auto; font-family: 'Sora'; font-weight: 700; font-size: 1.2rem; }

/* ---------- Listing + filters ---------- */
.page-title { max-width: 1240px; margin: 36px auto 0; padding: 0 20px; }
.page-title h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; margin: 0; }
.page-title p { color: var(--muted); margin: 6px 0 0; }

.shop { max-width: 1240px; margin: 28px auto 0; padding: 0 20px; display: grid; grid-template-columns: 290px 1fr; gap: 28px; align-items: start; }
@media (max-width: 991px) { .shop { grid-template-columns: 1fr; } }

.filters {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; position: sticky; top: 84px;
}
.filter-group { padding: 16px 0; border-bottom: 1px solid var(--line); }
.filter-group:first-of-type { padding-top: 4px; }
.filter-group:last-of-type { border-bottom: 0; padding-bottom: 0; }
.filter-group h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin: 0 0 12px; font-family: 'Inter'; font-weight: 600; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1.5px solid var(--line); background: #fff; border-radius: 999px;
  padding: 6px 14px; font-size: .86rem; font-weight: 500; cursor: pointer; transition: all .15s;
  user-select: none;
}
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip .n { opacity: .55; margin-left: 4px; font-size: .78rem; }

.check-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: .92rem; cursor: pointer; }
.check-row input { accent-color: var(--accent); width: 17px; height: 17px; }
.check-row .n { margin-left: auto; color: var(--muted); font-size: .8rem; }

.range-vals { display: flex; justify-content: space-between; font-weight: 600; font-size: .9rem; margin-bottom: 10px; }
.dual { position: relative; height: 26px; }
.dual input[type=range] {
  position: absolute; left: 0; width: 100%; top: 0; margin: 0; height: 26px;
  pointer-events: none; -webkit-appearance: none; appearance: none; background: none;
}
.dual input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; pointer-events: auto; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; border: 3px solid var(--accent); cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
.dual input[type=range]::-moz-range-thumb {
  pointer-events: auto; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 3px solid var(--accent); cursor: pointer;
}
.dual .track { position: absolute; top: 11px; left: 0; right: 0; height: 4px; border-radius: 4px; background: var(--line); }
.dual .fill { position: absolute; top: 11px; height: 4px; border-radius: 4px; background: var(--accent); }

.search-box { position: relative; }
.search-box i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-box input {
  width: 100%; border: 1.5px solid var(--line); border-radius: 999px; padding: 10px 16px 10px 40px;
  background: #fff; outline: none; transition: border-color .2s;
}
.search-box input:focus { border-color: var(--ink); }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar select {
  border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 16px; background: #fff; font-weight: 500; outline: none;
}
.active-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tag {
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px 8px 5px 14px;
  font-size: .82rem; display: inline-flex; align-items: center; gap: 6px;
}
.tag button { border: 0; background: var(--bg); border-radius: 50%; width: 20px; height: 20px; line-height: 1; cursor: pointer; }
.tag button:hover { background: var(--accent); color: #fff; }
.link-btn { background: none; border: 0; color: var(--accent); font-weight: 600; cursor: pointer; padding: 0; }

.empty { text-align: center; padding: 70px 20px; background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty i { font-size: 2.4rem; color: var(--muted); }

.mobile-filter-btn { display: none; }
@media (max-width: 991px) {
  .filters { position: static; border: 0; padding: 0; background: none; }
  .mobile-filter-btn { display: inline-flex; }
}

/* ---------- Detail ---------- */
.detail { max-width: 1240px; margin: 28px auto 0; padding: 0 20px; display: grid; grid-template-columns: 1.35fr 1fr; gap: 36px; align-items: start; }
@media (max-width: 991px) { .detail { grid-template-columns: 1fr; } }
.crumbs { max-width: 1240px; margin: 24px auto 0; padding: 0 20px; font-size: .9rem; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--accent); }

.gallery-main { border-radius: 22px; overflow: hidden; background: #d9d5cc; aspect-ratio: 16/10; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 12px; }
.gallery-thumbs button {
  border: 2px solid transparent; padding: 0; border-radius: 12px; overflow: hidden; background: #d9d5cc;
  aspect-ratio: 4/3; cursor: pointer; opacity: .65; transition: all .2s;
}
.gallery-thumbs button.on, .gallery-thumbs button:hover { opacity: 1; border-color: var(--accent); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }

.info-card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 30px; position: sticky; top: 84px; }
.info-card h1 { font-size: 1.9rem; font-weight: 800; margin: 8px 0 4px; }
.info-card .price { font-family: 'Sora'; font-size: 2rem; font-weight: 800; color: var(--accent); }
.info-card .price-note { color: var(--muted); font-size: .85rem; }
.spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 24px 0; }
.spec { background: var(--bg); border-radius: 14px; padding: 14px 16px; }
.spec small { color: var(--muted); display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; }
.spec b { font-size: .95rem; }

/* ---------- Footer / WhatsApp ---------- */
.site-footer { margin-top: 90px; background: var(--ink); color: #b9bcc2; text-align: center; padding: 28px 20px; font-size: .9rem; }
.site-footer a { color: #fff; text-decoration: none; }

.floating-whatsapp {
  position: fixed; bottom: 24px; right: 24px; width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, #25D366, #128C7E); color: #fff; font-size: 1.9rem;
  display: flex; align-items: center; justify-content: center; text-decoration: none;
  box-shadow: 0 8px 20px rgba(0,0,0,.25); z-index: 1040; animation: pulse 2s infinite;
}
.floating-whatsapp:hover { color: #fff; transform: scale(1.08); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37,211,102,.55); }
  70% { box-shadow: 0 0 0 16px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

/* fade-in */
.fade-in { animation: fade .35s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
