/* Mobile: fixed burger lane, no sticky mega CTA, centered packs. */

html .snet-mega__pack,
html .snet-mega__grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  grid-column: 1 / -1 !important;
  width: 100% !important;
  min-width: 0 !important;
  align-items: stretch !important;
  justify-items: stretch !important;
  margin: 0 !important;
  padding: 0 !important;
}

html #header .nav-menu .snet-mega > ul.snet-mega__panel > li.snet-mega__pack,
html .mobile-nav .snet-mega > ul.snet-mega__panel > li.snet-mega__pack,
html .snet-fly__sheet > .snet-mega__pack,
html .snet-fly__sheet > .snet-mega__grid {
  display: grid !important;
  grid-column: 1 / -1 !important;
}

html .snet-mega__pack > .snet-mega__tile,
html .snet-mega__grid > .snet-mega__tile,
html .mobile-nav a.snet-mega__tile,
html .mobile-nav .snet-mega__pack > .snet-mega__tile {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 92px !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 10px 8px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

html .snet-mega__pack > .snet-mega__tile .snet-mega__name,
html .snet-mega__pack > .snet-mega__tile .snet-mega__meta,
html .snet-mega__grid > .snet-mega__tile .snet-mega__name,
html .snet-mega__grid > .snet-mega__tile .snet-mega__meta {
  width: 100% !important;
  text-align: center !important;
}

html .snet-mega__pack > .snet-mega__tile--wide,
html .snet-mega__pack > .snet-mega__tile.snet-mega__tile--wide {
  grid-column: 1 / -1 !important;
}

html .snet-mega__pack > .snet-mega__tile:last-child:nth-child(odd):not(.snet-mega__tile--wide),
html .snet-mega__grid > .snet-mega__tile:last-child:nth-child(odd):not(.snet-mega__tile--wide) {
  grid-column: 1 / -1 !important;
  justify-self: center !important;
  width: calc((100% - 8px) / 2) !important;
  max-width: 180px !important;
  flex-direction: column !important;
  min-height: 92px !important;
}

html .snet-mega__pack > .snet-mega__tile--pay .snet-pay-card__logo,
html .snet-mega__pack > .snet-mega__tile--pay .snet-mega__logo {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  width: 100% !important;
  min-width: 72px !important;
  max-width: 100% !important;
  min-height: 40px !important;
  overflow: visible !important;
}

html .snet-mega__pack > .snet-mega__tile--pay img,
html .mobile-nav .snet-mega__tile--pay img {
  flex: 0 0 auto !important;
  min-width: 0 !important;
  min-height: 18px !important;
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
}

html .snet-mega__cat,
html #header .nav-menu .snet-mega > ul.snet-mega__panel > li.snet-mega__cat,
html .mobile-nav .snet-mega > ul.snet-mega__panel > li.snet-mega__cat,
html .snet-fly__sheet > .snet-mega__cat {
  justify-content: center !important;
  text-align: center !important;
}

html .snet-cab-btn__short {
  display: none;
}

@media (min-width: 1100px) {
  html #header .nav-menu .snet-mega__pack,
  html #header .nav-menu .snet-mega__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  html #header .nav-menu .snet-mega__pack > .snet-mega__tile:last-child:nth-child(odd):not(.snet-mega__tile--wide),
  html #header .nav-menu .snet-mega__grid > .snet-mega__tile:last-child:nth-child(odd):not(.snet-mega__tile--wide) {
    grid-column: auto !important;
    justify-self: stretch !important;
    width: 100% !important;
    max-width: none !important;
  }

  html #header .nav-menu .snet-mega__pack > .snet-mega__tile:last-child:nth-child(3n+1):not(.snet-mega__tile--wide),
  html #header .nav-menu .snet-mega__grid > .snet-mega__tile:last-child:nth-child(3n+1):not(.snet-mega__tile--wide) {
    grid-column: 1 / -1 !important;
    justify-self: center !important;
    width: calc((100% - 16px) / 3) !important;
    max-width: 180px !important;
  }
}

