/* ZS Autopart — widgets boutique. --zsa-accent vient des réglages (ou du widget Elementor). */

.zsa-filter,
.zsa-specs {
	--zsa-ink: #141821;
	--zsa-muted: #5f6773;
	--zsa-line: #dfe3e8;
	--zsa-surface: #fff;
	--zsa-radius: 12px;
	--zsa-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* ---------- Filtre Réf + Marque ---------- */

.zsa-filter { container-type: inline-size; margin: 0; color: var(--zsa-ink); }
.zsa-filter__title { margin: 0 0 10px; font-size: 1.05em; font-weight: 650; letter-spacing: -.01em; }

.zsa-filter__fields {
	display: flex;
	align-items: stretch;
	gap: 0;
	padding: 6px;
	background: var(--zsa-surface);
	border: 1px solid var(--zsa-line);
	border-radius: var(--zsa-radius);
	box-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 10px 28px -14px rgba(16, 24, 40, .18);
	transition: border-color .15s;
}
.zsa-filter__fields:focus-within { border-color: color-mix(in srgb, var(--zsa-accent, #c8101e) 40%, var(--zsa-line)); }

.zsa-filter .zsa-f {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	justify-content: center;
	gap: 2px;
	min-width: 0;
	margin: 0;
	padding: 6px 14px;
	border-left: 1px solid var(--zsa-line);
	border-radius: 0;
	cursor: text;
	transition: background-color .15s;
}
.zsa-filter .zsa-f:first-child { border-left: 0; }
.zsa-filter .zsa-f--ref { flex-grow: 1.4; }
.zsa-filter .zsa-f:focus-within { background: color-mix(in srgb, var(--zsa-accent, #c8101e) 5%, var(--zsa-surface)); border-radius: calc(var(--zsa-radius) - 5px); }
.zsa-filter .zsa-f > span { color: var(--zsa-muted); font-size: 12px; font-weight: 600; line-height: 1.3; }

.zsa-filter .zsa-f input,
.zsa-filter .zsa-f select {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	height: auto;
	min-height: 0;
	margin: 0;
	padding: 2px 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	outline: none;
	color: var(--zsa-ink);
	font: inherit;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
}
.zsa-filter .zsa-f select {
	padding-right: 22px;
	background: transparent 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='%235f6773' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>") no-repeat right 2px center;
	cursor: pointer;
	text-overflow: ellipsis;
}
.zsa-filter .zsa-f--ref input { font-family: var(--zsa-mono); letter-spacing: .02em; }
.zsa-filter .zsa-f input::placeholder { color: #9aa1ac; font-weight: 400; opacity: 1; }
.zsa-filter .zsa-f input::-webkit-search-cancel-button { cursor: pointer; }

.zsa-filter .zsa-filter__submit {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 52px;
	margin: 0;
	padding: 0 22px;
	border: 0;
	border-radius: calc(var(--zsa-radius) - 5px);
	background: var(--zsa-accent, #c8101e);
	color: #fff;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	transition: background-color .15s, transform .15s;
}
.zsa-filter .zsa-filter__submit:hover { background: color-mix(in srgb, var(--zsa-accent, #c8101e) 86%, #000); color: #fff; }
.zsa-filter .zsa-filter__submit:active { transform: translateY(1px); }
.zsa-filter .zsa-filter__submit:focus-visible { outline: 2px solid var(--zsa-accent, #c8101e); outline-offset: 2px; }

.zsa-filter__reset { display: inline-block; margin-top: 10px; color: var(--zsa-muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.zsa-filter__reset:hover { color: var(--zsa-accent, #c8101e); }

/* Empilée (barre latérale) — et en ligne quand la colonne devient étroite. */
.zsa-filter--stack .zsa-filter__fields { flex-direction: column; }
.zsa-filter--stack .zsa-f { padding: 10px 12px; border-left: 0; border-top: 1px solid var(--zsa-line); }
.zsa-filter--stack .zsa-f:first-child { border-top: 0; }
.zsa-filter--stack .zsa-filter__submit { width: 100%; min-height: 46px; margin-top: 6px; }

@container (max-width: 640px) {
	.zsa-filter--row .zsa-filter__fields { flex-direction: column; }
	.zsa-filter--row .zsa-f { padding: 10px 12px; border-left: 0; border-top: 1px solid var(--zsa-line); }
	.zsa-filter--row .zsa-f:first-child { border-top: 0; }
	.zsa-filter--row .zsa-filter__submit { width: 100%; min-height: 46px; margin-top: 6px; }
}

/* ---------- Tableau de caractéristiques ---------- */

.zsa-specs { --zsa-th-w: 42%; margin: 0; color: var(--zsa-ink); }
.zsa-specs .zsa-specs__title { margin: 0 0 12px; font-size: 1.15em; font-weight: 650; letter-spacing: -.01em; }
.zsa-specs .zsa-specs__table { width: 100%; margin: 0; border: 0; border-collapse: collapse; table-layout: fixed; font-variant-numeric: tabular-nums; }
.zsa-specs .zsa-specs__table th,
.zsa-specs .zsa-specs__table td {
	padding: 11px 0;
	border: 0;
	border-bottom: 1px solid var(--zsa-line);
	background: none;
	font-size: .95em;
	line-height: 1.45;
	text-align: left;
	vertical-align: top;
	overflow-wrap: anywhere;
}
.zsa-specs .zsa-specs__table tr:first-child > * { border-top: 1px solid var(--zsa-line); }
.zsa-specs .zsa-specs__table th { width: var(--zsa-th-w); padding-right: 16px; color: var(--zsa-muted); font-weight: 500; }
.zsa-specs .zsa-specs__table td { color: inherit; font-weight: 500; }
.zsa-specs .zsa-mono { font-family: var(--zsa-mono); letter-spacing: .02em; }
