/* Shared mobile navigation: profile label alignment with index compact height. */
.mobile-bottom-spacer,
.mobile-bottom-bar {
  display: none !important;
}

@media (max-width: 768px) {
  .mobile-bottom-spacer {
    display: block !important;
    height: calc(84px + env(safe-area-inset-bottom)) !important;
    flex: 0 0 auto;
  }

  html body .mobile-bottom-bar {
    position: fixed !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    z-index: 9999 !important;
    display: flex !important;
    align-items: stretch !important;
    justify-content: space-around !important;
    gap: 0 !important;
    box-sizing: border-box !important;
    width: 100% !important;
    height: calc(64px + env(safe-area-inset-bottom)) !important;
    min-height: calc(64px + env(safe-area-inset-bottom)) !important;
    margin: 0 !important;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom)) !important;
    border: 0 !important;
    border-top: 1px solid var(--line, rgba(255, 255, 255, 0.1)) !important;
    border-radius: 0 !important;
    background: var(--surface, #161a20) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  html body .mobile-bottom-bar #mobileSettingsBtn {
    display: none !important;
  }

  html body .mobile-bottom-bar .mobile-bottom-icon {
    position: relative !important;
    display: flex !important;
    flex: 1 1 0 !important;
    flex-direction: column !important;
    align-self: stretch !important;
    align-items: center !important;
    justify-content: flex-start !important;
    min-width: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 1px 6px 6px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: transparent !important;
    color: var(--text-muted, #98a0aa) !important;
    box-shadow: none !important;
    filter: none !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
  }

  html body .mobile-bottom-bar .mobile-bottom-icon:hover {
    background: transparent !important;
    color: var(--text-muted, #98a0aa) !important;
    transform: none !important;
  }

  html body .mobile-bottom-bar .mobile-bottom-icon.active,
  html body .mobile-bottom-bar .mobile-bottom-icon.active-tab {
    background: transparent !important;
    color: var(--brand, var(--primary, #4fe6b8)) !important;
  }

  html body .mobile-bottom-bar .mobile-bottom-icon svg,
  html body .mobile-bottom-bar .mobile-bottom-icon .me-icon {
    width: 25px !important;
    height: 25px !important;
    margin: 0 !important;
    color: currentColor !important;
    fill: currentColor !important;
    stroke: none !important;
    stroke-width: 0 !important;
    filter: none !important;
    pointer-events: none;
  }

  html body .mobile-bottom-bar .mobile-bottom-icon svg use {
    color: currentColor !important;
    fill: currentColor !important;
  }

  html body .mobile-bottom-bar .mobile-bottom-icon.active svg,
  html body .mobile-bottom-bar .mobile-bottom-icon.active-tab svg,
  html body .mobile-bottom-bar .mobile-bottom-icon.active .mobile-cart-icon-wrap,
  html body .mobile-bottom-bar .mobile-bottom-icon.active-tab .mobile-cart-icon-wrap {
    color: var(--brand, var(--primary, #4fe6b8)) !important;
    fill: var(--brand, var(--primary, #4fe6b8)) !important;
    stroke: none !important;
    filter: none !important;
  }

  html body .mobile-bottom-bar .mobile-bottom-icon.active svg use,
  html body .mobile-bottom-bar .mobile-bottom-icon.active-tab svg use {
    color: var(--brand, var(--primary, #4fe6b8)) !important;
    fill: var(--brand, var(--primary, #4fe6b8)) !important;
  }

  html body .mobile-bottom-bar .mobile-bottom-label {
    margin-top: 5px !important;
    color: currentColor !important;
    font-family: inherit !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    pointer-events: none;
  }

  html body .mobile-bottom-bar .mobile-bottom-label::before {
    content: none !important;
  }

  html body .mobile-bottom-bar .mobile-cart-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* The cart is the only item whose icon sits inside a wrapper (it carries the
       badge). Without an explicit box the wrapper picks up the line box around
       the svg, which pushes its label a couple of pixels lower than "Home"/"Me". */
    width: 25px;
    height: 25px;
    line-height: 0;
  }

  html body .mobile-bottom-bar .cart-badge {
    position: absolute !important;
    top: -6px !important;
    right: -10px !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 17px !important;
    height: 17px !important;
    padding: 0 4px !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: var(--brand, var(--primary, #4fe6b8)) !important;
    color: var(--on-brand, #04231a) !important;
    box-shadow: none !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    transform: none !important;
  }

  html body .mobile-bottom-bar .cart-badge.active {
    display: inline-flex !important;
  }
}
