/* ==========================================================================
   HCK desktop header (≥850px) — topbar, nav, dropdown, search pill, CTA
   Nạp với media="(min-width: 850px)".
   ========================================================================== */

/* ---------- Topbar ---------- */
#top-bar {
	background: var(--hck-navy) !important;
	border-bottom: 1px solid rgba(255, 255, 255, .08);
	font-size: 13px;
}
#top-bar .nav > li { margin: 0 0 0 18px; }
#top-bar .flex-left .nav > li { margin: 0 18px 0 0; }
#top-bar .nav > li > a,
.hck-tb__item a {
	display: inline-flex; align-items: center; gap: 7px;
	color: rgba(255, 255, 255, .86) !important; font-size: 13px; font-weight: 500;
	text-transform: none; letter-spacing: 0; padding: 0; min-height: 34px;
	transition: color .15s;
}
#top-bar .nav > li > a:hover, .hck-tb__item a:hover { color: var(--hck-gold) !important; }
.hck-tb__item svg { color: var(--hck-gold); flex: 0 0 auto; }
.hck-tb__item strong { color: #fff; font-weight: 700; }
.hck-tb__info span { max-width: 46vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#top-bar .social-icons { gap: 2px; }
#top-bar .social-icons .icon { color: rgba(255, 255, 255, .75) !important; min-width: 28px; min-height: 28px; }
#top-bar .social-icons .icon:hover { color: var(--hck-gold) !important; }
#top-bar .html_topbar_left { display: none; }

/* ---------- Header chính ---------- */
#masthead { border-bottom: 1px solid var(--hck-line); }
#masthead .header-inner { gap: 16px; flex-wrap: nowrap; }
/* Flatsome cố định #logo rộng 229px (ảnh chỉ ~60px) → để logo tự co theo ảnh */
#masthead #logo { width: auto !important; flex: 0 0 auto; margin-right: 8px; }
#masthead #logo img { max-height: 58px; width: auto; }
#masthead .flex-col.flex-left.hide-for-medium { min-width: 0; }
#masthead .header-nav-main { flex-wrap: nowrap; }
#masthead .header-nav-main > li > a { white-space: nowrap; }
.header-wrapper.stuck #masthead,
#header.stuck #masthead { box-shadow: 0 6px 24px rgba(0, 20, 60, .10); border-bottom-color: transparent; }
.header-wrapper.stuck #logo img { max-height: 48px; }

/* Menu ở giữa */
#masthead .flex-col.flex-left.hide-for-medium .header-nav-main { justify-content: center; }
#masthead .header-nav-main > li { margin: 0 2px !important; }
#masthead .header-nav-main > li > a {
	position: relative;
	padding: 10px 11px !important;
	font-size: 15.5px !important; font-weight: 600 !important; letter-spacing: 0;
	color: var(--hck-ink) !important; border-radius: 10px;
	transition: color .15s, background-color .15s;
}
#masthead .header-nav-main > li > a::after {
	content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 3px;
	border-radius: 3px; background: var(--hck-gold);
	transform: scaleX(0); transform-origin: left; transition: transform .2s ease;
}
#masthead .header-nav-main > li > a:hover,
#masthead .header-nav-main > li.active > a,
#masthead .header-nav-main > li.current-menu-item > a,
#masthead .header-nav-main > li.current-menu-ancestor > a,
#masthead .header-nav-main > li.current-menu-parent > a { color: var(--hck-navy) !important; }
#masthead .header-nav-main > li > a:hover::after,
#masthead .header-nav-main > li.current-menu-item > a::after,
#masthead .header-nav-main > li.current-menu-ancestor > a::after,
#masthead .header-nav-main > li.current-menu-parent > a::after { transform: scaleX(1); }
#masthead .header-nav-main > li > a:focus-visible { outline: 2px solid var(--hck-navy); outline-offset: 2px; }
#masthead .header-nav-main .icon-angle-down { font-size: 12px; margin-left: 4px; opacity: .6; transition: transform .2s; }
#masthead .header-nav-main > li:hover .icon-angle-down { transform: rotate(180deg); }

