/* ==========================================================
   CheckedMotors — homepage (index.php only)
   Loaded AFTER style.css. Everything is scoped under body.home
   so submit.php / listing.php / admin are not affected.
   ========================================================== */

body.home {
  --cm-bg: #07080a;
  --cm-surface: #111317;
  --cm-surface-2: #171a20;
  --cm-line: rgba(255, 255, 255, 0.08);
  --cm-line-strong: rgba(255, 255, 255, 0.16);
  --cm-text: #f4f5f7;
  --cm-dim: #9aa0aa;
  --cm-red: #e2231a;
  --cm-red-soft: rgba(226, 35, 26, 0.14);
  --cm-green: #3ddc84;
  --cm-green-soft: rgba(61, 220, 132, 0.12);
  --cm-radius: 16px;
  --cm-max: 1200px;

  margin: 0;
  background: var(--cm-bg);
  color: var(--cm-text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.home *, body.home *::before, body.home *::after { box-sizing: border-box; }
body.home a { color: inherit; text-decoration: none; }

.cm-wrap { max-width: var(--cm-max); margin: 0 auto; padding: 0 20px; }

/* ---------- Top bar ---------- */
.cm-topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 8, 10, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--cm-line);
}
.cm-topbar .cm-wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.cm-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: Oswald, sans-serif; font-weight: 700; font-size: 1.3rem;
  letter-spacing: 0.02em; text-transform: uppercase;
}
.cm-logo-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--cm-red); display: grid; place-items: center;
  box-shadow: 0 6px 20px rgba(226, 35, 26, 0.45);
}
.cm-logo-mark svg { width: 17px; height: 17px; }
.cm-logo span.r { color: var(--cm-red); }
.cm-links { display: flex; gap: 22px; margin-left: auto; font-size: 0.92rem; color: var(--cm-dim); }
.cm-links a:hover { color: var(--cm-text); }
.cm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 0.92rem Inter, sans-serif; white-space: nowrap;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.cm-btn-red { background: var(--cm-red); color: #fff; box-shadow: 0 8px 24px rgba(226, 35, 26, 0.35); }
.cm-btn-red:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(226, 35, 26, 0.5); }
.cm-btn-ghost { background: rgba(255,255,255,0.06); color: var(--cm-text); border: 1px solid var(--cm-line-strong); }
.cm-btn-ghost:hover { background: rgba(255,255,255,0.1); }

/* ---------- Hero ---------- */
.cm-hero { position: relative; padding: 84px 0 56px; isolation: isolate; }
.cm-hero::before {
  content: ""; position: absolute; inset: -120px 0 0 0; z-index: -1;
  background:
    radial-gradient(600px 320px at 18% 20%, rgba(226, 35, 26, 0.22), transparent 70%),
    radial-gradient(500px 300px at 85% 0%, rgba(255, 255, 255, 0.06), transparent 70%);
}
.cm-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.35;
  background-image: linear-gradient(var(--cm-line) 1px, transparent 1px), linear-gradient(90deg, var(--cm-line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 70%);
}
.cm-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--cm-green-soft); color: var(--cm-green);
  font-size: 0.8rem; font-weight: 600; border: 1px solid rgba(61, 220, 132, 0.25);
}
.cm-eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cm-green); box-shadow: 0 0 0 4px rgba(61,220,132,.18); }
.cm-hero h1 {
  font-family: Oswald, sans-serif; font-weight: 700; text-transform: uppercase;
  font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 1.02; letter-spacing: 0.01em;
  margin: 18px 0 16px; max-width: 14ch;
}
.cm-hero h1 em { font-style: normal; color: var(--cm-red); }
.cm-hero p.lead { color: var(--cm-dim); font-size: 1.1rem; line-height: 1.6; max-width: 54ch; margin: 0 0 32px; }

