/* ============================================================
   KOOPCARS MOBILE DEMO — SHARED DESIGN SYSTEM (LIGHT THEME)
   Loaded by every page in public/demo/*.php via:
   <link rel="stylesheet" href="assets/css/styles.css">
   Do not duplicate this block inline in a page — page-specific
   CSS goes in assets/css/pages.css, loaded after this file.
   ============================================================ */

:root{
  /* brand — fixed by client, never change these three */
  --kc-blue:#4081ec;
  --kc-blue-dark:#2f5fc0;
  --kc-orange:#ff4500;   /* "orangered" accent — Hot / Featured / Sell emphasis */
  --kc-red:#ff4c4c;      /* urgent accent — price emphasis, sold, destructive, errors */

  --kc-blue-tint:#eaf1fe;
  --kc-orange-tint:#fff0e8;
  --kc-red-tint:#ffedee;
  --kc-success:#1c9a6c;
  --kc-success-tint:#e6f7f0;

  --ink:#161d33;
  --ink-soft:#5b6478;
  --ink-faint:#98a0b3;
  --surface:#f6f8fc;       /* app page canvas — light, near-white */
  --surface-card:#ffffff;  /* cards, inputs, sheets — pure white */
  --border:#e9edf4;
  --border-strong:#d7deec;
  --overlay:rgba(20,26,46,.45);

  --shadow-card:0 1px 2px rgba(22,29,51,.04), 0 8px 20px -14px rgba(22,29,51,.14);
  --shadow-float:0 14px 32px -10px rgba(22,29,51,.22);
  --shadow-frame:0 24px 55px -22px rgba(15,20,40,.22), 0 2px 10px rgba(15,20,40,.05);

  --radius-frame:38px;
  --radius-card:16px;
  --radius-field:11px;
  --radius-pill:999px;
  --radius-sheet:20px;

  --font-display:'Sora',system-ui,-apple-system,'Segoe UI',sans-serif;
  --font-body:'Plus Jakarta Sans',system-ui,-apple-system,'Segoe UI',sans-serif;
}

*,*::before,*::after{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  background:#eef1f6; /* desktop review backdrop behind the phone frame only */
  color:var(--ink);
  font-family:var(--font-body);
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%;display:block;}
button{font-family:inherit;}
h1,h2,h3,h4{font-family:var(--font-display);margin:0;text-wrap:balance;color:var(--ink);}
p{margin:0;}
a{color:inherit;text-decoration:none;}
.kc-num{font-variant-numeric:tabular-nums;}

/* ============ GALLERY WRAP (desktop review chrome) ============ */
.kc-page{
  min-height:100vh;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding:48px 20px;
}

/* ============ DEVICE FRAME ============ */
.kc-frame{
  position:relative;
  width:390px;
  height:844px;
  background:var(--surface);
  border-radius:var(--radius-frame);
  box-shadow:var(--shadow-frame);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  border:1px solid var(--border);
}
.kc-status{
  flex:none;
  height:47px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 28px;
  font:600 14px/1 var(--font-body);
  color:var(--ink);
  background:transparent;
}
.kc-status .kc-status-icons{display:flex;align-items:center;gap:5px;}

