/* v821: stable, mobile-first search results for Staff Table Order, Quick Order,
   Customer Menu and Table QR. Always match grid and media geometry. Do not rely
   on keyboard focus; results remain compact after keyboard dismissal. */
@media (max-width: 767px) {
  html body.shop-page.tt-menu-search-results-v821 :is(#customer-category-first-v494,#customer-menu-nav-v494,#customer-category-context-v497,#customer-more-categories-v497,.category-strip,.customer-category-change-rail-v498){
    display:none!important;
  }
  html body.shop-page.tt-menu-search-results-v821 .menu-grid {
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:10px!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
  }
  html body.shop-page.tt-menu-search-results-v821 .menu-grid .premium-food-card:not([hidden]) {
    display:grid!important;
    grid-template-columns:88px minmax(0,1fr)!important;
    grid-auto-flow:row!important;
    align-items:center!important;
    gap:12px!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    min-height:110px!important;
    height:auto!important;
    padding:10px!important;
    margin:0!important;
    border-radius:16px!important;
    overflow:hidden!important;
    transform:none!important;
    animation:none!important;
    box-sizing:border-box!important;
  }
  html body.shop-page.tt-menu-search-results-v821 .menu-grid .premium-food-card .food-media {
    display:block!important;
    position:relative!important;
    grid-column:1!important;
    grid-row:1!important;
    flex:0 0 88px!important;
    width:88px!important;
    min-width:0!important;
    max-width:88px!important;
    height:88px!important;
    min-height:0!important;
    max-height:88px!important;
    margin:0!important;
    padding:0!important;
    border-radius:12px!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
  }
  html body.shop-page.tt-menu-search-results-v821 .menu-grid .premium-food-card .food-media img,
  html body.shop-page.tt-menu-search-results-v821 .menu-grid .premium-food-card .food-placeholder {
    width:100%!important;
    height:100%!important;
    max-width:100%!important;
    max-height:100%!important;
    min-height:0!important;
    object-fit:cover!important;
    display:block!important;
    margin:0!important;
    border-radius:inherit!important;
  }
  html body.shop-page.tt-menu-search-results-v821 .menu-grid .premium-food-card .food-info {
    display:flex!important;
    flex-direction:column!important;
    justify-content:center!important;
    align-self:stretch!important;
    grid-column:2!important;
    grid-row:1!important;
    min-width:0!important;
    max-width:100%!important;
    width:auto!important;
    padding:0!important;
    margin:0!important;
    overflow:visible!important;
  }
  html body.shop-page.tt-menu-search-results-v821 .menu-grid .premium-food-card .food-title-row {
    display:flex!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    padding:0!important;
  }
  html body.shop-page.tt-menu-search-results-v821 .menu-grid .premium-food-card .food-title-row h3 {
    display:block!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    padding:0!important;
    font-size:clamp(14px,3.7vw,16px)!important;
    line-height:1.3!important;
    font-weight:800!important;
    overflow-wrap:anywhere!important;
    white-space:normal!important;
  }
  html body.shop-page.tt-menu-search-results-v821 .menu-grid .premium-food-card :is(.food-info>p,.mini-options,.heart,.featured-badge) {
    display:none!important;
  }
  html body.shop-page.tt-menu-search-results-v821 .menu-grid .premium-food-card .food-footer {
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:6px!important;
    flex-wrap:wrap!important;
    min-width:0!important;
    max-width:100%!important;
    margin:6px 0 0!important;
    padding:0!important;
  }
  html body.shop-page.tt-menu-search-results-v821 .menu-grid .premium-food-card .food-footer strong {
    font-size:15px!important;
    line-height:1.25!important;
    min-width:0!important;
    margin:0!important;
  }
  html body.shop-page.tt-menu-search-results-v821 .menu-grid .premium-food-card .add-btn {
    flex:0 0 auto!important;
    min-width:58px!important;
    min-height:42px!important;
    max-width:100%!important;
    margin:0!important;
    padding:8px 12px!important;
    border-radius:12px!important;
    font-size:14px!important;
    line-height:1.2!important;
    touch-action:manipulation;
  }
  html body.shop-page.tt-menu-search-results-v821 .tt-search-summary-v820 {
    margin:4px 0 10px!important;
    padding:7px 10px!important;
    font-size:13px!important;
  }
  /* Ensure the bottom cart cannot cover the last menu item while browsing. */
  html body.shop-page.tt-menu-search-results-v821 .menu-column {
    padding-bottom:max(160px,env(safe-area-inset-bottom,0px))!important;
  }
}
@media (max-width: 350px) {
  html body.shop-page.tt-menu-search-results-v821 .menu-grid .premium-food-card:not([hidden]) {
    grid-template-columns:72px minmax(0,1fr)!important;
    gap:9px!important;
    padding:9px!important;
  }
  html body.shop-page.tt-menu-search-results-v821 .menu-grid .premium-food-card .food-media {
    width:72px!important;max-width:72px!important;height:72px!important;max-height:72px!important;flex-basis:72px!important;
  }
  html body.shop-page.tt-menu-search-results-v821 .menu-grid .premium-food-card .food-footer strong{font-size:14px!important;}
}
