/* AutoParts Core — components. Colours come from the theme's CSS variables, with fallbacks. */
.apc-vs [hidden], .apc-info [hidden], .apc-fit[hidden], .apc-suggest[hidden] { display: none !important; }
.apc-vs, .apc-ref, .apc-info, .apc-form-wrap { --_ink: var(--ap-ink, #0f1b2d); --_muted: var(--ap-muted, #5b6676); --_line: var(--ap-line, #dfe3e8); --_bg: var(--ap-surface, #fff); --_accent: var(--ap-accent, #e8461f); --_primary: var(--ap-primary, #0f1b2d); --_radius: var(--ap-radius, 10px); }

.apc-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; min-height: 44px; padding: .6em 1.2em; border-radius: var(--ap-radius-sm, 8px); border: 2px solid transparent; font-weight: 700; line-height: 1.1; cursor: pointer; text-decoration: none; transition: background-color .15s, border-color .15s, transform .1s; }
.apc-btn:active { transform: translateY(1px); }
.apc-btn:disabled { opacity: .5; cursor: not-allowed; }
.apc-btn--accent { background: var(--ap-accent, #e8461f); color: #fff; }
.apc-btn--accent:hover:not(:disabled) { background: var(--ap-accent-strong, #c7370f); color: #fff; }
.apc-btn--primary { background: var(--ap-primary, #0f1b2d); color: #fff; }
.apc-btn--ghost { background: transparent; border-color: currentColor; color: inherit; }

/* Vehicle selector */
.apc-vs { background: var(--_bg); color: var(--_ink); border-radius: var(--_radius); padding: clamp(16px, 3vw, 28px); box-shadow: var(--ap-shadow, 0 10px 30px rgba(15, 27, 45, .12)); }
.apc-vs__title { margin: 0 0 14px; font-size: 1.25rem; }
.apc-vs__form { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; align-items: end; }
.apc-vs__field label { display: block; font-size: .8rem; font-weight: 600; color: var(--_muted); margin-bottom: 4px; }
.apc-vs__step { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--_primary); color: #fff; font-size: .7rem; margin-right: 2px; }
.apc-vs select { width: 100%; min-height: 46px; border: 1px solid var(--_line); border-radius: 8px; padding: 0 10px; background: #fff; color: var(--_ink); font: inherit; }
.apc-vs select:disabled { background: #f3f5f7; color: #9aa3ad; }
.apc-vs select[aria-busy="true"] { background-image: linear-gradient(90deg, #f3f5f7 25%, #e6e9ed 50%, #f3f5f7 75%); background-size: 200% 100%; animation: apc-shimmer 1s linear infinite; }
.apc-vs__submit { width: 100%; }
.apc-vs__status { min-height: 1.2em; margin: 8px 0 0; font-size: .85rem; color: var(--_muted); }
.apc-vs__note { margin: 6px 0 0; font-size: .8rem; color: var(--_muted); }
.apc-vs__current { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 14px; border: 1px solid var(--_line); border-radius: 8px; background: #f7f9fb; }
.apc-vs__current-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--_muted); width: 100%; }
.apc-vs__current-actions { display: flex; gap: 8px; margin-left: auto; }
.apc-vs--compact { box-shadow: none; border: 1px solid var(--_line); }
@keyframes apc-shimmer { to { background-position: -200% 0; } }

/* Reference search */
.apc-ref__form { display: flex; gap: 8px; }
.apc-ref__form input[type="search"] { flex: 1; min-height: 48px; border: 1px solid var(--_line); border-radius: 8px; padding: 0 14px; font: inherit; font-family: var(--ap-font-mono, ui-monospace, SFMono-Regular, Menlo, monospace); letter-spacing: .02em; }
.apc-ref__help { font-size: .8rem; color: var(--_muted); }

/* Suggestions */
.apc-suggest-host { position: relative; }
.apc-suggest-host.is-loading::after { content: ""; position: absolute; right: 14px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border: 2px solid #c9d0d8; border-top-color: var(--ap-accent, #e8461f); border-radius: 50%; animation: apc-spin .7s linear infinite; pointer-events: none; }
@keyframes apc-spin { to { transform: rotate(360deg); } }
.apc-suggest { position: absolute; z-index: 1000; left: 0; right: 0; top: calc(100% + 6px); background: #fff; color: #0f1b2d; border: 1px solid #dfe3e8; border-radius: 10px; box-shadow: 0 16px 40px rgba(15, 27, 45, .18); max-height: min(70vh, 520px); overflow: auto; text-align: left; }
.apc-suggest__group { padding: 10px 14px 4px; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #5b6676; }
.apc-suggest__item { display: flex; align-items: center; gap: 10px; padding: 8px 14px; color: inherit; text-decoration: none; }
.apc-suggest__item img { border-radius: 6px; object-fit: contain; background: #f3f5f7; flex: none; }
.apc-suggest__item:hover, .apc-suggest__item.is-active { background: #f1f4f8; }
.apc-suggest__name { flex: 1; min-width: 0; }
.apc-suggest__name small { display: block; color: #5b6676; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.apc-suggest__meta { text-align: right; font-size: .85rem; }
.apc-suggest__meta small { display: block; }
.apc-suggest__meta .is-in { color: #13795b; }
.apc-suggest__meta .is-out { color: #8a5a00; }
.apc-suggest__all { display: block; padding: 10px 14px; border-top: 1px solid #eef1f4; font-weight: 700; color: var(--ap-accent-strong, #c7370f); text-decoration: none; }
.apc-suggest__empty { padding: 14px; margin: 0; color: #5b6676; }

/* Availability */
.apc-availability { display: flex; align-items: flex-start; gap: 8px; margin: 4px 0; font-size: .85rem; font-weight: 600; }
.apc-availability .apc-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; margin-top: .35em; background: #9aa3ad; }
.apc-availability--in_store .apc-dot { background: #13a36e; box-shadow: 0 0 0 3px rgba(19, 163, 110, .18); }
.apc-availability--in_store { color: #0e6e4b; }
.apc-availability--supplier .apc-dot { background: #2b7de9; }
.apc-availability--supplier { color: #1d5bb0; }
.apc-availability--supplier_to_confirm .apc-dot { background: #e0a100; }
.apc-availability--supplier_to_confirm { color: #7a5600; }
.apc-availability--unavailable { color: #6b7380; }
.apc-availability span { display: block; font-weight: 400; }

/* Product info box */
.apc-info { margin: 16px 0; display: grid; gap: 14px; }
.apc-info__excl { margin: -8px 0 0; color: var(--_muted); font-size: .9rem; }
.apc-info__availability { padding: 12px 14px; border-radius: 8px; background: #f6f8fa; border: 1px solid var(--_line); }
.apc-info__refs { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px 16px; margin: 0; }
.apc-info__refs div { border-left: 3px solid var(--_line); padding-left: 10px; }
.apc-info__refs dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--_muted); }
.apc-info__refs dd { margin: 0; font-weight: 600; }
.apc-mono { font-family: var(--ap-font-mono, ui-monospace, SFMono-Regular, Menlo, monospace); }
.apc-fitcheck { padding: 12px 14px; border: 1px dashed var(--_line); border-radius: 8px; font-size: .9rem; }
.apc-fitcheck p { margin: 0; }
.apc-fitcheck__for { display: block; color: var(--_muted); margin-bottom: 4px; }

/* Compatibility badges */
.apc-fit-badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .75rem; font-weight: 700; line-height: 1.4; }
.apc-fit-badge--confirmed { background: #dff5ea; color: #0b5e40; }
.apc-fit-badge--to_confirm { background: #fff2cc; color: #6d4c00; }
.apc-fit-badge--not_compatible { background: #fde2e1; color: #9b1c15; }
.apc-fit-badge--unknown { background: #eceff3; color: #4b5563; }
.apc-fit { margin: 4px 0 0; }
.apc-loop-ref { margin: 2px 0 4px; font-size: .78rem; color: #5b6676; }
.apc-loop-ref__brand { font-weight: 700; color: #0f1b2d; text-transform: uppercase; letter-spacing: .03em; }
.apc-loop-ref__ref { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* Fitment tab */
.apc-fitment__group { border: 1px solid #e3e7ec; border-radius: 8px; margin: 8px 0; }
.apc-fitment__group summary { padding: 12px 14px; cursor: pointer; font-weight: 700; }
.apc-table-wrap { overflow-x: auto; }
.apc-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.apc-table th, .apc-table td { padding: 8px 12px; border-top: 1px solid #eef1f4; text-align: left; vertical-align: top; }
.apc-demo-warning { padding: 10px 12px; border-radius: 8px; background: #fff2cc; color: #6d4c00; font-weight: 600; }

/* Vehicle banner on listings */
.apc-vehicle-banner { margin: 0 0 20px; padding: 14px 16px; border-radius: 10px; background: #0f1b2d; color: #fff; }
.apc-vehicle-banner a { color: #ffd2c4; margin-left: 8px; }
.apc-vehicle-banner__help { margin: 6px 0 0; font-size: .85rem; opacity: .85; }
.apc-vehicle-banner .apc-demo-warning { margin-top: 8px; }

/* Equivalents */
.apc-equivalents { list-style: none; padding: 0; display: grid; gap: 8px; }
.apc-equivalents li { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; padding: 10px 12px; border: 1px solid #e3e7ec; border-radius: 8px; }

/* Forms */
.apc-form__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.apc-form__field--wide { grid-column: 1 / -1; }
.apc-form__field label { display: block; font-weight: 600; margin-bottom: 4px; }
.apc-form input:not([type="checkbox"]), .apc-form select, .apc-form textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #c9d0d8; border-radius: 8px; font: inherit; background: #fff; }
.apc-form :focus-visible { outline: 3px solid var(--ap-focus, #2b7de9); outline-offset: 1px; }
.apc-req { color: #c7370f; }
.apc-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.apc-alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; }
.apc-alert ul { margin: 0; padding-left: 1.2em; }
.apc-alert--success { background: #dff5ea; color: #0b5e40; }
.apc-alert--error { background: #fde2e1; color: #9b1c15; }
.apc-missing { background: #fff2cc; color: #6d4c00; padding: 0 4px; }
.apc-legal-warning { padding: 12px; border: 2px dashed #e0a100; border-radius: 8px; background: #fffaf0; }

/* Account */
.apc-garage, .apc-favs { list-style: none; padding: 0; display: grid; gap: 10px; }
.apc-garage__item, .apc-favs__item { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px; border: 1px solid #e3e7ec; border-radius: 8px; }
.apc-garage__name, .apc-favs__name { flex: 1 1 220px; font-weight: 600; }
.apc-favs__img img { width: 56px; height: 56px; object-fit: contain; }
.apc-fav { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 8px 12px; min-height: 40px; background: transparent; border: 1px solid #c9d0d8; border-radius: 8px; cursor: pointer; color: inherit; font: inherit; }
.apc-fav.is-active { color: #c7370f; border-color: currentColor; }
.apc-fav.is-active path { fill: currentColor; }
.apc-no-results { margin-top: 16px; padding: 16px; border-radius: 10px; background: #f6f8fa; }
.apc-did-you-mean { font-size: 1.05rem; }

@media (prefers-reduced-motion: reduce) {
	.apc-btn, .apc-suggest-host.is-loading::after, .apc-vs select[aria-busy="true"] { animation: none; transition: none; }
}
@media (max-width: 600px) {
	.apc-ref__form { flex-direction: column; }
	.apc-vs__current-actions { margin-left: 0; width: 100%; }
	.apc-vs__current-actions .apc-btn { flex: 1; }
}

/* Vehicle catalogue */
.apc-vc__head h1 { margin-bottom: 8px; }
.apc-vc__head p, .apc-vc__intro { color: var(--ap-muted, #5b6676); max-width: 75ch; }
.apc-vc__lookup { margin: 20px 0 28px; }
.apc-vc__makes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.apc-vc__make { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; padding: 20px 14px 16px; background: #fff; border: 1px solid var(--ap-line, #dfe3e8); border-radius: var(--ap-radius, 12px); color: var(--ap-ink, #0f1b2d); text-align: center; text-decoration: none; transition: box-shadow .25s, transform .25s, border-color .25s; }
.apc-vc__make:hover, .apc-vc__make:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15, 23, 42, .1); border-color: var(--ap-primary, #1c2766); color: var(--ap-ink, #0f1b2d); }
.apc-vc__make-logo { display: flex; align-items: center; justify-content: center; width: 100%; height: 56px; margin-bottom: 10px; }
.apc-vc__make-logo img { max-width: 100%; max-height: 100%; object-fit: contain; transition: filter .3s, opacity .3s; }
.apc-vc__make-mono { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--ap-primary, #1c2766); color: #fff; font-size: 1.4rem; font-weight: 800; }
@media (hover: hover) {
	.apc-vc__make-logo img { filter: grayscale(1); opacity: .6; }
	.apc-vc__make:hover .apc-vc__make-logo img, .apc-vc__make:focus-visible .apc-vc__make-logo img { filter: none; opacity: 1; }
}
.apc-vc__make .apc-vc__parts { align-self: center; }
@media (max-width: 460px) { .apc-vc__makes { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
.apc-vc__make-name { font-weight: 800; font-size: 1.05rem; letter-spacing: .02em; }
.apc-vc__meta { font-size: .82rem; color: var(--ap-muted, #5b6676); }
.apc-vc__parts { align-self: flex-start; margin-top: 4px; padding: 2px 8px; border-radius: 999px; background: var(--ap-accent-soft, #fdeee9); color: var(--ap-accent-strong, #c7370f); font-size: .75rem; font-weight: 800; }
.apc-vc__filter input { width: 100%; max-width: 420px; margin: 4px 0 20px; }
.apc-vc__models { columns: 3 300px; column-gap: 16px; }
.apc-vc__model-group { break-inside: avoid; margin: 0 0 16px; padding: 14px 16px; background: #fff; border: 1px solid var(--ap-line, #dfe3e8); border-radius: var(--ap-radius, 12px); }
.apc-vc__model-group h2 { font-size: 1.05rem; margin: 0 0 8px; }
.apc-vc__model-group ul { list-style: none; margin: 0; padding: 0; }
.apc-vc__model-group a { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 8px 0; border-top: 1px solid var(--ap-line-soft, #eef1f4); color: var(--ap-ink, #0f1b2d); text-decoration: none; }
.apc-vc__model-group li:first-child a { border-top: 0; }
.apc-vc__model-group a:hover strong { color: var(--ap-accent-strong, #c7370f); }
.apc-vc__model-group .apc-vc__meta { flex-basis: 100%; }
.apc-vc__engines { background: #fff; border: 1px solid var(--ap-line, #dfe3e8); border-radius: var(--ap-radius, 12px); }
.apc-vc__engines th[scope="row"] { font-weight: 700; }
.apc-vc__engines .num { text-align: right; font-variant-numeric: tabular-nums; }
.apc-vc__note { margin-top: 12px; font-size: .85rem; color: var(--ap-muted, #5b6676); }
.apc-btn--sm { min-height: 36px; padding: .4em .9em; font-size: .85rem; }

/* Plate / VIN lookup */
.apc-lookup { padding: clamp(16px, 3vw, 24px); background: #fff; border: 1px solid var(--ap-line, #dfe3e8); border-radius: var(--ap-radius, 12px); }
.apc-lookup__title { margin: 0 0 12px; font-size: 1.15rem; }
.apc-lookup__forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.apc-lookup__form { display: grid; gap: 8px; align-content: start; }
.apc-lookup__form label { font-weight: 700; font-size: .9rem; }
.apc-lookup__form input { min-height: 48px; padding: 0 12px; border: 1px solid #c9d0d8; border-radius: 8px; font: inherit; }
.apc-plate { display: flex; border: 2px solid #0f1b2d; border-radius: 8px; overflow: hidden; background: #fff; max-width: 320px; }
.apc-plate__eu { display: grid; place-items: center; width: 34px; background: #003399; color: #fc0; font-weight: 800; }
.apc-plate input { flex: 1; min-width: 0; border: 0; border-radius: 0; text-align: center; font-weight: 800; font-size: 1.25rem; letter-spacing: .08em; text-transform: uppercase; font-family: var(--ap-font-mono, ui-monospace, monospace); }
.apc-lookup__admin { margin: 0; padding: 8px 10px; border-radius: 8px; background: #fff2cc; color: #6d4c00; font-size: .8rem; }
.apc-lookup__result { margin-top: 16px; padding: 14px; border-radius: 10px; background: #f6f8fa; }
.apc-lookup__list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.apc-lookup__list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; background: #fff; border: 1px solid var(--ap-line, #dfe3e8); border-radius: 8px; }
.apc-lookup__error { color: #9b1c15; font-weight: 600; margin: 0; }
.apc-lookup__privacy { margin: 10px 0 0; font-size: .78rem; color: var(--ap-muted, #5b6676); }
.apc-btn.is-loading { opacity: .7; pointer-events: none; }
