/* Home page, feed look (includes/home_feed.php). Podbants blue + yellow.
   Desktop: menu | feed | groups & stores. Tablet: feed | right column. Phone: one column. */
.fb-home {
  --fb-bg: #f0f4fb; --fb-card: #fff; --fb-hover: #e8eef9; --fb-r: 14px;
  --fb-shadow: 0 1px 2px rgba(11,47,122,.08), 0 2px 10px rgba(11,47,122,.05);
  background: var(--fb-bg); padding: 16px 0 40px; min-height: 70vh;
}
.fb-grid {
  width: min(1320px, 100% - 24px); margin-inline: auto;
  display: grid; grid-template-columns: 280px minmax(0, 640px) 300px; justify-content: space-between; gap: 24px; align-items: start;
}
.fb-left, .fb-right { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; scrollbar-width: thin; padding-bottom: 12px; }
.fb-feed { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }

/* ---- shared bits ---- */
.fb-card { background: var(--fb-card); border-radius: var(--fb-r); box-shadow: var(--fb-shadow); }
.fb-av {
  --gc: var(--blue); flex: none; width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; position: relative;
  background: linear-gradient(135deg, var(--gc), var(--blue-deep)); color: #fff; font: 700 1.05rem/1 var(--font-head); text-decoration: none; overflow: visible;
}
.fb-av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.fb-av-lg { width: 44px; height: 44px; }
.fb-av-group { border-radius: 12px; }
.fb-av-group img { border-radius: 12px; }
.fb-online { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: #22b45e; border: 2px solid #fff; }
.fb-side-h { display: flex; justify-content: space-between; align-items: baseline; font: 700 1.02rem/1.2 var(--font-head); color: var(--muted); margin: 6px 8px 6px; }
.fb-side-h a { font: 700 .9rem var(--font-body); color: var(--blue); text-decoration: none; }
.fb-muted { color: var(--muted); margin: 4px 8px 8px; font-size: .95rem; }

/* ---- left menu ---- */
.fb-menu, .fb-depts { display: grid; gap: 2px; }
.fb-depts { border-top: 1px solid #d9e2f5; margin-top: 10px; padding-top: 8px; }
.fb-item {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; color: var(--ink); text-decoration: none;
  font-weight: 700; font-size: .98rem; min-height: 44px; cursor: pointer; list-style: none;
}
.fb-item::-webkit-details-marker { display: none; }
.fb-item:hover, .fb-item:focus-visible { background: var(--fb-hover); }
.fb-item.is-on { background: #fff; box-shadow: var(--fb-shadow); color: var(--blue-deep); }
.fb-item.is-on::before { content: ""; width: 4px; height: 26px; border-radius: 4px; background: var(--yellow); margin: 0 -8px 0 -6px; }
.fb-ico { width: 36px; height: 36px; flex: none; display: grid; place-items: center; font-size: 1.25rem; border-radius: 50%; background: #e3ebfa; }
.fb-ico-more { font-weight: 800; color: var(--blue-deep); }
.fb-badge { margin-left: auto; background: var(--yellow); color: var(--blue-deep); border-radius: 999px; padding: 2px 9px; font-size: .8rem; }
.fb-me .fb-av { width: 36px; height: 36px; font-size: .95rem; }
.fb-more[open] > summary { display: none; }

/* ---- composer (search) ---- */
.fb-composer { padding: 14px 16px 6px; }
.fb-composer-row { display: flex; gap: 10px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid #e6ecf7; }
.fb-search { flex: 1; min-width: 0; }
.fb-search input {
  width: 100%; height: 44px; border: 0; border-radius: 999px; background: var(--fb-bg); padding: 0 18px;
  font: 600 1.02rem var(--font-body); color: var(--ink);
}
.fb-search input:hover { background: var(--fb-hover); }
.fb-search input:focus { outline: 2px solid var(--blue); background: #fff; }
.fb-composer-acts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding-top: 6px; }
.fb-composer-acts a {
  display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; border-radius: 10px;
  color: var(--muted); font-weight: 800; font-size: .92rem; text-decoration: none; white-space: nowrap;
}
.fb-composer-acts a:hover { background: var(--fb-hover); color: var(--blue-deep); }
.fb-composer-acts span { font-size: 1.2rem; }

/* ---- stories (ending soon) ---- */
.fb-story-row { list-style: none; margin: 0; padding: 0 0 4px; display: grid; grid-auto-flow: column; grid-auto-columns: 128px; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.fb-story-row::-webkit-scrollbar { display: none; }
.fb-story { scroll-snap-align: start; }
.fb-story a {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; height: 216px; border-radius: var(--fb-r); overflow: hidden;
  padding: 10px; color: #fff; text-decoration: none; background: linear-gradient(160deg, var(--blue), var(--blue-deep)); box-shadow: var(--fb-shadow);
}
.fb-story img, .fb-story-emoji { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.fb-story-emoji { display: grid; place-items: center; font-size: 3rem; }
.fb-story a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,47,122,.25) 0, transparent 35%, rgba(11,47,122,.85) 100%); }
.fb-story a:hover img { transform: scale(1.04); }
.fb-story a > *:not(img):not(.fb-story-emoji) { position: relative; z-index: 1; }
.fb-story-av { position: absolute !important; top: 10px; left: 10px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--blue); border: 3px solid var(--yellow); font: 700 .95rem var(--font-head); }
.fb-story-time { position: absolute !important; top: 12px; right: 8px; background: rgba(0,0,0,.45); border-radius: 999px; padding: 2px 7px; font-size: .7rem; font-weight: 800; }
.fb-story strong { font-size: .86rem; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fb-story-price { color: var(--yellow); font-size: 1.05rem; margin-top: 2px; }
.fb-story-new a { background: #fff; color: var(--ink); justify-content: flex-end; align-items: center; text-align: center; padding-bottom: 16px; }
.fb-story-new a::after { display: none; }
.fb-story-top { position: absolute !important; top: 0; left: 0; right: 0; height: 62%; display: grid; place-items: center; font: 700 2.4rem var(--font-head);
  color: #fff; background: linear-gradient(160deg, var(--blue), var(--blue-deep)); }
.fb-story-plus { position: absolute !important; top: calc(62% - 20px); left: 50%; transform: translateX(-50%); width: 40px; height: 40px; border-radius: 50%;
  background: var(--yellow); color: var(--blue-deep); border: 4px solid #fff; display: grid; place-items: center; font: 800 1.5rem/1 var(--font-body); }

/* ---- posts (live bids) ---- */
.fb-post { padding: 14px 0 6px; overflow: hidden; }
.fb-post-head { display: flex; gap: 10px; align-items: center; padding: 0 16px; }
.fb-post-who { font-weight: 800; color: var(--ink); text-decoration: none; }
.fb-post-who:hover { text-decoration: underline; }
.fb-post-meta { margin: 1px 0 0; color: var(--muted); font-size: .85rem; display: flex; align-items: center; gap: 4px; }
.fb-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #e0393e; box-shadow: 0 0 0 3px rgba(224,57,62,.18); }
.fb-post-title { font: 700 1.25rem/1.25 var(--font-head); margin: 12px 16px 4px; }
.fb-post-title a { color: var(--ink); text-decoration: none; }
.fb-post-title a:hover { color: var(--blue); }
.fb-post-text { margin: 0 16px 12px; color: #33415f; }
.fb-post-media { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #eaf1ff, #dfe9fb); font-size: 4rem; }
.fb-post-media.is-empty { aspect-ratio: 3 / 1; font-size: 3rem; }
.fb-post-media img { width: 100%; height: 100%; object-fit: cover; }
.fb-post-media em { position: absolute; top: 12px; left: 12px; background: var(--yellow); color: var(--blue-deep); font: 800 .95rem var(--font-body); font-style: normal; border-radius: 999px; padding: 4px 12px; }
.fb-post-price { display: flex; align-items: baseline; gap: 10px; padding: 12px 16px 6px; }
.fb-post-price b { font: 700 1.7rem/1 var(--font-head); color: var(--blue-deep); }
.fb-post-price s { color: var(--muted); }
.fb-post-price span { margin-left: auto; font-weight: 800; color: #0f7b6c; background: #e4f5f1; border-radius: 999px; padding: 3px 10px; font-size: .85rem; }
.fb-bar { display: block; height: 8px; margin: 0 16px; border-radius: 999px; background: #e3ebfa; overflow: hidden; }
.fb-bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), #3d7bea); }
.fb-post-stats { display: flex; justify-content: space-between; margin: 8px 16px 10px; color: var(--muted); font-size: .88rem; }
.fb-post-acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px 10px 0; border-top: 1px solid #e6ecf7; margin: 0 6px; }
.fb-act, .fb-post-acts .share-chat-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; border: 0; border-radius: 10px; background: none;
  color: var(--muted); font: 800 .93rem var(--font-body); text-decoration: none; cursor: pointer; padding: 0 6px; white-space: nowrap; box-shadow: none;
}
.fb-act:hover, .fb-post-acts .share-chat-btn:hover { background: var(--fb-hover); color: var(--blue-deep); }
.fb-act-main { color: var(--blue); }
.fb-post-acts .share-chat-btn.is-shared { background: none; color: #13653a; }

/* ---- how it works / categories / see all ---- */
.fb-how { padding: 16px; background: linear-gradient(135deg, var(--blue), var(--blue-deep)); color: #fff; }
.fb-how h2 { font-size: 1.25rem; margin-bottom: 10px; }
.fb-how ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fb-how li { display: flex; gap: 10px; align-items: center; }
.fb-how li b { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--yellow); color: var(--blue-deep); display: grid; place-items: center; }
.fb-how li strong { color: var(--yellow); }
.fb-empty { margin: 12px 0 0; }
.fb-empty a, .fb-how a { color: var(--yellow); font-weight: 800; }
.fb-seeall { display: block; text-align: center; padding: 14px; font-weight: 800; color: var(--blue); text-decoration: none; }
.fb-seeall:hover { background: var(--fb-hover); }
.fb-cats { padding: 16px; scroll-margin-top: 16px; }
.fb-cats h2 { font-size: 1.25rem; margin-bottom: 10px; }
.fb-cats ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; }
.fb-cats a { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 700; line-height: 1.2; }
.fb-cats a:hover { background: var(--fb-hover); }
.fb-cats small { display: block; color: var(--muted); font-weight: 600; font-size: .78rem; margin-top: 2px; }
.fb-cat-pic { flex: none; width: 48px; height: 48px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; font-size: 1.5rem; background: #e3ebfa; }
.fb-cat-pic img { width: 100%; height: 100%; object-fit: cover; }

/* ---- right column ---- */
.fb-right { display: grid; gap: 14px; }
.fb-side { display: grid; gap: 2px; padding-bottom: 8px; border-bottom: 1px solid #d9e2f5; }
.fb-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; color: var(--ink); text-decoration: none; min-height: 52px; }
a.fb-row:hover, .fb-row:has(a:hover) { background: var(--fb-hover); }
.fb-row strong { display: block; font-weight: 800; line-height: 1.2; }
.fb-row small { display: block; color: var(--muted); font-size: .82rem; }
.fb-row-text { color: inherit; text-decoration: none; min-width: 0; }
.fb-row-add .fb-av { background: #e3ebfa; color: var(--blue-deep); font-size: 1.4rem; }
.fb-gotw { padding: 10px 8px; border-top: 4px solid var(--gc, var(--yellow)); }
.fb-join, .fb-sellcta { padding: 16px; }
.fb-join { background: linear-gradient(135deg, var(--blue), var(--blue-deep)); color: #fff; }
.fb-join h2, .fb-sellcta h2 { font-size: 1.2rem; margin-bottom: 6px; }
.fb-join p, .fb-sellcta p { margin: 0 0 12px; font-size: .95rem; }
.fb-join .btn { display: block; text-align: center; }
.fb-join-in { display: block; text-align: center; margin-top: 10px; color: #fff; font-weight: 800; }
.fb-sellcta { border-left: 5px solid var(--yellow); }
.fb-btn-blue { background: var(--blue); color: #fff; padding: .7rem 1.2rem; display: inline-block; text-decoration: none; }
.fb-btn-blue:hover { background: var(--blue-deep); color: #fff; }

/* ---- smaller screens ---- */
@media (max-width: 1180px) {
  .fb-grid { grid-template-columns: minmax(0, 640px) 300px; justify-content: center; }
  .fb-left { display: none; }
}
@media (max-width: 920px) {
  .fb-grid { grid-template-columns: minmax(0, 640px); }
  .fb-right { position: static; max-height: none; overflow: visible; order: -1; }
  .fb-right > :not(.fb-join) { display: none; }
}
@media (max-width: 560px) {
  .fb-home { padding-top: 8px; }
  .fb-grid { width: 100%; gap: 10px; }
  .fb-feed { gap: 10px; }
  .fb-card { border-radius: 0; }
  .fb-story-row { padding-left: 10px; grid-auto-columns: 112px; }
  .fb-story a { height: 190px; }
  .fb-composer-acts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fb-right .fb-join { border-radius: 0; }
  .fb-post-title { font-size: 1.15rem; }
}
@media (prefers-reduced-motion: reduce) { .fb-story img { transition: none; } }

/* ---- "Your group chats" row: phones only (computers show it in the right column) ---- */
.fb-mygroups { display: none; padding: 12px 0 10px; }
.fb-mini-h { display: flex; justify-content: space-between; align-items: baseline; font-size: 1rem; margin: 0 14px 8px; }
.fb-mini-h a { font: 700 .88rem var(--font-body); color: var(--blue); text-decoration: none; }
.fb-mygroups ul { list-style: none; margin: 0; padding: 0 10px; display: grid; grid-auto-flow: column; grid-auto-columns: 74px; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.fb-mygroups ul::-webkit-scrollbar { display: none; }
.fb-mygroups a { display: grid; justify-items: center; gap: 5px; padding: 4px 2px; border-radius: 12px; color: var(--ink); text-decoration: none; }
.fb-mygroups .fb-av { width: 56px; height: 56px; font-size: 1.3rem; border-radius: 18px; }
.fb-mygroups .fb-av img { border-radius: 18px; }
.fb-av-add { background: #e3ebfa !important; color: var(--blue-deep) !important; font-size: 1.6rem !important; }
.fb-mygroups-name { font-size: .76rem; font-weight: 700; text-align: center; line-height: 1.15; max-width: 72px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 920px) { .fb-mygroups { display: block; } }

/* =====================================================================
   The feed home inside the iPhone app: same feed, the app's own look
   (blue top with the yellow line continues behind the search box, Barlow font, rounded cards).
   ===================================================================== */
.in-app .fb-home { padding: 0 0 16px; background: linear-gradient(var(--blue) 0, var(--blue) 86px, var(--blue-tint) 86px); }
.in-app .fb-grid { width: calc(100% - 24px); gap: 12px; }
.in-app .fb-feed { gap: 12px; }
.in-app .fb-card { border-radius: 16px; border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(11,47,122,.06); }
.in-app .fb-composer { padding: 12px 12px 4px; margin-top: 10px; }
.in-app .fb-search input { height: 46px; font: 500 16px var(--font-body); background: var(--blue-tint); }
.in-app .fb-composer-acts a { font: 600 14px var(--font-body); min-height: 40px; }
.in-app .fb-story-row { padding-left: 0; grid-auto-columns: 108px; }
.in-app .fb-story a { height: 180px; border-radius: 16px; }
.in-app .fb-story strong { font: 600 13px/1.2 var(--font-body); }
.in-app .fb-story-price { font: 700 16px var(--font-head); }
.in-app .fb-post-title { font: 700 21px/1.15 var(--font-head); }
.in-app .fb-post-text { font-size: 15px; }
.in-app .fb-post-price b { font: 700 28px/1 var(--font-head); color: var(--blue-deep); }
.in-app .fb-post-acts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.in-app .fb-act, .in-app .fb-post-acts .share-chat-btn { font: 600 13.5px var(--font-body); padding: 0 2px; }
.in-app .fb-act-main { color: var(--blue); }
.in-app .fb-how { border-radius: 16px; background: var(--blue-deep); }
.in-app .fb-how h2, .in-app .fb-cats h2 { font-size: 21px; }
.in-app .fb-cats { padding: 14px 12px; }
.in-app .fb-cats ul { grid-template-columns: 1fr 1fr; }
.in-app .fb-seeall { border-radius: 16px; font: 700 15px var(--font-body); }
.in-app .fb-right { display: none; }
.in-app .fb-mygroups { display: block; }

/* Story cards: time left sits above the title (it no longer covers the store letter) */
.fb-story-time { position: static !important; align-self: flex-start; margin-bottom: 6px; }
/* Post buttons on phones: allow two short lines instead of squeezing */
@media (max-width: 560px) {
  .fb-act, .fb-post-acts .share-chat-btn { white-space: normal; text-align: center; line-height: 1.15; font-size: .84rem; min-height: 48px; padding: 4px 2px; }
}
.in-app .fb-act, .in-app .fb-post-acts .share-chat-btn { white-space: normal; text-align: center; line-height: 1.15; min-height: 48px; padding: 4px 2px; }

/* ---- Welcome card for visitors who are not signed in ---- */
.fb-welcome { padding: 18px 18px 16px; color: #fff; border: 0 !important; background: linear-gradient(135deg, #2f6bff, var(--blue) 45%, var(--blue-deep)); }
.fb-welcome h2 { color: #fff; font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.08; margin: 8px 0 6px; }
.fb-welcome p { margin: 0 0 14px; color: #dfe8ff; line-height: 1.45; max-width: 46ch; }
.fb-welcome-kicker { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.16); border-radius: 999px; padding: 4px 11px; font-size: .84rem; font-weight: 700; }
.fb-welcome-kicker i { width: 8px; height: 8px; border-radius: 50%; background: #ff7a59; box-shadow: 0 0 0 3px rgba(255,122,89,.3); }
.fb-welcome-btns { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.fb-welcome-in { color: #fff; font-weight: 800; }
.in-app .fb-welcome { margin-top: 10px; border-radius: 16px; }
.in-app .fb-welcome h2 { font-family: var(--font-head); font-size: 28px; }
.fb-welcome-lang { font-weight: 700; opacity: .9; text-decoration: none; }
