/* ==========================================================================
   HCK mobile header, off-canvas menu & full-screen search
   ========================================================================== */
:root {
	--hck-navy: #002d72;
	--hck-navy-2: #00398f;
	--hck-gold: #f7d322;
	--hck-ink: #12233d;
	--hck-muted: #5a6b85;
	--hck-line: #e8edf4;
}

/* ---------- Header bar (≤849px = Flatsome "medium") ---------- */
@media (max-width: 849px) {
	#masthead .header-inner { padding-left: 8px; padding-right: 8px; }
	/* Nền trắng đặc cả khi header dính (trang chủ dùng header trong suốt) */
	#header .header-main, #masthead, #masthead .header-bg-color { background-color: #fff !important; }
	#header.transparent .header-main { box-shadow: 0 1px 0 var(--hck-line); }
	/* 2 cột bên cân nhau để logo luôn ở giữa */
	#masthead .flex-col.show-for-medium.flex-left,
	#masthead .flex-col.show-for-medium.flex-right { flex: 0 0 96px; }
	#masthead .flex-col.show-for-medium.flex-right .mobile-nav { justify-content: flex-end; }
	#masthead .mobile-nav > li { margin: 0; }
	#masthead #logo img { max-height: 44px; width: auto; }

	#masthead .nav-icon > a,
	.hck-mh__btn {
		display: inline-flex; align-items: center; justify-content: center;
		width: 44px; height: 44px; padding: 0; margin: 0;
		border: 0; border-radius: 12px; background: transparent;
		color: var(--hck-navy) !important; cursor: pointer;
	}
	#masthead .nav-icon > a i { font-size: 22px; }
	.hck-mh__btn:active, #masthead .nav-icon > a:active { background: rgba(0, 45, 114, .08); }
	.hck-mh__call { background: var(--hck-gold); color: var(--hck-navy) !important; border-radius: 50%; width: 40px; height: 40px; margin-left: 4px; }

	/* Bóng đổ khi header dính */
	#header.stuck .header-main,
	.header-wrapper.stuck .header-main { box-shadow: 0 2px 14px rgba(0, 20, 60, .12); }
}
/* Ẩn phần tử mobile trên desktop */
@media (min-width: 850px) { .hck-mh__item { display: none !important; } }

/* ---------- Off-canvas menu ---------- */
.mobile-sidebar { background: #fff; }
.mobile-sidebar .sidebar-menu { padding: 0 0 24px; }
.mobile-sidebar .nav-sidebar { padding: 0; }

.hck-drawer__head {
	list-style: none; padding: 18px 16px 14px !important;
	border-bottom: 1px solid var(--hck-line); background: #f7f9fc;
}
.hck-drawer__logo { display: inline-block; margin-bottom: 12px; padding: 0 !important; }
.hck-drawer__logo-img { max-height: 46px; width: auto; display: block; }
.hck-drawer__search {
	display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; margin: 0;
	padding: 0 14px; border: 1px solid #d7deea; border-radius: 12px; background: #fff;
	color: var(--hck-muted); font-size: 15px; text-align: left; text-transform: none; letter-spacing: 0;
	cursor: pointer;
}
.hck-drawer__search svg { color: var(--hck-navy); flex: 0 0 auto; }
.hck-drawer__search span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }

/* Mục menu: chữ lớn, rõ, vùng chạm 50px */
.mobile-sidebar .nav-vertical > li { border-top: 1px solid var(--hck-line) !important; }
.mobile-sidebar .nav-vertical > li.hck-drawer__head,
.mobile-sidebar .nav-vertical > li.hck-drawer__cta { border-top: 0 !important; }
.mobile-sidebar .nav-sidebar.nav-uppercase > li > a,
.mobile-sidebar .nav-vertical > li > a {
	display: flex; align-items: center; min-height: 52px; padding: 0 56px 0 18px !important;
	font-size: 16px !important; font-weight: 600; letter-spacing: 0; text-transform: none !important;
	color: var(--hck-ink) !important;
}
.mobile-sidebar .nav-vertical > li.current-menu-item > a,
.mobile-sidebar .nav-vertical > li.current-menu-ancestor > a { color: var(--hck-navy) !important; box-shadow: inset 4px 0 0 var(--hck-gold); }
.mobile-sidebar .nav-vertical .toggle {
	width: 52px; height: 52px; margin: 0 !important; top: 0; right: 0; opacity: 1;
	display: flex; align-items: center; justify-content: center; color: var(--hck-navy);
}
.mobile-sidebar .nav-vertical .toggle i { font-size: 18px; transition: transform .2s; }
.mobile-sidebar .nav-vertical li.active > .toggle i { transform: rotate(180deg); }
.mobile-sidebar .nav-vertical .sub-menu { padding: 0 0 8px !important; background: #f7f9fc; }
.mobile-sidebar .nav-vertical .sub-menu > li > a {
	display: flex; align-items: center; min-height: 46px; padding: 6px 18px 6px 30px !important;
	font-size: 15px !important; font-weight: 500; color: #33415c !important; text-transform: none !important;
}
.mobile-sidebar .nav-vertical .sub-menu > li.current-menu-item > a { color: var(--hck-navy) !important; font-weight: 700; }

/* CTA cuối menu */
.hck-drawer__cta { list-style: none; display: grid; gap: 10px; padding: 18px 16px 8px !important; border-top: 1px solid var(--hck-line) !important; }
.hck-drawer__btn {
	display: flex !important; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 0 16px !important; border-radius: 12px;
	font-size: 15px !important; font-weight: 700; letter-spacing: 0; text-transform: none !important; text-decoration: none;
}
.hck-drawer__btn--call { background: var(--hck-gold); color: var(--hck-navy) !important; }
.hck-drawer__btn--quote { background: var(--hck-navy); color: #fff !important; }
.hck-drawer__btn--zalo { background: #fff; color: #0068ff !important; border: 1.5px solid #0068ff; }
.hck-drawer__addr { margin: 4px 2px 0; font-size: 13px; line-height: 1.5; color: var(--hck-muted); }

/* Nút liên hệ nổi không đè lên menu / tìm kiếm */
body:has(.mfp-wrap) #button-contact-vr,
html.hck-search-open #button-contact-vr { display: none !important; }

/* ---------- Full-screen search ---------- */
html.hck-search-open, html.hck-search-open body { overflow: hidden; }
.hck-search {
	position: fixed; inset: 0; z-index: 100000;
	background: rgba(0, 20, 60, .45); opacity: 0; transition: opacity .18s ease;
}
.hck-search.is-open { opacity: 1; }
.hck-search[hidden] { display: none; }
.hck-search__panel {
	position: absolute; inset: 0; display: flex; flex-direction: column; background: #fff;
	transform: translateY(-12px); transition: transform .2s ease;
}
.hck-search.is-open .hck-search__panel { transform: none; }
@media (min-width: 850px) {
	.hck-search__panel { inset: 64px auto auto 50%; width: 680px; max-height: calc(100vh - 128px); transform: translate(-50%, -12px); border-radius: 16px; box-shadow: 0 24px 60px rgba(0, 20, 60, .25); }
	.hck-search.is-open .hck-search__panel { transform: translate(-50%, 0); }
}
.hck-search__form {
	position: relative; display: flex; align-items: center; gap: 8px; margin: 0;
	padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top));
	border-bottom: 1px solid var(--hck-line);
}
.hck-search__icon { position: absolute; left: 26px; color: var(--hck-navy); pointer-events: none; }
.hck-search__input {
	flex: 1; height: 48px !important; margin: 0 !important; padding: 0 40px 0 44px !important;
	border: 1.5px solid #d7deea !important; border-radius: 12px !important; box-shadow: none !important;
	font-size: 16px !important; color: var(--hck-ink); background: #f7f9fc !important;
	-webkit-appearance: none; appearance: none;
}
.hck-search__input:focus { border-color: var(--hck-navy) !important; background: #fff !important; outline: none; }
.hck-search__input::-webkit-search-cancel-button { display: none; }
.hck-search__clear {
	position: absolute; right: 86px; width: 36px; height: 36px; margin: 0; padding: 0;
	border: 0; background: transparent; color: var(--hck-muted); font-size: 24px; line-height: 1; cursor: pointer;
}
.hck-search__close {
	flex: 0 0 auto; height: 44px; margin: 0; padding: 0 10px; border: 0; background: transparent;
	color: var(--hck-navy); font-size: 15px; font-weight: 700; text-transform: none; letter-spacing: 0; cursor: pointer;
}
.hck-search__body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 8px 16px 32px; padding-bottom: max(32px, env(safe-area-inset-bottom)); }
.hck-search__label { margin: 16px 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--hck-muted); }
.hck-search__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hck-search__chip {
	display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px;
	background: #f2f5fa; border: 1px solid #dbe3ef; color: var(--hck-navy); font-size: 14px; font-weight: 600; text-decoration: none;
}
.hck-search__list { list-style: none; margin: 0; padding: 0; }
.hck-search__list li { margin: 0 !important; border-bottom: 1px solid var(--hck-line); }
.hck-search__list a {
	display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 2px;
	color: var(--hck-ink); font-size: 15px; font-weight: 600; line-height: 1.4; text-decoration: none;
}
.hck-search__list a mark { background: #fff3b0; color: inherit; padding: 0 1px; border-radius: 3px; }
.hck-search__type {
	flex: 0 0 auto; min-width: 64px; padding: 3px 8px; border-radius: 6px; background: #eef3fb;
	color: var(--hck-navy); font-size: 11px; font-weight: 700; text-align: center; text-transform: uppercase; letter-spacing: .02em;
}
.hck-search__type--product { background: #fff6cc; color: #6b5400; }
.hck-search__all { display: block; margin-top: 14px; padding: 14px; border-radius: 12px; background: var(--hck-navy); color: #fff !important; text-align: center; font-weight: 700; text-decoration: none; }
.hck-search__empty, .hck-search__loading { padding: 18px 2px; color: var(--hck-muted); font-size: 15px; }
.hck-search.has-query .hck-search__idle { display: none; }
.hck-search__hint { display: none; }
@media (hover: hover) and (pointer: fine) and (min-width: 850px) { .hck-search__hint { display: block; } }

@media (prefers-reduced-motion: reduce) {
	.hck-search, .hck-search__panel, .mobile-sidebar .nav-vertical .toggle i { transition: none !important; }
}