/* Search */
.cm-search {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr auto; gap: 8px;
  padding: 8px; max-width: 860px;
  background: rgba(17, 19, 23, 0.8); border: 1px solid var(--cm-line-strong);
  border-radius: 20px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
}
.cm-field { position: relative; }
.cm-field label {
  position: absolute; top: 9px; left: 16px;
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--cm-dim);
}
.cm-field input, .cm-field select {
  width: 100%; height: 58px; padding: 22px 16px 6px;
  background: var(--cm-surface-2); color: var(--cm-text);
  border: 1px solid transparent; border-radius: 14px;
  font: 500 0.98rem Inter, sans-serif; outline: none; appearance: none; -webkit-appearance: none;
}
.cm-field select { background-image: linear-gradient(45deg, transparent 50%, var(--cm-dim) 50%), linear-gradient(135deg, var(--cm-dim) 50%, transparent 50%);
  background-position: calc(100% - 20px) 28px, calc(100% - 15px) 28px; background-size: 5px 5px; background-repeat: no-repeat; }
.cm-field input:focus, .cm-field select:focus { border-color: var(--cm-red); }
.cm-search .cm-btn { height: 58px; border-radius: 14px; padding: 0 26px; }

.cm-trust { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 26px; color: var(--cm-dim); font-size: 0.9rem; }
.cm-trust span { display: inline-flex; align-items: center; gap: 8px; }
.cm-trust svg { width: 18px; height: 18px; color: var(--cm-green); flex: none; }

/* ---------- Listings ---------- */
.cm-section { padding: 36px 0 72px; }
.cm-section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.cm-section-head h2 { font-family: Oswald, sans-serif; text-transform: uppercase; font-size: 1.7rem; margin: 0; letter-spacing: 0.02em; }
.cm-section-head .count { color: var(--cm-dim); font-size: 0.92rem; margin-top: 4px; }
.cm-sort select {
  height: 40px; padding: 0 36px 0 14px; border-radius: 999px;
  background: var(--cm-surface) ; color: var(--cm-text); border: 1px solid var(--cm-line-strong);
  font: 500 0.88rem Inter, sans-serif; appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--cm-dim) 50%), linear-gradient(135deg, var(--cm-dim) 50%, transparent 50%);
  background-position: calc(100% - 18px) 18px, calc(100% - 13px) 18px; background-size: 5px 5px; background-repeat: no-repeat;
}

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

.cm-card {
  display: flex; flex-direction: column;
  background: var(--cm-surface); border: 1px solid var(--cm-line);
  border-radius: var(--cm-radius); overflow: hidden;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.cm-card:hover { transform: translateY(-4px); border-color: var(--cm-line-strong); box-shadow: 0 24px 50px rgba(0,0,0,0.5); }
.cm-card-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0b0c0e; }
.cm-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.cm-card:hover .cm-card-media img { transform: scale(1.05); }
.cm-card-media::after { content: ""; position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(transparent, rgba(0,0,0,0.55)); pointer-events: none; }
.cm-pill-check {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px 6px 8px; border-radius: 999px;
  background: rgba(7, 8, 10, 0.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: var(--cm-green); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.02em;
  border: 1px solid rgba(61, 220, 132, 0.35);
}
.cm-pill-check svg { width: 14px; height: 14px; }
.cm-photo-count {
  position: absolute; bottom: 12px; right: 12px; z-index: 2;
  padding: 4px 9px; border-radius: 8px; font-size: 0.74rem; font-weight: 600;
  background: rgba(7, 8, 10, 0.7); color: #fff;
}
.cm-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.cm-card-title { font-size: 1.05rem; font-weight: 700; line-height: 1.3; margin: 0; }
.cm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cm-chip {
  padding: 5px 10px; border-radius: 8px; font-size: 0.8rem; font-weight: 500;
  background: var(--cm-surface-2); color: #c9ced6; border: 1px solid var(--cm-line);
}
.cm-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--cm-line); }
.cm-price { font-family: Oswald, sans-serif; font-size: 1.6rem; font-weight: 600; letter-spacing: 0.01em; }
.cm-view { font-size: 0.86rem; font-weight: 600; color: var(--cm-dim); display: inline-flex; align-items: center; gap: 6px; transition: color .2s, gap .2s; }
.cm-card:hover .cm-view { color: var(--cm-red); gap: 10px; }

