@media all and (min-width: 992px) and (max-width: 1024px) {
  .ch-mega-menu {
    max-height: 80vh;
    overflow-y: auto;
  }
}

@media all and (max-width: 1199px) {
  .header-menu-text ul.navbar-nav a.nav-link.ch-mm-toggle {
    display: flex;
  }
  .ch-mega-menu {
    position: static;
    box-shadow: none;
    border-top: 0;
    border-bottom: 0;
  }
  .ch-acc__button {
    padding: 6px 8px;
    gap: 6px;
  }
  .ch-acc__id {
    display: none;
  }
  .header-menu-text.collapse:not(.show) {
    display: none !important;
  }
}

@media all and (max-width: 1024px) {
  .ch-mega-menu__inner {
    grid-template-columns: 1fr;
  }
  .ch-mm-sections {
    min-height: 0;
    max-height: none;
    padding: 20px;
  }
  .ch-mm-sections::before {
    display: none;
  }
  .ch-mm-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin: 0;
    background: #fff;
    border: 1px solid var(--ch-mm-line-strong);
    border-radius: 10px;
  }
  .ch-mm-section__head:first-of-type,
  .ch-mm-section__head:last-of-type {
    margin: 0;
  }
  .ch-mm-section__body + .ch-mm-section__head,
  .ch-mm-section__head + .ch-mm-section__head {
    margin-top: 5px;
    width: 100%;
  }
  .ch-mm-section__head.is-active {
    border-left: 4px solid var(--ch-mm-head-accent);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
  .ch-mm-section__sub {
    display: none;
  }
  .ch-mm-section__caret {
    display: block;
  }
  .ch-mm-section__body {
    position: static;
    padding: 16px;
    gap: 12px;
    overflow: visible;
    background: var(--ch-mm-tint);
    border: 1px solid var(--ch-mm-line-strong);
    border-top: 0;
    border-radius: 0 0 10px 10px;
  }
  .ch-mm-feature {
    padding: 8px;
    gap: 10px;
    border-radius: 8px;
  }
  .ch-mm-feature:hover,
  .ch-mm-feature:focus {
    background: #fff;
  }
  .ch-mm-feature__ico {
    font-size: 16px;
  }
  .ch-mm-promo {
    margin: 0 20px 20px;
  }
  .ch-mm-section__body.is-active {
    border-left: 4px solid var(--ch-mm-accent);
  }
  .ch-mm-promo__card {
    min-height: 0;
    padding: 16px;
    border-radius: 12px;
  }
  .ch-mm-promo__card h3 {
    font-size: 18px;
  }
  .ch-mm-promo__card p {
    line-height: 1.4;
  }
}

@media all and (max-width: 767px) {
  .ch-mm-sections {
    padding: 0;
  }
  .ch-mm-section__head {
    padding: 14px 16px;
    background: #f9fafb;
    border: 0;
    border-bottom: 1px solid var(--ch-mm-line);
    border-radius: 0;
  }
  .ch-mm-section__body + .ch-mm-section__head,
  .ch-mm-section__head + .ch-mm-section__head {
    margin-top: 0;
  }
  .ch-mm-section__head.is-active {
    border: 0;
    border-bottom: 1px solid var(--ch-mm-line);
    border-radius: 0;
  }
  .ch-mm-section__title b {
    font-size: 15px;
  }
  .ch-mm-section__body {
    padding: 12px 16px;
    gap: 4px;
    border: 0;
    border-bottom: 1px solid var(--ch-mm-line);
    border-radius: 0;
  }
  .ch-mm-section__body.is-active {
    grid-template-columns: 1fr;
    border-left: 0;
    background: #fff;
  }
  .ch-mm-panel__title {
    margin-bottom: 4px;
    font-size: 16px;
  }
  .ch-mm-feature {
    gap: 8px;
    padding: 8px;
    border-radius: 6px;
  }
  .ch-mm-feature__ico svg {
    width: 22px;
    height: 22px;
  }
  .ch-mm-feature b {
    font-size: 14px;
  }
  .ch-mm-panel__more {
    margin-left: 0;
    font-size: 14px;
  }
  .ch-mm-promo {
    margin: 0;
    padding: 16px;
    border-bottom: 1px solid var(--ch-mm-line);
  }
  .ch-mm-promo__card {
    padding: 14px;
    border-radius: 10px;
  }
  .ch-mm-promo__flag {
    padding: 2px 6px;
    font-size: 9px;
  }
  .ch-mm-promo__card h3 {
    font-size: 16px;
  }
  .ch-mm-promo__card p {
    font-size: 11px;
    line-height: 1.3;
  }
  .ch-mm-promo__stores {
    gap: 6px;
  }
  .ch-mm-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px 16px;
    background: transparent;
  }
  .ch-mm-strip a {
    padding: 10px;
    border: 2px solid var(--ch-mm-primary);
    border-radius: 6px;
    color: var(--ch-mm-primary);
    font-size: 12px;
    text-align: center;
  }
  .ch-mm-strip__whatsapp {
    grid-column: 1 / -1;
    margin-left: 0;
    background: var(--ch-mm-primary);
    border-color: var(--ch-mm-primary);
    color: #fff !important;
  }
}

