/* TNKI.AM listing detail scroll performance.
   Reduces expensive repaint layers on mobile while preserving the visual design. */
html{scroll-behavior:auto!important;}
body.tnki-item-body{overflow-x:hidden;overscroll-behavior-y:auto;touch-action:pan-y;-webkit-overflow-scrolling:touch;}
/* Do not apply contain/transform to the main item page or seller blocks.
   Android Chrome treats fixed children inside contain:paint/layout as attached
   to the scrolling content, so the bottom Write/Call panel stops being fixed. */
body.tnki-item-body .tnki-related{contain:layout paint style;}
body.tnki-item-body .tnki-related-card{content-visibility:auto;contain-intrinsic-size:260px 340px;contain:layout paint style;}
body.tnki-item-body .tnki-item-photoSlide,
body.tnki-item-body .tnki-related-card__slide{transform:translateZ(0);backface-visibility:hidden;-webkit-backface-visibility:hidden;}

/* Backdrop blur on fixed/sticky layers is the main source of Android scroll jank.
   Keep the same light look with solid translucent backgrounds while scrolling pages. */
body.tnki-item-body [data-block="header-menu"],
body.tnki-item-body [data-block="header-menu"] .hdr-icon-btn,
body.tnki-item-body [data-block="header-menu"] .flag-btn,
body.tnki-item-body .tnki-social-strip__row,
body.tnki-item-body .tnki-list-search-shell.is-floating .tnki-list-search-row,
body.tnki-item-body .tnki-item-actions{
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
body.tnki-item-body [data-block="header-menu"]{background:rgba(255,255,255,.96)!important;}
body.tnki-item-body [data-block="header-menu"] .hdr-icon-btn,
body.tnki-item-body [data-block="header-menu"] .flag-btn{background:rgba(255,255,255,.96)!important;box-shadow:0 6px 16px rgba(15,23,42,.07)!important;}
body.tnki-item-body .tnki-social-strip__row{background:linear-gradient(135deg,rgba(236,253,245,.94),rgba(239,246,255,.94),rgba(250,245,255,.92))!important;box-shadow:0 8px 20px rgba(15,23,42,.06)!important;}
body.tnki-item-body .tnki-item-actions{position:fixed!important;left:50%!important;right:auto!important;bottom:max(10px,env(safe-area-inset-bottom))!important;transform:translate3d(-50%,0,0)!important;z-index:99990!important;background:rgba(255,255,255,.98)!important;box-shadow:0 8px 22px rgba(15,23,42,.12)!important;will-change:transform!important;}
body.tnki-item-body{padding-bottom:calc(86px + env(safe-area-inset-bottom));}

/* Disable unnecessary paint-heavy hover animations on touch devices. */
@media (hover:none){
  body.tnki-item-body .tnki-item-page :where(a,button,[role="button"]),
  body.tnki-item-body .tnki-related-card__photo,
  body.tnki-item-body .tnki-related-card__body,
  body.tnki-item-body .tnki-item-photoSlide{transition:transform .10s ease!important;}
  body.tnki-item-body .tnki-item-page :where(a,button,[role="button"]):active{filter:none!important;}
}

/* Keep below-the-fold blocks cheap before the user reaches them. */
@supports (content-visibility:auto){
  /* Keep content-visibility only for related listings. Applying containment to
     the main item/seller sections can make fixed mobile action bars and header
     layers feel as if they are attached to content while scrolling. */
  body.tnki-item-body .tnki-related{content-visibility:auto;contain-intrinsic-size:1px 520px;}
}

/* Safety override: keep fixed bottom buttons tied to the viewport. */
body.tnki-item-body .tnki-item-page{contain:none!important;transform:none!important;filter:none!important;perspective:none!important;}
body.tnki-item-body .tnki-item-actions{position:fixed!important;}

/* TNKI 2026-06-19: keep item page scroll light on mobile. */
body.tnki-item-body [data-block="header-menu"] .brand b{animation:none!important;}
@media (hover:none){
  body.tnki-item-body .tnki-related-card,
  body.tnki-item-body .tnki-related-card *,
  body.tnki-item-body .tnki-item-page :where(a,button,[role="button"]){
    transition-property:transform,opacity,background-color,border-color,box-shadow!important;
  }
}
