/* LotProwl's one stylesheet: the home page, search results, model pages, about and messages. Light mode only.
   Every page is the header, a dark band or hero, white cards on a light background, and the dark footer. */
:root {
  --bg: #fafafa; --surface: #fff; --text: #111; --muted: #5c5c5c; --line: #e2e2e2; --field: #bdbdbd;
  --accent: #b4410c; --accent-dark: #933508; --band: #f1efec; --night: #111;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, sans-serif; }
main { flex: 1; } /* keeps the footer at the bottom of short pages */
h1, h2, h3, .foot-title, .tile-model, .price, .tile-price b { font-family: Kanit, system-ui, sans-serif; font-weight: 600; line-height: 1.2; }
a { color: inherit; text-decoration-color: var(--muted); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); }
.note { font-size: .875rem; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
input, select { font: inherit; font-size: 1rem; width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--field); border-radius: 8px; background: var(--surface); color: var(--text); }
input:user-invalid { border-color: #b00020; }
input[type=radio], input[type=checkbox] { width: auto; height: auto; accent-color: var(--accent); }

/* Header and footer */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 14px; padding-bottom: 14px; }
.logo { display: block; height: 32px; width: auto; }
.site-header nav { display: flex; gap: 20px; font-weight: 500; }
.site-header nav a { text-decoration: none; }
.site-header nav a:hover { color: var(--accent); }
.site-footer { background: var(--night); color: #c8c8c8; padding: 48px 0 32px; font-size: .9rem; }
.site-footer a { color: #fff; text-decoration-color: #777; }
.foot-cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.foot-cols p { margin: 0; max-width: 28em; }
.foot-cols nav { display: grid; align-content: start; gap: 6px; }
.foot-title { color: #fff; font-size: 1rem; margin: 0 0 8px !important; }
.foot-fine { margin: 32px 0 0; padding-top: 20px; border-top: 1px solid #333; color: #9a9a9a; font-size: .8rem; }
@media (max-width: 700px) {
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .foot-cols > :first-child { grid-column: 1 / -1; }
}

/* Dark tops: the home hero and the title band on every other page */
.hero, .band { background: var(--night); color: #fff; }
.band { background: radial-gradient(ellipse at 90% 140%, rgb(224 102 42 / .35), transparent 55%), var(--night); padding: 40px 0 36px; }
.band h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 8px; max-width: 24em; text-wrap: balance; }
.lede { font-size: 1.1rem; color: #ddd; margin: 0; max-width: 40em; }
.band-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin: 24px 0 0; }
.band a, .hero .chips a { color: #fff; }
.button { display: inline-block; padding: 10px 20px; border-radius: 8px; background: var(--accent); color: #fff !important; font-weight: 600; text-decoration: none; }
.button:hover { background: var(--accent-dark); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chips a { padding: 4px 12px; border: 1px solid rgb(255 255 255 / .35); border-radius: 999px; font-size: .9rem; text-decoration: none; }
.chips a:hover { background: rgb(255 255 255 / .1); }

.hero { position: relative; overflow: hidden; }
.hero-photo { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; mask-image: linear-gradient(#000 55%, transparent); }
.hero-body { position: relative; margin-top: -56px; padding-bottom: 40px; text-shadow: 0 1px 14px rgb(0 0 0 / .6); }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); margin: 0 0 12px; max-width: 11em; text-wrap: balance; }
.hero .lede { max-width: 28em; text-wrap: pretty; } /* about as wide as the headline, so it stops short of the truck */
.nowrap { white-space: nowrap; }
.hero-note { margin: 10px 0 0; color: #bbb; font-size: .875rem; font-style: italic; }
@media (min-width: 900px) {
  .hero { min-height: 560px; display: flex; align-items: center; }
  .hero-photo { position: absolute; top: 0; right: 0; width: 58%; height: 100%; aspect-ratio: auto; mask-image: linear-gradient(90deg, transparent, #000 30%); }
  .hero-body { width: 100%; margin-top: 0; padding-top: 64px; padding-bottom: 64px; }
}
.searching .hero { display: none; }
.search { display: grid; grid-template-columns: repeat(4, 1fr) auto; align-items: end; gap: 12px; max-width: 860px; margin-top: 28px; padding: 16px; background: var(--surface); color: var(--text); border-radius: 14px; box-shadow: 0 12px 32px rgb(0 0 0 / .3); text-shadow: none; }
.search label { display: grid; gap: 4px; font-size: .8rem; font-weight: 600; }
.search button, .more { font: inherit; font-weight: 600; height: 44px; padding: 0 26px; border: 0; border-radius: 8px; background: var(--accent); color: #fff; cursor: pointer; }
.search button:hover { background: var(--accent-dark); }
@media (max-width: 760px) {
  .search { grid-template-columns: 1fr 1fr; }
  .search button { grid-column: 1 / -1; }
}

/* Home page rows, also used on /models and /about */
.section { margin-top: 56px; }
.section:has(> ul:empty) { display: none; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 16px; }
.section h2, .how h2 { font-size: 1.6rem; margin: 0 0 16px; }
.tiles, .makes, .steps-row, .units, .dealers { list-style: none; margin: 0; padding: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.tile { display: flex; flex-direction: column; height: 100%; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.tile:hover, .unit:hover { border-color: var(--accent); box-shadow: 0 6px 20px rgb(0 0 0 / .08); }
@media (max-width: 640px) {
  .tiles { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 75%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .tiles li { scroll-snap-align: start; }
}
.tile-photo, .unit-photo { display: block; aspect-ratio: 4 / 3; background: var(--band); }
.tile-photo img, .unit-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tile-photo:empty, .unit-photo:empty { display: grid; place-items: center; }
.tile-photo:empty::after, .unit-photo:empty::after { content: "No photo"; color: var(--muted); font-size: .875rem; }
.tile-text { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }
.tile-make { font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tile-model { font-size: 1.35rem; margin: 2px 0 4px; }
.tile .muted { margin-bottom: 12px; }
.tile-prices { display: grid; gap: 2px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.tile-price { display: flex; justify-content: space-between; align-items: baseline; }
.tile-price b { font-size: 1.1rem; }
.makes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.makes a { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; height: 100%; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; text-decoration: none; }
.makes a:hover { border-color: var(--accent); }
.makes .all { justify-content: center; color: var(--accent); }
.how { background: var(--band); margin-top: 64px; padding: 48px 0; }
.steps-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; counter-reset: step; }
.steps-row li { counter-increment: step; }
.steps-row li::before { content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 12px; border-radius: 50%; background: var(--accent); color: #fff; font: 600 1.1rem Kanit, system-ui, sans-serif; }
.steps-row h3 { font-size: 1.15rem; margin: 0 0 4px; }
.steps-row p { margin: 0; color: var(--muted); }
.steps-row + p { margin: 24px 0 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px 24px; }
.panel p { margin: 0 0 12px; max-width: 46em; }
.limits { padding-left: 2.6em; }
.limits li { margin-bottom: 8px; max-width: 46em; }
.coverage { width: 100%; max-width: 46em; margin: 4px 0 16px; border-collapse: collapse; }
.coverage th, .coverage td { padding: 8px 16px 8px 0; text-align: left; border-bottom: 1px solid var(--line); }
pre { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; margin: 0; overflow-x: auto; }
.page { padding-bottom: 64px; }
.page > :first-child { margin-top: 32px; }

/* Listing cards: model pages and search results */
.units { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.units .empty { grid-column: 1 / -1; }
.unit { position: relative; display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; transition: border-color .15s, box-shadow .15s; }
.unit:has(.name:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.photo-note { position: absolute; top: 10px; left: 10px; padding: 2px 8px; border-radius: 4px; background: rgb(17 17 17 / .75); color: #fff; font-size: .75rem; font-weight: 600; }
.unit-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; }
.price { font-size: 1.5rem; }
.name { font-weight: 600; text-decoration: none; }
.name::after { content: ""; position: absolute; inset: 0; } /* the whole card opens the dealer's page */
.name:focus-visible { outline: none; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .8rem; border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; white-space: nowrap; }

/* Search results: filters on the left, cards on the right */
.results-layout { display: grid; grid-template-columns: 280px 1fr; gap: 32px; align-items: start; padding-top: 28px; padding-bottom: 64px; }
.filter-panel > summary { display: none; }
.filters { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; display: grid; gap: 18px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.filters label { display: grid; gap: 4px; font-size: .85rem; font-weight: 600; }
.filters input, .filters select, .results-bar select { height: 40px; padding: 0 10px; font-size: .95rem; }
.filters fieldset { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.filters legend { padding: 0; margin-bottom: 6px; font-size: .85rem; font-weight: 600; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pair label { font-weight: 400; color: var(--muted); }
.filters fieldset > label:has(input[type=radio]), .checks label { display: flex; align-items: center; gap: 8px; font-size: .95rem; font-weight: 400; }
.checks { display: grid; gap: 6px; max-height: 260px; overflow-y: auto; }
.filters .note { margin: 0; }
.link-button { justify-self: start; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: .9rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.results-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 16px; }
.results-bar p { margin: 0; }
.results-bar label { display: flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 600; }
.results-bar select { width: auto; }
.more { display: block; margin: 24px auto 0; }
.more:hover { background: var(--accent-dark); }
@media (max-width: 860px) {
  .results-layout { grid-template-columns: 1fr; gap: 16px; padding-top: 16px; }
  .filter-panel > summary { display: block; padding: 10px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-weight: 600; cursor: pointer; }
  .filters { position: static; max-height: none; margin-top: 12px; }
}
#dealers { margin-top: 48px; }
#dealers h2 { font-size: 1.4rem; margin: 0 0 8px; }
#dealers h3 { font-size: 1.05rem; margin: 24px 0 8px; }
.dealers li { padding: 8px 0; border-bottom: 1px solid var(--line); }
summary { cursor: pointer; }
summary h3 { display: inline; }
