/* Extends the shared mobile shell; the AI Search form is never cloned. */
.home-sticky-search { padding-block: 5px 8px; background: #fff; }
.home-sticky-search .global-search { margin: 0; width: 100%; max-width: none; height: 44px; }
.home-preferences-toggle { display: none; }
body[data-page="home"] { overflow-anchor: none; }
[data-home-feed-sentinel] { display: block; width: 100%; min-height: 64px; padding: 16px; border: 0; background: transparent; color: #667085; }
[data-products-all] { display: block; }
.home-feed-page { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; overflow-anchor: none; }
.home-feed-page .product-card { min-width: 0; }
.home-feed-page .product-card-meta, .home-feed-page .delivery-line { display: none; }
.home-feed-page .product-card-actions { display: none; }
body[data-page="home"] [data-shell-header] .arvonelia-wordmark { color: #14223a; }
.home-feed-page img { aspect-ratio: 1; object-fit: contain; }
@media (max-width: 900px) {
  body[data-page="home"] [data-shell-header] { padding-top: env(safe-area-inset-top, 0px); background: #fff; }
  body[data-page="home"] .utility-bar { padding-top: 0; }
  body[data-page="home"] .home-shell-compact .utility-bar { display: none; }
  body[data-page="home"] .home-shell-compact .mobile-topbar { min-height: 40px; height: 40px; }
  .home-preferences-toggle { display: grid; place-items: center; width: 36px; min-height: 40px; padding: 0; border: 0; background: transparent; font-size: 22px; }
  .home-sticky-search { padding: 3px 12px 7px; }
  .home-sticky-search .global-search { height: 40px; border-radius: 12px; }
  .home-sticky-search .global-search input { font-size: 16px; min-width: 0; }
  .home-sticky-search .ai-search-label { font-size: 12px; }
  .home-feed-page { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 340px; gap: 10px; margin-bottom: 10px; }
  .home-feed-page .product-card { height: 340px; overflow: hidden; }
  .home-feed-page .product-media { height: auto; aspect-ratio: 1; min-height: 0; }
  .home-feed-page .product-card-body { padding: 10px; }
  .home-feed-page .product-card h3 { font-size: 14px; line-height: 20px; min-height: 40px; margin: 0 0 6px; }
  .home-feed-page .price-row { margin-block: 4px; }
  .home-feed-page .price-row strong { font-size: 18px; }
  .home-feed-page .inventory-status-line, .home-feed-page .stock-line, .home-feed-page .local-delivery-badge { font-size: 11px; line-height: 16px; margin-block: 4px; }
  .home-feed-page .product-card h3 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  body[data-page="home"] [data-hero-search]:empty { display: none; }
}

/* CLS guard: the shared shell is built asynchronously on first visit.
   Keep its measured space until the customer scrolls into compact mode. */
body[data-page="home"] [data-shell-header]:not(.home-shell-compact) { min-height: 248px; }
@media (max-width: 900px) {
  body[data-page="home"] [data-shell-header]:not(.home-shell-compact) { min-height: 180px; }
  /* Prevent the still-empty feed from pulling the footer into the first viewport.
     The existing infinite feed replaces this space naturally as cards arrive. */
  body[data-page="home"] [data-products-all]:empty { min-height: 680px; }
}
