/* AL MIZAN RIZQ — Mobile Responsive Recovery v1 / 2026-10-18
   CSS-only presentation corrections; no data, APIs, checkout, payments,
   source-of-truth, routing, or desktop (>900px) changes.
   Final stylesheet after all legacy and V5 presentation styles. */
@media (max-width:900px) {
  html,body{max-width:100%!important;overflow-x:clip!important}
  html body main#main{box-sizing:border-box!important;min-width:0!important;max-width:100%!important}
  html body main#main .content-section,
  html body main#main .commerce-layout,
  html body main#main .product-grid,
  html body main#main .collection,
  html body main#main .track-layout,
  html body main#main .track-card{min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
  html body main#main .content-section img:not(.amr-about-hero-mascot):not(.amr-contact-hero-mascot){max-width:100%}
  html body main#main :is(.track-card,.account-main,.content-section,.product-card,.collection,.frame) :is(h1,h2,h3,p,span){overflow-wrap:break-word}
  html body main#main :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),textarea,select){
    box-sizing:border-box;max-width:100%;min-width:0;
  }
  /* Tablet Shop filter controls previously exceeded their narrow side column. */
  html body.route-shop #commerce-section>#filters .filter-heading{
    flex-wrap:wrap!important;align-items:center!important;gap:6px 9px!important
  }
  html body.route-shop #commerce-section>#filters .filter-heading h2{
    white-space:normal!important;font-size:clamp(15px,2vw,19px)!important;min-width:0!important
  }
  html body.route-shop #commerce-section>#filters #clear-filters{
    white-space:normal!important;min-height:36px!important;text-align:left!important
  }
  html body.route-shop #commerce-section>#filters .price-inputs{min-width:0!important;max-width:100%!important}
  /* Live assistant remains tappable, but no longer covers checkout and forms. */
  html body .amr-putra-pet{
    right:7px!important;bottom:7px!important;width:100px!important;height:114px!important
  }
  html body .amr-putra-pet .p-platform{
    left:5px!important;bottom:13px!important;width:92px!important;height:33px!important
  }
  html body .amr-putra-pet .p-actor{
    left:12px!important;bottom:22px!important;width:76px!important;height:88px!important;
    min-width:76px!important;min-height:88px!important
  }
  html body .amr-putra-pet .p-name{display:none!important}
  html body .amr-putra-pet:not(.is-open) .p-greeting{display:none!important}
  html body .amr-putra-pet .p-chat{
    position:fixed!important;left:auto!important;right:8px!important;bottom:116px!important;
    width:min(365px,calc(100vw - 16px))!important;max-height:calc(100dvh - 128px)!important;
    border-radius:15px!important;overflow:auto!important
  }
  html body .amr-putra-pet .p-chat header{padding:12px!important}
  html body .amr-putra-pet .p-chat .p-close{
    width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important
  }
  /* Original footer skyline has been replaced by the requested global wallpaper;
     remove the otherwise empty 190–245px mobile gap. */
  html body footer.site-footer.amr-footer-v12{
    padding-top:clamp(36px,6vw,66px)!important;min-width:0!important;width:100%!important;
    box-sizing:border-box!important
  }
  html body footer.amr-footer-v12 .footer-inner,
  html body footer.amr-footer-v12 .footer-bottom.amr12-bottom{
    width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important
  }
  html body footer.amr-footer-v12 .footer-inner>div{
    min-width:0!important;max-width:100%!important;overflow-wrap:anywhere
  }
  html body footer.amr-footer-v12 .footer-bottom :is(a,button){
    min-height:36px;max-width:100%;overflow-wrap:break-word
  }
}
@media (max-width:600px) {
  /* One coherent mobile header row; account remains available inside the native menu. */
  html.amr-royale-live body .waterfront-shell{
    width:100%!important;max-width:100%!important;box-sizing:border-box!important
  }
  html.amr-royale-live body .waterfront-shell .header-inner{
    min-width:0!important;max-width:100%!important;gap:clamp(3px,1vw,6px)!important;
    padding:6px clamp(4px,1.5vw,8px)!important;box-sizing:border-box!important
  }
  html.amr-royale-live body .waterfront-shell .wf-nav-actions{gap:3px!important;min-width:0!important}
  html.amr-royale-live body .waterfront-shell .wf-nav-action{
    width:clamp(37px,10.5vw,44px)!important;height:44px!important;
    min-width:37px!important;min-height:44px!important;flex-shrink:0!important
  }
  html.amr-royale-live body .waterfront-shell .menu-toggle,
  html.amr-royale-live body .waterfront-shell .amr-royale-mobile-search{
    width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important
  }
  html.amr-royale-live body .waterfront-shell #primary-navigation.open{
    max-height:calc(100dvh - 95px)!important;overscroll-behavior:contain!important;
    overflow-y:auto!important;overflow-x:hidden!important;
    padding:10px!important;z-index:990!important
  }
  html.amr-royale-live body .waterfront-shell #primary-navigation.open>a{
    min-height:44px!important;white-space:normal!important
  }
  html.amr-royale-live body .waterfront-shell .site-header.amr-search-open #search-form{
    z-index:995!important;min-height:52px!important;box-shadow:0 10px 20px #000a!important
  }
  html.amr-royale-live body .waterfront-shell #product-search{
    min-height:44px!important;font-size:16px!important
  }
  /* Mobile homepage: show complete hero art, one full-body Putra (not sprite sheet),
     meaningful accessible live links, and no invisible misplaced hotspots. */
  html body.route-home #home-sections .amr-h4-hero{
    position:relative!important;height:330px!important;min-height:330px!important;
    aspect-ratio:auto!important;overflow:hidden!important;border:2px solid #edc46d!important;
    border-radius:17px!important;
    background:linear-gradient(180deg,#052047f2,#020c28ed 63%,#051a3ff5)!important;
    box-shadow:inset 0 0 0 2px #1776d08a,0 0 15px #006bff77!important
  }
  html body.route-home #home-sections .amr-h4-hero-art{
    position:absolute!important;inset:0 0 auto!important;width:100%!important;
    height:clamp(105px,33vw,200px)!important;
    background-image:url('/assets/amr-home-live-v4/home-hero-art.jpg')!important;
    background-size:100% auto!important;background-position:center top!important;
    background-repeat:no-repeat!important;z-index:1!important
  }
  html body.route-home #home-sections .amr-h4-hero .amr-h5-scenery{
    display:none!important
  }
  html body.route-home #home-sections .amr-h4-hero::before{
    content:"DARI SARAWAK UNTUK MALAYSIA"!important;
    position:absolute!important;z-index:4!important;left:16px!important;top:51%!important;
    width:66%!important;max-width:240px!important;
    font:800 clamp(12px,3.7vw,15px)/1.45 Georgia,serif!important;
    letter-spacing:.025em!important;color:#ffe4a8!important;
    text-shadow:0 2px 8px #000!important;pointer-events:none!important
  }
  html body.route-home #home-sections .amr-h4-hero .amr-h5-putra-stage{
    left:auto!important;right:7px!important;bottom:59px!important;
    width:clamp(95px,28vw,139px)!important;height:165px!important;max-height:53%!important;
    display:flex!important;align-items:flex-end!important;justify-content:flex-end!important;
    z-index:5!important;pointer-events:none!important;filter:drop-shadow(0 0 9px #0989ff8c)!important
  }
  html body.route-home #home-sections .amr-h4-hero .amr-h5-putra-stage img{
    display:block!important;width:100%!important;height:100%!important;
    object-fit:contain!important;object-position:center bottom!important
  }
  html body.route-home #home-sections .amr-h4-hero .amr-h4-logo-visit{
    left:34%!important;top:0!important;width:66%!important;height:clamp(105px,33vw,195px)!important;
    z-index:6!important
  }
  html body.route-home #home-sections .amr-h4-hero :is(.amr-h4-buy,.amr-h4-explore){
    position:absolute!important;top:auto!important;bottom:12px!important;
    height:46px!important;min-height:46px!important;width:44%!important;
    z-index:7!important;display:grid!important;place-items:center!important;
    font:800 clamp(11px,3.2vw,14px)/1.1 system-ui,sans-serif!important;
    color:#091e40!important;-webkit-text-fill-color:#091e40!important;
    border:1px solid #fbe4a7!important;border-radius:12px!important;
    background:linear-gradient(135deg,#ffe89d,#efb948)!important;
    text-shadow:none!important;box-shadow:0 2px 14px #0009!important;text-decoration:none!important
  }
  html body.route-home #home-sections .amr-h4-hero .amr-h4-buy{left:4%!important}
  html body.route-home #home-sections .amr-h4-hero .amr-h4-explore{
    left:auto!important;right:4%!important;color:#d6f6ff!important;-webkit-text-fill-color:#d6f6ff!important;
    border-color:#50d2ff!important;background:linear-gradient(135deg,#0857ba,#031d47)!important
  }
  html body.route-home #home-sections .amr-h4-hero :is(.amr-h4-buy,.amr-h4-explore) span{
    display:block!important;visibility:visible!important;
    font-size:inherit!important;font-weight:inherit!important;color:inherit!important;
    -webkit-text-fill-color:inherit!important;line-height:1.1!important
  }
  html body.route-home #home-sections .amr-h4-end-banner{
    min-height:90px!important;border-radius:14px!important;max-width:100%!important
  }
  html body.route-home #home-sections .home-featured #featured-products,
  html body.route-home #home-sections .home-categories #home-category-grid{
    width:100%!important;min-width:0!important;grid-template-columns:1fr!important
  }
  /* Text/input readability and room for touch interaction across all functional routes. */
  html body main#main :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),textarea,select){
    font-size:16px!important;min-height:44px
  }
  html body main#main :is(.track-card,.account-main) label{max-width:100%!important}
  html body.route-shop #commerce-section>.collection,
  html body.route-shop #commerce-section>.amr-live-panel,
  html body.route-shop #commerce-section>.amr-shop-banner{max-width:100%!important;min-width:0!important}
  html body.route-shop #commerce-section #product-grid{
    grid-template-columns:minmax(0,1fr)!important;gap:12px!important
  }
  html body.route-shop #commerce-section .collection-top{
    gap:9px!important;flex-wrap:wrap!important;min-width:0!important
  }
  html body.route-shop #commerce-section .collection-controls{
    gap:6px!important;min-width:0!important;flex-wrap:wrap!important
  }
  html body.route-shop #commerce-section #filter-toggle{min-height:44px!important}
  html body.route-shop #commerce-section>.amr-live-panel{
    position:relative!important;top:auto!important;min-width:0!important
  }
  html body footer.amr-footer-v12 .footer-bottom.amr12-bottom{
    grid-template-columns:minmax(0,1fr)!important;overflow-wrap:anywhere!important
  }
}
@media(max-width:350px) {
  html.amr-royale-live body .waterfront-shell .wf-nav-actions>.wf-account{
    display:none!important
  }
  html.amr-royale-live body .waterfront-shell .wf-nav-action{
    min-width:38px!important;width:38px!important
  }
  html body.route-home #home-sections .amr-h4-hero{
    height:310px!important;min-height:310px!important
  }
  html body.route-home #home-sections .amr-h4-hero::before{
    left:12px!important;width:68%!important;top:50%!important;font-size:12px!important
  }
  html body.route-home #home-sections .amr-h4-hero .amr-h5-putra-stage{
    right:2px!important;bottom:62px!important;width:96px!important;height:142px!important
  }
  html body.route-home #home-sections .amr-h4-hero :is(.amr-h4-buy,.amr-h4-explore){
    font-size:11px!important;min-width:0!important
  }
}
@media(prefers-reduced-motion:reduce){
  html body .amr-putra-pet *,html body.route-home #home-sections .amr-h4-hero *{
    scroll-behavior:auto!important;transition:none!important
  }
}

