/* Mobile header v8 — premium compact search + proper popup */
@media (max-width: 860px){
  .bz-header,
  .bidluna-header,
  header.bz-header{
    position:sticky;
    top:var(--bz-adminbar-h, 0px);
    z-index:1000;
    isolation:isolate;
    overflow:visible;
    background:
      radial-gradient(circle at 12% 16%, rgba(248, 209, 99, .24) 0, rgba(248, 209, 99, 0) 18%),
      radial-gradient(circle at 88% 14%, rgba(95, 161, 255, .20) 0, rgba(95, 161, 255, 0) 18%),
      radial-gradient(circle at 62% 110%, rgba(137, 94, 255, .16) 0, rgba(137, 94, 255, 0) 24%),
      linear-gradient(135deg, rgba(5, 14, 31, .96) 0%, rgba(9, 24, 53, .96) 42%, rgba(14, 49, 107, .96) 100%),
      url("../images/header-cosmos-bg.webp") center top / cover no-repeat !important;
    box-shadow:0 18px 36px rgba(3, 12, 34, .20) !important;
    border-bottom:1px solid rgba(255,255,255,.06);
  }

  .bz-header::before,
  .bidluna-header::before,
  header.bz-header::before{
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    background-image:
      radial-gradient(circle at 8% 22%, rgba(255,255,255,.80) 0 1px, transparent 2px),
      radial-gradient(circle at 19% 74%, rgba(255,255,255,.42) 0 1px, transparent 2px),
      radial-gradient(circle at 35% 18%, rgba(255,255,255,.55) 0 1px, transparent 2px),
      radial-gradient(circle at 54% 62%, rgba(255,255,255,.34) 0 1px, transparent 2px),
      radial-gradient(circle at 72% 26%, rgba(255,255,255,.48) 0 1px, transparent 2px),
      radial-gradient(circle at 91% 18%, rgba(255,255,255,.34) 0 1px, transparent 2px);
    opacity:.38;
  }

  .bz-header::after,
  .bidluna-header::after,
  header.bz-header::after{
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    background:
      linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,0) 42%),
      radial-gradient(circle at 16% 0%, rgba(255, 220, 133, .18) 0, rgba(255, 220, 133, 0) 24%);
    opacity:.72;
  }

  .bz-header > *{
    position:relative;
    z-index:1;
  }

  .bz-header .bz-infostrip,
  .bz-header .bz-infostrip.bz-only-desktop{
    display:none !important;
  }

  .bz-topbar{
    display:grid !important;
    grid-template-columns:60px minmax(0, 1fr) 112px !important;
    align-items:center !important;
    gap:8px !important;
    min-height:unset !important;
    margin:0 !important;
    padding:8px 8px 8px 10px !important;
  }

  .bz-logo-wrap{
    width:60px !important;
    min-width:60px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
  }

  .bz-mobile-brand{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:52px !important;
    min-width:52px !important;
    height:52px !important;
    border-radius:18px !important;
    border:1px solid rgba(255,255,255,.18) !important;
    background:
      linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.08)) !important;
    box-shadow:
      0 12px 24px rgba(3, 11, 30, .22),
      inset 0 1px 0 rgba(255,255,255,.16) !important;
  }

  .bz-mobile-brand img{
    width:42px !important;
    height:42px !important;
    max-width:none !important;
    max-height:none !important;
    object-fit:contain !important;
    filter:drop-shadow(0 6px 12px rgba(0,0,0,.18));
  }

  .bz-logo-wrap .bz-logo,
  .bz-logo-wrap .custom-logo-link,
  .bz-logo-wrap .custom-logo{
    display:none !important;
  }

  #bidlunaHeaderSearchMobile.bz-mobile-premium-search{
    position:relative !important;
    display:grid !important;
    grid-template-columns:16px minmax(0, 1fr) 34px !important;
    align-items:center !important;
    gap:8px !important;
    width:100% !important;
    min-width:0 !important;
    height:44px !important;
    min-height:44px !important;
    padding:0 5px 0 12px !important;
    margin:0 !important;
    border-radius:20px !important;
    border:1px solid rgba(255,255,255,.18) !important;
    background:
      linear-gradient(180deg, rgba(255,255,255,.98), rgba(245,248,253,.95)) padding-box,
      linear-gradient(135deg, rgba(255,255,255,.86), rgba(92,147,234,.30)) border-box !important;
    box-shadow:
      0 12px 24px rgba(4, 16, 38, .18),
      inset 0 1px 0 rgba(255,255,255,.98) !important;
    overflow:hidden !important;
  }

  #bidlunaHeaderSearchMobile.bz-mobile-premium-search::before{
    content:"" !important;
    position:absolute !important;
    inset:1px !important;
    border-radius:19px !important;
    background:
      linear-gradient(180deg, rgba(255,255,255,.42), rgba(255,255,255,0) 44%),
      radial-gradient(circle at 10% 50%, rgba(255, 214, 118, .10) 0%, rgba(255, 214, 118, 0) 16%) !important;
    pointer-events:none !important;
  }

  #bidlunaHeaderSearchMobile > *{
    position:relative;
    z-index:1;
  }

  #bidlunaHeaderSearchMobile .bz-mobile-premium-search__icon{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:16px !important;
    height:16px !important;
    color:#88a0c4 !important;
    pointer-events:none !important;
  }

  #bidlunaHeaderSearchMobile .bz-mobile-premium-search__icon svg{
    width:16px !important;
    height:16px !important;
  }

  #bidlunaHeaderSearchMobile input{
    width:100% !important;
    min-width:0 !important;
    height:auto !important;
    min-height:0 !important;
    padding:0 !important;
    margin:0 !important;
    border:0 !important;
    outline:0 !important;
    background:transparent !important;
    box-shadow:none !important;
    font-size:13px !important;
    font-weight:800 !important;
    line-height:1.1 !important;
    letter-spacing:0 !important;
    color:#1b325c !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;
    overflow:hidden !important;
  }

  #bidlunaHeaderSearchMobile input::placeholder{
    color:#8d9bb6 !important;
    opacity:1 !important;
  }

  #bidlunaHeaderSearchMobile .bz-mobile-premium-search__submit{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:34px !important;
    min-width:34px !important;
    height:34px !important;
    padding:0 !important;
    margin:0 !important;
    border-radius:14px !important;
    border:1px solid rgba(13, 90, 196, .26) !important;
    background:linear-gradient(180deg, #32a2ff 0%, #0b63d8 100%) !important;
    color:#fff !important;
    box-shadow:
      0 10px 18px rgba(11, 99, 216, .26),
      inset 0 1px 0 rgba(255,255,255,.34) !important;
    transform:none !important;
  }

  #bidlunaHeaderSearchMobile .bz-mobile-premium-search__submit svg{
    width:15px !important;
    height:15px !important;
  }

  .bz-actions-mobile{
    display:flex !important;
    align-items:center !important;
    justify-content:flex-end !important;
    gap:8px !important;
    width:112px !important;
    min-width:112px !important;
    flex:0 0 112px !important;
    margin:0 !important;
  }

  .bz-country-wrap-mobile,
  .bz-actions-mobile .bz-country-wrap{
    position:relative !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:56px !important;
    min-width:56px !important;
    height:44px !important;
    min-height:44px !important;
    padding:0 !important;
    border-radius:16px !important;
    border:1px solid rgba(255,255,255,.18) !important;
    background:
      linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.08)) !important;
    box-shadow:
      0 12px 24px rgba(4, 14, 36, .22),
      inset 0 1px 0 rgba(255,255,255,.14) !important;
    overflow:hidden !important;
  }

  .bz-country-wrap-mobile__current{
    width:100% !important;
    height:100% !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    padding:0 !important;
  }

  .bz-country-wrap-mobile__code,
  .bz-country-wrap-mobile .bz-country-caret,
  .bz-actions-mobile .bz-country-wrap .bz-country-caret{
    display:none !important;
  }

  .bz-country-wrap-mobile .bz-flag,
  .bz-actions-mobile .bz-country-wrap .bz-flag{
    width:34px !important;
    height:24px !important;
    border-radius:6px !important;
    max-width:none !important;
    background-size:100% 100% !important;
    background-position:center center !important;
    background-repeat:no-repeat !important;
    box-shadow:
      0 0 0 1px rgba(255,255,255,.84),
      0 6px 14px rgba(0,0,0,.16) !important;
  }

  .bz-country-wrap-mobile select,
  .bz-actions-mobile .bz-country-wrap .bz-country{
    position:absolute !important;
    inset:0 !important;
    width:100% !important;
    height:100% !important;
    opacity:0 !important;
    cursor:pointer !important;
    -webkit-appearance:none !important;
    appearance:none !important;
  }

  .bz-burger-mobile,
  .bz-burger-mobile--premium{
    display:inline-flex !important;
    visibility:visible !important;
    opacity:1 !important;
    align-items:center !important;
    justify-content:center !important;
    width:48px !important;
    min-width:48px !important;
    height:44px !important;
    min-height:44px !important;
    flex:0 0 48px !important;
    padding:0 !important;
    border-radius:16px !important;
    border:1px solid rgba(255,255,255,.18) !important;
    background:
      linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.08)) !important;
    box-shadow:
      0 12px 24px rgba(4, 14, 36, .22),
      inset 0 1px 0 rgba(255,255,255,.14) !important;
    color:#fff !important;
  }

  .bz-burger-mobile svg,
  .bz-burger-mobile--premium svg{
    width:18px !important;
    height:18px !important;
  }

  .bz-mobile-panel{
    position:fixed !important;
    inset:0 !important;
    z-index:100120 !important;
    display:block !important;
    opacity:0 !important;
    visibility:hidden !important;
    pointer-events:none !important;
    transition:opacity .18s ease, visibility .18s ease !important;
  }

  .bz-mobile-panel.open{
    opacity:1 !important;
    visibility:visible !important;
    pointer-events:auto !important;
  }

  .bz-mobile-panel__backdrop{
    position:absolute !important;
    inset:0 !important;
    border:0 !important;
    background:rgba(3, 9, 22, .52) !important;
    backdrop-filter:blur(8px) !important;
  }

  .bz-mobile-panel__dialog{
    position:relative !important;
    width:min(360px, calc(100vw - 24px)) !important;
    max-height:calc(100vh - var(--bz-adminbar-h, 0px) - 24px) !important;
    margin:calc(var(--bz-adminbar-h, 0px) + 12px) 12px 12px auto !important;
    display:flex !important;
    flex-direction:column !important;
    border-radius:28px !important;
    border:1px solid rgba(255,255,255,.14) !important;
    background:
      radial-gradient(circle at 16% 12%, rgba(248,209,99,.18) 0%, rgba(248,209,99,0) 26%),
      linear-gradient(180deg, rgba(7, 19, 47, .98) 0%, rgba(11, 30, 68, .98) 100%) !important;
    box-shadow:
      0 26px 54px rgba(0,0,0,.34),
      inset 0 1px 0 rgba(255,255,255,.10) !important;
    color:#f7fbff !important;
    transform:translateY(8px) scale(.985) !important;
    transition:transform .18s ease !important;
    overflow:hidden !important;
  }

  .bz-mobile-panel.open .bz-mobile-panel__dialog{
    transform:translateY(0) scale(1) !important;
  }

  .bz-mobile-panel__head{
    display:flex !important;
    align-items:flex-start !important;
    justify-content:space-between !important;
    gap:12px !important;
    padding:18px 18px 10px !important;
  }

  .bz-mobile-panel__eyebrow{
    display:block !important;
    margin:0 0 4px !important;
    font-size:10px !important;
    font-weight:900 !important;
    letter-spacing:.18em !important;
    text-transform:uppercase !important;
    color:#93b8ff !important;
  }

  .bz-mobile-panel__title{
    margin:0 !important;
    font-size:20px !important;
    line-height:1.08 !important;
    color:#fff !important;
  }

  .bz-mobile-panel__close{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:36px !important;
    height:36px !important;
    padding:0 !important;
    border-radius:14px !important;
    border:1px solid rgba(255,255,255,.16) !important;
    background:rgba(255,255,255,.08) !important;
    color:#fff !important;
    font-size:22px !important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.12) !important;
  }

  .bz-mobile-panel__market{
    display:flex !important;
    align-items:center !important;
    gap:10px !important;
    margin:0 18px 14px !important;
    padding:10px 12px !important;
    border-radius:18px !important;
    background:rgba(255,255,255,.08) !important;
    border:1px solid rgba(255,255,255,.10) !important;
    color:#dce9ff !important;
    font-size:12px !important;
    font-weight:800 !important;
  }

  .bz-mobile-panel__market .bz-flag{
    width:24px !important;
    height:16px !important;
    border-radius:4px !important;
    background-size:100% 100% !important;
  }

  .bz-mobile-panel-inner{
    display:grid !important;
    gap:10px !important;
    padding:0 18px 12px !important;
    overflow:auto !important;
  }

  .bz-mobile-panel a{
    display:flex !important;
    align-items:center !important;
    min-height:48px !important;
    padding:0 14px !important;
    border-radius:16px !important;
    background:rgba(255,255,255,.96) !important;
    border:1px solid rgba(255,255,255,.18) !important;
    color:#102347 !important;
    box-shadow:
      0 12px 22px rgba(2,8,24,.14),
      inset 0 1px 0 rgba(255,255,255,.72) !important;
    font-weight:900 !important;
    text-decoration:none !important;
  }

  .bz-mobile-panel__notif{
    justify-content:space-between !important;
    gap:10px !important;
  }

  .bz-mobile-panel__count{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    min-width:24px !important;
    height:24px !important;
    padding:0 8px !important;
    border-radius:999px !important;
    background:linear-gradient(180deg, #2c7ae8 0%, #0f4db8 100%) !important;
    color:#fff !important;
    font-size:11px !important;
    font-weight:900 !important;
    box-shadow:0 8px 14px rgba(15,77,184,.28) !important;
  }

  .bz-mobile-panel hr{
    border:0 !important;
    height:1px !important;
    margin:2px 0 !important;
    background:rgba(255,255,255,.14) !important;
  }

  .bz-mobile-panel__footer{
    margin-top:auto !important;
    padding:0 18px 18px !important;
  }

  .bz-mobile-panel__footer-link{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    min-height:48px !important;
    border-radius:17px !important;
    text-decoration:none !important;
    font-weight:900 !important;
  }

  .bz-mobile-panel__footer-link--logout{
    background:rgba(255,255,255,.08) !important;
    border:1px solid rgba(255,255,255,.14) !important;
    color:#fff !important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.10) !important;
  }

  .bz-mobile-panel__footer-link--login{
    background:linear-gradient(180deg, #32a2ff 0%, #0b63d8 100%) !important;
    border:1px solid rgba(255,255,255,.14) !important;
    color:#fff !important;
    box-shadow:
      0 12px 22px rgba(11, 99, 216, .28),
      inset 0 1px 0 rgba(255,255,255,.22) !important;
  }

  .bidluna-mobile-menu-open{
    overflow:hidden !important;
  }
}

@media (max-width: 390px){
  .bz-topbar{
    grid-template-columns:56px minmax(0, 1fr) 106px !important;
    gap:7px !important;
    padding:8px 8px 8px 8px !important;
  }

  .bz-logo-wrap{
    width:56px !important;
    min-width:56px !important;
  }

  .bz-mobile-brand{
    width:50px !important;
    min-width:50px !important;
    height:50px !important;
  }

  .bz-mobile-brand img{
    width:40px !important;
    height:40px !important;
  }

  #bidlunaHeaderSearchMobile.bz-mobile-premium-search{
    height:42px !important;
    min-height:42px !important;
    grid-template-columns:15px minmax(0, 1fr) 32px !important;
    gap:7px !important;
    padding-left:11px !important;
    border-radius:19px !important;
  }

  #bidlunaHeaderSearchMobile input{
    font-size:12.5px !important;
  }

  #bidlunaHeaderSearchMobile .bz-mobile-premium-search__submit{
    width:32px !important;
    min-width:32px !important;
    height:32px !important;
  }

  .bz-actions-mobile{
    width:106px !important;
    min-width:106px !important;
    gap:6px !important;
  }

  .bz-country-wrap-mobile,
  .bz-actions-mobile .bz-country-wrap{
    width:52px !important;
    min-width:52px !important;
    height:42px !important;
    min-height:42px !important;
  }

  .bz-country-wrap-mobile .bz-flag,
  .bz-actions-mobile .bz-country-wrap .bz-flag{
    width:32px !important;
    height:22px !important;
  }

  .bz-burger-mobile,
  .bz-burger-mobile--premium{
    width:48px !important;
    min-width:48px !important;
    height:42px !important;
    min-height:42px !important;
  }
}


