/* Long Coffee 2026-11-12: Unlock native vertical touch scrolling on customer pages.
   Customer-only selectors; Admin/POS layout is intentionally not modified.
   Previous legacy styles pinned the customer shell to 100dvh and hid html overflow,
   while newer styles turned menu pages into a normal vertical document. */
@media (max-width: 1100px) {
  html:has(body > .site-header) {
    height: auto !important;
    min-height: 100% !important;
    overflow-x: clip !important;
    overflow-y: auto !important;
    overscroll-behavior-y: auto !important;
    -webkit-overflow-scrolling: touch;
    scroll-padding-top: 66px;
  }
  body:has(> .site-header):not(.cart-open) {
    position: relative !important;
    height: auto !important;
    min-height: 100dvh !important;
    max-height: none !important;
    overflow-x: clip !important;
    overflow-y: visible !important;
    touch-action: auto !important;
  }
  body:has(> .site-header) main {
    display: block !important;
    position: static !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  body:has(> .site-header) #thuc-don:not([hidden]),
  body:has(> .site-header) #customer-invoices:not([hidden]),
  body:has(> .site-header) #lien-he:not([hidden]) {
    position: relative !important;
    inset: auto !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    touch-action: auto !important;
    overscroll-behavior-y: auto !important;
  }
  body:has(> .site-header) #thuc-don .menu-layout,
  body:has(> .site-header) #thuc-don .menu-main,
  body:has(> .site-header) #thuc-don #product-grid,
  body:has(> .site-header) #thuc-don .product-menu-app-page,
  body:has(> .site-header) #thuc-don .product-category-products,
  body:has(> .site-header) #thuc-don .product-menu-page {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
    scroll-snap-type: none !important;
    touch-action: pan-y !important;
    overscroll-behavior-y: auto !important;
  }
  body:has(> .site-header) #thuc-don .product-category-products {
    display: block !important;
    flex: none !important;
  }
  body:has(> .site-header) #thuc-don .product-menu-page {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: none !important;
    flex: none !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 0 10px !important;
    scroll-snap-align: none !important;
    scroll-snap-stop: normal !important;
  }
  /* Preserve the native scrollable cart while the background is intentionally locked. */
  html:has(body.cart-open > .site-header) { overflow-y: hidden !important; }
  body.cart-open:has(> .site-header) #cart-panel {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y !important;
  }
}
