/* V20.29 — Carrinho sem duplicidade
   Mantém a área real do botão Adicionar e corrige o duplo disparo touch/click no mobile.
   Foco: uma confirmação por toque e uma única adição por confirmação. */

@media (max-width: 760px) {
  body.v19-store-mobile-active .v19-product,
  body.v19-store-mobile-active .v19-grid,
  body.v19-store-mobile-active .v19-product-info,
  body.v19-store-mobile-active .v19-add-row {
    content-visibility: visible !important;
  }

  body.v19-store-mobile-active .v19-product {
    overflow: hidden !important;
    contain: layout style !important;
  }

  body.v19-store-mobile-active .v19-product-info,
  body.v19-store-mobile-active .v19-add-row,
  body.v19-store-mobile-active .v19-qty,
  body.v19-store-mobile-active .v19-add {
    position: relative !important;
    z-index: 8 !important;
    pointer-events: auto !important;
  }

  body.v19-store-mobile-active .v19-add {
    min-height: 44px !important;
    height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    cursor: pointer !important;
  }

  body.v19-store-mobile-active .v19-add.is-adding-cart {
    opacity: .72 !important;
    cursor: progress !important;
  }

  body.v19-store-mobile-active .v19-qty button {
    min-height: 44px !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  body.v19-store-mobile-active .v19-qty {
    min-height: 44px !important;
    height: 44px !important;
  }

  body.v19-store-mobile-active .v20-cart-confirm-open.modal-backdrop,
  .v20-cart-confirm-open.modal-backdrop {
    position: fixed !important;
    inset: 0 !important;
    z-index: 999999 !important;
    display: grid !important;
    place-items: center !important;
    padding: calc(env(safe-area-inset-top, 0px) + 14px) 14px calc(env(safe-area-inset-bottom, 0px) + 92px) !important;
    background: rgba(0,0,0,.62) !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
  }

  body.v19-store-mobile-active .v20-cart-confirm-open .modal.mobile-sheet-modal,
  body.v19-store-mobile-active .v20-cart-confirm-open .modal,
  .v20-cart-confirm-open .modal.mobile-sheet-modal,
  .v20-cart-confirm-open .modal {
    width: min(94vw, 430px) !important;
    max-height: min(74vh, 540px) !important;
    border-radius: 24px !important;
    background: #ffffff !important;
    color: #101828 !important;
    overflow: hidden !important;
    box-shadow: 0 24px 70px rgba(0,0,0,.34) !important;
  }

  body.v19-store-mobile-active .v20-cart-confirm-open .modal-scroll,
  .v20-cart-confirm-open .modal-scroll {
    max-height: calc(min(74vh, 540px) - 86px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  body.v19-store-mobile-active .v20-cart-confirm-actions,
  .v20-cart-confirm-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  body.v19-store-mobile-active .v20-cart-confirm-actions .btn,
  .v20-cart-confirm-actions .btn {
    min-height: 50px !important;
    border-radius: 16px !important;
    font-weight: 1000 !important;
  }
}


/* V20.27 — camada limpa de toque real do botão Adicionar.
   Substitui a ponte V20.26 no JS: aqui só garantimos que nenhuma camada visual capture o toque. */
@media (max-width: 760px) {
  body.v19-store-mobile-active .v19-add-row {
    isolation: isolate !important;
  }

  body.v19-store-mobile-active .v19-add,
  body.v19-store-mobile-active button[data-v19-add-cart],
  body.v19-store-mobile-active button[data-add-cart] {
    position: relative !important;
    z-index: 50 !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
    min-height: 46px !important;
  }

  body.v19-store-mobile-active .v19-product-media,
  body.v19-store-mobile-active .v19-premium-label,
  body.v19-store-mobile-active .v19-product-media::before,
  body.v19-store-mobile-active .v19-product-media::after {
    pointer-events: none !important;
  }

  body.v19-store-mobile-active .v19-product-info {
    position: relative !important;
    z-index: 20 !important;
  }
}

/* V20.29 — mantém ajustes finais da finalização WhatsApp/cart no mobile.
   Mantém o rodapé do carrinho acima da bottom-nav e evita que cliques fiquem encobertos. */
.v19-page-cart .v19-cart-footer,
.v19-cart-footer {
  z-index: 95;
  pointer-events: auto;
}

.v19-cart-checkout,
#v19-finish-whatsapp {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
