/* ========== МЕНЮ ========== */
.restyle-menu {
  box-shadow: 2px 4px 16px rgba(0, 0, 0, 0.48);
  position: absolute;
  left: 0;
  width: 100%;
  background: white;
  top: 55px;
  display: none;
  z-index: 1000;
}

.restyle-menu.opened {
  display: block;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.restyle-menu a {
  margin: 0;
  padding: 0;
  color: unset;
  text-decoration: none;
  display: block;
  width: fit-content;
}

.restyle-menu a:hover {
  color: #9a2015;
}



.restyle-menu__wrapper {
  display: grid;
  grid-template-areas: "left-block right_block right_block right_block";
  grid-template-columns: repeat(4, 1fr);
  min-height: 711px;
  max-height: 1200px;
}

.restyle-menu__left-block {
  grid-area: left-block;
  border-right: 1px solid rgba(0, 0, 0, 0.17);
}

.restyle-menu__left-block-wrapper {
  padding: 10px 15px;
}

a.restyle-menu__left-block-item {
  margin: 5px 0;
  display: flex;
  align-items: center;
  font-size: 14px;
  padding: 10px 15px;
  font-weight: 700;
  width: 100%;
  text-transform: uppercase;
  cursor: pointer;
  transition: 0.25s;
}

a.restyle-menu__left-block-item:hover {
  background: #7a1a10 !important;
  color: white !important;
}

.restyle-menu__left-block-item .pict-wrap {
  margin-right: 10px;
}

.restyle-menu__left-block-item:hover .pict-wrap img {
  filter: brightness(0) invert(1);
  transition: 0.25s;
}

.restyle-menu__right-block {
  grid-area: right_block;
}

.restyle-menu__right-block-section {
  display: none;
}

.restyle-menu__right-block-section.cur {
  display: block;
  width: 100%;
}

.restyle-menu__right-block-wrapper {
  height: 100%;
  padding: 25px 15px 15px 25px;
  overflow-y: auto;
  max-height: calc(100vh - 120px);
}

a.restyle-menu__right-block-section-title {
  font-size: 24px;
  font-weight: 700;
  padding-bottom: 15px;
  text-transform: uppercase;
}

.restyle-menu__table {
  column-count: 3;
  column-gap: 15px;
}

.restyle-menu__section-2lvl {
  break-inside: avoid;
  page-break-inside: avoid;
  padding: 5px 0;
}

.restyle-menu__section-2lvl-title {
  font-weight: 700;
  padding-bottom: 8px;
}

.restyle-menu__section-2lvl-wrapper {
  padding-left: 8px;
}

a.restyle-menu__element {
  font-size: 13px !important;
  /*display: inline-block;*/
  margin: 4px 0;
  transition: color 0.2s ease, transform 0.2s ease;
}

a.restyle-menu__element:hover {
  color: #9a2015;
  transform: translateX(3px);
}

.restyle-menu hr {
  background: rgba(0, 0, 0, 0.17) !important;
}

.restyle-menu .restyle-menu__right-block-wrapper a {
  transition: 0.3s ease-out;
}

.restyle-menu__left-block-item .pict-wrap {
    width: 25px;
    height: 25px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.restyle-menu__left-block-item .pict-wrap img {
    width: 25px;
    height: 25px;
    object-fit: contain;
    display: block;
}


/* ========== АДАПТИВ ========== */
@media (min-width: 1280px) {
  .restyle-menu__table {
    column-count: 4;
  }
}

@media (max-width: 1024px) {
  .restyle-menu__wrapper {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .restyle-menu__table {
    column-count: 2;
  }
  
  .hsearch {
    width: 300px;
  }
}

@media (max-width: 768px) {
  .restyle-menu__wrapper {
    grid-template-columns: 1fr;
    grid-template-areas: "left-block" "right_block";
  }
  
  .restyle-menu__table {
    column-count: 1;
  }
  
  .hsearch {
    width: 100%;
  }
  
  .hrow {
    flex-direction: column;
  }
  
  .hcol._catalog-search {
    flex-wrap: wrap;
  }
  
  .dburger span {
    font-size: 11px;
  }
  
  a.restyle-menu__left-block-item {
    font-size: 12px;
    padding: 8px 12px;
  }
  
  a.restyle-menu__right-block-section-title {
    font-size: 18px;
  }
}

/* Для всех экранов, меньше 1200px */
@media (max-width: 1199px) {
    .restyle-menu {
        width: 100%;
        left: 0;
        right: 0;
        overflow-x: auto;  /* горизонтальная прокрутка, если не влезает */
    }
    .restyle-menu__wrapper {
        min-width: 600px;  /* чтобы не сжималось слишком сильно */
    }
}

@media (max-width: 1024px) {
    .restyle-menu__wrapper {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    .restyle-menu__table {
        column-count: 2 !important;
        column-gap: 12px;
    }
    .restyle-menu__right-block-wrapper {
        padding: 15px 10px 15px 15px;
    }
    a.restyle-menu__right-block-section-title {
        font-size: 20px;
    }
}