/*
 * SRV-CORE Nexus mobile header — Bana-style: [menu] [logo center] [cart]
 * Deploy: templates/nexus/css/ + orderforms/nexus_cart*/css/
 */

header.header .srvcore-nav-brand .logo-img {
  display: block !important;
  visibility: visible !important;
  max-height: 2.75rem;
  width: auto;
  height: auto;
}

header.header .srvcore-site-nav,
header.header .main-navbar-wrapper {
  background: #fff !important;
}

header.header .srvcore-nav-bar,
header.header .main-navbar-wrapper > .container.srvcore-nav-bar {
  background: #fff !important;
  border-bottom: 1px solid #e8eaed !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

header.header .srvcore-nav-bar-end {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 0.25rem !important;
  flex: 0 0 auto !important;
  margin-left: auto !important;
}

header.header .srvcore-nav-cart {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative;
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem !important;
  margin: 0 !important;
  color: #64748b !important;
  text-decoration: none !important;
  line-height: 1 !important;
  border-radius: 0.5rem;
  transition: color 0.15s, background 0.15s;
}

header.header .srvcore-nav-cart:hover,
header.header .srvcore-nav-cart:focus {
  color: var(--primary, #1062fe) !important;
  background: #f1f5f9;
  text-decoration: none !important;
}

header.header .srvcore-nav-cart .fa-shopping-cart {
  font-size: 1.25rem;
  line-height: 1;
}

header.header .srvcore-nav-cart #cartItemCount {
  position: absolute;
  top: 4px;
  right: 2px;
  transform: translate(25%, -25%);
  margin: 0 !important;
  font-size: 0.625rem !important;
  min-width: 1.1rem;
  padding: 0.15em 0.4em !important;
  background: #e31e24 !important;
  color: #fff !important;
}

header.header .srvcore-nav-cart #cartItemCount.srvcore-cart-count-empty,
header.header .srvcore-nav-cart #cartItemCount.w-hidden {
  display: none !important;
}

header.header .srvcore-nav-toggler {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem !important;
  margin: 0 !important;
  border: none !important;
  background: transparent !important;
  color: #64748b !important;
  box-shadow: none !important;
  line-height: 1 !important;
  border-radius: 0.5rem;
  transition: color 0.15s, background 0.15s;
}

header.header .srvcore-nav-toggler .fa-bars {
  font-size: 1.25rem;
}

header.header .srvcore-nav-toggler:hover,
header.header .srvcore-nav-toggler:focus {
  color: var(--primary, #1062fe) !important;
  background: #f1f5f9;
}

/* Desktop: logo left, nav inline, cart right */
@media (min-width: 1200px) {
  header.header .srvcore-nav-bar,
  header.header .main-navbar-wrapper > .container.srvcore-nav-bar {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    padding: 0.625rem 1.5rem !important;
    min-height: 64px;
  }

  header.header .srvcore-nav-toggler {
    display: none !important;
  }

  header.header .srvcore-nav-brand {
    order: 1;
    flex: 0 0 auto;
    flex-shrink: 0;
    margin-right: 1rem !important;
  }

  header.header #mainNavbar {
    order: 2;
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    max-width: none;
  }

  header.header .srvcore-nav-bar-end {
    order: 3;
    flex: 0 0 auto;
    flex-shrink: 0;
    margin-left: 1rem !important;
    align-self: center;
  }
}

/* Mobile: Bana-style 3-column bar */
@media (max-width: 1199.98px) {
  header.header .srvcore-nav-bar,
  header.header .main-navbar-wrapper > .container.srvcore-nav-bar {
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    grid-template-rows: auto auto;
    align-items: center !important;
    column-gap: 0.5rem;
    row-gap: 0;
    flex-wrap: nowrap !important;
    padding: 0.5rem 0.875rem !important;
    min-height: 56px;
    max-width: 100%;
    width: 100%;
    margin: 0;
    border-radius: 0 !important;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
  }

  header.header .srvcore-nav-toggler {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    align-self: center;
  }

  header.header .srvcore-nav-brand {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    align-self: center;
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100%;
    text-align: center;
  }

  header.header .srvcore-nav-brand .logo-img {
    max-height: 2.25rem;
    width: auto;
    margin: 0 auto;
    display: block;
  }

  header.header .srvcore-nav-bar-end {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    margin-left: 0 !important;
  }

  header.header #mainNavbar,
  header.header .srvcore-nav-collapse {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100% !important;
    max-width: 100% !important;
  }

  html.srvcore-mobile-nav-fixed header.header .srvcore-nav-bar,
  html.srvcore-mobile-nav-fixed header.header .main-navbar-wrapper > .container.srvcore-nav-bar {
    flex-wrap: nowrap !important;
  }
}
