/*
 * BROXIGUAY SHOP — capa responsive final 2026
 * Ajustes no destructivos para móvil, tablet y escritorio.
 * Se carga al final para corregir desbordes sin cambiar lógica ni rutas.
 */
:root{
  --bx-safe-x:clamp(12px,2.2vw,30px);
  --bx-radius:clamp(14px,1.6vw,24px);
  --bx-touch:44px;
}
html{max-width:100%;overflow-x:hidden;-webkit-text-size-adjust:100%;text-size-adjust:100%;}
body{max-width:100%;overflow-x:hidden;}
img,video,canvas,svg{max-width:100%;height:auto;}
iframe{max-width:100%;}
input,select,textarea,button{max-width:100%;font:inherit;}
button,a,input,select,textarea{-webkit-tap-highlight-color:transparent;}
button,.btn,.btn-main,.navbtn,.cat,.themeBtn{min-height:var(--bx-touch);}
.table-responsive,.tableWrap,.dataTables_wrapper{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;}
table{max-width:100%;}
pre,code,.break-anywhere{overflow-wrap:anywhere;word-break:break-word;}

/* ===== ADMIN / ADMINLTE ===== */
body .content-wrapper,body .right-side{min-width:0!important;}
body .content-wrapper>.content,body section.content{max-width:100%!important;}
body .box,body .panel,body .card,body .modal-content{max-width:100%;}
body .form-control{max-width:100%;}
body .row{max-width:100%;}
body .navbar-custom-menu{max-width:calc(100vw - 80px);}
body .main-header .navbar{min-width:0;}
body .navbar-nav{display:flex;align-items:center;flex-wrap:nowrap;}
body .navbar-nav>li{flex:0 0 auto;}
body .main-sidebar>.sidebar{overscroll-behavior:contain;}
body .sidebar-menu>li>a{white-space:normal;}
body .sidebar-menu .treeview-menu>li>a{white-space:normal;line-height:1.25;}

/* Paneles personalizados frecuentes */
.vpWrap,.rpWrap,.logWrap,.eco-page,.ecosistema-page,.eco-module-page,.ecosystem-module{max-width:100%!important;min-width:0!important;}
.vpGrid,.logGrid,.formGrid,.vpFormGrid,.rpStats,.vpMetrics,.warehouseGrid,.journeyGrid{min-width:0;}
.vpCard,.delivery,.logCard,.warehouse,.journey,.order{min-width:0;max-width:100%;}
.vpProducts{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(180px,1fr))!important;gap:14px!important;}
.vpProduct{min-width:0!important;}
.vpProduct .pic{aspect-ratio:1/1;overflow:hidden;}
.vpProduct .pic img{width:100%;height:100%;object-fit:contain;}
.contactActions,.orderControls,.stateControls{flex-wrap:wrap!important;}
.contactActions .act,.orderControls>*{min-width:0;}

/* Mapas: altura explícita evita el mapa gris/punto aislado al cambiar de viewport */
.liveMap,#liveMap,#map,#mapa,#mapCliente,#mapRepartidor,#mpxLeafletMap,.leaflet-container{
  width:100%!important;
  min-height:300px!important;
  height:clamp(300px,44vh,520px)!important;
  border-radius:var(--bx-radius);
  overflow:hidden;
}
.leaflet-control-container{font-size:14px;}

/* ===== TIENDA PÚBLICA ===== */
body.web-light,body.web-dark{min-width:0;}
body.web-light .header,body.web-dark .header{max-width:100vw;}
body.web-light .brandGroup,body.web-dark .brandGroup{min-width:0!important;}
body.web-light .brandPrimeHeader,body.web-dark .brandPrimeHeader{flex:0 0 auto;}
body.web-light .brandPrimeText,body.web-dark .brandPrimeText{min-width:0;}
body.web-light .search,body.web-dark .search{min-width:180px;}
body.web-light .primeCategoryNav,body.web-dark .primeCategoryNav{overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:thin;white-space:nowrap;}
body.web-light .primeCategoryNav>*,body.web-dark .primeCategoryNav>*{flex:0 0 auto;}
body.web-light .primeHero,body.web-dark .primeHero{max-width:100%;}
body.web-light .primeHeroCopy,body.web-light .primeHeroProducts,body.web-dark .primeHeroCopy,body.web-dark .primeHeroProducts{min-width:0;}
body.web-light .heroProduct,body.web-dark .heroProduct{min-width:0;}
body.web-light .retailTrustBar,body.web-dark .retailTrustBar{min-width:0;}
body.web-light .grid,body.web-dark .grid{grid-template-columns:repeat(auto-fill,minmax(220px,1fr))!important;gap:clamp(12px,1.6vw,22px)!important;padding-left:var(--bx-safe-x)!important;padding-right:var(--bx-safe-x)!important;}
body.web-light .card.product,body.web-dark .card.product{min-width:0;}
body.web-light .imgbox,body.web-dark .imgbox{height:auto!important;aspect-ratio:1/1;}
body.web-light .imgbox img,body.web-dark .imgbox img{width:100%;height:100%;object-fit:contain!important;}
body.web-light .productActions,body.web-dark .productActions{display:grid!important;grid-template-columns:1fr 1fr;gap:9px!important;}
body.web-light .productActions>*,body.web-dark .productActions>*{width:100%!important;margin:0!important;}
body.web-light .cats,body.web-dark .cats{padding-left:var(--bx-safe-x)!important;padding-right:var(--bx-safe-x)!important;overflow-x:auto!important;}
body.web-light .storeFooter,body.web-dark .storeFooter{margin-left:var(--bx-safe-x)!important;margin-right:var(--bx-safe-x)!important;}
body.web-light .modalx .box,body.web-dark .modalx .box{width:min(920px,calc(100vw - 24px))!important;}
body.web-light .modalx,body.web-light .termsOverlay,body.web-dark .modalx,body.web-dark .termsOverlay{padding:12px!important;}
body.web-light .detail,body.web-dark .detail{min-width:0;}
body.web-light .appearancePanel,body.web-dark .appearancePanel{max-width:calc(100vw - 24px)!important;}