/* Compact mobile Shop controls: one tappable row, no wasted empty bar. */
@media(max-width:600px){
 html body.route-shop #commerce-section .collection-top .collection-controls{
  display:grid!important;grid-template-columns:minmax(82px,90px) minmax(0,1fr) minmax(74px,80px)!important;
  grid-template-rows:minmax(44px,auto)!important;align-items:center!important;
  justify-content:stretch!important;width:100%!important;max-width:100%!important;
  gap:6px!important;margin:0!important;min-width:0!important
 }
 html body.route-shop #commerce-section .collection-controls #filter-toggle{
  grid-column:1!important;grid-row:1!important;width:100%!important;
  min-width:0!important;height:44px!important;padding:6px 4px!important;font-size:12px!important
 }
 html body.route-shop #commerce-section .collection-controls .sort-label{
  grid-column:2!important;grid-row:1!important;display:block!important;
  width:100%!important;min-width:0!important;max-width:100%!important
 }
 html body.route-shop #commerce-section .collection-controls .sort-label select{
  display:block!important;width:100%!important;min-width:0!important;
  max-width:100%!important;height:44px!important;min-height:44px!important;
  font-size:14px!important;padding:5px 20px 5px 8px!important
 }
 html body.route-shop #commerce-section .collection-controls .view-switch{
  grid-column:3!important;grid-row:1!important;
  display:flex!important;align-items:center!important;justify-content:flex-end!important;
  gap:4px!important;width:100%!important;min-width:0!important
 }
 html body.route-shop #commerce-section .collection-controls .view-switch button{
  flex:1 1 0!important;min-width:0!important;max-width:40px!important;
  width:36px!important;height:44px!important;min-height:44px!important
 }
}

