/* Bearbones Fitment Guides — storefront styles
 *
 * Plugs into the theme's design tokens (--wp--preset--color--*, --display, …)
 * so the plugin inherits the storefront look without duplicating colours or
 * typography. Falls back to neutral hex values when the theme isn't present.
 */

/* ─── Hero meta strip on the single guide page ────────────────────── */

.bb-guide-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin-bottom: 32px;
}
.bb-guide-meta__verified {
	margin-left: 8px;
	font-size: 12px;
	color: var(--wp--preset--color--success, #1F8A4C);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* Difficulty chip variants. */
.bb-chip--beginner     { background: #E9F6EE; color: var(--wp--preset--color--success, #1F8A4C); }
.bb-chip--intermediate { background: #EAF6FD; color: var(--wp--preset--color--bb-blue-deep, #0E7BC0); }
.bb-chip--advanced     { background: #FBEEDB; color: var(--wp--preset--color--warn, #C97A0F); }

/* ─── Tools required ────────────────────────────────────────────────── */

.bb-guide-tools {
	margin: 56px 0;
	padding: 32px;
	background: var(--wp--preset--color--paper-2, #F7F8FA);
	border: 1px solid var(--wp--preset--color--line, #E5E7EB);
	border-radius: 4px;
}
.bb-guide-tools__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax(220px, 1fr) );
	gap: 8px 24px;
}
.bb-guide-tools__list li {
	position: relative;
	padding-left: 24px;
	font-size: 14px;
}
.bb-guide-tools__list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 4px;
	width: 14px;
	height: 14px;
	border: 1.5px solid var(--wp--preset--color--ink, #0E1116);
	border-radius: 2px;
	background: transparent;
}

/* ─── Parts list ───────────────────────────────────────────────────── */

.bb-guide-parts {
	margin: 56px 0;
}
.bb-guide-parts__grid {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax(200px, 1fr) );
	gap: 16px;
	margin-top: 24px;
}
.bb-guide-parts__card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 12px;
	border: 1px solid var(--wp--preset--color--line, #E5E7EB);
	border-radius: 4px;
	background: var(--wp--preset--color--paper, #FFFFFF);
	color: inherit;
	text-decoration: none;
	transition: border-color .15s ease;
}
.bb-guide-parts__card:hover {
	border-color: var(--wp--preset--color--ink, #0E1116);
}
.bb-guide-parts__media {
	aspect-ratio: 1 / 1;
	background: var(--wp--preset--color--paper-2, #F7F8FA);
	border-radius: 4px;
	overflow: hidden;
}
.bb-guide-parts__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.bb-guide-parts__sku    { color: var(--wp--preset--color--muted, #6B7280); font-size: 11px; }
.bb-guide-parts__title  { font-size: 14px; font-weight: 600; line-height: 1.3; }
.bb-guide-parts__price  { font-family: var(--wp--preset--font-family--display, 'Oswald', sans-serif); font-size: 18px; }
.bb-guide-parts__matched {
	font-size: 11px;
	color: var(--wp--preset--color--muted, #6B7280);
	margin-top: 2px;
}

.bb-guide-parts__unresolved {
	margin-top: 24px;
	padding: 16px;
	background: var(--wp--preset--color--paper-2, #F7F8FA);
	border-left: 3px solid var(--wp--preset--color--muted-2, #9AA0A6);
	border-radius: 2px;
}
.bb-guide-parts__unresolved ul {
	list-style: none;
	margin: 8px 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
}

/* ─── Archive: system-grouped guides ──────────────────────────────── */

.bb-guides-section {
	margin-bottom: 64px;
}
.bb-guides-grid {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax(280px, 1fr) );
	gap: 24px;
}
.bb-guide-card {
	display: block;
	background: var(--wp--preset--color--paper, #FFFFFF);
	border: 1px solid var(--wp--preset--color--line, #E5E7EB);
	border-radius: 4px;
	overflow: hidden;
	color: inherit;
	text-decoration: none;
	transition: border-color .15s ease;
}
.bb-guide-card:hover {
	border-color: var(--wp--preset--color--ink, #0E1116);
}
.bb-guide-card__media {
	position: relative;
	aspect-ratio: 16 / 10;
	background: var(--wp--preset--color--ink, #0E1116);
	overflow: hidden;
}
.bb-guide-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	opacity: 0.95;
}
.bb-guide-card__vehicle {
	position: absolute;
	bottom: 12px;
	left: 12px;
	background: rgba(255, 255, 255, 0.95);
	color: var(--wp--preset--color--ink, #0E1116);
	font-size: 11px;
	font-weight: 600;
	padding: 4px 8px;
	border-radius: 2px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
.bb-guide-card__body {
	padding: 18px 20px 20px;
}
.bb-guide-card__title {
	font-size: 16px;
	font-weight: 600;
	line-height: 1.35;
	margin: 0 0 12px;
	color: var(--wp--preset--color--ink, #0E1116);
}
.bb-guide-card__chips {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}

/* ─── Related guides on PDP ────────────────────────────────────────── */

.bb-pdp-guides {
	margin-top: 56px;
	padding-top: 32px;
	border-top: 1px solid var(--wp--preset--color--line, #E5E7EB);
}

@media ( max-width: 600px ) {
	.bb-guides-grid       { grid-template-columns: 1fr; }
	.bb-guide-parts__grid { grid-template-columns: 1fr 1fr; }
}

/* ─── Global warning callout block style ───────────────────────────────
 * Editors apply `is-style-bb-warning` to any paragraph or group to surface
 * a yellow ⚠ panel. Same CSS as assets/warning.css — kept inline so guide
 * pages don't load both stylesheets.
 */

.is-style-bb-warning {
	position: relative;
	padding: 14px 16px 14px 48px !important;
	background: #FBEEDB;
	color: #6B4500;
	border-left: 3px solid #C97A0F;
	border-radius: 2px;
	font-size: 14px;
	line-height: 1.5;
}
.is-style-bb-warning::before {
	content: "⚠";
	position: absolute;
	left: 16px;
	top: 14px;
	font-size: 20px;
	line-height: 1;
	color: #C97A0F;
}
