/* Buyer-first mobile layout; no role restrictions. */
#searchResultCategories { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }
#searchResultCategories[hidden] { display:none; }
#searchResultCategories button { white-space:normal; min-height:44px; }
@media(max-width:680px) {
  body:has(.role-button[data-role="buyer"].is-active) #productGrid {
    display:grid; grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:12px;
  }
  #productGrid > .empty-state { grid-column:1/-1; }
  #productGrid .wb-product-card { display:flex !important; flex-direction:column; min-width:0; }
  #productGrid .product-image-button { flex:none; padding:0; }
  #productGrid .product-card-body { padding:10px; display:flex; flex:1; flex-direction:column; gap:8px; }
  #productGrid .price-row { display:flex; flex-wrap:wrap; gap:4px; }
  #productGrid .price { white-space:normal; font-size:clamp(16px,4.5vw,21px); line-height:1.2; }
  #productGrid h3 { margin:0; font-size:15px; line-height:1.35; }
  #productGrid .product-card-desc { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; margin:0; }
  #productGrid .product-actions { margin-top:auto; display:flex; flex-wrap:wrap; gap:6px; }
  #productGrid .product-actions button { min-height:44px; flex:1; }
  #productGrid .product-shop-line { display:flex; flex-wrap:wrap; gap:6px; }
  .market-bottom-nav { padding-bottom:max(8px,env(safe-area-inset-bottom)); }
  .market-bottom-nav button { min-height:48px; }
  #searchInput, #headerMarketplaceSearchInput, #citySelect { font-size:16px; }
  #productDialog .product-purchase-card button { min-height:48px; }
}
@media(max-width:350px) {
  body:has(.role-button[data-role="buyer"].is-active) #productGrid { grid-template-columns:minmax(0,1fr) !important; }
}
@media(min-width:1100px) {
  #shop .side-rail, #supplier .side-rail { position:sticky; top:110px; align-self:start; max-height:calc(100dvh - 130px); overflow-y:auto; }
}
