:root {
  --seineca-red: #ec1944;
  --leader-charcoal: #262729;
  --filter-paper: #fff1d7;
  --filter-paper-edge: #ddbb80;
  --topbar-height: 76px;
  --sidebar-width: 232px;
  --content-gutter: 34px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--topbar-height);
  padding-inline: var(--content-gutter);
  gap: 20px;
  color: #f5f4f0;
  background: var(--leader-charcoal);
  border-bottom: 3px solid var(--seineca-red);
}

.site-brands,
.site-context {
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-brands {
  min-width: 0;
}

.leader-home {
  position: relative;
  display: block;
  width: 206px;
  height: 54px;
  padding: 0;
  overflow: hidden;
  border-radius: 6px;
  background: var(--leader-charcoal);
}

.leader-home img {
  position: absolute;
  top: 50%;
  left: 0;
  display: block;
  width: 100%;
  height: auto;
  transform: translateY(-50%);
}

.brand-divider {
  flex: 0 0 1px;
  height: 32px;
  background: #58575a;
}

.seineca-logo,
.cyclon-logo {
  display: block;
  width: 172px;
  height: 51px;
  min-width: 0;
  object-fit: contain;
  padding: 7px 10px;
  border-radius: 8px;
}

.seineca-logo { background: #fff; }

.cyclon-logo {
  background: #001a61;
  padding: 3px 8px;
}

.site-context {
  flex-shrink: 0;
  font-size: 12px;
}

.topbar .private-badge {
  padding: 6px 9px;
  border-color: #5a5054;
  background: #3a3437;
  color: #f6ebee;
}

.sidebar {
  top: var(--topbar-height);
  width: var(--sidebar-width);
  height: calc(100dvh - var(--topbar-height));
  padding-top: 28px;
  overflow-y: auto;
}

.main-shell {
  margin-left: var(--sidebar-width);
}

.nav-item.active {
  box-shadow: inset 3px 0 var(--seineca-red);
}

.nav-item,
.nav-label {
  color: var(--muted);
}

.nav-item:hover:not(.active) {
  color: var(--accent);
  background: #fcf5f6;
}

.sidebar-note {
  background: #fbf8f6;
  border-color: var(--line);
}

.search-toolbar {
  position: sticky;
  top: var(--topbar-height);
  z-index: 15;
  background: #fffcfb;
  border-bottom: 1px solid #eadcde;
  box-shadow: 0 4px 12px rgb(50 24 30 / 5%);
}

.search-toolbar-inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 1530px;
  margin-inline: auto;
  padding: 13px var(--content-gutter);
}

#search-form {
  flex: 1;
  min-width: 0;
}

.search-input-wrap {
  min-height: 54px;
  border-color: var(--filter-paper-edge);
  border-radius: 10px;
  background: var(--filter-paper);
  box-shadow: none;
}

.search-input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(236 25 68 / 14%);
}

.search-input-wrap > svg {
  color: #824b26;
}

.search-input-wrap input,
.search-input-wrap textarea {
  color: #37281c;
  font-size: 15px;
}

.search-input-wrap input::placeholder,
.search-input-wrap textarea::placeholder {
  color: #785941;
}

.search-input-wrap textarea {
  max-height: min(132px, 28dvh);
}

.search-input-wrap .icon-btn {
  color: #785941;
}

.search-submit {
  min-height: 40px;
  padding-inline: 15px;
  font-size: 12px;
}

.batch-toggle,
.search-filter-toggle {
  flex-shrink: 0;
  min-height: 54px;
  border-color: #ded2d3;
  color: #554246;
  font-size: 12px;
}

.batch-toggle[aria-pressed='true'],
.search-filter-toggle[aria-expanded='true'] {
  border-color: #dfacb8;
  color: var(--accent);
  background: var(--accent-soft);
}

.search-submit:focus-visible,
.batch-toggle:focus-visible,
.search-filter-toggle:focus-visible,
.leader-home:focus-visible,
.category:focus-visible,
.nav-item:focus-visible,
.select-filters select:focus-visible,
.partial-label input:focus-visible,
.switch-label input:focus-visible + .switch {
  outline-color: var(--seineca-red);
}

main {
  padding: 25px var(--content-gutter) 18px;
}

