
/* =========================================================
   MAKEAPACK SITEWIDE INTERACTION HARDENING V1
   Reliability only: hit testing, touch targets, hidden layers,
   sane stacking, focus visibility. No page design restyle.
   ========================================================= */

/* Hidden UI must never intercept taps. */
html [hidden]{
  display:none!important;
  pointer-events:none!important;
}
html [aria-hidden="true"].smart-search-shell,
html [aria-hidden="true"].modal,
html [aria-hidden="true"][data-menu-panel],
html [aria-hidden="true"]#standaloneLegalPreview{
  pointer-events:none!important;
}

/* Native tap behavior without the blue Android/iOS flash. */
html body button,
html body a,
html body summary,
html body [role="button"],
html body label,
html body input[type="checkbox"],
html body input[type="radio"]{
  -webkit-tap-highlight-color:transparent!important;
}
html body button:not(:disabled),
html body a[href],
html body summary,
html body [role="button"]:not([aria-disabled="true"]){
  touch-action:manipulation;
}

/* Preserve keyboard accessibility. */
html body button:focus:not(:focus-visible),
html body a:focus:not(:focus-visible),
html body summary:focus:not(:focus-visible),
html body [role="button"]:focus:not(:focus-visible){
  outline:none;
}
html body button:focus-visible,
html body a:focus-visible,
html body summary:focus-visible,
html body [role="button"]:focus-visible,
html body input:focus-visible,
html body select:focus-visible,
html body textarea:focus-visible{
  outline:2px solid rgba(223,118,33,.38);
  outline-offset:2px;
}

/* Sane stacking. Old max-int z-index touch patches are intentionally neutralized. */
html body .site-header{
  z-index:6000!important;
  pointer-events:auto!important;
  isolation:isolate!important;
}
html body .site-header .container.nav{
  position:relative!important;
  z-index:1!important;
  pointer-events:auto!important;
}
html body .site-header .brand,
html body .site-header .menu-btn,
html body .site-header .smart-search-trigger,
html body .site-header .lang-dropdown,
html body .site-header .lang-current{
  position:relative!important;
  z-index:2!important;
  pointer-events:auto!important;
}
html body .site-header .lang-menu{
  z-index:6200!important;
  pointer-events:auto!important;
}
html body .smart-search-shell{z-index:10050!important}
html body #makeapack-final-request-popup{z-index:12000!important}

/* Decorative children inside icon/header controls cannot steal the parent hit. */
html body .site-header .brand>*,
html body .site-header .menu-btn>*,
html body .site-header .smart-search-trigger>*,
html body .site-header .lang-current>*,
html body .site-header .lang-btn>*,
html body #makeapack-final-request-popup .mkp-request-popup-close>*,
html body #makeapack-final-request-popup .mkp-request-popup-cta>*{
  pointer-events:none!important;
}

/* Header controls: comfortable 44px hit targets, visual icon/flag size unchanged. */
html body .site-header .menu-btn,
html body .site-header .smart-search-trigger,
html body .site-header .lang-current{
  min-width:44px!important;
  min-height:44px!important;
}
html body .site-header .lang-dropdown{
  width:44px!important;
  min-width:44px!important;
  height:44px!important;
  min-height:44px!important;
}
html body .site-header .lang-current{
  width:44px!important;
  height:44px!important;
}
html body .site-header .lang-menu{
  width:44px!important;
  min-width:44px!important;
}
html body .site-header .lang-menu .lang-btn{
  width:44px!important;
  min-width:44px!important;
  height:44px!important;
  min-height:44px!important;
  display:grid!important;
  place-items:center!important;
}
/* Active language may remain visually hidden by the approved dropdown logic. */
html body .site-header .lang-menu .lang-btn.active{
  display:none!important;
}

/* Search/popup close controls also get reliable finger targets. */
html body .smart-search-close,
html body [data-smart-search-close],
html body .mkp-request-popup-close{
  min-width:44px!important;
  min-height:44px!important;
  touch-action:manipulation!important;
  -webkit-tap-highlight-color:transparent!important;
}

/* Closed mobile navigation must not form an invisible click shield. */
@media(max-width:900px){
  html body .site-header .nav-links:not(.open){
    pointer-events:none!important;
  }
  html body .site-header .nav-links.open{
    pointer-events:auto!important;
    z-index:6100!important;
  }

  /* Prevent iOS focus zoom, which often feels like a failed first tap. */
  html body input:not([type="checkbox"]):not([type="radio"]),
  html body select,
  html body textarea{
    font-size:16px!important;
  }
}

/* Horizontal interaction zones keep native scrolling/swipe. */
html body .gallery-thumbs,
html body [data-gallery-thumbs],
html body .product-jump-track,
html body .pastry-related-track,
html body .bakery-related-track,
html body [class*="related-track"]{
  -webkit-overflow-scrolling:touch!important;
  overscroll-behavior-x:contain!important;
}
/* Do not force manipulation on swipe rails themselves. */
html body .gallery-thumbs,
html body [data-gallery-thumbs],
html body .product-jump-track{
  touch-action:pan-x pan-y!important;
}
