.product-selector {
  --selector-ink: #1b3026;
  --selector-muted: #52675c;
  --selector-green: #087147;
  --selector-line: #dce7e1;
  --selector-soft: #f3f8f5;
  --selector-white: #fff;
  padding-block: 28px 54px;
  color: var(--selector-ink);
}

.product-selector-heading h1 {
  margin: 0 0 20px;
  font-size: clamp(25px, 4vw, 37px);
  font-weight: 700;
  line-height: 1.18;
}

.product-selector-layout {
  display: grid;
  grid-template-columns: minmax(220px, 255px) minmax(0, 1fr);
  align-items: start;
  gap: 22px;
}

.product-selector-sidebar,
.product-selector-content {
  min-width: 0;
}

.product-selector-filters {
  border: 1px solid var(--selector-line);
  border-radius: 9px;
  background: var(--selector-white);
}

.product-selector-filters summary {
  padding: 13px 15px;
  border-radius: 8px;
  background: var(--selector-soft);
  color: var(--selector-ink);
  font-weight: 700;
  cursor: pointer;
}

.product-selector-filters summary::marker {
  color: var(--selector-green);
}

.product-selector-form {
  display: grid;
  gap: 13px;
  padding: 15px;
  border-top: 1px solid var(--selector-line);
}

.product-selector-form .filter-group {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.product-selector-form .filter-group[hidden] {
  display: none;
}

.product-selector-form .filter-group label {
  display: block;
  color: var(--selector-muted);
  font-size: 14px;
  font-weight: 600;
}

.product-selector-form :is(input, select) {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 6px 12px;
  border: 1px solid #bed0c6;
  border-radius: 6px;
  background: var(--selector-white);
  color: var(--selector-ink);
  font: inherit;
}

.product-selector-select {
  position: relative;
  display: block;
}

.product-selector-select select {
  display: block;
  appearance: none;
  padding-inline-end: 34px;
}

.product-selector-select::after {
  position: absolute;
  top: 50%;
  inset-inline-end: 14px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--selector-muted);
  border-bottom: 1.5px solid var(--selector-muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
  content: "";
}

@media (forced-colors: active) {
  .product-selector-select select {
    appearance: auto;
    padding-inline-end: 12px;
  }

  .product-selector-select::after {
    display: none;
  }
}

.product-selector-form :is(input, select):focus-visible,
.product-selector-expand:focus-visible,
.product-selector-filters summary:focus-visible {
  outline: 2px solid var(--selector-green);
  outline-offset: 2px;
}

.product-selector-form .param-value-group {
  align-items: end;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.product-selector-form .param-value-group:not(.product-selector-range) {
  grid-template-columns: minmax(0, 1fr);
}

.product-selector-form .param-sep {
  align-self: end;
  padding-block-end: 10px;
  color: var(--selector-muted);
}

.product-selector-form .search-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  margin-top: 1px;
  padding: 6px 10px;
  border: 0;
  border-radius: 6px;
  background: var(--selector-green);
  color: var(--selector-white);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.product-selector-form .search-submit-btn:hover {
  background: #05603d;
}

.product-selector-linear {
  min-width: 0;
  margin: 0;
  padding: 10px 0 0;
  border: 0;
  border-top: 1px solid var(--selector-line);
}

.product-selector-linear[hidden],
.product-selector-linear-range[hidden] {
  display: none;
}

.product-selector-linear legend {
  padding-inline-end: 7px;
  color: var(--selector-ink);
  font-size: 14px;
  font-weight: 700;
}

.product-selector-linear-range + .product-selector-linear-range {
  margin-top: 10px;
}

.product-selector-linear-label {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 4px;
  color: var(--selector-muted);
  font-size: 13px;
  font-weight: 600;
}

.product-selector-linear-label small {
  font-weight: 500;
  white-space: nowrap;
}

.product-selector-linear-bounds {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.product-selector-linear-bounds [aria-invalid="true"] {
  border-color: #b74136;
}

.product-selector-linear-error,
.product-selector-search-error {
  color: #9c3025;
  line-height: 1.45;
}

.product-selector-linear-error {
  margin: 4px 0 0;
  font-size: 12px;
}

.product-selector-search-error {
  margin: 0;
  padding: 12px;
  border: 1px solid #e2b8b1;
  border-radius: 6px;
  background: #fff6f4;
}

.product-selector-applied {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 11px;
}

.product-selector-chip,
.product-selector-clear {
  min-height: 34px;
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--selector-green);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.product-selector-chip {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--selector-line);
  background: var(--selector-soft);
}

.product-selector-clear {
  border: 1px solid transparent;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.product-selector .search-results-header {
  padding: 2px 0 11px;
  border: 0;
}

.product-selector .search-results-header .result-summary strong {
  font-size: 17px;
  margin: 0 2px;
}

.product-selector-results {
  overflow-x: auto;
  border: 1px solid var(--selector-line);
  border-radius: 9px;
}

.product-selector-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: start;
  white-space: normal;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.product-selector-table :is(th, td) {
  padding: 8px 10px;
  border-block-end: 1px solid var(--selector-line);
  text-align: start;
  line-height: 1.35;
  vertical-align: middle;
}

.product-selector-table thead th {
  padding-block: 12px;
  background: var(--selector-soft);
  color: var(--selector-ink);
  font-weight: 700;
}

.product-selector-table thead th:first-child {
  border-start-start-radius: 8px;
}

.product-selector-table thead th:last-child {
  border-start-end-radius: 8px;
}

.product-selector-table thead small {
  color: var(--selector-muted);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.product-selector-table .product-selector-value {
  text-align: end;
}

.product-selector-table tbody td.product-selector-value {
  white-space: nowrap;
}

.product-selector-table tr:last-child td,
.product-selector-table tr:nth-last-child(2):not(:has(+ tr:not([hidden]))) > * {
  border-bottom: 0;
}

.product-selector-table [data-product-selector-row]:has(+ tr:not([hidden])) {
  background: var(--selector-soft);
}

.product-selector-part-link,
.product-selector-detail-link {
  color: var(--selector-green);
  font-weight: 700;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.product-selector-part-link:hover,
.product-selector-detail-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.product-selector-mobile-specs {
  display: none;
}

.product-selector-match,
.product-selector-match-detail {
  display: block;
  margin-top: 3px;
  color: var(--selector-muted);
  font-size: 12px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.product-selector-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.product-selector-row-actions .model-compare-toggle {
  min-height: 35px;
  padding: 5px 8px;
  font-size: 13px;
  white-space: nowrap;
}

.product-selector-expand {
  display: inline-grid;
  place-items: center;
  min-width: 35px;
  min-height: 35px;
  padding: 0;
  border: 1px solid var(--selector-line);
  border-radius: 6px;
  background: var(--selector-white);
  color: var(--selector-green);
  cursor: pointer;
}

.product-selector-expand[aria-expanded="true"],
.product-selector-expand:hover {
  border-color: var(--selector-green);
  background: var(--selector-soft);
}

.product-selector-expand[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.product-selector-table [hidden] {
  display: none !important;
}

.product-selector-table [data-product-selector-details] > td {
  padding: 0;
  background: #fbfdfc;
}

.product-selector-detail {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 15px 13px;
}

.product-selector-detail img {
  flex-shrink: 0;
  width: 136px;
  height: 94px;
  object-fit: contain;
  border: 1px solid var(--selector-line);
  border-radius: 6px;
  background: var(--selector-white);
}

.product-selector-detail-body {
  flex: 1;
  min-width: 0;
}

.product-selector-detail-title {
  margin: 0;
  color: var(--selector-ink);
  font-size: 15px;
  font-weight: 700;
}

.product-selector-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr));
  gap: 7px 16px;
  margin: 8px 0 9px;
}

.product-selector-specs > div {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 3px;
  padding-block: 4px 7px;
  border-block-end: 1px solid var(--selector-line);
}

.product-selector-specs dt {
  color: var(--selector-muted);
  font-size: 13px;
  font-weight: 500;
}

.product-selector-specs dd {
  margin: 0;
  color: var(--selector-ink);
  font-size: 15px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.product-selector-detail-link {
  display: inline-block;
  padding-block: 6px;
}

.product-selector-work-points {
  padding-block: 5px 7px;
  color: var(--selector-muted);
  font-size: 13px;
}

.product-selector-work-points ul {
  margin: 4px 0 0;
  padding-inline-start: 18px;
}

.product-selector-work-points li + li {
  margin-block-start: 3px;
}

.product-selector-work-points bdi {
  margin-inline: 3px 8px;
  color: var(--selector-ink);
  font-weight: 650;
}

.product-selector-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 1000px) {
  .product-selector-layout {
    grid-template-columns: minmax(185px, 220px) minmax(0, 1fr);
    gap: 16px;
  }

  .product-selector-table :is(th, td) {
    padding-inline: 5px;
  }
}

@media (max-width: 850px) {
  .product-selector-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  .product-selector {
    padding-block: 17px 30px;
  }

  .product-selector-heading h1 {
    margin-bottom: 12px;
  }

  .product-selector-table .product-selector-value {
    display: none;
  }

  .product-selector-table [data-product-selector-row] > :first-child {
    padding-inline-start: 10px;
  }

  .product-selector-mobile-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 10px;
    margin-top: 4px;
    color: var(--selector-muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
  }

  .product-selector-mobile-specs bdi {
    color: var(--selector-ink);
    font-weight: 650;
    white-space: nowrap;
  }

  .product-selector-detail {
    flex-direction: column;
    gap: 9px;
  }

  .product-selector-detail img {
    width: 106px;
    height: 72px;
  }

  .product-selector-detail-body {
    width: 100%;
  }
}

@media (pointer: coarse) {
  .product-selector-expand,
  .product-selector-row-actions .model-compare-toggle {
    min-height: 44px;
  }

  .product-selector-expand {
    min-width: 44px;
  }
}
