.brand-lamps {
  padding-top: 0;
}

.brand-lamps__finder {
  position: relative;
  z-index: 20;
  width: min(100%, 520px);
  margin-bottom: 16px;
}

.brand-lamps__finder-toggle {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  border: 1px solid #e3e3e3;
  border-radius: 16px;
  background: #ffffff;
  color: #252525;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.brand-lamps__finder-toggle:hover,
.brand-lamps__finder-toggle:focus-visible,
.brand-lamps__finder.is-open .brand-lamps__finder-toggle {
  border-color: #cfcfcf;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.brand-lamps__finder-toggle:focus-visible {
  outline: 2px solid #ed2e38;
  outline-offset: 2px;
}

.brand-lamps__finder-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-lamps__finder-chevron {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  margin: -5px 3px 0 0;
  border-right: 2px solid #252525;
  border-bottom: 2px solid #252525;
  transform: rotate(45deg);
  transition: transform 0.2s ease, margin 0.2s ease;
}

.brand-lamps__finder.is-open .brand-lamps__finder-chevron {
  margin-top: 5px;
  transform: rotate(225deg);
}

.brand-lamps__finder-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  overflow: hidden;
  border: 1px solid #e3e3e3;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.13);
}

.brand-lamps__finder-dropdown[hidden] {
  display: none;
}

.brand-lamps__finder-search {
  position: relative;
  padding: 12px;
  border-bottom: 1px solid #ededed;
  background: #ffffff;
}

.brand-lamps__finder-search-icon {
  position: absolute;
  top: 50%;
  left: 28px;
  width: 15px;
  height: 15px;
  border: 2px solid #8f8f8f;
  border-radius: 50%;
  transform: translateY(-58%);
  pointer-events: none;
}

.brand-lamps__finder-search-icon::after {
  position: absolute;
  right: -5px;
  bottom: -3px;
  width: 6px;
  height: 2px;
  border-radius: 2px;
  background: #8f8f8f;
  transform: rotate(45deg);
  content: '';
}