/* ===== PORTAL CLIENTE ===== */
body .layout{min-width:0;}
body .main{min-width:0;max-width:100%;}
body .top{gap:12px;}
body .topActions{min-width:0;}
body .profileMini{max-width:100%;}
body .profileMini b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:180px;}
body .cards{grid-template-columns:repeat(auto-fit,minmax(210px,1fr))!important;}
body .modal-card{width:min(920px,calc(100vw - 24px))!important;}
body .chat-box,.mpxChatPanel{max-width:calc(100vw - 24px)!important;}

/* ===== SEGUIMIENTO ===== */
body .wrap{width:min(1180px,calc(100vw - 24px))!important;margin-left:auto!important;margin-right:auto!important;}
body .liveTrack,body .driverCard,body .journeyPublic{min-width:0;}
body .steps{overflow-x:auto;-webkit-overflow-scrolling:touch;}

/* ===== LOGIN / ACCESO ===== */
.login-wrapper,.wrap,.shell{max-width:100%;}

/* ===== TABLET ===== */
@media (max-width:1100px){
  body .top-pos-badge{font-size:12px!important;padding-left:12px!important;padding-right:12px!important;}
  body .navbar-custom-menu .hidden-xs{max-width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  body .primeHero{grid-template-columns:minmax(0,1.2fr) minmax(260px,.8fr)!important;}
  body .vpGrid,body .logGrid{grid-template-columns:1fr!important;}
  body .rpStats,body .vpMetrics{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  body .formGrid,body .vpFormGrid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  body .warehouseGrid,body .journeyGrid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}

/* ===== MÓVIL / TABLET PEQUEÑA ===== */
@media (max-width:767px){
  :root{--bx-safe-x:12px;--bx-touch:46px;}
  body{font-size:15px;}

  /* Admin: sidebar como panel superpuesto, contenido al 100% */
  body .main-header{position:fixed!important;top:0;left:0;right:0;z-index:1050!important;}
  body .main-header .logo{width:64px!important;}
  body .main-header .navbar{margin-left:64px!important;width:calc(100% - 64px)!important;}
  body .main-header .navbar-custom-menu{float:right!important;max-width:calc(100vw - 118px)!important;}
  body .navbar-nav>li>a{padding-left:10px!important;padding-right:10px!important;}
  body .navbar-nav>.user-menu>a .hidden-xs{display:none!important;}
  body .mpx-fullscreen-btn{display:none!important;}
  body .content-wrapper,body .right-side,body .main-footer{margin-left:0!important;width:100%!important;}
  body .content-wrapper{padding-top:64px!important;}
  body .main-sidebar{position:fixed!important;top:0!important;left:0!important;bottom:0!important;width:min(300px,86vw)!important;max-width:86vw!important;transform:translateX(-102%)!important;transition:transform .22s ease!important;z-index:1060!important;box-shadow:18px 0 55px rgba(0,0,0,.35)!important;}
  body.sidebar-open .main-sidebar{transform:translateX(0)!important;}
  body.sidebar-open:after{content:"";position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:1055;pointer-events:none;}
  body .main-sidebar>.sidebar{height:100vh!important;padding-top:68px!important;padding-bottom:92px!important;}
  body .mpx-sidebar-logout{position:fixed!important;left:12px!important;bottom:12px!important;width:calc(min(300px,86vw) - 24px)!important;}
  body .content-wrapper>.content,body section.content{padding:12px!important;}
  body .content-header{padding:12px!important;}
  body .box,body .panel,body .card,body .modal-content{border-radius:16px!important;}
  body .table-responsive,body .dataTables_wrapper{width:100%!important;overflow-x:auto!important;}
  body .dataTables_filter,body .dataTables_length{float:none!important;text-align:left!important;width:100%!important;margin-bottom:8px;}
  body .dataTables_filter input{width:100%!important;margin-left:0!important;margin-top:6px!important;}

  .vpHero,.rpHero,.logHero{padding:22px 18px!important;border-radius:18px!important;}
  .vpHero h1,.rpHero h1,.logHero h1{font-size:clamp(24px,8vw,34px)!important;line-height:1.08!important;}
  body .vpTabs,body .logTabs{display:flex!important;overflow-x:auto!important;white-space:nowrap!important;gap:7px!important;padding-bottom:6px!important;}
  body .vpTabs>* ,body .logTabs>*{flex:0 0 auto!important;}
  body .vpProducts{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;}
  body .rpStats,body .vpMetrics{grid-template-columns:1fr 1fr!important;gap:9px!important;}
  body .formGrid,body .vpFormGrid,body .warehouseGrid,body .journeyGrid{grid-template-columns:1fr!important;}
  body .contactActions{display:grid!important;grid-template-columns:1fr 1fr!important;}
  .liveMap,#liveMap,#map,#mapa,#mapCliente,#mapRepartidor,#mpxLeafletMap,.leaflet-container{min-height:280px!important;height:42vh!important;}

  /* Store */
  body.web-light .header,body.web-dark .header{position:sticky!important;top:0!important;padding:10px 12px!important;display:grid!important;grid-template-columns:auto 1fr auto!important;gap:8px!important;align-items:center!important;}
  body.web-light .brandGroup,body.web-dark .brandGroup{grid-column:1/2!important;}
  body.web-light .brandPrimeHeader,body.web-dark .brandPrimeHeader{max-width:165px!important;}
  body.web-light .brandPrimeText,body.web-dark .brandPrimeText{display:none!important;}
  body.web-light .menuIcon,body.web-dark .menuIcon{width:44px!important;height:44px!important;}
  body.web-light .search,body.web-dark .search{grid-column:1/-1!important;grid-row:2!important;order:10!important;width:100%!important;min-width:0!important;}
  body.web-light .search input,body.web-dark .search input{height:46px!important;padding-left:14px!important;}
  body.web-light .themeBtn,body.web-dark .themeBtn{padding:8px!important;min-width:44px!important;font-size:0!important;}
  body.web-light .themeBtn i,body.web-dark .themeBtn i{font-size:16px!important;margin:0!important;}
  body.web-light .customerChip,body.web-dark .customerChip{padding:4px!important;}
  body.web-light .customerChip span,body.web-dark .customerChip span{display:none!important;}
  body.web-light .navbtn.bellCli,body.web-dark .navbtn.bellCli{padding:9px!important;}
  body.web-light .header>.navbtn:not(.bellCli),body.web-dark .header>.navbtn:not(.bellCli){display:none!important;}
  body.web-light .cartbtn,body.web-dark .cartbtn{padding:9px 11px!important;white-space:nowrap!important;}
  body.web-light .primeCategoryNav,body.web-dark .primeCategoryNav{padding:0 12px!important;}
  body.web-light .primeHero,body.web-dark .primeHero{margin:12px!important;padding:24px 18px!important;grid-template-columns:1fr!important;border-radius:22px!important;}
  body.web-light .primeHeroCopy h1,body.web-dark .primeHeroCopy h1{font-size:clamp(30px,9vw,44px)!important;line-height:1!important;}
  body.web-light .primeHeroProducts,body.web-dark .primeHeroProducts{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;}
  body.web-light .retailTrustBar,body.web-dark .retailTrustBar{margin:0 12px!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;}
  body.web-light .grid,body.web-dark .grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;padding-bottom:42px!important;}
  body.web-light .card.product,body.web-dark .card.product{border-radius:16px!important;}
  body.web-light .card-body,body.web-dark .card-body{padding:12px!important;}
  body.web-light .name,body.web-dark .name{font-size:16px!important;min-height:auto!important;}
  body.web-light .desc,body.web-dark .desc{font-size:12px!important;min-height:0!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
  body.web-light .price,body.web-dark .price{font-size:22px!important;}
  body.web-light .productActions,body.web-dark .productActions{grid-template-columns:1fr!important;}
  body.web-light .storeFooter,body.web-dark .storeFooter{padding:22px 16px!important;border-radius:20px!important;}
  body.web-light .storeFooter .footgrid,body.web-dark .storeFooter .footgrid{grid-template-columns:1fr!important;}
  body.web-light .detail,body.web-dark .detail{grid-template-columns:1fr!important;}
  body.web-light .box-head,body.web-dark .box-head{padding:16px!important;}
  body.web-light .box-body,body.web-dark .box-body{padding:16px!important;}

  /* Customer portal */
  body .layout{display:block!important;}
  body .side{position:relative!important;top:auto!important;height:auto!important;width:100%!important;padding:12px!important;}
  body .brandPro{margin-bottom:10px!important;}
  body .side .nav{display:flex!important;overflow-x:auto!important;gap:6px!important;padding-bottom:5px!important;scrollbar-width:none;}
  body .side .nav::-webkit-scrollbar{display:none;}
  body .side .nav a{flex:0 0 auto!important;margin:0!important;padding:10px 12px!important;white-space:nowrap!important;}
  body .main{padding:14px!important;}
  body .top{align-items:flex-start!important;flex-direction:column!important;}
  body .topActions{width:100%!important;display:flex!important;justify-content:space-between!important;gap:8px!important;}
  body .appearanceMiniBtn{flex:1!important;text-align:center!important;}
  body .hello{padding:22px 18px!important;border-radius:20px!important;}
  body .hello h1{font-size:clamp(28px,8vw,38px)!important;}
  body .actions{display:grid!important;grid-template-columns:1fr 1fr!important;}
  body .actions>*{width:100%!important;text-align:center!important;}
  body .cards{grid-template-columns:1fr!important;gap:10px!important;}
  body .form-grid{grid-template-columns:1fr!important;}
  body .mpxChatBtn{right:12px!important;bottom:12px!important;}
  body .mpxChatPanel{right:12px!important;bottom:76px!important;width:calc(100vw - 24px)!important;max-height:calc(100vh - 92px)!important;}

  /* Seguimiento */
  body .wrap{width:calc(100vw - 20px)!important;}
  body .grid{min-width:0;}
  body .driverCard .contactBtns{display:grid!important;grid-template-columns:1fr 1fr!important;}
}

/* Teléfonos estrechos */
@media (max-width:430px){
  body.web-light .grid,body.web-dark .grid{grid-template-columns:1fr!important;}
  body.web-light .primeHeroProducts,body.web-dark .primeHeroProducts{grid-template-columns:1fr 1fr!important;}
  body.web-light .retailTrustBar,body.web-dark .retailTrustBar{grid-template-columns:1fr!important;}
  body .vpProducts{grid-template-columns:1fr!important;}
  body .rpStats,body .vpMetrics{grid-template-columns:1fr!important;}
  body .contactActions{grid-template-columns:1fr!important;}
  body .actions{grid-template-columns:1fr!important;}
  body .driverCard .contactBtns{grid-template-columns:1fr!important;}
  body .profileMini b{max-width:110px;}
}

/* Respeta preferencias de accesibilidad */
@media (prefers-reduced-motion:reduce){
  *,*:before,*:after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;}
}

/* =====================================================================
   BROXIGUAY MOBILE UI V2 — 2026-08-24
   Corrige conflictos heredados de AdminLTE/estilos antiguos en teléfonos.
   ===================================================================== */
@media (max-width: 767px){
  html,body{width:100%!important;max-width:100%!important;overflow-x:hidden!important;}

  /* ---------- ADMIN: topbar compacta y estable ---------- */
  body.admin-light .main-header,
  body.admin-dark .main-header{
    height:68px!important;max-height:68px!important;min-height:68px!important;
    display:block!important;overflow:visible!important;
    padding-top:env(safe-area-inset-top,0px)!important;
  }
  body.admin-light .main-header .logo,
  body.admin-dark .main-header .logo,
  body.admin-light.sidebar-collapse .main-header .logo,
  body.admin-dark.sidebar-collapse .main-header .logo{
    position:absolute!important;left:0!important;top:0!important;
    width:72px!important;min-width:72px!important;max-width:72px!important;
    height:68px!important;padding:0!important;margin:0!important;
    display:flex!important;align-items:center!important;justify-content:center!important;
    overflow:hidden!important;border-right:1px solid var(--ap-line)!important;
    background:var(--ap-top)!important;
  }
  body .main-header .logo .logo-lg{display:none!important;}
  body .main-header .logo .logo-mini{
    display:flex!important;width:100%!important;height:100%!important;
    align-items:center!important;justify-content:center!important;line-height:normal!important;
  }
  body .main-header .logo .logo-mini img{
    display:block!important;width:48px!important;height:48px!important;min-width:48px!important;
    max-width:48px!important;object-fit:cover!important;border-radius:50%!important;
    border:1px solid rgba(183,145,84,.55)!important;box-shadow:0 5px 16px rgba(0,0,0,.14)!important;
  }
  body.admin-light .main-header .navbar,
  body.admin-dark .main-header .navbar,
  body.admin-light.sidebar-collapse .main-header .navbar,
  body.admin-dark.sidebar-collapse .main-header .navbar{
    position:absolute!important;top:0!important;right:0!important;left:72px!important;
    margin:0!important;width:auto!important;height:68px!important;min-height:68px!important;
    display:block!important;overflow:visible!important;
  }
  body .main-header .sidebar-toggle{
    float:left!important;width:54px!important;height:68px!important;line-height:68px!important;
    padding:0!important;text-align:center!important;font-size:20px!important;
  }
  body .main-header .navbar-custom-menu{
    position:absolute!important;right:6px!important;top:0!important;height:68px!important;
    float:none!important;max-width:calc(100vw - 130px)!important;
  }
  body .main-header .navbar-custom-menu>.nav,
  body .main-header .navbar-nav{
    margin:0!important;height:68px!important;display:flex!important;align-items:center!important;
    justify-content:flex-end!important;gap:2px!important;float:none!important;
  }
  body .main-header .navbar-nav>li{float:none!important;display:flex!important;align-items:center!important;height:68px!important;}
  body .navbar-custom-menu .nav>li>a{height:52px!important;min-height:52px!important;padding:7px 9px!important;border-radius:14px!important;}
  body .main-header .top-pos-badge,
  body .main-header .admin-theme-top,
  body .main-header .mpx-fullscreen-btn{display:none!important;}
  body .navbar-nav>.user-menu>a .hidden-xs{display:none!important;}
  body .navbar-nav>.user-menu .user-image{width:36px!important;height:36px!important;margin:0!important;}
  body .navbar-nav>.user-menu>.dropdown-menu{
    position:fixed!important;top:64px!important;right:8px!important;left:auto!important;
    width:min(330px,calc(100vw - 16px))!important;max-height:calc(100vh - 80px)!important;
    overflow-y:auto!important;border-radius:18px!important;
  }
  body .mpx-bell-drop{
    position:fixed!important;top:64px!important;right:8px!important;left:8px!important;
    width:auto!important;max-width:none!important;max-height:calc(100vh - 82px)!important;
  }

  /* Admin: el drawer no roba ancho al contenido */
  body.admin-light .content-wrapper,body.admin-dark .content-wrapper,
  body.admin-light .right-side,body.admin-dark .right-side,
  body.admin-light.sidebar-collapse .content-wrapper,body.admin-dark.sidebar-collapse .content-wrapper,
  body.admin-light.sidebar-collapse .right-side,body.admin-dark.sidebar-collapse .right-side,
  body.admin-light .main-footer,body.admin-dark .main-footer,
  body.admin-light.sidebar-collapse .main-footer,body.admin-dark.sidebar-collapse .main-footer{
    margin-left:0!important;width:100%!important;max-width:100%!important;
  }
  body.admin-light .content-wrapper,body.admin-dark .content-wrapper{
    padding-top:80px!important;min-height:100vh!important;overflow-x:hidden!important;
  }
  body .content-wrapper>.content,body section.content{
    width:100%!important;max-width:100%!important;padding:14px 12px 28px!important;margin:0!important;
  }
  body .content-wrapper>.container-fluid{padding-left:12px!important;padding-right:12px!important;}

  body.admin-light .main-sidebar,body.admin-dark .main-sidebar,
  body.admin-light.sidebar-collapse .main-sidebar,body.admin-dark.sidebar-collapse .main-sidebar{
    position:fixed!important;top:0!important;left:0!important;bottom:0!important;
    width:min(300px,88vw)!important;min-width:0!important;max-width:88vw!important;height:100vh!important;
    padding-top:68px!important;transform:translate3d(-105%,0,0)!important;
    transition:transform .22s ease!important;overflow:hidden!important;z-index:1065!important;
  }
  body.sidebar-open .main-sidebar,
  body.sidebar-open.sidebar-collapse .main-sidebar{transform:translate3d(0,0,0)!important;}
  body .main-sidebar>.sidebar{
    position:relative!important;width:100%!important;height:calc(100vh - 68px)!important;
    padding:10px 0 94px!important;overflow-y:auto!important;overflow-x:hidden!important;
  }
  body.sidebar-collapse .main-sidebar .brand-panel,
  body .main-sidebar .brand-panel{
    width:auto!important;height:auto!important;margin:8px 12px 12px!important;padding:12px!important;
    display:flex!important;justify-content:flex-start!important;overflow:visible!important;
  }
  body.sidebar-collapse .main-sidebar .brand-panel h3,
  body.sidebar-collapse .main-sidebar .brand-panel span{display:block!important;visibility:visible!important;width:auto!important;height:auto!important;opacity:1!important;}
  body.sidebar-collapse .main-sidebar .brand-icon,
  body.sidebar-collapse .main-sidebar .brand-logo-img{width:52px!important;height:52px!important;min-width:52px!important;}
  body.sidebar-collapse .sidebar-menu,
  body .sidebar-menu{display:block!important;width:100%!important;padding:0 10px 18px!important;}
  body.sidebar-collapse .sidebar-menu>li,
  body .sidebar-menu>li{display:block!important;width:100%!important;margin:3px 0!important;}
  body.sidebar-collapse .sidebar-menu>li>a,
  body .sidebar-menu>li>a{
    width:100%!important;height:auto!important;min-height:48px!important;margin:0!important;padding:10px 12px!important;
    display:flex!important;align-items:center!important;justify-content:flex-start!important;border-radius:11px!important;
    overflow:visible!important;
  }
  body.sidebar-collapse .sidebar-menu>li>a>span,
  body .sidebar-menu>li>a>span{display:inline!important;visibility:visible!important;max-width:none!important;opacity:1!important;white-space:normal!important;}
  body.sidebar-collapse .sidebar-menu>li>a>.pull-right-container,
  body .sidebar-menu>li>a>.pull-right-container{display:block!important;margin-left:auto!important;}
  body.sidebar-collapse .sidebar-menu>li>a>i,
  body .sidebar-menu>li>a>i{
    width:28px!important;height:28px!important;min-width:28px!important;margin:0 9px 0 0!important;
    display:inline-flex!important;font-size:15px!important;border-radius:8px!important;
  }
  body.sidebar-collapse .sidebar-menu .treeview-menu,
  body .sidebar-menu .treeview-menu{width:100%!important;margin:5px 0 8px!important;padding:7px 6px 7px 14px!important;}
  body.sidebar-collapse .sidebar-menu li.menu-open>.treeview-menu,
  body.sidebar-collapse .sidebar-menu li.active>.treeview-menu{display:block!important;}

  /* Cerrar sesión solo pertenece al drawer en móvil: nunca tapa formularios/tarjetas. */
  body>.mpx-sidebar-logout.mpx-logout-detached{display:none!important;}
  body .main-sidebar .mpx-sidebar-logout{
    position:absolute!important;left:12px!important;right:12px!important;bottom:12px!important;width:auto!important;
    padding:0!important;margin:0!important;z-index:5!important;
  }
  body .main-sidebar .mpx-sidebar-logout a{
    width:100%!important;min-height:52px!important;padding:10px 14px!important;justify-content:flex-start!important;
  }
  body .main-sidebar .mpx-sidebar-logout a span{display:inline!important;}
  body .sidebar-footer-logo{display:none!important;}

  /* Dashboard */
  .prime-dashboard{width:100%!important;max-width:100%!important;padding:0!important;}
  .prime-page-head{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:12px!important;margin-bottom:14px!important;}
  .prime-page-head h1{font-size:27px!important;line-height:1.1!important;}
  .prime-page-head p{font-size:13px!important;line-height:1.4!important;}
  .prime-date{align-self:flex-start!important;}
  .prime-kpis,.prime-grid-main,.prime-grid-bottom,.prime-side-stack{
    display:grid!important;grid-template-columns:1fr!important;gap:12px!important;width:100%!important;
  }
  .prime-kpi,.prime-panel{width:100%!important;min-width:0!important;max-width:100%!important;}
  .prime-kpi{min-height:0!important;padding:16px!important;}
  .prime-kpi-value{font-size:25px!important;}
  .prime-panel-head{flex-wrap:wrap!important;align-items:center!important;}
  .prime-chart{height:260px!important;min-width:0!important;padding:12px 8px!important;}
  .prime-actions{grid-template-columns:1fr!important;}

  /* Repartidor / logística móvil */
  .rpHero,.rpStats,.delivery,.dHead,.dBody,.customerBox,.journeyBox,.steps,.step{
    width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important;
  }
  .rpHero{padding:20px 16px!important;margin-bottom:12px!important;}
  .rpHero h1{font-size:26px!important;line-height:1.1!important;}
  .rpStats{grid-template-columns:1fr!important;gap:9px!important;}
  .delivery{border-radius:18px!important;margin-bottom:12px!important;overflow:hidden!important;}
  .dHead{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:8px!important;padding:14px!important;}
  .dHead>div{width:100%!important;min-width:0!important;overflow-wrap:anywhere!important;}
  .dHead .tag{max-width:100%!important;white-space:normal!important;line-height:1.3!important;}
  .dBody{padding:12px!important;}
  .customerTop{display:grid!important;grid-template-columns:38px minmax(0,1fr)!important;gap:9px!important;}
  .contactActions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:7px!important;}
  .contactActions .act{width:100%!important;justify-content:center!important;white-space:normal!important;text-align:center!important;}
  .steps{grid-template-columns:1fr!important;gap:10px!important;}
  .step{padding:12px!important;overflow:hidden!important;}
  .field,.capture,.btnRep,.sign{width:100%!important;max-width:100%!important;box-sizing:border-box!important;}
  .capture{font-size:13px!important;padding:7px!important;overflow:hidden!important;}
  .capture::file-selector-button{max-width:58%!important;padding:8px 9px!important;margin-right:7px!important;border:0!important;border-radius:8px!important;}
  .sign{display:block!important;height:155px!important;min-height:155px!important;}
  textarea.field{resize:vertical!important;}

  /* Mapas en admin/repartidor */
  .liveMap,#liveMap,#map,#mapa,#mapCliente,#mapRepartidor,#mpxLeafletMap,.leaflet-container{
    width:100%!important;max-width:100%!important;min-height:300px!important;height:360px!important;border-radius:16px!important;
  }

  /* ---------- TIENDA PÚBLICA ---------- */
  body.web-light .header,body.web-dark .header{
    position:sticky!important;top:0!important;z-index:1000!important;width:100%!important;
    display:grid!important;grid-template-columns:minmax(0,1fr) auto auto auto!important;
    grid-template-rows:58px 48px!important;align-items:center!important;gap:7px!important;
    padding:7px 10px 10px!important;box-sizing:border-box!important;
  }
  body.web-light .brandGroup,body.web-dark .brandGroup{
    grid-column:1!important;grid-row:1!important;display:flex!important;align-items:center!important;min-width:0!important;
  }
  body.web-light .brandPrimeHeader,body.web-dark .brandPrimeHeader{
    min-width:0!important;max-width:190px!important;width:auto!important;gap:8px!important;overflow:hidden!important;
  }
  body.web-light .brandPrimeHeader img,body.web-dark .brandPrimeHeader img{
    width:44px!important;height:44px!important;min-width:44px!important;max-width:44px!important;
  }
  body.web-light .brandPrimeText,body.web-dark .brandPrimeText{display:flex!important;min-width:0!important;overflow:hidden!important;}
  body.web-light .brandPrimeText b,body.web-dark .brandPrimeText b{font-size:13px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}
  body.web-light .brandPrimeText small,body.web-dark .brandPrimeText small{font-size:6.7px!important;letter-spacing:1.25px!important;white-space:nowrap!important;}
  body.web-light .menuIcon,body.web-dark .menuIcon{display:none!important;}
  body.web-light .themeBtn,body.web-dark .themeBtn{
    grid-row:1!important;width:44px!important;height:44px!important;min-width:44px!important;padding:0!important;font-size:0!important;
    display:flex!important;align-items:center!important;justify-content:center!important;
  }
  body.web-light .themeBtn i,body.web-dark .themeBtn i{font-size:17px!important;margin:0!important;}
  body.web-light .customerChip,body.web-dark .customerChip,
  body.web-light .navbtn.bellCli,body.web-dark .navbtn.bellCli,
  body.web-light .header>a.navbtn[href="cliente_login.php"],body.web-dark .header>a.navbtn[href="cliente_login.php"]{
    grid-row:1!important;width:44px!important;height:44px!important;min-width:44px!important;padding:0!important;
    display:flex!important;align-items:center!important;justify-content:center!important;border-radius:13px!important;
  }
  body.web-light .customerChip img,body.web-dark .customerChip img{width:34px!important;height:34px!important;margin:0!important;}
  body.web-light .customerChip span,body.web-dark .customerChip span{display:none!important;}
  body.web-light .header>a.navbtn[href="cliente_login.php"],body.web-dark .header>a.navbtn[href="cliente_login.php"]{font-size:0!important;}
  body.web-light .header>a.navbtn[href="cliente_login.php"]:before,body.web-dark .header>a.navbtn[href="cliente_login.php"]:before{
    content:"\f007";font-family:FontAwesome;font-size:17px!important;
  }
  body.web-light .header>a.navbtn[href="cliente_logout.php"],body.web-dark .header>a.navbtn[href="cliente_logout.php"]{display:none!important;}
  body.web-light .cartbtn,body.web-dark .cartbtn{
    grid-row:1!important;width:auto!important;min-width:50px!important;height:44px!important;padding:0 10px!important;
    display:flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;white-space:nowrap!important;
  }
  body.web-light .search,body.web-dark .search{
    grid-column:1/-1!important;grid-row:2!important;width:100%!important;height:46px!important;min-width:0!important;margin:0!important;
  }
  body.web-light .search input,body.web-dark .search input{height:44px!important;min-width:0!important;font-size:14px!important;}
  body.web-light .search>button,body.web-dark .search>button{width:50px!important;min-width:50px!important;}
  body.web-light .primeCategoryNav,body.web-dark .primeCategoryNav{
    width:100%!important;max-width:100%!important;padding:0 10px!important;overflow-x:auto!important;display:flex!important;gap:4px!important;
    scroll-snap-type:x proximity!important;-webkit-overflow-scrolling:touch!important;
  }
  body.web-light .primeCategoryNav a,body.web-dark .primeCategoryNav a{scroll-snap-align:start!important;flex:0 0 auto!important;padding:12px 13px!important;}
  body.web-light .primeHero,body.web-dark .primeHero{
    width:auto!important;margin:10px!important;padding:22px 16px!important;border-radius:20px!important;grid-template-columns:1fr!important;min-height:0!important;
  }
  body.web-light .primeHeroCopy h1,body.web-dark .primeHeroCopy h1{font-size:clamp(30px,9.5vw,40px)!important;line-height:1.02!important;}
  body.web-light .primeHeroCopy p,body.web-dark .primeHeroCopy p{font-size:14px!important;line-height:1.5!important;}
  body.web-light .heroActionsPremium,body.web-dark .heroActionsPremium{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;}
  body.web-light .heroActionsPremium>*,body.web-dark .heroActionsPremium>*{width:100%!important;justify-content:center!important;}
  body.web-light .primeHeroProducts,body.web-dark .primeHeroProducts{display:none!important;}
  body.web-light .retailTrustBar,body.web-dark .retailTrustBar{display:grid!important;grid-template-columns:1fr!important;margin:0 10px!important;gap:7px!important;}
  body.web-light .cats,body.web-dark .cats{padding:10px!important;gap:7px!important;}
  body.web-light .grid,body.web-dark .grid{
    width:100%!important;display:grid!important;grid-template-columns:1fr!important;gap:12px!important;
    padding:10px 10px 40px!important;box-sizing:border-box!important;
  }
  body.web-light .card.product,body.web-dark .card.product{
    display:grid!important;grid-template-columns:132px minmax(0,1fr)!important;min-height:176px!important;border-radius:18px!important;overflow:hidden!important;
  }
  body.web-light .card.product .imgbox,body.web-dark .card.product .imgbox{
    width:132px!important;height:100%!important;min-height:176px!important;aspect-ratio:auto!important;border-radius:0!important;
  }
  body.web-light .card.product .card-body,body.web-dark .card.product .card-body{padding:13px!important;min-width:0!important;}
  body.web-light .card.product .badgecat,body.web-dark .card.product .badgecat{font-size:9px!important;padding:5px 8px!important;}
  body.web-light .card.product .name,body.web-dark .card.product .name{font-size:16px!important;margin:8px 0 5px!important;line-height:1.15!important;}
  body.web-light .card.product .desc,body.web-dark .card.product .desc{-webkit-line-clamp:2!important;font-size:11px!important;line-height:1.35!important;margin:5px 0!important;}
  body.web-light .card.product .price,body.web-dark .card.product .price{font-size:21px!important;margin:5px 0!important;}
  body.web-light .card.product .productActions,body.web-dark .card.product .productActions{grid-template-columns:1fr 1fr!important;gap:6px!important;}
  body.web-light .card.product .productActions button,body.web-dark .card.product .productActions button{min-height:40px!important;padding:8px 5px!important;font-size:11px!important;}
  body.web-light .storeFooter,body.web-dark .storeFooter{margin:12px 10px 22px!important;padding:20px 16px!important;border-radius:20px!important;}
  body.web-light .storeFooter .footgrid,body.web-dark .storeFooter .footgrid{grid-template-columns:1fr!important;gap:16px!important;}

  /* modales tienda: ocupan pantalla útil sin salirse */
  body.web-light .modalx,body.web-dark .modalx,body.web-light .termsOverlay,body.web-dark .termsOverlay{padding:8px!important;align-items:flex-end!important;}
  body.web-light .modalx .box,body.web-dark .modalx .box,body.web-light .termsPanel,body.web-dark .termsPanel{
    width:100%!important;max-width:100%!important;max-height:92dvh!important;border-radius:22px 22px 0 0!important;overflow-y:auto!important;
  }
  body.web-light .detail,body.web-dark .detail{grid-template-columns:1fr!important;gap:14px!important;}

  /* Portal cliente */
  body.cliente-light .layout,body.cliente-dark .layout{display:block!important;width:100%!important;}
  body.cliente-light .side,body.cliente-dark .side{
    position:relative!important;width:100%!important;height:auto!important;padding:10px!important;overflow:hidden!important;
  }
  body.cliente-light .brandPro,body.cliente-dark .brandPro{padding:6px 4px 10px!important;margin:0!important;}
  body.cliente-light .side .nav,body.cliente-dark .side .nav{display:flex!important;overflow-x:auto!important;gap:6px!important;padding:4px 0 7px!important;}
  body.cliente-light .side .nav a,body.cliente-dark .side .nav a{flex:0 0 auto!important;padding:10px 12px!important;margin:0!important;}
  body.cliente-light .main,body.cliente-dark .main{width:100%!important;padding:14px 10px 24px!important;}
  body.cliente-light .top,body.cliente-dark .top{flex-direction:column!important;align-items:stretch!important;gap:10px!important;}
  body.cliente-light .profileMini,body.cliente-dark .profileMini{width:100%!important;justify-content:flex-start!important;}
  body.cliente-light .hello,body.cliente-dark .hello{padding:20px 16px!important;border-radius:18px!important;}
  body.cliente-light .cards,body.cliente-dark .cards{grid-template-columns:1fr!important;gap:10px!important;}

  /* Seguimiento */
  body .wrap{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;margin:8px auto!important;}
  body .steps{max-width:100%!important;overflow-x:auto!important;}
}

@media (max-width: 390px){
  body.web-light .brandPrimeHeader,body.web-dark .brandPrimeHeader{max-width:150px!important;}
  body.web-light .brandPrimeText small,body.web-dark .brandPrimeText small{display:none!important;}
  body.web-light .card.product,body.web-dark .card.product{grid-template-columns:116px minmax(0,1fr)!important;}
  body.web-light .card.product .imgbox,body.web-dark .card.product .imgbox{width:116px!important;min-height:168px!important;}
  body.web-light .card.product .productActions{grid-template-columns:1fr!important;}
  body.web-dark .card.product .productActions{grid-template-columns:1fr!important;}
  .contactActions{grid-template-columns:1fr!important;}
}
@media (max-width:767px){
  body.sidebar-open:after{pointer-events:auto!important;}
  body .row{max-width:none!important;width:auto!important;margin-left:-6px!important;margin-right:-6px!important;}
  body .row>[class*="col-"]{padding-left:6px!important;padding-right:6px!important;}
}
