/**
 * UMLIGHT responsive overrides — homepage + chrome
 * Loaded LAST among template CSS (see header.php).
 * Beats uml-mega / uml-showcase / main.min where needed.
 */

/* ===================== GLOBAL ===================== */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body {
  max-width: 100% !important;
  width: 100% !important;
  overflow-x: clip !important;
}

body {
  min-width: 0 !important;
  position: relative;
}

#all_width_container,
.uml-site-head,
main,
footer,
.ovh {
  max-width: 100% !important;
  overflow-x: clip !important;
}

img,
video,
svg {
  max-width: 100%;
  height: auto;
}

.container,
header .container,
.uml-mega-section .container,
.uml-showcase-section .container,
main .container,
footer .container,
#all_width_container {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.row {
  margin-left: 0;
  margin-right: 0;
  min-width: 0;
}

[class*="col-"] {
  min-width: 0;
}

/* ===================== DESKTOP (992+) ===================== */
@media (min-width: 992px) {
  :root {
    --uml-header-inner-gap: 22px;
    --uml-header-menu-gap: 20px;
    --uml-header-col-search: 240px;
    --uml-header-col-logo: 72px;
  }

  header.uml-header--top .uml-header__grid.block_menu_top {
    align-items: center;
    column-gap: var(--uml-header-inner-gap) !important;
  }

  header.uml-header--top .uml-header__col--search .form-search-header input,
  header.uml-header--top .uml-header__col--search #title-search-input {
    width: 100% !important;
    max-width: 100% !important;
    padding-right: 2.75rem !important;
    font-size: 12px !important;
  }

  header.uml-header--top .uml-header__col--search .form-search-header input::placeholder,
  header.uml-header--top .uml-header__col--search #title-search-input::placeholder {
    font-size: 12px;
  }

  header.uml-header--top .uml-header__col--nav .block_menu {
    flex-wrap: nowrap;
    gap: clamp(14px, 1.5vw, 22px);
  }

  header.uml-header--top .uml-header__col--nav .block_menu > li > a {
    white-space: nowrap;
    font-size: clamp(12px, 0.9vw, 14px);
    letter-spacing: 0.02em;
  }

  /* Icons block: breathing room between favorites / cart / messengers */
  header.uml-header--top .uml-header__col--counters .block_shop {
    display: flex !important;
    align-items: center;
    column-gap: 12px !important;
    row-gap: 0;
    margin: 0;
    padding-left: 4px;
  }

  header.uml-header--top .uml-header-messengers {
    margin-left: 4px;
    gap: 10px;
  }

  header.uml-header--top .uml-header-messengers__menu {
    gap: 10px !important;
  }

  /* Contacts column separated from icons */
  header.uml-header--top .uml-header__col--contacts {
    padding-left: 10px;
    margin-left: 4px;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
  }

  header.uml-header--top .uml-header__col--contacts .block_contacts {
    flex-wrap: nowrap;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 5px;
    margin: 0;
    padding: 0 0 0 8px;
  }

  header.uml-header--top .uml-header__col--contacts .block_contacts li a {
    font-size: 13px;
    line-height: 1.25;
  }

  .uml-mega__tabs,
  .uml-mega__tabs--marquee {
    padding-inline: 28px 32px;
  }

  .uml-mega__viewport {
    padding-inline: 4px 8px;
  }

  .uml-showcase__media {
    background:
      radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.1), transparent 55%),
      #101820;
  }

  .uml-showcase__viewport {
    height: 460px;
  }

  .block_buy_or_become > div {
    min-height: 280px;
  }

  .block_advantages {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.5rem 2rem;
  }

  .block_advantages .item {
    flex: 1 1 calc(25% - 2rem);
    min-width: 180px;
    max-width: none;
  }
}

@media (min-width: 992px) and (max-width: 1366px) {
  :root {
    --uml-header-col-search: 200px;
    --uml-header-inner-gap: 16px;
    --uml-header-menu-gap: 14px;
  }

  header.uml-header--top .uml-header__grid.block_menu_top {
    column-gap: 16px !important;
  }

  header.uml-header--top .uml-header__col--counters .block_shop {
    column-gap: 10px !important;
  }

  header.uml-header--top .uml-header__col--contacts .block_contacts li a {
    font-size: 12px;
  }

  .uml-mega__viewport {
    overflow-x: auto !important;
    scrollbar-width: none;
  }

  .uml-mega__viewport::-webkit-scrollbar {
    display: none;
  }

  .uml-mega__tabs,
  .uml-mega__tabs--marquee {
    width: max-content !important;
    padding-inline: 8px 24px !important;
  }
}

