/* OrderStraight — category browsing. Every rule gated on body.os-cat-browse.
   Existing tokens, colours, card sizes and artwork only. */

/* ---------- Sticky stack: header (existing) > cuisine row > filter pills ---------- */
body.os-cat-browse .os-cuisine-row {
  position: -webkit-sticky; position: sticky;
  top: var(--os-cb-header, var(--os-feed-header-height, 0px));
  z-index: 40;
}
body.os-cat-browse .os-filter-pills {
  position: -webkit-sticky; position: sticky;
  top: calc(var(--os-cb-header, 0px) + var(--os-cb-cuisine, 0px));
  z-index: 39;
  margin-top: 0;
}
body.os-cat-browse.os-rail-view .os-cuisine-row,
body.os-cat-browse.os-rail-view .os-filter-pills { position: static; }

body.os-cat-browse #osAllSection,
body.os-cat-browse #osResultsBar,
body.os-cat-browse #osEmpty {
  scroll-margin-top: calc(var(--os-cb-stack, 0px) + 8px);
}

/* ---------- Results mode: one feed, recommendations step aside ---------- */
body.os-cat-browse.os-cb-results [data-rail-section]:not(#osAllSection),
body.os-cat-browse.os-cb-results #osMapCard,
body.os-cat-browse.os-cb-results #osMain > [data-os-sd] > .os-sd-section,
body.os-cat-browse.os-cb-results #osAllSection > .os-section-head,
body.os-cat-browse.os-cb-results #osMain > .orr-invite { display: none !important; }
/* Hide only the store recommendation rail, not its sibling store dialog.
   The existing Stores pill must continue to work in restaurant-results mode. */
body.os-cat-browse.os-cb-zero #osEmpty { display: block; }

/* ---------- Visually hidden polite count ---------- */
body.os-cat-browse .os-cb-live {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Genuine image-pending treatment ---------- */
body.os-cat-browse #osGrid .hero.os-cb-img-pending {
  background-color: var(--os-line, #ece7de);
  background-image: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .55) 50%, transparent 80%);
  background-size: 220% 100%;
  background-repeat: no-repeat;
}
@media (prefers-reduced-motion: no-preference) {
  body.os-cat-browse #osGrid .hero.os-cb-img-pending { animation: osCbShimmer 1.3s linear infinite; }
  @keyframes osCbShimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
}
@media (prefers-reduced-motion: reduce) {
  body.os-cat-browse #osGrid .hero.os-cb-img-pending { animation: none; background-image: none; }
}