.brand-lamps__finder-input {
  width: 100%;
  height: 44px;
  padding: 0 40px 0 42px;
  border: 1px solid #e1e1e1;
  border-radius: 11px;
  background: #f8f8f8;
  color: #252525;
  font: inherit;
  font-size: 14px;
  line-height: 1.3;
  outline: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.brand-lamps__finder-input:focus {
  border-color: #bdbdbd;
  background: #ffffff;
}

.brand-lamps__finder-input::placeholder {
  color: #969696;
}

.brand-lamps__finder-options {
  max-height: 286px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #c8c8c8 transparent;
}

.brand-lamps__finder-options::-webkit-scrollbar {
  width: 7px;
}

.brand-lamps__finder-options::-webkit-scrollbar-thumb {
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #c8c8c8;
}

.brand-lamps__finder-option {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 14px 9px 18px;
  border: 0;
  border-bottom: 1px solid #f0f0f0;
  background: #ffffff;
  color: #252525;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.brand-lamps__finder-option:last-child {
  border-bottom: 0;
}

.brand-lamps__finder-option:hover,
.brand-lamps__finder-option:focus-visible {
  background: #f7f7f7;
  color: #ed2e38;
  outline: none;
}

.brand-lamps__finder-option[hidden] {
  display: none;
}

.brand-lamps__finder-option-count {
  min-width: 30px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f2f2f2;
  color: #777777;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}

.brand-lamps__finder-empty {
  padding: 18px;
  color: #8b8b8b;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}

.brand-lamps__finder-empty[hidden] {
  display: none;
}

.brand-lamps__summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.brand-lamps__summary span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 13px;
  border-radius: 999px;
  background: #ffffff;
  color: #646464;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.brand-lamps__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.brand-lamps__item {
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  scroll-margin-top: 110px;
  transition: box-shadow 0.25s ease;
}

.brand-lamps__item.is-open {
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.06);
}

.brand-lamps__item.is-highlighted,
.brand-lamps__item.is-open.is-highlighted {
  box-shadow: 0 0 0 2px rgba(237, 46, 56, 0.32), 0 14px 34px rgba(0, 0, 0, 0.06);
}

.brand-lamps__heading {
  margin: 0;
  font: inherit;
}

.brand-lamps__toggle {
  width: 100%;
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 22px;
  border: 0;
  border-radius: 24px;
  background: #ffffff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.25s ease;
}

.brand-lamps__toggle:hover,
.brand-lamps__toggle:focus-visible {
  background: #fafafa;
}

.brand-lamps__toggle:focus-visible {
  outline: 2px solid #ed2e38;
  outline-offset: -3px;
}

.brand-lamps__brand,
.brand-lamps__meta {
  display: flex;
  align-items: center;
}

.brand-lamps__brand {
  min-width: 0;
  gap: 16px;
}

.brand-lamps__logo {
  width: 132px;
  height: 54px;
  flex: 0 0 132px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 12px;
  background: #f5f5f5;
}

.brand-lamps__logo img {
  width: 100%;
  height: 100%;
  padding: 8px 12px;
  object-fit: contain;
}

.brand-lamps__logo--text {
  color: #ed2e38;
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
}

.brand-lamps__name {
  overflow: hidden;
  color: #252525;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.brand-lamps__meta {
  flex: 0 0 auto;
  gap: 18px;
}

.brand-lamps__count {
  min-width: 86px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f3f3f3;
  color: #646464;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}

.brand-lamps__arrow {
  width: 14px;
  height: 14px;
  margin-right: 4px;
  border-right: 2px solid #252525;
  border-bottom: 2px solid #252525;
  transform: rotate(45deg) translate(-2px, -2px);
  transform-origin: center;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.brand-lamps__item.is-open .brand-lamps__arrow {
  border-color: #ed2e38;
  transform: rotate(225deg) translate(-2px, -2px);
}

.brand-lamps__panel-inner {
  padding: 4px 18px 24px;
}

.brand-lamps__products {
  overflow: hidden;
  border: 1px solid #ededed;
  border-radius: 16px;
}

.brand-lamps__products-head,
.brand-lamps__product-row {
  display: grid;
  grid-template-columns: minmax(300px, 2.2fr) minmax(120px, 0.8fr) minmax(110px, 0.75fr) minmax(150px, 1fr) 104px;
  align-items: center;
  column-gap: 18px;
}

.brand-lamps__products-head {
  min-height: 42px;
  padding: 0 16px;
  background: #f7f7f7;
  color: #8a8a8a;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.brand-lamps__product-row {
  min-height: 76px;
  padding: 10px 16px;
  border-top: 1px solid #ededed;
  background: #ffffff;
  transition: background-color 0.2s ease;
}

.brand-lamps__product-row:hover {
  background: #fcfcfc;
}

.brand-lamps__product-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-lamps__product-image {
  width: 70px;
  height: 52px;
  flex: 0 0 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px;
  background: #f5f5f5;
  color: #a0a0a0;
  font-size: 13px;
  font-weight: 700;
}

.brand-lamps__product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-lamps__product-title {
  min-width: 0;
  color: #252525;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
}

.brand-lamps__product-title:hover {
  color: #ed2e38;
}

.brand-lamps__product-cell {
  min-width: 0;
  color: #4d4d4d;
  font-size: 14px;
  line-height: 1.35;
}

.brand-lamps__product-price {
  color: #252525;
  font-weight: 600;
  white-space: nowrap;
}

.brand-lamps__muted {
  color: #a0a0a0;
}

.brand-lamps__stock {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #646464;
  font-size: 13px;
  line-height: 1.35;
}

.brand-lamps__stock::before {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #a7a7a7;
  content: '';
}

.brand-lamps__stock.is-available::before {
  background: #48a868;
}

.brand-lamps__stock.is-unavailable::before {
  background: #d95b5b;
}

.brand-lamps__stock.is-order::before {
  background: #d39a38;
}

.brand-lamps__product-action {
  display: flex;
  justify-content: flex-end;
}

.brand-lamps__details {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #ed2e38;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
}

.brand-lamps__details:hover span:first-child {
  text-decoration: underline;
}

.brand-lamps__footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 20px;
}

@media (max-width: 1100px) {
  .brand-lamps__products-head,
  .brand-lamps__product-row {
    grid-template-columns: minmax(260px, 2fr) minmax(105px, 0.75fr) minmax(100px, 0.7fr) minmax(135px, 0.9fr) 34px;
    column-gap: 12px;
  }

  .brand-lamps__details span:first-child {
    display: none;
  }

  .brand-lamps__details span:last-child {
    font-size: 20px;
  }
}

@media (max-width: 767px) {
  .brand-lamps__finder {
    width: 100%;
    margin-bottom: 12px;
  }

  .brand-lamps__finder-toggle {
    min-height: 52px;
    padding: 0 16px;
    border-radius: 14px;
    font-size: 14px;
  }

  .brand-lamps__finder-dropdown {
    border-radius: 14px;
  }

  .brand-lamps__finder-options {
    max-height: 248px;
  }

  .brand-lamps__summary {
    margin-bottom: 12px;
  }

  .brand-lamps__item,
  .brand-lamps__toggle {
    border-radius: 18px;
  }

  .brand-lamps__toggle {
    min-height: 72px;
    gap: 12px;
    padding: 10px 14px;
  }

  .brand-lamps__brand {
    gap: 10px;
  }

  .brand-lamps__logo {
    width: 74px;
    height: 46px;
    flex-basis: 74px;
    border-radius: 10px;
  }

  .brand-lamps__logo img {
    padding: 6px 8px;
  }

  .brand-lamps__name {
    font-size: 17px;
  }

  .brand-lamps__meta {
    gap: 10px;
  }

  .brand-lamps__count {
    min-width: 0;
    padding: 7px 9px;
    font-size: 12px;
  }

  .brand-lamps__arrow {
    width: 11px;
    height: 11px;
    margin-right: 2px;
  }

  .brand-lamps__panel-inner {
    padding: 2px 10px 18px;
  }

  .brand-lamps__products {
    border-radius: 12px;
  }

  .brand-lamps__products-head {
    display: none;
  }

  .brand-lamps__product-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    min-height: 0;
    padding: 13px 12px;
  }

  .brand-lamps__product-row:first-of-type {
    border-top: 0;
  }

  .brand-lamps__product-main {
    grid-column: 1 / -1;
  }

  .brand-lamps__product-image {
    width: 58px;
    height: 44px;
    flex-basis: 58px;
  }

  .brand-lamps__product-title {
    font-size: 14px;
  }

  .brand-lamps__product-cell {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 12px;
  }

  .brand-lamps__product-cell::before {
    color: #929292;
    font-size: 11px;
    font-weight: 500;
    content: attr(data-label) ':';
  }

  .brand-lamps__product-sku,
  .brand-lamps__product-price {
    grid-column: 1;
  }

  .brand-lamps__product-stock {
    grid-column: 1 / -1;
  }

  .brand-lamps__stock {
    font-size: 12px;
  }

  .brand-lamps__product-action {
    grid-column: 2;
    grid-row: 2 / span 2;
    align-self: center;
  }

  .brand-lamps__details span:first-child {
    display: inline;
  }

  .brand-lamps__details span:last-child {
    font-size: 14px;
  }

  .brand-lamps__footer {
    justify-content: stretch;
    padding: 14px 2px 0;
  }

  .brand-lamps__footer .btn {
    width: 100%;
  }
}

@media (max-width: 479px) {
  .brand-lamps__logo {
    width: 54px;
    flex-basis: 54px;
  }

  .brand-lamps__count {
    max-width: 66px;
    white-space: normal;
  }

  .brand-lamps__product-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .brand-lamps__product-action {
    grid-column: 1;
    grid-row: auto;
    justify-content: flex-start;
    padding-top: 2px;
  }
}

/* Ленивое получение строк ламп */
.brand-lamps__loading,
.brand-lamps__load-error {
  min-height: 116px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px 20px;
  border-radius: 16px;
  background: #f8f8f8;
  color: #686868;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
}

.brand-lamps__spinner {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border: 2px solid #d7d7d7;
  border-top-color: #ed2e38;
  border-radius: 50%;
  animation: uvl-brand-lamps-spin 0.75s linear infinite;
}

.brand-lamps__load-error {
  flex-direction: column;
  color: #555555;
}

.brand-lamps__retry {
  min-height: 38px;
  padding: 7px 18px;
  border: 1px solid #d7d7d7;
  border-radius: 999px;
  background: #ffffff;
  color: #252525;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.brand-lamps__retry:hover,
.brand-lamps__retry:focus-visible {
  border-color: #ed2e38;
  color: #ed2e38;
  outline: none;
}

@keyframes uvl-brand-lamps-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Разделение оригинальных карточек, дублей и товаров без бренда. */
.brand-lamps__item--unbranded {
  margin-top: 24px;
  border: 1px dashed #d8d8d8;
}

.brand-lamps__item--unbranded .brand-lamps__logo {
  background: #eeeeee;
  color: #777777;
}

.brand-lamps__product-section + .brand-lamps__product-section {
  margin-top: 24px;
}

.brand-lamps__section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 2px 10px;
  color: #252525;
}

.brand-lamps__section-title > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.brand-lamps__section-title strong {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.brand-lamps__section-title small {
  color: #858585;
  font-size: 12px;
  line-height: 1.4;
}

.brand-lamps__section-title > span {
  min-width: 34px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f1f1f1;
  color: #696969;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.brand-lamps__product-section--duplicates {
  padding-top: 20px;
  border-top: 1px solid #ededed;
}

.brand-lamps__product-section--duplicates .brand-lamps__section-title strong {
  color: #9b363b;
}

.brand-lamps__products--duplicates {
  border-color: #ecd9da;
}

.brand-lamps__products--duplicates .brand-lamps__products-head {
  background: #fbf4f4;
}

.brand-lamps__product-row--duplicate,
.brand-lamps__product-row--duplicate:hover {
  background: #fffafa;
}

.brand-lamps__product-name-wrap {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 9px;
}

.brand-lamps__duplicate-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f7e5e6;
  color: #9b363b;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (max-width: 767px) {
  .brand-lamps__item--unbranded {
    margin-top: 18px;
  }

  .brand-lamps__product-section + .brand-lamps__product-section {
    margin-top: 18px;
  }

  .brand-lamps__product-section--duplicates {
    padding-top: 16px;
  }

  .brand-lamps__section-title {
    align-items: flex-start;
    margin-bottom: 8px;
  }

  .brand-lamps__section-title strong {
    font-size: 14px;
  }
}

.brand-lamps__product-name-wrap { flex: 1 1 auto; }
