/* Narrow-screen polish for iPhone and foldable cover displays */
@media (max-width: 560px) {
  /* Category carousels: never squeeze labels into unreadable pills */
  .category-chips,
  .food-cuisines,
  .fresh-cats {
    display:flex !important;
    flex-wrap:nowrap !important;
    gap:8px !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
    overscroll-behavior-inline:contain;
    padding:12px 2px 14px !important;
    scroll-snap-type:x proximity;
  }
  .category-chips::-webkit-scrollbar,
  .food-cuisines::-webkit-scrollbar,
  .fresh-cats::-webkit-scrollbar { display:none; }

  .category-chips > button,
  .food-cuisines > button,
  .fresh-cats > button {
    flex:0 0 auto !important;
    width:auto !important;
    min-width:max-content !important;
    max-width:none !important;
    white-space:nowrap !important;
    padding:10px 14px !important;
    font-size:14px !important;
    line-height:1.15 !important;
    scroll-snap-align:start;
  }

  .precious-chips > button { min-height:44px !important; }
  .food-filter-panel { display:grid !important; grid-template-columns:1fr auto !important; gap:12px !important; }
  .food-filter-panel .food-cuisines { grid-column:1 / -1; width:100%; min-width:0; }
  .food-toggle { min-width:0; }
  .food-filter-panel > .secondary { width:auto !important; margin:0 !important; }

  /* Services */
  .service-hero { padding:22px 18px !important; }
  .service-advanced { padding:16px !important; }
  .service-toolbar { display:grid !important; grid-template-columns:1fr 1fr !important; gap:10px !important; }
  .service-toolbar > a { width:100% !important; margin:0 !important; text-align:center; justify-content:center; }
  .service-toolbar > a:last-child { grid-column:1 / -1; }
  .service-toolbar > label,
  .service-toolbar > span { min-width:0; }

  /* Precious Market */
  .precious-search { grid-template-columns:1fr !important; }
  .precious-search > svg { display:none !important; }
  .precious-compliance { padding:18px !important; }
  .precious-compliance p { overflow-wrap:anywhere; }

  /* Mawota: use two compact rows rather than forcing everything into one */
  .mawota-ai-shell-head {
    flex-wrap:wrap !important;
    gap:8px !important;
    padding:8px 10px !important;
  }
  .mawota-head-left {
    flex:1 1 auto !important;
    min-width:0 !important;
    gap:7px !important;
  }
  .mawota-head-left strong { font-size:15px !important; }
  .mawota-head-left small { display:none !important; }
  .mawota-brand-dot { width:32px !important; height:32px !important; flex:0 0 32px !important; }

  .mawota-head-actions {
    order:3;
    width:100% !important;
    min-width:0 !important;
    display:flex !important;
    gap:7px !important;
    overflow-x:auto !important;
    scrollbar-width:none;
    padding-bottom:2px;
  }
  .mawota-head-actions::-webkit-scrollbar { display:none; }
  .mawota-mode-select {
    flex:1 1 120px !important;
    min-width:105px !important;
    max-width:none !important;
    height:40px !important;
  }
  .mawota-head-actions .icon-btn,
  .mawota-mobile-history-btn,
  .mawota-new-top {
    flex:0 0 40px !important;
    width:40px !important;
    height:40px !important;
    padding:0 !important;
    display:grid !important;
    place-items:center !important;
  }
  .mawota-new-top span { display:none !important; }
  .mawota-chat-head { position:static !important; }
  .mawota-empty { padding:34px 18px 24px !important; }
  .mawota-empty h2 { font-size:clamp(1.8rem,9vw,2.6rem) !important; }
  .mawota-empty p { font-size:1rem !important; }

  /* Avoid horizontal page overflow on very narrow cover screens */
  .page,
  .eve-food-page { min-width:0 !important; overflow-x:hidden; }
}

@media (max-width: 380px) {
  .category-chips > button,
  .food-cuisines > button,
  .fresh-cats > button {
    padding:9px 12px !important;
    font-size:13px !important;
  }
  .service-toolbar { grid-template-columns:1fr !important; }
  .service-toolbar > a:last-child { grid-column:auto; }
  .mawota-head-left strong { font-size:14px !important; }
}
