/*
 * Cars 4 Mates — public storefront (Cars for Sale).
 * Self-contained; ported from the Claude Design handoff.
 */
:root {
	--navy:#1e2f87; --navy-d:#18266b; --cyan:#10a4dd; --grn:#16a34a;
	--ink:#1b2333; --mut:#5b6577; --mut2:#97a0b0;
	--line:#e6e9f1; --line2:#eef1f6; --canvas:#f4f6fb; --card:#fff;
}
/* Renders inside the active theme — scope to our own wrapper. */
.c4m-sf-page {
	color: var(--ink);
	font-family: 'Inter', -apple-system, system-ui, sans-serif;
	-webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
	margin: 0 auto;
}
.c4m-sf-page * { box-sizing: border-box; }
.c4m-sf-page a { box-shadow: none; }
.c4m-sf-wrap { max-width: 1180px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.c4m-sf-btn { display: inline-flex; align-items: center; justify-content: center; background: var(--navy); color: #fff; border: none; border-radius: 11px; padding: 12px 22px; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; }
.c4m-sf-btn:hover { background: var(--navy-d); color: #fff; }
.c4m-sf-btn--full { width: 100%; }

/* Header */
.c4m-sf-header { border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; background: #fff; }
.c4m-sf-header__row { display: flex; align-items: center; gap: 16px; padding-top: 13px; padding-bottom: 13px; }
.c4m-sf-logo { height: 32px; display: block; }
.c4m-sf-header__right { margin-left: auto; display: flex; gap: 14px; align-items: center; }
.c4m-sf-phone { font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: none; }
.c4m-sf-adminbtn { padding: 7px 13px; border: 1px solid var(--line); border-radius: 9px; font-size: 12.5px; font-weight: 600; color: var(--navy); text-decoration: none; }

/* Hero */
.c4m-sf-hero { position: relative; overflow: hidden; background: linear-gradient(120deg, #18266b, #1e2f87 55%, #10a4dd); }
.c4m-sf-hero__stripes { position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255,255,255,.04), rgba(255,255,255,.04) 22px, transparent 22px, transparent 44px); }
.c4m-sf-hero__inner { position: relative; padding-top: 104px; padding-bottom: 60px; color: #fff; }
.c4m-sf-hero__pill { display: inline-flex; align-items: center; gap: 7px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 600; margin-bottom: 16px; }
.c4m-sf-hero__pill span { width: 6px; height: 6px; border-radius: 50%; background: #5fe39a; }
.c4m-sf-hero h1 { margin: 0 0 10px; font-size: 42px; font-weight: 800; letter-spacing: -1px; line-height: 1.05; max-width: 680px; }
.c4m-sf-hero p { margin: 0; font-size: 16px; color: rgba(255,255,255,.85); max-width: 560px; line-height: 1.5; }

/* Filter bar — horizontal row; overrides themes that force select{width:100%}. */
.c4m-sf-filterbar { background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 1px 3px rgba(20,30,60,.04); }
.c4m-sf-filterrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.c4m-sf-page .c4m-sf-filterrow select {
	width: auto !important;
	min-width: 128px;
	max-width: 230px;
	margin: 0;
	height: auto;
	padding: 9px 34px 9px 12px;
	border: 1px solid var(--line);
	border-radius: 9px;
	font-size: 13px;
	line-height: 1.3;
	background-color: #fff;
	color: var(--ink);
	box-shadow: none;
	-webkit-appearance: none; -moz-appearance: none; appearance: none;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235b6577' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
	background-repeat: no-repeat;
	background-position: right 11px center;
}
.c4m-sf-page .c4m-sf-filterrow select:focus { border-color: var(--navy); outline: none; }
.c4m-sf-page .c4m-sf-sort { margin-left: auto; }
.c4m-sf-price { flex: none; display: flex; align-items: center; gap: 9px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; }
.c4m-sf-price span:first-child { font-size: 12px; color: var(--mut); white-space: nowrap; }
.c4m-sf-price span:last-child { font-size: 13px; font-weight: 700; white-space: nowrap; }
.c4m-sf-page .c4m-sf-price input[type=range] { width: 120px; max-width: 120px; min-width: 0; accent-color: var(--navy); margin: 0; padding: 0; }

@media (max-width: 720px) {
	.c4m-sf-page .c4m-sf-sort { margin-left: 0; }
	.c4m-sf-page .c4m-sf-filterrow select { flex: 1 1 140px; max-width: none; }
}

/* Grid */
.c4m-sf-results { padding-top: 24px; padding-bottom: 40px; }
.c4m-sf-count { font-size: 13px; color: var(--mut); margin-bottom: 16px; }
.c4m-sf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.c4m-sf-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; text-decoration: none; color: inherit; box-shadow: 0 1px 3px rgba(20,30,60,.05); transition: transform .12s, box-shadow .12s; }
.c4m-sf-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(20,30,60,.13); }
.c4m-sf-card__img { position: relative; aspect-ratio: 16/10; background: repeating-linear-gradient(135deg, #eef1f6, #eef1f6 13px, #e6e9f1 13px, #e6e9f1 26px); background-size: cover; background-position: center; }
.c4m-sf-card__img--ph { background: linear-gradient(135deg, #eef1fb, #e6e9f1); display: flex; align-items: center; justify-content: center; }
.c4m-sf-ph { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #aab2c6; }
.c4m-sf-ph svg { width: 46px; height: 46px; }
.c4m-sf-ph em { font-style: normal; font-size: 12px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; }
.c4m-sf-ph--lg svg { width: 72px; height: 72px; }
.c4m-sf-ph--lg em { font-size: 15px; }
.c4m-sf-ribbon { position: absolute; top: 12px; left: 12px; background: var(--cyan); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 11px; border-radius: 999px; box-shadow: 0 2px 6px rgba(16,164,221,.4); }
.c4m-sf-ribbon--lg { top: 14px; left: 14px; font-size: 12px; padding: 5px 13px; }
.c4m-sf-seal { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-14deg); background: rgba(198, 40, 40, .92); color: #fff; font-size: 22px; font-weight: 800; letter-spacing: 4px; text-transform: uppercase; padding: 8px 22px; border: 3px solid #fff; border-radius: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.25); pointer-events: none; }
.c4m-sf-card--sold .c4m-sf-card__img::after { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.35); }
.c4m-sf-card--sold .c4m-sf-card__body { opacity: .7; }
.c4m-sf-card__body { padding: 15px 16px 16px; }
.c4m-sf-card__title { font-size: 16px; font-weight: 700; letter-spacing: -.3px; }
.c4m-sf-card__sub { font-size: 12.5px; color: var(--mut); margin-bottom: 10px; }
.c4m-sf-card__price { font-size: 23px; font-weight: 800; letter-spacing: -.6px; margin-bottom: 12px; }
.c4m-sf-card__specs { display: flex; flex-wrap: wrap; gap: 6px; }
.c4m-sf-card__specs span { font-size: 11.5px; color: var(--mut); background: var(--canvas); border-radius: 7px; padding: 4px 9px; }
.c4m-sf-empty { text-align: center; padding: 70px 20px; border: 1px dashed var(--line); border-radius: 16px; background: #fff; }
.c4m-sf-empty__h { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.c4m-sf-empty p { margin: 0; color: var(--mut); font-size: 14px; }

/* Featured cars section (homepage shortcode) */
.c4m-sf-featured { padding: 40px 0; }
.c4m-sf-featured__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.c4m-sf-featured__title { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.5px; color: var(--ink); }
.c4m-sf-featured__all { white-space: nowrap; }
.c4m-sf-featured .c4m-sf-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.c4m-sf-featured__foot { text-align: center; margin-top: 28px; }
.c4m-sf-btn--lg { padding: 14px 26px; font-size: 15px; }
@media (max-width: 600px) { .c4m-sf-featured__all { display: none; } .c4m-sf-featured__title { font-size: 23px; } }

/* Footer */
.c4m-sf-footer { background: var(--ink); color: rgba(255,255,255,.7); padding: 30px 0; }
.c4m-sf-footer__row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; font-size: 12.5px; }

/* Car page — generous top clearance so a fixed/sticky theme header can't
   clip the heading/back-link on load. */
.c4m-sf-carpage { padding-top: 48px; padding-bottom: 90px; }
.c4m-sf-back { display: inline-flex; align-items: center; gap: 6px; color: var(--mut); font-size: 13px; font-weight: 600; text-decoration: none; margin-bottom: 14px; }
.c4m-sf-back:hover { color: var(--navy); }
.c4m-sf-carpage__grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 26px; align-items: start; }
.c4m-sf-hero-img { position: relative; aspect-ratio: 16/10; border-radius: 16px; overflow: hidden; background: repeating-linear-gradient(135deg, #eef1f6, #eef1f6 16px, #e6e9f1 16px, #e6e9f1 32px); background-size: cover; background-position: center; margin-bottom: 26px; }

/* Car-page image carousel */
.c4m-sf-carousel { position: relative; border-radius: 16px; overflow: hidden; margin-bottom: 26px; background: #eef1f6; outline: none; }
.c4m-sf-carousel__viewport { overflow: hidden; }
.c4m-sf-carousel__track { display: flex; transition: transform .35s ease; }
.c4m-sf-carousel__slide { flex: 0 0 100%; aspect-ratio: 16/10; background-size: cover; background-position: center; }
.c4m-sf-carousel__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: none; background: rgba(255,255,255,.92); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,.2); transition: background .12s; }
.c4m-sf-carousel__nav:hover { background: #fff; }
.c4m-sf-carousel__nav--prev { left: 12px; }
.c4m-sf-carousel__nav--next { right: 12px; }
.c4m-sf-carousel__dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 7px; }
.c4m-sf-carousel__dot { width: 8px; height: 8px; border-radius: 999px; border: none; background: rgba(255,255,255,.55); cursor: pointer; padding: 0; transition: width .15s, background .15s; }
.c4m-sf-carousel__dot.is-active { background: #fff; width: 22px; }
.c4m-sf-h2 { margin: 0 0 14px; font-size: 18px; font-weight: 700; }
.c4m-sf-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 26px; }
.c4m-sf-specs__row { background: #fff; padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; }
.c4m-sf-specs__row span { font-size: 13px; color: var(--mut); }
.c4m-sf-specs__row strong { font-size: 13.5px; font-weight: 600; }
.c4m-sf-desc { margin: 0 0 26px; font-size: 15px; color: #3c4658; line-height: 1.65; }
.c4m-sf-features { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.c4m-sf-feature { display: flex; align-items: center; gap: 9px; font-size: 14px; }
.c4m-sf-tick { width: 20px; height: 20px; border-radius: 50%; background: #ecfdf3; color: #15803d; display: flex; align-items: center; justify-content: center; font-size: 12px; flex: none; }

/* Not sticky: a fixed theme header would otherwise clip the top of this box. */
.c4m-sf-carpage__side { position: static; }
.c4m-sf-pricebox { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: 0 4px 16px rgba(20,30,60,.06); }
.c4m-sf-pricebox__top { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.c4m-sf-stock { font-size: 12px; color: var(--mut2); }
.c4m-sf-cartitle { margin: 0 0 2px; font-size: 23px; font-weight: 800; letter-spacing: -.5px; }
.c4m-sf-bigprice { font-size: 30px; font-weight: 800; letter-spacing: -1px; color: var(--navy); margin: 4px 0 6px; }
.c4m-sf-pricebox__meta { font-size: 13px; color: var(--mut); margin-bottom: 16px; }
.c4m-sf-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.c4m-sf-chip span { width: 6px; height: 6px; border-radius: 50%; }
.c4m-sf-chip--available { background: #ecfdf3; color: #027a48; } .c4m-sf-chip--available span { background: var(--grn); }
.c4m-sf-chip--coming_soon { background: #ecfdff; color: #0e7490; } .c4m-sf-chip--coming_soon span { background: var(--cyan); }
.c4m-sf-chip--reserved { background: #fffbeb; color: #b45309; } .c4m-sf-chip--reserved span { background: #f59e0b; }
.c4m-sf-chip--sold, .c4m-sf-chip--withdrawn { background: #f4f6fb; color: #5b6577; } .c4m-sf-chip--sold span, .c4m-sf-chip--withdrawn span { background: #97a0b0; }

.c4m-sf-enquiry { display: flex; flex-direction: column; gap: 9px; }
.c4m-sf-enquiry__h { font-size: 14px; font-weight: 700; }
.c4m-sf-enquiry input, .c4m-sf-enquiry textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; font-family: inherit; outline: none; }
.c4m-sf-enquiry input:focus, .c4m-sf-enquiry textarea:focus { border-color: var(--navy); }
.c4m-sf-enquiry__fine { margin: 4px 0 0; font-size: 11.5px; color: var(--mut2); text-align: center; }
.c4m-sf-thanks { background: #ecfdf3; border: 1px solid #bbf7d0; color: #027a48; border-radius: 12px; padding: 16px; font-size: 14px; }

.c4m-sf-gone { max-width: 620px; margin: 0 auto; padding: 50px 20px 70px; text-align: center; }
.c4m-sf-gone__icon { width: 64px; height: 64px; border-radius: 50%; background: var(--canvas); color: var(--mut); display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; font-size: 28px; }
.c4m-sf-gone h1 { margin: 0 0 8px; font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.c4m-sf-gone p { margin: 0 0 22px; color: var(--mut); font-size: 15px; line-height: 1.5; }

@media (max-width: 860px) {
	.c4m-sf-hero h1 { font-size: 32px; }
	.c4m-sf-carpage__grid { grid-template-columns: 1fr; }
	.c4m-sf-carpage__side { position: static; }
	.c4m-sf-sort { margin-left: 0; }
}

@media (max-width: 520px) {
	.c4m-sf-hero h1 { font-size: 26px; }
	.c4m-sf-hero__inner { padding-top: 84px; padding-bottom: 40px; }
	.c4m-sf-hero p { font-size: 14.5px; }
	.c4m-sf-specs, .c4m-sf-features { grid-template-columns: 1fr; }
	.c4m-sf-featured__title { font-size: 22px; }
	.c4m-sf-cartitle, .c4m-sf-bigprice { font-size: 22px; }
	.c4m-sf-price { flex: 1 1 100%; justify-content: space-between; }
	.c4m-sf-footer__row { flex-direction: column; text-align: center; gap: 8px; }
}