.cm-empty {
  display: none; text-align: center; padding: 56px 20px; color: var(--cm-dim);
  border: 1px dashed var(--cm-line-strong); border-radius: var(--cm-radius);
}
.cm-empty.show { display: block; }

/* ---------- How it works ---------- */
.cm-how { padding: 64px 0; border-top: 1px solid var(--cm-line); background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent); }
.cm-how h2 { font-family: Oswald, sans-serif; text-transform: uppercase; font-size: 1.7rem; margin: 0 0 8px; }
.cm-how p.sub { color: var(--cm-dim); margin: 0 0 30px; }
.cm-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cm-step { padding: 24px; border-radius: var(--cm-radius); background: var(--cm-surface); border: 1px solid var(--cm-line); }
.cm-step .n {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: var(--cm-red-soft); color: var(--cm-red); font-family: Oswald, sans-serif; font-weight: 700; margin-bottom: 16px;
}
.cm-step h3 { margin: 0 0 6px; font-size: 1.02rem; }
.cm-step p { margin: 0; color: var(--cm-dim); font-size: 0.92rem; line-height: 1.55; }
.cm-how .cm-btn { margin-top: 28px; }

/* ---------- Footer ---------- */
.cm-footer { border-top: 1px solid var(--cm-line); padding: 28px 0; color: var(--cm-dim); font-size: 0.86rem; }
.cm-footer .cm-wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .cm-reveal { opacity: 0; transform: translateY(14px); animation: cmUp .6s cubic-bezier(.2,.7,.2,1) forwards; }
  .cm-reveal.d1 { animation-delay: .06s; } .cm-reveal.d2 { animation-delay: .12s; }
  .cm-reveal.d3 { animation-delay: .18s; } .cm-reveal.d4 { animation-delay: .24s; }
  @keyframes cmUp { to { opacity: 1; transform: none; } }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .cm-links { display: none; }
  .cm-topbar .cm-btn { margin-left: auto; }
  .cm-search { grid-template-columns: 1fr 1fr; }
  .cm-search .cm-field:first-child { grid-column: 1 / -1; }
  .cm-search .cm-btn { grid-column: 1 / -1; }
  .cm-steps { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .cm-wrap { padding: 0 16px; }
  .cm-hero { padding: 48px 0 36px; }
  .cm-topbar .cm-btn { height: 38px; padding: 0 14px; font-size: 0.85rem; }
  .cm-logo { font-size: 1.1rem; }
  .cm-grid { grid-template-columns: 1fr; }
}

/* ---------- Hero: car front + UK plate lookup ---------- */
.cm-hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.cm-herocar { position: relative; }
.cm-herocar::before { content: ""; position: absolute; left: 10%; right: 10%; bottom: 0; height: 60%; z-index: -1;
  background: radial-gradient(ellipse at 50% 100%, rgba(226,35,26,.35), transparent 70%); filter: blur(10px); }
.cm-herocar-head { text-align: center; margin-bottom: 8px; }
.cm-herocar-kicker { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #f7c600; }
.cm-herocar-head h3 { font-family: Oswald, sans-serif; text-transform: uppercase; font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 4px 0 4px; }
.cm-herocar-head h3 em { font-style: normal; color: var(--cm-red); }
.cm-herocar-head p { margin: 0; color: var(--cm-dim); font-size: .92rem; }
.cm-car { position: relative; width: min(760px, 100%); margin: 0 auto; container-type: inline-size; }
.cm-car svg.body { display: block; width: 100%; height: auto; filter: drop-shadow(0 30px 40px rgba(0,0,0,.6)); }
.cm-car .beam { position: absolute; top: 44%; width: 34%; height: 40%; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(255,255,255,.18), transparent 65%); filter: blur(6px); opacity: .9; animation: cmBeam 4s ease-in-out infinite; }
.cm-car .beam.l { left: 4%; } .cm-car .beam.r { right: 4%; }
@keyframes cmBeam { 50% { opacity: .45; } }

