/* Migrado do JavaScript: mobile unificado. */



@media (max-width: 900px){
  html, body{
    overflow-x: hidden !important;
    -webkit-text-size-adjust: 100%;
  }

  body{
    padding-bottom: calc(116px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .topbar{
    position: sticky !important;
    top: 0 !important;
    z-index: 260 !important;
    min-height: 54px !important;
    height: auto !important;
    max-height: none !important;
    padding: 2px 7px 4px !important;
    gap: 3px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    background: #fff !important;
    border-bottom: 1px solid rgba(0,0,0,.08) !important;
    overflow: visible !important;
  }

  .topbar .logoBtn{
    width: 34px !important;
    min-width: 34px !important;
    height: 28px !important;
    flex: 0 0 auto !important;
  }

  .topbar .iconBtn{
    min-width: 29px !important;
    width: 29px !important;
    height: 29px !important;
    border-radius: 8px !important;
    flex: 0 0 auto !important;
  }

  .topbar .pageNav{
    height: 30px !important;
    gap: 2px !important;
    margin-left: auto !important;
    display: flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
  }

  .topbar .pageNav input{
    width: 44px !important;
    height: 30px !important;
    font-size: 15px !important;
    border-radius: 12px !important;
  }

  .topbar .pageNav button{
    min-width: 22px !important;
    width: 22px !important;
    height: 30px !important;
    padding: 0 !important;
    font-size: 17px !important;
  }

  .topbar .searchWrap{
    order: 99 !important;
    flex: 1 0 100% !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 32px !important;
    height: 32px !important;
    margin: 0 !important;
    border-radius: 13px !important;
    border: 2px solid #111 !important;
    background: #fff !important;
    z-index: 261 !important;
    position: relative !important;
    inset: auto !important;
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    box-sizing: border-box !important;
  }

  .topbar .searchWrap input{
    height: 28px !important;
    font-size: 16px !important;
    min-width: 0 !important;
  }

  .layout,
  .viewerArea,
  .catalogViewport,
  .catalogMain,
  .pageStage,
  .catalogStage,
  .viewer,
  .pageWrap,
  .flipbook,
  .pdfPage,
  .pagePair{
    margin-top: 0 !important;
    padding-top: 0 !important;
    box-sizing: border-box !important;
  }

  .viewerArea,
  .catalogViewport,
  .catalogMain,
  .pageStage,
  .catalogStage,
  .viewer,
  .pageWrap{
    padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .pageStage,
  .catalogStage{
    align-items: flex-start !important;
    justify-content: flex-start !important;
  }

  .pageStage > *,
  .catalogStage > *,
  .viewerArea > *{
    margin-top: 0 !important;
  }

  .mobileQuickBar,
  .mobileBottomBar,
  .bottomQuickBar{
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    position: fixed !important;
    left: 10px !important;
    right: 10px !important;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 230 !important;
    gap: 8px !important;
    align-items: stretch !important;
    justify-content: space-between !important;
    height: auto !important;
    background: transparent !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  .mobileQuickBar > *,
  .mobileBottomBar > *,
  .bottomQuickBar > *,
  .mobileQuickBar a,
  .mobileQuickBar button,
  .mobileBottomBar a,
  .mobileBottomBar button,
  .bottomQuickBar a,
  .bottomQuickBar button{
    flex: 1 1 0 !important;
    min-width: 0 !important;
    height: 40px !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    font-size: 9.5px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    padding: 0 6px !important;
    box-shadow: 0 7px 18px rgba(0,0,0,.18) !important;
    transform: none !important;
    margin: 0 !important;
  }

  .mobileQuickBar .categoriesBtn,
  .mobileBottomBar .categoriesBtn,
  .bottomQuickBar .categoriesBtn{
    background: #111 !important;
    color: #fff !important;
  }

  .mobileQuickBar .cartBtn,
  .mobileBottomBar .cartBtn,
  .bottomQuickBar .cartBtn{
    background: #fff !important;
    color: #111 !important;
  }

  .mobileQuickBar .assistantBtn,
  .mobileBottomBar .assistantBtn,
  .bottomQuickBar .assistantBtn{
    background: #0aa14b !important;
    color: #fff !important;
  }

  body.suave-search-active .mobileQuickBar,
  body.suave-search-active .mobileBottomBar,
  body.suave-search-active .bottomQuickBar,
  body.suave-product-modal-open .mobileQuickBar,
  body.suave-product-modal-open .mobileBottomBar,
  body.suave-product-modal-open .bottomQuickBar{
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  body.suave-product-modal-open .searchPanel,
  body.suave-product-modal-open #searchPanel,
  body.suave-product-modal-open .searchResults,
  body.suave-product-modal-open #searchResults,
  body.suave-product-modal-open #searchProductResults,
  body.suave-product-modal-open #szPdfReferenceResults{
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  .productModal,
  .product-modal,
  .productDetailModal,
  .product-detail-modal,
  .modalProduct,
  #productModal,
  #productDetailModal,
  .modalOverlay,
  .modal-backdrop,
  .modalBackdrop,
  .productOverlay,
  .cartProductModal,
  [class*="product-modal"],
  [id*="productModal"],
  [id*="ProductModal"]{
    z-index: 10000 !important;
  }

  .searchPanel,
  #searchPanel,
  .searchResults,
  #searchResults,
  #searchProductResults{
    z-index: 850 !important;
  }
}

@media (max-width: 420px){
  .topbar{
    min-height: 50px !important;
    padding-left: 5px !important;
    padding-right: 5px !important;
  }

  .topbar .logoBtn{
    width: 30px !important;
    min-width: 30px !important;
  }

  .topbar .iconBtn{
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
  }

  .topbar .pageNav input{
    width: 42px !important;
    font-size: 15px !important;
  }

  .topbar .searchWrap{
    height: 31px !important;
    min-height: 31px !important;
  }

  .topbar .searchWrap input{
    height: 27px !important;
    font-size: 16px !important;
  }

  .mobileQuickBar,
  .mobileBottomBar,
  .bottomQuickBar{
    bottom: calc(66px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .mobileQuickBar > *,
  .mobileBottomBar > *,
  .bottomQuickBar > *,
  .mobileQuickBar a,
  .mobileQuickBar button,
  .mobileBottomBar a,
  .mobileBottomBar button,
  .bottomQuickBar a,
  .bottomQuickBar button{
    height: 38px !important;
    font-size: 9px !important;
    padding: 0 5px !important;
  }
}





/* Toast escondido não pode sobrar como bolinha/pílula preta no rodapé */
.toast:not(.show){
  opacity:0 !important;
  visibility:hidden !important;
  pointer-events:none !important;
  transform:translateX(-50%) translateY(220%) !important;
}

@media (max-width:900px){
  /* Evita contador do carrinho mobile virar bolinha preta deslocada */
  .mobileQuickBar #mobileCartCount,
  #mobileCartFloatingBtn #mobileCartCount,
  .mobileCartFloatingBtn #mobileCartCount{
    position:static !important;
    display:inline-flex !important;
    width:auto !important;
    height:auto !important;
    min-width:18px !important;
    min-height:18px !important;
    padding:1px 6px !important;
    margin-left:4px !important;
    border-radius:999px !important;
    background:#111 !important;
    color:#fff !important;
    font-size:11px !important;
    line-height:16px !important;
    transform:none !important;
    box-shadow:none !important;
  }

  .mobileQuickBar #mobileCartCount:empty,
  .mobileQuickBar #mobileCartCount[data-empty="1"]{
    display:none !important;
  }

  /* Remove barras antigas caso algum CSS antigo tente exibir */
  .mobileBottomBar,
  .bottomQuickBar{
    display:none !important;
    visibility:hidden !important;
    pointer-events:none !important;
  }

  .mobileQuickBar::before,
  .mobileQuickBar::after{
    display:none !important;
    content:none !important;
  }

  .suave-howto-draggable-lite{
    cursor:grab !important;
    touch-action:none !important;
    user-select:none !important;
    -webkit-user-select:none !important;
    z-index:78 !important;
  }
}





@media (max-width: 900px) {
  html,
  body {
    width: 100% !important;
    height: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
    overscroll-behavior: none !important;
    background: #fff !important;
  }

  body.catalogo-publico7-13-mobile {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: var(--altura-tela, 100dvh) !important;
    max-height: var(--altura-tela, 100dvh) !important;
    overflow: hidden !important;
  }

  body.catalogo-publico7-13-mobile .topbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 70 !important;
  }

  body.catalogo-publico7-13-mobile .searchWrap {
    position: fixed !important;
    top: 58px !important;
    left: 10px !important;
    right: 10px !important;
    z-index: 65 !important;
    pointer-events: auto !important;
  }

  body.catalogo-publico7-13-mobile .layout {
    height: var(--altura-tela, 100dvh) !important;
    max-height: var(--altura-tela, 100dvh) !important;
    min-height: 0 !important;
    padding-top: 106px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  body.catalogo-publico7-13-mobile .viewerArea {
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    overflow: auto !important;
    overscroll-behavior-y: contain !important;
    overscroll-behavior-x: contain !important;
    -webkit-overflow-scrolling: touch !important;
    align-items: flex-start !important;
    justify-content: center !important;
    padding-bottom: 110px !important;
  }

  body.catalogo-publico7-13-mobile #pdfCanvas {
    max-height: none !important;
    height: auto !important;
    width: auto !important;
    max-width: 100% !important;
  }

  body.catalogo-publico7-13-mobile #searchPanel,
  body.catalogo-publico7-13-mobile .searchPanel {
    pointer-events: auto !important;
    z-index: 90 !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
  }

  body.carrinho-catalogo-aberto #searchPanel[data-busca-oculta-pelo-carrinho="1"] {
    display: none !important;
  }

  body.carrinho-catalogo-aberto #cartDrawer,
  body.carrinho-catalogo-aberto #cartDrawer.open,
  body.carrinho-catalogo-aberto .drawer.open {
    z-index: 2147483000 !important;
  }

  body.carrinho-catalogo-aberto .mobileQuickBar,
  body.carrinho-catalogo-aberto #mobileBottomBar,
  body.carrinho-catalogo-aberto .mobile-bottom-bar,
  body.carrinho-catalogo-aberto .bottom-nav {
    display: none !important;
  }

  body.catalogo-publico7-13-mobile .panel,
  body.catalogo-publico7-13-mobile .drawer,
  body.catalogo-publico7-13-mobile .modalBackdrop,
  body.catalogo-publico7-13-mobile .aiCard,
  body.catalogo-publico7-13-mobile .sankhyaOrderCard,
  body.catalogo-publico7-13-mobile .cartItems {
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Remove qualquer indicador antigo de puxar para atualizar */
  .pullRefresh,
  .pull-refresh,
  #pullRefresh,
  #pull-refresh,
  [class*="pullRefresh"],
  [class*="pull-refresh"],
  [id*="pullRefresh"],
  [id*="pull-refresh"],
  [class*="refresh"],
  [id*="refresh"] {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
  }
}

/* Migrado do JavaScript: ajustes finos mobile. */
@media (max-width: 900px) {
        body.catalogo-publico7-13-1-safe-bottom .viewerArea {
          padding-bottom: var(--suave-mobile-bottom-reserve, 118px) !important;
          box-sizing: border-box !important;
        }

        body.catalogo-publico7-13-1-safe-bottom .canvasWrap {
          margin-bottom: 12px !important;
        }

        body.catalogo-publico7-13-1-safe-bottom .mobileQuickBar {
          left: 14px !important;
          right: 14px !important;
          bottom: max(12px, env(safe-area-inset-bottom)) !important;
          z-index: 120 !important;
        }

        body.catalogo-publico7-13-1-safe-bottom .mobileQuickBar > * {
          min-width: 0 !important;
        }

        body.carrinho-catalogo-aberto .mobileQuickBar {
          display: none !important;
        }

        #searchInput,
        #homeProductSearchInput {
          -webkit-user-select: text !important;
          user-select: text !important;
        }
      }

/* Migrado do JavaScript: referencia PDF exata. */
#szPdfReferenceResults,
      .szPdfReferenceResults,
      .szTransformLink {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
      }
