/* ==========================================================================
   Kavahome.vn — Stylesheet trang chủ
   Màu lấy từ logo: navy #084C73 · cam #A34D04
   Quy tắc 80/15/5: 80% nền sáng · 15% navy · 5% cam (chỉ giá + nút mua)
   ========================================================================== */

/* ---------- 1. TOKEN ---------- */
:root {
  --navy-900: #063A58;
  --navy-700: #084C73;   /* màu logo */
  --navy-500: #0B5E8C;
  --navy-100: #E7EFF5;

  --clay-700: #A34D04;   /* màu logo — nút, giá, link */
  --clay-600: #C8300C;   /* nhãn giảm giá */
  --clay-400: #E8873A;   /* chỉ dùng TRÊN nền navy */
  --clay-100: #FBEEE1;

  --ink:      #12212E;
  --muted:    #63798C;
  --faint:    #8A9AA8;
  --line:     #E2E8EE;
  --line-2:   #EDF1F5;
  --tile:     #F2F5F8;
  --bg:       #F4F7F9;
  --white:    #FFFFFF;

  --ok-bg: #E4F2EA;  --ok-fg: #1C6B45;

  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 10px;
  --r-xl: 12px;

  --wrap: 1320px;
  --gap: 16px;

  --shadow-menu: 0 14px 34px rgba(6, 58, 88, .22);
  --shadow-card: 0 2px 8px rgba(8, 76, 115, .06);

  --font: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ---------- 2. RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--clay-700); text-decoration: none; }
