/* youdonbuycar — public inventory pages: Collections (filters, vehicle cards, pager) and the vehicle detail page.
   Loaded only by those pages, after site.css. Brand colours only (navy, gold, white, ink and tints of them);
   status is always text plus a shape, never colour alone. Gold is used only as a background, never as text on white. */

.mono{font-family:var(--fm)}
.lbl{display:block;margin:0 0 10px;padding:0;font:700 11px/16px var(--fd);letter-spacing:.12em;text-transform:uppercase;color:var(--subtle)}
.link{font:600 14px var(--fd);color:var(--navy);text-decoration:underline;text-underline-offset:4px}
.link:hover{text-decoration-thickness:2px}
.inp{width:100%;height:46px;padding:0 12px;border-radius:12px;border:1.5px solid rgba(17,19,24,.35);background:#fff;color:var(--ink);font:400 15px var(--ft)}
.inp:hover{border-color:var(--ink)}
.inp::placeholder{color:var(--subtle)}
select.inp{padding-right:30px}
.badge.b-plain{background:var(--navy-soft);color:var(--ink)}
.badge.b-plain::before{display:none}

/* ---------- Collections layout ---------- */
.coll{display:grid;grid-template-columns:288px minmax(0,1fr);gap:32px;align-items:start;padding-top:40px;padding-bottom:96px}
.filt{min-width:0}
.filt-sum{display:none;align-items:center;min-height:52px;padding:0 16px;border:1.5px solid rgba(17,19,24,.85);border-radius:12px;background:#fff;cursor:pointer;list-style:none;font:700 14px var(--fd)}
.filt-sum::-webkit-details-marker{display:none}
.filt-sum::after{content:"";margin-left:auto;width:9px;height:9px;border-right:2px solid var(--ink);border-bottom:2px solid var(--ink);transform:rotate(45deg) translate(-2px,-2px);transition:transform .2s}
.filt-d[open]>.filt-sum::after{transform:rotate(225deg) translate(-2px,-2px)}
.filt-t{display:inline-flex;align-items:center;gap:10px}
.filt-t svg.i{width:18px;height:18px}
.filt-t em{font:700 11px var(--fd);font-style:normal;letter-spacing:.06em;padding:3px 9px;border-radius:999px;background:var(--gold);color:var(--ink)}
.filt-form{display:flex;flex-direction:column;gap:22px;padding:22px 20px;background:#fff;border:1px solid var(--line);border-radius:18px}
.fg{border:0;margin:0;padding:0;min-width:0}
.ck{display:flex;align-items:center;gap:10px;min-height:36px;cursor:pointer;font:500 14.5px/20px var(--ft)}
.ck input{flex:none;width:20px;height:20px;margin:0;accent-color:var(--navy)}
.ck em{margin-left:auto;font:600 12px var(--fd);font-style:normal;color:var(--subtle)}
.yr{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.filt-actions{display:flex;gap:10px;flex-wrap:wrap}
.filt-actions .btn{height:48px;padding:0 20px;flex:1}

.coll-main{min-width:0}
.r-bar{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;flex-wrap:wrap;margin-bottom:22px}
.r-bar h2{font:800 26px/32px var(--fd);letter-spacing:-.02em;margin:0}
.r-sub{margin:2px 0 0;font:400 14px/20px var(--ft);color:var(--subtle)}
.sort{display:flex;align-items:center;gap:10px}
.sort label{font:600 13px var(--fd);white-space:nowrap}
.sort .inp{width:auto;min-width:210px}

.grid3{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:22px}

/* ---------- vehicle card ---------- */
.vc{position:relative;display:flex;flex-direction:column;background:#fff;border:1px solid var(--line);border-radius:18px;overflow:hidden;transition:transform .35s var(--ease),border-color .25s,box-shadow .35s}
.vc:hover{transform:translateY(-4px);border-color:var(--navy);box-shadow:0 22px 40px -26px rgba(17,19,24,.5)}
.vc:focus-within{outline:3px solid var(--navy);outline-offset:3px}
.vc-media{position:relative;aspect-ratio:3/2;background:var(--navy-soft);overflow:hidden}
.vc-media img{display:block;width:100%;height:100%;object-fit:cover}
.vc-none{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;color:var(--subtle);font:600 12px var(--fd)}
.vc-none svg.i{width:26px;height:26px}
.vc-tags{position:absolute;left:12px;top:12px;display:flex;gap:6px;flex-wrap:wrap}
/* on a photo the badge needs a solid background to stay readable; the label text and shape stay as they are */
.vc-tags .badge{box-shadow:0 2px 10px -3px rgba(17,19,24,.5)}
.vc-tags .b-available{background:#fff;color:var(--navy)}
.vc-tags .b-reserved{background:var(--gold);color:var(--ink)}
.vc-tags .b-sold{background:var(--ink);color:#fff}
.vc-feat{display:inline-flex;align-items:center;gap:5px;height:26px;padding:0 10px;border-radius:999px;background:var(--navy);color:#fff;font:700 10px/1 var(--fd);letter-spacing:.1em;text-transform:uppercase}
.vc-feat svg.i{width:12px;height:12px;color:var(--gold)}
.vc-cnt{position:absolute;right:12px;bottom:12px;display:inline-flex;align-items:center;gap:5px;height:26px;padding:0 10px;border-radius:999px;background:rgba(17,19,24,.78);color:#fff;font:600 12px var(--fd)}
.vc-cnt svg.i{width:13px;height:13px}
.vc-b{display:flex;flex-direction:column;flex:1;padding:16px 18px 18px}
.vc-meta{font:700 11px/16px var(--fd);letter-spacing:.1em;text-transform:uppercase;color:var(--subtle)}
.vc h3{margin:6px 0 10px;font:700 19px/24px var(--fd);letter-spacing:-.01em}
.vc h3 a::after{content:"";position:absolute;inset:0}
.vc-sp{display:flex;gap:16px;flex-wrap:wrap;margin:0 0 12px;padding:0;list-style:none;font:500 13px/18px var(--ft);color:var(--muted)}
.vc-sp li{display:inline-flex;align-items:center;gap:6px}
.vc-sp svg.i{width:15px;height:15px}
.vc-p{margin-top:auto}
.vc-p strong{font:800 21px/28px var(--fd);letter-spacing:-.01em}
/* reserved and sold cars are muted as well as labelled */
.vc.is-reserved .vc-media img,.vc.is-sold .vc-media img{filter:grayscale(.7);opacity:.85}
.vc.is-sold .vc-p strong,.vc.is-reserved .vc-p strong{color:var(--muted)}

/* ---------- empty states ---------- */
.empty{display:flex;flex-direction:column;align-items:center;gap:10px;padding:56px 24px;text-align:center;background:#fff;border:2px dashed var(--line);border-radius:20px}
.empty svg.i{width:34px;height:34px;color:var(--navy)}
.empty h3{margin:4px 0 0;font:800 22px/28px var(--fd);letter-spacing:-.02em}
.empty p{margin:0;max-width:460px;color:var(--muted)}
.empty .btns{display:flex;gap:12px;flex-wrap:wrap;justify-content:center;margin-top:12px}

/* ---------- pager ---------- */
.pager{display:flex;justify-content:center;align-items:center;gap:8px;flex-wrap:wrap;margin-top:38px}
.pg{display:inline-grid;place-items:center;min-width:44px;height:44px;padding:0 6px;border-radius:12px;border:1px solid var(--line);background:#fff;font:700 14px var(--fd)}
a.pg:hover{border-color:var(--ink)}
.pg.on{background:var(--navy);border-color:var(--navy);color:#fff}
.pg.is-disabled{opacity:.4}
.pg.gap{border:0;background:none}
.pg svg.i{width:18px;height:18px}

/* ---------- vehicle detail ---------- */
.vd-top{padding-top:28px}
.vd-title{margin-top:18px}
.vd-title .tags{display:flex;gap:8px;flex-wrap:wrap}
.vd-title .meta{margin:14px 0 6px;font:700 12px/16px var(--fd);letter-spacing:.14em;color:var(--subtle)}
.vd-sub{display:flex;gap:18px;flex-wrap:wrap;margin:12px 0 0;font:500 14px/20px var(--ft);color:var(--muted)}
.vd{display:grid;grid-template-columns:minmax(0,1fr) 380px;grid-template-areas:"gal buy" "info buy";gap:28px 40px;align-items:start;padding-top:28px;padding-bottom:64px}
.vd-gal{grid-area:gal;min-width:0}
.vd-info{grid-area:info;min-width:0}
.buy{grid-area:buy;position:sticky;top:96px}
.buy-c{padding:26px;background:#fff;border:1px solid var(--line);border-radius:20px;box-shadow:0 24px 50px -34px rgba(17,19,24,.5)}
.pr{margin:2px 0 10px;font:800 36px/42px var(--fd);letter-spacing:-.02em}
.buy-s{margin-bottom:20px}
.buy-act{display:flex;flex-direction:column;gap:10px}
.buy-note{margin:0 0 6px}

.gal-main{position:relative;display:grid;place-items:center;aspect-ratio:3/2;overflow:hidden;border-radius:20px;background:var(--navy-soft)}
.gal-main img{display:block;width:100%;height:100%;object-fit:contain}
.gal-empty{align-content:center;justify-items:center;gap:8px;color:var(--subtle);border:2px dashed var(--line);font:600 14px var(--fd)}
.gal-empty svg.i{width:34px;height:34px}
.gal-cnt{position:absolute;left:14px;bottom:14px;padding:6px 12px;border-radius:999px;background:rgba(17,19,24,.78);color:#fff;font:600 12px/16px var(--fd)}
.gal-nav{position:absolute;top:50%;display:grid;place-items:center;width:48px;height:48px;margin-top:-24px;border:0;border-radius:50%;background:#fff;color:var(--ink);cursor:pointer;box-shadow:0 8px 20px -8px rgba(17,19,24,.6)}
.gal-nav[hidden]{display:none}
.gal-nav.p{left:14px}
.gal-nav.n{right:14px}
.gal-nav:hover{background:var(--gold)}
.thumbs{display:flex;gap:10px;margin:12px 0 0;padding:4px 2px 8px;list-style:none;overflow-x:auto}
.thumbs li{flex:none}
.thumbs a{display:block;width:96px;aspect-ratio:3/2;overflow:hidden;border-radius:10px;border:2px solid transparent;opacity:.8}
.thumbs a:hover{opacity:1}
.thumbs a.on{border-color:var(--navy);opacity:1}
.thumbs img{display:block;width:100%;height:100%;object-fit:cover}

.kspecs{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin:0 0 30px;padding:0;list-style:none}
.ks{display:flex;flex-direction:column;gap:4px;padding:16px;background:#fff;border:1px solid var(--line);border-radius:14px}
.ks svg.i{width:20px;height:20px;color:var(--navy)}
.ks .lbl{margin:0}
.ks b{font:700 16px/22px var(--fd)}
.blk{margin:0 0 30px}
.blk h2{margin:0 0 12px;font:800 22px/28px var(--fd);letter-spacing:-.02em}
.blk p{margin:0 0 14px;max-width:70ch}
.sptab{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 32px;margin:0}
.sptab>div{display:flex;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid var(--line-2)}
.sptab dt{color:var(--muted)}
.sptab dd{margin:0;font-weight:600;text-align:right;overflow-wrap:anywhere}
.similar{padding:56px 0 96px;background:var(--paper)}
.sh{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;flex-wrap:wrap;margin-bottom:26px}
.sh .h-m{margin-top:8px}
.mbar{display:none}

/* ---------- tablet and phone ---------- */
@media (min-width:801px) and (max-width:1180px){
  .coll{grid-template-columns:250px minmax(0,1fr);gap:24px}
  .vd{grid-template-columns:minmax(0,1fr) 320px;gap:24px 28px}
}
@media (max-width:800px){
  .coll{grid-template-columns:1fr;gap:18px;padding-top:24px;padding-bottom:64px}
  .filt-sum{display:flex}
  .filt-form{margin-top:10px}
  .ck{min-height:44px}
  .filt-actions .btn{height:52px}
  .r-bar{align-items:flex-start}
  .sort{width:100%;flex-wrap:wrap}
  .sort .inp{flex:1;min-width:0}
  /* with JavaScript off the "Apply sort" button is shown: it gets its own full-width row so the menu keeps its width */
  .sort noscript{flex:1 1 100%}
  .sort noscript .btn{width:100%}
  .grid3{gap:18px}
  .vd-top{padding-top:20px}
  .vd{grid-template-columns:1fr;grid-template-areas:"gal" "buy" "info";gap:20px;padding-top:20px;padding-bottom:40px}
  .buy{position:static}
  .buy-c{padding:20px}
  .pr{font-size:30px;line-height:36px}
  .sptab{grid-template-columns:1fr}
  .gal-main{border-radius:14px}
  .similar{padding:40px 0 64px}
  .mbar{position:fixed;left:0;right:0;bottom:0;z-index:40;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 20px calc(10px + env(safe-area-inset-bottom));background:rgba(255,255,255,.97);border-top:1px solid var(--line)}
  .mbar strong{font:800 20px var(--fd)}
  main:has([data-mbar]){padding-bottom:76px}
}
