/* gkk-design-foundation 1.0.35: compact mobile/tablet header (switch mobile_header_centered).
   When the hamburger is already showing (Elementor tablet breakpoint and below, 1024px):
   one compact row — hamburger on the left, logo centered, cart on the right.
   The header site title ("God's Kratom Kingdom") and slogan ("IN GOD'S PLANTS WE TRUST")
   are hidden; the logo and the green announce bar already say both.
   Desktop (horizontal menu, wider than 1024px) is not changed. The green announce bar
   and the welcome bar are not changed. Nothing is deleted. */

@media (max-width: 1024px) {
  /* Title + slogan: header only. Footer and other pages keep them. */
  header.elementor-location-header .gkk-wordmark,
  header.elementor-location-header .gkk-slogan,
  header.elementor-location-header .elementor-element-9cff402 {
    display: none !important;
  }

  header.elementor-location-header .gkk-header-main {
    position: relative !important;
  }

  header.elementor-location-header .gkk-header-main > .e-con-inner {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    position: relative !important;
    min-height: 72px;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    gap: 8px;
  }

  /* Logo column: take it out of the flow and truly center it in the row.
     width:auto so a full-width container cannot cover the hamburger or cart. */
  header.elementor-location-header .gkk-header-main > .e-con-inner > .e-con:has(.gkk-seal),
  header.elementor-location-header .gkk-header-main .elementor-element-70d7e6d {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: auto !important;
    max-width: calc(100% - 180px) !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    inset-inline-start: 50% !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    pointer-events: none;
    z-index: 1;
  }

  header.elementor-location-header .gkk-seal,
  header.elementor-location-header .gkk-seal a {
    pointer-events: auto;
    width: auto !important;
    margin: 0 !important;
  }

  header.elementor-location-header .gkk-header .gkk-seal img,
  header.elementor-location-header .gkk-header .elementor-widget-image img {
    width: 64px !important;
    max-width: 64px !important;
    height: auto !important;
  }

  /* Hamburger: left, shrunk to the toggle, good tap target. */
  header.elementor-location-header .gkk-header-main .elementor-widget-nav-menu {
    order: 1;
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    justify-content: flex-start !important;
    align-self: center !important;
    z-index: 2;
    /* Let the dropdown position against the header row, not this narrow widget. */
    position: static !important;
  }

  header.elementor-location-header .elementor-menu-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
  }

  /* Cart: right, keep the total and the count badge. */
  header.elementor-location-header .gkk-header-main .elementor-widget-woocommerce-menu-cart {
    order: 3;
    flex: 0 0 auto !important;
    width: auto !important;
    margin: 0 0 0 auto !important;
    padding: 0 !important;
    align-self: center !important;
    z-index: 2;
  }

  /* Full-width dropdown under the header row (nav widget is position:static).
     The live menu was already white text on a white panel (a pre-existing
     contrast bug from the header nav color). Paint the panel the same dark
     color as the header so the links are readable. */
  header.elementor-location-header .gkk-header-main .elementor-nav-menu--dropdown,
  header.elementor-location-header .gkk-header-main .elementor-nav-menu--dropdown.elementor-nav-menu__container {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    top: 100% !important;
    z-index: 20;
    background-color: #1C1C1C !important;
  }

  header.elementor-location-header .gkk-header-main .elementor-nav-menu--dropdown .elementor-item,
  header.elementor-location-header .gkk-header-main .elementor-nav-menu--dropdown a {
    color: #ffffff !important;
    padding: 12px 20px !important;
  }

  header.elementor-location-header .gkk-header-main .elementor-nav-menu--dropdown .elementor-item:hover,
  header.elementor-location-header .gkk-header-main .elementor-nav-menu--dropdown .elementor-item:focus,
  header.elementor-location-header .gkk-header-main .elementor-nav-menu--dropdown a:hover,
  header.elementor-location-header .gkk-header-main .elementor-nav-menu--dropdown a:focus {
    color: #F5B806 !important;
  }
}
