/* OBTC Trucks — shared base styles. Components are token-driven so each design
   re-skins by overriding the CSS variables below. */

.obtc-trucks {
	--obtc-bg: #f4f6f8;
	--obtc-surface: #ffffff;
	--obtc-surface-2: #f0f3f6;
	--obtc-text: #16222e;
	--obtc-muted: #5d6b78;
	--obtc-border: #e2e8ee;
	--obtc-accent: #15466b;
	--obtc-accent-2: #1d6fb8;
	--obtc-on-accent: #ffffff;
	--obtc-wa: #25d366;
	--obtc-radius: 12px;
	--obtc-radius-sm: 8px;
	--obtc-shadow: 0 6px 24px rgba(20, 40, 60, 0.08);
	--obtc-shadow-sm: 0 2px 8px rgba(20, 40, 60, 0.06);

	color: var(--obtc-text);
	font-family: inherit;
	line-height: 1.5;
	box-sizing: border-box;
}
.obtc-trucks *, .obtc-trucks *::before, .obtc-trucks *::after { box-sizing: border-box; }

/* Full-width breakout: stretches edge-to-edge even inside narrow theme
   containers, using the classic full-bleed negative-margin trick (avoids the
   horizontal scrollbar that width:100vw causes). */
.obtc-trucks.obtc-fullwidth {
	/* !important + max-width:none defeat block-theme rules that cap children to
	   the content width and auto-centre them. width:auto lets the negative
	   margins expand the element to the full viewport. */
	max-width: none !important;
	width: auto !important;
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
	padding-left: clamp(16px, 4vw, 56px);
	padding-right: clamp(16px, 4vw, 56px);
}

/* Intro */
.obtc-intro { margin: 0 0 24px; }
.obtc-intro__title { font-size: clamp(1.6rem, 3vw, 2.4rem); margin: 0 0 8px; line-height: 1.15; }
.obtc-intro__text { color: var(--obtc-muted); max-width: 760px; margin: 0; }

/* Layout scaffolds */
.obtc-layout--sidebar { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; }
.obtc-sidebar__inner { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 18px; }
.obtc-main { min-width: 0; }

/* Toolbar / search / sort */
.obtc-toolbar { margin-bottom: 14px; }
.obtc-search {
	width: 100%; padding: 12px 16px; border: 1px solid var(--obtc-border);
	border-radius: var(--obtc-radius-sm); background: var(--obtc-surface); color: var(--obtc-text);
	font-size: 15px;
}
.obtc-search:focus { outline: 2px solid var(--obtc-accent-2); border-color: transparent; }
.obtc-sort, .obtc-fsel {
	padding: 10px 12px; border: 1px solid var(--obtc-border); border-radius: var(--obtc-radius-sm);
	background: var(--obtc-surface); color: var(--obtc-text); font-size: 14px;
}

.obtc-resultsbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 8px 0 16px; flex-wrap: wrap; }
.obtc-resultsbar__right { display: flex; gap: 10px; align-items: center; }
.obtc-count { font-weight: 600; color: var(--obtc-muted); }

/* Active filter chips */
.obtc-active-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; align-items: center; }
.obtc-active-chip {
	border: 1px solid var(--obtc-border); background: var(--obtc-surface-2); color: var(--obtc-text);
	border-radius: 999px; padding: 5px 12px; font-size: 13px; cursor: pointer;
}
.obtc-active-chip span { opacity: .7; }
.obtc-clear { background: none; border: none; color: var(--obtc-accent-2); cursor: pointer; font-size: 13px; text-decoration: underline; }

/* Facet groups (sidebar) */
.obtc-facet { background: var(--obtc-surface); border: 1px solid var(--obtc-border); border-radius: var(--obtc-radius); padding: 14px 16px; box-shadow: var(--obtc-shadow-sm); }
.obtc-facet__title { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--obtc-muted); }
.obtc-facet ul { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow: auto; }
.obtc-facet__opt {
	display: flex; justify-content: space-between; width: 100%; gap: 8px; text-align: left;
	background: none; border: none; padding: 6px 8px; border-radius: 6px; cursor: pointer;
	color: var(--obtc-text); font-size: 14px;
}
.obtc-facet__opt:hover { background: var(--obtc-surface-2); }
.obtc-facet__opt.is-active { background: var(--obtc-accent); color: var(--obtc-on-accent); }
.obtc-facet__count { color: var(--obtc-muted); font-size: 12px; }
.obtc-facet__opt.is-active .obtc-facet__count { color: var(--obtc-on-accent); opacity: .8; }