/* ---------- Dropdown ---------- */
#masthead .nav-dropdown {
	min-width: 270px; padding: 10px !important;
	border: 1px solid var(--hck-line) !important; border-radius: 14px !important;
	background: #fff !important;
	box-shadow: 0 18px 48px rgba(0, 20, 60, .14), 0 2px 6px rgba(0, 20, 60, .06) !important;
}
#masthead .nav-dropdown::before, #masthead .nav-dropdown::after { display: none !important; } /* bỏ mũi tên cũ */
#masthead .nav-dropdown > li { border: 0 !important; break-inside: avoid; }
#masthead .nav-dropdown > li > a {
	display: block; margin: 0 !important; padding: 10px 14px !important; border-radius: 9px;
	font-size: 14.5px !important; font-weight: 500 !important; line-height: 1.35;
	color: #33415c !important; border: 0 !important; text-transform: none !important;
	transition: background-color .12s, color .12s;
}
#masthead .nav-dropdown > li > a:hover,
#masthead .nav-dropdown > li.current-menu-item > a {
	background: #f2f5fa; color: var(--hck-navy) !important;
}
#masthead .nav-dropdown > li.current-menu-item > a { font-weight: 700 !important; }
/* Menu nhiều mục (Sản phẩm) → 2 cột */
#masthead .header-nav-main > li:has(> .nav-dropdown > li:nth-child(8)) > .nav-dropdown {
	column-count: 2; column-gap: 6px; width: 540px;
}

/* ---------- Ô tìm kiếm dạng pill ---------- */
#masthead .flex-right .nav > li.hck-dh__item { margin: 0 0 0 10px; }
.hck-dh__search {
	display: inline-flex; align-items: center; gap: 10px;
	width: clamp(230px, 20vw, 320px); height: 44px; margin: 0; padding: 0 8px 0 16px;
	border: 1px solid #dfe6f0; border-radius: 999px; background: #f4f7fb;
	color: var(--hck-muted); font-size: 14.5px; font-weight: 400; letter-spacing: 0; text-transform: none;
	cursor: text; transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.hck-dh__search svg { color: var(--hck-navy); flex: 0 0 auto; }
.hck-dh__search:hover { border-color: #b9c6da; background: #fff; }
.hck-dh__search:focus-visible { outline: none; border-color: var(--hck-navy); box-shadow: 0 0 0 3px rgba(0, 45, 114, .15); background: #fff; }
.hck-dh__search-text { flex: 1; min-width: 0; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hck-dh__kbd {
	flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
	min-width: 26px; height: 26px; padding: 0 6px; border-radius: 7px;
	border: 1px solid #d7deea; background: #fff; color: var(--hck-muted);
	font: 600 12px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- CTA ---------- */
.hck-dh__cta {
	display: inline-flex !important; align-items: center; gap: 8px;
	height: 44px; padding: 0 20px !important; border-radius: 999px;
	background: var(--hck-gold); color: var(--hck-navy) !important;
	font-size: 15px !important; font-weight: 700 !important; letter-spacing: 0; text-transform: none !important;
	box-shadow: 0 6px 16px rgba(247, 211, 34, .35);
	transition: transform .15s, box-shadow .15s, background-color .15s;
}
.hck-dh__cta:hover { background: #ffdc2e; transform: translateY(-1px); box-shadow: 0 10px 22px rgba(247, 211, 34, .45); }
.hck-dh__cta svg { transition: transform .15s; }
.hck-dh__cta:hover svg { transform: translateX(3px); }

/* ---------- Màn hình hẹp: thu gọn ---------- */
@media (max-width: 1279px) {
	#masthead .header-nav-main > li { margin: 0 !important; }
	#masthead .header-nav-main > li > a { padding: 10px 8px !important; font-size: 15px !important; }
	#masthead .header-nav-main > li > a::after { left: 8px; right: 8px; }
	.hck-dh__search { width: 44px; padding: 0; justify-content: center; }
	.hck-dh__search-text, .hck-dh__kbd { display: none; }
	.hck-tb__info span { max-width: 36vw; }
}
@media (max-width: 1023px) {
	#masthead .header-nav-main > li > a { padding: 10px 6px !important; font-size: 14px !important; }
	#masthead .header-nav-main .icon-angle-down { display: none; }
	#masthead #logo img { max-height: 50px; }
	.hck-dh__cta { padding: 0 14px !important; font-size: 14px !important; }
	#top-bar .hck-tb__item:last-child { display: none; } /* ẩn email */
}

/* ---------- Overlay tìm kiếm trên desktop ---------- */
.hck-search__panel { max-width: calc(100vw - 32px); }
.hck-search__list a:focus-visible,
.hck-search__list a.is-active { outline: none; background: #f2f5fa; border-radius: 10px; padding-left: 10px; padding-right: 10px; }
.hck-search__hint { margin: 6px 0 0; font-size: 12.5px; color: var(--hck-muted); }
.hck-search__hint kbd { display: inline-block; min-width: 20px; padding: 1px 5px; border: 1px solid #d7deea; border-radius: 5px; background: #fff; font: 600 11px ui-monospace, Menlo, Consolas, monospace; text-align: center; }
@media (prefers-reduced-motion: reduce) {
	#masthead .header-nav-main > li > a::after, .hck-dh__cta, .hck-dh__cta svg { transition: none !important; }
}
