/* =========================================================
   BOTTOM NAVIGATION BAR — App-style (mobile only)
   Konsisten dengan neon gaming dark theme
   Hidden di desktop (>=900px) karena sidebar sudah cover navigasi
   ========================================================= */

.bn-nav{
  /* hidden di desktop */
  display: none;
}

/* === MOBILE/TABLET: show as fixed bottom bar === */
@media (max-width: 899px){

  .bn-nav{
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9000;

    /* dark gradient bg + backdrop blur */
    background: linear-gradient(180deg,
      rgba(20, 10, 35, .85) 0%,
      rgba(10, 4, 24, .98) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);

    /* neon top border accent */
    box-shadow:
      0 -1px 0 rgba(168,85,247,.3),
      0 -8px 32px rgba(0,0,0,.5);

    /* safe area inset for notch phones */
    padding-bottom: env(safe-area-inset-bottom, 0);

    /* selalu animasi */
    transition: transform .3s cubic-bezier(.16,1,.3,1);
  }

  /* neon gradient line di atas (replace plain border) */
  .bn-nav::before{
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
      transparent 0%,
      #a855f7 30%,
      #ec4899 50%,
      #06b6d4 70%,
      transparent 100%);
    opacity: .7;
  }

  .bn-inner{
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    max-width: 600px;
    margin: 0 auto;
    padding: 4px 4px;
  }

  .bn-item{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 10px 4px 8px;
    text-decoration: none;
    color: rgba(255,255,255,.55);
    font-family: inherit;
    transition: all .25s ease;
    position: relative;
    border-radius: 12px;
    -webkit-tap-highlight-color: transparent;
    min-height: 56px;
  }

  /* HOVER state */
  .bn-item:hover{
    color: rgba(255,255,255,.85);
    background: rgba(168,85,247,.08);
  }

  /* ACTIVE press feedback */
  .bn-item:active{
    transform: scale(.92);
    background: rgba(168,85,247,.15);
  }

  /* === ACTIVE (current page) === */
  .bn-item.is-active{
    color: #fff;
  }

  /* indicator dot di atas active item */
  .bn-item.is-active::before{
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: linear-gradient(90deg, #a855f7, #ec4899);
    box-shadow: 0 0 12px rgba(168,85,247,.6);
  }

  /* icon container active: gradient bg + glow */
  .bn-item.is-active .bn-icon{
    background: linear-gradient(135deg, rgba(168,85,247,.25), rgba(236,72,153,.15));
    box-shadow:
      inset 0 0 0 1px rgba(168,85,247,.4),
      0 4px 14px rgba(168,85,247,.3);
  }

  .bn-item.is-active .bn-icon svg{
    stroke: #fff;
    filter: drop-shadow(0 0 8px rgba(168,85,247,.7));
  }

  .bn-item.is-active .bn-label{
    font-weight: 700;
    background: linear-gradient(90deg, #a855f7, #ec4899);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  /* === ICON CONTAINER === */
  .bn-icon{
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .25s ease;
  }

  /* === CART BADGE === */
  .bn-badge{
    position: absolute;
    top: -4px;
    right: -6px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ef4444, #ec4899);
    color: #fff;
    font-size: 9.5px;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(236,72,153,.5), 0 0 0 2px rgba(10,4,24,.9);
    pointer-events: none;
  }

  .bn-icon svg{
    width: 20px;
    height: 20px;
    display: block;
    transition: all .25s ease;
  }

  /* === LABEL === */
  .bn-label{
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .3px;
    line-height: 1;
    text-align: center;
  }

  /* === Body padding adjustment supaya content tidak ketutupan bottom nav ===
     Nav height ~68px + 30px buffer untuk konten tidak nempel = 98px */
  body.has-bottom-nav{
    padding-bottom: calc(98px + env(safe-area-inset-bottom, 0));
  }

  /* hide saat sidebar open (optional) */
  body.as-sidebar-open .bn-nav{
    transform: translateY(100%);
  }
}

/* === SMALL PHONE === */
@media (max-width: 380px){
  .bn-item{ padding: 8px 2px 6px; min-height: 52px; }
  .bn-icon{ width: 28px; height: 28px; }
  .bn-icon svg{ width: 18px; height: 18px; }
  .bn-label{ font-size: 9.5px; letter-spacing: 0; }
}
@media (max-width: 340px){
  .bn-label{ font-size: 9px; }
}