/* Grid + cards */
.obtc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.obtc-card {
	background: var(--obtc-surface); border: 1px solid var(--obtc-border); border-radius: var(--obtc-radius);
	overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--obtc-shadow-sm);
	transition: transform .15s ease, box-shadow .15s ease;
}
.obtc-card:hover { transform: translateY(-3px); box-shadow: var(--obtc-shadow); }
.obtc-card__media { position: relative; aspect-ratio: 4 / 3; background: var(--obtc-surface-2); cursor: pointer; overflow: hidden; }
.obtc-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.obtc-card:hover .obtc-card__media img { transform: scale(1.05); }
.obtc-card__badge { position: absolute; top: 10px; left: 10px; background: var(--obtc-accent); color: var(--obtc-on-accent); font-size: 11px; padding: 3px 9px; border-radius: 999px; letter-spacing: .03em; }
.obtc-card__body { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.obtc-card__brand { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--obtc-accent-2); font-weight: 700; }
.obtc-card__title { font-size: 16px; margin: 0; line-height: 1.3; }
.obtc-card__actions { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* Chips */
.obtc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.obtc-chip { background: var(--obtc-surface-2); color: var(--obtc-muted); font-size: 12px; padding: 3px 9px; border-radius: 6px; }

/* Buttons */
.obtc-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	border: 1px solid transparent; border-radius: var(--obtc-radius-sm); padding: 9px 14px;
	font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1;
	transition: filter .15s ease, background .15s ease;
}
.obtc-btn--ghost { background: var(--obtc-surface); border-color: var(--obtc-border); color: var(--obtc-text); }
.obtc-btn--ghost:hover { background: var(--obtc-surface-2); }
.obtc-btn--primary { background: var(--obtc-accent); color: var(--obtc-on-accent); }
.obtc-btn--primary:hover { filter: brightness(1.08); }
.obtc-btn--wa { background: var(--obtc-wa); color: #04341a; }
.obtc-btn--wa:hover { filter: brightness(1.05); }
.obtc-btn--sm { padding: 7px 11px; font-size: 13px; }
.obtc-btn--lg { padding: 14px 26px; font-size: 16px; }
.obtc-btn--block { width: 100%; }
.obtc-wa-icon { font-size: 15px; }
.obtc-selwa { margin-top: 4px; }

/* Empty */
.obtc-empty { padding: 48px 16px; text-align: center; color: var(--obtc-muted); background: var(--obtc-surface); border: 1px dashed var(--obtc-border); border-radius: var(--obtc-radius); }

/* Pager */
.obtc-pager { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 26px; }
.obtc-page { min-width: 38px; padding: 8px 12px; border: 1px solid var(--obtc-border); background: var(--obtc-surface); color: var(--obtc-text); border-radius: var(--obtc-radius-sm); cursor: pointer; font-size: 14px; }
.obtc-page.is-active { background: var(--obtc-accent); color: var(--obtc-on-accent); border-color: var(--obtc-accent); }
.obtc-page[disabled] { opacity: .45; cursor: default; }

/* Modal */
.obtc-modal { position: fixed; inset: 0; background: rgba(8, 18, 28, 0.72); display: flex; align-items: center; justify-content: center; z-index: 100000; padding: 20px; }
.obtc-modal__content { background: var(--obtc-surface); color: var(--obtc-text); border-radius: var(--obtc-radius); max-width: 960px; width: 100%; max-height: 90vh; overflow: auto; display: grid; grid-template-columns: 1.1fr 1fr; position: relative; }
.obtc-modal__close { position: absolute; top: 10px; right: 12px; background: rgba(0,0,0,.5); color: #fff; border: none; width: 34px; height: 34px; border-radius: 50%; font-size: 22px; cursor: pointer; z-index: 2; }
.obtc-modal__gallery { background: var(--obtc-surface-2); padding: 16px; }
.obtc-modal__main { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--obtc-radius-sm); }
.obtc-modal__thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.obtc-modal__thumbs img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; cursor: pointer; opacity: .6; border: 2px solid transparent; }
.obtc-modal__thumbs img.is-active, .obtc-modal__thumbs img:hover { opacity: 1; border-color: var(--obtc-accent-2); }
.obtc-modal__info { padding: 22px 24px; display: flex; flex-direction: column; gap: 10px; }
.obtc-modal__info h2 { margin: 0; font-size: 22px; }
.obtc-modal__desc { color: var(--obtc-muted); margin: 0; }
.obtc-modal__highlights { margin: 0; padding-left: 18px; color: var(--obtc-text); }
.obtc-spec-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.obtc-spec-table th, .obtc-spec-table td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--obtc-border); }
.obtc-spec-table th { color: var(--obtc-muted); font-weight: 600; width: 42%; }

