/* ============================================
   BOTTOM NAV MOBILE — SINGLE SOURCE OF TRUTH
   Organic Urban — Mobile Bottom Navigation Bar
   ============================================

   Fixed app-like bottom navigation for mobile.
   Loaded by both head-meta.php (via mobile-ux-fixes.css)
   and blog-head-css.php (directly) so all pages — including
   blog pages — render the bottom nav consistently.

   Markup: includes/mobile-bottom-nav.php
   ============================================ */

/* Hide on desktop — only show inside the mobile media query */
#mobile-bottom-nav {
  display: none;
}

@media screen and (max-width: 768px) {

  #mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(var(--mobile-bottom-nav-height, 64px) + env(safe-area-inset-bottom));
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 4px;
    z-index: var(--z-bottom-nav, 9000);
  }

  #mobile-bottom-nav .mobile-bottom-nav__item {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 4px;
    border-radius: 12px;
    color: #2f2a24;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1),
      background 0.2s ease,
      opacity 0.15s ease;
  }

  #mobile-bottom-nav .mobile-bottom-nav__item:active {
    transform: scale(0.96);
    opacity: 0.92;
  }

  #mobile-bottom-nav .mobile-bottom-nav__icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  #mobile-bottom-nav .mobile-bottom-nav__label {
    font-size: 10px;
    line-height: 1;
    font-weight: 600;
    letter-spacing: 0.01em;
    opacity: 0.85;
  }

  #mobile-bottom-nav .mobile-bottom-nav__item.is-active {
    background: rgba(123, 154, 122, 0.12);
    color: #1f4d41;
  }

  #mobile-bottom-nav .mobile-bottom-nav__item.is-active .mobile-bottom-nav__label {
    opacity: 1;
  }

  #mobile-bottom-nav .mobile-bottom-nav__badge {
    position: absolute;
    top: -6px;
    right: -10px;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.25);
  }

  /* Sticky product action bar should sit above bottom nav */
  .sticky-cart-bar {
    bottom: calc(var(--mobile-bottom-nav-height, 0px) + env(safe-area-inset-bottom));
    z-index: calc(var(--z-sticky, 2000) + 1);
  }

}
