/* Car search: header live suggestions, homepage quick search, advanced search page. Theme colour #8B3572. */
:root {
	--cs-theme: #8B3572;
	--cs-theme-dark: #6e2a5a;
	--cs-theme-soft: #f6eaf3;
	--cs-ink: #15181f;
	--cs-grey: #666;
	--cs-line: #e3e3e3;
}

/* ---------- header live suggestions ---------- */
#suggestions:not(.ls-open) { display: none; }
#suggestions.ls-open { border: 1px solid var(--cs-line); border-radius: 6px; padding: 4px 0; position: absolute; top: calc(100% - 28px); left: 12px; right: 12px; width: auto; z-index: 1000; }
#suggestions li { padding: 0; margin: 0; display: block; }
#suggestions li:hover { background: none; }
#suggestions a.ls-item { display: flex; align-items: center; gap: 10px; padding: 6px 12px; color: var(--cs-ink); text-decoration: none; }
#suggestions a.ls-item:hover, #suggestions a.ls-item.ls-active { background: var(--cs-theme-soft); }
#suggestions a.ls-term i { color: var(--cs-theme); width: 16px; text-align: center; }
#suggestions .ls-term-label { flex: 1; font-weight: 600; }
#suggestions .ls-term-type { color: var(--cs-grey); font-size: 12px; }
#suggestions img { width: 66px; height: 50px; object-fit: cover; border-radius: 4px; margin: 0; }
#suggestions .ls-car p { color: var(--cs-theme); margin: 0; }
#suggestions .ls-grey { color: var(--cs-grey); }
#suggestions .ls-note { padding: 6px 12px; color: var(--cs-grey); font-size: 13px; }
#suggestions .ls-note strong { color: var(--cs-theme); display: inline; }
#suggestions .ls-all { text-align: center; padding: 8px; }
#suggestions .ls-all a.ls-item { display: inline-block; color: #fff; padding: 6px 18px; }
#suggestions .ls-all a.ls-item.ls-active { outline: 2px solid var(--cs-theme-dark); }

