/* Header theo Figma (node 1:196). Container 1230px = 1200 nội dung + 15px mỗi bên; nền full 100%. */
.tq-container { width: 100%; max-width: 1230px; margin: 0 auto; padding-left: 15px; padding-right: 15px }

.tq-header { font-family: var(--tq-font); position: relative; z-index: 120; background: #fff }
.tq-header ul { list-style: none; margin: 0; padding: 0 }
.tq-header a { text-decoration: none }
.tq-header img { max-width: none }

.tq-header__banner { height: 60px; background: #fff; text-align: center; overflow: hidden }
.tq-header__banner .scale-img { display: inline-block; vertical-align: top }
.tq-header__banner img { display: block; margin: 0 auto }
.tq-header__banner img { height: 60px; width: auto; max-width: 100% }

.tq-header__bar { background: var(--color-primary); padding: 20px 0 }
.tq-header__row { position: relative; display: flex; align-items: center; gap: 20px }
.tq-header__logo { flex: 0 0 auto; margin-right: 26px; display: block }
.tq-header__logo img { display: block; width: 149px; height: auto }

.tq-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 46px; padding: 0 16px; border: 0; border-radius: 10px; background: #fff; color: #000; font: 500 18px/1 var(--tq-font); white-space: nowrap; cursor: pointer; transition: background .2s, box-shadow .2s }
.tq-btn:hover { background: #fff; color: #000; box-shadow: 0 4px 12px rgba(0, 0, 0, .15) }
.tq-header__book { flex: 0 0 180px; font-size: 16px; font-weight: 600; padding: 0 }

/* Danh mục */
.tq-cat__btn { border-radius: 8px; padding: 0 14px; gap: 20px; font-size: 16px }
.tq-cat__btn span { background: linear-gradient(180deg, #FF0014, #C20000); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent }
.tq-cat__chev { transform: rotate(90deg); margin-left: -10px }

/* Tìm kiếm */
.tq-search { position: relative; flex: 1 1 285px; min-width: 180px; height: 46px; display: flex; align-items: center; gap: 20px; padding: 0 14px; background: #fff; border-radius: 8px }
.tq-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 500 16px/1 var(--tq-font); color: var(--tq-text) }
.tq-search input::placeholder { color: #A2A2A2 }
.tq-search #search-result { right: auto; left: 0; z-index: 130 }

/* Cam kết */
.tq-header__commit { background: var(--tq-cream) }
.tq-header__commit-row { display: flex; align-items: center; gap: 20px; height: 40px }
.tq-header__commit-row strong { color: var(--tq-orange); font: 600 18px/1 var(--tq-font) }
.tq-header__commit-row span { display: inline-flex; align-items: center; gap: 10px; font: 500 14px/18px var(--tq-font); color: #000; white-space: nowrap }
/* Dải cam kết chạy ngang liên tục (rê chuột thì dừng); người chọn giảm chuyển động thì cuộn tay */
.tq-header__marquee { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent) }
.tq-header__track { display: flex; align-items: center; width: max-content; animation: tq-commit-run var(--commit-dur, 35s) linear infinite }
.tq-header__track > * { flex: none; margin-right: 20px }
.tq-header__marquee:hover .tq-header__track { animation-play-state: paused }
@keyframes tq-commit-run { to { transform: translateX(-50%) } }
@media (prefers-reduced-motion: reduce) { .tq-header__marquee { overflow-x: auto; scrollbar-width: none } .tq-header__track { animation: none } }

/* Mega menu */
.tq-mega { display: none; position: absolute; left: 15px; top: calc(100% + 20px); width: 1200px; max-width: calc(100% - 30px); height: 440px; background: #fff; border-radius: 0 0 12px 12px; box-shadow: 0 16px 32px rgba(0, 0, 0, .18); z-index: 200 }
.tq-mega::before { content: ""; position: absolute; left: 0; top: -30px; width: 320px; height: 30px }
.tq-cat:hover .tq-mega, .tq-cat.is-open .tq-mega { display: flex }
.tq-cat:hover .tq-cat__btn, .tq-cat.is-open .tq-cat__btn { box-shadow: 0 4px 12px rgba(0, 0, 0, .15) }
.tq-mega__nav { flex: 0 0 260px; border-radius: 0 0 0 12px; padding: 10px 0; background: var(--tq-gray); border-right: 1px solid #eee; overflow-y: auto }
.tq-mega__group { padding: 12px 20px 6px }
.tq-mega__group a { color: var(--tq-muted); font: 700 12px/1 var(--tq-font); text-transform: uppercase; letter-spacing: .06em }
.tq-mega__group a:hover { color: #C20000 }
.tq-mega__tab a { display: flex; align-items: center; justify-content: space-between; padding: 10px 20px; border-left: 3px solid transparent; color: var(--tq-text); font: 500 15px/20px var(--tq-font) }
.tq-mega__tab a > img { flex: 0 0 6px; width: 6px; height: 11px }
.tq-mega__tab a span { display: inline-flex; align-items: center; gap: 10px }
.tq-mega__icon { width: 22px; height: 22px; object-fit: contain }
.tq-mega__tab.is-active a, .tq-mega__tab a:hover { background: #fff; border-left-color: var(--color-primary); color: #C20000; font-weight: 600 }
.tq-mega__panels { flex: 1; border-radius: 0 0 12px 0; min-width: 0; overflow-y: auto; padding: 22px 28px }
.tq-mega__panel { display: none }
.tq-mega__panel.is-active { display: block }
.tq-mega__all { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 2px solid var(--color-primary); color: var(--tq-text); font: 700 20px/1.2 var(--tq-font) }
.tq-mega__all span { color: #1CB25B; font: 500 14px/1 var(--tq-font) }
.tq-mega__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px 28px; align-items: start }
.tq-mega__cat { display: block; margin-bottom: 8px; padding: 6px 10px; background: var(--tq-cream); border-radius: 6px; color: var(--tq-text); font: 600 15px/20px var(--tq-font) }
.tq-mega__cat:hover { background: var(--color-primary); color: #000 }
.tq-mega__col li a { display: block; padding: 4px 10px; color: #4a4a4a; font: 400 14px/20px var(--tq-font) }
.tq-mega__col li a:hover { color: #C20000; padding-left: 14px }
.tq-mega__col li a { transition: padding .15s, color .15s }
.tq-mega__col .tq-mega__more { color: #1CB25B; font-weight: 500 }

@media (max-width: 1399px) {
    .tq-header__row { gap: 14px }
    .tq-header__logo { margin-right: 6px }
    .tq-header__book { flex-basis: 150px }
    .tq-btn { font-size: 16px }
}
@media (max-width: 1199px) {
    .tq-header__act span { display: none }
    .tq-mega { left: 15px; right: 15px; width: auto }
    .tq-mega__cols { grid-template-columns: repeat(2, 1fr) }
}

/* Cuộn xuống: banner đầu trang trượt khỏi màn hình, chỉ còn thanh menu + cam kết dính trên cùng */
@media (min-width: 992px) {
    body, body.mm-wrapper { overflow-x: clip } /* hidden biến body thành scroll container → sticky không dính */
    #Header { position: sticky; top: 0; z-index: 999 }
    #Header:has(.tq-header__banner) { top: -60px }
}

/* Hover: nút Liên hệ đặt lịch / Cửa hàng / Giỏ hàng + ô tìm kiếm */
.tq-header__book, .tq-header__act { transition: transform .2s, box-shadow .2s, color .2s }
.tq-header__book:hover, .tq-header__act:hover { transform: translateY(-2px); color: #EC0000; box-shadow: 0 6px 14px rgba(0, 0, 0, .2) }
.tq-header__act img { transition: transform .25s }
.tq-header__act:hover img { transform: scale(1.15) rotate(-8deg) }
.tq-search { transition: box-shadow .2s }
.tq-search:hover, .tq-search:focus-within { box-shadow: 0 4px 12px rgba(0, 0, 0, .15) }
.tq-search__icon { cursor: pointer; transition: transform .25s }
.tq-search:hover .tq-search__icon, .tq-search:focus-within .tq-search__icon { transform: scale(1.2) rotate(-12deg) }

/* Số lượng giỏ hàng (header + nút nổi) */
.tq-badge { position: absolute; top: -8px; right: -8px; z-index: 2; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #EC0000; color: #fff; font: 700 12px/20px var(--tq-font); text-align: center; pointer-events: none }
.tq-header__cart { position: relative }
.tq-fcart__icon { filter: brightness(0) invert(1) }

/* Hàng nút header đúng Figma (Danh mục 161 / tìm kiếm 285 co giãn / đặt lịch 180 / cửa hàng 149 / giỏ hàng 144, cao 46, gap 20) */
.tq-header__row > .tq-cat { display: flex; flex: 0 0 161px; height: 46px }
.tq-header__row > .tq-cat .tq-cat__btn { width: 100%; height: 46px }
.tq-header__row { align-items: center }
.tq-header__logo { margin-right: 26px }
.tq-header__act:not(.tq-header__cart) { flex: 0 0 149px }
.tq-header__cart { flex: 0 0 144px }
@media (max-width: 1399px) { .tq-header__logo { margin-right: 6px } }
@media (min-width: 1400px) { .tq-search { max-width: 285px } }

/* ===== Header mobile (< 992px) theo Figma node 83:2012: banner 50 / khối vàng (menu, logo, giỏ hàng + ô tìm kiếm) / dải cam kết 40 ===== */
.tq-mhead { flex: 1 1 100%; width: 100%; font-family: var(--tq-font) }
.tq-mhead__banner { height: 50px; background: #fff; overflow: hidden }
.tq-mhead__banner a { display: block }
.tq-mhead__banner img { display: block; width: 100%; height: 50px; object-fit: cover }
.tq-mhead__main { padding: 10px 16px; background: var(--color-primary) }
.tq-mhead__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 19px }
.tq-mhead__logo { display: block }
.tq-mhead__logo img { display: block; width: 116px; height: auto }
.tq-mhead .tq-mhead__btn { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 36px; width: 36px; height: 32px; padding: 0; border: 0; border-radius: 6px; background: #fff; cursor: pointer }
.tq-mhead .tq-mhead__btn img { display: block }
.tq-mhead .tq-badge { top: -6px; right: -6px }
.tq-mhead #hamburger { width: 36px; height: 32px; border-radius: 6px; background: #fff url("../images/header/icon-menu-mobile.svg") no-repeat center / 17.5px 14px }
.tq-mhead #hamburger span, .tq-mhead #hamburger:before, .tq-mhead #hamburger:after { display: none }
.tq-mhead__search { display: flex; align-items: center; gap: 20px; height: 40px; padding: 0 14px; border-radius: 8px; background: #fff }
.tq-mhead__search img { flex: 0 0 17px; width: 17px; height: 17px }
.tq-mhead__search input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; font: 500 16px/1 var(--tq-font); color: var(--tq-text) }
.tq-mhead__search input::placeholder { color: #A2A2A2 }
.tq-mhead__commit { display: flex; align-items: center; height: 40px; background: var(--tq-cream) }
.tq-mhead__commit .tq-header__marquee { height: 100% }
.tq-mhead__commit .tq-header__track { height: 100% }
.tq-mhead__commit .tq-header__track > * { margin-right: 14px }
.tq-mhead__commit span { display: inline-flex; align-items: center; gap: 8px; font: 500 12px/14px var(--tq-font); color: #000; white-space: nowrap }
@media (max-width: 991.98px) {
    #Header { position: sticky; top: 0; z-index: 999 }
    #Header:has(.tq-mhead__banner) { top: -50px } /* cuộn xuống: banner 50px trượt khỏi màn hình, chỉ dính phần còn lại */
    #Header .tq-mhead__search input#keyword-mb { display: block; position: static; text-indent: 0 }
}

/* ===== Menu mobile: tấm toàn màn hình (tìm kiếm / cột danh mục cấp 1 / lưới danh mục cấp 2) ===== */
body.tq-mnav-open { overflow: hidden }
.tq-mnav { position: fixed; inset: 0; z-index: 100000; display: flex; flex-direction: column; background: #fff; font-family: var(--tq-font) }
.tq-mnav[hidden] { display: none }
.tq-mnav__top { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--color-primary) }
.tq-mnav__search { flex: 1; display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 14px; border-radius: 8px; background: #fff }
.tq-mnav__search img { flex: 0 0 20px; width: 20px; height: 20px }
.tq-mnav__search input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; font: 500 16px/1 var(--tq-font); color: var(--tq-text) }
.tq-mnav__search input::placeholder { color: #A2A2A2 }
.tq-mnav__close { position: relative; flex: 0 0 32px; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: #fff; cursor: pointer }
.tq-mnav__close span, .tq-mnav__close::before { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 2px; margin: -1px 0 0 -7px; border-radius: 2px; background: #2C2C2C; transform: rotate(45deg) }
.tq-mnav__close span { transform: rotate(-45deg) }
.tq-mnav__body { flex: 1; display: flex; min-height: 0 }
.tq-mnav__side, .tq-mnav__panels { scrollbar-width: none }
.tq-mnav__side::-webkit-scrollbar, .tq-mnav__panels::-webkit-scrollbar { display: none }
.tq-mnav__side { flex: 0 0 84px; margin: 0; padding: 8px 6px 24px; list-style: none; overflow-y: auto; background: #fff; border-right: 1px solid #eee }
.tq-mnav__group { padding: 12px 2px 4px; color: var(--tq-muted); font: 700 10px/1 var(--tq-font); text-transform: uppercase; letter-spacing: .06em; text-align: center }
.tq-mnav__tab { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; padding: 8px 2px; border: 0; border-radius: 8px; background: transparent; color: var(--tq-text); font: 500 11px/14px var(--tq-font); text-align: center; cursor: pointer }
.tq-mnav__tab img { width: 24px; height: 24px; object-fit: contain }
.tq-mnav__dot { width: 24px; height: 24px; border-radius: 50%; background: #eee }
.tq-mnav__tab:focus { outline: 0 }
.tq-mnav__tab:focus-visible { outline: 2px solid var(--color-primary); outline-offset: -2px }
.tq-mnav__tab.is-active { background: var(--tq-cream); color: #C20000; font-weight: 600 }
.tq-mnav__link { display: block; padding: 8px 2px; border-radius: 8px; color: var(--tq-text); font: 500 12px/16px var(--tq-font); text-align: center; text-decoration: none }
.tq-mnav__link.is-active { background: var(--tq-cream); color: #C20000; font-weight: 600 }
.tq-mnav__panels { flex: 1; min-width: 0; overflow-y: auto; padding: 12px 12px 24px }
.tq-mnav__panel { display: none }
.tq-mnav__panel.is-active { display: block }
.tq-mnav__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 12px }
.tq-mnav__head strong { color: var(--tq-text); font: 700 16px/20px var(--tq-font) }
.tq-mnav__head a { flex: 0 0 auto; color: #1CB25B; font: 500 13px/16px var(--tq-font); text-decoration: none }
.tq-mnav__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px }
.tq-mnav__card { display: flex; flex-direction: column; min-width: 0; border: 1px solid #eee; border-radius: 8px; overflow: hidden; background: #fff; color: var(--tq-text); text-decoration: none }
.tq-mnav__img { display: block; aspect-ratio: 1; background: #F0F1F2 }
.tq-mnav__img img { display: block; width: 100%; height: 100%; object-fit: cover }
.tq-mnav__name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: 32px; padding-top: 1px; margin: 4px 3px 6px; font: 500 11px/15px var(--tq-font); text-align: center }
@media (min-width: 576px) { .tq-mnav__name { height: 36px; margin: 5px 4px 7px; font-size: 12px; line-height: 17px } }
@media (min-width: 576px) { .tq-mnav__side { flex-basis: 110px } .tq-mnav__grid { gap: 8px } }
/* Cấp 3: tiêu đề danh mục cấp 2 + chip link, giống mega menu desktop (nhãn đậm, link xám nhạt, hover vàng) */
.tq-mnav__sub { margin-top: 20px }
.tq-mnav__sub-title { display: block; margin-bottom: 8px; color: var(--tq-text); font: 700 14px/20px var(--tq-font); text-decoration: none }
.tq-mnav__chips { display: flex; flex-wrap: wrap; gap: 5px }
.tq-mnav__chips a { padding: 5px 8px; border-radius: 6px; background: var(--tq-gray); color: #4a4a4a; font: 500 12px/16px var(--tq-font); text-decoration: none }
.tq-mnav__chips a:hover, .tq-mnav__chips a:active { background: var(--color-primary); color: #000 }