/* ===================== TABLET (768–991) ===================== */
@media (min-width: 768px) and (max-width: 991px) {
  .uml-hero {
    min-height: 420px;
  }

  .uml-hero__content-inner {
    max-width: 72% !important;
  }

  .uml-showcase__viewport {
    height: 380px !important;
    perspective: 820px !important;
  }

  .uml-showcase__ring {
    transform-style: preserve-3d !important;
    --uml-show-radius: 260px !important;
  }

  .block_advantages {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* ===================== HEADER ICONS (messengers / hicon) ===================== */
header .block_shop > a.uml-hicon,
header .block_shop a.uml-hicon,
header .uml-hicon--telegram,
header .uml-hicon--max,
header .uml-header-messengers__toggle {
  box-sizing: border-box;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.04);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  color: #fff;
  text-decoration: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

header .uml-hicon img,
header .uml-hicon svg {
  display: block;
  width: 18px;
  height: 18px;
  pointer-events: none;
}

header .uml-header-messengers {
  display: flex;
  align-items: center;
  gap: 6px;
}

header .uml-header-messengers__menu {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ===================== HEADER MOBILE ===================== */
@media (max-width: 991px) {
  header.uml-header--top .uml-header__container {
    padding-inline: 14px !important;
    padding-top: 10px !important;
    overflow: visible;
  }

  /*
   * Toolbar: logo | icons | burger
   */
  header.uml-header--top .uml-header__grid.block_menu_top {
    display: flex !important;
    flex-wrap: wrap !important;
    flex-direction: row !important;
    align-items: center !important;
    column-gap: 10px !important;
    row-gap: 10px !important;
    width: 100% !important;
    padding-top: 4px !important;
    padding-bottom: 0 !important;
  }

  header.uml-header--top .uml-header__col--logo {
    order: 1 !important;
    flex: 0 0 48px !important;
    width: 48px !important;
    max-width: 48px !important;
  }

  header.uml-header--top .uml-header__col--logo .block_logo a.logo img {
    width: 46px !important;
    height: auto;
    display: block;
  }

  header.uml-header--top .uml-header__col--counters {
    order: 2 !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
    display: flex !important;
    justify-content: flex-end !important;
    overflow: visible;
    padding-right: 2px;
  }

  header.uml-header--top .uml-header__col--counters .block_shop {
    display: flex !important;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px !important;
    margin: 0;
    max-width: 100%;
    overflow: visible;
  }

  header.uml-header--top .uml-header__col--counters .block_shop a.favorites,
  header.uml-header--top .uml-header__col--counters .block_shop a.compare,
  header.uml-header--top .uml-header__col--counters .block_shop a.basket {
    display: none !important;
  }

  header.uml-header--top .uml-header__col--counters .block_shop a.search.js-search {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    margin: 0 !important;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  }

  header.uml-header--top .uml-header__col--counters .block_shop a.search.js-search::before {
    content: "" !important;
    display: block !important;
    width: 18px !important;
    height: 18px !important;
    background: url("/local/templates/umlight/img/svg/search.png") no-repeat center / contain !important;
  }

  header.uml-header--top .uml-header__col--nav {
    order: 3 !important;
    flex: 0 0 42px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 42px !important;
    margin: 0 !important;
  }

  /* Closed by default; open drawer is portaled to body (.uml-nav-drawer) */
  header.uml-header--top .uml-header__col--nav .block_menu,
  .block_menu_top .block_menu:not(.uml-nav-drawer) {
    display: none !important;
  }

  html.uml-nav-open {
    overflow: hidden !important;
  }

  .uml-nav-backdrop {
    position: fixed !important;
    inset: 0 !important;
    z-index: 11990 !important;
    background: rgba(4, 12, 24, 0.55) !important;
    border: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: auto !important;
  }

  /* Drawer lives on <body> — above backdrop, fully clickable */
  ul.block_menu.uml-nav-drawer.action,
  ul.block_menu.uml-nav-drawer {
    display: flex !important;
    flex-direction: column !important;
    position: fixed !important;
    z-index: 12000 !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    bottom: 0 !important;
    width: min(320px, 86vw) !important;
    max-width: 86vw !important;
    height: 100vh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    padding: 72px 22px 28px !important;
    box-sizing: border-box !important;
    background: #0b1f36 !important;
    border: 0 !important;
    border-left: 0 !important;
    box-shadow: -18px 0 40px rgba(0, 0, 0, 0.45) !important;
    transform: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    gap: 0 !important;
    list-style: none !important;
    pointer-events: auto !important;
  }

  ul.block_menu.uml-nav-drawer > li {
    width: 100% !important;
    margin: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    pointer-events: auto !important;
  }

  ul.block_menu.uml-nav-drawer > li > a {
    display: block !important;
    padding: 14px 4px !important;
    color: #fff !important;
    font-size: 16px !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 1 !important;
    cursor: pointer !important;
  }

  ul.block_menu.uml-nav-drawer .drop_menu {
    position: static !important;
    display: none;
    width: 100% !important;
    padding: 0 0 10px 10px !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
    pointer-events: auto !important;
  }

  ul.block_menu.uml-nav-drawer > li.drop.active > .drop_menu {
    display: block !important;
  }

  ul.block_menu.uml-nav-drawer .drop_menu li a {
    display: block !important;
    padding: 8px 4px !important;
    color: rgba(255, 255, 255, 0.82) !important;
    font-size: 14px !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: rgba(212, 175, 55, 0.25);
  }

  ul.block_menu.uml-nav-drawer .drop_menu,
  ul.block_menu.uml-nav-drawer .drop_menu-section,
  ul.block_menu.uml-nav-drawer .drop_menu-section3 {
    pointer-events: auto !important;
  }

  ul.block_menu.uml-nav-drawer > li.drop.active > .drop_menu {
    display: block !important;
  }

  /* Hide FAB while nav is open so it never steals taps */
  html.uml-nav-open .uml-fab {
    visibility: hidden !important;
    pointer-events: none !important;
  }

  header.uml-header--top .uml-header__col--nav .burger {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0;
    width: 42px;
    height: 42px;
    box-sizing: border-box;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 12001;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  /* Keep close (X) tappable above backdrop when drawer is open */
  html.uml-nav-open header.uml-header--top .uml-header__col--nav .burger.action {
    position: fixed !important;
    top: 12px !important;
    right: 12px !important;
    z-index: 12005 !important;
    background: #0b1f36 !important;
  }

  header.uml-header--top .uml-header__col--nav .burger div {
    width: 16px !important;
    height: 2px !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    margin: 2.5px 0 !important;
    border-radius: 2px;
    background: #fff !important;
    transition: transform 0.25s ease, opacity 0.2s ease, margin 0.2s ease;
  }

  /* X when open (common.js adds .action) */
  header.uml-header--top .uml-header__col--nav .burger.action div:nth-child(1) {
    margin: 0 !important;
    transform: translateY(4.5px) rotate(45deg) !important;
  }

  header.uml-header--top .uml-header__col--nav .burger.action div:nth-child(2) {
    opacity: 0 !important;
    transform: scaleX(0) !important;
  }

  header.uml-header--top .uml-header__col--nav .burger.action div:nth-child(3) {
    margin: 0 !important;
    transform: translateY(-4.5px) rotate(-45deg) !important;
  }

  header.uml-header--top .uml-header__col--search {
    order: 4 !important;
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  header.uml-header--top .uml-header__col--search .header-search__input,
  header.uml-header--top .uml-header__col--search #title-search,
  header.uml-header--top .uml-header__col--search .form-search-header {
    display: none !important;
  }

  header.uml-header--top .uml-header__col--search #title-search[style*="display: block"],
  header.uml-header--top .uml-header__col--search #title-search[style*="display:block"],
  header.uml-header--top .uml-header__col--search #title-search.is-open,
  header.uml-header--top.is-search-open .uml-header__col--search #title-search {
    display: block !important;
    width: 100%;
    max-width: 100%;
    margin: 0;
  }

  header.uml-header--top .uml-header__col--search #title-search.is-open .form-search-header,
  header.uml-header--top.is-search-open .uml-header__col--search .form-search-header {
    display: flex !important;
    width: 100%;
    align-items: center;
  }

  header.uml-header--top .uml-header__col--search #title-search-input {
    max-width: 100% !important;
    width: 100% !important;
    height: 44px !important;
    border-radius: 12px !important;
    font-size: 15px !important;
  }

  header.uml-header--top .uml-header__col--contacts {
    display: none !important;
  }

  /* Contacts under toolbar — clean stacked block */
  header.uml-header--top .uml-header__mobile {
    display: flex !important;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 0 12px;
    overflow: visible;
  }

  header.uml-header--top .uml-header__mobile .block_contacts {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px 14px !important;
    margin: 0 !important;
    padding: 0;
    width: 100%;
  }

  header.uml-header--top .uml-header__mobile .block_contacts.phone {
    width: 100%;
    margin-top: 0;
  }

  header.uml-header--top .uml-header__mobile .block_contacts li {
    list-style: none;
    margin: 0;
    max-width: 100%;
    min-width: 0;
  }

  header.uml-header--top .uml-header__mobile .block_contacts li a {
    color: rgba(255, 255, 255, 0.95) !important;
    font-family: Montserrat, sans-serif;
    font-size: 14px !important;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
  }

  header.uml-header--top .uml-header__mobile .block_contacts li a.link {
    display: inline-flex !important;
    align-items: center;
    height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f1c35c 0%, #d4a84b 100%);
    color: #081829 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none !important;
    box-shadow: 0 6px 16px rgba(200, 154, 61, 0.35);
  }

  header.uml-header--top .uml-header__mobile .block_contacts li a.mail,
  header.uml-header--top .uml-header__mobile .block_contacts li a.tel {
    display: inline-block;
    max-width: min(100%, calc(100vw - 32px));
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  header.uml-header--top .uml-header__mobile .block_contacts li a.tel {
    color: #f1c35c !important;
    font-size: 15px !important;
    font-weight: 700 !important;
  }

  header .uml-header-messengers__toggle {
    display: none !important;
  }

  header .uml-header-messengers {
    gap: 8px !important;
  }

  header .uml-header-messengers__menu {
    display: flex !important;
    position: static !important;
    flex-direction: row;
    gap: 8px !important;
  }

  /* Large branded messengers on mobile */
  header .block_shop > a.uml-hicon,
  header .block_shop a.uml-hicon,
  header .uml-hicon--telegram,
  header .uml-hicon--max {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    flex-shrink: 0;
    border: none !important;
    background: transparent !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28) !important;
  }

  header .uml-hicon--telegram {
    border-radius: 50% !important;
    overflow: hidden;
  }

  header .uml-hicon--max {
    border-radius: 22% !important;
    overflow: hidden;
  }

  header .uml-hicon--telegram img,
  header .uml-hicon--max img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    filter: none !important;
  }

  /* Category chips — horizontal scroll */
  .uml-site-head,
  .uml-mega-nav {
    max-width: 100%;
    overflow: hidden;
  }

  .uml-mega-nav .uml-mega-section {
    max-width: 100%;
    overflow: hidden;
  }

  .uml-mega-nav .uml-mega-section .container {
    max-width: 100%;
    padding-inline: 10px 12px;
    overflow: hidden;
  }

  .uml-mega__bar {
    max-width: 100%;
    min-width: 0;
    gap: 0;
  }

  .uml-mega__viewport {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scroll-padding-inline: 16px;
    scrollbar-width: none;
  }

  .uml-mega__viewport::-webkit-scrollbar {
    display: none;
  }

  .uml-mega__tabs,
  .uml-mega__tabs--marquee {
    flex-wrap: nowrap !important;
    width: max-content !important;
    max-width: none !important;
    padding-inline: 4px 36px !important;
    transform: none !important;
    animation: none !important;
  }

  .uml-mega__tab-link {
    white-space: nowrap;
    flex-shrink: 0;
    height: 38px !important;
    padding: 0 14px !important;
    font-size: 12px !important;
  }

  .uml-site-head .container,
  header.uml-header--top .uml-header__container {
    max-width: 100%;
    min-width: 0;
  }

  /* Popups / fancybox on mobile */
  .fancybox-container .fancybox-slide--html {
    padding: 12px !important;
  }

  .fancybox-container .fancybox-content,
  .fancybox-slide--html .fancybox-content {
    width: min(100%, 100vw - 24px) !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    border-radius: 16px !important;
    overflow: auto !important;
    max-height: calc(100vh - 32px) !important;
  }

  #popup_big,
  #popup_small,
  .popup_big,
  .popup_small {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  #popup_big .row,
  .popup_big .row {
    flex-direction: column !important;
    margin: 0 !important;
  }

  #popup_big [class*="col-"],
  .popup_big [class*="col-"] {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    padding: 0 !important;
  }

  #popup_big img,
  .popup_big img {
    display: none !important;
  }
}

@media (max-width: 767px) {
  /* Keep messengers; hide cart — keep TG + Max large */
  header .uml-hicon--telegram,
  header .uml-hicon--max {
    display: inline-flex !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
  }

  header.uml-header--top .uml-header__col--counters .block_shop {
    gap: 8px !important;
  }

  header.uml-header--top .uml-header__mobile .block_contacts li a {
    font-size: 13px;
  }

  header.uml-header--top .uml-header__mobile .block_contacts li a.tel {
    font-size: 15px !important;
  }

  .uml-mega__tab-link {
    height: 38px !important;
    padding: 0 13px !important;
    font-size: 12px !important;
  }

  .uml-mega__bar {
    position: relative;
  }

  .uml-mega__bar::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 28px;
    background: linear-gradient(90deg, transparent, #07192d 85%);
    pointer-events: none;
    z-index: 2;
  }

  /* Catalog / mega cards more readable */
  .uml-mega__card-title {
    font-size: 14px !important;
    line-height: 1.3 !important;
  }

  .uml-mega__card .btn,
  .uml-mega__card a.btn,
  .uml-mega__card-btn {
    min-height: 40px;
    font-size: 12px !important;
  }

  /* Cookie bar shouldn't crush FAB */
  .legacy-cookie {
    max-width: calc(100vw - 88px) !important;
    right: auto !important;
    left: 12px !important;
    bottom: 12px !important;
    font-size: 12px !important;
  }
}

/* ===================== MEGA PANEL (mobile / tablet < 992 = JS isDesktop false) ===================== */
@media (max-width: 991px) {
  /* Closed host must collapse — height:auto + overflow:visible caused the white strip */
  .uml-mega__panels,
  .uml-mega__panels--in-header {
    position: relative !important;
    height: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    z-index: 20 !important;
    pointer-events: none !important;
  }

  html.uml-mega-is-open .uml-mega__panels,
  html.uml-mega-is-open .uml-mega__panels--in-header {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    pointer-events: auto !important;
  }

  .uml-mega__panel,
  .uml-mega__panel.uml-mega__panel--fixed {
    position: static !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    transform: none !important;
    box-shadow: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    z-index: 1 !important;
    background: #fff !important;
    overflow: hidden !important;
    max-height: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  .uml-mega__panel[hidden],
  .uml-mega__panel:not(.is-visible) {
    display: none !important;
    margin: 0 !important;
    max-height: 0 !important;
  }

  html.uml-mega-is-open .uml-mega__panel.is-visible,
  html.uml-mega-is-open .uml-mega__panel.is-visible.uml-mega__panel--fixed,
  .uml-mega__panel.is-visible:not([hidden]),
  .uml-mega__panel.is-visible {
    display: block !important;
    position: static !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 8px 0 0 !important;
    max-height: 70vh !important;
    opacity: 1 !important;
    visibility: visible !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    pointer-events: auto !important;
    transform: none !important;
    border-top: 1px solid rgba(8, 24, 41, 0.08) !important;
    z-index: 2 !important;
  }

  .uml-mega__panel::before {
    display: none !important;
  }

  .uml-mega__panel-inner {
    padding: 12px 12px 18px !important;
  }

  .uml-mega__products {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .uml-mega__card {
    display: grid !important;
    grid-template-columns: 72px minmax(0, 1fr) !important;
    grid-template-rows: auto auto auto;
    gap: 4px 12px !important;
    align-items: start;
    padding: 10px !important;
    min-height: 0;
    max-width: 100%;
  }

  .uml-mega__card-media {
    grid-row: 1 / span 3;
    width: 72px !important;
    height: 72px !important;
    padding: 6px !important;
    background: #f3f5f7;
  }

  .uml-mega__card-media img {
    width: 100% !important;
    max-height: 60px;
    object-fit: contain;
  }

  .uml-mega__card-title {
    grid-column: 2;
    -webkit-line-clamp: unset !important;
    display: block !important;
    overflow: visible !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    font-size: 13px !important;
    line-height: 1.35 !important;
    margin: 0 !important;
  }

  .uml-mega__card-price {
    grid-column: 2;
    font-size: 13px;
  }

  .uml-mega__card-btn {
    grid-column: 2;
    width: auto !important;
    min-width: 0;
    justify-self: start;
    font-size: 11px;
    padding: 6px 12px;
    height: auto;
  }

  html.uml-mega-is-open,
  html.uml-mega-is-open body {
    overflow-x: clip !important;
  }

  html.uml-mega-is-open .uml-site-head.uml-mega-header-open {
    overflow: visible !important;
    z-index: 200 !important;
  }

  /* Category chips stay scrollable, never expand page width */
  .uml-mega__tabs,
  .uml-mega__tabs--marquee {
    width: max-content !important;
    max-width: none !important;
    transform: none !important;
    animation: none !important;
  }

  .uml-mega__viewport {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    max-width: 100% !important;
  }
}

@media (max-width: 767px) {
  .uml-mega__products {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .uml-mega__card {
    display: grid !important;
    grid-template-columns: 72px 1fr !important;
    grid-template-rows: auto auto auto;
    gap: 4px 12px !important;
    align-items: start;
    padding: 10px !important;
    min-height: 0;
  }

  .uml-mega__card-media {
    grid-row: 1 / span 3;
    width: 72px !important;
    height: 72px !important;
    padding: 6px !important;
    background: #f3f5f7;
  }

  .uml-mega__card-media img {
    width: 100% !important;
    max-height: 60px;
    object-fit: contain;
  }

  .uml-mega__card-title {
    grid-column: 2;
    -webkit-line-clamp: unset !important;
    display: block !important;
    overflow: visible !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    font-size: 13px !important;
    line-height: 1.35 !important;
    margin: 0 !important;
  }

  .uml-mega__card-price {
    grid-column: 2;
    font-size: 13px;
  }

  .uml-mega__card-btn {
    grid-column: 2;
    width: auto !important;
    min-width: 0;
    justify-self: start;
    font-size: 11px;
    padding: 6px 12px;
    height: auto;
  }

  .uml-mega__panel-inner {
    padding: 12px 12px 16px !important;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .uml-mega__products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .uml-mega__card-title {
    -webkit-line-clamp: 3 !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }
}

/* ===================== HERO ===================== */
@media (max-width: 991px) {
  .uml-hero {
    overflow: hidden;
    height: auto !important;
    min-height: 440px;
    max-height: none;
  }

  .uml-hero > .container {
    width: 100%;
    max-width: 100%;
    padding-inline: 16px;
    padding-bottom: 24px;
    box-sizing: border-box;
    align-items: flex-end;
  }

  .uml-hero__content,
  .uml-hero__content-inner {
    max-width: 100% !important;
    width: 100%;
    min-width: 0;
  }

  .uml-hero__title {
    max-width: 100% !important;
    overflow: visible !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-size: clamp(1.3rem, 6.2vw, 1.85rem) !important;
    line-height: 1.2 !important;
    margin-bottom: 12px;
  }

  .uml-hero__desc,
  .uml-hero__desc p {
    max-width: 100% !important;
    overflow: visible !important;
    overflow-wrap: anywhere;
    font-size: 14px;
    line-height: 1.5;
  }

  .uml-hero__btn {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* ===================== SHOWCASE 3D ===================== */
@media (max-width: 991px) {
  .uml-showcase-section {
    overflow: visible;
    padding-top: 48px !important;
    padding-bottom: 48px !important;
  }

  .block_categories_of_products_title,
  .uml-showcase-section .title,
  .uml-showcase-section .subtitle {
    overflow: visible;
    text-align: center;
  }

  .block_categories_of_products_title .subtitle,
  .uml-showcase-section .subtitle {
    overflow-wrap: anywhere;
    line-height: 1.4;
    font-size: 15px;
  }

  .block_categories_of_products {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    padding: 20px 16px !important;
  }

  .block_categories_of_products .inner .title {
    font-size: 1.05rem !important;
    line-height: 1.35 !important;
  }
}

@media (max-width: 767px) {
  .uml-showcase-section {
    overflow: visible !important;
    padding-bottom: 56px !important;
  }

  .uml-showcase {
    overflow: visible !important;
    isolation: auto !important; /* isolate breaks preserve-3d */
    transform-style: preserve-3d;
  }

  /* Decorative dots — hide on phones (look like glitches) */
  .uml-showcase__particles,
  .uml-showcase__lines {
    display: none !important;
  }

  .uml-showcase__stage {
    grid-template-columns: 1fr !important;
    min-height: 480px !important;
    overflow: visible;
  }

  .uml-showcase__arrow {
    display: none !important;
  }

  /* 3D coverflow like desktop — do NOT flatten */
  .uml-showcase__viewport {
    height: 420px !important;
    perspective: 1100px !important;
    perspective-origin: 50% 42% !important;
    overflow: visible !important;
    touch-action: pan-x;
  }

  .uml-showcase__ring {
    position: absolute !important;
    left: 50% !important;
    top: 46% !important;
    width: 220px !important;
    height: 320px !important;
    margin-left: -110px !important;
    margin-top: -160px !important;
    transform-style: preserve-3d !important;
    --uml-show-radius: 300px !important;
  }

  .uml-showcase__card.is-active {
    opacity: 1 !important;
    z-index: 3;
    filter: none;
  }

  .uml-showcase__card.is-focus {
    opacity: 1 !important;
    z-index: 4;
  }

  .uml-showcase__card {
    position: absolute !important;
    inset: 0 !important;
    transform-style: preserve-3d !important;
    backface-visibility: hidden;
    /* keep rotateY + translateZ from uml-showcase.css */
    transition: filter var(--uml-show-ease, 320ms ease), opacity var(--uml-show-ease, 320ms ease) !important;
  }

  .uml-showcase__card:not(.is-active):not(.is-focus) {
    opacity: 0.45 !important;
    visibility: visible !important;
    pointer-events: none;
    filter: brightness(0.75);
  }

  .uml-showcase__card.is-active {
    opacity: 1 !important;
    z-index: 3;
  }

  .uml-showcase__card-glass {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
  }

  .uml-showcase__media {
    height: 46% !important;
    flex-shrink: 0;
    background: linear-gradient(180deg, #1a2430 0%, #0c1218 100%) !important;
    padding: 10px;
  }

  .uml-showcase__media img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
    background: #fff;
  }

  .uml-showcase__body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px 12px;
  }

  .uml-showcase__title {
    font-size: 0.9rem !important;
    line-height: 1.3 !important;
    -webkit-line-clamp: 3;
    overflow-wrap: anywhere;
  }

  .uml-showcase__specs,
  .uml-showcase__article {
    display: none !important;
  }

  .uml-showcase__btn {
    margin-top: auto;
  }

  .uml-showcase__info {
    flex-direction: column !important;
    align-items: stretch !important;
    text-align: center;
    padding-inline: 16px;
    margin-top: 12px;
    gap: 12px;
  }

  .uml-showcase__info-btn {
    width: 100% !important;
  }

  .uml-showcase__info-title {
    font-size: 1.25rem !important;
    overflow-wrap: anywhere;
  }
}

/* ===================== BUY / PARTNER ===================== */
@media (max-width: 991px) {
  .block_buy_or_become {
    flex-direction: column !important;
  }

  .block_buy_or_become > div {
    width: 100% !important;
    padding: 32px 20px !important;
    background-size: cover !important;
    background-position: center !important;
    box-sizing: border-box;
  }

  .block_buy_or_become > div .title {
    font-size: clamp(1.1rem, 4.5vw, 1.35rem) !important;
    line-height: 1.3 !important;
    margin-bottom: 16px !important;
    overflow-wrap: anywhere;
  }

  .block_buy_or_become > div .btn_bulk,
  .block_buy_or_become > div.block_right .btn_bulk {
    width: 100% !important;
    max-width: 320px;
    margin-left: 0 !important;
  }
}

/* ===================== CALC + FORM ===================== */
@media (max-width: 991px) {
  .bg_block_free_calculation,
  .block_form_indent {
    overflow: hidden;
  }

  .block_free_calculation .list li {
    padding-left: 3rem !important;
    margin-bottom: 1rem !important;
    font-size: 0.9rem !important;
    line-height: 1.45 !important;
    overflow-wrap: anywhere;
  }

  .block_free_calculation .list li br {
    display: none !important;
  }

  .block_free_calculation .title {
    overflow-wrap: anywhere;
    font-size: clamp(1.2rem, 5vw, 1.5rem) !important;
  }

  .block_form_indent {
    padding-inline: 16px !important;
  }

  .block_form {
    width: 100% !important;
    max-width: 100% !important;
    flex-direction: column !important;
    padding: 1.25rem !important;
    box-sizing: border-box;
    position: relative !important;
    transform: none !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
  }

  .block_form .block_input,
  .block_form button {
    margin: 0 0 0.75rem !important;
    width: 100% !important;
    max-width: 100%;
  }

  .block_form .block_input input {
    height: 48px !important;
    font-size: 14px !important;
    box-sizing: border-box;
  }

  .block_form .form-line-privacy,
  .form-line-privacy {
    font-size: 12px !important;
    line-height: 1.45 !important;
    overflow-wrap: anywhere;
  }

  .block_form .btn_bulk {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* ===================== STATS / ADVANTAGES ===================== */
@media (max-width: 991px) {
  .block_advantages {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.25rem;
    width: 100%;
  }

  .block_advantages .item {
    width: auto !important;
    margin-bottom: 0 !important;
    min-width: 0;
  }

  .block_advantages .item .title {
    font-size: clamp(0.95rem, 3.6vw, 1.2rem) !important;
    line-height: 1.25 !important;
    overflow-wrap: anywhere;
  }

  .block_advantages .item .title b,
  .block_advantages .item .title span {
    font-size: clamp(1.35rem, 5.5vw, 1.75rem) !important;
  }

  .block_advantages .item .text {
    font-size: 0.8rem !important;
    line-height: 1.4 !important;
    overflow-wrap: anywhere;
  }

  .block_advantages .item .text br {
    display: none !important;
  }
}

@media (max-width: 575px) {
  .block_advantages {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .block_certificates .title,
  .block_free_calculation .title,
  .block_categories_of_products_title .title {
    overflow-wrap: anywhere;
  }

  .uml-brands__viewport {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .uml-brands__track {
    width: max-content;
  }

  .btn_bulk {
    min-width: 0 !important;
    width: 100%;
    max-width: 100%;
  }
}

/* ===================== FOOTER MOBILE ===================== */
@media (max-width: 991px) {
  footer .container,
  .block_footer .container {
    padding-inline: 16px;
  }

  .block_footer .row {
    flex-direction: column;
    gap: 1.5rem;
  }

  .block_footer .item {
    width: 100% !important;
    max-width: 100%;
  }
}

/* ===================== HEADER MOBILE — cascade tail (loads last in file) ===================== */
@media (max-width: 991px) {
  header.uml-header--top .uml-header__grid.block_menu_top {
    display: flex !important;
    flex-wrap: wrap !important;
  }

  header.uml-header--top .uml-header__col--logo {
    order: 1 !important;
  }

  header.uml-header--top .uml-header__col--counters {
    order: 2 !important;
  }

  header.uml-header--top .uml-header__col--nav {
    order: 3 !important;
  }

  header.uml-header--top .uml-header__col--search {
    order: 4 !important;
  }

  header.uml-header--top .uml-header__mobile .block_contacts {
    justify-content: flex-start !important;
  }
}
