/* BOC F demo — trang chủ dạng bảng tin (kiểu Facebook) */
.fd { width: var(--wrap); margin: 24px auto 40px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.5fr) minmax(0, 1fr); gap: 28px; align-items: start; } /* tỉ lệ 3 cột 1 : 2.5 : 1 */
.fd-box { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: 0 1px 2px rgba(16, 24, 32, .04); }
.av { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font: 600 14px/1 var(--f-head); }

/* Cột trái — danh mục (biểu tượng tròn + mô tả ngắn), khu vực, thông tin HKD */
/* 2 cột bên không cuộn riêng: trôi theo thanh cuộn chính, hiện hết thì dừng lại (top do app.js tính, xem stickFit) */
.fd-l, .fd-r { position: sticky; top: calc(var(--hd) + 20px); }
.fd-l-h { margin: 0 8px 8px; font: 600 15px/1.3 var(--f-head); color: var(--ink-2); }
.fd-cats { display: flex; flex-direction: column; gap: 2px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.fd-cats a { display: flex; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 10px; color: var(--ink); }
.fd-cats a:hover { background: var(--soft); }
.fd-cats a.on { background: var(--brand-50); }
.fd-cats a.on b { color: var(--brand-d); font-weight: 600; }
.fd-cats i { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; }
.fd-cats a:nth-child(3n + 1) i { background: var(--navy); }
.fd-cats a:nth-child(3n + 2) i { background: #1F7FC9; }
.fd-cats a:nth-child(3n) i { background: var(--cyan); }
.fd-cats i .ic { width: 17px; height: 17px; }
.fd-cats span { min-width: 0; }
.fd-cats b { display: block; font-size: 14.5px; font-weight: 500; line-height: 1.3; }
.fd-cats small { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.fd-kv { height: 40px !important; font-size: 14px !important; margin: 0 0 16px; }
.fd-l-foot { margin: 0 8px; font-size: 12.5px; line-height: 1.7; color: var(--muted); }
.fd-l-foot a:hover { color: var(--brand); }

/* Ô soạn tin */
.compose { padding: 14px 16px 8px; margin-bottom: 14px; }
.compose-top { display: flex; gap: 10px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.compose-in { flex: 1; height: 44px; display: flex; align-items: center; padding: 0 18px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 15px; }
.compose-in:hover { background: #ECEFF3; }
.compose-acts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding-top: 6px; }
.compose-acts a { display: flex; align-items: center; justify-content: center; gap: 8px; height: 42px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.compose-acts a:hover { background: var(--soft); }
.compose-acts i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; }
.compose-acts i .ic { width: 16px; height: 16px; }
.c1 { background: var(--orange-50); color: var(--orange-d); }
.c2 { background: #E6F4FB; color: var(--cyan); }
.c3 { background: var(--brand-50); color: var(--brand); }
.c4 { background: #E8F6EE; color: #1E8A4C; }

/* Lối tắt nổi bật (kiểu stories) */
.stories { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 14px; }
.story { position: relative; aspect-ratio: 3 / 4.6; border-radius: 14px; overflow: hidden; background-size: cover; background-position: center; color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: 10px; }
.story::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(9, 22, 50, .05) 30%, rgba(9, 22, 50, .82)); transition: background .3s; }
.story:hover::before { background: linear-gradient(180deg, rgba(9, 22, 50, .15) 20%, rgba(9, 22, 50, .9)); }
.story i { position: relative; width: 38px; height: 38px; border-radius: 50%; background: #fff; color: var(--brand); display: grid; place-items: center; box-shadow: 0 0 0 3px var(--brand); }
.story i .ic { width: 18px; height: 18px; }
.story b { position: relative; font-size: 13.5px; line-height: 1.3; font-weight: 600; }

/* Ghi chú khi đang lọc theo tỉnh / gần bạn */
.fd-note { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 4px 10px; font-size: 13.5px; color: var(--ink-2); }
.fd-note .ic { color: var(--cyan); }

/* Tab */
.fd-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; margin-bottom: 14px; }
.fd-tabs button { display: inline-flex; align-items: center; gap: 5px; height: 38px; padding: 0 10px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.fd-tabs button:hover { background: var(--soft); }
.fd-tabs button[aria-selected="true"] { background: var(--brand-50); color: var(--brand-d); }

/* Bài đăng */
.feed { display: grid; gap: 14px; }
.post { overflow: visible; }
.post-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px 0; }
.post-who { flex: 1; min-width: 0; }
.post-who b { display: flex; align-items: center; gap: 4px; font-size: 15px; }
.vf { color: var(--brand); display: inline-grid; }
.post-who small { display: block; font-size: 12.5px; color: var(--muted); }
.post-who em { font-style: normal; color: var(--cyan); font-weight: 500; }
.post-menu { position: relative; }
.dots { width: 36px; height: 36px; border-radius: 50%; color: var(--muted); font-size: 11px; letter-spacing: 1px; }
.dots:hover { background: var(--soft); }
.menu { position: absolute; right: 0; top: 40px; z-index: 20; width: 220px; background: #fff; border-radius: 12px; box-shadow: 0 12px 36px rgba(16, 24, 32, .18); padding: 6px; }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 8px; font-size: 14px; text-align: left; }
.menu button:hover { background: var(--soft); }
.post-b { padding: 10px 16px 12px; }
.post-cat { display: inline-block; font-size: 13px; font-weight: 600; color: var(--brand); margin-right: 6px; }
.post-b .badge { margin: 0 4px 0 0; vertical-align: 1px; }
.post-b p { margin: 6px 0 0; font-size: 15px; color: var(--ink-2); line-height: 1.55; }
.post-media { position: relative; display: grid; gap: 3px; background: var(--soft); max-height: 60vh; overflow: hidden; }
.post-media img { width: 100%; height: 100%; object-fit: cover; }
.post-media.n1 { aspect-ratio: 16 / 10; }
.post-media.n2 { grid-template-columns: 1fr 1fr; aspect-ratio: 16 / 9; }
.post-media.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 16 / 10; }
.post-media.n3 img:first-child { grid-row: span 2; }
.more-n { position: absolute; right: 0; bottom: 0; width: calc(33.33% - 2px); height: calc(50% - 2px); display: grid; place-items: center; background: rgba(0, 0, 0, .45); color: #fff; font: 600 22px/1 var(--f-head); }
/* giá đặt ở góc ảnh như thiết kế khách */
.post-tag { position: absolute; left: 12px; bottom: 12px; z-index: 1; padding: 6px 12px; border-radius: 6px; background: rgba(13, 27, 62, .88); color: #fff; font: 600 15px/1.3 var(--f-body); }
.post-facts { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; background: #F4F6F9; border-bottom: 1px solid var(--line); }
.post-facts div { padding: 10px 12px; min-width: 0; }
.post-facts div + div { border-left: 1px solid var(--line); }
.post-facts dt { font-size: 12.5px; color: var(--muted); }
.post-facts dd { margin: 2px 0 0; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.post-stats { display: flex; justify-content: space-between; padding: 10px 16px; margin: 0 0; font-size: 13px; color: var(--muted); }
.post-acts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 0 12px; padding: 4px 0 6px; border-top: 1px solid var(--line); }
.post-acts a, .post-acts button { display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.post-acts a:hover, .post-acts button:hover { background: var(--soft); }
.post-acts .call { color: var(--brand); }
.post-acts button.on { color: var(--danger); }
.post-acts button.on .ic { fill: currentColor; }
.empty.fd-box { padding: 40px; }

/* Cột phải — BOC FOOD, thông báo gần đây, dịch vụ chăn nuôi */
.food { overflow: hidden; margin-bottom: 14px; border: 1.5px solid var(--navy); }
.food-h { padding: 14px 16px; background: var(--navy); color: #fff; }
.food-h b { display: block; font: 700 17px/1.3 var(--f-head); letter-spacing: .02em; }
.food-h small { display: block; margin-top: 4px; font-size: 12.5px; line-height: 1.45; opacity: .9; }
.food-list { padding: 4px 8px; }
.food-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 10px 8px; border-radius: 8px; }
.food-row + .food-row { border-top: 1px solid var(--line); }
.food-row:hover { background: var(--soft); }
.food-row span { min-width: 0; }
.food-row b { display: block; font-size: 14px; font-weight: 500; line-height: 1.35; }
.food-row small { display: block; font-size: 12.5px; color: var(--muted); }
.food-row i { flex: none; font-style: normal; font-weight: 600; font-size: 14px; color: var(--navy); text-align: right; white-space: nowrap; }
.food-row i small { display: inline; font-weight: 400; }
.food .btn { width: auto; margin: 4px 16px 16px; display: flex; height: 40px; }
.side { padding: 14px 14px 8px; margin-bottom: 14px; }
.side-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.side-h b { min-width: 0; font: 600 15px/1.3 var(--f-head); color: var(--ink-2); }
.nt, .svc { display: flex; gap: 10px; align-items: flex-start; padding: 8px 6px; border-radius: 10px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.nt:hover, .svc:hover { background: var(--soft); }
.nt i, .svc i { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--navy); }
.nt i .ic, .svc i .ic { width: 16px; height: 16px; }
.nt .n2 { background: #1F7FC9; }
.nt .n3 { background: var(--cyan); }
.nt b { color: var(--ink); font-weight: 600; }
.nt small { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 600; color: var(--brand); }
.svc { align-items: center; }
.svc span { flex: 1; min-width: 0; }
.svc b { display: block; font-size: 14px; font-weight: 600; color: var(--ink); }
.svc small { display: block; font-size: 12.5px; color: var(--muted); }
.svc em { flex: none; min-width: 26px; padding: 2px 7px; border-radius: 999px; background: var(--brand-50); color: var(--brand-d); font: 600 12px/1.4 var(--f-body); font-style: normal; text-align: center; }
.svc:nth-child(odd) i { background: #1F7FC9; }

@media (max-width: 1400px) {
  .fd { gap: 22px; }
}
@media (max-width: 1180px) {
  .fd { grid-template-columns: minmax(0, 2.5fr) minmax(0, 1fr); }
  .fd-l { display: none; }
}
@media (max-width: 860px) {
  .fd { grid-template-columns: minmax(0, 1fr); margin-top: 14px; gap: 0; }
  .fd-r { display: none; }
  .compose { padding: 12px 12px 6px; }
  .compose-in { font-size: 14px; height: 40px; padding: 0 14px; }
  .compose-acts a { gap: 6px; font-size: 13.5px; }
  .stories { gap: 6px; }
  .story { padding: 6px; border-radius: 10px; }
  .story i { width: 26px; height: 26px; box-shadow: 0 0 0 2px var(--brand); }
  .story i .ic { width: 14px; height: 14px; }
  .story b { font-size: 11px; }
  .fd-tabs button { height: 34px; padding: 0 10px; font-size: 13.5px; }
  .post-h { padding: 12px 12px 0; }
  .post-b { padding: 8px 12px 10px; }
  .post-b p { font-size: 14px; }
  .post-tag { left: 10px; bottom: 10px; font-size: 14px; padding: 5px 10px; }
  .post-facts div { padding: 8px; }
  .post-facts dt { font-size: 11.5px; }
  .post-facts dd { font-size: 13px; }
  .post-stats { padding: 8px 12px; }
  .post-acts { margin: 0 6px; }
  .post-acts a, .post-acts button { gap: 6px; height: 42px; font-size: 13px; }
  .post-acts .ic { width: 18px; height: 18px; }
}

/* Điện thoại nhỏ: vẫn giữ 4 nút trên 1 hàng như mockup, biểu tượng đặt trên chữ cho vừa */
@media (max-width: 599px) {
  .compose-acts { gap: 2px; }
  /* điện thoại: chỉ còn biểu tượng như thiết kế (chữ vẫn đọc được cho trình đọc màn hình) */
  .compose-acts a { height: 40px; }
  .compose-acts span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .post-acts a, .post-acts button { gap: 5px; font-size: 12.5px; }
  .post-acts .ic { width: 16px; height: 16px; }
}

/* Xem trước ở trang Đăng tin: cùng khung bài đăng, không bấm được */
.post.is-preview .post-menu { display: none; }
.post.is-preview a, .post.is-preview button { pointer-events: none; }
.post-media.ph img { opacity: .35; }
