header .mainbar .ru-catalog-mega .extend img.ru-catalog-menu-photo { object-fit: cover; filter: none; }
header .mainbar .ru-catalog-mega .extend img.ru-reference-uncropped { object-fit: contain; background: #fff; }

@media (min-width: 992px) {
  header .mainbar .ru-catalog-mega > .extend > .container > .row > ul {
    display: grid;
    grid-template-columns: repeat(5,minmax(0,1fr));
    grid-template-rows: repeat(2,148px);
    gap: 8px;
    margin: 0;
  }
  header .mainbar .ru-catalog-mega:is(:hover,:focus-within) > .extend { visibility: visible; opacity: 1; }
  header .mainbar .ru-catalog-mega:hover > .extend { z-index: 11; }
  header .mainbar .ru-catalog-mega:is(:hover,:focus-within) > .extend > .container > .row > ul {
    max-height: 338px;
    padding-block: 16px 18px;
  }
  header .mainbar .ru-catalog-mega > .extend ul > li { width: auto; padding: 0; min-width: 0; float: none; }
  header .mainbar .ru-catalog-mega > .extend ul > li > a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    float: none;
    height: 100%;
    margin: 0;
    padding: 6px 10px;
    overflow: visible;
  }
  header .mainbar .ru-catalog-mega > .extend ul > li > a:is(:hover,:focus-visible) { border-color: #f7941d; }
  header .mainbar .ru-catalog-mega .extend img.ru-catalog-menu-photo {
    flex: 0 0 auto;
    float: none;
    width: 90px;
    height: auto;
    aspect-ratio: 120/78;
    border-radius: 4px;
  }
  header .mainbar .ru-catalog-mega .extend ul > li > a > img + span {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    float: none;
    padding: 0;
    font-size: 14px;
    line-height: 1.13;
    text-align: center;
    overflow-wrap: anywhere;
  }
}

@media (min-width: 1200px) {
  header .mainbar .ru-catalog-mega .extend img.ru-catalog-menu-photo { width: 120px; }
}

