/* cars.gurudevmotors.com — public retail storefront.
   Self-contained, theme-aware, mobile-first. Not linked to the staff app.css. */

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --ink: #15181d;
  --ink-soft: #5b636e;
  --line: #e4e7ec;
  --accent: #c8102e;         /* Gurudev red */
  --accent-ink: #ffffff;
  --price: #0b7a3b;          /* the highlighted price */
  --price-bg: #e8f6ee;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.1);
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1013; --surface: #171a1f; --ink: #eef1f5;
    --ink-soft: #9aa3af; --line: #272b31; --accent: #ff4d64; --accent-ink: #1a0407;
    --price: #41d888; --price-bg: #10291c; color-scheme: dark;
    --shadow: 0 1px 3px rgba(0,0,0,.5);
  }
}
:root[data-theme="dark"] {
  --bg: #0e1013; --surface: #171a1f; --ink: #eef1f5; --ink-soft: #9aa3af;
  --line: #272b31; --accent: #ff4d64; --accent-ink: #1a0407;
  --price: #41d888; --price-bg: #10291c; color-scheme: dark;
  --shadow: 0 1px 3px rgba(0,0,0,.5);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* header */
.site-head { border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 10; }
.site-head .wrap { display: flex; align-items: center; gap: 12px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: -.02em; }
.brand .mark { background: var(--accent); color: var(--accent-ink); width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: 18px; }
.brand small { display: block; font-weight: 500; font-size: 11px; color: var(--ink-soft); letter-spacing: .02em; }
.site-head .spacer { flex: 1; }
.site-head .tagline { color: var(--ink-soft); font-size: 13px; }

/* index grid */
.hero { padding: 26px 0 8px; }
.hero h1 { margin: 0 0 6px; font-size: 26px; letter-spacing: -.02em; text-wrap: balance; }
.hero p { margin: 0; color: var(--ink-soft); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; padding: 18px 0 40px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: inherit;
  display: flex; flex-direction: column; transition: transform .12s ease, box-shadow .12s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(16,24,40,.12); }
.card .ph { aspect-ratio: 4/3; background: var(--line); position: relative; }
.card .ph img { width: 100%; height: 100%; object-fit: cover; }
.card .noph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--ink-soft); font-size: 13px; }
.card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card .title { font-weight: 700; letter-spacing: -.01em; }
.card .meta { color: var(--ink-soft); font-size: 13px; }
.price-chip {
  align-self: flex-start; margin-top: 4px; background: var(--price-bg); color: var(--price);
  font-weight: 800; padding: 6px 10px; border-radius: 9px; font-size: 17px;
}

/* detail */
.detail { padding: 20px 0 48px; }
.back { display: inline-block; color: var(--ink-soft); text-decoration: none; font-size: 14px; margin: 8px 0 14px; }
.detail h1 { margin: 0 0 4px; font-size: 26px; letter-spacing: -.02em; text-wrap: balance; }
.sub { color: var(--ink-soft); margin: 0 0 16px; }
.layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 780px) { .layout { grid-template-columns: 1fr; } }

.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--line); cursor: zoom-in; }
.gallery img:first-child { grid-column: 1 / -1; aspect-ratio: 16/10; }
.noph-box { aspect-ratio: 16/10; border: 1px dashed var(--line); border-radius: 10px; display: grid; place-items: center; color: var(--ink-soft); }
.plate-note { font-size: 12px; color: var(--ink-soft); margin: 8px 0 0; }

.aside { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 16px; }
.price-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.price-box .label { color: var(--ink-soft); font-size: 13px; }
.price-box .price { color: var(--price); font-weight: 800; font-size: 34px; letter-spacing: -.02em; line-height: 1.1; margin-top: 2px; }
.price-box .where { color: var(--ink-soft); font-size: 13px; margin-top: 6px; }

.specs { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 16px; box-shadow: var(--shadow); }
.specs dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.specs .row { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); grid-column: 1 / -1; }
.specs dt { color: var(--ink-soft); font-size: 14px; }
.specs dd { margin: 0; font-weight: 600; text-align: right; }
.notes { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.notes h2 { margin: 0 0 6px; font-size: 15px; }
.notes p { margin: 0; color: var(--ink-soft); white-space: pre-wrap; }

/* enquiry */
.enquire { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.enquire h2 { margin: 0 0 4px; font-size: 18px; }
.enquire p.lead { margin: 0 0 12px; color: var(--ink-soft); font-size: 14px; }
.enquire label { display: block; font-size: 13px; color: var(--ink-soft); margin: 10px 0 4px; }
.enquire input, .enquire textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--ink); font: inherit;
}
.enquire textarea { min-height: 72px; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn {
  display: inline-block; width: 100%; margin-top: 14px; padding: 13px 16px; border: 0; border-radius: 11px;
  background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 700; cursor: pointer; text-align: center;
}
.btn:hover { filter: brightness(1.05); }
.alert { background: #fdecec; color: #8a1220; border: 1px solid #f4c7c7; border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 10px; }
.ok-box { text-align: center; padding: 8px 0; }
.ok-box .tick { width: 54px; height: 54px; border-radius: 50%; background: var(--price-bg); color: var(--price); display: grid; place-items: center; font-size: 28px; margin: 0 auto 10px; }
.ok-box h2 { margin: 0 0 6px; }
.ok-box p { color: var(--ink-soft); margin: 0; }

footer.site-foot { border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 13px; }
footer.site-foot .wrap { padding: 20px 16px; display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; }

.empty { text-align: center; color: var(--ink-soft); padding: 60px 0; }

/* lightbox */
.lb { position: fixed; inset: 0; background: rgba(0,0,0,.9); display: none; place-items: center; z-index: 50; }
.lb.open { display: grid; }
.lb img { max-width: 94vw; max-height: 88vh; border-radius: 8px; }
.lb .x { position: absolute; top: 14px; right: 18px; color: #fff; font-size: 34px; background: none; border: 0; cursor: pointer; line-height: 1; }
.lb .nav { position: absolute; top: 50%; transform: translateY(-50%); color: #fff; font-size: 44px; background: none; border: 0; cursor: pointer; padding: 10px 16px; }
.lb .prev { left: 4px; } .lb .next { right: 4px; }