/* Filter bar (showcase) */
.obtc-filterbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.obtc-filterbar .obtc-search { flex: 1 1 220px; width: auto; }

/* Showcase tiles */
.obtc-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.obtc-tile { position: relative; border: none; border-radius: var(--obtc-radius); overflow: hidden; cursor: pointer; aspect-ratio: 16/10; padding: 0; color: #fff; background: var(--obtc-accent); }
.obtc-tile__img { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .55; transition: opacity .2s, transform .3s; }
.obtc-tile:hover .obtc-tile__img { opacity: .7; transform: scale(1.06); }
.obtc-tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.7)); }
.obtc-tile__label { position: absolute; left: 12px; bottom: 10px; z-index: 1; font-weight: 700; text-align: left; font-size: 14px; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.obtc-tile__count { position: absolute; right: 10px; top: 8px; z-index: 1; background: rgba(255,255,255,.92); color: #16222e; border-radius: 999px; padding: 1px 9px; font-size: 12px; font-weight: 700; }
.obtc-tile.is-active { outline: 3px solid var(--obtc-accent-2); }

/* Finder (design C) */
.obtc-finder, .obtc-finder-start { max-width: 760px; margin: 0 auto; background: var(--obtc-surface); border: 1px solid var(--obtc-border); border-radius: var(--obtc-radius); padding: 28px; box-shadow: var(--obtc-shadow-sm); }
.obtc-finder-lead, .obtc-finder-q { text-align: center; }
.obtc-finder-q { font-size: 22px; margin: 6px 0 18px; }
.obtc-finder-progress { text-align: center; color: var(--obtc-muted); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.obtc-finder-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.obtc-finder-opt { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; padding: 16px; border: 1px solid var(--obtc-border); border-radius: var(--obtc-radius-sm); background: var(--obtc-surface-2); cursor: pointer; text-align: left; }
.obtc-finder-opt:hover { border-color: var(--obtc-accent-2); background: var(--obtc-surface); }
.obtc-finder-opt__label { font-weight: 700; font-size: 15px; }
.obtc-finder-opt__count { color: var(--obtc-muted); font-size: 12px; }
.obtc-finder-nav { display: flex; gap: 10px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.obtc-finder-start { text-align: center; }
.obtc-finder-summary { margin-bottom: 12px; }

/* View toggle + table */
.obtc-viewtoggle { display: inline-flex; border: 1px solid var(--obtc-border); border-radius: var(--obtc-radius-sm); overflow: hidden; }
.obtc-vt { background: var(--obtc-surface); border: none; padding: 8px 14px; cursor: pointer; font-size: 13px; color: var(--obtc-text); }
.obtc-vt.is-active { background: var(--obtc-accent); color: var(--obtc-on-accent); }
.obtc-tablewrap { overflow-x: auto; background: var(--obtc-surface); border: 1px solid var(--obtc-border); border-radius: var(--obtc-radius); }
.obtc-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.obtc-table th, .obtc-table td { padding: 10px 12px; border-bottom: 1px solid var(--obtc-border); text-align: left; white-space: nowrap; }
.obtc-table th { background: var(--obtc-surface-2); color: var(--obtc-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.obtc-table a { color: var(--obtc-accent-2); text-decoration: none; font-weight: 600; }

/* Single truck page */
.obtc-single__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: start; }
.obtc-single__main { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--obtc-radius); }
.obtc-single__thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.obtc-single__thumbs img { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; cursor: pointer; border: 2px solid transparent; }
.obtc-single__thumbs img:hover { border-color: var(--obtc-accent-2); }
.obtc-single__info { display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 768px) { .obtc-single__grid { grid-template-columns: 1fr; } }

/* Responsive */
@media (max-width: 880px) {
	.obtc-layout--sidebar { grid-template-columns: 1fr; }
	.obtc-sidebar__inner { position: static; flex-direction: row; flex-wrap: wrap; }
	.obtc-facet { flex: 1 1 200px; }
	.obtc-modal__content { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
	.obtc-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
	.obtc-card__title { font-size: 14px; }
}
