/* Grabhouse - trang chủ (theo thiết kế Figma "home", khung 1920). Có 3 mức: máy tính, tablet, điện thoại. */
:root{
  --orange:#ff8d28; --orange-d:#ff5c00; --blue:#1b54a5; --white:#fff;
  --ink:#2c2c2c; --muted:#999; --text2:#505050; --line:#f2f2f2; --bd:#ccc; --bg:#fafafa; --red:#e03c31;
  --font:"Lexend",system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  --font2:"Roboto",system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
}
*{box-sizing:border-box;margin:0;padding:0}
body{font-family:var(--font2);color:var(--ink);background:#fff;font-size:14px;line-height:20px;-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
img{display:block}
button{font:inherit;cursor:pointer;color:inherit}
.lx{font-family:var(--font);letter-spacing:-.2px}
.wrap{width:1150px;max-width:100%;margin:0 auto}

/* ===== Header ===== */
.hd{position:sticky;top:0;z-index:50;background:#fff;height:56px;box-shadow:0 4px 4px rgba(182,182,182,.18)}
.hd .in{height:56px;display:flex;align-items:center;padding:0 15px;gap:0}
.logo{display:flex;align-items:center;margin-left:39px;flex:none}
.logo img{width:41px;height:44px;border-radius:8px;object-fit:cover}
.menu{display:flex;margin-left:80px;font-family:var(--font);letter-spacing:-.2px}
.menu a{padding:6px 24px;white-space:nowrap}
.menu a:hover{color:var(--orange-d)}
.hd .sp{flex:1}
.hd .r{display:flex;align-items:center;gap:0}
.hd .app{padding:14px 16px;font-family:var(--font);letter-spacing:-.2px;white-space:nowrap}
.ib{width:48px;height:48px;border:0;background:#fff;border-radius:8px;display:grid;place-items:center;position:relative}
.ib img{width:24px;height:24px}
.ib .n{position:absolute;top:6px;left:24px;min-width:16px;height:16px;border-radius:4px;background:var(--red);color:#fff;font:700 10px/16px Roboto,Arial;text-align:center;padding:0 2px}
.av{position:relative;width:32px;height:48px;margin:0 8px 0 0}
.av img.a{position:absolute;top:9px;left:0;width:32px;height:32px;border-radius:50%;object-fit:cover}
.av img.b{position:absolute;left:16px;top:26px;width:16px;height:16px}
.post{border:1px solid var(--bd);background:#fff;border-radius:4px;height:32px;padding:0 12px;font-family:var(--font);letter-spacing:-.2px;white-space:nowrap}
.burger{display:none;width:44px;height:44px;border:0;background:none;font-size:24px}

/* biểu tượng Figma xuất ra bị lật dọc, lật lại cho đúng */
.fy{transform:scaleY(-1)}
/* ===== Hộp tìm AI ===== */
.search{background:#fff;padding-top:40px}
.sbox{width:680px;max-width:100%;margin:0 auto;background:var(--blue);border-radius:16px;padding:0 24px 24px;height:136px}
.tabs{display:flex;justify-content:center;gap:0;height:48px}
.tabs button{width:120px;border:0;background:none;color:#ccc;font-family:var(--font);letter-spacing:-.2px;border-bottom:2px solid rgba(255,255,255,.3);border-radius:4px 4px 0 0}
.tabs button.on{color:#fff;border-bottom-color:var(--orange)}
.sin{margin-top:16px;display:flex;align-items:center;height:48px;background:#f2f2f2;border:1px solid var(--bd);border-radius:8px;padding:0 7px 0 14px;gap:10px}
.sin input{flex:1;min-width:0;height:46px;border:0;background:none;outline:0;font:14px Roboto,Arial;color:var(--ink)}
.sin input::placeholder{color:#757575}
.sin button{width:28px;height:32px;border:1px solid var(--orange-d);background:var(--orange-d);border-radius:4px;display:grid;place-items:center}
.sin button img{width:16px;height:16px}

/* ===== Khối chung ===== */
.sec{background:var(--bg);padding:40px 0 48px}
.sec.w{background:#fff}
.sh{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:24px;flex-wrap:wrap}
.sh h2{font:400 24px/32px var(--font);letter-spacing:-.2px}
.sh .lk a:hover{color:var(--orange-d)}
.sh .lk i{font-style:normal;color:#000;margin:0 8px}
.sh .more{color:var(--red)}

/* ===== Thẻ tin đăng ===== */
.grid{display:grid;grid-template-columns:repeat(4,262px);gap:30px 30px;justify-content:space-between}
.card{display:block;position:relative;background:#fff;border:1px solid var(--line);border-radius:4px;box-shadow:0 4px 3px rgba(44,44,44,.04);height:318px;overflow:hidden}
.card .ph{height:146px;background:#f2f2f2}
.card .ph img{width:100%;height:100%;object-fit:cover}
.card h3{font:400 14px/20px var(--font);letter-spacing:-.2px;margin:12px 16px 0;height:40px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.card .pr{margin:4px 16px 0;height:26px;font-size:16px;line-height:26px;color:var(--red)}
.card .pr i{font-style:normal;color:var(--muted);font-size:14px;margin:0 6px}
.card .lc{display:flex;gap:6px;margin:6px 16px 0;color:var(--text2);height:20px;align-items:center}
.card .lc img{width:12px;height:16px}
.card .ft{position:absolute;left:16px;right:16px;bottom:16px;display:flex;align-items:center;justify-content:space-between;color:var(--muted);font-size:12px;line-height:16px}
.save{width:32px;height:32px;border:1px solid var(--bd);background:#fff;border-radius:4px;display:grid;place-items:center}
.save img{width:16px;height:16px}
.save.on{border-color:var(--red)}
.save.on img{filter:invert(24%) sepia(95%) saturate(3000%) hue-rotate(350deg)}
.exp{display:flex;justify-content:center;margin-top:48px}
.exp button{width:160px;height:48px;border:1px solid var(--bd);background:#fff;border-radius:8px;font-family:var(--font);letter-spacing:-.2px;display:flex;align-items:center;justify-content:center;gap:8px}
.exp button img{width:16px;height:16px;transform:rotate(180deg)}
.exp button.open img{transform:none}
.card.hide{display:none}

/* ===== Dự án nổi bật (slider) ===== */
.slw{position:relative}
.sl{display:flex;gap:30px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;padding:0 5px 16px}
.sl::-webkit-scrollbar{display:none}
.pj{flex:none;width:262px;height:276px;scroll-snap-align:start;background:#fff;border:1px solid var(--line);border-radius:4px;box-shadow:0 4px 3px rgba(44,44,44,.04);overflow:hidden;display:block}
.pj .ph{position:relative;height:146px;background:#f2f2f2}
.pj .ph>img.m{width:100%;height:100%;object-fit:cover}
.pj .ph::after{content:"";position:absolute;left:0;right:0;bottom:0;height:40px;background:linear-gradient(180deg,rgba(44,44,44,0),rgba(44,44,44,.8))}
.pj .cnt{position:absolute;right:16px;bottom:8px;z-index:2;display:flex;align-items:center;gap:0;color:#fff;font-size:14px;line-height:25px}
.pj .cnt img{width:24px;height:25px}
.tag{display:inline-block;margin:12px 16px 0;height:24px;padding:4px 8px;font-size:12px;line-height:16px;border-radius:4px}
.tag.s{background:#ffeceb;color:var(--red)}
.tag.d{background:#e7fff4;color:#12a15a}
.pj h3{font:400 16px/24px var(--font);letter-spacing:-.2px;margin:4px 16px 0}
.pj p{margin:0 16px;font-size:14px;line-height:20px}
.arr{position:absolute;top:50%;margin-top:-32px;width:48px;height:48px;border:0;background:none;display:grid;place-items:center}
.arr img{width:24px;height:25px}
.arr.l{left:-58px}.arr.r{right:-58px}

/* ===== Chân trang (nội dung thử) ===== */
.ftr{background:var(--bg);padding:48px 0 40px}
.fc{display:grid;grid-template-columns:repeat(4,262px);gap:30px;justify-content:space-between}
.fc h4{font:400 14px/20px var(--font);letter-spacing:-.2px;margin-bottom:12px}
.fc a{display:flex;align-items:center;gap:4px;padding:5px 0}
.fc a:hover{color:var(--orange-d)}
.fc a.m{color:var(--red);margin-top:8px}
.fc a .c{color:var(--muted);font-size:18px;line-height:14px}

/* ===== Tablet ===== */
@media(max-width:1260px){
  .wrap{padding:0 24px}
  .grid,.fc{grid-template-columns:repeat(3,1fr)}
  .card{height:318px}
  .arr.l{left:-4px}.arr.r{right:-4px}
  .arr{background:rgba(255,255,255,.9);border-radius:50%;box-shadow:0 2px 6px rgba(0,0,0,.15);width:40px;height:40px}
  .menu{margin-left:24px}
  .menu a{padding:6px 14px}
  .hd .app{display:none}
}
@media(max-width:900px){
  .grid{grid-template-columns:repeat(2,1fr)}
  .fc{grid-template-columns:repeat(2,1fr)}
  .menu a{padding:6px 10px}
  .logo{margin-left:0}
}
/* ===== Điện thoại ===== */
@media(max-width:700px){
  .wrap{padding:0 16px}
  .burger{display:block}
  .menu{display:none;position:absolute;top:56px;left:0;right:0;background:#fff;flex-direction:column;margin:0;padding:8px 16px 16px;box-shadow:0 8px 12px rgba(0,0,0,.08)}
  .menu.open{display:flex}
  .menu a{padding:12px 4px;border-bottom:1px solid var(--line)}
  .hd .in{padding:0 8px 0 4px}
  .ib{width:40px}
  .av{margin-right:4px}
  .post{padding:0 8px}
  .search{padding:0 12px}
  .sbox{height:auto;padding:0 14px 16px;border-radius:12px}
  .tabs button{flex:1;width:auto}
  .sh{margin-bottom:16px}
  .sh h2{font-size:20px;line-height:28px}
  .sh .lk{font-size:13px}
  .sec{padding:28px 0 32px}
  .grid{gap:12px;grid-template-columns:repeat(2,1fr)}
  .card{height:auto;padding-bottom:12px}
  .card .ph{height:110px}
  .card h3{margin:10px 10px 0;font-size:13px;line-height:18px;height:36px}
  .card .pr{margin:4px 10px 0;font-size:14px}
  .card .lc{margin:4px 10px 0;font-size:12px}
  .card .ft{position:static;margin:8px 10px 0}
  .card .ft .save{width:28px;height:28px}
  .exp{margin-top:24px}
  .sl{gap:14px}
  .pj{width:228px}
  .arr{display:none}
  .fc{gap:24px 16px}
}


/* ===== Trang danh sách (Mua bán) ===== */
.ls{display:flex;align-items:flex-start;min-height:calc(100vh - 56px)}
.lcol{width:720px;flex:none;background:#fff}
.mapcol{flex:1;position:sticky;top:72px;margin:16px 15px 0 -4px;height:822px;max-height:calc(100vh - 88px);border-radius:8px;overflow:hidden;background:#e5e3df}
.mapcol img{width:100%;height:100%;object-fit:cover;object-position:left top}
.mapclose{display:flex;align-items:center;gap:10px;position:absolute;top:16px;right:14px;z-index:5;border:0;background:#00969b;color:#fff;border-radius:6px;padding:0 20px 0 16px;height:48px;min-width:156px;font:700 14px Roboto,Arial;box-shadow:0 2px 6px rgba(0,0,0,.25)}
.mapclose svg{width:22px;height:22px}
.ls.nomap .mapcol{display:none}
.ls.nomap .lcol{margin:0 auto}
.ls.nomap~.mapbtn{display:block}
.filt{position:sticky;top:56px;z-index:20;background:#fff;border-bottom:1px solid var(--line);padding:16px 24px 0}
.filt .row{display:flex;gap:8px;align-items:center;padding-bottom:16px;overflow-x:auto;scrollbar-width:none}
.filt .row::-webkit-scrollbar{display:none}
.fb{flex:none;height:32px;border:1px solid var(--bd);background:#fff;border-radius:4px;padding:0 12px;display:flex;align-items:center;gap:8px;font:14px Roboto,Arial;color:var(--ink);white-space:nowrap}
.fb.ph{color:var(--muted)}
.fb img{width:16px;height:16px}
.fb .cn{background:var(--red);color:#fff;border-radius:3px;min-width:16px;height:16px;font-size:11px;line-height:16px;text-align:center}
.fb.sort{width:138px;margin-left:auto}
.fb.sel{justify-content:space-between}
.bc{padding:24px 24px 0;display:flex;gap:4px;flex-wrap:wrap;font-size:14px;line-height:20px;color:#505050}
.bc a:hover{color:var(--orange-d)}
.bc span{color:var(--muted)}
.lcol h1{font:400 24px/31px var(--font);letter-spacing:-.2px;margin:12px 24px 0}
.cnt2{margin:8px 24px 0;font-size:14px}
.items{padding:24px 24px 0;display:flex;flex-direction:column;gap:16px}
.it{display:flex;position:relative;height:188px;border:1px solid var(--line);border-radius:4px;box-shadow:0 4px 6px rgba(44,44,44,.04);overflow:hidden;background:#fff}
.it .im{position:relative;flex:none;width:232px;height:100%;background:#f2f2f2}
.it .im>img.m{width:100%;height:100%;object-fit:cover}
.it .im::after{content:"";position:absolute;left:0;right:0;bottom:0;height:40px;background:linear-gradient(180deg,rgba(44,44,44,0),rgba(44,44,44,.92))}
.it .im .cnt{position:absolute;right:23px;bottom:8px;z-index:3;display:flex;align-items:center;color:#fff;font-size:14px;line-height:25px}
.it .im .cnt img{width:24px;height:25px}
.exp2{position:absolute;inset:0;background:rgba(0,0,0,.6);z-index:2;display:grid;place-items:center}
.exp2 img{width:110px;height:71px}
.it .bd{flex:1;min-width:0;padding:16px 24px 0 24px;position:relative}
.it h3{font:400 14px/20px var(--font);letter-spacing:-.2px;height:40px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.it .pr{display:flex;align-items:center;flex-wrap:wrap;margin-top:8px;min-height:26px;line-height:26px;font-size:16px;color:var(--red)}
.it .pr .d{color:var(--muted);font-size:14px;margin:0 8px}
.it .pr .g{color:#505050;font-size:14px}
.it .pr .ic{display:inline-flex;align-items:center;gap:4px;color:#505050;font-size:16px}
.it .pr .ic img{width:18px;height:16px}
.it .lc{display:flex;align-items:center;gap:4px;margin-top:8px;color:#505050;line-height:20px}
.it .lc img{width:12px;height:16px}
.it .ag{position:absolute;left:24px;right:70px;bottom:16px;display:flex;align-items:center;gap:12px;min-height:32px}
.it .ag .av2{position:relative;width:32px;height:32px;flex:none}
.it .ag .av2 img.a{width:32px;height:32px;border-radius:50%;object-fit:cover}
.it .ag .av2 img.b{position:absolute;right:-4px;bottom:-4px;width:16px;height:16px}
.it .ag b{display:block;font:400 12px/16px Roboto,Arial;color:var(--ink)}
.it .ag small{display:block;font-size:12px;line-height:16px;color:var(--muted)}
.it .save{position:absolute;right:16px;bottom:16px}
.kw{padding:48px 24px 0}
.kw h2,.fl h2{font:400 18px/28px var(--font);letter-spacing:-.2px;margin-bottom:16px}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chips a{height:32px;line-height:32px;padding:0 16px;background:#f2f2f2;border-radius:40px;font-size:14px}
.chips a:hover{background:#e6e6e6}
.fl{padding:40px 24px 0}
.fl ul{list-style:none;display:grid;grid-template-columns:1fr 1fr;gap:0 24px}
.fl li{min-height:32px;line-height:19px;padding:6px 0}
.fl li a:hover{color:var(--orange-d)}
.endpad{height:64px}
.mapbtn{display:none;position:fixed;left:50%;bottom:20px;transform:translateX(-50%);z-index:40;border:0;background:#00969b;color:#fff;border-radius:999px;padding:12px 22px;font:14px Roboto,Arial;box-shadow:0 4px 12px rgba(0,0,0,.25)}

@media(max-width:1260px){
  .lcol{width:640px}
  .mapcol{margin-left:12px}
}
@media(max-width:1100px){
  .ls{display:block}
  .lcol{width:100%;max-width:820px;margin:0 auto}
  .mapcol{display:none;position:fixed;left:0;right:0;bottom:0;top:56px;margin:0;max-height:none;height:auto;z-index:60;border-radius:0}
  .mapcol.open{display:block}
  .mapclose{top:12px}
  .mapbtn{display:block;position:fixed;left:50%;bottom:20px;transform:translateX(-50%);z-index:40;border:0;background:var(--blue);color:#fff;border-radius:999px;padding:12px 22px;font:14px Roboto,Arial;box-shadow:0 4px 12px rgba(0,0,0,.25)}
}
@media(max-width:700px){
  .filt{padding:12px 16px 0}
  .filt .row{padding-bottom:12px}
  .fb.sort{margin-left:0}
  .bc{padding:16px 16px 0}
  .lcol h1{font-size:20px;line-height:28px;margin:10px 16px 0}
  .cnt2{margin:6px 16px 0}
  .items{padding:16px 16px 0}
  .it{height:auto;flex-direction:column}
  .it .im{width:100%;height:180px}
  .it .bd{padding:12px 14px 14px}
  .it .ag{position:static;margin-top:12px;padding-right:44px}
  .it .save{right:12px;bottom:12px}
  .it .im .cnt{right:16px}
  .kw,.fl{padding:32px 16px 0}
  .fl ul{gap:0 12px}
}