/* ============ TOP APP BAR ============ */
.kc-topbar{
  flex:none;
  display:flex;
  align-items:center;
  gap:10px;
  padding: 14px 12px;
  background:var(--surface);
}
.kc-topbar.solid{background:var(--surface-card);border-bottom:1px solid var(--border);}
.kc-topbar-btn{
  width:38px;height:38px;flex:none;
  display:flex;align-items:center;justify-content:center;
  border-radius:var(--radius-pill);
  background:var(--surface-card);
  border:1px solid var(--border);
  color:var(--ink);
  cursor:pointer;
}
.kc-topbar-btn svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2.2;}
.kc-topbar-title{
  font-family:var(--font-display);
  font-size:17px;font-weight:700;
  flex:1;min-width:0;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.kc-topbar-actions{display:flex;gap:8px;flex:none;}
.kc-logo{font-family:var(--font-display);font-weight:800;letter-spacing:-.01em;font-size:19px;}
.kc-logo span{color:var(--kc-blue);}

/* ============ SCROLL CONTENT ============ */
.kc-content{
  flex:1;
  overflow-y:auto;
  padding:0px 16px 24px;
  display:flex;
  flex-direction:column;
  gap:18px;
  scrollbar-width:none;
}
.kc-content::-webkit-scrollbar{display:none;}
.kc-content.flush{padding-left:0;padding-right:0;}

/* ============ BOTTOM TAB BAR ============ */
.kc-bottomnav{
  flex:none;
  position:relative;
  display:flex;
  align-items:center;
  justify-content:stretch;
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  padding:8px 6px calc(10px + env(safe-area-inset-bottom,0px));
  background:var(--surface-card);
  border-top:1px solid var(--border);
}
.kc-navitem{
  width:100%;
  display:flex;flex-direction:column;align-items:center;gap:3px;
  color:var(--ink-faint);
  background:none;border:none;
  font:600 10.5px/1 var(--font-body);
  padding:4px 8px;
  border-radius:12px;
  cursor:pointer;
}
.kc-navitem svg{width:23px;height:23px;stroke:currentColor;fill:none;stroke-width:1.8;}
.kc-navitem.active{color:var(--kc-blue);}
.kc-navitem.high-light,
.kc-navitem.high-light.active{color:var(--kc-red);}
/* Keep Sell in the five-column grid while lifting its action button above
   the navigation bar. */
.kc-navitem.sell{
  position:relative;top:-18px;
  margin-bottom:-18px;
  z-index:15;color:var(--ink-faint);
}
.kc-navitem.sell .kc-sell-pill{
  width:50px;height:50px;border-radius:50%;
  background:linear-gradient(155deg,var(--kc-orange),#ff6a2b);
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 10px 22px -6px rgba(255,69,0,.5),0 0 0 4px var(--surface-card);
  margin-bottom:2px;
}
.kc-navitem.sell .kc-sell-pill svg{width:24px;height:24px;stroke:#fff;stroke-width:2.2;}

/* ============ STICKY ACTION BAR ============ */
.kc-stickybar{
  flex:none;
  display:flex;
  gap:10px;
  padding:12px 16px calc(14px + env(safe-area-inset-bottom,0px));
  background:var(--surface-card);
  border-top:1px solid var(--border);
}

/* ============ BUTTONS ============ */
.kc-btn{
  appearance:none;border:none;cursor:pointer;
  font-family:var(--font-body);font-weight:700;font-size:14.5px;
  border-radius:var(--radius-pill);
  padding:13px 20px;
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  line-height:1;
  transition:transform .15s ease;
  text-decoration:none;
}
.kc-btn svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;}
.kc-btn:active{transform:scale(.97);}
.kc-btn-block{width:100%;}
.kc-btn-primary{background:var(--kc-blue);color:#fff;}
.kc-btn-accent{background:var(--kc-orange);color:#fff;}
.kc-btn-outline{background:transparent;color:var(--kc-blue);border:1.5px solid var(--kc-blue);}
.kc-btn-ghost{background:var(--surface);color:var(--ink);border:1px solid var(--border);}
.kc-btn-danger{background:var(--kc-red-tint);color:var(--kc-red);}
.kc-btn-sm{padding:9px 14px;font-size:13px;}
.kc-btn-icon{width:42px;height:42px;padding:0;border-radius:50%;}

/* ============ CARD ============ */
.kc-card{
  background:var(--surface-card);
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  box-shadow:var(--shadow-card);
}
.kc-card-pad{padding:16px;}

/* ============ SECTION TITLE ============ */
.kc-section-title{
  display:flex;align-items:baseline;justify-content:space-between;gap:10px;
  font-family:var(--font-display);font-weight:700;font-size:17px;
}
.kc-section-title .kc-link{font-family:var(--font-body);font-weight:700;font-size:12.5px;color:var(--kc-blue);background:none;border:none;padding:0;cursor:pointer;}
.kc-eyebrow{font:700 11px/1 var(--font-body);letter-spacing:.09em;text-transform:uppercase;color:var(--ink-faint);}

/* ============ BADGES / CHIPS ============ */
.kc-badge{
  display:inline-flex;align-items:center;gap:4px;
  font:800 10.5px/1 var(--font-body);letter-spacing:.03em;text-transform:uppercase;
  padding:5px 9px;border-radius:var(--radius-pill);
}
.kc-badge-hot{background:var(--kc-orange-tint);color:var(--kc-orange);}
.kc-badge-sold{background:var(--kc-red-tint);color:var(--kc-red);}
.kc-badge-verified{background:var(--kc-success-tint);color:var(--kc-success);}
.kc-badge-neutral{background:var(--surface);color:var(--ink-soft);border:1px solid var(--border);}

.kc-chip{
  font:600 13px/1 var(--font-body);color:var(--ink-soft);
  background:var(--surface-card);border:1px solid var(--border);
  padding:9px 14px;border-radius:var(--radius-pill);
  display:inline-flex;align-items:center;gap:6px;white-space:nowrap;
  cursor:pointer;
}
.kc-chip svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2;}
.kc-chip.active{background:var(--kc-blue-tint);border-color:var(--kc-blue);color:var(--kc-blue-dark);}
.kc-chiprow{display:flex;flex-shrink:0;gap:8px;overflow-x:auto;scrollbar-width:none;padding-bottom:2px;}
.kc-chiprow::-webkit-scrollbar{display:none;}

/* ============ PHOTO PLACEHOLDER (no real photos in this demo) ============ */
.kc-photo-ph{
  width:100%;height:100%;
  display:flex;align-items:center;justify-content:center;
  background:linear-gradient(160deg,var(--surface),var(--border));
}
.kc-photo-ph svg{width:42%;height:42%;stroke:var(--ink-faint);fill:none;stroke-width:1.3;}

/* ============ LISTING CARD (Home / Search / Saved) ============ */
.kc-listing{
  background:var(--surface-card);border:1px solid var(--border);
  border-radius:var(--radius-card);overflow:hidden;box-shadow:var(--shadow-card);
  display:flex;flex-direction:column;
}
[data-href]{cursor:pointer;}
.kc-listing-media{position:relative;aspect-ratio:16/10;background:var(--surface);overflow:hidden;}
.kc-listing-media img{width:100%;height:100%;object-fit:cover;}
.kc-listing-badges{position:absolute;top:10px;left:10px;display:flex;gap:6px;}
.kc-listing-fav{
  position:absolute;top:8px;right:8px;width:34px;height:34px;border-radius:50%;
  background:rgba(22,29,51,.45);backdrop-filter:blur(2px);
  display:flex;align-items:center;justify-content:center;border:none;cursor:pointer;z-index:2;
}
.kc-listing-fav svg{width:18px;height:18px;stroke:#fff;fill:none;stroke-width:2;}
.kc-listing-fav.saved svg{fill:var(--kc-red);stroke:var(--kc-red);}
.kc-listing-body{position:relative;padding:12px 13px 14px;display:flex;flex-direction:column;gap:5px;}
.kc-listing-actions{display:none;}
.kc-listing-viewed{display:none;position:absolute;top:12px;right:13px;color:var(--kc-success);font-size:17px;line-height:1;}
.kc-listing.is-viewed .kc-listing-viewed{display:block;}
.kc-listing-price{font-family:var(--font-display);font-weight:800;font-size:18px;color:var(--kc-red);}
.kc-listing-title{font-weight:700;font-size:14px;color:var(--ink);line-height:1.3;}
.kc-listing-meta{font-size:12.5px;color:var(--ink-soft);display:flex;align-items:center;gap:5px;flex-wrap:wrap;}
.kc-listing-meta svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:2;}
.kc-listing-meta b{color:var(--ink-faint);font-weight:600;}
.kc-listing-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.kc-listing.row{flex-direction:row;}
.kc-listing.row .kc-listing-media{width:132px;flex:none;aspect-ratio:auto;}
.kc-listing.row .kc-listing-body{flex:1;justify-content:center;}

.kc-hscroll{display:flex;gap:12px;overflow-x:auto;scrollbar-width:none;margin:0 -16px;padding:0 16px 4px;}
.kc-hscroll::-webkit-scrollbar{display:none;}
.kc-hscroll .kc-listing{width:168px;flex:none;}

/* ============ SEARCH BAR (pill input, reused for zip/keyword search
   fields and the read-only topbar location display) ============ */
.kc-searchbar{
  position:relative;display:flex;align-items:center;gap:8px;
  background:var(--surface-card);border:1.5px solid var(--border);
  border-radius:var(--radius-pill);padding:9px 14px;
}
.kc-searchbar svg{width:17px;height:17px;stroke:var(--ink-faint);flex:none;}
.kc-searchbar input{flex:1;min-width:0;border:none;outline:none;background:none;font:600 14px var(--font-body);color:var(--ink);}
.kc-searchbar span{font:600 14px var(--font-body);color:var(--ink);}
.kc-searchbar button{
  background:var(--kc-blue);color:#fff;border:none;flex:none;cursor:pointer;
  width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;
}
.kc-searchbar button svg{stroke:#fff;}

/* ============ FORM FIELDS ============ */
.kc-field{display:flex;flex-direction:column;gap:6px;}
.kc-label{font:700 12.5px/1 var(--font-body);color:var(--ink-soft);}
.kc-label .req{color:var(--kc-red);}
.kc-input,.kc-select,.kc-textarea{
  width:100%;
  font:500 14.5px/1.3 var(--font-body);
  color:var(--ink);
  background:var(--surface-card);
  border:1.5px solid var(--border);
  border-radius:var(--radius-field);
  padding:13px 14px;
  appearance:none;
}
.kc-input:focus,.kc-select:focus,.kc-textarea:focus{outline:none;border-color:var(--kc-blue);box-shadow:0 0 0 3px var(--kc-blue-tint);}
.kc-input[disabled]{background:var(--surface);color:var(--ink-faint);cursor:not-allowed;}
.kc-textarea{resize:vertical;min-height:96px;}
.kc-select-wrap{position:relative;}
.kc-select-wrap svg{position:absolute;right:14px;top:50%;transform:translateY(-50%) rotate(90deg);width:16px;height:16px;stroke:var(--ink-faint);fill:none;stroke-width:2;pointer-events:none;}
.kc-hint{font-size:11.5px;color:var(--ink-faint);}
.kc-error{font-size:11.5px;color:var(--kc-red);font-weight:600;}
.kc-row2{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.kc-fieldset{display:flex;flex-direction:column;gap:12px;}

.kc-passfield{position:relative;}
.kc-passfield .kc-input{padding-right:44px;}
.kc-eye-toggle{
  position:absolute;right:5px;top:50%;transform:translateY(-50%);
  width:34px;height:34px;border:none;background:none;
  display:flex;align-items:center;justify-content:center;
  color:var(--ink-faint);cursor:pointer;border-radius:50%;
}
.kc-eye-toggle.is-visible{color:var(--kc-blue);}
.kc-eye-toggle svg{width:19px;height:19px;stroke:currentColor;fill:none;stroke-width:1.8;}

/* ============ SPEC GRID (car detail) ============ */
.kc-spec-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 14px;}
.kc-spec{display:flex;flex-direction:column;gap:2px;padding:10px 0;border-bottom:1px solid var(--border);}
.kc-spec dt{margin:0;font:700 10.5px/1 var(--font-body);letter-spacing:.04em;text-transform:uppercase;color:var(--ink-faint);}
.kc-spec dd{margin:0;font:600 14px/1.3 var(--font-body);color:var(--ink);}

/* ============ SEGMENTED CONTROL ============ */
.kc-segmented{display:flex;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-pill);padding:4px;}
.kc-segmented button{flex:1;border:none;background:none;padding:10px;border-radius:var(--radius-pill);font:700 13.5px var(--font-body);color:var(--ink-soft);cursor:pointer;}
.kc-segmented button.active{background:var(--kc-blue);color:#fff;}

/* ============ BOTTOM SHEET ============ */
.kc-sheet-overlay{
  position:absolute;inset:0;background:var(--overlay);
  display:flex;align-items:flex-end;z-index:40;
  opacity:0;pointer-events:none;transition:opacity .22s ease;
}
.kc-sheet-overlay.open{opacity:1;pointer-events:auto;}
.kc-sheet{
  width:100%;max-height:86%;
  background:var(--surface-card);
  border-radius:var(--radius-sheet) var(--radius-sheet) 0 0;
  display:flex;flex-direction:column;
  box-shadow:var(--shadow-float);
  transform:translateY(16px);transition:transform .22s ease;
}
.kc-sheet-overlay.open .kc-sheet{transform:translateY(0);}
.kc-sheet-handle{width:36px;height:4px;border-radius:2px;background:var(--border-strong);margin:10px auto 4px;}
.kc-sheet-head{display:flex;align-items:center;justify-content:space-between;padding:6px 18px 12px;border-bottom:1px solid var(--border);}
.kc-sheet-head h3{font-size:17px;}
.kc-sheet-head button{background:none;border:none;color:var(--kc-blue);font-weight:700;font-size:13px;cursor:pointer;}
.kc-sheet-body{padding:16px 18px;overflow-y:auto;display:flex;flex-direction:column;gap:16px;}
.kc-sheet-foot{padding:14px 18px calc(16px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--border);display:flex;gap:10px;}
.kc-sheet-foot .kc-btn{flex:1;}

/* ============ EMPTY STATE ============ */
.kc-empty{display:flex;flex-direction:column;align-items:center;text-align:center;gap:10px;padding:40px 20px;color:var(--ink-soft);}
.kc-empty svg{width:44px;height:44px;stroke:var(--ink-faint);fill:none;stroke-width:1.5;}
.kc-empty h4{font-size:15px;}
.kc-empty p{font-size:13px;color:var(--ink-faint);}

/* ============ AVATAR / DIVIDER ============ */
.kc-avatar{width:56px;height:56px;border-radius:50%;background:var(--kc-blue-tint);color:var(--kc-blue-dark);display:flex;align-items:center;justify-content:center;font:800 20px var(--font-display);flex:none;}
.kc-divider{height:1px;background:var(--border);border:none;margin:0;}
.kc-swipedots{display:flex;gap:5px;justify-content:center;}
.kc-swipedots span{width:6px;height:6px;border-radius:50%;background:rgba(255,255,255,.55);}
.kc-swipedots span.active{background:#fff;width:16px;border-radius:3px;}

/* ============ RESPONSIVE: real phone viewport -> drop the chrome ============ */
@media (max-width:640px){
  .kc-page{padding:0;display:block;}
  .kc-frame{
    width:100%;height:100vh;height:100dvh;border-radius:0;box-shadow:none;border:none;
  }
}

/* ============================================================
   DESKTOP NAV — persistent top bar, hidden by default (mobile),
   shown at the desktop breakpoint below. Same markup on EVERY
   page (see home.html for the reference snippet) so the whole
   site is reachable from anywhere, on both mobile and desktop:

   <nav class="kc-desktop-nav">
     <div class="kc-desktop-nav-inner">
       <a class="kc-logo" href="home.html">koop<span>cars</span></a>
       <div class="kc-desktop-navlinks">
         <a class="kc-desktop-navlink [active]" href="home.html">Home</a>
         <a class="kc-desktop-navlink [active]" href="listings.html">Browse Cars</a>
         <a class="kc-desktop-navlink [active]" href="sell-your-car.html">Sell Your Car</a>
         <a class="kc-desktop-navlink [active]" href="coupon.html">Deals</a>
       </div>
       <div class="kc-desktop-search">...</div>
       <a class="kc-desktop-iconbtn" href="saved-listings.html" aria-label="Saved">...</a>
       <a class="kc-desktop-account" href="my-profile.html">...</a>
     </div>
   </nav>
   ============================================================ */
.kc-desktop-nav{display:none;}
.kc-desktop-nav-inner{
  max-width:1240px;margin:0 auto;height:72px;
  display:flex;align-items:center;gap:28px;padding:0 32px;
}
.kc-desktop-nav .kc-logo{font-size:21px;flex:none;}
.kc-desktop-navlinks{display:flex;align-items:center;gap:26px;flex:1;}
.kc-desktop-navlink{font:700 14px var(--font-body);color:var(--ink-soft);padding:26px 0;border-bottom:2px solid transparent;}
.kc-desktop-navlink:hover{color:var(--ink);}
.kc-desktop-navlink.active{color:var(--kc-blue);border-bottom-color:var(--kc-blue);}
.kc-desktop-navlink.high-light,
.kc-desktop-navlink.high-light.active{color:var(--kc-red);}
.kc-desktop-navlink.high-light.active{border-bottom-color:var(--kc-red);}
.kc-desktop-search{
  flex:none;width:250px;position:relative;background:var(--surface);
  border:1.5px solid var(--border);border-radius:var(--radius-pill);
  display:flex;align-items:center;gap:8px;padding:9px 14px;
}
.kc-desktop-search svg{width:16px;height:16px;stroke:var(--ink-faint);flex:none;}
.kc-desktop-search input{border:none;outline:none;background:none;font:600 13.5px var(--font-body);color:var(--ink);width:100%;}
.kc-desktop-iconbtn{
  flex:none;height:40px;padding:0 14px;border-radius:var(--radius-pill);display:flex;align-items:center;gap:7px;justify-content:center;
  color:var(--ink-soft);border:1px solid var(--border);font:700 13.5px var(--font-body);
}
.kc-desktop-iconbtn:hover{color:var(--kc-red);border-color:var(--kc-red);}
.kc-desktop-iconbtn svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.8;flex:none;}
.kc-desktop-iconbtn.saved svg{fill:var(--kc-red);stroke:var(--kc-red);}
.kc-desktop-account{flex:none;display:flex;align-items:center;gap:9px;font:700 13.5px var(--font-body);color:var(--ink);padding:6px 8px 6px 6px;border-radius:var(--radius-pill);border:1px solid var(--border);}
.kc-desktop-account:hover{border-color:var(--border-strong);}
.kc-desktop-account .kc-avatar{width:30px;height:30px;font-size:12px;}
.kc-desktop-account svg{width:14px;height:14px;stroke:var(--ink-faint);fill:none;stroke-width:2;}

/* ============================================================
   DESKTOP BREAKPOINT (>=1024px) — the phone-frame preview goes
   away entirely and the page becomes a real desktop layout:
   the persistent top nav replaces the mobile back-button bar,
   the mobile status bar and bottom tab bar disappear (the top
   nav's links + account/saved icons cover the same destinations),
   and .kc-content becomes a centered, wide canvas that page-
   specific CSS can turn into a sidebar/grid layout.
   ============================================================ */
@media (min-width:1024px){
  .kc-page{padding:0;display:block;background:var(--surface);}
  .kc-frame{width:100%;height:auto;min-height:100vh;border-radius:0;box-shadow:none;border:none;overflow:visible;}
  .kc-status,.kc-topbar{display:none;}
  .kc-desktop-nav{display:block;background:var(--surface-card);border-bottom:1px solid var(--border);position:sticky;top:0;z-index:30;}
  .kc-bottomnav{display:none;}
  .kc-stickybar{position:sticky;bottom:0;z-index:20;box-shadow:0 -4px 16px -8px rgba(22,29,51,.12);}
  .kc-content{
    width:calc(100% - 64px);overflow-y:visible;max-width:1240px;margin:0 auto;
    padding:32px 32px 64px;gap:28px;
  }
  .kc-content.flush{padding-left:32px;padding-right:32px;}

  /* Full is the shared default; these two variants reserve narrower widths
     for dashboard forms and simple reading/auth pages. */
  .kc-content--medium{max-width:840px;}
  .kc-content--narrow{max-width:560px;}
  .kc-listing-grid{grid-template-columns:repeat(4,1fr);gap:20px;}
  .kc-hscroll{margin:0;padding:0 0 4px;}
  .kc-hscroll .kc-listing{width:230px;}
  /* Below 1024px this is a bottom sheet (see BOTTOM SHEET section); at this
     breakpoint the same overlay/open toggle instead centers .kc-sheet as a
     floating dialog — a screen-edge drawer reads as awkward once there's no
     screen edge nearby to anchor it to, and a centered modal keeps the
     confirm/cancel actions within a natural line of sight and click reach. */
  .kc-sheet-overlay{position:fixed;align-items:center;justify-content:center;padding:24px;}
  .kc-sheet{width:100%;max-width:420px;max-height:calc(100vh - 48px);border-radius:var(--radius-sheet);transform:translateY(10px) scale(.97);}
  .kc-sheet-overlay.open .kc-sheet{transform:translateY(0) scale(1);}
  .kc-sheet-handle{display:none;}

  /* the desktop nav's own search box is redundant with each page's real
     search entry point (home hero, listings filters/topbar) — hide it
     but keep the markup so every page's nav stays byte-identical */
  .kc-desktop-search{display:none;}
}

/* ============ SELLER-TYPE BADGE (every listing shows Owner or Dealer) ============ */
.kc-badge-owner{background:var(--surface);color:var(--ink-soft);border:1px solid var(--border);}

/* ============ ZIP / KEYWORD AUTOCOMPLETE DROPDOWN ============ */
/* Shared by the home hero search and any keyword/zip field elsewhere.
   Hidden until the input is focused/typed into — see scripts.js's
   data-autocomplete-input / data-autocomplete-list wiring. */
.kc-suggest{
  display:none;
  position:absolute;top:calc(100% + 4px);left:0;right:0;z-index:5;
  background:var(--surface-card);border:1px solid var(--border);border-radius:14px;
  box-shadow:var(--shadow-float);overflow:hidden;text-align:left;
}
.kc-suggest.open{display:block;}
.kc-suggest-item{display:flex;align-items:center;gap:10px;padding:11px 14px;font-size:13.5px;color:var(--ink);border-bottom:1px solid var(--border);cursor:pointer;}
.kc-suggest-item:last-child{border-bottom:none;}
.kc-suggest-item:hover{background:var(--surface);}
.kc-suggest-item svg{width:15px;height:15px;stroke:var(--ink-faint);flex:none;}
.kc-suggest-item b{font-weight:700;}
.kc-suggest-item span{color:var(--ink-faint);}

/* ============ SKELETON LOADING (listings page "Apply Filters" / sort /
   pagination "reloading" state; also reused by my-cars.php's filter chips)
   ============ */
/* Shaped like the real listing card it stands in for — .kc-listing.row (see
   LISTING CARD section above) via kc-listing / row / kc-listing-media /
   kc-listing-body / kc-listing-specs / kc-listing-actions, or the my-cars
   .kc-mycar card (see PAGE: my-cars.php rules) via kc-mycar-top /
   kc-mycar-actions — so it inherits that card's own mobile vs. desktop
   (>=1024px) breakpoints instead of duplicating those media queries here. */
.kc-skeleton-block{background:linear-gradient(90deg,var(--border) 25%,var(--surface) 50%,var(--border) 75%);background-size:200% 100%;animation:kc-shimmer 1.2s ease-in-out infinite;border-radius:5px;}
@keyframes kc-shimmer{0%{background-position:200% 0;}100%{background-position:-200% 0;}}
.kc-skeleton-card .kc-listing-media .kc-skeleton-block{position:absolute;inset:0;border-radius:0;}
.kc-skeleton-card .kc-skeleton-block.line{height:11px;}
.kc-skeleton-card .kc-skeleton-block.line.w30{width:30%;}
.kc-skeleton-card .kc-skeleton-block.line.w70{width:70%;}
.kc-skeleton-card .kc-skeleton-block.line.w50{width:50%;}
.kc-skeleton-card .kc-skeleton-block.line.w40{width:40%;}
.kc-skeleton-card .kc-skeleton-block.chip{width:56px;height:20px;border-radius:7px;}
.kc-skeleton-card .kc-skeleton-block.btn{flex:1;height:34px;border-radius:var(--radius-pill);}
@media (prefers-reduced-motion:reduce){.kc-skeleton-block{animation:none;}}

/* ============ PAGINATION ============ */
.kc-pagination{display:flex;align-items:center;justify-content:center;gap:6px;padding-top:8px;flex-wrap:wrap;}
.kc-page-btn{
  min-width:36px;height:36px;padding:0 8px;border-radius:10px;
  display:flex;align-items:center;justify-content:center;
  font:700 13px var(--font-body);color:var(--ink-soft);
  background:var(--surface-card);border:1px solid var(--border);cursor:pointer;
}
.kc-page-btn.active{background:var(--kc-blue);border-color:var(--kc-blue);color:#fff;}
.kc-page-btn[disabled]{opacity:.4;cursor:not-allowed;}
.kc-page-btn svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2.2;}
.kc-page-ellipsis{color:var(--ink-faint);font:700 13px var(--font-body);padding:0 2px;}

/* ============ SITE FOOTER (persistent legal links, scrolls with content) ============ */
.kc-footer{
  padding:26px 4px 12px;
  border-top:1px solid var(--border);
  display:flex;flex-direction:column;align-items:center;gap:14px;text-align:center;
}
.kc-footer-brand{display:flex;align-items:center;gap:7px;font-family:var(--font-display);font-weight:800;font-size:14px;color:var(--ink-soft);letter-spacing:-.01em;}
.kc-footer-brand span{color:var(--kc-blue);}
.kc-footer-links{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;row-gap:8px;}
.kc-footer-links a{font:600 12px var(--font-body);color:var(--ink-soft);padding:0 11px;line-height:1;}
.kc-footer-links a:hover{color:var(--kc-blue);}
.kc-footer-links a:not(:last-child){border-right:1px solid var(--border-strong);}
.kc-footer-copy{font-size:11.5px;color:var(--ink-faint);}

/* ============ SCROLL TO TOP (every page, see scripts.js data-scroll-top) ============ */
/* Positioned absolute within .kc-frame (not fixed) below 1024px so it stays
   inside the device screen/frame preview instead of escaping to the browser
   viewport corner and getting clipped by .kc-frame's overflow:hidden. At the
   desktop breakpoint .kc-frame spans the whole document instead of a fixed
   device viewport, so it switches to position:fixed to track the browser
   window as the page scrolls. */
.kc-scrolltop{
  position:absolute;right:16px;bottom:calc(78px + env(safe-area-inset-bottom,0px));
  width:42px;height:42px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  background:var(--surface-card);border:1px solid var(--border);
  box-shadow:var(--shadow-float);color:var(--ink);cursor:pointer;z-index:25;
  opacity:0;visibility:hidden;transform:translateY(8px);
  transition:opacity .18s ease,transform .18s ease,visibility .18s;
}
.kc-scrolltop.visible{opacity:1;visibility:visible;transform:translateY(0);}
.kc-scrolltop svg{width:19px;height:19px;stroke:currentColor;fill:none;stroke-width:2.2;}
@media (min-width:1024px){
  .kc-scrolltop{position:fixed;bottom:32px;right:32px;}
}