/* ---------- shared form controls ---------- */
.cs-field label, .cs-label { display: block; font-size: 13px; font-weight: 600; color: var(--cs-ink); margin-bottom: 4px; }
.cs-control { width: 100%; height: 42px; border: 1px solid #ddd; border-radius: 4px; padding: 0 10px; background: #fff; color: var(--cs-ink); font-size: 14px; }
select.cs-control { appearance: auto; -webkit-appearance: auto; }
.cs-control:focus { outline: none; border-color: var(--cs-theme); box-shadow: 0 0 0 3px rgba(139, 53, 114, .15); }
.cs-control:disabled { background: #f5f5f5; color: #999; }
.cs-pair { display: flex; gap: 6px; align-items: center; }
.cs-pair .cs-control { min-width: 0; }
.cs-btn { display: inline-block; background: var(--cs-theme); color: #fff; border: 0; border-radius: 4px; height: 42px; padding: 0 22px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; cursor: pointer; }
.cs-btn:hover, .cs-btn:focus { background: var(--cs-theme-dark); color: #fff; }
.cs-btn-ghost { background: transparent; color: var(--cs-theme); border: 1px solid var(--cs-theme); }
.cs-btn-ghost:hover { background: var(--cs-theme-soft); color: var(--cs-theme); }
.cs-link { color: var(--cs-theme); font-weight: 600; }
.cs-link:hover { color: var(--cs-theme-dark); text-decoration: underline; }

/* ---------- homepage quick search ---------- */
.cs-quick { background: #fff; border-top: 3px solid var(--cs-theme); box-shadow: 0 6px 24px rgba(0, 0, 0, .08); border-radius: 6px; padding: 24px; margin-top: 10px; }
.cs-quick h4 { margin: 0 0 16px; color: var(--cs-ink); }
.cs-quick h4 span { color: var(--cs-theme); }
.cs-quick .cs-field { margin-bottom: 14px; }
.cs-quick-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }

/* ---------- advanced search page ---------- */
.cs-page { padding: 30px 0 60px; }
.cs-page h1 { font-size: 26px; margin: 0 0 4px; text-transform: none; }
.cs-page .cs-sub { color: var(--cs-grey); margin-bottom: 20px; }
.cs-sidebar { background: #fff; border: 1px solid var(--cs-line); border-radius: 6px; }
.cs-sidebar-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--cs-line); }
.cs-sidebar-head h2 { font-size: 17px; margin: 0; }
.cs-group { border-bottom: 1px solid var(--cs-line); }
.cs-group > summary { list-style: none; cursor: pointer; padding: 12px 16px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; color: var(--cs-ink); }
.cs-group > summary::-webkit-details-marker { display: none; }
.cs-group > summary::after { content: "+"; color: var(--cs-theme); font-size: 18px; line-height: 1; }
.cs-group[open] > summary::after { content: "\2212"; }
.cs-group .cs-count-badge { background: var(--cs-theme); color: #fff; border-radius: 10px; font-size: 11px; padding: 1px 7px; margin-left: 6px; }
.cs-group-body { padding: 0 16px 14px; }
.cs-checklist { max-height: 220px; overflow-y: auto; margin: 0; padding: 0; list-style: none; }
.cs-checklist li { margin: 0; list-style: none !important; padding: 0; }
.cs-checklist li::marker { content: none; }
.cs-check { display: flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; font-size: 14px; color: var(--cs-ink); margin: 0; }
.cs-check input { accent-color: var(--cs-theme); width: 16px; height: 16px; margin: 0; }
.cs-check .cs-n { margin-left: auto; color: #999; font-size: 12px; }
.cs-swatch { width: 14px; height: 14px; border-radius: 50%; border: 1px solid #bbb; display: inline-block; }
.cs-filter-input { height: 34px; margin-bottom: 8px; font-size: 13px; }
.cs-sidebar-foot { position: sticky; bottom: 0; background: #fff; padding: 12px 16px; display: flex; gap: 8px; border-top: 1px solid var(--cs-line); border-radius: 0 0 6px 6px; z-index: 2; }
.cs-sidebar-foot .cs-btn { flex: 1; }

.cs-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; background: #fff; border: 1px solid var(--cs-line); border-radius: 6px; padding: 12px 16px; margin-bottom: 14px; }
.cs-toolbar .cs-total { font-size: 16px; color: var(--cs-ink); }
.cs-toolbar .cs-total strong { color: var(--cs-theme); }
.cs-toolbar .cs-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cs-toolbar .cs-controls label { margin: 0; font-size: 13px; color: var(--cs-grey); }
.cs-toolbar .cs-controls { flex-wrap: nowrap; }
.cs-toolbar .cs-controls select.cs-control { width: auto !important; min-width: 70px; max-width: 220px; flex: 0 0 auto; height: 36px; margin: 0; }
.cs-toolbar .cs-controls label { white-space: nowrap; }
@media (max-width: 575px) { .cs-toolbar .cs-controls { flex-wrap: wrap; } }

.cs-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; align-items: center; }
.cs-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--cs-theme-soft); color: var(--cs-theme); border: 1px solid rgba(139, 53, 114, .3); border-radius: 16px; padding: 4px 6px 4px 12px; font-size: 13px; font-weight: 600; }
.cs-chip:hover { background: var(--cs-theme); color: #fff; }
.cs-chip .cs-x { display: inline-flex; width: 18px; height: 18px; border-radius: 50%; align-items: center; justify-content: center; background: rgba(139, 53, 114, .15); font-size: 14px; line-height: 1; }
.cs-chip:hover .cs-x { background: rgba(255, 255, 255, .25); }
.cs-note { background: #fff8e6; border: 1px solid #f3dca2; border-radius: 6px; padding: 10px 14px; margin-bottom: 14px; }

.cs-card { margin-bottom: 30px; }
.cs-card .car-image { position: relative; }
.cs-card .car-image img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.cs-card .cs-card-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px !important; }
.cs-card .cs-card-meta { color: var(--cs-grey); font-size: 12px; margin-bottom: 8px; }
.cs-sold { position: absolute; top: 10px; left: 10px; z-index: 3; background: #c0392b; color: #fff; font-weight: 700; font-size: 12px; padding: 2px 8px; border-radius: 3px; }

.cs-empty { text-align: center; background: #fff; border: 1px dashed #ccc; border-radius: 6px; padding: 40px 20px; }
.cs-empty h3 { font-size: 20px; }

.cs-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.cs-pagination a, .cs-pagination span { display: inline-block; min-width: 38px; height: 38px; line-height: 36px; text-align: center; border: 1px solid var(--cs-line); border-radius: 4px; padding: 0 10px; color: var(--cs-ink); background: #fff; }
.cs-pagination a:hover { border-color: var(--cs-theme); color: var(--cs-theme); }
.cs-pagination .cs-current { background: var(--cs-theme); border-color: var(--cs-theme); color: #fff; font-weight: 700; }
.cs-pagination .cs-gap { border: 0; background: none; }
.cs-range-note { text-align: center; color: var(--cs-grey); font-size: 13px; margin-top: 10px; }

.cs-mobile-toggle { display: none; }
@media (max-width: 991px) {
	.cs-mobile-toggle { display: block; width: 100%; margin-bottom: 14px; }
	.cs-sidebar-wrap { display: none; margin-bottom: 20px; }
	.cs-sidebar-wrap.cs-show { display: block; }
}
