/* Keep the mobile dropdown anchored to the header, rather than its icon. */
@media (max-width: 1024px) {
  .elementor-location-header .elementor-widget-jet-mega-menu {
    position: static !important;
  }

  .elementor-location-header .jet-mega-menu--layout-dropdown {
    position: static;
  }

  .elementor-location-header .jet-mega-menu--layout-dropdown > .jet-mega-menu-container {
    left: 16px;
    right: 16px;
    width: auto;
    max-width: none;
    max-height: var(--eggo-dropdown-max-height, calc(100vh - 136px)) !important;
    overscroll-behavior: contain;
  }

  /* These children already request full tablet width; stack their parent. */
  body.home .elementor-element.elementor-element-62e00c7,
  body.home .elementor-element.elementor-element-ac6716a {
    --flex-direction: column;
    flex-direction: column;
  }

  body.home .elementor-element.elementor-element-62e00c7 > .e-con,
  body.home .elementor-element.elementor-element-ac6716a > .e-con {
    --width: 100%;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  /* The promotion artwork must fit its slide instead of spilling into others. */
  body.home .eggo-coma img {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    transform: none !important;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  body .custom-tabs-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  body .custom-tabs-nav .custom-tab-nav-item {
    min-width: 0;
    max-width: 100%;
  }

  body .custom-tabs-nav .tab-title-text {
    overflow-wrap: anywhere;
  }
}

/* The Mijas canvas has no outer gutter to absorb these negative margins. */
.elementor-1004785 .jet-carousel {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

body.home .ti-reviews-container-wrapper,
.elementor-1004785 .ti-reviews-container-wrapper {
  max-width: 100%;
  margin-left: 0 !important;
  margin-right: 0 !important;
  overflow: hidden;
}

/* Closed popovers must not create an offscreen page-width contribution. */
.elementor-location-header .jet-mega-menu-item__inner[aria-expanded="false"] ~ .jet-mega-menu-mega-container,
.elementor-location-header .jet-mega-menu--layout-dropdown:not(.jet-mega-menu--dropdown-open) > .jet-mega-menu-container {
  display: none;
}

/* Contain the staff track while the native Slick carousel initializes. */
.elementor-1004785 .elementor-slick-slider:not(.slick-initialized) {
  overflow: hidden;
}

/* Keep the staff-carousel controls inside the canvas at every width. */
.elementor.elementor-1004785 .elementor-element.elementor-element-c0d4cb3 .jet-carousel .jet-arrow.next-arrow {
  left: auto !important;
  right: 8px !important;
}

.elementor.elementor-1004785 .elementor-element.elementor-element-c0d4cb3 .jet-carousel .jet-arrow.prev-arrow {
  left: 8px !important;
  right: auto !important;
}

/* Remove desktop-only padding and column heights from the stacked promotion. */
@media (max-width: 1024px) {
  body.home .elementor-element.elementor-element-ac6716a {
    padding: 40px 20px;
  }
  body.home .elementor-element.elementor-element-ac6716a > .e-con {
    --min-height: 0;
    min-height: 0;
  }
}
