/* Catalog discovery additions only. Load after main, mobile, and brand styles. */
.cx-toolbar,
.cx-dialog,
.cx-empty,
.cx-card-actions {
  --cx-accent-soft: color-mix(in srgb, var(--accent) 10%, var(--surface));
  --cx-focus: var(--accent);
}
.cx-toolbar {
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--line);
}
.cx-toolbar-actions,
.cx-detail-actions,
.cx-garage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.cx-toolbar-actions > .cx-button { flex: 1 1 auto; }
.cx-button,
.cx-close,
.cx-picker-button,
.cx-table-remove {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: 700 var(--text-sm)/1.35 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}
.cx-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  text-align: center;
  overflow-wrap: anywhere;
}
.cx-button:hover:not(:disabled):not([aria-disabled="true"]),
.cx-picker-button:hover:not([aria-disabled="true"]),
.cx-close:hover,
.cx-table-remove:hover {
  background: var(--soft);
  border-color: var(--accent);
}
.cx-button[aria-pressed="true"],
.cx-picker-button[aria-pressed="true"] {
  background: var(--cx-accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.cx-primary {
  background: var(--brand-gold);
  color: var(--brand-midnight);
  border-color: var(--brand-gold);
}
.cx-button.cx-primary:hover:not(:disabled) {
  background: var(--brand-gold-hover);
  border-color: var(--brand-gold-hover);
  color: var(--brand-midnight);
}
.cx-button:disabled,
.cx-button[aria-disabled="true"],
.cx-picker-button[aria-disabled="true"] {
  background: var(--soft);
  color: var(--muted);
  border-color: var(--line);
  cursor: not-allowed;
}
.cx-toolbar :is(button, a):focus-visible,
.cx-card-actions button:focus-visible,
.cx-empty button:focus-visible,
.cx-dialog :is(button, a, select, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--cx-focus);
  outline-offset: 3px;
}
.cx-feedback,
.cx-garage-summary {
  font-size: var(--text-xs);
  line-height: 1.55;
  color: var(--muted);
  margin-top: var(--space-2);
}
.cx-feedback:empty { display: none; }
.cx-garage-summary { color: var(--ink); }
.cx-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-bottom: var(--space-3);
}
.cx-card-actions .cx-button {
  flex: 1 1 4.25rem;
  min-width: 44px;
  font-size: var(--text-xs);
  padding: var(--space-2) var(--space-1);
}
.cx-card-actions .cx-details-trigger {
  flex-basis: 100%;
  background: var(--soft);
}
.cx-card-actions .cx-details-trigger:hover { background: var(--cx-accent-soft); }
.cx-empty {
  padding: var(--space-8) var(--space-4);
  border: 1px dashed var(--line);
  text-align: center;
  background: var(--soft);
}
.cx-empty h3 { font: 700 var(--text-lg)/1.4 var(--font-body); letter-spacing: 0; }
.cx-empty p { font-size: var(--text-sm); margin: var(--space-3) auto var(--space-5); max-width: 48ch; }
html.cx-modal-open { overflow: hidden; }
.cx-dialog {
  width: min(780px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: 90dvh;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) * 2);
  background: var(--surface);
  color: var(--ink);
  scrollbar-gutter: stable;
}
.cx-dialog-wide { width: min(1020px, calc(100vw - 32px)); }
.cx-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--line);
}
.cx-dialog-head > div { min-width: 0; }
.cx-kicker {
  color: var(--accent);
  font: 700 var(--text-xs)/1.6 var(--font-body);
  letter-spacing: .08em;
  margin-bottom: var(--space-2);
}
.cx-dialog-head h2 {
  font-size: var(--text-xl);
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.cx-close {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  font-size: var(--text-xl);
  font-weight: 400;
  line-height: 1;
}
.cx-dialog-body { padding: var(--space-6); }
.cx-dialog-intro {
  font-size: var(--text-sm);
  line-height: 1.65;
  margin-bottom: var(--space-5);
  max-width: none;
}
.cx-product-overview {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: var(--space-5);
  align-items: start;
  margin-bottom: var(--space-5);
}
.cx-product-figure { min-width: 0; }
.cx-product-figure .product-thumb { height: 200px; margin-bottom: var(--space-2); }
.cx-product-figure figcaption,
.cx-image-fallback { font-size: var(--text-xs); line-height: 1.5; color: var(--muted); }
.cx-image-fallback { padding: var(--space-5); color: var(--brand-midnight); }
.cx-dialog h3 {
  font: 700 var(--text-base)/1.4 var(--font-body);
  letter-spacing: 0;
}
.cx-specs { font-size: var(--text-xs); margin-top: var(--space-3); }
.cx-specs > div {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: var(--space-3);
  padding-block: var(--space-2);
  border-bottom: 1px solid var(--line);
}
.cx-specs dt { color: var(--muted); }
.cx-specs dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.cx-fitment-note {
  padding: var(--space-4);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: var(--space-5);
}
.cx-fitment-note p {
  font-size: var(--text-sm);
  line-height: 1.65;
  margin-top: var(--space-2);
  max-width: none;
}
.cx-disclosure:first-child { border-top: 1px solid var(--line); }
.cx-disclosure summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 52px;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-1);
  font: 700 var(--text-sm)/1.4 var(--font-body);
  color: var(--ink);
}
.cx-disclosure summary:hover { color: var(--accent); }
.cx-disclosure .cx-disclosure-marker { flex-shrink: 0; }
.cx-disclosure > p { font-size: var(--text-sm); padding-bottom: var(--space-4); line-height: 1.65; }
.cx-detail-actions { margin-top: var(--space-5); }
.cx-detail-actions > .cx-button { flex: 1 1 auto; }
.cx-dialog-footer {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
}
.cx-dialog-footer > .cx-button { flex-shrink: 0; }
.cx-dialog-footer > p { font-size: var(--text-xs); line-height: 1.55; }
.cx-compare-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}
.cx-picker-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-3);
  text-align: left;
  min-width: 0;
}
.cx-picker-copy { min-width: 0; }
.cx-picker-copy strong { display: block; font-size: var(--text-xs); line-height: 1.4; }
.cx-picker-copy small { display: block; font-size: var(--text-xs); font-weight: 400; margin-top: var(--space-1); }
.cx-picker-button .cx-action-label { flex-shrink: 0; font-size: var(--text-xs); }
.cx-compare-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  margin-block: var(--space-4);
}
.cx-compare-count { font-size: var(--text-sm); font-weight: 700; color: var(--ink); }
.cx-compare-summary .cx-button { font-size: var(--text-xs); }
.cx-compare-empty { background: var(--soft); padding: var(--space-5); font-size: var(--text-sm); max-width: none; }
.cx-table-region {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overscroll-behavior-x: contain;
}
.cx-scroll-hint{display:none;font-size:var(--text-xs);color:var(--muted);margin-bottom:var(--space-3)}
@media(max-width:650px){.cx-scroll-hint:not([hidden]){display:block}}
.cx-compare-table {
  width: 100%;
  min-width: 610px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: var(--text-xs);
  line-height: 1.5;
  text-align: left;
}
.cx-compare-table caption { padding: var(--space-3); font-weight: 700; color: var(--muted); text-align: left; background: var(--soft); }
.cx-compare-table th,
.cx-compare-table td {
  padding: var(--space-3);
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  vertical-align: top;
  overflow-wrap: anywhere;
}
.cx-compare-table tr > :last-child { border-right: 0; }
.cx-compare-table tbody tr:last-child > * { border-bottom: 0; }
.cx-compare-table th[scope="row"] { width: 25%; color: var(--muted); font-weight: 500; background: var(--soft); }
.cx-compare-table thead th { background: var(--soft); font-weight: 700; }
.cx-compare-table th strong { display: block; }
.cx-compare-table th small { display: block; color: var(--muted); font-size: var(--text-xs); font-weight: 400; margin-top: var(--space-2); }
.cx-table-remove {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2);
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 500;
}
.cx-compare-table .cx-primary { width: 100%; font-size: var(--text-xs); }
.cx-disclaimer { margin-top: var(--space-4); font-size: var(--text-xs); line-height: 1.65; max-width: none; }
.cx-garage-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-2) var(--space-3);
}
.cx-garage-form label { grid-column: 1/-1; font-size: var(--text-sm); }
.cx-garage-form select { min-width: 0; min-height: 46px; font-size: var(--text-base); }
.cx-garage-saved { margin-top: var(--space-5); padding: var(--space-5); background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); }
.cx-garage-saved > p { margin-block: var(--space-2) var(--space-4); font-size: var(--text-sm); color: var(--ink); }
.cx-garage-actions .cx-button { flex: 1 1 auto; }
@media (max-width: 700px) {
  .cx-compare-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cx-product-overview { grid-template-columns: 1fr; }
  .cx-product-figure .product-thumb { height: 180px; }
}
@media (max-width: 480px) {
  .cx-toolbar-actions { gap: var(--space-1); }
  .cx-toolbar-actions .cx-button { font-size: var(--text-xs); padding-inline: var(--space-2); }
  .cx-dialog, .cx-dialog-wide { width: calc(100vw - 24px); max-width: calc(100vw - 24px); max-height: 92dvh; }
  .cx-dialog-head { padding: var(--space-4); gap: var(--space-2); }
  .cx-dialog-body { padding: var(--space-4); }
  .cx-dialog-head h2 { font-size: var(--text-lg); line-height: 1.3; font-family: var(--font-body); }
  .cx-kicker { letter-spacing: .04em; }
  .cx-compare-picker { grid-template-columns: 1fr; }
  .cx-picker-button { padding: var(--space-2) var(--space-3); }
  .cx-dialog-footer { flex-direction: column; align-items: stretch; }
  .cx-dialog-footer .cx-button { width: 100%; }
  .cx-garage-form { grid-template-columns: minmax(0, 1fr); }
  .cx-garage-saved { padding: var(--space-4); }
  .cx-garage-actions { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .cx-button, .cx-close, .cx-picker-button, .cx-table-remove { transition: none; }
}