a:hover { color: #7C3A03; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button, input { font-family: inherit; font-size: inherit; }

:focus-visible {
  outline: 3px solid var(--clay-400);
  outline-offset: 2px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 16px;
}

.icon { width: 24px; height: 24px; flex-shrink: 0; }

/* ---------- 3. TOPBAR ---------- */
.topbar {
  background: var(--navy-900);
  color: #BBD5E6;
  font-size: 12px;
}
.topbar__in {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 36px; gap: 16px;
}
.topbar__loc { display: flex; align-items: center; gap: 7px; }
.topbar__loc .icon { width: 14px; height: 14px; color: var(--clay-400); }
.topbar__links { display: flex; gap: 20px; }
.topbar__links a { color: #BBD5E6; }
.topbar__links a:hover { color: var(--white); }
.topbar__links a.is-accent { color: var(--clay-400); font-weight: 700; }

/* ---------- 4. HEADER ---------- */
.header { background: var(--navy-700); }
.header__in {
  display: flex; align-items: center; gap: 26px;
  min-height: 88px;
}

.logo { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.logo__mark { width: 46px; height: 46px; }
.logo__text { display: flex; flex-direction: column; gap: 4px; }
.logo__name {
  font-size: 21px; font-weight: 800; letter-spacing: .1em;
  color: var(--white); line-height: 1; white-space: nowrap;
}
.logo__tag {
  font-size: 8.5px; font-weight: 700; letter-spacing: .2em;
  color: var(--clay-400); line-height: 1; white-space: nowrap;
}

.searchzone { flex: 1 1 auto; display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.search {
  display: flex; align-items: center;
  height: 42px; background: var(--white);
  border-radius: var(--r-md); overflow: hidden; padding-left: 14px;
}
.search .icon { width: 17px; height: 17px; color: var(--muted); }
.search input {
  flex: 1 1 auto; min-width: 0;
  border: 0; outline: 0; background: transparent;
  padding: 0 12px; font-size: 14px; color: var(--ink);
}
.search button {
  height: 42px; padding: 0 24px; border: 0; cursor: pointer;
  background: var(--clay-700); color: var(--white);
  font-size: 14px; font-weight: 700;
}
.search button:hover { background: #8C4203; }

.hotkeys { display: flex; align-items: center; gap: 12px; font-size: 11.5px; color: #9FC3DA; flex-wrap: wrap; }
.hotkeys a { color: #DCEAF3; }
.hotkeys a:hover { color: var(--white); }

.hactions { display: flex; align-items: center; gap: 22px; flex-shrink: 0; }
.haction { display: flex; align-items: center; gap: 9px; }
.haction .icon { color: var(--white); }
.haction--phone .icon { color: var(--clay-400); }
.haction__txt { display: flex; flex-direction: column; gap: 2px; }
.haction__sm { font-size: 10.5px; color: #9FC3DA; }
.haction__lg { font-size: 15px; font-weight: 800; color: var(--white); white-space: nowrap; }
.haction__md { font-size: 13px; font-weight: 700; color: var(--white); }

.cart {
  position: relative; background: var(--navy-500);
  border-radius: var(--r-md); padding: 8px 14px;
}
.cart:hover { background: #0d6ea3; }
.cart__badge {
  position: absolute; top: -6px; right: -6px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--clay-400); color: var(--ink);
  font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

.burger { display: none; }

/* ---------- 5. THANH DANH MỤC + MEGA MENU ---------- */
.navbar {
  background: var(--navy-500);
  box-shadow: 0 2px 8px rgba(8, 76, 115, .18);
  position: relative; z-index: 40;
}
.navbar__in { display: flex; align-items: stretch; min-height: 48px; }

.allcats { position: relative; }
.allcats__btn {
  width: 262px; height: 48px; border: 0; cursor: pointer;
  background: var(--clay-700); color: var(--white);
  display: flex; align-items: center; gap: 10px; padding: 0 16px;
  font-size: 13.5px; font-weight: 800;
}
.allcats__btn .icon { width: 18px; height: 18px; }

.navlinks {
  flex: 1 1 auto; display: flex; align-items: center; gap: 2px;
  padding-left: 16px; overflow-x: auto; scrollbar-width: none;
}
.navlinks::-webkit-scrollbar { display: none; }
.navlinks a {
  font-size: 13px; font-weight: 600; color: var(--white);
  padding: 7px 11px; border-radius: var(--r-sm); white-space: nowrap;
}
.navlinks a:hover { background: rgba(255,255,255,.14); color: var(--white); }
.navlinks a.is-promo {
  background: var(--clay-400); color: var(--ink); font-weight: 800; margin-left: 6px;
}

/* panel mega */
.mega {
  position: absolute; top: 100%; left: 0;
  width: var(--wrap); max-width: calc(100vw - 32px);
  display: grid; grid-template-columns: 262px minmax(0, 1fr);
  background: var(--white);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  box-shadow: var(--shadow-menu);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
  z-index: 50;
}
.allcats:hover .mega,
.allcats:focus-within .mega { opacity: 1; visibility: visible; transform: none; }

.mega__side { padding: 8px 6px; border-right: 1px solid var(--line-2); }
.mega__side a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: 7px; color: var(--ink);
}
.mega__side a:hover { background: var(--navy-100); color: var(--navy-700); }
.mega__side .icon { width: 21px; height: 21px; color: var(--navy-500); }
.mega__side span { flex: 1 1 auto; font-size: 13px; font-weight: 500; }
.mega__side .chev { width: 13px; height: 13px; color: #9AACBB; }

.mega__panel {
  padding: 22px 26px 24px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 264px; gap: 26px;
}
.mega__col h3 {
  font-size: 12.5px; font-weight: 800; color: var(--navy-700);
  letter-spacing: .04em; border-bottom: 2px solid var(--navy-100);
  padding-bottom: 9px; margin-bottom: 11px;
}
.mega__col li + li { margin-top: 9px; }
.mega__col a { display: flex; align-items: center; gap: 9px; color: var(--ink); font-size: 13px; font-weight: 500; }
.mega__col a:hover { color: var(--clay-700); }
.mega__col .icon { width: 18px; height: 18px; color: #9AACBB; }

.mega__promo {
  background: var(--navy-700); border-radius: var(--r-lg);
  padding: 20px; display: flex; flex-direction: column; gap: 12px;
}
.mega__promo .eyebrow { font-size: 10.5px; font-weight: 800; letter-spacing: .12em; color: var(--clay-400); }
.mega__promo h3 { font-size: 19px; font-weight: 800; color: var(--white); line-height: 1.25; }
.mega__promo p { font-size: 12.5px; color: #BBD5E6; line-height: 1.6; }
.mega__promo .btn { margin-top: auto; }

/* ---------- 6. NÚT ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 22px; border: 0; cursor: pointer;
  border-radius: var(--r-md); font-size: 14px; font-weight: 700;
  text-align: center;
}
.btn--primary { background: var(--clay-700); color: var(--white); }
.btn--primary:hover { background: #8C4203; color: var(--white); }
.btn--navy { background: var(--navy-700); color: var(--white); }
.btn--navy:hover { background: var(--navy-500); color: var(--white); }
.btn--amber { background: var(--clay-400); color: var(--ink); font-weight: 800; }
.btn--amber:hover { background: #d9771f; color: var(--ink); }
.btn--ghost {
  background: var(--white); color: var(--navy-700);
  border: 1.5px solid var(--navy-700);
}
.btn--ghost:hover { background: var(--navy-100); color: var(--navy-700); }
.btn--line {
  background: transparent; color: var(--white);
  border: 1px solid rgba(255,255,255,.55); min-height: 38px;
  font-size: 13px; padding: 0 16px;
}
.btn--line:hover { background: rgba(255,255,255,.12); color: var(--white); }
.btn--sm { min-height: 36px; font-size: 12.5px; padding: 0 14px; }
.btn[disabled] { background: var(--line-2); color: var(--faint); cursor: not-allowed; }

/* ---------- 7. HERO ---------- */
.hero { padding: 20px 0 24px; }
.hero__grid {
  display: grid; grid-template-columns: 262px minmax(0, 1fr) 284px;
  gap: var(--gap); align-items: stretch;
}

.sidecats {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 6px;
}
.sidecats a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 7px; color: var(--ink);
}
.sidecats a:hover { background: var(--navy-100); color: var(--navy-700); }
.sidecats .icon { width: 21px; height: 21px; color: var(--navy-500); }
.sidecats span { flex: 1 1 auto; font-size: 13px; font-weight: 500; }
.sidecats .chev { width: 13px; height: 13px; color: #9AACBB; }
.sidecats__all {
  margin-top: auto; border-top: 1px solid var(--line-2);
  font-size: 12.5px; font-weight: 700; color: var(--clay-700) !important;
}
.sidecats { display: flex; flex-direction: column; }

.slide {
  position: relative; display: flex; overflow: hidden;
  background: var(--navy-700); border-radius: var(--r-xl);
  min-height: 404px;
}
.slide__body {
  flex: 1 1 auto; padding: 44px 48px;
  display: flex; flex-direction: column; justify-content: center; gap: 16px;
}
.slide__tag {
  align-self: flex-start; background: var(--clay-400); color: var(--ink);
  font-size: 11.5px; font-weight: 800; letter-spacing: .1em;
  padding: 5px 11px; border-radius: 5px;
}
.slide__title {
  font-size: 40px; font-weight: 900; color: var(--white);
  line-height: 1.12; letter-spacing: -.015em;
}
.slide__sub { font-size: 15px; color: #BBD5E6; }
.slide__cta { display: flex; align-items: center; gap: 18px; margin-top: 6px; flex-wrap: wrap; }
.slide__from { display: flex; flex-direction: column; gap: 3px; }
.slide__from small { font-size: 11.5px; color: #9FC3DA; }
.slide__from b { font-size: 22px; font-weight: 900; color: var(--clay-400); line-height: 1; }
.slide__art {
  width: 300px; flex-shrink: 0; background: var(--navy-500);
  display: flex; align-items: center; justify-content: center;
}
.slide__art .icon { width: 180px; height: 180px; }
.slide__dots { position: absolute; left: 48px; bottom: 22px; display: flex; gap: 7px; }
.slide__dots i { width: 9px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.4); }
.slide__dots i.is-on { width: 26px; background: var(--clay-400); }

.sidebanners { display: flex; flex-direction: column; gap: var(--gap); }
.sbanner {
  flex: 1 1 0; border-radius: var(--r-lg); padding: 18px 20px;
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
  background: var(--white); border: 1px solid var(--line); color: var(--ink);
}
.sbanner .eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--clay-700); }
.sbanner b { font-size: 19px; font-weight: 800; line-height: 1.25; }
.sbanner small { font-size: 12.5px; color: var(--muted); }
.sbanner--clay { background: var(--clay-700); border-color: var(--clay-700); color: var(--white); }
.sbanner--clay .eyebrow, .sbanner--clay small { color: #F7DCC4; }

.minibanners {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap); margin-top: var(--gap);
}
.mbanner {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px 20px; display: flex; align-items: center; gap: 14px; color: var(--ink);
}
.mbanner:hover { border-color: var(--navy-500); color: var(--ink); }
.mbanner__ic {
  width: 48px; height: 48px; flex-shrink: 0; border-radius: var(--r-lg);
  background: var(--navy-100); display: flex; align-items: center; justify-content: center;
}
.mbanner__ic .icon { width: 26px; height: 26px; color: var(--navy-700); }
.mbanner b { font-size: 14.5px; font-weight: 800; display: block; }
.mbanner small { font-size: 12px; color: var(--muted); }

/* ---------- 8. USP ---------- */
.usp { background: var(--white); border-block: 1px solid var(--line); }
.usp__in { display: flex; min-height: 92px; align-items: center; }
.usp__item {
  flex: 1 1 0; display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-right: 1px solid var(--line-2);
}
.usp__item:last-child { border-right: 0; }
.usp__item .icon { width: 28px; height: 28px; color: var(--clay-700); }
.usp__item b { font-size: 13px; font-weight: 800; display: block; }
.usp__item small { font-size: 11.5px; color: var(--muted); }

/* ---------- 9. TIÊU ĐỀ KHỐI ---------- */
.sec { padding-top: 28px; }
.sec__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 16px; flex-wrap: wrap;
}
.sec__head h2 { font-size: 21px; font-weight: 800; color: var(--ink); }
.sec__more { font-size: 13px; font-weight: 600; white-space: nowrap; }

/* ---------- 10. DANH MỤC TRÒN ---------- */
.catgrid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 12px; }
.catgrid a {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 14px 8px; display: flex; flex-direction: column; align-items: center;
  gap: 10px; text-align: center; color: var(--ink);
}
.catgrid a:hover { border-color: var(--navy-500); box-shadow: var(--shadow-card); color: var(--ink); }
.catgrid__ic {
  width: 52px; height: 52px; border-radius: 50%; background: var(--navy-100);
  display: flex; align-items: center; justify-content: center;
}
.catgrid__ic .icon { width: 28px; height: 28px; color: var(--navy-700); }
.catgrid span { font-size: 11.5px; font-weight: 600; line-height: 1.3; }

/* ---------- 11. DEAL ---------- */
.deal { background: var(--clay-700); border-radius: var(--r-xl); padding: 16px; }
.deal__head { display: flex; align-items: center; gap: 18px; padding: 0 4px 14px; flex-wrap: wrap; }
.deal__title { display: flex; align-items: center; gap: 9px; }
.deal__title .icon { width: 22px; height: 22px; color: #FFD9AE; }
.deal__title h2 { font-size: 21px; font-weight: 900; color: var(--white); }
.countdown { display: flex; align-items: center; gap: 7px; }
.countdown small { font-size: 12.5px; color: #F7DCC4; }
.countdown b {
  background: var(--ink); color: var(--white);
  font-size: 14px; font-weight: 800; padding: 5px 9px; border-radius: 5px;
}
.countdown i { color: var(--white); font-weight: 800; font-style: normal; }
.deal__head .btn { margin-left: auto; }
.deal__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }

.progress { height: 6px; border-radius: 4px; background: #F1DCC7; overflow: hidden; }
.progress i { display: block; height: 6px; background: var(--clay-400); }

/* ---------- 12. THẺ SẢN PHẨM ---------- */
.card {
  position: relative; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 10px; display: flex; flex-direction: column; gap: 7px;
}
.card:hover { border-color: var(--navy-500); box-shadow: var(--shadow-card); }
.deal .card { border: 0; }

.card__badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: var(--clay-600); color: var(--white);
  font-size: 10.5px; font-weight: 800; padding: 3px 7px; border-radius: 4px;
}
.card__badge--soft { background: var(--clay-100); color: var(--clay-700); }

/* Ô ảnh: thay <span class="card__ph"> bằng <img> khi có ảnh thật */
.card__thumb {
  height: 138px; background: var(--tile); border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.card__thumb img { width: 100%; height: 100%; object-fit: contain; }
.card__thumb .icon { width: 68px; height: 68px; color: var(--navy-500); }

.card__name {
  font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 36px;
}
.card__name:hover { color: var(--clay-700); }
.card__spec { font-size: 11.5px; color: var(--muted); }
.card__price { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.card__price b { font-size: 16.5px; font-weight: 900; color: var(--clay-700); }
.card__price del { font-size: 11.5px; color: var(--faint); }
.card__meta { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.stars { color: var(--clay-400); letter-spacing: .06em; }
.card .btn { margin-top: auto; }

/* ---------- 13. KHỐI NGÀNH HÀNG ---------- */
.block {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-xl); overflow: hidden;
}
.block__bar {
  background: var(--navy-700); padding: 14px 20px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.block__bar h2 { font-size: 19px; font-weight: 800; color: var(--white); }
.block__bar p { font-size: 12.5px; color: #9FC3DA; }
.block__bar .sec__more { margin-left: auto; color: var(--white); }

.block__bar--light { background: var(--white); border-bottom: 1px solid var(--line-2); }
.block__bar--light h2 { color: var(--ink); }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 20px 0; border-bottom: 1px solid var(--line-2); }
.tabs a {
  font-size: 12.5px; font-weight: 600; color: var(--ink);
  background: var(--tile); border-radius: 16px; padding: 7px 14px; margin-bottom: 12px;
}
.tabs a:hover { background: var(--navy-100); color: var(--navy-700); }
.tabs a.is-on { background: var(--navy-700); color: var(--white); font-weight: 700; }

.block__body { padding: 16px 20px 20px; }
.block__split { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: var(--gap); }

.promo {
  background: var(--navy-500); border-radius: var(--r-lg); padding: 24px 22px;
  display: flex; flex-direction: column; gap: 12px; color: var(--white);
}
.promo .eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .12em; color: var(--clay-400); }
.promo h3 { font-size: 24px; font-weight: 800; line-height: 1.2; }
.promo p { font-size: 13px; color: #BBD5E6; line-height: 1.55; }
.promo__art { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; min-height: 120px; }
.promo__art .icon { width: 118px; height: 118px; color: #9FC3DA; }

.pgrid { display: grid; gap: 12px; }
.pgrid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pgrid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

/* ---------- 14. 4 CỘT NGÀNH HÀNG ---------- */
.cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.col {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: 16px 16px 12px;
}
.col__head {
  display: flex; align-items: center; gap: 10px;
  border-bottom: 2px solid var(--navy-100); padding-bottom: 11px; margin-bottom: 12px;
}
.col__head .icon { width: 22px; height: 22px; color: var(--clay-700); }
.col__head h3 { flex: 1 1 auto; font-size: 15px; font-weight: 800; }
.col__head a { font-size: 11.5px; font-weight: 600; }
.col li + li { margin-top: 12px; }
.col li a { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.col li a:hover .col__n { color: var(--clay-700); }
.col__t {
  width: 52px; height: 52px; flex-shrink: 0; border-radius: var(--r-md);
  background: var(--tile); display: flex; align-items: center; justify-content: center;
}
.col__t .icon { width: 30px; height: 30px; color: #9AACBB; }
.col__n { font-size: 12.5px; font-weight: 500; line-height: 1.35; display: block; }
.col__p { font-size: 13.5px; font-weight: 800; color: var(--clay-700); }

/* ---------- 15. COMBO ---------- */
.combos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.combo {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: 20px 22px; display: flex; flex-direction: column; gap: 12px;
}
.combo__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.combo__tag { font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--clay-700); }
.combo__area {
  font-size: 11.5px; font-weight: 700; color: var(--navy-700);
  background: var(--navy-100); padding: 4px 9px; border-radius: 5px;
}
.combo h3 { font-size: 19px; font-weight: 800; }
.combo li { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: #3D5060; line-height: 1.45; }
.combo li + li { margin-top: 8px; }
.combo li .icon { width: 15px; height: 15px; margin-top: 2px; color: var(--clay-700); }
.combo__foot {
  border-top: 1px dashed var(--line); padding-top: 12px; margin-top: auto;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
}
.combo__foot small { font-size: 11.5px; color: var(--muted); display: block; }
.combo__foot b { font-size: 22px; font-weight: 900; color: var(--clay-700); line-height: 1.2; }

/* ---------- 16. KHÔNG GIAN ---------- */
.spaces { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.space {
  position: relative; overflow: hidden; min-height: 190px;
  background: var(--navy-700); border-radius: var(--r-xl); padding: 20px;
  display: flex; flex-direction: column; justify-content: space-between; color: var(--white);
}
.space:hover { background: var(--navy-500); color: var(--white); }
.space__art { position: absolute; right: -14px; bottom: -14px; opacity: .28; }
.space__art .icon { width: 118px; height: 118px; color: var(--white); }
.space .eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--clay-400); }
.space b { font-size: 20px; font-weight: 800; line-height: 1.2; display: block; }
.space small { font-size: 12.5px; color: #BBD5E6; }

/* ---------- 17. THƯƠNG HIỆU ---------- */
.brands {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: 20px;
}
.brands__grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 12px; }
.brands__grid div {
  height: 62px; border: 1px dashed #CFDAE3; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: var(--faint); font-size: 11.5px; font-weight: 700; text-align: center; padding: 0 6px;
}

/* ---------- 18. TIN TỨC ---------- */
.posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.post {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-xl);
  overflow: hidden; display: flex; flex-direction: column; color: var(--ink);
}
.post:hover { box-shadow: var(--shadow-card); color: var(--ink); }
.post__thumb {
  height: 148px; background: var(--navy-100);
  display: flex; align-items: center; justify-content: center;
}
.post__thumb .icon { width: 56px; height: 56px; color: #9FC3DA; }
.post__body { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.post .eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--clay-700); }
.post h3 { font-size: 15px; font-weight: 700; line-height: 1.4; }
.post p { font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* ---------- 19. SEO ---------- */
.seo {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: 22px 26px;
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 34px;
}
.seo h2 { font-size: 16px; font-weight: 800; }
.seo p { font-size: 13px; color: #3D5060; line-height: 1.7; }
.tagcloud { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.tagcloud a { font-size: 12px; color: #3D5060; background: var(--tile); border-radius: 14px; padding: 6px 12px; }
.tagcloud a:hover { background: var(--navy-100); color: var(--navy-700); }

/* ---------- 20. FOOTER ---------- */
.footer { background: var(--navy-700); color: #BBD5E6; }
.footer__in {
  padding: 36px 16px 28px;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 34px;
}
.footer h3 { font-size: 13.5px; font-weight: 800; color: var(--white); margin-bottom: 11px; }
.footer li + li { margin-top: 9px; }
.footer a { color: #BBD5E6; font-size: 12.5px; }
.footer a:hover { color: var(--white); }
.footer__about { display: flex; flex-direction: column; gap: 14px; }
.footer__about p { font-size: 12.5px; line-height: 1.75; }
.socials { display: flex; gap: 9px; }
.socials a {
  width: 38px; height: 38px; border-radius: var(--r-md); background: var(--navy-500);
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-size: 11px; font-weight: 800;
}
.socials a:hover { background: var(--clay-700); color: var(--white); }

.subscribe { display: flex; flex-direction: column; gap: 12px; }
.subscribe p { font-size: 12.5px; line-height: 1.6; }
.subscribe form { display: flex; height: 44px; background: var(--white); border-radius: var(--r-md); overflow: hidden; }
.subscribe input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; padding: 0 14px; font-size: 13px; color: var(--ink); }
.subscribe button { border: 0; cursor: pointer; background: var(--clay-700); color: var(--white); font-size: 13px; font-weight: 700; padding: 0 18px; }
.certs { display: flex; gap: 10px; flex-wrap: wrap; }
.certs div {
  height: 44px; width: 118px; border: 1px dashed rgba(255,255,255,.45);
  border-radius: 7px; display: flex; align-items: center; justify-content: center;
  font-size: 10.5px; text-align: center; line-height: 1.3;
}

.subfooter { background: var(--navy-900); color: #9FC3DA; font-size: 12px; }
.subfooter__in {
  min-height: 52px; display: flex; align-items: center;
  justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 10px;
}
.subfooter a { color: #9FC3DA; }
.subfooter nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- 21. NÚT LIÊN HỆ NỔI ---------- */
.floats {
  position: fixed; right: 16px; bottom: 24px; z-index: 60;
  display: flex; flex-direction: column; gap: 10px;
}
.floats a {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white); box-shadow: 0 6px 18px rgba(6,58,88,.28);
}
.floats .icon { width: 24px; height: 24px; }
.floats .f-phone { background: var(--clay-700); }
.floats .f-zalo { background: var(--navy-700); font-size: 13px; font-weight: 800; }

/* ---------- 22. THANH DƯỚI CHO MOBILE ---------- */
.tabbar { display: none; }

/* ==========================================================================
   23. RESPONSIVE
   ========================================================================== */

/* --- <= 1279px: thu gọn lưới --- */
@media (max-width: 1279px) {
  .hero__grid { grid-template-columns: 240px minmax(0, 1fr); }
  .sidebanners { grid-column: 1 / -1; flex-direction: row; }
  .sbanner { flex: 1 1 0; }
  .catgrid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .pgrid--5 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pgrid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .deal__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .deal__grid .card:nth-child(5) { display: none; }
  .mega { max-width: calc(100vw - 32px); }
  .mega__panel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mega__promo { display: none; }
}

/* --- <= 1023px: bỏ cột dọc, xếp lại --- */
@media (max-width: 1023px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .sidecats { display: none; }
  .slide { min-height: 320px; }
  .slide__body { padding: 32px; }
  .slide__title { font-size: 34px; }
  .slide__art { display: none; }
  .slide__dots { left: 32px; }
  .minibanners { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .usp__in { flex-wrap: wrap; }
  .usp__item { flex: 1 1 33%; border-right: 0; }
  .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .combos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .combo:nth-child(3) { grid-column: 1 / -1; }
  .spaces { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brands__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .posts { grid-template-columns: minmax(0, 1fr); }
  .footer__in { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
  .block__split { grid-template-columns: minmax(0, 1fr); }
  .promo { flex-direction: row; align-items: center; flex-wrap: wrap; }
  .promo__art { min-height: 0; }
  .promo__art .icon { width: 80px; height: 80px; }
  .promo h3 { flex: 1 1 200px; }
}

/* --- <= 767px: bản điện thoại --- */
@media (max-width: 767px) {
  body { padding-bottom: 62px; } /* chừa chỗ cho thanh tab dưới */

  .topbar { display: none; }

  .header__in { flex-wrap: wrap; gap: 12px; min-height: 0; padding-block: 12px; }
  .burger {
    display: flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border: 0; border-radius: var(--r-md);
    background: var(--navy-500); color: var(--white); cursor: pointer;
  }
  .burger .icon { width: 22px; height: 22px; }
  .logo__mark { width: 38px; height: 38px; }
  .logo__name { font-size: 17px; }
  .logo__tag { display: none; }
  /* ở cỡ nhỏ, 4 ô cửa sổ dính thành vệt — ẩn đi cho sạch nét */
  .logo__win { display: none; }
  .searchzone { order: 3; flex-basis: 100%; }
  .hotkeys { display: none; }
  .search { height: 44px; }
  .search button { padding: 0 16px; font-size: 0; }
  .search button::after { content: 'Tìm'; font-size: 14px; }
  .hactions { margin-left: auto; gap: 12px; }
  .haction--phone .haction__txt, .haction--user { display: none; }
  .cart { padding: 9px 12px; }
  .cart .haction__md { display: none; }

  .navbar { display: none; }

  .hero { padding: 14px 0 18px; }
  .slide { min-height: 260px; border-radius: var(--r-lg); }
  .slide__body { padding: 22px 20px; gap: 12px; }
  .slide__title { font-size: 25px; }
  .slide__sub { font-size: 13px; }
  .slide__dots { left: 20px; bottom: 14px; }
  .sidebanners { flex-direction: column; }
  .minibanners { grid-template-columns: minmax(0, 1fr); gap: 10px; }

  .usp__item { flex: 1 1 50%; padding: 12px 8px; }
  .usp__item .icon { width: 24px; height: 24px; }

  .sec { padding-top: 22px; }
  .sec__head h2 { font-size: 18px; }

  .catgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .catgrid a { padding: 10px 4px; }
  .catgrid__ic { width: 44px; height: 44px; }
  .catgrid span { font-size: 10.5px; }

  .deal { padding: 12px; }
  .deal__head { gap: 10px; }
  .deal__title h2 { font-size: 17px; }
  .deal__head .btn { margin-left: 0; }
  .deal__grid, .pgrid--4, .pgrid--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .deal__grid .card:nth-child(n+5) { display: none; }

  .card__thumb { height: 118px; }
  .card__thumb .icon { width: 56px; height: 56px; }

  .block__bar { padding: 12px 14px; }
  .block__bar h2 { font-size: 17px; }
  .block__bar p { display: none; }
  .tabs { padding: 10px 14px 0; }
  .block__body { padding: 12px 14px 16px; }
  .promo { padding: 18px; }
  .promo h3 { font-size: 20px; }

  .cols, .combos, .spaces { grid-template-columns: minmax(0, 1fr); }
  .combo:nth-child(3) { grid-column: auto; }
  .brands__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .seo { padding: 18px; }
  .footer__in { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .subfooter__in { flex-direction: column; align-items: flex-start; gap: 8px; }

  .floats { display: none; }

  /* thanh tab dưới cùng */
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    display: flex; background: var(--white);
    border-top: 1px solid var(--line);
    box-shadow: 0 -2px 12px rgba(6,58,88,.10);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a {
    flex: 1 1 0; min-height: 58px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 4px;
    color: var(--muted); font-size: 10.5px; font-weight: 600;
  }
  .tabbar .icon { width: 22px; height: 22px; }
  .tabbar a.is-on { color: var(--clay-700); }
  .tabbar a.is-call { color: var(--clay-700); }
}

/* --- <= 479px --- */
@media (max-width: 479px) {
  .catgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .brands__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slide__title { font-size: 22px; }
  .slide__cta { gap: 12px; }
  .slide__cta .btn { width: 100%; }
}

/* ---------- 24. IN ẤN ---------- */
@media print {
  .topbar, .navbar, .floats, .tabbar, .search, .deal, .subscribe { display: none !important; }
  body { background: #fff; padding: 0; }
}