@media (max-width: 991.98px) {
  /* Sticky CTA was covering tiles while the panel scrolled — kill it on phone. */
  html body .mobile-nav .snet-mega__all,
  html body .mobile-nav .snet-mega > ul.snet-mega__panel > li.snet-mega__all,
  html body .snet-fly__sheet > .snet-mega__all {
    position: static !important;
    top: auto !important;
    z-index: auto !important;
    background: transparent !important;
  }

  /* Mobile scrolled header: stay transparent (no white/dark plate) */
  html body #header.header-scrolled,
  html body #header.header-inner-pages,
  html body.mobile-nav-active #header,
  html[data-theme="day"] body #header.header-scrolled,
  html[data-theme="day"] body #header.header-inner-pages,
  html[data-theme="day"] body.mobile-nav-active #header,
  html[data-theme="night"] body #header.header-scrolled,
  html[data-theme="night"] body #header.header-inner-pages,
  html[data-theme="night"] body.mobile-nav-active #header {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 0 !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
  }

  /* Burger stays fixed top-right — search/cabinet keep their lane left of it. */
  html body > .mobile-nav-toggle,
  html body .mobile-nav-toggle,
  html .mobile-nav-toggle {
    position: fixed !important;
    top: 14px !important;
    right: 10px !important;
    left: auto !important;
    bottom: auto !important;
    transform: none !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    flex: none !important;
    z-index: 10350 !important;
    pointer-events: auto !important;
  }

  html body #header .snet-header-actions > .mobile-nav-toggle {
    display: none !important;
  }

  html body #header .snet-header-actions {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    margin-left: 4px !important;
    margin-right: 52px !important;
    gap: 6px !important;
    justify-content: flex-end !important;
  }

  html body #header .snet-header-toggles {
    flex: 0 0 auto !important;
    margin-left: 0 !important;
    gap: 4px !important;
  }

  html body #header .snet-theme-toggle {
    transform: scale(0.92);
    transform-origin: center right;
  }

  html body #header .snet-optic {
    width: 28px !important;
    min-width: 28px !important;
  }

  html body #header .get-started-btn,
  html body #header .snet-cab-btn {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  html body #header .snet-cab-btn__full {
    display: none !important;
  }

  html body #header .snet-cab-btn__short {
    display: inline !important;
  }

  html body #header .snet-search-wrap {
    flex: 0 0 auto !important;
    margin-left: 0 !important;
  }

  html body.mobile-nav-active #header {
    z-index: 10330 !important;
  }

  html body.mobile-nav-active .mobile-nav-overly {
    top: var(--snet-header-h, 93px) !important;
    height: auto !important;
    bottom: 0 !important;
  }

  html body.mobile-nav-active .mobile-nav {
    top: var(--snet-header-h, 93px) !important;
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    max-height: calc(100dvh - var(--snet-header-h, 93px) - 12px) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Outer overlay scrolls; panels must NOT nest-scroll (sticky hang). */
  html body .mobile-nav .snet-mega > ul.snet-mega__panel,
  html body .mobile-nav li.snet-mega > ul.snet-mega__panel {
    max-height: none !important;
    overflow: visible !important;
    overflow-y: visible !important;
  }

  html body .mobile-nav li.snet-mega.is-open > ul.snet-mega__panel,
  html body .mobile-nav .drop-down.is-open > ul.snet-mega__panel {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 10px 10px 14px !important;
    margin: 4px 8px 12px !important;
    width: auto !important;
    max-width: none !important;
    max-height: none !important;
    overflow: visible !important;
    overflow-y: visible !important;
    box-sizing: border-box !important;
  }

  /* Arsha template indents every drop-down li 20px left — that skews CTA + packs. */
  html body .mobile-nav .drop-down ul > li,
  html body .mobile-nav .snet-mega > ul.snet-mega__panel > li,
  html body .mobile-nav .snet-mega.is-open > ul.snet-mega__panel > li {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: auto !important;
    max-width: none !important;
    box-sizing: border-box !important;
  }

  html body .mobile-nav .snet-mega > ul.snet-mega__panel > li.snet-mega__all,
  html body .mobile-nav .snet-mega > ul.snet-mega__panel > li.snet-mega__cat,
  html body .mobile-nav .snet-mega > ul.snet-mega__panel > li.snet-mega__pack {
    grid-column: 1 / -1 !important;
  }

  html body .mobile-nav .snet-mega__all,
  html body .mobile-nav .snet-mega > ul.snet-mega__panel > li.snet-mega__all {
    display: flex !important;
    justify-content: center !important;
    align-items: stretch !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  html body .mobile-nav .snet-mega__all a,
  html body .mobile-nav li.snet-mega__all > a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 10px 14px !important;
    box-sizing: border-box !important;
  }

  html body .mobile-nav .snet-mega__pack {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    justify-items: stretch !important;
  }

  html body .mobile-nav .snet-mega__cat,
  html body .mobile-nav .snet-mega > ul.snet-mega__panel > li.snet-mega__cat {
    width: 100% !important;
    margin: 0 !important;
    padding: 10px 4px 2px !important;
    justify-content: center !important;
    text-align: center !important;
  }

  html body .mobile-nav .snet-mega > ul.snet-mega__panel > li:last-child:nth-child(even),
  html body .mobile-nav .snet-mega > ul.snet-mega__panel > li:last-child:nth-child(even) > .snet-mega__tile {
    grid-column: auto !important;
    flex-direction: column !important;
    min-height: 92px !important;
  }
}

@media (max-width: 399.98px) {
  html body > .mobile-nav-toggle,
  html body .mobile-nav-toggle,
  html .mobile-nav-toggle {
    top: 12px !important;
    right: 8px !important;
  }

  html body #header .snet-header-actions {
    margin-right: 48px !important;
  }
}

@media (min-width: 992px) {
  html body #header .mobile-nav-toggle,
  html body .mobile-nav-toggle,
  html body > .mobile-nav-toggle {
    display: none !important;
  }

  html body #header .snet-cab-btn__short {
    display: none !important;
  }

  html body #header .snet-cab-btn__full {
    display: inline !important;
  }
}

/* === v12: mobile bg picker menu stays inside viewport (12px left inset) === */
@media (max-width: 991.98px) {
  html body #header .snet-bg-picker .snet-bg-picker__menu {
    position: fixed;
    top: auto;
    left: 12px;
    right: auto;
    transform: none;
    margin-top: 8px;
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
  }
}
