/* ===== Tokens ===== */
:root {
  --ink: #1c201d;
  --ink-2: #3a403b;
  --muted: #6c6d66;
  --bg: #f2f0ea;
  --panel: #ffffff;
  --line: #e1dcd1;
  --line-2: #cfc8ba;
  --primary: #2e4a36;
  --primary-d: #1f3527;
  --primary-l: #e6eee7;
  --accent: #c2862a;
  --accent-d: #a06c1b;
  --accent-l: #f7ecd9;
  --danger: #a3392a;
  --danger-l: #f8e5e1;
  --warn-l: #fbf1d8;
  --ok-l: #e4f1e4;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(28, 32, 29, .06), 0 2px 8px rgba(28, 32, 29, .05);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--font); color: var(--ink); background: var(--bg); }
img { max-width: 100%; display: block; }
a { color: var(--primary); text-underline-offset: 2px; }
a:hover { color: var(--accent-d); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .8em; }
code, .mono { font-family: var(--mono); font-size: .9em; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.warn { color: var(--accent-d); }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.inline { display: inline; }
.right { margin-left: auto; }
.dim { opacity: .55; }

/* ===== Header ===== */
.site-notice { background: var(--accent); color: #fff; text-align: center; padding: 6px 16px; font-weight: 600; font-size: .9rem; }
.masthead { background: var(--ink); color: #fff; }
.masthead-inner { display: flex; align-items: center; gap: 20px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 1.2rem; white-space: nowrap; letter-spacing: -.01em; }
.brand:hover { color: #fff; }
.brand-mark { width: 30px; height: 30px; color: var(--accent); }
.masthead-search { flex: 1; display: flex; max-width: 560px; }
.masthead-search input { flex: 1; border: 0; border-radius: var(--radius) 0 0 var(--radius); padding: 10px 14px; font-size: 15px; min-width: 0; }
.masthead-search button { border: 0; background: var(--accent); color: #fff; font-weight: 700; padding: 0 18px; border-radius: 0 var(--radius) var(--radius) 0; cursor: pointer; }
.masthead-search button:hover { background: var(--accent-d); }
.usernav { display: flex; align-items: center; gap: 16px; margin-left: auto; white-space: nowrap; }
.usernav a, .usernav .linkbtn { color: #e9e6df; text-decoration: none; font-size: .95rem; }
.usernav a:hover, .usernav .linkbtn:hover { color: #fff; }
.usernav .btn-accent { color: #fff; }
.catnav { background: var(--primary-d); }
.catnav .wrap { display: flex; gap: 2px; flex-wrap: wrap; }
.catnav-item { position: relative; }
.catnav-item > a { display: block; white-space: nowrap; padding: 9px 14px; color: #e8efe9; text-decoration: none; font-weight: 600; font-size: .92rem; }
.catnav-item:hover > a { background: var(--primary); color: #fff; }
.catnav-drop { display: none; position: absolute; top: 100%; left: 0; z-index: 50; background: var(--panel); min-width: 240px; border: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.15); padding: 6px 0; }
.catnav-drop a { display: block; padding: 7px 16px; color: var(--ink); text-decoration: none; }
.catnav-drop a:hover { background: var(--primary-l); }
.catnav-item:hover .catnav-drop, .catnav-item:focus-within .catnav-drop { display: block; }

.main { padding-top: 20px; padding-bottom: 40px; min-height: 50vh; }

/* ===== Ads ===== */
.ad-slot { position: relative; display: flex; align-items: center; justify-content: center; margin: 0 auto; overflow: hidden; width: fit-content; max-width: 100%; }
.ad-slot img { height: auto; }
.ad-label { position: absolute; top: 2px; right: 4px; font-size: 10px; color: var(--muted); background: rgba(255,255,255,.8); padding: 0 4px; border-radius: 3px; z-index: 1; }
.ad-placeholder { border: 2px dashed var(--line-2); border-radius: var(--radius); color: var(--muted); text-decoration: none; flex-direction: column; background: repeating-linear-gradient(45deg, transparent, transparent 8px, rgba(0,0,0,.015) 8px, rgba(0,0,0,.015) 16px); }
.ad-placeholder:hover { border-color: var(--accent); color: var(--accent-d); }
.ad-placeholder span { font-weight: 700; }
.leaderboard { padding-top: 14px; }
.ad-sidebar, .ad-sidebar_small { margin-bottom: 14px; }
.ad-slot img { max-width: 100%; }
.ad-placeholder.ad-leaderboard, .ad-placeholder.ad-home_mid, .ad-placeholder.ad-footer { width: 100%; max-width: 970px; aspect-ratio: 970 / 90; }
.ad-placeholder.ad-results { width: 100%; max-width: 728px; aspect-ratio: 728 / 90; }
.ad-placeholder.ad-sidebar { width: 100%; max-width: 300px; aspect-ratio: 300 / 250; }
.ad-placeholder.ad-sidebar_small { width: 100%; max-width: 300px; aspect-ratio: 300 / 100; }
.footer-ad { padding-bottom: 20px; }
.home-mid { margin: 26px 0 10px; }
.grid-ad { grid-column: 1 / -1; padding: 6px 0; }

/* ===== Buttons & forms ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: var(--radius); border: 1px solid transparent; font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; line-height: 1.2; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-d); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-d); color: #fff; }
.btn-ghost { background: var(--panel); border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #82291c; color: #fff; }
.btn-wide { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.linkbtn:hover { color: var(--accent-d); }

.form label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 12px; color: var(--ink-2); }
.form input:not([type=checkbox]):not([type=radio]):not([type=file]), .form select, .form textarea,
.toolbar input, .bulkbar select, .bulkbar input, .table input, .table select, .sortform select, .dealer-search input, .dealer-search select {
  display: block; width: 100%; margin-top: 4px; padding: 9px 11px; border: 1px solid var(--line-2); border-radius: 6px; font: inherit; font-weight: 400; background: #fff; color: var(--ink);
}
.table input, .table select { margin: 0; padding: 6px 8px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.form input[type=file] { display: block; margin-top: 6px; font-weight: 400; }
.form label.check, label.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
label.check input { margin-top: 3px; flex: none; }
.form fieldset { border: 0; padding: 0; margin: 0 0 16px; }
.form fieldset.panel { padding: 18px; }
.form legend { font-weight: 800; font-size: 1.05rem; padding: 0; margin-bottom: 10px; }
.field-error { display: block; color: var(--danger); font-size: .85rem; margin: -6px 0 10px; font-weight: 600; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.form-cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.w-sm { max-width: 80px; }
.w-full { width: 100%; }
.inline-label { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; }
.inline-label select { margin: 0; width: auto; }

/* ===== Panels, flashes ===== */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.flash { padding: 11px 14px; border-radius: var(--radius); margin-bottom: 14px; border: 1px solid; }
.flash-success { background: var(--ok-l); border-color: #b7d6b7; }
.flash-error { background: var(--danger-l); border-color: #e6b3a9; }
.flash-info { background: #e8eef5; border-color: #bccbdd; }
.flash-warn { background: var(--warn-l); border-color: #e8d29a; }
.narrow { max-width: 620px; margin: 0 auto; }
.empty { text-align: center; padding: 40px 20px; }
.badge { display: inline-block; background: var(--accent); color: #fff; border-radius: 10px; padding: 0 7px; font-size: .75rem; font-weight: 700; line-height: 1.5; }
.legal-box { background: var(--accent-l); border: 1px solid #ecd3a6; border-radius: var(--radius); padding: 12px 14px; margin: 12px 0; font-size: .9rem; }
.legal-box p { margin: 6px 0 0; }

/* ===== Home ===== */
.hero { background: linear-gradient(135deg, var(--primary-d), var(--primary) 70%); color: #fff; border-radius: 12px; padding: 34px 32px; margin-bottom: 24px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 280px; height: 280px; border: 26px solid rgba(255,255,255,.06); border-radius: 50%; }
.hero h1 { font-size: 2rem; max-width: 720px; }
.hero-sub { color: #d4e0d6; max-width: 720px; }
.hero-search { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 8px; margin: 18px 0 10px; position: relative; z-index: 1; }
.hero-search input, .hero-search select { padding: 12px; border-radius: var(--radius); border: 0; font: inherit; min-width: 0; }
.hero-links a { color: #fff; }
.hero-links { color: #b8c9bb; font-size: .9rem; margin: 0; }

.layout-side { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.sidebar { position: sticky; top: 12px; }
.side-cta h3 { margin-bottom: .3em; }
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 10px; }
.cat-block { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.cat-block h2 { font-size: 1.1rem; display: flex; justify-content: space-between; border-bottom: 2px solid var(--accent); padding-bottom: 8px; }
.cat-block h2 a { color: var(--ink); text-decoration: none; }
.cat-block ul { list-style: none; margin: 0; padding: 0; columns: 1; }
.cat-block li { display: flex; justify-content: space-between; padding: 3px 0; font-size: .92rem; }
.cat-block li a { text-decoration: none; color: var(--ink-2); }
.cat-block li a:hover { color: var(--primary); text-decoration: underline; }
.count { color: var(--muted); font-size: .8rem; }
.section-title { margin-top: 28px; display: flex; align-items: baseline; justify-content: space-between; }
.section-title .more { font-size: .9rem; font-weight: 600; }

/* ===== Cards ===== */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.09); }
.card-featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.card-img { position: relative; aspect-ratio: 4 / 3; background: #e9e5dc; display: block; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 12px 14px; display: flex; flex-direction: column; flex: 1; }
.card h3 { font-size: .98rem; margin-bottom: 4px; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--primary); }
.card-specs { color: var(--muted); font-size: .82rem; margin-bottom: 8px; }
.card-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.price { font-weight: 800; font-size: 1.1rem; color: var(--primary-d); white-space: nowrap; }
.price.big { font-size: 1.7rem; margin-bottom: 8px; }
.seller { font-size: .78rem; color: var(--muted); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { display: inline-block; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 4px; }
.card-img .tag { position: absolute; left: 8px; top: 8px; }
.card-img .tag-featured { left: auto; right: 8px; }
.tag-trade { background: var(--primary); color: #fff; }
.tag-private { background: #fff; color: var(--ink); border: 1px solid var(--line-2); }
.tag-featured { background: var(--accent); color: #fff; }
.verified { color: var(--primary); font-weight: 700; font-size: .85rem; }

/* ===== Search ===== */
.search-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.filters { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.filters-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.filter-form label { font-size: .85rem; margin-bottom: 10px; }
.filter-form select, .filter-form input { padding: 7px 9px !important; }
.checks legend { font-size: .85rem !important; font-weight: 600 !important; color: var(--ink-2); margin-bottom: 4px !important; }
.checks label.check { margin-bottom: 2px; font-size: .88rem; }
.filter-ads { margin-top: 16px; }
.results-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.results-head h1 { margin-bottom: 2px; }
.results-head p { margin: 0; }
.results-tools { display: flex; gap: 10px; align-items: center; }
.show-filters { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 14px; }
.chip { display: inline-flex; gap: 6px; align-items: center; background: var(--primary-l); color: var(--primary-d); border-radius: 20px; padding: 3px 11px; font-size: .85rem; text-decoration: none; font-weight: 600; }
.chip span { font-weight: 800; }
.grid-results { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.pager { display: flex; gap: 4px; justify-content: center; margin: 26px 0 0; flex-wrap: wrap; }
.pager a, .pager span { padding: 7px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); text-decoration: none; font-weight: 600; }
.pager .current { background: var(--primary); color: #fff; border-color: var(--primary); }
.pager .gap { border: 0; background: none; }

/* ===== Listing ===== */
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); }
.listing-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.gallery { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; margin-bottom: 18px; }
.gallery-main { aspect-ratio: 4 / 3; background: #ece8df; border-radius: 6px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.gallery-main img { max-height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.gallery-thumbs .thumb { border: 2px solid transparent; padding: 0; border-radius: 6px; overflow: hidden; width: 84px; height: 63px; flex: none; cursor: pointer; background: none; }
.gallery-thumbs .thumb.active { border-color: var(--accent); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.specs { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 18px; }
.specs dt { color: var(--muted); font-size: .9rem; }
.specs dd { margin: 0; font-weight: 600; }
.description { white-space: normal; line-height: 1.6; }
.buybox h1 { font-size: 1.35rem; margin: 8px 0 6px; }
.listing-side { position: sticky; top: 12px; }
.seller-box { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.seller-box p { margin: 6px 0; }
.enquiry { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.report summary { cursor: pointer; color: var(--muted); font-size: .85rem; margin-bottom: 8px; }

/* ===== Dealer ===== */
.dealer-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.dealer-card { display: flex; flex-direction: column; gap: 3px; text-decoration: none; color: var(--ink); margin: 0; }
.dealer-card:hover { border-color: var(--primary); }
.dealer-card .stock { color: var(--primary); font-weight: 700; font-size: .9rem; margin-top: 6px; }
.dealer-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.dealer-head h1 { margin: 6px 0; }
.dealer-contact { display: flex; gap: 8px; }
.dealer-search { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 8px; margin-bottom: 12px; }
.dealer-search input, .dealer-search select { margin: 0 !important; }

/* ===== Account / admin ===== */
.tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tabs a { padding: 9px 14px; text-decoration: none; color: var(--ink-2); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs a.active { color: var(--primary); border-bottom-color: var(--accent); }
.tabs a:hover { color: var(--primary); }
.pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.pills a { padding: 5px 12px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; color: var(--ink-2); font-size: .88rem; font-weight: 600; }
.pills a.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .pills { margin: 0; }
.inline-search { display: flex; gap: 6px; }
.inline-search input { margin: 0 !important; min-width: 220px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; color: var(--muted); font-size: .85rem; text-decoration: none; }
.stat span { display: block; font-size: 1.6rem; font-weight: 800; color: var(--ink); line-height: 1.1; }
.stat.attention { border-color: var(--accent); background: var(--accent-l); }
.stat.bad span { color: var(--danger); }
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table thead th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #faf8f4; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .neg { color: var(--danger); }
.table .actions { white-space: nowrap; }
.table .actions > * { margin-right: 8px; }
.mini { width: 56px; height: 42px; object-fit: cover; border-radius: 4px; }
.status { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: #eee; text-transform: capitalize; }
.status-active { background: var(--ok-l); color: #24602b; }
.status-pending { background: var(--warn-l); color: #7d5a09; }
.status-draft { background: #eceae4; color: var(--ink-2); }
.status-sold { background: #e5e9f3; color: #2c4475; }
.status-expired, .status-withdrawn { background: #eee; color: #666; }
.status-removed { background: var(--danger-l); color: var(--danger); }
.bulkbar { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.bulkbar select, .bulkbar input { width: auto; margin: 0; }
.img-manage { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.img-item { width: 120px; }
.img-item img { width: 120px; height: 90px; object-fit: cover; border-radius: 6px; margin-bottom: 4px; }
.img-item label { margin-bottom: 2px !important; }
.declaration { background: var(--accent-l) !important; border-color: #ecd3a6 !important; }
.submit-box { position: sticky; top: 12px; }
.submit-box .btn { margin-bottom: 8px; }
.enquiry-item.unread { border-left: 4px solid var(--accent); }
.enquiry-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.enquiry-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.switcher { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.switcher a { text-align: center; padding: 11px; text-decoration: none; font-weight: 700; color: var(--ink-2); }
.switcher a.active { background: var(--primary); color: #fff; }
.steps { padding-left: 20px; }
.steps li { margin-bottom: 6px; }
.ad-preview { max-width: 300px; border: 1px solid var(--line); border-radius: 4px; }
.prose { max-width: 820px; line-height: 1.65; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.prose h2 { margin-top: 1.4em; }
details summary { cursor: pointer; font-weight: 600; margin: 8px 0; }

/* ===== Footer ===== */
.site-footer { background: var(--ink); color: #c9c6be; padding: 34px 0 16px; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; }
.footer-grid strong { color: #fff; display: block; margin-bottom: 8px; }
.footer-grid a { display: block; color: #c9c6be; text-decoration: none; padding: 2px 0; font-size: .92rem; }
.footer-grid a:hover { color: #fff; }
.site-footer .muted { color: #96938b; font-size: .88rem; }
.footer-base { border-top: 1px solid #343a35; margin-top: 24px; padding-top: 14px; font-size: .82rem; }

/* ===== Responsive ===== */
@media (max-width: 1180px) {
  .search-layout { grid-template-columns: 240px minmax(0, 1fr); }
  .sidebar-ads { display: none; }
}
@media (max-width: 980px) {
  .masthead-inner { flex-wrap: wrap; }
  .masthead-search { order: 3; flex-basis: 100%; max-width: none; }
  .layout-side, .listing-layout, .form-cols { grid-template-columns: 1fr; }
  .sidebar, .listing-side, .submit-box { position: static; }
  .cat-grid { grid-template-columns: 1fr 1fr; }
  .hero-search { grid-template-columns: 1fr 1fr; }
  .hero-search input { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .search-layout { grid-template-columns: 1fr; }
  .filters { display: none; position: static; max-height: none; }
  .filters.open { display: block; }
  .show-filters { display: inline-flex; }
  .catnav .wrap { flex-wrap: nowrap; overflow-x: auto; }
  .catnav-drop { display: none !important; }
  .usernav { gap: 12px; font-size: .9rem; }
  .cat-grid, .row2, .row3, .dealer-search { grid-template-columns: 1fr; }
  .hero { padding: 24px 18px; }
  .hero h1 { font-size: 1.5rem; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-body { padding: 10px; }
  .card-foot { flex-direction: column; align-items: flex-start; gap: 2px; }
  .seller { text-align: left; max-width: 100%; }
  .specs { grid-template-columns: 1fr; gap: 0; }
  .specs dd { margin-bottom: 8px; }
  .inline-search input { min-width: 0; }
}
@media (max-width: 420px) {
  .brand span { font-size: 1rem; }
  .usernav .btn-accent { padding: 7px 10px; }
}

/* keep fieldset legends inside the panel box */
.form fieldset.panel > legend { float: left; width: 100%; }
.form fieldset.panel > legend + * { clear: both; }