.lookup-active {
  padding-top: 12px;
}

.lookup-active > .page-heading,
.lookup-active #filter-shelves {
  display: none;
}

.lookup-active .results-heading {
  padding-block: 12px;
}

.lookup-active .product-grid {
  padding: 12px;
}

.page-heading {
  margin-bottom: 20px;
}

.page-heading h1 {
  font-size: clamp(23px, 2.2vw, 32px);
}

.stat-card {
  padding-block: 14px;
}

.stat-card strong {
  color: var(--ink);
}

.stat-icon:not(.green) {
  background: var(--accent-soft);
  border-color: #f5dce1;
  color: var(--accent);
}

.search-card {
  margin-bottom: 17px;
  padding-top: 15px;
}

.search-card .section-heading {
  margin-bottom: 0;
}

.search-card .section-heading h2 svg {
  color: var(--accent);
}

.filters-row {
  margin-block: 11px;
}

.category,
.select-filters select,
.search-options,
.search-options > .text-btn,
.switch-label {
  color: #615459;
}

.select-filters select {
  border-color: #ddd2d4;
}

.category.active,
.view-toggle button.active {
  border-color: #efd0d6;
  background: var(--accent-soft);
  color: var(--accent);
}

.category:hover:not(.active) {
  background: #fff6f7;
}

.search-options {
  border-color: var(--line);
}

