/* Mobile interaction safety layer.
   The document uses the browser's native scrolling and pinch-zoom behavior. */
@media (max-width: 768px) {
  html,
  body {
    min-height: 100%;
    overflow-x: clip;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.discovery-open:not(:has(.discovery-modal:not([hidden]))) {
    overflow: auto;
  }

  .page-overlay {
    pointer-events: none !important;
  }

  /* Kapalı tam ekran menü dokunmayı ve kaydırmayı engellemesin. */
  .mobile-nav:not(.open),
  .mobile-nav[hidden],
  .mobile-nav[aria-hidden="true"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .mobile-nav.open:not([hidden]) {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
  }

  .mobile-category-view,
  .mobile-product-view {
    overflow-x: hidden !important;
    overflow-y: auto;
    overscroll-behavior-x: none;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  /* Discovery modal scroll is owned by .df-main / discovery-form.css */
  .df-modal .discovery-dialog {
    overflow: hidden !important;
    touch-action: auto !important;
  }

  .mobile-view-track {
    overflow: hidden !important;
    overscroll-behavior-x: none;
    touch-action: pan-y;
    width: 100%;
    max-width: 100%;
  }

  .mobile-nav.open .mobile-category-view,
  .mobile-nav.open .mobile-product-view {
    left: 0 !important;
    right: 0 !important;
  }

  .hero-slider {
    touch-action: manipulation !important;
  }

  /* The map is informational on mobile; the page keeps the swipe gesture. */
  .expert-discovery-map,
  .expert-discovery-map-shell,
  .expert-discovery-map-canvas,
  .leaflet-container {
    touch-action: manipulation !important;
  }
}
