/* Al Mayan V1.2: mobile scroll header and dark-mode family visuals.
 * Loaded LAST. Retains all original page structure, palette and animations. */
@media (max-width: 767.98px) {
  /* The home header must always be flush to the viewport during scrolling. */
  body.site--cinema:not(.admin-bar) .site-header--cinema,
  body:not(.admin-bar) .site-header { top:0!important; }
  body.mayan-design-preview .site-header,
  body.mayan-design-preview.site--cinema .site-header { top:0!important; }
  .site-header {
    left:0;right:0;width:100%;max-width:100vw;
    backface-visibility:hidden;
    transition:transform .25s ease-out,box-shadow .22s ease!important;
    will-change:auto!important;
  }
  /* A single solid brand-colored bar on deep scroll: no floating strip. */
  body.site--cinema .site-header--cinema.is-scrolled { box-shadow:none!important; }
  body.site--cinema .site-header--cinema.is-scrolled .sig-frame {
    border-radius:0!important;
    box-shadow:0 3px 13px rgba(8,34,23,.16)!important;
  }
  body.site--cinema .site-header--cinema.is-scrolled .sig-frame__surface {
    inset:0!important; /* Utility tier is hidden after scroll; do not retain its former 38px inset. */
  }
  body.site--cinema .site-header--cinema.is-scrolled .site-nav {
    padding-top:.3rem!important;padding-bottom:.3rem!important;
  }
  .site-header.mayan-mobile-hidden {
    transform:translate3d(0,calc(-100% - 70px),0)!important;
    pointer-events:none;
  }
  /* Leave scrolling menu in the viewport, above all page cards. */
  .site-header .navbar-collapse.show,
  .site-header .navbar-collapse.collapsing {max-height:calc(100dvh - 85px)!important;overflow-y:auto;}
  html {scroll-padding-top:75px;}
  body.site--cinema section[id],body.site--cinema div[id].sec {scroll-margin-top:75px!important;}
}
@media (prefers-reduced-motion: reduce) {
  .site-header {transition:none!important;}
}
/* Category/family visual motifs must still be legible against dark cards. */
html[data-theme="dark"] .cat-card__wm {
  color:rgba(190,233,207,.50)!important;
  background:radial-gradient(circle at 35% 30%,rgba(92,162,119,.23),rgba(61,122,86,.08) 75%)!important;
  opacity:1!important;
}
html[data-theme="dark"] .cat-card:hover .cat-card__wm {color:rgba(220,245,227,.66)!important;}
html[data-theme="dark"] .cat-card__media {
  background:radial-gradient(circle at 50% 30%,#fffefa 0%,#f0f4ed 74%,#e3eee5 100%)!important;
}
html[data-theme="dark"] .cat-card__media img,
html[data-theme="dark"] .m16-hero .m16-product img,
html[data-theme="dark"] .family-hero .fh-product img {
  opacity:1!important;mix-blend-mode:normal!important;visibility:visible!important;
}
/* Keep the individual family graphics visible (snowflake, cup, etc.) rather
   than washing them into the dark surface with the old translucent ink. */
html[data-theme="dark"] .cat-card__badge {color:#d6f0dd!important;}
html[data-theme="dark"] .family-hero[data-scene-type="family"] .fh-family-atmosphere .fh-mote,
html[data-theme="dark"] .m16-hero .m16-atmosphere {opacity:.85!important;}
/* Floating support buttons stay reachable, not hidden behind the header. */
@media (max-width:767.98px) {
  .site-header .navbar-toggler:focus-visible,
  .site-header .basket-nav:focus-visible {outline:2px solid #e5ce91!important;outline-offset:2px;}
}