.code-scope {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.code-scope select {
  min-width: 124px;
  max-width: 200px;
  border: 1px solid #ddd2d4;
  border-radius: 7px;
  padding: 7px 8px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.match-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.match-reference {
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.matched-refs,
.ref-section {
  margin: 10px 0;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.matched-refs {
  background: var(--accent-soft);
  padding: 11px 13px;
}

.matched-refs h3 {
  margin: 0 0 7px;
  font-size: 13px;
  color: var(--accent);
}

.matched-ref + .matched-ref {
  margin-top: 8px;
}

.matched-ref small,
.ref-anchor {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.ref-section summary {
  cursor: pointer;
  padding: 10px 13px;
  font-size: 13px;
  font-weight: 700;
}

.ref-section summary span {
  margin-inline-start: 5px;
  color: var(--muted);
  font-weight: 400;
}

.ref-brand-group {
  padding: 9px 13px;
  border-top: 1px solid var(--line);
}

.ref-brand-group h4 {
  margin: 0 0 5px;
  font-size: 12px;
}

.ref-code-list {
  display: flex;
  flex-wrap: wrap;
}

.ref-code-list button {
  cursor: pointer;
}

.ref-code-list button:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.matched-ref a,
.ref-source-list a {
  color: var(--accent);
}

.matched-ref svg,
.ref-source-list svg {
  width: 11px;
  height: 11px;
  vertical-align: middle;
}

.ref-source-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  color: var(--muted);
  font-size: 10px;
}

.switch-label input:checked + .switch {
  background: var(--accent);
}

.results-heading {
  background: #fffcfb;
}

.results-heading > div > span,
.stat-card small,
.card-brand,
.card-tags {
  color: var(--muted);
}

.view-toggle {
  border-color: var(--line);
  background: #faf7f6;
}

.view-toggle button {
  color: var(--muted);
}

.count-pill {
  color: var(--accent);
  background: var(--accent-soft);
}

.product-card {
  border-color: var(--line);
}

.product-card:hover {
  border-color: #dcb5bf;
  box-shadow: 0 6px 18px rgb(73 25 36 / 6%);
}

.product-card h3,
.card-part {
  color: #625458;
}

.our-code,
.card-code-row > .our-code {
  color: var(--accent);
}

.card-price-stock {
  border-color: var(--line);
}

.card-price-stock > .price {
  color: var(--ink);
}

.card-detail {
  border-color: var(--line);
  color: var(--accent);
}

.card-detail:hover {
  background: #fff6f7;
  color: var(--accent-hover);
}

.product-photo.missing {
  background: #faf7f5;
  color: #9e8981;
}

.product-photo.missing > span {
  color: #6e5c56;
}

.filter-photo-branded:not(.missing)::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: clamp(46px, 30%, 92px);
  aspect-ratio: 4 / 1;
  border: 1px solid #eadfe0;
  border-radius: 5px;
  background: #fff url("brand/seineca.png") center / 88% auto no-repeat;
  pointer-events: none;
}

.product-photo.thumb.filter-photo-branded::after {
  top: 3px;
  right: 3px;
  width: 36px;
}

.detail-photo.filter-photo-branded::after {
  width: clamp(70px, 22%, 112px);
}

.detail-photo .photo-open {
  top: auto;
  bottom: 8px;
  right: 8px;
  font-size: 10px;
}

.detail-photo.missing :is(.photo-open, .photo-source-badge),
.product-photo.missing .photo-source-badge {
  display: none;
}

.reference-specs > summary {
  cursor: pointer;
  font-weight: 600;
}

.filter-image-dialog {
  width: min(920px, calc(100vw - 24px));
}

#filter-image-view {
  height: min(64dvh, 700px);
}

@media (max-width: 1150px) {
  :root {
    --sidebar-width: 202px;
    --content-gutter: 24px;
  }
}

@media (max-width: 800px) {
  :root {
    --topbar-height: 66px;
    --sidebar-width: 0px;
    --content-gutter: 18px;
  }

  .site-brands {
    gap: 12px;
  }

  .leader-home {
    width: 174px;
    height: 47px;
  }

  .seineca-logo,
  .cyclon-logo {
    width: 142px;
    height: 44px;
    padding: 6px 8px;
  }

  .cyclon-logo { padding: 0 3px; }

  .site-context #crumb {
    display: none;
  }

  .sidebar {
    top: auto;
    width: 100%;
    height: auto;
    padding: 8px var(--content-gutter);
    overflow: visible;
  }

  .sidebar nav {
    width: 100%;
    margin: 0;
  }

  .nav-item {
    justify-content: center;
    flex: 1;
    gap: 6px;
    min-width: 0;
    padding: 9px 6px;
    font-size: 11px;
    line-height: 1.35;
    text-align: center;
    white-space: normal;
  }

  .nav-item > svg {
    width: 15px;
    height: 15px;
  }

  .nav-item.active {
    box-shadow: none;
  }

  .search-toolbar-inner {
    padding-block: 10px;
  }

  main {
    padding-top: 20px;
  }
}

@media (max-width: 520px) {
  :root {
    --topbar-height: 61px;
    --content-gutter: 13px;
  }

  .site-brands {
    gap: 7px;
  }

  .leader-home {
    width: clamp(112px, 38vw, 173px);
    height: 43px;
  }

  .seineca-logo,
  .cyclon-logo {
    width: clamp(72px, 26vw, 128px);
    height: 36px;
    padding: 4px 6px;
  }

  .cyclon-logo {
    height: clamp(36px, 8.2vw, 42px);
    padding: 0 3px;
  }

  .site-context {
    display: none;
  }

  .nav-item {
    font-size: 9px;
  }

  .nav-item > svg {
    width: 13px;
    height: 13px;
  }

  .search-toolbar-inner {
    gap: 7px;
    padding-block: 8px;
  }

  .search-input-wrap input,
  .search-input-wrap textarea {
    font-size: 16px;
  }

  .search-submit,
  .batch-toggle,
  .search-filter-toggle {
    min-width: 40px;
    padding-inline: 8px;
    gap: 0;
    font-size: 0;
  }

  .search-filter-toggle span {
    display: none;
  }

  .lookup-active .results-heading {
    gap: 6px 10px;
  }

  .lookup-active .product-grid {
    gap: 8px;
    padding: 8px;
  }

  .lookup-active .product-card {
    display: grid;
    grid-template-columns: 30% minmax(0, 1fr);
  }

  .lookup-active .product-photo.card-photo {
    height: 100%;
    min-height: 114px;
    padding: 6px;
    border-bottom: 0;
    border-inline-end: 1px solid var(--line);
  }

  .lookup-active .product-photo.card-photo .photo-source-badge {
    white-space: normal;
  }

  .lookup-active .product-card-content {
    padding-top: 10px;
  }

  .category-tabs {
    width: 100%;
  }

  .select-filters select {
    font-size: 11px;
  }

  .stat-card {
    padding-block: 10px;
  }
}

#trade-link{white-space:nowrap}
@media(max-width:600px){#trade-link{white-space:normal;line-height:1.15;text-align:center;font-size:11px;max-width:75px}}