/* The mobile chat launcher must not cover product favourites or form buttons. */
@media(max-width:600px){
 html body .amr-putra-pet{
  right:5px!important;bottom:5px!important;width:76px!important;height:90px!important
 }
 html body .amr-putra-pet .p-platform{
  left:2px!important;bottom:8px!important;width:72px!important;height:27px!important
 }
 html body .amr-putra-pet .p-actor{
  left:11px!important;bottom:15px!important;width:54px!important;height:64px!important;
  min-width:54px!important;min-height:64px!important
 }
 html body .amr-putra-pet .p-chat{
  bottom:95px!important;max-height:calc(100dvh - 104px)!important
 }
}

/* Narrow 320px phones: retain readable sorting and both view controls. */
@media(max-width:350px){
 html body.route-shop #commerce-section .collection-top .collection-controls{
  grid-template-columns:70px minmax(0,1fr) 72px!important;gap:4px!important
 }
 html body.route-shop #commerce-section .collection-controls #filter-toggle{
  font-size:10px!important;padding:5px 1px!important
 }
 html body.route-shop #commerce-section .collection-controls .sort-label select{
  font-size:13px!important;padding:5px 17px 5px 5px!important
 }
 html body.route-shop #commerce-section .collection-controls .view-switch{
  gap:2px!important
 }
 html body.route-shop #commerce-section .collection-controls .view-switch button{
  width:35px!important;max-width:35px!important
 }
}