/* Mobile header v11 — tighter search, visible premium burger, sticky auth footer */
@media (max-width: 860px){
  .bz-topbar{
    grid-template-columns:60px minmax(0, 1fr) auto !important;
    gap:8px !important;
    padding:8px 8px 8px 10px !important;
  }

  .bz-actions-mobile{
    width:auto !important;
    min-width:104px !important;
    flex:0 0 auto !important;
    gap:7px !important;
  }

  .bz-logo-wrap{
    width:60px !important;
    min-width:60px !important;
  }

  .bz-mobile-brand{
    width:54px !important;
    min-width:54px !important;
    height:54px !important;
    border-radius:19px !important;
    background:
      radial-gradient(circle at 26% 22%, rgba(247,208,95,.28) 0%, rgba(247,208,95,0) 42%),
      linear-gradient(180deg, rgba(255,255,255,.18) 0%, rgba(255,255,255,.08) 100%) !important;
    box-shadow:
      0 14px 28px rgba(3, 11, 30, .24),
      inset 0 1px 0 rgba(255,255,255,.18) !important;
  }

  .bz-mobile-brand img{
    width:44px !important;
    height:44px !important;
  }

  #bidlunaHeaderSearchMobile.bz-mobile-premium-search{
    grid-template-columns:minmax(0, 1fr) 32px !important;
    gap:6px !important;
    height:42px !important;
    min-height:42px !important;
    padding:0 5px 0 12px !important;
    border-radius:21px !important;
  }

  #bidlunaHeaderSearchMobile .bz-mobile-premium-search__icon{
    display:none !important;
  }

  #bidlunaHeaderSearchMobile input{
    font-size:12.8px !important;
  }

  #bidlunaHeaderSearchMobile .bz-mobile-premium-search__submit{
    width:32px !important;
    min-width:32px !important;
    height:32px !important;
    border-radius:14px !important;
  }

  .bz-country-wrap-mobile,
  .bz-actions-mobile .bz-country-wrap{
    width:54px !important;
    min-width:54px !important;
    height:42px !important;
    min-height:42px !important;
    border-radius:16px !important;
  }

  .bz-country-wrap-mobile .bz-flag,
  .bz-actions-mobile .bz-country-wrap .bz-flag{
    width:34px !important;
    height:24px !important;
  }

  .bz-burger-mobile,
  .bz-burger-mobile--premium{
    position:relative !important;
    width:46px !important;
    min-width:46px !important;
    height:42px !important;
    min-height:42px !important;
    flex:0 0 46px !important;
    border-radius:16px !important;
    border:1px solid rgba(255,255,255,.18) !important;
    background:
      radial-gradient(circle at 24% 24%, rgba(247,208,95,.22) 0%, rgba(247,208,95,0) 40%),
      linear-gradient(180deg, rgba(17,34,74,.92) 0%, rgba(12,27,58,.94) 100%) !important;
    box-shadow:
      0 12px 24px rgba(4, 14, 36, .22),
      inset 0 1px 0 rgba(255,255,255,.10) !important;
    color:transparent !important;
  }

  .bz-burger-mobile::before,
  .bz-burger-mobile--premium::before{
    content:"" !important;
    position:absolute !important;
    left:50% !important;
    top:50% !important;
    width:16px !important;
    height:2px !important;
    border-radius:999px !important;
    transform:translate(-50%, -50%) !important;
    background:linear-gradient(90deg, rgba(255,255,255,.92), rgba(196,221,255,.96)) !important;
    box-shadow:
      0 -5px 0 0 rgba(255,255,255,.92),
      0 5px 0 0 rgba(255,255,255,.92),
      0 0 12px rgba(99, 161, 255, .18) !important;
    pointer-events:none !important;
    z-index:2 !important;
  }

  .bz-burger-mobile svg,
  .bz-burger-mobile--premium svg{
    opacity:0 !important;
    visibility:hidden !important;
  }

  .bz-mobile-panel__dialog{
    max-height:min(80vh, calc(100vh - var(--bz-adminbar-h, 0px) - 24px)) !important;
  }

  .bz-mobile-panel-inner{
    flex:1 1 auto !important;
    min-height:0 !important;
    overflow:auto !important;
    padding-bottom:12px !important;
  }

  .bz-mobile-panel__footer{
    display:block !important;
    margin-top:auto !important;
    padding:0 18px 18px !important;
    background:linear-gradient(180deg, rgba(10,28,66,0), rgba(10,28,66,.92) 22%) !important;
  }

  .bz-mobile-panel__footer .bz-mobile-panel__footer-link{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    min-height:50px !important;
    border-radius:18px !important;
    text-decoration:none !important;
    font-weight:900 !important;
  }
}

@media (max-width: 390px){
  .bz-topbar{
    grid-template-columns:58px minmax(0, 1fr) auto !important;
    gap:7px !important;
    padding:8px 8px 8px 8px !important;
  }

  .bz-logo-wrap{
    width:58px !important;
    min-width:58px !important;
  }

  .bz-mobile-brand{
    width:52px !important;
    min-width:52px !important;
    height:52px !important;
  }

  .bz-mobile-brand img{
    width:42px !important;
    height:42px !important;
  }

  #bidlunaHeaderSearchMobile.bz-mobile-premium-search{
    height:40px !important;
    min-height:40px !important;
    border-radius:20px !important;
    grid-template-columns:minmax(0, 1fr) 30px !important;
    gap:5px !important;
    padding-left:11px !important;
  }

  #bidlunaHeaderSearchMobile input{
    font-size:12.4px !important;
  }

  #bidlunaHeaderSearchMobile .bz-mobile-premium-search__submit{
    width:30px !important;
    min-width:30px !important;
    height:30px !important;
  }

  .bz-actions-mobile{
    min-width:100px !important;
    gap:6px !important;
  }

  .bz-country-wrap-mobile,
  .bz-actions-mobile .bz-country-wrap{
    width:52px !important;
    min-width:52px !important;
    height:40px !important;
    min-height:40px !important;
  }

  .bz-country-wrap-mobile .bz-flag,
  .bz-actions-mobile .bz-country-wrap .bz-flag{
    width:33px !important;
    height:23px !important;
  }

  .bz-burger-mobile,
  .bz-burger-mobile--premium{
    width:44px !important;
    min-width:44px !important;
    height:40px !important;
    min-height:40px !important;
    flex-basis:44px !important;
  }
}
