/* FINAL393 — global no-overlap / safe-zone authority. Does not alter business logic or hidden/photo systems. */
:root{--pp393-safe-gap:10px;--pp393-footer-gap:8px;--pp393-white:#fff}
html,body{max-width:100%;}
/* ADMIN / INVENTORY / SHOPKEEPER / SUPER ADMIN */
body.pp366-workspace-ui{
  background:#fff!important;
  overflow-x:hidden!important;
}
body.pp366-workspace-ui .pp366-topbar{
  box-sizing:border-box!important;
}
/* Clear white separator below header. */
body.pp366-workspace-ui::before{
  content:"";position:fixed;left:0;right:0;top:var(--pp366-head-h,68px);height:var(--pp393-safe-gap);background:#fff;z-index:4900;pointer-events:none;
}
/* Every central page section gets enough bottom clearance for the one surviving footer. */
body.pp366-workspace-ui main,
body.pp366-workspace-ui .wrap,
body.pp366-workspace-ui .container,
body.pp366-workspace-ui .shell,
body.pp366-workspace-ui .page,
body.pp366-workspace-ui .content,
body.pp366-workspace-ui .workspace,
body.pp366-workspace-ui .pp-main{
  box-sizing:border-box!important;
  padding-bottom:max(112px,calc(var(--pp389-footer-h,78px) + 30px + env(safe-area-inset-bottom,0px)))!important;
}
/* Footer remains one visual zone; give it a clean white gutter below and never allow page content over it. */
body.pp366-workspace-ui .pp366-footer,
body.pp366-workspace-ui .pp-inventory-suite,
body.pp366-workspace-ui .pp-store-footer{
  bottom:max(var(--pp393-footer-gap),env(safe-area-inset-bottom,0px))!important;
  z-index:12000!important;
}
body.pp366-workspace-ui .pp366-footer::after,
body.pp366-workspace-ui .pp-inventory-suite::after,
body.pp366-workspace-ui .pp-store-footer::after{
  content:"";position:absolute;left:-8px;right:-8px;top:100%;height:16px;background:#fff;pointer-events:none;
}
/* Toasts / sticky alerts stay above the footer, never on it. */
body.pp366-workspace-ui .toast,
body.pp366-workspace-ui .v23-toast,
body.pp366-workspace-ui [role="status"],
body.pp366-workspace-ui .alert.position-fixed{
  bottom:max(100px,calc(var(--pp389-footer-h,78px) + 20px + env(safe-area-inset-bottom,0px)))!important;
}
/* Images/cards may scale but must never bleed outside central content. */
body.pp366-workspace-ui img,body.pp366-workspace-ui video,body.pp366-workspace-ui canvas{max-width:100%;height:auto;}
body.pp366-workspace-ui .card,body.pp366-workspace-ui section,body.pp366-workspace-ui form{max-width:100%;box-sizing:border-box;}

/* CUSTOMER ONLINE STORE: exact 3 zones + white safe separators */
.market-page{background:#fff!important;overflow:hidden!important;}
.market-page .pp375-header{z-index:12000!important;}
.market-page .pp389-store-main{background:#fff!important;padding-top:var(--pp393-safe-gap)!important;padding-bottom:calc(var(--pp393-safe-gap) + 8px)!important;}
.market-page .pp389-store-main::before{content:"";display:block;height:1px;background:#fff;}
.market-page .market-bottom-nav{bottom:max(var(--pp393-footer-gap),env(safe-area-inset-bottom,0px))!important;z-index:12000!important;}
.market-page .market-bottom-nav::after{content:"";position:absolute;left:-8px;right:-8px;top:100%;height:16px;background:#fff;pointer-events:none;}
.market-page .market-sticky-actions,.market-page .pp-support-fab,.market-page .v20-ai-fab{bottom:calc(var(--pp389-store-footer,72px) + 22px + env(safe-area-inset-bottom,0px))!important;}
.market-page img,.market-page video,.market-page canvas{max-width:100%;height:auto;object-fit:contain;}
.market-page .market-card,.market-page .card,.market-page section{box-sizing:border-box;max-width:100%;}
/* Search always readable. */
.market-page .pp375-search-box>.form-control,.market-page .pp375-search input{color:#0b1220!important;-webkit-text-fill-color:#0b1220!important;opacity:1!important;}
.market-page .pp375-search-box>.form-control::placeholder,.market-page .pp375-search input::placeholder{color:#536174!important;opacity:1!important;}
/* No accidental horizontal page scroll. */
.market-page .pp389-store-main,body.pp366-workspace-ui{overscroll-behavior-x:none;}
@media(max-width:560px){
 body.pp366-workspace-ui main,body.pp366-workspace-ui .wrap,body.pp366-workspace-ui .container,body.pp366-workspace-ui .shell,body.pp366-workspace-ui .page,body.pp366-workspace-ui .content{padding-bottom:110px!important;}
}
