/**
 * Vehicle Stock front end — theme-friendly, mobile-first.
 */

.vsm-stock, .vsm-single, .vsm-valuation { --vsm-accent: #2a78d6; --vsm-grid: #e1e0d9; --vsm-plane: #f9f9f7; --vsm-ink2: #52514e; }

/* ---------------------------------------------------------------- filters */

.vsm-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.vsm-filters select { padding: 8px 10px; border: 1px solid var(--vsm-grid); border-radius: 8px; }
.vsm-count { margin-left: auto; color: var(--vsm-ink2); font-size: .9em; }

/* ------------------------------------------------------------------ grid */

.vsm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }

.vsm-card-link { text-decoration: none; color: inherit; display: block; }
.vsm-card {
	display: flex; flex-direction: column; background: #fff;
	border: 1px solid var(--vsm-grid); border-radius: 12px; overflow: hidden;
	transition: box-shadow .15s ease; height: 100%;
}
.vsm-card-link:hover .vsm-card { box-shadow: 0 4px 18px rgba(0,0,0,.12); }

.vsm-card-img { position: relative; display: block; }
.vsm-card-img img { width: 100%; height: 180px; object-fit: cover; display: block; }
.vsm-noimg { display: flex; align-items: center; justify-content: center; height: 180px; font-size: 44px; background: var(--vsm-plane); }

.vsm-ribbon {
	position: absolute; top: 12px; left: -6px; padding: 4px 14px;
	font-size: .72em; font-weight: 800; letter-spacing: .06em; color: #fff;
	border-radius: 0 4px 4px 0; box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.vsm-ribbon-sold { background: #d03b3b; }
.vsm-ribbon-reserved { background: #eda100; color: #1a1a19; }

.vsm-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.vsm-card-title { font-weight: 700; line-height: 1.3; }
.vsm-card-price { font-size: 1.35em; font-weight: 800; color: var(--vsm-accent); }
.vsm-card-specs { display: flex; flex-wrap: wrap; gap: 5px; }

.vsm-spec-chip {
	background: var(--vsm-plane); border: 1px solid var(--vsm-grid);
	border-radius: 999px; padding: 2px 10px; font-size: .74em; color: var(--vsm-ink2);
}

.vsm-none { text-align: center; color: var(--vsm-ink2); padding: 30px; background: var(--vsm-plane); border-radius: 10px; }

/* ---------------------------------------------------------------- single */

.vsm-single-top { display: grid; grid-template-columns: 3fr 2fr; gap: 24px; margin-bottom: 24px; }
@media (max-width: 800px) { .vsm-single-top { grid-template-columns: 1fr; } }

.vsm-g-main img { width: 100%; border-radius: 12px; display: block; }
.vsm-g-thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.vsm-g-thumb { border: 2px solid transparent; border-radius: 8px; padding: 0; cursor: pointer; background: none; overflow: hidden; }
.vsm-g-thumb img { width: 72px; height: 54px; object-fit: cover; display: block; border-radius: 6px; }
.vsm-g-thumb.is-active { border-color: var(--vsm-accent); }

.vsm-buybox { background: var(--vsm-plane); border: 1px solid var(--vsm-grid); border-radius: 12px; padding: 20px 22px; align-self: start; }
.vsm-price-big { font-size: 2em; font-weight: 800; color: var(--vsm-accent); margin-bottom: 8px; }

.vsm-flag { display: inline-block; padding: 3px 12px; border-radius: 999px; font-weight: 700; font-size: .8em; margin-bottom: 6px; }
.vsm-flag-sold { background: #fbeaea; color: #b32d2e; }
.vsm-flag-reserved { background: #fff3d6; color: #8a6100; }

.vsm-finance { border-top: 1px solid var(--vsm-grid); margin-top: 10px; padding-top: 12px; }
.vsm-finance h4 { margin: 0 0 8px; }
.vsm-finance label { display: block; font-size: .85em; margin: 8px 0; }
.vsm-finance input[type="range"] { width: 100%; }
.vsm-finance select { padding: 6px 8px; border: 1px solid var(--vsm-grid); border-radius: 6px; }
.vsm-fin-monthly { font-size: 1.4em; font-weight: 800; margin-top: 6px; }
.vsm-fin-note { font-size: .72em; color: var(--vsm-ink2); }

.vsm-call {
	display: block; text-align: center; background: var(--vsm-accent); color: #fff !important;
	border-radius: 10px; padding: 12px; font-weight: 700; text-decoration: none; margin-top: 14px;
}

/* ------------------------------------------------------------ spec + MOT */

.vsm-spec-table { width: 100%; border-collapse: collapse; margin: 10px 0 20px; }
.vsm-spec-table th, .vsm-spec-table td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--vsm-grid); }
.vsm-spec-table th { width: 180px; color: var(--vsm-ink2); font-weight: 600; }

.vsm-features { columns: 2; }
@media (max-width: 600px) { .vsm-features { columns: 1; } }

.vsm-mot-badge {
	font-size: .55em; vertical-align: middle; background: #e8f6e8; color: #006300;
	border-radius: 999px; padding: 3px 10px; font-weight: 700; letter-spacing: .03em;
}
.vsm-mot-passed { color: #006300; font-weight: 700; }
.vsm-mot-failed { color: #b32d2e; font-weight: 700; }

/* ----------------------------------------------------------------- forms */

.vsm-form { max-width: 560px; }
.vsm-form label { display: block; margin: 10px 0; }
.vsm-form label span { display: block; font-weight: 600; font-size: .88em; margin-bottom: 3px; }
.vsm-form input, .vsm-form textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--vsm-grid); border-radius: 8px; }
.vsm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 560px) { .vsm-row { grid-template-columns: 1fr; } }

.vsm-plate {
	font-family: ui-monospace, Menlo, monospace; font-weight: 700; text-transform: uppercase;
	background: #fcd12a !important; border: 2px solid #1a1a19 !important; letter-spacing: .1em;
}

.vsm-form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.vsm-btn {
	background: var(--vsm-accent); color: #fff; border: 0; border-radius: 10px;
	padding: 12px 22px; font-weight: 700; cursor: pointer; font-size: 1em;
}
.vsm-btn-ghost { background: #fff; color: var(--vsm-accent); border: 2px solid var(--vsm-accent); }
.vsm-btn:disabled { opacity: .6; }

.vsm-form-msg { padding: 10px 12px; border-radius: 8px; font-size: .9em; }
.vsm-form-msg.is-ok { background: #e8f6e8; color: #006300; }
.vsm-form-msg.is-err { background: #fbeaea; color: #b32d2e; }
