:root {
  --red: #dd0b0b;
  --red-dark: #b20000;
  --ink: #111;
  --body: #313131;
  --muted: #6b6b6b;
  --line: #e4e4e4;
  --bg: #f6f6f6;
  --white: #fff;
  --radius: 6px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Lato, sans-serif; color: var(--body); background: var(--bg); line-height: 1.5; }
img { max-width: 100%; display: block; }
h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; }
a { color: inherit; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }

/* Buttons */
.btn { font: inherit; font-weight: 900; text-transform: uppercase; letter-spacing: .02em; font-size: 14px; border: 2px solid transparent; border-radius: 4px; padding: 10px 18px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-outline { background: #fff; border-color: var(--ink); color: var(--ink); }
.btn.full { width: 100%; }
.link { background: none; border: 0; color: var(--red); font: inherit; font-weight: 700; cursor: pointer; padding: 0; }
.link.light { color: #fff; margin-right: 12px; }
.pill { background: var(--red); color: #fff; border-radius: 99px; font-size: 12px; padding: 1px 7px; margin-left: 2px; }

/* Header */
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand img { height: 60px; width: 60px; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { text-decoration: none; font-weight: 900; text-transform: uppercase; font-size: 14px; color: var(--ink); }

/* Layout */
.layout { display: grid; grid-template-columns: 270px 1fr; gap: 24px; padding-top: 28px; padding-bottom: 60px; }
.filters { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; align-self: start; position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow: auto; }
.filters-head { display: flex; justify-content: space-between; align-items: baseline; }
.filters h2 { font-size: 20px; }
.f-group { border-top: 1px solid var(--line); padding: 12px 0; }
.f-group > label, .f-group > .f-label { display: block; font-weight: 700; font-size: 13px; text-transform: uppercase; color: var(--ink); margin-bottom: 6px; }
.f-group select, .f-group input[type=number] { width: 100%; font: inherit; padding: 8px; border: 1px solid #ccc; border-radius: 4px; background: #fff; }
.f-row { display: flex; gap: 8px; }
.f-checks { display: grid; gap: 4px; max-height: 170px; overflow: auto; font-size: 14px; }
.f-checks label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
#savedSearches { margin-top: 12px; font-size: 14px; }
.saved-item { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.saved-item button { background: none; border: 0; cursor: pointer; font: inherit; text-align: left; color: var(--ink); padding: 0; }

.results-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
#q { flex: 1; min-width: 0; font: inherit; padding: 8px 12px; border: 1px solid #ccc; border-radius: 4px; }
#resultCount { font-weight: 700; color: var(--ink); white-space: nowrap; }
#sort { font: inherit; padding: 8px; border: 1px solid #ccc; border-radius: 4px; background: #fff; }
.only-mobile { display: none; }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .15s; }
.card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.card-media { position: relative; aspect-ratio: 16/10; background: linear-gradient(#fafafa, #ececec); cursor: pointer; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; }
.badge { background: var(--ink); color: #fff; font-size: 11px; font-weight: 900; text-transform: uppercase; padding: 3px 8px; border-radius: 3px; }
.badge.red { background: var(--red); }
.badge.gray { background: #888; }
.fav { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2); cursor: pointer; font-size: 18px; line-height: 36px; color: var(--ink); }
.fav.on { color: var(--red); }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-size: 17px; font-weight: 900; margin: 0; cursor: pointer; }
.card-sub { color: var(--muted); font-size: 14px; }
.price-row { display: flex; align-items: baseline; justify-content: space-between; margin-top: 4px; }
.price { font-size: 22px; font-weight: 900; color: var(--ink); }
.monthly { font-size: 13px; color: var(--muted); }
.specs-mini { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--muted); }
.card-actions { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14px; }
.card-actions label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.empty { grid-column: 1/-1; text-align: center; padding: 60px 20px; background: #fff; border: 1px dashed #ccc; border-radius: var(--radius); }

/* Compare bar */
.compare-bar { position: fixed; bottom: 0; left: 0; right: 0; background: var(--ink); color: #fff; padding: 12px 0; z-index: 30; }
.compare-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* Modal */
dialog { border: 0; border-radius: 8px; padding: 0; width: min(1000px, calc(100vw - 32px)); max-height: calc(100vh - 40px); }
dialog::backdrop { background: rgba(0,0,0,.6); }
.m-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 2; }
.m-head h2 { margin: 0; font-size: 24px; }
.m-close { background: none; border: 0; font-size: 28px; cursor: pointer; line-height: 1; color: var(--ink); }
.m-body { padding: 24px; }
.detail { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; }
.viewer { background: linear-gradient(#fafafa, #e9e9e9); border-radius: var(--radius); aspect-ratio: 16/10; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.viewer img { width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.viewer-ctrl { display: flex; align-items: center; gap: 10px; margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.viewer-ctrl input { flex: 1; accent-color: var(--red); }
.thumbs { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; }
.thumbs img { width: 76px; height: 50px; object-fit: cover; background: #eee; border-radius: 4px; cursor: pointer; border: 2px solid transparent; }
.thumbs img.on { border-color: var(--red); }
.side-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.side-box h3 { font-size: 16px; text-transform: uppercase; }
.price-box { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.price-box .price { font-size: 30px; }
.msrp { color: var(--muted); font-size: 14px; }
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 13px; }
.calc label { display: grid; gap: 2px; }
.calc input, .calc select { font: inherit; padding: 6px; border: 1px solid #ccc; border-radius: 4px; width: 100%; }
.calc-out { font-size: 28px; font-weight: 900; color: var(--ink); margin: 10px 0 0; }
.cta-stack { display: grid; gap: 8px; }
.section { margin-top: 28px; }
.section h3 { font-size: 18px; border-bottom: 2px solid var(--ink); padding-bottom: 6px; }
.spec-table { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 24px; font-size: 14px; }
.spec-table div { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 7px 0; gap: 8px; }
.spec-table span:first-child { color: var(--muted); }
.spec-table span:last-child { font-weight: 700; color: var(--ink); text-align: right; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--bg); border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px; font-size: 13px; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 14px; }
.checks li::before { content: "✓"; color: var(--red); font-weight: 900; margin-right: 8px; }
.checks li.warn::before { content: "!"; }

.compare-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.compare-table th, .compare-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.compare-table th { color: var(--muted); font-weight: 400; width: 150px; }
.compare-table td { font-weight: 700; color: var(--ink); }
.compare-table img { width: 180px; aspect-ratio: 16/10; object-fit: cover; border-radius: 4px; }
.table-scroll { overflow-x: auto; }

.lead-form { display: grid; gap: 12px; max-width: 520px; }
.lead-form label { display: grid; gap: 4px; font-weight: 700; font-size: 14px; color: var(--ink); }
.lead-form input, .lead-form textarea, .lead-form select { font: inherit; padding: 10px; border: 1px solid #ccc; border-radius: 4px; }

.footer { background: var(--ink); color: #b5b5b5; font-size: 14px; padding-top: 52px; border-top: 4px solid var(--red); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer-brand img { filter: invert(1); margin-bottom: 16px; }
.footer-brand p { margin: 0 0 16px; max-width: 340px; line-height: 1.6; }
.footer h4 { color: #fff; font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 16px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer a { color: #b5b5b5; text-decoration: none; transition: color .15s; }
.footer a:hover { color: #fff; }
.footer-col a[data-link="tel"] { color: #fff; font-size: 18px; font-weight: 900; }
.footer-address { line-height: 1.5; font-style: normal; }
.footer-social { display: flex; gap: 10px; }
.footer-social a { border: 1px solid #444; border-radius: 4px; padding: 6px 14px; font-weight: 700; font-size: 13px; }
.footer-social a:hover { border-color: var(--red); background: var(--red); }
.footer-bottom { border-top: 1px solid #2a2a2a; padding: 18px 0 22px; font-size: 13px; }
.footer-bottom-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; }
.footer-legal { display: flex; gap: 20px; }
.footer-disclaimer { color: #7a7a7a; font-size: 12px; margin: 12px auto 0; }
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .results-bar { flex-wrap: wrap; }
  #q { order: -1; flex-basis: 100%; }
  #resultCount { flex: 1; }
  .layout { grid-template-columns: 1fr; }
  .filters { display: none; position: static; max-height: none; }
  .filters.open { display: block; }
  .only-mobile { display: inline-flex; }
  .detail { grid-template-columns: 1fr; }
  .nav a:not([data-action]) { display: none; }
  .nav { gap: 14px; }
  .nav .btn { padding: 8px 10px; font-size: 12px; }
  .brand img { height: 50px; width: 50px; }
  .m-body, .m-head { padding: 16px; }
}
.compare-inner > div { display: flex; align-items: center; flex-shrink: 0; }
body:has(.compare-bar:not([hidden])) .footer-bottom { padding-bottom: 90px; }
