/* v18 — fixed bottom navigation inspired by Telegram Web; mobile topbar contains search only */
@media (max-width:900px){
  html body.store-body{--mobile-bottom-nav-h:76px}
  html body.store-body .main{padding:8px 8px calc(var(--mobile-bottom-nav-h) + 18px + env(safe-area-inset-bottom))!important}

  /* Top app bar: search only */
  html body.store-body.ui-topbar-v849 .topbar.topbar-v849,
  html body.store-body .topbar.topbar-v849{
    position:sticky!important;top:0!important;z-index:1180!important;
    display:block!important;width:100%!important;height:58px!important;min-height:58px!important;
    margin:0 0 8px!important;padding:6px!important;border:1px solid rgba(182,204,231,.82)!important;border-radius:18px!important;
    background:rgba(255,255,255,.96)!important;box-shadow:0 8px 24px rgba(40,73,120,.08)!important;
    backdrop-filter:blur(18px) saturate(150%)!important;-webkit-backdrop-filter:blur(18px) saturate(150%)!important
  }
  html body.store-body .topbar.topbar-v849>.search{
    display:flex!important;width:100%!important;min-width:0!important;max-width:none!important;height:44px!important;min-height:44px!important;
    margin:0!important;padding:0 14px!important;border:0!important;border-radius:14px!important;background:#eef4fa!important;box-shadow:none!important
  }
  html body.store-body .topbar.topbar-v849>.search .quick-trigger-placeholder-v175{font-size:14px!important;font-weight:650!important;color:#71839a!important}
  html body.store-body .topbar.topbar-v849>.search .i,
  html body.store-body .topbar.topbar-v849>.search iconify-icon{width:20px!important;height:20px!important;font-size:20px!important;color:#0a84ff!important}
  html body.store-body .topbar.topbar-v849>.search kbd{display:none!important}
  html body.store-body .topbar.topbar-v849>.lang-switch,
  html body.store-body .topbar.topbar-v849>.notifications-shell-v283,
  html body.store-body .topbar.topbar-v849>.cart-shell-v11,
  html body.store-body .topbar.topbar-v849>.profile-menu-shell-v285,
  html body.store-body .topbar.topbar-v849>.guest-login-v931,
  html body.store-body .topbar.topbar-v849>.mobile-nav-toggle-v13{display:none!important}

  /* Disable the old side drawer on phones */
  html body.store-body .mobile-nav-backdrop-v13,
  html body.store-body .sidebar.is-compact,
  html body.store-body .sidebar.is-compact.mobile-open-v13{display:none!important;visibility:hidden!important;pointer-events:none!important;transform:none!important}

  /* Telegram-like bottom navigation */
  html body.store-body .mobile-bottom-nav-v18{
    position:fixed!important;left:8px!important;right:8px!important;bottom:calc(8px + env(safe-area-inset-bottom))!important;z-index:2250!important;
    display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;align-items:center!important;gap:2px!important;
    min-height:68px!important;padding:6px!important;border:1px solid rgba(122,148,181,.28)!important;border-radius:24px!important;
    background:rgba(248,251,255,.94)!important;box-shadow:0 18px 52px rgba(25,51,86,.2),inset 0 1px 0 rgba(255,255,255,.92)!important;
    backdrop-filter:blur(24px) saturate(160%)!important;-webkit-backdrop-filter:blur(24px) saturate(160%)!important
  }
  html body.store-body .mobile-bottom-nav-v18>button{
    position:relative!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:3px!important;
    min-width:0!important;height:56px!important;margin:0!important;padding:4px 2px!important;border:0!important;border-radius:17px!important;
    background:transparent!important;color:#718198!important;box-shadow:none!important;-webkit-tap-highlight-color:transparent!important
  }
  html body.store-body .mobile-bottom-nav-v18>button:active{transform:scale(.96)!important}
  html body.store-body .mobile-bottom-nav-v18>button.active{background:#e8f2ff!important;color:#0a84ff!important}
  html body.store-body .mobile-bottom-nav-v18>button .i,
  html body.store-body .mobile-bottom-nav-v18>button iconify-icon{width:23px!important;height:23px!important;font-size:23px!important;color:currentColor!important}
  html body.store-body .mobile-bottom-nav-v18>button:after{display:block!important;max-width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-size:9.5px!important;line-height:1.05!important;font-weight:750!important;letter-spacing:-.01em!important;color:currentColor!important}
  html[lang=ru] body.store-body .mobile-bottom-nav-v18>button:nth-child(1):after{content:'Главная'}
  html[lang=ru] body.store-body .mobile-bottom-nav-v18>button:nth-child(2):after{content:'Каталог'}
  html[lang=ru] body.store-body .mobile-bottom-nav-v18>button:nth-child(3):after{content:'Заказы'}
  html[lang=ru] body.store-body .mobile-bottom-nav-v18>button:nth-child(4):after{content:'Корзина'}
  html[lang=ru] body.store-body .mobile-bottom-nav-v18>button:nth-child(5):after{content:'Профиль'}
  html[lang=uk] body.store-body .mobile-bottom-nav-v18>button:nth-child(1):after{content:'Головна'}
  html[lang=uk] body.store-body .mobile-bottom-nav-v18>button:nth-child(2):after{content:'Каталог'}
  html[lang=uk] body.store-body .mobile-bottom-nav-v18>button:nth-child(3):after{content:'Замовлення'}
  html[lang=uk] body.store-body .mobile-bottom-nav-v18>button:nth-child(4):after{content:'Кошик'}
  html[lang=uk] body.store-body .mobile-bottom-nav-v18>button:nth-child(5):after{content:'Профіль'}
  html[lang=en] body.store-body .mobile-bottom-nav-v18>button:nth-child(1):after{content:'Home'}
  html[lang=en] body.store-body .mobile-bottom-nav-v18>button:nth-child(2):after{content:'Catalog'}
  html[lang=en] body.store-body .mobile-bottom-nav-v18>button:nth-child(3):after{content:'Orders'}
  html[lang=en] body.store-body .mobile-bottom-nav-v18>button:nth-child(4):after{content:'Cart'}
  html[lang=en] body.store-body .mobile-bottom-nav-v18>button:nth-child(5):after{content:'Profile'}
  html body.store-body .mobile-bottom-nav-v18>button>b{
    position:absolute!important;top:-5px!important;right:-9px!important;display:grid!important;place-items:center!important;min-width:17px!important;height:17px!important;padding:0 4px!important;
    border:2px solid #f8fbff!important;border-radius:99px!important;background:#ff3b62!important;color:#fff!important;font-size:8px!important;font-weight:800!important;line-height:1!important
  }

  /* Keep floating UI above the bottom bar */
  html body.store-body .front-admin-speed-dial-v860{bottom:calc(var(--mobile-bottom-nav-h) + 18px + env(safe-area-inset-bottom))!important}
  html body.store-body .cart-drawer,
  html body.store-body .cart-drawer-v170{padding-bottom:calc(var(--mobile-bottom-nav-h) + env(safe-area-inset-bottom))!important}
  html body.store-body .toast-card{bottom:calc(var(--mobile-bottom-nav-h) + 16px + env(safe-area-inset-bottom))!important}
  html body.store-body .site-footer,
  html body.store-body .compact-footer{margin-bottom:8px!important}
}

@media (max-width:430px){
  html body.store-body{--mobile-bottom-nav-h:72px}
  html body.store-body .main{padding:6px 6px calc(var(--mobile-bottom-nav-h) + 14px + env(safe-area-inset-bottom))!important}
  html body.store-body .topbar.topbar-v849{height:54px!important;min-height:54px!important;padding:5px!important;border-radius:16px!important}
  html body.store-body .topbar.topbar-v849>.search{height:42px!important;min-height:42px!important;border-radius:13px!important;padding:0 12px!important}
  html body.store-body .mobile-bottom-nav-v18{left:6px!important;right:6px!important;bottom:calc(6px + env(safe-area-inset-bottom))!important;min-height:64px!important;padding:5px!important;border-radius:22px!important}
  html body.store-body .mobile-bottom-nav-v18>button{height:54px!important;border-radius:16px!important}
  html body.store-body .mobile-bottom-nav-v18>button .i,
  html body.store-body .mobile-bottom-nav-v18>button iconify-icon{width:22px!important;height:22px!important;font-size:22px!important}
  html body.store-body .mobile-bottom-nav-v18>button:after{font-size:9px!important}
}

@media (min-width:901px){
  html body.store-body .mobile-bottom-nav-v18{display:none!important}
}
