/* ============================================================
   xl-mm.css — компактный mega-menu (без обрезки на низких экранах)
   ============================================================ */

:root {
  --xl-mm-accent: #ff6a00;
  --xl-mm-text: #171513;
  --xl-mm-muted: #6f6a64;
  --xl-mm-line: #eadfd3;
  --xl-mm-bg: #fff;
  --xl-mm-soft: #f7f2ea;
  --xl-mm-rail: 230px;
  --xl-mm-radius: 12px;
  --xl-mm-shadow: 0 14px 36px rgba(23, 21, 19, 0.14);
}

/* панель целиком вписывается в экран */
body.xl-redesign .xl-nav__panel.xlopni-nav__container_visible,
body.xl-redesign .xlopni-nav__container.xl-nav__panel.xlopni-nav__container_visible {
  max-height: calc(100vh - var(--xl-header-offset, 160px) - 8px) !important;
  overflow: hidden !important;
}

body.xl-redesign .xl-nav__panel-inner.xl-mm {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  max-width: var(--xl-shell-max, 1360px) !important;
  max-height: calc(100vh - var(--xl-header-offset, 160px) - 8px) !important;
  margin: 0 auto !important;
  padding: 0 !important;
  background: var(--xl-mm-bg) !important;
  border: 1px solid rgba(23, 21, 19, 0.06) !important;
  border-radius: 0 0 16px 16px !important;
  box-shadow: var(--xl-mm-shadow) !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
body.xl-redesign .xl-nav__panel-inner.xl-mm::before { display: none !important; }
body.xl-redesign .xl-mm .xl-nav__head { display: none !important; }

body.xl-redesign .xl-mm__close {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  z-index: 6 !important;
  width: 36px !important;
  height: 36px !important;
  border: 1px solid #d4ccc2 !important;
  border-radius: 50% !important;
  background: #fff !important;
  box-shadow: 0 2px 10px rgba(23, 21, 19, 0.1) !important;
  display: inline-grid !important;
  place-items: center !important;
  cursor: pointer !important;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease !important;
}
body.xl-redesign .xl-mm__close:hover {
  background: #fff7f2 !important;
  border-color: var(--xl-mm-accent) !important;
  box-shadow: 0 4px 14px rgba(255, 106, 0, 0.18) !important;
}
body.xl-redesign .xl-mm__close img {
  width: 16px !important;
  height: 16px !important;
  opacity: 1 !important;
  filter: brightness(0) saturate(100%) !important;
}

body.xl-redesign .xl-mm__body {
  display: grid !important;
  grid-template-columns: var(--xl-mm-rail) minmax(0, 1fr) !important;
  gap: 0 !important;
  align-items: stretch !important;
  min-height: 0 !important;
  flex: 1 1 auto !important;
  overflow: hidden !important;
}

/* ---------- Left rail ---------- */
body.xl-redesign .xl-mm__rail {
  padding: 12px 10px 10px !important;
  background: #fbf8f4 !important;
  border-right: 1px solid var(--xl-mm-line) !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
}
body.xl-redesign .xl-mm__filters {
  display: grid !important;
  gap: 2px !important;
  margin: 0 0 8px !important;
  padding: 0 0 8px !important;
  border-bottom: 1px solid var(--xl-mm-line) !important;
}
body.xl-redesign .xl-mm__filter {
  display: grid !important;
  grid-template-columns: 18px 1fr 10px !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 0 !important;
  padding: 6px 8px !important;
  border-radius: 8px !important;
  color: var(--xl-mm-text) !important;
  text-decoration: none !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
}
body.xl-redesign .xl-mm__filter img {
  width: 18px !important;
  height: 18px !important;
  object-fit: contain !important;
}
body.xl-redesign .xl-mm__filter i {
  color: #b0a89f !important;
  font-style: normal !important;
  font-size: 14px !important;
}
body.xl-redesign .xl-mm__filter:hover {
  background: #fff !important;
  color: var(--xl-mm-accent) !important;
}

body.xl-redesign .xl-mm__label {
  margin: 0 0 4px !important;
  padding: 0 8px !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: #9a928a !important;
}

body.xl-redesign .xl-mm__cats {
  display: grid !important;
  gap: 1px !important;
  margin: 0 0 8px !important;
}
body.xl-redesign .xl-mm__cat {
  display: grid !important;
  grid-template-columns: 22px 1fr 10px !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 5px 8px !important;
  border-radius: 8px !important;
  border: 1px solid transparent !important;
  text-decoration: none !important;
  color: var(--xl-mm-text) !important;
  transition: background .12s ease, border-color .12s ease, color .12s ease !important;
}
body.xl-redesign .xl-mm__cat-ico {
  width: 20px !important;
  height: 20px !important;
  object-fit: contain !important;
}
body.xl-redesign .xl-mm__cat-txt {
  display: grid !important;
  gap: 0 !important;
  min-width: 0 !important;
}
body.xl-redesign .xl-mm__cat-txt strong {
  font-size: 12.5px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
}
/* подписи в rail убираем — дают лишнюю высоту */
body.xl-redesign .xl-mm__cat-txt em {
  display: none !important;
}
body.xl-redesign .xl-mm__cat i {
  color: #b0a89f !important;
  font-style: normal !important;
  font-size: 14px !important;
}
body.xl-redesign .xl-mm__cat:hover,
body.xl-redesign .xl-mm__cat.is-active {
  background: #fff !important;
  border-color: rgba(255, 106, 0, 0.28) !important;
  color: var(--xl-mm-accent) !important;
}

body.xl-redesign .xl-mm__deal {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 10px !important;
  border-radius: 10px !important;
  background: #fff1ed !important;
  border: 1px solid #ffd4c2 !important;
  text-decoration: none !important;
  color: var(--xl-mm-text) !important;
}
body.xl-redesign .xl-mm__deal img {
  width: 16px !important;
  height: 16px !important;
  flex: 0 0 16px !important;
  filter: invert(48%) sepia(79%) saturate(2476%) hue-rotate(360deg) brightness(102%) contrast(105%);
}
body.xl-redesign .xl-mm__deal strong {
  display: block !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  color: #c2410c !important;
  line-height: 1.2 !important;
}
body.xl-redesign .xl-mm__deal em {
  display: none !important;
}
body.xl-redesign .xl-mm__deal:hover { background: #ffe8e0 !important; }

/* ---------- Main ---------- */
body.xl-redesign .xl-mm__main {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  padding: 16px 52px 14px 20px !important; /* справа запас под кнопку закрытия */
  min-width: 0 !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  box-sizing: border-box !important;
}
body.xl-redesign .xl-mm__popular {
  margin: 0 0 14px !important;
  padding: 0 0 14px !important;
  border-bottom: 1px solid var(--xl-mm-line) !important;
}
body.xl-redesign .xl-mm__sec-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin: 0 0 10px !important;
  min-height: 24px !important;
}
body.xl-redesign .xl-mm__title {
  margin: 0 0 8px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  color: #8a847c !important;
  line-height: 1.2 !important;
}
body.xl-redesign .xl-mm__sec-head .xl-mm__title {
  margin: 0 !important;
  font-size: 13px !important;
  letter-spacing: -0.01em !important;
  text-transform: none !important;
  color: var(--xl-mm-text) !important;
}
body.xl-redesign .xl-mm__all {
  color: var(--xl-mm-accent) !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  margin-right: 8px !important; /* не наезжает на close */
}
body.xl-redesign .xl-mm__all:hover {
  color: #e85a00 !important;
  text-decoration: none !important;
}

body.xl-redesign .xl-mm__cards {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin: 0 !important;
}
body.xl-redesign .xl-mm__card {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  padding: 8px 6px 8px !important;
  border-radius: var(--xl-mm-radius) !important;
  border: 1px solid var(--xl-mm-line) !important;
  background: linear-gradient(180deg, #fffaf4 0%, #fff 70%) !important;
  text-decoration: none !important;
  color: var(--xl-mm-text) !important;
  box-shadow: none !important;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease !important;
}
body.xl-redesign .xl-mm__card:hover {
  transform: translateY(-2px) !important;
  border-color: rgba(255, 106, 0, 0.35) !important;
  box-shadow: 0 8px 18px rgba(39, 27, 17, 0.08) !important;
}
body.xl-redesign .xl-mm__card-media {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 56px !important;
  margin: 0 0 6px !important;
  border-radius: 8px !important;
  background: #f4efe8 !important;
}
body.xl-redesign .xl-mm__card-media img {
  max-width: 64px !important;
  max-height: 50px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}
body.xl-redesign .xl-mm__card strong {
  display: block !important;
  margin: 0 0 1px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
}
body.xl-redesign .xl-mm__card > span {
  font-size: 10.5px !important;
  font-weight: 600 !important;
  color: var(--xl-mm-muted) !important;
  line-height: 1.2 !important;
}

body.xl-redesign .xl-mm__cols {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 16px 28px !important;
  align-items: start !important;
  margin: 0 !important;
  padding: 0 !important;
}
body.xl-redesign .xl-mm__col {
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
body.xl-redesign .xl-mm__col .xl-mm__title {
  margin: 0 0 8px !important;
  padding: 0 0 8px !important;
  border-bottom: 1px solid var(--xl-mm-line) !important;
}
body.xl-redesign .xl-mm__col--promo {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100% !important;
}
body.xl-redesign .xl-mm__links {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
body.xl-redesign .xl-mm__links li {
  margin: 0 !important;
  padding: 0 !important;
}
body.xl-redesign .xl-mm__links a {
  display: block !important;
  padding: 5px 0 !important;
  border-bottom: 0 !important;
  color: var(--xl-mm-text) !important;
  text-decoration: none !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  transition: color .12s ease, transform .12s ease !important;
}
body.xl-redesign .xl-mm__links a:link,
body.xl-redesign .xl-mm__links a:visited {
  color: var(--xl-mm-text) !important;
}
body.xl-redesign .xl-mm__links a:hover {
  color: var(--xl-mm-accent) !important;
  transform: translateX(2px) !important;
  padding-left: 0 !important;
}

body.xl-redesign .xl-mm__promo {
  display: block !important;
  margin-top: 14px !important;
  padding: 14px 14px !important;
  border-radius: 12px !important;
  text-decoration: none !important;
  color: #fff !important;
  background:
    linear-gradient(135deg, rgba(18, 16, 14, 0.92), rgba(18, 16, 14, 0.68)),
    url("../img/hero-fireworks.jpg") center/cover !important;
  box-shadow: 0 8px 20px rgba(23, 21, 19, 0.16) !important;
  transition: transform .15s ease !important;
}
body.xl-redesign .xl-mm__promo:hover { transform: translateY(-1px) !important; }
body.xl-redesign .xl-mm__promo-kicker {
  display: block !important;
  margin: 0 0 4px !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  color: rgba(255, 255, 255, 0.7) !important;
}
body.xl-redesign .xl-mm__promo strong {
  display: block !important;
  margin: 0 0 8px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  color: #fff !important;
}
body.xl-redesign .xl-mm__promo-cta {
  display: inline-flex !important;
  align-items: center !important;
  height: 28px !important;
  padding: 0 10px !important;
  border-radius: 999px !important;
  background: var(--xl-mm-accent) !important;
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

/* ---------- Trust strip ---------- */
body.xl-redesign .xl-mm__trust {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 8px !important;
  flex: 0 0 auto !important;
  padding: 8px 14px !important;
  border-top: 1px solid var(--xl-mm-line) !important;
  background: #f7f2ea !important;
}
body.xl-redesign .xl-mm__trust-item {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  min-width: 0 !important;
}
body.xl-redesign .xl-mm__trust-item img {
  width: 18px !important;
  height: 18px !important;
  flex: 0 0 18px !important;
  object-fit: contain !important;
}
body.xl-redesign .xl-mm__trust-item strong {
  display: block !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  color: var(--xl-mm-text) !important;
  line-height: 1.15 !important;
}
body.xl-redesign .xl-mm__trust-item em {
  display: block !important;
  font-style: normal !important;
  font-size: 10px !important;
  color: var(--xl-mm-muted) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body.xl-redesign .xl-mega:not(.xl-mm) { display: none !important; }

/* ≤1366: ещё плотнее */
@media (max-width: 1366px) {
  :root { --xl-mm-rail: 210px; }
  body.xl-redesign .xl-mm__cards {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }
  body.xl-redesign .xl-mm__card-media { height: 48px !important; }
  body.xl-redesign .xl-mm__card-media img {
    max-width: 54px !important;
    max-height: 42px !important;
  }
  body.xl-redesign .xl-mm__main { padding: 14px 48px 12px 16px !important; }
  body.xl-redesign .xl-mm__cols { gap: 14px 20px !important; }
  body.xl-redesign .xl-mm__close {
    width: 34px !important;
    height: 34px !important;
  }
}

@media (max-width: 1200px) {
  body.xl-redesign .xl-mm__cards {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  body.xl-redesign .xl-mm__card:nth-child(n+4) { display: none !important; }
  body.xl-redesign .xl-mm__cols {
    grid-template-columns: 1fr 1fr !important;
  }
  body.xl-redesign .xl-mm__col--promo {
    grid-column: 1 / -1 !important;
  }
  body.xl-redesign .xl-mm__promo {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding: 10px 12px !important;
  }
  body.xl-redesign .xl-mm__promo strong {
    margin: 0 !important;
    flex: 1 1 auto !important;
  }
  body.xl-redesign .xl-mm__promo-cta { margin-left: auto !important; }
  body.xl-redesign .xl-mm__trust {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  body.xl-redesign .xl-mm__trust-item:nth-child(n+4) { display: none !important; }
}

@media (max-width: 900px) {
  body.xl-redesign .xl-mm__body {
    grid-template-columns: 1fr !important;
    overflow-y: auto !important;
  }
  body.xl-redesign .xl-mm__rail {
    border-right: 0 !important;
    border-bottom: 1px solid var(--xl-mm-line) !important;
    overflow: visible !important;
    max-height: none !important;
  }
  body.xl-redesign .xl-mm__cats {
    grid-template-columns: 1fr 1fr !important;
  }
  body.xl-redesign .xl-mm__main {
    overflow: visible !important;
  }
  body.xl-redesign .xl-mm__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  body.xl-redesign .xl-mm__card:nth-child(n+4) { display: flex !important; }
  body.xl-redesign .xl-mm__card:nth-child(n+5) { display: none !important; }
  body.xl-redesign .xl-mm__cols { grid-template-columns: 1fr !important; }
  body.xl-redesign .xl-mm__trust {
    grid-template-columns: 1fr 1fr !important;
  }
}
