/* BOC F demo — bố cục riêng từng trang */

/* Cột lưới không bị nội dung con kéo rộng */
.dt-grid > *, .pt-grid > *, .me > *, .ch > * { min-width: 0; }
.conv > span:nth-child(2) { min-width: 0; }

/* ===== Danh sách + bộ lọc ===== */
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); margin: 22px 0 10px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--brand); }
.crumbs span { color: var(--ink); }

/* Thanh lọc ngang — dính dưới header, mỗi tiêu chí là một nút xổ xuống */
.fbar { position: sticky; top: var(--hd); z-index: 40; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px 16px; padding: 14px 0; margin: 10px 0 20px; background: #fff; border-bottom: 1px solid var(--line); transition: top .3s ease; }
.fbar:has(.fb-pop:not([hidden])) { z-index: 150; }
.fbar-l { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; flex: 1; }
.fb-live { display: contents; }
.fb { position: relative; flex: none; }
.fb-btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px 0 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 14px; font-weight: 400; color: var(--ink); white-space: nowrap; max-width: 240px; transition: border-color .2s, background .2s; }
.fb-btn span { overflow: hidden; text-overflow: ellipsis; }
.fb-btn .ic { color: var(--muted); }
.fb-btn:hover, .fb-btn[aria-expanded="true"] { border-color: var(--ink-2); }
.fb-btn.on { border-color: var(--brand); background: var(--brand-50); color: var(--brand-d); font-weight: 500; }
.fb-btn.on .ic { color: var(--brand); }
.fb-pop { position: fixed; z-index: 45; width: 320px; padding: 16px; background: #fff; border-radius: var(--r-lg); box-shadow: 0 18px 50px rgba(16, 24, 32, .16); }
.fb-h { margin: 0 0 10px; font-size: 14px; font-weight: 600; }
.fb-pop select + select { margin-top: 8px; }
.fb-pop input:not([type=checkbox]):not([type=radio]), .fb-pop select { height: 40px; font-size: 14px; }
.fb-act { display: grid; grid-template-columns: 1fr 1.5fr; gap: 8px; margin-top: 14px; }
.gia-unit { margin-top: 14px; }
.fb-reset { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 38px; padding: 0 10px; font-size: 14px; font-weight: 500; color: var(--danger); }
.fbar-r { display: flex; align-items: center; gap: 10px; flex: none; }
.fb-save span, .sort > span { display: none; }
.fb-save { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; width: 38px; border-radius: 50%; border: 1px solid var(--line); font-size: 14px; font-weight: 500; color: var(--brand); white-space: nowrap; }
.sort { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.sort select { height: 38px; width: auto; border-radius: 999px; }
.views { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.views button { width: 36px; height: 32px; display: grid; place-items: center; border-radius: 999px; color: var(--muted); }
.views button[aria-pressed="true"] { background: var(--brand-50); color: var(--brand); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pills label { cursor: pointer; display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; }
.pills input { position: absolute; opacity: 0; pointer-events: none; }
.pills label:has(input:checked) { border-color: var(--brand); background: var(--brand-50); color: var(--brand-d); font-weight: 500; }
.pills label:has(input:focus-visible) { outline: 2px solid var(--brand); }
.lst-res { margin-bottom: 60px; }
.flt-sec { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--brand-d); background: var(--brand-50); padding: 8px 10px; border-radius: 8px; margin: 0 0 14px; }
.lst-map { height: 640px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .ic { width: 40px; height: 40px; margin: 0 auto 10px; }
.empty b { display: block; color: var(--ink); font-size: 17px; }
.map-pop { display: flex; gap: 10px; width: 240px; font: 400 13px/1.4 var(--f-body); }
.map-pop img { width: 70px; height: 56px; object-fit: cover; border-radius: 6px; }
.map-pop b { display: block; font-weight: 500; }
.map-pop i { font-style: normal; color: var(--price); font-weight: 600; }

/* ===== Chi tiết tin ===== */
.dt-grid { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; margin-top: 8px; }
.gal-main { position: relative; border-radius: var(--r-lg); overflow: hidden; background: #111; aspect-ratio: 16 / 10; max-height: 60vh; width: 100%; }
.gal-main img { width: 100%; height: 100%; object-fit: contain; }
.gal-n { position: absolute; right: 14px; bottom: 14px; padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 13px; }
.gal-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .9); display: grid; place-items: center; }
.gal-nav.prev { left: 14px; }
.gal-nav.next { right: 14px; }
.gal-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.gal-thumbs button { width: 96px; height: 68px; flex: none; border-radius: 8px; overflow: hidden; opacity: .55; outline-offset: 2px; }
.gal-thumbs button[aria-current="true"] { opacity: 1; outline: 2px solid var(--brand); }
.gal-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.dt-box { padding: 22px 0; border-bottom: 1px solid var(--line); }
.dt-box h2 { font-size: 19px; margin-bottom: 14px; }
.dt-box h1 { font-size: 26px; margin: 10px 0 12px; }
.dt-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.dt-price b { font: 600 26px/1.2 var(--f-body); color: var(--price); }
.dt-price span { margin-left: 10px; color: var(--muted); font-size: 14px; }
.dt-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 16px; color: var(--muted); font-size: 14px; }
.dt-meta span { display: inline-flex; align-items: center; gap: 6px; }
.dt-meta i { font-style: normal; }
.dt-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.dt-acts .btn.on { color: var(--danger); border-color: var(--danger); }
.attrs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 28px; margin: 0; }
.attrs div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px; }
.attrs dt { color: var(--muted); }
.attrs dd { margin: 0; font-weight: 500; text-align: right; }
.dt-desc { white-space: pre-line; color: var(--ink-2); font-size: 15px; }
.dt-map { height: 300px; border-radius: var(--r-lg); overflow: hidden; margin-top: 10px; z-index: 0; }
.commit { display: flex; gap: 12px; border: 0; background: var(--brand-50); border-radius: var(--r-lg); padding: 16px 18px; margin-top: 22px; font-size: 14px; }
.commit .ic { color: var(--brand); width: 24px; height: 24px; }
.commit p { margin: 0; }
.commit a { color: var(--brand); font-weight: 600; }
.dt-side { position: sticky; top: calc(var(--hd) + 16px); display: grid; gap: 16px; }
.seller { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.seller-top { display: flex; gap: 12px; align-items: center; }
.av { width: 48px; height: 48px; flex: none; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font: 600 16px/1 var(--f-head); }
.seller-top b { font-size: 16px; display: block; }
.seller-top small { color: var(--muted); font-size: 13px; }
.seller-stats { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; margin: 16px 0; padding: 12px 0; border-block: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.seller-stats b { display: block; color: var(--ink); font-size: 15px; }
.seller .btn { width: 100%; margin-top: 8px; }
.seller .btn-zalo { background: #0068FF; color: #fff; }
.sec-in { margin: 48px 0 64px; }
.sticky-call { display: none; }

/* ===== Đăng tin ===== */
.pt-head { margin: 28px 0 22px; }
.pt-head h1 { font-size: 30px; }
.pt-head p { margin: 6px 0 0; }
.pt-grid { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; margin-bottom: 60px; }
.pt-step { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; margin-bottom: 18px; }
.pt-step h2 { display: flex; align-items: center; gap: 10px; font-size: 19px; margin-bottom: 18px; }
.pt-step h2 i { font-style: normal; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 14px; }
.pt-cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pt-cats button { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r); text-align: left; font-size: 13.5px; font-weight: 500; line-height: 1.3; }
.pt-cats img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: none; }
.pt-cats button[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-50); color: var(--brand-d); }
.pt-sub { margin-top: 12px; }
.drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 20px; border: 2px dashed #CFD6DA; border-radius: var(--r-lg); text-align: center; cursor: pointer; color: var(--ink-2); transition: border-color .2s, background .2s; }
.drop .ic { width: 34px; height: 34px; color: var(--brand); }
.drop span { font-size: 13.5px; color: var(--muted); }
.drop.over, .drop:hover { border-color: var(--brand); background: var(--brand-50); }
.thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 12px; }
.thumbs figure { position: relative; margin: 0; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--soft); }
.thumbs img, .thumbs video { width: 100%; height: 100%; object-fit: cover; }
.thumbs figure button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; display: grid; place-items: center; }
.thumbs figure button .ic { width: 14px; height: 14px; }
.thumbs figcaption { position: absolute; left: 4px; bottom: 4px; padding: 2px 6px; border-radius: 4px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 500; }
.cnt { position: absolute; right: 12px; bottom: 12px; color: var(--muted); font-size: 12px; }
.cnt i { font-style: normal; }
.price-in { display: flex; }
.price-in input { border-radius: var(--r) 0 0 var(--r); }
.price-in select { width: 112px; flex: none; border-left: 0; border-radius: 0 var(--r) var(--r) 0; background: var(--soft); }
.price-in input:disabled { background: var(--soft); }
.live-flds { padding: 16px; border-radius: var(--r); background: #FAFBFB; border: 1px solid var(--line); margin-bottom: 16px; }
.live-flds .fld:last-child { margin-bottom: 0; }
.pt-map { height: 300px; border-radius: var(--r-lg); overflow: hidden; z-index: 0; }
.pt-submit { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.pt-side { position: sticky; top: calc(var(--hd) + 16px); display: grid; gap: 16px; }
.pt-side-h { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* ===== Đăng nhập ===== */
.au { display: grid; place-items: center; padding: 40px 0 70px; }
.au-card { width: min(980px, 100%); display: grid; grid-template-columns: 1fr 1fr; border-radius: 20px; overflow: hidden; box-shadow: 0 2px 6px rgba(16, 24, 32, .05), 0 20px 60px rgba(16, 24, 32, .1); }
.au-side { position: relative; background-size: cover; background-position: center; color: #fff; padding: 40px; display: flex; align-items: flex-end; min-height: 560px; }
.au-side::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(9, 22, 50, .1), rgba(9, 22, 50, .88)); }
.au-side > div { position: relative; }
.au-side .kicker { color: #9FD3F0; }
.au-side h2 { font-size: 28px; }
.au-side ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; font-size: 14.5px; }
.au-side li { display: flex; align-items: center; gap: 8px; }
.au-main { padding: 40px; }
.au-form { margin-top: 24px; }
.au-form .seg.small { margin-bottom: 16px; }
.au-links { display: flex; justify-content: space-between; margin-top: 14px; font-size: 13.5px; }
.au-links a { color: var(--brand); font-weight: 500; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 22px 0 14px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.social { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.roles { display: grid; gap: 8px; margin: 8px 0 16px; }
.roles label { cursor: pointer; }
.roles input { position: absolute; opacity: 0; }
.roles span { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); font-size: 14.5px; }
.roles small { color: var(--muted); font-size: 12.5px; }
.roles input:checked + span { border-color: var(--brand); background: var(--brand-50); }
.roles input:focus-visible + span { outline: 2px solid var(--brand); }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.au-form h3 { font-size: 22px; }
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 20px 0; }
.otp input { height: 56px !important; padding: 0 !important; text-align: center; font: 600 22px/1 var(--f-body) !important; }

/* ===== Quản lý tin ===== */
.me { display: grid; grid-template-columns: 260px 1fr; gap: 32px; margin: 28px auto 60px; align-items: start; }
.me-nav { position: sticky; top: calc(var(--hd) + 16px); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; }
.me-user { display: flex; gap: 10px; align-items: center; padding: 8px 8px 16px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.me-user small { display: flex; align-items: center; gap: 4px; color: var(--brand); font-size: 12.5px; }
.me-nav nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; font-size: 14.5px; font-weight: 400; color: var(--ink-2); }
.me-nav nav a:hover { background: var(--soft); }
.me-nav nav a.on { background: var(--brand-50); color: var(--brand-d); font-weight: 500; }
.pill-n { margin-left: auto; min-width: 20px; height: 20px; border-radius: 10px; background: var(--orange); color: #fff; font-size: 11px; display: grid; place-items: center; }
.me-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 12px; }
.me-head h1 { font-size: 26px; }
.me-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.me-stats div { padding: 16px; border-radius: var(--r-lg); background: var(--soft); }
.me-stats b { display: block; font: 600 22px/1.2 var(--f-head); }
.me-stats span { font-size: 13px; color: var(--muted); }
.me-list { display: grid; gap: 12px; margin-top: 16px; }
.me-row { display: grid; grid-template-columns: 120px 1fr auto; gap: 16px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-lg); }
.me-row img { width: 120px; height: 90px; border-radius: 10px; object-fit: cover; }
.me-row h3 { font: 500 15.5px/1.4 var(--f-body); }
.me-row .card-p { font-size: 15px; margin: 4px 0; }
.me-row .meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.me-row .reason { margin-top: 6px; font-size: 13px; color: var(--danger); background: #FDECEC; padding: 6px 10px; border-radius: 6px; }
.me-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.st { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 500; }
.st.on { background: var(--brand-50); color: var(--brand-d); }
.st.wait { background: #FFF6DB; color: #8A6100; }
.st.rej { background: #FDECEC; color: var(--danger); }
.st.hide, .st.sold { background: var(--soft); color: var(--muted); }
.card-form { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.card-form.narrow { max-width: 460px; }
.verify { display: grid; gap: 10px; }
.v-row { display: flex; gap: 14px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); }
.v-row > div { flex: 1; }
.v-row small { display: block; color: var(--muted); font-size: 13px; }
.v-row > .ic { width: 24px; height: 24px; color: var(--muted); }
.v-row.done > .ic { color: var(--brand); }

/* ===== Tin nhắn ===== */
/* không cuộn riêng: danh sách + tin nhắn trôi theo thanh cuộn chính; đầu & ô nhập dính trên/dưới */
.ch { display: grid; grid-template-columns: 340px 1fr; align-items: start; min-height: calc(100vh - var(--hd) - 48px); margin: 24px auto; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: clip; }
.ch-list { position: sticky; top: var(--hd); border-right: 1px solid var(--line); background: #fff; }
.ch-list-h { padding: 16px; background: #fff; border-bottom: 1px solid var(--line); }
.ch-list-h b { display: block; font-size: 18px; margin-bottom: 10px; font-family: var(--f-head); font-weight: 500; }
.ch-list-h input { height: 40px; }
.conv { display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; width: 100%; text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.conv:hover { background: var(--soft); }
.conv.on { background: var(--brand-50); }
.conv b { font-size: 14.5px; display: block; }
.conv small { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv i { font-style: normal; font-size: 12px; color: var(--muted); }
.conv .unread { display: inline-grid; place-items: center; min-width: 18px; height: 18px; border-radius: 9px; background: var(--orange); color: #fff; font-size: 11px; margin-top: 4px; }
.ch-pane { display: flex; flex-direction: column; min-width: 0; min-height: calc(100vh - var(--hd) - 50px); border-left: 1px solid var(--line); margin-left: -1px; }
.ch-top { position: sticky; top: var(--hd); z-index: 2; background: #fff; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.ch-top img { width: 56px; height: 44px; border-radius: 8px; object-fit: cover; }
.ch-top .t { flex: 1; min-width: 0; }
.ch-top b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14.5px; }
.ch-top small { color: var(--price); font-weight: 600; font-size: 13.5px; }
.ch-top .back { display: none; margin: 0; }
.ch-msgs { flex: 1; padding: 20px; display: flex; flex-direction: column; gap: 8px; background: #FAFBFB; }
.msg { max-width: 70%; padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; background: #fff; border: 1px solid var(--line); align-self: flex-start; }
.msg.me { display: block; width: auto; margin: 0; align-self: flex-end; background: var(--brand); border-color: var(--brand); color: #fff; }
.msg small { display: block; font-size: 11px; opacity: .65; margin-top: 2px; }
.msg-day { align-self: center; font-size: 12px; color: var(--muted); margin: 8px 0; }
.ch-foot { position: sticky; bottom: 0; z-index: 2; background: #fff; border-top: 1px solid var(--line); }
.ch-quick { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 16px 0; }
.ch-quick button { flex: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; }
.ch-quick button:hover { border-color: var(--brand); color: var(--brand); }
.ch-in { display: flex; gap: 8px; padding: 12px 16px 16px; align-items: center; }
.ch-in input { border-radius: 999px; }
.ch-in .btn { width: 44px; padding: 0; flex: none; }
.ch-att { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); cursor: pointer; flex: none; }
.ch-att:hover { background: var(--soft); }

/* ===== BOC FOOD ===== */
.prod .card-b { gap: 4px; }
.prod-note { font-size: 13px; color: var(--muted); }
.prod-tag { position: absolute; left: 10px; top: 10px; padding: 3px 8px; border-radius: 6px; background: var(--brand); color: #fff; font: 600 11px/1.4 var(--f-body); }
.prod-add { margin-top: 10px; position: relative; z-index: 2; }
.prod-add.on { background: var(--brand-d); }
.shop-hero { margin: 24px auto 48px; border-radius: 20px; overflow: hidden; background-size: cover; background-position: center; position: relative; min-height: 300px; display: flex; align-items: center; color: #fff; }
.shop-hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(9, 22, 50, .85), rgba(9, 22, 50, .2)); }
.shop-hero > div { position: relative; padding: 40px 6%; max-width: 640px; }
.shop-hero .kicker { color: #9FD3F0; }
.shop-hero h1 { font-size: 38px; }
.shop-hero p { color: rgba(255, 255, 255, .88); margin: 12px 0 0; }
.shop-usp { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.shop-usp div { display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; padding: 18px; border-radius: var(--r-lg); border: 1px solid var(--line); }
.shop-usp .ic { grid-row: span 2; width: 28px; height: 28px; color: var(--brand); }
.shop-usp span { font-size: 13.5px; color: var(--muted); }
.cart-fab { position: fixed; right: 20px; bottom: 20px; z-index: 70; width: 58px; height: 58px; border-radius: 50%; background: var(--orange); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 26px rgba(242, 107, 29, .4); }
.cart-fab b { position: absolute; top: -2px; right: -2px; min-width: 22px; height: 22px; border-radius: 11px; background: var(--ink); font-size: 12px; display: grid; place-items: center; }
.drawer { position: fixed; inset: 0; z-index: 120; background: rgba(16, 24, 32, .45); display: flex; justify-content: flex-end; }
.drawer-in { width: min(420px, 100%); background: #fff; height: 100%; display: flex; flex-direction: column; }
.drawer-h { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); font-size: 17px; }
.cart-items { flex: 1; overflow: auto; padding: 8px 20px; }
.ci { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.ci img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }
.ci .q { display: flex; align-items: center; gap: 8px; }
.ci .q button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); }
.cart-f { padding: 16px 20px 20px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.cart-sum { display: flex; justify-content: space-between; font-size: 15px; margin-bottom: 4px; }
.cart-sum b { color: var(--price); font-size: 18px; }
.pay { display: grid; gap: 6px; font-size: 13.5px; margin: 4px 0 6px; }
.pay label { display: flex; gap: 8px; align-items: center; }
.pay .dis { color: var(--muted); }
.pay input { accent-color: var(--brand); }

@media (max-width: 1279px) {
  .fbar { position: static; }
}
@media (max-width: 1100px) {
  .grid3 { grid-template-columns: repeat(2, 1fr); }
  .dt-grid, .pt-grid { grid-template-columns: 1fr 300px; }
  .pt-cats { grid-template-columns: repeat(2, 1fr); }
  .shop-usp { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {

  .fbar { position: static; flex-direction: column; gap: 10px; padding: 12px 0; margin-top: 4px; }
  .fbar-l { gap: 6px; width: 100%; }
  .fb-btn { height: 34px; padding: 0 10px 0 12px; font-size: 13px; max-width: 100%; }
  .fb-btn > .ic:first-child { display: none; }
  .fb-pop { position: fixed; left: 0; right: 0; top: auto; bottom: 0; width: auto; z-index: 140; border-radius: 18px 18px 0 0; padding: 20px 18px 24px; box-shadow: 0 0 0 100vmax rgba(16, 24, 32, .45); }
  .fb-act .btn { height: 44px; }
  .fbar-r { width: 100%; }
  .fb-save span { display: none; }
  .sort { flex: 1; min-width: 0; }
  .sort span { display: none; }
  .sort select { width: 100%; }
  .lst-map { height: 70vh; }

  .dt-grid, .pt-grid { grid-template-columns: 1fr; }
  .gal-main { aspect-ratio: 4 / 3; border-radius: 12px; }
  .gal-thumbs button { width: 72px; height: 54px; }
  .dt-box h1 { font-size: 20px; }
  .dt-price b { font-size: 22px; }
  .attrs { grid-template-columns: 1fr; }
  .dt-side { position: static; }
  .sticky-call { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 62px; z-index: 55; padding: 8px 4%; background: #fff; box-shadow: 0 -4px 16px rgba(16, 24, 32, .08); }
  .sticky-call .btn { height: 44px; }
  [data-page="detail"] { padding-bottom: 128px; }

  .pt-head h1 { font-size: 24px; }
  .pt-step { padding: 18px 16px; }
  .thumbs { grid-template-columns: repeat(4, 1fr); }
  .pt-side { position: static; order: -1; }
  .pt-side .tips, .pt-side-h, .prev-post { display: none; }
  .pt-submit { flex-direction: column-reverse; }
  .pt-submit .btn { width: 100%; }

  .au { padding: 20px 0 40px; }
  .au-card { grid-template-columns: 1fr; border-radius: 16px; }
  .au-side { display: none; }
  .au-main { padding: 24px 20px; }

  .me { grid-template-columns: 1fr; margin-top: 16px; }
  .me-nav { position: static; padding: 8px; }
  .me-nav nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .me-nav nav a { white-space: nowrap; flex: none; }
  .me-user { display: none; }
  .me-stats { grid-template-columns: repeat(2, 1fr); }
  .me-head h1 { font-size: 22px; }
  .me-row { grid-template-columns: 84px 1fr; }
  .me-row img { width: 84px; height: 70px; }
  .me-acts { grid-column: 1 / -1; justify-content: flex-start; }

  .ch { grid-template-columns: 1fr; min-height: calc(100vh - var(--hd) - 62px - 24px); margin: 12px auto; }
  .ch-pane { min-height: calc(100vh - var(--hd) - 62px - 26px); border-left: 0; margin-left: 0; }
  .ch-list { position: static; }
  .ch-foot { bottom: 62px; }
  .ch.open .ch-list { display: none; }
  .ch:not(.open) .ch-pane { display: none; }
  .ch-top .back { display: inline-flex; }
  .msg { max-width: 85%; }

  .shop-hero { min-height: 240px; }
  .shop-hero h1 { font-size: 26px; }
  .shop-usp { grid-template-columns: 1fr; }
  .cart-fab { bottom: 78px; }
}

/* Đăng tin: dòng liên hệ lấy từ tài khoản (thay bước "Liên hệ & cam kết") */
.pt-contact { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--r); background: var(--brand-50); }
.pt-contact > .ic { width: 22px; height: 22px; color: var(--brand); flex: none; }
.pc-view { flex: 1; min-width: 180px; }
.pt-contact small { display: block; font-size: 12.5px; color: var(--muted); }
.pt-contact b { font-weight: 600; }
.pt-final .pt-submit { margin-top: 16px; }
/* Đăng ký + Quản lý tài khoản */
.au-note { font-size: 13px; margin: -6px 0 14px; }
.acc-h { margin: 6px 0 12px; font: 600 16px/1.4 var(--f-head); }
.acc-h small { font: 400 13px var(--f-body); }
.card-form .acc-h ~ .acc-h { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.pc-btn { flex: none; background: #fff; }
.pc-btn .ic { width: 16px; height: 16px; }
.pt-contact.editing { align-items: flex-start; }
.pt-contact.editing > .ic { margin-top: 2px; }
.pc-edit { flex: 1; min-width: 0; }
.pc-edit .fld { margin-bottom: 10px; }
.pc-edit input:not([type=checkbox]) { background: #fff; }
.pc-edit .ck { margin: 0 0 12px; }
.pc-acts { display: flex; justify-content: flex-end; gap: 8px; }
/* Đăng tin theo đúng khung bài trên bảng tin */
.pt-hint { margin: -10px 0 14px; font-size: 13.5px; color: var(--muted); }
.pt-price { margin: 18px 0 0; }
.pt-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
.pt-facts .fld { margin-bottom: 0; }
.prev-post .post { box-shadow: 0 6px 20px rgba(16, 24, 32, .06); }
@media (max-width: 599px) { .pt-facts { grid-template-columns: 1fr; gap: 0; } .pt-facts .fld { margin-bottom: 12px; } }
.prev-post .post-acts { margin: 0 6px; }
.prev-post .post-acts a, .prev-post .post-acts button { gap: 4px; font-size: 12.5px; white-space: nowrap; }
.prev-post .post-acts .ic { width: 16px; height: 16px; }
/* Đăng tin: đổi ảnh bìa */
.thumbs figure[draggable="true"] { cursor: grab; }
.thumbs figure.drag { opacity: .4; }
.thumbs figure.over { outline: 2px dashed var(--brand); outline-offset: 2px; }
.thumbs .cover-btn { position: absolute; left: 4px; right: auto; bottom: 4px; top: auto; width: auto; height: 22px; padding: 0 7px; border-radius: 6px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 11px; font-weight: 600; white-space: nowrap; }
.thumbs .cover-btn:hover { background: var(--brand); }
/* Quản lý tin: nháp, hết hạn, bộ lọc đã lưu */
.st.draft { background: #EEF1F5; color: var(--ink-2); }
.st.exp { background: #FFF1E8; color: var(--orange-d); }
.me-row img.ph { opacity: .45; }
.me-empty { padding: 18px 4px; }
.flt-row { grid-template-columns: 48px 1fr auto; }
.flt-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.flt-noti { margin: 0 6px 0 0; align-items: center; font-size: 13.5px; }
.fb-reset.fb-keep { color: var(--brand); white-space: nowrap; }
@media (max-width: 860px) { .flt-row { grid-template-columns: 48px 1fr; } }

/* ===== Trang tĩnh: quy chế, chính sách, hướng dẫn, liên hệ ===== */
.doc { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 40px; margin: 28px auto 64px; align-items: start; }
.doc-nav { position: sticky; top: calc(var(--hd) + 16px); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 12px; }
.doc-nav h4 { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #6B7378; margin: 14px 12px 6px; }
.doc-nav h4:first-child { margin-top: 2px; }
.doc-nav a { display: block; padding: 9px 12px; border-radius: 8px; font-size: 14.5px; color: var(--ink-2); line-height: 1.35; }
.doc-nav a:hover { background: var(--soft); }
.doc-nav a.on { background: #EAF0FA; color: var(--brand); font-weight: 600; }
.doc-body { max-width: 860px; font-size: 15.5px; line-height: 1.7; color: var(--ink-2); }
.doc-body h1 { font-family: Montserrat, sans-serif; font-size: 30px; line-height: 1.25; color: var(--ink); margin: 0 0 6px; }
.doc-body h2 { font-family: Montserrat, sans-serif; font-size: 20px; color: var(--ink); margin: 34px 0 10px; scroll-margin-top: calc(var(--hd) + 16px); }
.doc-body h3 { font-size: 16.5px; font-weight: 600; color: var(--ink); margin: 22px 0 8px; }
.doc-body p { margin: 0 0 12px; }
.doc-body ul, .doc-body ol { margin: 0 0 14px; padding-left: 22px; }
.doc-body li { margin-bottom: 6px; }
.doc-body a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.doc-body b { color: var(--ink); font-weight: 600; }
.doc-meta { font-size: 13.5px; color: #6B7378; }
.doc-draft { display: flex; gap: 8px; align-items: center; font-size: 13.5px; background: #FFF4E5; color: #8A4B00; border-radius: 10px; padding: 10px 14px; margin-bottom: 22px !important; }
.doc-note { background: var(--soft); border-left: 3px solid var(--navy); border-radius: 0 10px 10px 0; padding: 14px 16px; margin: 0 0 16px; }
.doc-note > :last-child { margin-bottom: 0; }
.doc-body table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 14.5px; table-layout: fixed; }
.doc-body th, .doc-body td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.doc-body th { background: var(--soft); color: var(--ink); font-weight: 600; }
.doc-body details { border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; margin-bottom: 10px; }
.doc-body summary { cursor: pointer; padding: 14px 0; font-weight: 600; color: var(--ink); }
.doc-body details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.doc-form { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; margin: 0 0 14px; max-width: 620px; }
@media (max-width: 860px) {
  .doc { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 16px; }
  .doc-nav { position: static; order: 2; }
  .doc-body h1 { font-size: 24px; }
  .doc-body { font-size: 15px; }
  .doc-body table { font-size: 13px; }
  .doc-body th, .doc-body td { padding: 8px; }
}
