:root {
  --accent: #eb5013;
  --accent-dark: #c9440f;
  --muted: #555;
  --card-bg: #fff;
  --shadow: 0 18px 45px rgba(10,10,10,0.06);
  --radius: 12px;
  --max-width: 1200px;
  --font-sans: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial;
}

body { font-family: var(--font-sans); background: #f5f7f8; color: #111827; }

/* container */
.sd-container { max-width: var(--max-width); margin: 28px auto 80px; padding: 0 18px; }
.page-title { text-align:center; font-size:28px; margin-bottom:20px; font-weight:700; }
.page-title .accent { color: var(--accent); }

/* cards grid */
.cars-grid { display:flex; flex-wrap:wrap; gap:20px; justify-content:center; }
.car-card {
  width: 300px;
  background: var(--card-bg);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
  display:flex; flex-direction:column;
  cursor: pointer;
}
.car-card:focus { outline: 3px solid rgba(235,80,19,0.12); }
.car-card:hover { transform: translateY(-8px); box-shadow: 0 26px 60px rgba(12,12,12,0.08); }
.card-thumb-wrap { position:relative; height:180px; overflow:hidden; }
.car-thumb { width:100%; height:100%; object-fit:cover; display:block; }
.card-body { padding:14px; display:flex; flex-direction:column; gap:8px; flex:1; }
.car-title { margin:0; font-size:18px; font-weight:700; color:#111827; }
.car-short { color:var(--muted); font-size:14px; margin:0 0 6px; min-height:40px; }
.badges { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:6px; }
.badge { background:#f3f3f3; color:#333; padding:6px 8px; border-radius:8px; font-size:12px; }

/* footer row in card */
.card-footer { display:flex; align-items:center; justify-content:space-between; margin-top:auto; gap:10px; }
.price { color:var(--accent); font-weight:800; font-size:16px; }
.btn { border: none; cursor: pointer; border-radius:26px; padding:10px 16px; font-weight:700; }
.btn.primary { background:var(--accent); color:#fff; box-shadow: 0 8px 20px rgba(235,80,19,0.14); }
.btn.primary:hover { background:var(--accent-dark); }

/* modal base */
.modal { position: fixed; inset:0; display:flex; align-items:center; justify-content:center; z-index:1200; background: rgba(0,0,0,0.45); }
.modal.hidden { display:none; }
.modal.small .modal-inner { max-width:520px; }

/* modal inner content */
.modal-inner {
  background: #fff; border-radius:12px; width:92%; max-width:1100px; max-height:90vh; overflow:auto; display:flex; gap:18px; padding:18px; box-shadow: 0 30px 90px rgba(0,0,0,0.18);
}
.modal-inner.small { padding:16px; position:relative; }
.modal-close { position:absolute; right:18px; top:14px; background:transparent; border:none; font-size:26px; cursor:pointer; color:#374151; }

/* left gallery and right info */
.modal-left { flex:1; }
.modal-right { width:420px; display:flex; flex-direction:column; gap:10px; }

/* gallery */
.gallery { display:flex; gap:10px; overflow-x:auto; padding-bottom:8px; }
.gallery img { height:260px; border-radius:10px; object-fit:cover; display:block; }

/* specs */
.specs { background:#fbfbfb; padding:10px; border-radius:8px; font-size:14px; color:#333; }

/* form */
#sd-form label { font-weight:700; margin-top:6px; display:block; color:#374151; }
#sd-form input[type="text"], #sd-form input[type="email"], #sd-form input[type="tel"], #sd-form input[type="datetime-local"], #sd-form input[type="number"], #sd-form input[type="date"] {
  width:100%; padding:10px 12px; border-radius:8px; border:1px solid #e6e6e6; margin-top:6px; box-sizing:border-box;
}
.estimate { margin-top:10px; font-weight:800; color:var(--accent); font-size:16px; }

/* terms modal */
.terms-text { max-height:240px; overflow:auto; border:1px solid #f0f0f0; padding:10px; background:#fff; border-radius:8px; margin:8px 0; }

@media (max-width: 980px) {
  .modal-inner { flex-direction:column; padding:12px; }
  .modal-left, .modal-right { width:100%; }
  .gallery img { height:180px; }
  .car-card { width:90%; }
}
