:root { --brand: #e3262e; --ink: #2b2f36; --bg: #f2f3f5; --dark: #1f1f1f; --line: #e6e8eb; }
body { font-family: 'Saira Semi Condensed', system-ui, sans-serif; background: var(--bg); color: var(--ink); min-height: 100vh; display: flex; flex-direction: column; font-size: 15.5px; }
main { flex: 1 0 auto; }
a { color: var(--brand); text-decoration: none; }
.text-brand { color: var(--brand) !important; }
.min-w-0 { min-width: 0; }

/* nut */
.btn { font-weight: 500; }
.btn-brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-brand:hover, .btn-brand:focus { background: color-mix(in srgb, var(--brand) 82%, #000); border-color: color-mix(in srgb, var(--brand) 82%, #000); color: #fff; }
.btn-outline-brand { border-color: var(--brand); color: var(--brand); }
.btn-outline-brand:hover { background: var(--brand); color: #fff; }

/* thanh tren cung */
.topline { background: var(--brand); color: #fff; font-size: .92rem; padding: 12px 0; }
.topline a, .topline span { color: #fff; }

/* header */
.site-header { background: #fff; box-shadow: 0 1px 0 var(--line); position: relative; z-index: 20; }
.logo img { max-height: 64px; max-width: 200px; }
.logo-text { font-size: 1.6rem; font-weight: 700; color: var(--brand); letter-spacing: .3px; }
.search { background: #f1f2f4; border-radius: 8px; overflow: hidden; max-width: 680px; }
.search input { flex: 1; border: 0; background: transparent; padding: 12px 16px; outline: none; min-width: 0; }
.search button { border: 0; background: transparent; padding: 0 16px; color: #444; font-size: 1.05rem; }
.icon-circle { width: 40px; height: 40px; border-radius: 50%; background: #f1f2f4; color: #333; display: flex; align-items: center; justify-content: center; border: 0; font-size: 1.05rem; flex-shrink: 0; }
.icon-circle:hover { color: var(--brand); }
.user-box { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.user-box .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.1rem; }
.user-box .uname { font-weight: 500; font-size: .95rem; }
.user-box .ubal { color: #1a3cff; font-weight: 500; font-size: .95rem; }

/* menu */
.mainnav { border-top: 1px solid var(--line); }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 30px; }
.nav-list > li { position: relative; }
.nav-list > li > a { display: inline-flex; align-items: center; gap: 4px; padding: 16px 0; color: #333; font-size: 1.02rem; }
.nav-list > li > a.active, .nav-list > li > a:hover { color: var(--brand); }
.nav-list .bi-chevron-down { font-size: .7rem; }
.drop, .mega { display: none; position: absolute; top: 100%; left: 0; background: #fff; box-shadow: 0 12px 32px rgba(0,0,0,.12); border-radius: 6px; z-index: 50; }
.drop { min-width: 220px; padding: 8px 0; }
.drop a { display: block; padding: 8px 18px; color: #333; }
.drop a:hover { color: var(--brand); background: #fafafa; }
.mega { width: min(1180px, 92vw); left: -60px; padding: 28px 40px; max-height: 75vh; overflow: auto; }
.mega-title { font-size: 1.05rem; font-weight: 500; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); position: relative; }
.mega-title::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 50px; height: 2px; background: var(--brand); }
.mega-link { display: flex; align-items: center; gap: 8px; padding: 7px 4px; color: #333; }
.mega-link:hover { color: var(--brand); }
.mega-link img { width: 22px; height: 22px; object-fit: contain; }
.contact-mini { font-size: .92rem; }
.contact-mini i { color: var(--brand); font-size: 1.6rem; }
.contact-mini small { color: #666; }
@media (min-width: 992px) {
  .nav-list > li:hover > .drop, .nav-list > li:hover > .mega { display: block; }
}
@media (max-width: 991.98px) {
  .nav-list { flex-direction: column; gap: 0; padding-bottom: 10px; }
  .nav-list > li > a { padding: 10px 0; }
  .nav-list > li.open > .drop, .nav-list > li.open > .mega { display: block; position: static; box-shadow: none; padding: 0 0 8px 12px; width: auto; max-height: none; }
  .mega .mega-title { margin-top: 8px; }
}

/* khoi chung */
.box { background: #fff; border-radius: 8px; padding: 26px 28px; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.box-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 14px; }
.notice-text { line-height: 1.75; font-weight: 500; }
.banner { width: 100%; border-radius: 8px; }
.page-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 18px; }
.card-soft { border: 0; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,.05); }

/* nut chuyen muc */
.cat-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.cat-btn { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--dark); color: #fff; border: 0; border-radius: 4px; padding: 11px 18px; font-weight: 600; font-size: .95rem; box-shadow: 0 2px 4px rgba(0,0,0,.15); }
.cat-btn img { width: 22px; height: 22px; object-fit: contain; }
.cat-btn:hover { background: color-mix(in srgb, var(--brand) 70%, #000); }
.cat-btn.all { background: #dfe1e5; color: #36506b; }
.cat-btn.active:not(.all) { background: var(--brand); }
.cat-btn.all.active { outline: 2px solid #c4c8ce; }
.sub-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: -10px; padding: 12px; background: #fff; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.cat-btn.sub { flex: 0 1 auto; background: #f1f3f5; color: #23324a; box-shadow: none; padding: 8px 14px; font-size: .9rem; border: 1px solid #e3e6ea; }
.cat-btn.sub:hover { background: #e7eaee; }
.cat-btn.sub.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.cat-btn.sub .cnt { background: rgba(0,0,0,.08); border-radius: 10px; padding: 0 7px; font-size: .78rem; }
.cat-btn.sub.active .cnt { background: rgba(255,255,255,.25); }

/* khoi san pham */
.cat-head { display: flex; align-items: center; gap: 12px; font-size: 1.15rem; font-weight: 700; color: #fff; text-transform: uppercase; background: linear-gradient(90deg, var(--brand) 0%, color-mix(in srgb, var(--brand) 40%, #000) 55%, #000 100%); border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; box-shadow: 0 4px 10px rgba(0,0,0,.18); }
.cat-head img { width: 30px; height: 30px; object-fit: contain; background: #fff; border-radius: 6px; padding: 2px; }
.product-row { display: flex; align-items: center; gap: 18px; background: #fff; border: 1px dashed #b9bdc4; border-radius: 6px; padding: 16px 20px; margin-bottom: 14px; }
.p-name { display: block; color: #333; font-weight: 700; line-height: 1.5; }
.p-name:hover { color: var(--brand); }
.p-desc { font-size: .85rem; color: #555; margin-top: 4px; }
.badge-stock, .badge-sold { display: inline-block; color: #fff; font-size: .85rem; padding: 1px 8px; border-radius: 2px; }
.badge-stock { background: #b23cc7; }
.badge-sold { background: #2f9e67; }
.p-buy { width: 215px; flex-shrink: 0; display: flex; flex-direction: column; gap: 10px; }
.p-price { border: 1px solid #f0b7c5; border-radius: 6px; text-align: center; color: #e0245e; font-weight: 700; padding: 7px 10px; background: #fff; }
.btn-buy { border: 0; border-radius: 4px; color: #fff; padding: 8px 10px; font-weight: 500; background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 85%, #000) 0%, #1a0000 100%); box-shadow: 0 2px 4px rgba(0,0,0,.25); }
.btn-buy:hover { filter: brightness(1.15); }
.btn-buy:disabled { background: #9ca3af; box-shadow: none; }
@media (max-width: 575.98px) {
  .product-row { flex-direction: column; align-items: stretch; }
  .p-buy { width: 100%; flex-direction: row; }
  .p-buy > * { flex: 1; }
}

/* vi tien */
.wallet { background: #fff; border-radius: 10px; padding: 26px 28px; box-shadow: 0 2px 10px rgba(0,0,0,.05); top: 16px; }
.w-label { color: #555; font-size: .95rem; }
.w-balance { color: var(--brand); font-size: 2rem; font-weight: 600; margin-bottom: 18px; }
.w-item { background: #f2f3f5; border-radius: 8px; padding: 18px 22px; margin-bottom: 14px; }
.w-value { font-size: 1.45rem; font-weight: 500; margin-top: 4px; }

/* gan day */
.recent { padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.recent:last-child { border-bottom: 0; }
.recent .who { font-weight: 600; }
.recent .when { float: right; color: #888; font-size: .82rem; }

/* modal mua */
.buy-head { background: linear-gradient(90deg, var(--brand), #000); color: #fff; }
.mini { background: #f2f3f5; border-radius: 6px; padding: 8px 12px; }
.mini small { display: block; color: #666; }

/* trang khac */
.price { color: var(--brand); font-weight: 700; }
.stock-badge { background: color-mix(in srgb, var(--brand) 14%, #fff); color: var(--brand); }
.auth-card { max-width: 440px; }
.desc { line-height: 1.7; }
.nav-pills .nav-link { color: var(--ink); }
.nav-pills .nav-link.active { background: var(--brand); color: #fff; }
.post-card { display: block; background: #fff; border-radius: 8px; overflow: hidden; color: var(--ink); box-shadow: 0 2px 10px rgba(0,0,0,.05); height: 100%; }
.post-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.post-card:hover { color: var(--brand); }
.table { font-size: .93rem; }

.site-footer { background: #fff; border-top: 1px solid var(--line); padding: 20px 0; font-size: .92rem; color: #666; margin-top: 30px; }
.fav-form { float: right; margin: -4px -6px 0 8px; }
.fav-btn { border: 0; background: transparent; color: #b9bdc4; font-size: 1.15rem; padding: 2px 6px; }
.fav-btn.on, .fav-btn:hover { color: #e0245e; }
.rank-no { width: 30px; height: 30px; border-radius: 50%; background: #eee; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.rank-1 { background: #f5c518; } .rank-2 { background: #c9ced6; } .rank-3 { background: #e0a46b; }
pre.code { background: #1f2430; color: #e6e6e6; border-radius: 6px; padding: 14px 16px; font-size: .85rem; white-space: pre-wrap; word-break: break-all; }
.tool-card { display: flex; align-items: center; gap: 16px; padding: 20px 24px; border-radius: 8px; color: #fff; min-height: 96px; box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.tool-card:hover { color: #fff; filter: brightness(1.08); }
.tool-card b { display: block; font-size: 1.12rem; }
.tool-card small { opacity: .8; }
.tc-icon { width: 60px; height: 60px; border-radius: 12px; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; flex-shrink: 0; }
.tc1 { background: linear-gradient(120deg, #18a058, #0f7d8c); } .tc1 .tc-icon { color: #18a058; }
.tc2 { background: linear-gradient(120deg, #3b8beb, #1d3f9e); } .tc2 .tc-icon { color: #3b8beb; }
.tc3 { background: linear-gradient(120deg, #a55cf0, #6b46d8); } .tc3 .tc-icon { color: #a55cf0; }
.tc4 { background: linear-gradient(120deg, #e07b18, #8ea51c); } .tc4 .tc-icon { color: #e07b18; }
@media (max-width: 575.98px) { .tool-card { padding: 14px; gap: 10px; } .tc-icon { width: 44px; height: 44px; font-size: 1.3rem; } .tool-card b { font-size: .98rem; } }
/* Dien thoai: the chuyen muc nho gon, nhieu the 1 hang, thu gon con 4 hang */
@media (max-width: 767.98px) {
  .cat-buttons { gap: 6px; }
  .cat-btn { padding: 7px 10px; font-size: .8rem; gap: 5px; border-radius: 4px; }
  .cat-btn img { width: 16px; height: 16px; }
  .cat-buttons.collapsed { max-height: 152px; overflow: hidden; }
  .cat-more { display: block; width: 100%; margin: -16px 0 16px; padding: 7px; border: 0; border-radius: 0 0 6px 6px; background: #e9ecef; color: #36506b; font-weight: 600; font-size: .85rem; }
}
@media (min-width: 768px) { .cat-more { display: none !important; } }
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; display: flex; box-shadow: 0 -2px 10px rgba(0,0,0,.1); z-index: 40; }
.tabbar a { flex: 1; text-align: center; color: #444; font-size: .72rem; padding: 6px 0 8px; text-transform: uppercase; }
.tabbar a i { display: block; font-size: 1.25rem; }
@media (max-width: 991.98px) { body { padding-bottom: 62px; } }
.topline .dropdown-menu { font-size: .9rem; }
.topline .dropdown-menu a { color: #333; }
.p-old{font-size:.8em;color:#9aa1ad;font-weight:500;margin-right:2px}
.badge-sale{display:inline-block;background:#fff1f0;color:#d4380d;border:1px solid #ffccc7;border-radius:4px;padding:1px 7px;font-size:12px;font-weight:600}
.flag{display:inline-block;font-size:11px;font-weight:700;background:#eef2ff;color:#3730a3;border-radius:3px;padding:0 5px;vertical-align:middle}
.mega-title img{width:18px;height:18px;object-fit:contain;margin-right:6px;vertical-align:-3px}

/* Google Dich: an thanh banner va khung goi y cua Google */
.goog-te-banner-frame, body > .skiptranslate, iframe.skiptranslate, #goog-gt-tt, .goog-te-balloon-frame, .VIpgJd-ZVi9od-ORHb-OEVmcd, .VIpgJd-ZVi9od-aZ2wEe-wOHMyf { display: none !important; }
body { top: 0 !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }
