/* Customer2Pro mobile app polish — mobile-only overrides */
@media (max-width: 768px){
  html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
  body{overflow-x:hidden;padding-bottom:env(safe-area-inset-bottom,0px)}
  button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}
  button,a{touch-action:manipulation}
  input,select,textarea{font-size:16px!important}

  /* Home: native-app style top bar + bottom navigation dock */
  .navbar{
    position:sticky!important;top:0!important;left:auto!important;right:auto!important;
    min-height:64px!important;height:64px!important;padding:calc(8px + env(safe-area-inset-top,0px)) 16px 8px!important;
    display:flex!important;align-items:center!important;justify-content:center!important;
    background:rgba(255,255,255,.94)!important;backdrop-filter:blur(18px)!important;-webkit-backdrop-filter:blur(18px)!important;
    border-bottom:1px solid rgba(6,59,120,.09)!important;box-shadow:0 6px 24px rgba(15,23,42,.06)!important;z-index:1200!important;
  }
  .navbar .brand{display:flex!important;align-items:center!important;justify-content:center!important;margin:0!important;padding:0!important}
  .navbar .brand img{max-width:178px!important;max-height:42px!important;width:auto!important;height:auto!important;display:block!important}
  .navbar .links{
    position:fixed!important;left:10px!important;right:10px!important;bottom:calc(10px + env(safe-area-inset-bottom,0px))!important;top:auto!important;
    height:68px!important;min-height:68px!important;margin:0!important;padding:7px 8px!important;
    display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;align-items:stretch!important;justify-content:stretch!important;gap:2px!important;
    overflow:visible!important;
    background:rgba(255,255,255,.96)!important;backdrop-filter:blur(20px)!important;-webkit-backdrop-filter:blur(20px)!important;
    border:1px solid rgba(6,59,120,.10)!important;border-radius:22px!important;box-shadow:0 12px 34px rgba(15,23,42,.16)!important;z-index:25000!important;
  }
  .navbar .links::-webkit-scrollbar{display:none!important}
  .navbar .links>a{
    min-width:0!important;width:100%!important;height:54px!important;margin:0!important;padding:6px 2px!important;
    display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:4px!important;
    border-radius:16px!important;font-size:10.5px!important;line-height:1.05!important;font-weight:700!important;text-align:center!important;white-space:nowrap!important;
    background:transparent!important;border:0!important;box-shadow:none!important;
  }
  .navbar .links>a .c2p-nav-bi{width:19px!important;height:19px!important;margin:0!important;display:block!important}
  .navbar .links>a.active{background:rgba(6,59,120,.09)!important;color:#063b78!important}
  .navbar .c2p-profile-nav{min-width:0!important;width:100%!important;height:54px!important;margin:0!important;display:flex!important;align-items:center!important;justify-content:center!important;position:relative!important}
  .navbar .c2p-profile-nav-btn{width:42px!important;height:42px!important;min-width:42px!important;border-radius:14px!important;margin:0!important}
  .navbar .c2p-profile-nav-menu{position:fixed!important;left:14px!important;right:14px!important;bottom:calc(88px + env(safe-area-inset-bottom,0px))!important;top:auto!important;width:auto!important;max-width:none!important;border-radius:20px!important;padding:8px!important;box-shadow:0 18px 50px rgba(15,23,42,.22)!important;z-index:26000!important}
  .navbar .c2p-profile-nav-menu a{min-height:46px!important;display:flex!important;align-items:center!important;border-radius:13px!important;padding:10px 14px!important;font-size:14px!important}
  body:has(.navbar){padding-bottom:92px!important}

  /* Service/request pages: compact app header */
  header.top{
    position:sticky!important;top:0!important;min-height:64px!important;padding:calc(8px + env(safe-area-inset-top,0px)) 14px 8px!important;
    display:grid!important;grid-template-columns:44px minmax(0,1fr) 44px!important;align-items:center!important;gap:8px!important;
    background:rgba(255,255,255,.95)!important;backdrop-filter:blur(18px)!important;-webkit-backdrop-filter:blur(18px)!important;
    border-bottom:1px solid rgba(6,59,120,.09)!important;box-shadow:0 5px 22px rgba(15,23,42,.06)!important;z-index:1200!important;
  }
  header.top .brand{grid-column:2!important;justify-self:center!important;margin:0!important}
  header.top .brand img{max-width:165px!important;max-height:40px!important;width:auto!important;height:auto!important}
  header.top .back{grid-column:1!important;grid-row:1!important;width:42px!important;height:42px!important;overflow:hidden!important;font-size:0!important;padding:0!important;border-radius:14px!important;display:flex!important;align-items:center!important;justify-content:center!important;background:#f4f7fb!important;border:1px solid rgba(6,59,120,.10)!important}
  header.top .back::before{content:'←';font-size:22px!important;line-height:1!important;color:#063b78!important}
  header.top .c2p-profile-nav{grid-column:3!important;grid-row:1!important;justify-self:end!important;margin:0!important}
  header.top .c2p-profile-nav-btn{width:42px!important;height:42px!important;border-radius:14px!important}
  header.top .c2p-profile-nav-menu{position:fixed!important;left:14px!important;right:14px!important;top:72px!important;width:auto!important;border-radius:18px!important;padding:8px!important;z-index:26000!important}
  header.top .lang-switch{display:none!important}
  .wrap{width:100%!important;max-width:100%!important;padding-left:16px!important;padding-right:16px!important}
  .layout{grid-template-columns:1fr!important;gap:16px!important}
  .intro,.card,.panel,.form-card{border-radius:22px!important}

  /* Store: cleaner mobile app bar and bottom-sheet cart */
  .store-top{position:sticky!important;top:0!important;background:rgba(255,255,255,.95)!important;backdrop-filter:blur(18px)!important;-webkit-backdrop-filter:blur(18px)!important;box-shadow:0 5px 22px rgba(15,23,42,.06)!important}
  .store-top-inner{min-height:64px!important;padding:8px 14px!important;gap:10px!important}
  .store-brand img{max-width:155px!important;max-height:40px!important}
  .store-links{gap:7px!important}
  .store-links>a{display:none!important}
  .cart-toggle,.profile-icon-toggle{width:42px!important;height:42px!important;min-width:42px!important;border-radius:14px!important}
  .profile-dropdown{position:fixed!important;left:14px!important;right:14px!important;top:72px!important;width:auto!important;border-radius:18px!important;padding:8px!important}
  .store-main{padding-left:14px!important;padding-right:14px!important}
  .store-product-grid{grid-template-columns:1fr!important;gap:12px!important}
  .store-product-card{border-radius:20px!important}
  .store-catalog-tools{gap:8px!important;padding-left:0!important;padding-right:0!important}
  .store-category-wrap,.store-search-wrap{width:100%!important;max-width:none!important}
  .store-category-wrap select,.store-search-wrap input{height:48px!important;border-radius:16px!important}
  .store-cart-panel{border-radius:24px 24px 0 0!important;max-height:88dvh!important;padding-bottom:calc(18px + env(safe-area-inset-bottom,0px))!important}

  /* Account/login: full-screen app card feel */
  .auth-page{padding:12px!important;min-height:100dvh!important;align-items:center!important}
  .auth-shell{width:100%!important;max-width:520px!important;min-height:0!important;border-radius:26px!important;box-shadow:0 18px 55px rgba(15,23,42,.13)!important;overflow:hidden!important}
  .auth-stage{min-height:0!important}
  .form-pane{padding:30px 22px!important;min-height:0!important}
  .form-pane .brand{max-width:190px!important;margin-bottom:20px!important}
  .form-pane input,.form-pane button{min-height:50px!important;border-radius:16px!important}

  /* Floating language control stays reachable without crowding navigation */
  .c2p-desktop-lang-global,.store-lang-right{display:inline-flex!important;position:fixed!important;top:calc(74px + env(safe-area-inset-top,0px))!important;right:12px!important;left:auto!important;z-index:24000!important;min-width:46px!important;height:38px!important;padding:0 10px!important;border-radius:14px!important;box-shadow:0 8px 22px rgba(15,23,42,.13)!important}

  /* General mobile spacing */
  main,section{scroll-margin-top:76px}
  img{max-width:100%}
}
@media (max-width:390px){
  .navbar .links{left:6px!important;right:6px!important;padding-left:4px!important;padding-right:4px!important;gap:1px!important}
  .navbar .links>a{min-width:0!important;width:100%!important;padding-left:1px!important;padding-right:1px!important;font-size:9.5px!important}
  .navbar .c2p-profile-nav{min-width:0!important;width:100%!important}
  .wrap,.store-main{padding-left:12px!important;padding-right:12px!important}
}


/* C2P mobile language cleanup: keep only the new floating language control */
@media (max-width: 768px){
  .lang-switch,
  body > .lang-switch,
  header > .lang-switch,
  .navbar > .lang-switch,
  .navbar .lang-switch,
  nav.links .lang-switch,
  #links .lang-switch,
  .top > .lang-switch{
    display:none!important;
    visibility:hidden!important;
    opacity:0!important;
    pointer-events:none!important;
  }
  .c2p-desktop-lang-global,
  .store-lang-right{
    display:inline-flex!important;
    visibility:visible!important;
    opacity:1!important;
    pointer-events:auto!important;
  }
}
