/* WebCarsClick — modernised stylesheet. Responsive, mobile-first. */
:root {
  --navy: #0f2040;
  --navy2: #16305e;
  --teal: #0e7c9b;
  --teal-dark: #0a5f77;
  --accent: #f2a900;
  --bg: #f4f6f8;
  --card: #ffffff;
  --text: #1c2733;
  --muted: #5b6b7c;
  --line: #dbe2e8;
  --green: #1d8a4e;
  --red: #b42318;
  --radius: 10px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
a { color: var(--teal-dark); }
a:hover { text-decoration: underline; }

/* Header */
.site-header { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 10px rgba(15, 32, 64, 0.35); }
.site-header .inner {
  max-width: 1120px; margin: 0 auto; padding: 14px 16px;
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
}
.logo { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; color: #fff; text-decoration: none; }
.logo span { color: var(--accent); }
.tagline { font-size: 13px; color: #c6d3e2; margin-left: 4px; }
.main-nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.main-nav a {
  color: #dbe6f2; text-decoration: none; padding: 7px 11px; border-radius: 6px; font-size: 14px;
}
.main-nav a:hover, .main-nav a.active { background: var(--navy2); color: #fff; text-decoration: none; }
.main-nav .nav-user { color: #fff; font-size: 14px; padding: 7px 4px; }

/* Layout */
.wrap { max-width: 1120px; margin: 0 auto; padding: 20px 16px 48px; }
.hero {
  background:
    linear-gradient(100deg, rgba(15, 32, 64, 0.92) 0%, rgba(10, 95, 119, 0.75) 55%, rgba(10, 95, 119, 0.35) 100%),
    url("https://images.unsplash.com/photo-1568605117036-5fe5e7bab0b7?auto=format&fit=crop&w=1600&q=80") center / cover;
  color: #fff; border-radius: var(--radius); padding: 44px 28px; margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(15, 32, 64, 0.25);
}
.hero h1 { margin: 0 0 8px; font-size: 38px; line-height: 1.1; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); }
.hero p { margin: 0 0 18px; color: #eaf2f8; max-width: 640px; font-size: 17px; }
.hero .search-box { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); border: none; }
.wrap > h2 { padding-bottom: 8px; border-bottom: 3px solid var(--accent); margin-bottom: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
  .layout { display: grid; grid-template-columns: 260px 1fr; gap: 20px; align-items: start; }
}
h2 { font-size: 22px; margin: 0 0 12px; }
h3 { font-size: 17px; margin: 0 0 8px; }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; }
.notice {
  background: #fff8e1; border: 1px solid #f0d98c; border-radius: var(--radius);
  padding: 12px 14px; font-size: 14px; margin-bottom: 16px;
}

/* Search forms */
.search-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.search-box form, .filters form { display: grid; gap: 10px; }
.search-box form { grid-template-columns: 1fr; }
@media (min-width: 720px) { .search-box form { grid-template-columns: repeat(4, 1fr); } }
label { font-size: 13px; font-weight: 600; color: var(--text); display: block; margin-bottom: 2px; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="tel"], input[type="url"], select, textarea {
  width: 100%; padding: 9px 10px; border: 1px solid #c3ccd6; border-radius: 6px;
  font-size: 15px; font-family: inherit; background: #fff;
}
textarea { min-height: 90px; resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin: 0 0 14px; }
legend { font-weight: 700; padding: 0 6px; }
.check-grid { display: grid; grid-template-columns: 1fr; gap: 6px; }
@media (min-width: 720px) { .check-grid { grid-template-columns: 1fr 1fr; } }
.check-grid label { font-weight: 400; display: flex; gap: 8px; align-items: center; }

/* Buttons */
.btn {
  display: inline-block; background: var(--teal); color: #fff; border: none; cursor: pointer;
  padding: 10px 18px; border-radius: 6px; font-size: 15px; font-weight: 600; text-decoration: none;
  box-shadow: 0 2px 6px rgba(14, 124, 155, 0.35); transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { background: var(--teal-dark); text-decoration: none; transform: translateY(-1px); box-shadow: 0 4px 10px rgba(14, 124, 155, 0.4); }
.btn-secondary { background: #e8edf2; color: var(--text); }
.btn-secondary:hover { background: #dbe2e8; }
.btn-danger { background: var(--red); }
.btn-small { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; text-align: center; }

/* Listings */
.listing-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; transition: transform 0.18s ease, box-shadow 0.18s ease; }
.listing-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(15, 32, 64, 0.18); }
.car-photo { position: relative; overflow: hidden; background: #eef3f7; aspect-ratio: 16 / 10; }
.car-photo .car-art { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 10px; }
.car-photo .car-art svg { width: 100%; height: 100%; }
.car-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.listing-card:hover .car-photo img { transform: scale(1.04); }
.listing-card .body { padding: 14px 16px; }
.results-table img.thumb { width: 120px; height: 68px; object-fit: cover; border-radius: 6px; display: block; }
.listing-card h3 { margin-bottom: 2px; }
.listing-card h3 a { color: var(--text); text-decoration: none; }
.listing-card h3 a:hover { color: var(--teal-dark); }
.price { font-size: 20px; font-weight: 800; color: var(--navy); }
.specs { color: var(--muted); font-size: 14px; margin: 4px 0 10px; }
.badge {
  display: inline-block; background: #e6f2f6; color: var(--teal-dark); border-radius: 20px;
  padding: 2px 10px; font-size: 12px; font-weight: 700; margin-right: 6px;
}
.results-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.results-table th { text-align: left; background: var(--navy); color: #fff; padding: 9px 8px; }
.results-table td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.results-table tr:nth-child(even) td { background: #f8fafc; }
@media (max-width: 719px) {
  .results-table, .results-table tbody, .results-table tr, .results-table td { display: block; width: 100%; }
  .results-table thead { display: none; }
  .results-table tr { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 10px; }
}

/* Detail page */
.detail-grid { display: grid; gap: 20px; }
@media (min-width: 860px) { .detail-grid { grid-template-columns: 1fr 320px; } }
.detail-photo { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 0; overflow: hidden; text-align: center; }
.detail-photo .car-photo { aspect-ratio: 16 / 10; }
.detail-photo p { padding: 10px 16px 14px; margin: 0; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.spec-table td { padding: 7px 6px; border-bottom: 1px solid var(--line); }
.spec-table td:first-child { color: var(--muted); width: 42%; }
.vendor-card { position: sticky; top: 16px; }

/* Tabs / dashboard */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs button {
  background: #e8edf2; border: 1px solid var(--line); border-radius: 6px;
  padding: 8px 14px; cursor: pointer; font-size: 14px; font-weight: 600;
}
.tabs button.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.alert { padding: 12px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 14px; }
.alert-ok { background: #e6f4ea; border: 1px solid #a3d9b1; }
.alert-err { background: #fdecea; border: 1px solid #f5c6c0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: #fff; }
.site-footer .inner { max-width: 1120px; margin: 0 auto; padding: 20px 16px; font-size: 14px; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 8px; }
.photo-drop {
  border: 2px dashed #c3ccd6; border-radius: 8px; padding: 16px; text-align: center; color: var(--muted);
}
.photo-drop img { max-width: 100%; max-height: 260px; border-radius: 6px; }
