/* Boutte catalog megamenu — ported from old boutte.ru vertical menu */

.boutte-catalog-menu {
  position: relative;
  align-self: flex-start;
}

.boutte-catalog-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f28332;
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: bold;
  text-transform: uppercase;
  cursor: pointer;
}

.boutte-catalog-toggle:hover {
  background: #d96d1e;
  color: #fff;
}

.boutte-burger {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.boutte-burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
}

/* dropdown list */
.boutte-catalog-list {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 280px;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-top: 3px solid #f28332;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  list-style: none;
  margin: 0;
  padding: 0;
  z-index: 1000;
}

.boutte-cat-root {
  position: relative;
  border-bottom: 1px solid #f1f1f1;
}

.boutte-cat-root:last-child {
  border-bottom: none;
}

.boutte-cat-root > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 16px;
  color: #444;
  text-decoration: none;
}

.boutte-cat-root > a:hover {
  color: #f28332;
  background: #faf6f2;
  text-decoration: none;
}

.boutte-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #999;
}

/* submenu (megamenu panel) */
.boutte-submenu {
  display: none;
  position: absolute;
  top: 0;
  left: 100%;
  width: 540px;
  max-width: 80vw;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-top: 3px solid #f28332;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  z-index: 1001;
}

@media (hover: hover) {
  .boutte-cat-root.has-sub:hover > .boutte-submenu {
    display: block;
  }
}

.boutte-cat-root.has-sub.open > .boutte-submenu {
  display: block;
}

.boutte-submenu-inner {
  display: flex;
  gap: 0;
}

.boutte-submenu-links {
  flex: 1 1 60%;
  padding: 14px 8px;
}

.boutte-submenu-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 10px;
}

.boutte-submenu-links li a {
  display: block;
  padding: 6px 12px;
  color: #444;
  text-decoration: none;
  font-size: 13px;
}

.boutte-submenu-links li a:hover {
  color: #f28332;
  text-decoration: none;
}

.boutte-submenu-banner {
  flex: 0 0 40%;
  border-left: 1px solid #f1f1f1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.boutte-submenu-banner img {
  max-width: 100%;
  height: auto;
}

/* mobile: dropdown becomes static, full width */
@media (max-width: 767px) {
  .boutte-catalog-list {
    position: static;
    box-shadow: none;
  }

  .boutte-submenu {
    position: static;
    width: auto;
    max-width: none;
    box-shadow: none;
    border: none;
    border-top: 1px solid #f1f1f1;
  }

  .boutte-submenu-inner {
    flex-direction: column;
  }

  .boutte-submenu-banner {
    border-left: none;
  }
}

/* размещение: кнопка в один ряд с горизонтальным меню, слева от него */
#header .header-top-right {
  display: flex;
  align-items: center;
}

#header .header-top-right .boutte-catalog-menu {
  order: -1;
  margin-right: 24px;
}

#header .header-top-right .menu {
  margin-left: 0;
}

@media (max-width: 767px) {
  #header .header-top-right {
    display: block;
  }
  #header .header-top-right .boutte-catalog-menu {
    order: initial;
    margin: 10px 0;
  }
}