/* the 1080px floor belongs to the desktop layout only; stacked, the menu is as wide as the screen */
@media all and (max-width: 1024px) {
  .ch-mega-menu {
    overflow-x: visible;
  }
  .ch-mega-menu__inner {
    min-width: 0;
  }
  .ch-mm-panel__title--upper {
    flex-wrap: wrap;
    gap: 6px 10px;
  }
}

/* ---- the other mega menus, stacked the way the Features panel stacks ---- */
@media all and (max-width: 1199px) {
  .ch-mm-flat {
    min-width: 0;
  }
}

@media all and (max-width: 1024px) {
  .ch-mm-flat {
    grid-template-columns: 1fr;
  }
  .ch-mm-intro {
    gap: 10px;
    padding: 20px;
    border-right: 0;
    border-bottom: 1px solid var(--ch-mm-line);
  }
  .ch-mm-intro__cta {
    margin-top: 4px;
  }
  .ch-mm-cols--2,
  .ch-mm-cols--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ch-mm-cols {
    padding: 16px 20px;
    gap: 8px 16px;
  }
  .ch-mm-col__title {
    margin-left: 8px;
  }
  .ch-mm-cols .ch-mm-feature {
    padding: 8px;
  }
}

@media all and (max-width: 767px) {
  .ch-mm-cols--2,
  .ch-mm-cols--3 {
    grid-template-columns: 1fr;
  }
  .ch-mm-cols {
    padding: 12px 16px;
  }
  .ch-mm-intro {
    padding: 16px;
  }
  .ch-mm-col + .ch-mm-col {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--ch-mm-line);
  }
  .ch-mm-banner {
    padding: 12px 14px;
  }
  .ch-mm-banner__cta,
  .ch-mm-banner__stores {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
  .ch-mm-menu .ch-mm-strip span {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    font-size: 12px;
  }
  .ch-mm-menu .ch-mm-strip span:first-child {
    grid-column: 1 / -1;
  }
  .ch-mm-menu .ch-mm-strip__end {
    grid-column: 1 / -1;
    margin-left: 0;
    background: var(--ch-mm-menu-accent);
    border-color: var(--ch-mm-menu-accent);
    color: #fff !important;
  }
}

@media all and (max-width: 1024px) {
  .ch-mm-stack {
    gap: 16px;
    padding: 16px 20px;
  }
  .ch-mm-cards {
    grid-template-columns: 1fr;
  }
}

@media all and (max-width: 767px) {
  .ch-mm-stack {
    padding: 12px 16px;
  }
  .ch-mm-card {
    padding: 16px;
  }
  .ch-mm-chip {
    font-size: 12px;
    padding: 6px 12px;
  }
}

@media all and (max-width: 767px) {
  .ch-mm-steps {
    gap: 10px;
    padding: 12px 14px;
  }
  .ch-mm-steps__label,
  .ch-mm-steps__cta {
    width: 100%;
  }
  .ch-mm-steps__cta {
    margin-left: 0;
  }
}

/* the portal button keeps its icon when the header runs out of room */
@media all and (max-width: 575px) {
  .header-links li.ch-portal a.ch-portal__btn {
    padding: 9px 10px;
  }
  .ch-portal__label {
    display: none;
  }
  .header-menu-text ul.navbar-nav a.nav-link {
    font-size: 15px;
  }
}
