/* Mobile Bottom Navigation — floating Apple-inspired, RTL-ready */
:root{
  --bn-height: 72px;
  --bn-bg: #ffffff;
  --bn-accent: #000000; /* change to your accent */
  --bn-muted: #8a8a8a;
  --bn-shadow: 0 10px 30px rgba(17,17,17,0.12);
}

/* Only show on small screens */
@media (max-width: 768px) {
  #bottom-nav-root {
    position: fixed;
    inset: auto 0 0 0; /* bottom:0 */
    display: flex;
    justify-content: center;
    pointer-events: none; /* container doesn't block page unless nav used */
    z-index: 12050; /* high but avoid colliding with top nav */
  }

  .bn-container {
    justify-content: space-around;
    pointer-events: auto;
    display: flex;
    gap: 6px;
    align-items: center;
    direction: rtl; /* ensure labels & icon order match Arabic */
    background: linear-gradient(180deg, rgba(255,255,255,0.98), var(--bn-bg));
    border-radius: 999px;
    padding: 10px 12px;
    margin: calc(env(safe-area-inset-bottom, 0px) + 8px);
    box-shadow: var(--bn-shadow);
    transform: translateY(0);
    height: calc(var(--bn-height));
    min-width: 360px;
    max-width: calc(100% - 28px);
    align-self: end;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    margin: 5px auto;

  }

  /* Individual tab */
  .bn-tab{
    display:flex;
    flex-direction: column;
    align-items:center;
    justify-content:center;
    gap:4px;
    background: transparent;
    border: none;
    padding: 6px 10px;
    border-radius: 12px;
    color: var(--bn-muted);
    font-weight: 600;
    font-size: 12px;
    min-width: 56px;
    transition: color .18s ease, transform .12s ease;
  }

  .bn-icon { display:block; width:22px; height:22px; color: currentColor; transition: transform .14s ease; }
  .bn-label{ font-size:11px; color:inherit; display:block; line-height:1; }

  /* Active state */
  .bn-tab.active{ color: var(--bn-accent); }
  .bn-tab.active::after{
    content: '';
    display:block;
    width: 22px;
    height: 3px;
    background: linear-gradient(90deg, var(--bn-accent), rgba(0,0,0,0.7));
    border-radius: 4px;
    margin-top:6px;
  }

  /* Icon tap scale - removed for mobile */
  /* .bn-tab:active .bn-icon,
  .bn-tab.scaling .bn-icon { transform: scale(0.92); } */
  .bn-tab .bn-icon { transform-origin: center; }

  /* Cart badge */
  .bn-cart{ position: relative; }
  .bn-badge{
    position: absolute;
    top: -6px;
    left: 18px; /* for RTL: push to left of icon */
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e53935;
    color: #fff;
    font-size: 11px;
    font-weight:700;
    display:flex;
    align-items:center;
    justify-content:center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
  }

  /* Wishlist badge */
  .bn-wishlist{ position: relative; }
  .bn-wishlist-badge{
           position: absolute;
        top: 5px;
        left: 18px;
        min-width: 20px;
        height: 20px;
        padding: 0 6px;
        border-radius: 999px;
        background: #d32f2f;
        color: #fff;
        font-size: 11px;
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  }

  /* Accessibility focus */
  .bn-tab:focus-visible{ outline: none; box-shadow: 0 6px 18px rgba(0,0,0,0.12); }

  /* Hide on large screens */
}

/* Hide completely on widths above mobile breakpoint */
@media (min-width: 769px){
  #bottom-nav-root{ display: none !important; }
}
