/*
Theme Name:   GeneratePress Child - BMS Inventory
Theme URI:    https://browardmotorsports.com
Description:  Child theme for the Broward Motorsports inventory build. Holds the
              /inventory/ SRP template and helpers. Do not edit the parent
              GeneratePress theme files directly — they get wiped on update.
Author:       Broward Motorsports
Template:     generatepress
Version:      1.0.0
*/

/* -------------------------------------------------------------------------
 * Brand tokens — Broward Motorsports.
 * ---------------------------------------------------------------------- */
:root {
	--bms-red: #aa1c1a;
	--bms-red-dark: #8a1615; /* hover/active shade of --bms-red, ~15% darker */
	--bms-black: #000000;
	--bms-light: #e4e4e4; /* brand off-white */
	--bms-white: #ffffff; /* true white — high-contrast text on red/black */
}

/* -------------------------------------------------------------------------
 * Site-wide font — system font stack (matches the approved design/demo).
 * Applied to body plus form controls (buttons/inputs/selects don't inherit
 * the body font by default). Overrides GeneratePress's default typeface.
 * ---------------------------------------------------------------------- */
body,
button,
input,
select,
textarea,
.bms-btn {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* -------------------------------------------------------------------------
 * Global, site-wide rules — shared across the SRP and the homepage sections.
 * Page/section-specific CSS lives in assets/css/bms-srp.css and
 * assets/css/bms-home.css instead, each enqueued only where it's needed.
 * Header/footer CSS lives in assets/css/bms-site.css (also site-wide).
 * ---------------------------------------------------------------------- */

.bms-btn {
	display: inline-block;
	text-align: center;
	padding: 10px 8px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-decoration: none;
	border-radius: 4px;
	cursor: pointer;
	border: 1px solid var(--bms-black);
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.bms-btn-primary {
	background: var(--bms-red);
	color: var(--bms-white);
	border-color: var(--bms-red);
}

.bms-btn-primary:hover,
.bms-btn-primary:focus {
	background: var(--bms-red-dark);
	border-color: var(--bms-red-dark);
	color: var(--bms-white);
}

.bms-btn-secondary {
	background: transparent;
	color: var(--bms-black);
	border-color: var(--bms-black);
}

/* Default (light-background) secondary buttons stay black-on-outline — a
 * second red control right next to a red primary button would compete with
 * it, so red shows up here only as an interactive hover accent instead.
 * Dark-section contexts (Specials/Find Your Store/Footer CTA) already
 * override this to a white outline via their own section-scoped rules in
 * bms-home.css — those are untouched here. */
.bms-btn-secondary:hover,
.bms-btn-secondary:focus {
	color: var(--bms-red);
	border-color: var(--bms-red);
}

.bms-section {
	padding: 60px 20px;
}

/* Red accent underline under section titles, to match the comp. Sits under
 * just the title's own width (inline-block), so it stays left-aligned next
 * to inline action buttons (Shop By Type, Featured Vehicles) and centers
 * automatically wherever the heading itself is center-aligned (Why Choose
 * Us, Find Your Store). */
.bms-section-title {
	display: inline-block;
	position: relative;
	padding-bottom: 14px;
}

.bms-section-title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 48px;
	height: 3px;
	background: var(--bms-red);
}

.bms-why-heading .bms-section-title::after {
	left: 50%;
	transform: translateX(-50%);
}

/* Brand link-hover accent, site-wide. Buttons opt out (.bms-btn) since they
 * already have their own explicit hover treatment above — without this
 * exclusion, e.g. a primary button's white label text would turn red on
 * hover and nearly vanish against its red background. */
a:not(.bms-btn):hover {
	color: var(--bms-red);
}

/* Brand-colored focus ring, site-wide (nav links, form controls, FacetWP
 * dropdowns/inputs included) instead of the browser default blue. */
:focus-visible {
	outline-color: var(--bms-red);
}

/* FacetWP's active/selected facet choice — .checked is FacetWP's own
 * documented state class for Checkboxes/Radio facets. This only recolors
 * the label text/weight, not the checkbox/radio indicator itself (that
 * indicator's exact markup varies by FacetWP version) — check this once
 * real facets are rendering and let me know if the indicator itself also
 * needs a red accent. */
.facetwp-checkbox.checked,
.facetwp-radio.checked {
	color: var(--bms-red);
	font-weight: 600;
}

/* -------------------------------------------------------------------------
 * Inventory result card — output by bms_render_inventory_card() in
 * functions.php. Global (not SRP-only) because the homepage Featured
 * Vehicles carousel renders the exact same card markup.
 * ---------------------------------------------------------------------- */

.bms-card {
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	overflow: hidden;
	background: #ffffff;
	display: flex;
	flex-direction: column;
}

.bms-card-image {
	position: relative;
	aspect-ratio: 4 / 3;
	background: #f4f4f4;
}

.bms-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.bms-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 4px 10px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	border-radius: 4px;
	color: #ffffff;
}

.bms-badge-new {
	background: var(--bms-red);
}

.bms-badge-used {
	background: #555555;
}

.bms-card-body {
	padding: 14px 16px 18px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.bms-card-title {
	margin: 0 0 8px;
	font-size: 17px;
	line-height: 1.3;
}

.bms-card-meta {
	list-style: none;
	margin: 0 0 14px;
	padding: 0;
	font-size: 13px;
	color: #555555;
}

.bms-card-meta li {
	margin-bottom: 2px;
}

.bms-card-actions {
	margin-top: auto;
	display: flex;
	gap: 8px;
}

.bms-card-actions .bms-btn {
	flex: 1;
}

/* Image click target — needs to fill the same box the <img> used to fill
   directly, now that an <a> sits between .bms-card-image and the <img>. */
.bms-card-image-link {
	display: block;
	width: 100%;
	height: 100%;
}

/* Title link — inherits the existing .bms-card-title color/weight instead
   of default link-blue/underline. Red-on-hover already comes for free from
   the global `a:not(.bms-btn):hover { color: var(--bms-red); }` rule in
   style.css, so no separate hover rule is needed here. */
.bms-card-title-link {
	color: inherit;
	text-decoration: none;
}

/* Location — bold, slightly larger than Color/Stock #, dark (not red),
   pin icon + text on one line. */
.bms-card-location {
	display: flex;
	align-items: center;
	gap: 6px;
	font-weight: 700;
	font-size: 14px;
	color: #222222;
	margin-bottom: 6px;
}

.bms-card-location-icon {
	width: 15px;
	height: 15px;
	flex: 0 0 auto;
}
