
/* Patch 86 - Mobile App-like UX */
:root{--a3m-blue:#1877f2;--a3m-dark:#0f172a;--a3m-soft:#f8fafc;--a3m-border:#e2e8f0;--a3m-radius:22px}
.a3-mobile-bottom-nav,.a3-mobile-quick-sheet,.a3-mobile-search-panel,.a3-mobile-backdrop{display:none}
.a3-mobile-safe-space{height:0}
@media(max-width:767.98px){
  html{scroll-behavior:smooth}body.a3-mobile-app-ready{padding-bottom:calc(88px + env(safe-area-inset-bottom));background:#f6f8fb!important;-webkit-tap-highlight-color:transparent}body.a3-mobile-app-ready.a3-no-scroll{overflow:hidden}
  .topbar{display:none!important}.main-header.a3-app-header{position:sticky;top:0;z-index:9950;border-bottom:1px solid rgba(226,232,240,.9);box-shadow:0 12px 30px rgba(15,23,42,.08)!important}.main-header.a3-app-header .container{max-width:100%;padding-left:10px;padding-right:10px}.main-header.a3-app-header .main-header-inner{display:grid!important;grid-template-columns:auto 1fr auto;gap:8px;align-items:center;min-height:62px;padding:8px 0;flex-wrap:nowrap!important}.main-header.a3-app-header .brand-center{position:static!important;transform:none!important;order:2;justify-self:center}.main-header.a3-app-header .brand-center img{height:38px;max-width:148px}.main-header.a3-app-header .iconbar{order:1;width:auto;max-width:45vw;justify-content:flex-start;overflow-x:auto;gap:7px;padding:0;scrollbar-width:none}.main-header.a3-app-header .iconbar::-webkit-scrollbar{display:none}.main-header.a3-app-header .iconbtn{width:38px;height:38px;border-radius:14px;flex:0 0 38px;background:#fff;border-color:#e5edf6}.main-header.a3-app-header .iconbar .iconbtn:nth-child(n+5){display:none}.main-header.a3-app-header .a3-auth-area{order:3;justify-self:end;gap:6px}.main-header.a3-app-header .auth-btn{height:38px;border-radius:14px;padding:0 10px;font-size:12px}.main-header.a3-app-header .avatar-btn{height:38px;border-radius:14px;padding:0 7px}.main-header.a3-app-header .avatar-circle{width:27px;height:27px;font-size:12px}
  .container{max-width:100%}.a3-mall-wrap,.a3-dir-wrap,.a3-product-wrap,.a3-country-home,.a3-gateway,.a3-page-wrap,main{max-width:100vw;overflow:hidden}.a3-mall-hero,.a3-dir-hero,.a3-product-hero,.a3-country-hero{border-radius:0 0 26px 26px!important;margin-left:-10px!important;margin-right:-10px!important}.a3-mall-grid,.a3-grid,.a3-country-grid,.a3-dir-grid,.a3-products-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}.a3-product-card,.a3-card,.a3-dir-card,.a3-ad-card,.a3-listing-card{border-radius:18px!important;box-shadow:0 10px 24px rgba(15,23,42,.06)!important;overflow:hidden}.a3-product-card img,.a3-card img,.a3-dir-card img,.a3-ad-card img{object-fit:cover}.a3-product-body,.a3-card-body{padding:10px!important}.a3-product-title,.a3-card-title{font-size:13px!important;line-height:1.45!important}.a3-product-body p,.a3-card-body p{font-size:12px!important;line-height:1.55!important}.a3-product-price strong{font-size:14px!important}.a3-card-cart{display:grid!important;grid-template-columns:1fr 1fr;gap:7px!important}.a3-card-cart button,.a3-card-cart a,.a3-btn,.btn{min-height:38px;border-radius:13px!important}
  .a3-mobile-bottom-nav{display:flex;position:fixed;left:10px;right:10px;bottom:calc(10px + env(safe-area-inset-bottom));z-index:10000;height:66px;background:rgba(255,255,255,.94);backdrop-filter:blur(18px);border:1px solid rgba(226,232,240,.92);box-shadow:0 18px 48px rgba(15,23,42,.18);border-radius:24px;padding:7px;direction:rtl;align-items:center;justify-content:space-between}.a3-mobile-bottom-nav a,.a3-mobile-bottom-nav button{appearance:none;border:0;background:transparent;color:#64748b;text-decoration:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;flex:1;height:52px;border-radius:18px;font-size:10px;font-weight:900;position:relative}.a3-mobile-bottom-nav i{font-size:20px;line-height:1}.a3-mobile-bottom-nav .is-active,.a3-mobile-bottom-nav a:active,.a3-mobile-bottom-nav button:active{background:#eff6ff;color:var(--a3m-blue)}.a3-mobile-bottom-nav .a3m-add{flex:.95;background:linear-gradient(135deg,#1877f2,#0f5ccf);color:#fff;box-shadow:0 10px 24px rgba(24,119,242,.35)}.a3-mobile-bottom-nav .a3m-badge{position:absolute;top:2px;right:22%;background:#ef4444;color:#fff;border:2px solid #fff;border-radius:999px;min-width:18px;height:18px;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:1000;padding:0 4px}
  .a3-mobile-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:10001}.a3-mobile-backdrop.show{display:block}.a3-mobile-quick-sheet{position:fixed;left:10px;right:10px;bottom:calc(86px + env(safe-area-inset-bottom));z-index:10002;background:#fff;border:1px solid var(--a3m-border);box-shadow:0 18px 60px rgba(15,23,42,.25);border-radius:26px;padding:14px;direction:rtl;transform:translateY(18px);opacity:0;transition:.18s ease}.a3-mobile-quick-sheet.show{display:block;transform:translateY(0);opacity:1}.a3m-sheet-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.a3m-sheet-head strong{font-size:15px;color:#0f172a}.a3m-sheet-close{width:34px;height:34px;border-radius:999px;border:1px solid var(--a3m-border);background:#f8fafc}.a3m-sheet-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.a3m-sheet-grid a{display:flex;align-items:center;gap:9px;text-decoration:none;color:#0f172a;border:1px solid var(--a3m-border);background:#f8fafc;border-radius:18px;padding:12px;font-weight:900}.a3m-sheet-grid i{width:34px;height:34px;border-radius:13px;background:#eff6ff;color:#1877f2;display:flex;align-items:center;justify-content:center;font-size:18px}
  .a3-mobile-search-panel{position:fixed;left:10px;right:10px;top:calc(10px + env(safe-area-inset-top));z-index:10003;background:#fff;border:1px solid var(--a3m-border);border-radius:26px;padding:14px;box-shadow:0 18px 60px rgba(15,23,42,.25);direction:rtl;transform:translateY(-18px);opacity:0;transition:.18s ease}.a3-mobile-search-panel.show{display:block;transform:translateY(0);opacity:1}.a3m-search-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.a3m-search-title strong{font-size:15px}.a3m-search-close{width:34px;height:34px;border-radius:999px;border:1px solid var(--a3m-border);background:#f8fafc}.a3m-search-form{display:flex;gap:8px}.a3m-search-form input{flex:1;height:46px;border:1px solid var(--a3m-border);border-radius:16px;padding:0 13px;font-weight:800;outline:none}.a3m-search-form button{width:48px;border:0;border-radius:16px;background:#1877f2;color:#fff}.a3m-search-chips{display:flex;gap:7px;overflow-x:auto;padding-top:10px;scrollbar-width:none}.a3m-search-chips::-webkit-scrollbar{display:none}.a3m-search-chips a{white-space:nowrap;text-decoration:none;color:#0f172a;background:#f8fafc;border:1px solid var(--a3m-border);border-radius:999px;padding:7px 11px;font-size:12px;font-weight:900}
  .a3-mobile-safe-space{height:88px}.a3-floating-dock,.quick-add-dock{bottom:92px!important}
}
@media(max-width:390px){.a3-mobile-bottom-nav{left:7px;right:7px}.a3-mobile-bottom-nav a,.a3-mobile-bottom-nav button{font-size:9px}.a3-mobile-bottom-nav i{font-size:18px}.a3-mall-grid,.a3-grid,.a3-country-grid,.a3-dir-grid,.a3-products-grid{grid-template-columns:1fr!important}}