/* UK plate, sitting on the car's front bumper */
.cm-plate-form {
  position: absolute; left: 50%; top: 72.5%; transform: translate(-50%, -50%);
  width: 64cqw; display: flex; align-items: center; gap: 1.4cqw;
}
.cm-plate-form::before { content: ""; flex: none; width: 9cqw; min-width: 40px; }
.cm-ukplate {
  flex: 1; display: flex; align-items: stretch; height: 7.6cqw; min-height: 34px;
  background: #f7c600; border-radius: 7px; overflow: hidden;
  border: 2px solid #111; box-shadow: 0 0 0 2px #f7c600, 0 10px 24px rgba(0,0,0,.5), inset 0 2px 0 rgba(255,255,255,.35);
}
.cm-ukplate .band {
  width: 4.2cqw; min-width: 18px; background: #00309a; color: #fff; flex: none;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding-bottom: .6cqw; font: 700 max(8px, 1.3cqw) Inter, sans-serif; letter-spacing: .02em;
}
.cm-ukplate .band svg { width: 70%; margin-bottom: auto; margin-top: .8cqw; }
.cm-ukplate input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: #111;
  text-align: center; text-transform: uppercase;
  font: 700 max(18px, 5.4cqw) Oswald, "Arial Narrow", sans-serif; letter-spacing: .08em;
  padding: 0 8px;
}
.cm-ukplate input::placeholder { color: rgba(17,17,17,.38); }
.cm-lens {
  flex: none; width: 9cqw; height: 9cqw; min-width: 40px; min-height: 40px; border-radius: 50%;
  border: 0; cursor: pointer; background: var(--cm-red); color: #fff;
  display: grid; place-items: center; font-size: max(17px, 3.6cqw);
  box-shadow: 0 10px 28px rgba(226,35,26,.55); transition: transform .15s ease, box-shadow .2s ease;
}
.cm-lens:hover { transform: scale(1.07); box-shadow: 0 14px 36px rgba(226,35,26,.7); }
.cm-ukplate:focus-within { box-shadow: 0 0 0 2px #f7c600, 0 0 0 6px rgba(247,198,0,.35), 0 10px 24px rgba(0,0,0,.5); }

@media (max-width: 960px) { .cm-hero-grid { grid-template-columns: 1fr; } .cm-herocar { max-width: 620px; margin: 8px auto 0; width: 100%; } }

/* Small screens: bigger plate so a full reg (e.g. "KP64 BJO") fits */
@container (max-width: 460px) {
  .cm-plate-form { width: 84cqw; gap: 2cqw; }
  .cm-plate-form::before { width: 11cqw; min-width: 36px; }
  .cm-lens { width: 11cqw; height: 11cqw; min-width: 36px; min-height: 36px; }
  .cm-ukplate { height: 10cqw; }
  .cm-ukplate input { font-size: max(15px, 6.4cqw); letter-spacing: .04em; padding: 0 4px; }
}

/* ---------- Inline plate lookup result (homepage stays put) ---------- */
.cm-lookup { display: none; max-width: 560px; margin: 14px auto 0; }
.cm-lookup.show { display: block; animation: cmFade .35s ease both; }
@keyframes cmFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.cm-lookup-msg { text-align: center; color: var(--cm-dim); padding: 12px 14px; border: 1px solid var(--cm-line); border-radius: 14px; background: var(--cm-surface); font-size: .92rem; }
.cm-lookup-msg.err { color: #ff8a80; border-color: rgba(226, 35, 26, .4); }
.cm-lookup-card { background: linear-gradient(160deg, #16191f, #0e1014); border: 1px solid var(--cm-line-strong); border-radius: 16px; padding: 16px 18px; box-shadow: 0 20px 50px rgba(0,0,0,.5); }
.cm-lookup-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.cm-minplate { background: #f7c600; color: #111; font: 700 1rem Oswald, "Arial Narrow", sans-serif; letter-spacing: .06em; padding: 3px 10px; border-radius: 5px; border: 2px solid #111; }
.cm-lookup-top .ok { color: var(--cm-green); font-size: .82rem; font-weight: 700; }
.cm-lookup-card h4 { margin: 4px 0 10px; font-size: 1.2rem; }
.cm-lookup-actions { margin-top: 14px; }
.cm-lookup-actions .cm-btn { width: 100%; }
.cm-lookup-card .note { margin: 10px 0 0; color: var(--cm-dim); font-size: .8rem; text-align: center; }
.cm-lens.is-loading { font-size: 0; }
.cm-lens.is-loading::after { content: ""; width: 42%; height: 42%; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: cmSpin .7s linear infinite; }
@keyframes cmSpin { to { transform: rotate(360deg); } }

/* ---------- Sold listings (shown for a few days with a banner) ---------- */
.cm-sold-banner {
  position: absolute; z-index: 3; top: 18px; right: -44px; transform: rotate(35deg);
  width: 170px; text-align: center; padding: 6px 0;
  background: var(--cm-red); color: #fff; font: 700 .95rem Oswald, sans-serif; letter-spacing: .14em;
  box-shadow: 0 6px 18px rgba(0,0,0,.45);
}
.cm-card.is-sold .cm-card-media img { filter: grayscale(.7) brightness(.75); }
.cm-card.is-sold .cm-price { text-decoration: line-through; color: var(--cm-dim); }

/* =================================================================
   Inner pages (listing, sell, checkout, admin) - body.home.cm-inner
   Layered over the older style.css so every page matches the homepage.
   ================================================================= */
body.cm-inner footer.cm-footer { text-align: left; margin-top: 0; background: transparent; }
body.cm-inner .cm-topbar .cm-tag { margin-left: auto; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #f7c600; }

.cm-pagehead { position: relative; padding: 48px 0 10px; isolation: isolate; border: 0; background: none; text-align: left; }
.cm-pagehead::before { content: ""; position: absolute; inset: -64px 0 0 0; z-index: -1;
  background: radial-gradient(520px 220px at 12% 0%, rgba(226, 35, 26, 0.2), transparent 70%); }
.cm-pagehead h1 { font-family: Oswald, sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: .01em;
  font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.05; margin: 0 0 8px; color: var(--cm-text); }
.cm-pagehead h1 span { color: var(--cm-red); }
.cm-pagehead .subtitle { color: var(--cm-dim); font-size: 1rem; margin: 0; max-width: 60ch; }

body.cm-inner .site-nav { max-width: 1100px; margin: 0 auto; padding: 14px 20px 0; background: none; border: 0; text-align: left; }
body.cm-inner .site-nav a { color: var(--cm-dim); font-size: .9rem; font-weight: 600; text-decoration: none; }
body.cm-inner .site-nav a:hover { color: var(--cm-text); }

body.cm-inner main { max-width: 1100px; margin: 0 auto; padding: 24px 20px 72px; }
body.cm-inner main.narrow, body.cm-inner main.login-main { max-width: 680px; }
body.cm-inner h2, body.cm-inner h3 { color: var(--cm-text); }
body.cm-inner main a:not(.cm-btn) { color: #ff6b62; }

body.cm-inner .card, body.cm-inner .mod-row, body.cm-inner .login-form {
  background: var(--cm-surface); border: 1px solid var(--cm-line); border-radius: 16px;
  padding: 22px; box-shadow: none; color: var(--cm-text);
}
body.cm-inner .card + .card { margin-top: 18px; }
body.cm-inner .card h2, body.cm-inner .card h3 { font-family: Inter, sans-serif; font-weight: 700; letter-spacing: 0; }
body.cm-inner .card h2 { font-size: 1.35rem; }
body.cm-inner .card h3 { font-size: 1.05rem; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--cm-line); }
body.cm-inner .card h3:first-child, body.cm-inner form > h3:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
body.cm-inner .text-dim, body.cm-inner .file-hint { color: var(--cm-dim); }
body.cm-inner .error-card { border-color: rgba(226, 35, 26, .45); background: linear-gradient(160deg, rgba(226,35,26,.08), var(--cm-surface)); }
body.cm-inner .success-card { border-color: rgba(61, 220, 132, .4); background: linear-gradient(160deg, rgba(61,220,132,.07), var(--cm-surface)); }

/* Photos on the listing page */
body.cm-inner .listing-grid { gap: 12px; margin-bottom: 18px; }
body.cm-inner .listing-grid img.photo { width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; border-radius: 12px !important; border: 1px solid var(--cm-line); }

/* Forms */
body.cm-inner form .field { margin-bottom: 16px; }
body.cm-inner form label { display: block; font-size: .74rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--cm-dim); margin-bottom: 6px; }
body.cm-inner form input[type="text"], body.cm-inner form input[type="number"], body.cm-inner form input[type="email"],
body.cm-inner form input[type="tel"], body.cm-inner form input[type="password"], body.cm-inner form input[type="file"],
body.cm-inner form textarea, body.cm-inner form select {
  width: 100%; box-sizing: border-box; min-height: 50px; padding: 12px 14px;
  background: var(--cm-surface-2); color: var(--cm-text); border: 1px solid var(--cm-line-strong); border-radius: 12px;
  font: 500 1rem Inter, sans-serif; outline: none;
}
body.cm-inner form textarea { min-height: 130px; line-height: 1.5; }
body.cm-inner form input:focus, body.cm-inner form textarea:focus, body.cm-inner form select:focus { border-color: var(--cm-red); box-shadow: 0 0 0 3px rgba(226,35,26,.18); }
body.cm-inner form input#vrm { background: #f7c600; color: #111; border: 2px solid #111; font: 700 1.5rem Oswald, "Arial Narrow", sans-serif; letter-spacing: .08em; text-align: center; max-width: 320px; }
body.cm-inner form button, body.cm-inner .btn, body.cm-inner .login-form button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px;
  border: 0; border-radius: 999px; cursor: pointer; background: var(--cm-red); color: #fff;
  font: 700 .95rem Inter, sans-serif; text-decoration: none; box-shadow: 0 8px 24px rgba(226,35,26,.3);
  transition: transform .15s ease, box-shadow .2s ease;
}
body.cm-inner form button:hover, body.cm-inner .btn:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(226,35,26,.45); }
body.cm-inner #vrm-lookup-btn { margin-top: 10px; background: var(--cm-surface-2); border: 1px solid var(--cm-line-strong); box-shadow: none; }
body.cm-inner form button[type="submit"]:not(.reject):not(.approve) { width: 100%; margin-top: 8px; }
body.cm-inner .mod-actions .reject { background: var(--cm-surface-2); border: 1px solid rgba(226,35,26,.5); color: #ff8a80; box-shadow: none; }
body.cm-inner .mod-actions .approve { background: #1f9d5a; box-shadow: 0 8px 24px rgba(31,157,90,.3); }

/* Tables (MOT history etc.) */
body.cm-inner table { width: 100%; border-collapse: collapse; font-size: .92rem; }
body.cm-inner th { text-align: left; color: var(--cm-dim); font-weight: 600; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; padding: 10px 8px; border-bottom: 1px solid var(--cm-line-strong); }
body.cm-inner td { padding: 10px 8px; border-bottom: 1px solid var(--cm-line); vertical-align: top; }
body.cm-inner .table-scroll, body.cm-inner .card { overflow-x: auto; }

/* Login page */
body.cm-inner .login-main { min-height: calc(100vh - 220px); display: grid; place-items: center; }
body.cm-inner .login-form { width: 100%; max-width: 420px; padding: 30px; }
body.cm-inner .login-form h1 { font-family: Oswald, sans-serif; text-transform: uppercase; }
body.cm-inner .login-form h1 span { color: var(--cm-red); }

@media (max-width: 520px) {
  .cm-pagehead { padding-top: 32px; }
  body.cm-inner main { padding: 18px 16px 56px; }
  body.cm-inner .card, body.cm-inner .mod-row { padding: 18px 16px; }
}

/* Inner pages: align with the header width + photo gallery on the listing page */
body.cm-inner main, body.cm-inner .site-nav { max-width: var(--cm-max); }
body.cm-inner main > .listing-grid { display: grid; grid-template-columns: repeat(4, 1fr) !important; }
body.cm-inner main > .listing-grid img.photo:first-child { grid-column: span 2; grid-row: span 2; }
@media (max-width: 720px) { body.cm-inner main > .listing-grid { grid-template-columns: repeat(2, 1fr) !important; } }
.cm-pagehead h1 span.cm-price-tag { display: inline-block; margin-left: .3em; }
