/*
 PALMEA V28 — MENU SCROLL PAINT STABILITY
 Prevents intermittent blank product areas during scrolling on Chromium/WebView.
 Visual structure, dimensions and PALMEA identity remain unchanged.
*/

/* Keep the product layer deterministic during scroll repaint. */
body[data-page="menu"] [data-menu-root]{
  position:relative;
  z-index:1;
}

body[data-page="menu"] .section{
  position:relative;
  z-index:1;
  content-visibility:visible!important;
  contain:none!important;
}

body[data-page="menu"] .items{
  position:relative;
  z-index:1;
  isolation:isolate;
  content-visibility:visible!important;
  contain:none!important;
}

/*
 Product cards previously used backdrop-filter while the page simultaneously
 used fixed filtered background + persistent navigation layers.
 Chromium can drop the card foreground during fast repaint.
 Use the same PALMEA cream as a stable opaque surface instead.
*/
body[data-page="menu"] .product-card-v19{
  background:rgba(243,237,224,.985)!important;

  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;

  content-visibility:visible!important;
  contain:none!important;

  visibility:visible!important;
  opacity:1!important;

  will-change:auto!important;
  isolation:isolate!important;

  transform:none!important;
  -webkit-transform:none!important;
}

/* Keep every foreground element in the card paint layer. */
body[data-page="menu"] .product-card-v19 > *{
  position:relative;
  z-index:1;

  visibility:visible!important;
  opacity:1!important;
}

/* Do not create temporary GPU transform layers on hover/tap. */
body[data-page="menu"] .product-card-v19:hover,
body[data-page="menu"] .product-card-v19:active{
  transform:none!important;
  -webkit-transform:none!important;
}

body[data-page="menu"] .product-card-v19:hover{
  background:#f3ede0!important;
  box-shadow:0 16px 40px rgba(178,104,96,.12)!important;
}

/* Section headings do not need live background sampling either. */
body[data-page="menu"] .section-head{
  background:rgba(243,237,224,.96)!important;

  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;

  isolation:isolate;
  content-visibility:visible!important;
}

/* Stabilize the persistent category rail while the document underneath moves. */
body[data-page="menu"] .category-nav{
  background:rgba(243,237,224,.985)!important;

  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;

  will-change:auto!important;
}

/* Never let card images create an unexpected oversized paint layer. */
body[data-page="menu"] .product-card-v19 .menu-thumb{
  position:relative!important;
  z-index:1!important;
  contain:paint;
}

body[data-page="menu"] .product-card-v19 .menu-thumb img{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  backface-visibility:hidden;
  -webkit-backface-visibility:hidden;
}

/* Preserve existing mobile layout exactly. */
@media(max-width:760px){
  body[data-page="menu"] .product-card-v19{
    background:rgba(243,237,224,.99)!important;
  }
}