/* hd_moi.css — HEADER MỚI 777DOLL (Rex duyệt demo 15/10/2026)
   Máy tính: 3 tầng (logo | ô tìm | icon) · menu · 8 tính năng — lướt xuống thu còn tầng 1, lướt lên xổ ra.
   Điện thoại: kiểu app Shopee — dải trên cố định (logo nhỏ | ô tìm | giỏ | chat) + thanh dưới cố định.
   Gắn vào mọi trang bằng _hd_moi_apply.py (nạp qua @import trong <style id="hdmoi">) — ĐỪNG sửa tay từng trang.
   Sửa file này ⇒ nâng ?v= trong _hd_moi_apply.py rồi chạy lại lệnh đó. */

/* ---------- Ô TÌM KIẾM ---------- */
.srch{position:relative;flex:1 1 auto;min-width:0}
.srch-box{display:flex;align-items:center;height:42px;background:#fff;border-radius:999px;overflow:hidden;border:1px solid transparent}
.srch-box:focus-within{border-color:#E12C2C;box-shadow:0 0 0 3px rgba(225,44,44,.18)}
.srch-box input{flex:1;min-width:0;border:0;outline:0;background:transparent;font:400 14.5px/1 'Be Vietnam Pro',sans-serif;color:#1b1b1b;padding:0 8px 0 20px;-webkit-appearance:none;appearance:none}
.srch-box input::-webkit-search-cancel-button{display:none}
.srch-box input::placeholder{color:#8a8a8a}
.srch-x{display:none;border:0;background:none;color:#999;font-size:18px;padding:0 8px;cursor:pointer}
.srch.has-q .srch-x{display:block}
.srch-go{flex:0 0 auto;height:34px;width:52px;margin-right:4px;border-radius:999px;border:0;background:#E12C2C;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center}
.srch-go svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round}
.srch-go:hover{background:#c41f1f}
/* bảng gợi ý xổ xuống */
.srch-pop{position:absolute;left:0;right:0;top:calc(100% + 6px);background:#fff;color:#1b1b1b;border-radius:10px;box-shadow:0 18px 50px rgba(0,0,0,.45);z-index:70;max-height:min(72vh,640px);overflow:auto;display:none;font-family:'Be Vietnam Pro',sans-serif;text-align:left}
.srch.open .srch-pop{display:block}
.sp-sec{padding:12px 16px 8px}
.sp-sec+.sp-sec{border-top:1px solid #eee}
.sp-h{font-size:11.5px;font-weight:600;letter-spacing:.8px;text-transform:uppercase;color:#8a8a8a;margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}
.sp-chips{display:flex;flex-wrap:wrap;gap:7px}
.sp-chip{border:1px solid #e3e3e3;background:#f6f6f6;color:#333;border-radius:999px;padding:6px 12px;font-size:13px;cursor:pointer;line-height:1.2}
.sp-chip:hover{border-color:#E12C2C;color:#E12C2C}
.sp-chip.hieu{background:#fdeeee;border-color:#f3c4c4;color:#b31d1d;cursor:default}
.sp-row{display:flex;gap:12px;align-items:center;padding:7px 8px;margin:0 -8px;border-radius:8px;color:inherit;text-decoration:none}
.sp-row:hover{background:#f5f5f5}
.sp-row img{width:44px;height:58px;object-fit:cover;border-radius:6px;flex:0 0 auto;background:#eee}
.sp-row .t{flex:1;min-width:0}
.sp-row .n{display:block;font-size:14px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sp-row .m{display:block;font-size:12px;color:#888;margin-top:3px}
.sp-row .p{font-size:14px;font-weight:600;color:#E12C2C;white-space:nowrap}
.sp-all{display:block;width:100%;margin:6px 0 4px;padding:10px;border:1px solid #E12C2C;color:#E12C2C;background:#fff;border-radius:8px;font:600 13.5px 'Be Vietnam Pro',sans-serif;cursor:pointer}
.sp-all:hover{background:#E12C2C;color:#fff}
.sp-post{display:flex;gap:10px;align-items:flex-start;padding:7px 0;color:#333;text-decoration:none;font-size:13.5px;line-height:1.4}
.sp-post:hover{color:#E12C2C}
.sp-post i{font-style:normal;flex:0 0 auto}
.sp-empty{font-size:13.5px;color:#555;line-height:1.5}
.sp-empty a{color:#E12C2C}

/* ---------- HEADER CỐ ĐỊNH (chỗ trống phía trên = padding-top của body, JS đo đúng số) ---------- */
header#hd{position:fixed;left:0;right:0;top:0}
body{padding-top:var(--hdm-h,174px)}
header#hd nav.main,header#hd .f8bar{transition:max-height .28s ease,opacity .2s,padding .28s,margin .28s,border-color .28s}
/* khối dính đầu trang của Bộ sưu tập: bám theo chiều cao header ĐANG hiện */
.aside{top:calc(var(--hdm-now,88px) + 10px)!important;max-height:calc(100vh - var(--hdm-now,88px) - 24px)!important}
#tnbar{top:var(--hdm-now,88px)!important}   /* dải tính năng dính dưới header (trang tự đo --tnTop 1 lần -> hở khi header thu gọn) */

/* ---------- MÁY TÍNH: 3 tầng, thẳng mép trái/phải, khung hẹp 1280px (Rex 15/10) ---------- */
@media(min-width:1221px){
  header .wrap{flex-wrap:wrap;row-gap:0;column-gap:28px;justify-content:flex-start;max-width:1280px}
  header .logo{order:1}
  .srch{order:2;flex:1 1 auto;max-width:none}
  .hbuy{order:3;margin-left:0}
  nav.main{order:4;flex:0 0 100%;justify-content:space-between;gap:12px!important;border-top:1px solid rgba(255,255,255,.07);padding-top:10px;margin-top:8px;max-height:60px}
  .f8bar{order:5;max-height:50px}
  /* lướt xuống: ẩn tầng 2 + 3, chỉ còn logo | ô tìm | icon */
  header#hd.hd-gon nav.main,header#hd.hd-gon .f8bar{max-height:0;opacity:0;padding-top:0;padding-bottom:0;margin-top:0;border-color:transparent;overflow:hidden;pointer-events:none}
}

/* ---------- 8 TÍNH NĂNG (tầng 3) — icon lấy từ hãng: img_lib/_icon_tn/<khoá>.png ---------- */
.f8bar{flex:0 0 100%;display:flex;justify-content:space-between;border-top:1px solid rgba(255,255,255,.07);padding:9px 0 2px;margin-top:9px}
.f8bar a{display:inline-flex;align-items:center;gap:8px;color:var(--soft,#cfccc4);text-decoration:none;font:400 13px/1 'Be Vietnam Pro',sans-serif;white-space:nowrap;transition:color .2s}
.f8bar a:hover{color:#fff}
.f8bar .fi{width:20px;height:20px;flex:0 0 auto;background:#E12C2C;-webkit-mask:var(--ic) center/contain no-repeat;mask:var(--ic) center/contain no-repeat}
.f8bar svg.fi{background:none;stroke:#E12C2C;fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}

/* ---------- ĐIỆN THOẠI: kiểu app Shopee ---------- */
.bnav,.m-chat,.m-logo{display:none}
@media(max-width:1220px){
  body{padding-top:var(--hdm-h,95px)}
  header .wrap{flex-wrap:wrap;gap:10px;padding-top:8px!important;padding-bottom:8px!important}
  header .logo,header .burger,.hbuy .hphone,.hbuy-row > :not(.giobtn){display:none!important}
  /* file icon có lề trong suốt rộng (~22% mỗi bên) -> khung cắt bớt lề, chữ 777 rõ hơn */
  .m-logo{display:block;order:0;flex:0 0 auto;width:40px;height:23px;overflow:hidden}
  .m-logo img{display:block;width:72px;height:72px;max-width:none;margin:-25px 0 0 -16px}
  .srch{order:1;flex:1 1 0;max-width:none;margin:0}
  .hbuy{order:2;flex:0 0 auto}
  .hbuy-row{gap:16px}
  .m-chat{display:flex;order:3;color:var(--soft,#cfccc4);align-items:center;padding:4px}
  .m-chat svg{width:24px;height:24px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
  .giobtn svg{width:24px!important;height:24px!important}
  .srch-box{height:38px}
  .srch-go{width:44px;height:30px}
  .srch-pop{position:fixed;left:8px;right:8px;top:62px;max-height:calc(100vh - 140px)}
  .sp-row .n{font-size:13.5px}
  /* 8 tính năng: vuốt ngang ngay dưới ô tìm, lướt xuống thì ẩn */
  .f8bar{order:4;justify-content:flex-start;gap:8px;overflow-x:auto;scrollbar-width:none;padding:0 14px;margin:0 -14px;border-top:0;max-height:40px}
  .f8bar::-webkit-scrollbar{display:none}
  .f8bar a{font-size:12.5px;padding:6px 11px;border:1px solid #3a3a35;border-radius:999px;background:rgba(255,255,255,.03)}
  .f8bar .fi{width:16px;height:16px}
  header#hd.hd-gon .f8bar{max-height:0;opacity:0;margin-top:-10px;overflow:hidden;pointer-events:none}
  /* thanh dưới cố định */
  .bnav{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:55;background:#101010;border-top:1px solid #2c2c28;padding:6px 0 calc(6px + env(safe-area-inset-bottom))}
  .bnav a,.bnav button{flex:1;display:flex;flex-direction:column;align-items:center;gap:4px;background:none;border:0;color:#a9a69f;text-decoration:none;font:400 11px/1 'Be Vietnam Pro',sans-serif;cursor:pointer;position:relative;padding:2px 0}
  .bnav svg{width:23px;height:23px;stroke:currentColor;fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
  .bnav .on{color:#E12C2C}
  .bnav .bn-n{position:absolute;top:-3px;left:calc(50% + 6px);min-width:16px;height:16px;padding:0 4px;border-radius:9px;background:#E12C2C;color:#fff;font-size:10px;font-weight:600;line-height:16px;text-align:center}
  body.co-bnav{padding-bottom:64px}
  /* trang chi tiết doll: khung giá + nút Mua ngay đã dính đáy -> nhường chỗ, không hiện thanh dưới */
  body.co-gia .bnav{display:none}
  /* 22/10 Rex: cụm liên hệ mép phải PHẢI hiện cả trên điện thoại (bỏ lệnh ẩn 15/10 "đã có thanh dưới + nút chat");
     dock_lienhe.js tự đặt nó ở bottom:74px — nằm trên thanh dưới (.bnav) */
}

/* ---------- KẾT QUẢ TÌM KIẾM trên trang Bộ sưu tập (?q=) ---------- */
.tk-bar{margin:4px 0 14px;padding:14px 16px;border:1px solid #33332e;border-radius:10px;background:#1a1a18;font-family:'Be Vietnam Pro',sans-serif}
.tk-bar h2{font:600 19px/1.35 'Be Vietnam Pro',sans-serif;color:#fff;margin:0 0 8px;text-transform:none;letter-spacing:0}
.tk-bar h2 q{color:#E12C2C}
.tk-meta{display:flex;flex-wrap:wrap;align-items:center;gap:7px;color:#cfccc4;font-size:13px}
.tk-meta .sp-chip.hieu{background:rgba(225,44,44,.12);border-color:rgba(225,44,44,.45);color:#ff9d9d}
.tk-xoa{margin-left:auto;color:#cfccc4;font-size:12.5px;text-decoration:none;border-bottom:1px solid #555}
.tk-xoa:hover{color:#fff;border-color:#E12C2C}
.tk-note{margin-top:10px;font-size:13.5px;color:#cfccc4;line-height:1.55}
.tk-note a{color:#E12C2C}
.tk-blog{margin-top:34px;padding-top:22px;border-top:1px solid #2a2a26}
.tk-blog h3{font:600 17px 'Be Vietnam Pro',sans-serif;color:#fff;margin:0 0 12px;text-transform:none;letter-spacing:0}
.tk-bl{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.tk-bl a{display:block;padding:15px;border:1px solid #2e2e2a;border-radius:10px;color:#e8e6e0;text-decoration:none;font-size:14px;line-height:1.45;background:#1a1a18}
.tk-bl a:hover{border-color:rgba(225,44,44,.7)}
.tk-bl a small{display:block;color:#989898;font-size:11px;margin-bottom:6px;letter-spacing:.6px;text-transform:uppercase}
@media(max-width:900px){.tk-bl{grid-template-columns:1fr}.tk-bar h2{font-size:17px}}
