/* RevidAPI header — gradient xanh, pill trắng như revidapi.com */

:root {
	--revid-hd-primary: #15803d;
	--revid-hd-primary-deep: #166534;
	--revid-hd-primary-light: #16a34a;
	--revid-hd-shadow: rgba(21, 128, 61, 0.28);
	--revid-hd-pill-h: 42px;
}

#masthead,
#masthead.header-main,
#header .header-main,
.header-bg-color {
	background: linear-gradient(180deg, #16a34a 0%, #15803d 45%, #166534 100%) !important;
	box-shadow: 0 12px 30px var(--revid-hd-shadow) !important;
}

/* Thanh header gọn — một hàng liền mạch như TOP1 */
#masthead .header-main,
.header-main,
.stuck .header-main {
	height: auto !important;
	min-height: 0 !important;
	padding: 10px 0 !important;
}

.stuck .header-main {
	padding: 6px 0 !important;
}

body.home #wide-nav.header-bottom,
body.home .header-bottom.wide-nav {
	display: none !important;
}

#masthead .header-inner {
	align-items: center;
	gap: 8px;
	flex-wrap: nowrap;
}

#masthead .header-inner > .flex-col {
	align-items: center;
}

/* Logo RevidAPI — override Flatsome .nav-dark ẩn .header-logo */
#logo {
	display: block !important;
	width: auto !important;
	min-width: 0;
	max-width: none;
	flex: 0 0 auto !important;
	margin-right: 4px !important;
}

#logo .header-logo-dark {
	display: none !important;
}

#masthead.nav-dark #logo img.header-logo,
#masthead.nav-dark #logo img.header_logo,
#logo img.header-logo,
#logo img.header_logo {
	display: block !important;
	height: var(--revid-hd-pill-h) !important;
	max-height: var(--revid-hd-pill-h) !important;
	width: auto !important;
	object-fit: contain;
	background: #fff;
	border-radius: 8px;
	padding: 3px 10px !important;
	box-shadow: none !important;
}

#logo img.header-logo-sticky,
#logo img.header-logo-dark {
	display: none !important;
}

#header.stuck #logo img.header-logo,
#header.stuck #logo img.header_logo,
.stuck #logo img.header-logo,
.stuck #logo img.header_logo {
	display: block !important;
}

#logo a {
	display: flex;
	align-items: center;
}

/* Nav chính — pill trắng đồng nhất */
#masthead .header-nav-main > li.menu-item > a.nav-top-link,
#masthead .header-nav-main > li.menu-item > a.nav-top-link .icon-angle-down {
	color: #1f2937 !important;
}

#masthead .header-nav-main > li.menu-item {
	margin: 0 !important;
}

#masthead .header-nav-main > li.menu-item > a.nav-top-link {
	display: inline-flex !important;
	align-items: center;
	gap: 6px;
	min-height: var(--revid-hd-pill-h);
	height: var(--revid-hd-pill-h);
	padding: 0 14px !important;
	background: #fff !important;
	color: #1f2937 !important;
	border-radius: 8px !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 1 !important;
	box-shadow: none !important;
	transition: background 0.15s ease, color 0.15s ease;
}

#masthead .header-nav-main > li.menu-item > a.nav-top-link:hover {
	color: var(--revid-hd-primary-deep) !important;
	box-shadow: none !important;
	transform: none;
}

/* Ô tìm kiếm — cùng chiều cao, kéo dài giữa */
#masthead .dc-hs-wrap {
	width: 100% !important;
	max-width: none !important;
}

#masthead .dc-hs-form {
	width: 100% !important;
	min-height: var(--revid-hd-pill-h);
	height: var(--revid-hd-pill-h);
	background: #fff !important;
	border-radius: 8px !important;
	box-shadow: none !important;
	overflow: hidden;
}

#masthead .dc-hs-input {
	font-size: 14px !important;
	color: #374151 !important;
}

#masthead .dc-hs-input::placeholder {
	color: #9ca3af !important;
}

#masthead .dc-hs-submit {
	color: var(--revid-hd-primary) !important;
}

/* Nút ngôn ngữ · Liên hệ · Get API Key */
#masthead .revidapi-hd-lang {
	display: inline-flex;
	align-items: center;
	margin: 0;
}

#masthead .revidapi-hd-lang-select {
	appearance: none;
	-webkit-appearance: none;
	display: inline-flex;
	align-items: center;
	min-height: var(--revid-hd-pill-h);
	height: var(--revid-hd-pill-h);
	padding: 0 32px 0 14px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231f2937' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
	color: #1f2937;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	box-shadow: none;
	transition: color 0.15s ease;
}

#masthead .revidapi-hd-lang-select:hover,
#masthead .revidapi-hd-lang-select:focus {
	color: var(--revid-hd-primary-deep);
	outline: none;
}

#masthead .revidapi-hd-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: var(--revid-hd-pill-h);
	height: var(--revid-hd-pill-h);
	padding: 0 14px;
	background: #fff;
	color: #1f2937 !important;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: none;
	transition: background 0.15s ease, color 0.15s ease;
}

#masthead .revidapi-hd-btn:hover {
	color: var(--revid-hd-primary-deep) !important;
	box-shadow: none;
	transform: none;
}

#masthead .revidapi-hd-btn--login {
	background: #fff;
	color: var(--revid-hd-primary-deep) !important;
	border: 1px solid rgba(22, 101, 52, 0.12);
}

#masthead .header-nav.nav-right {
	display: flex;
	align-items: center;
	gap: 8px;
}

#masthead .header-nav.nav-right > li {
	margin: 0;
}

/* Ẩn giỏ hàng nail cũ nếu còn sót */
#masthead .cart-item.has-icon {
	display: none !important;
}

/* Mega Danh mục — hover xanh RevidAPI */
#masthead .dc-sidecat-mega-item.active a,
#masthead .dc-sidecat-mega-item:hover a,
#masthead .dc-tab-menu-item:hover a {
	border-color: var(--revid-hd-primary) !important;
	color: var(--revid-hd-primary) !important;
	background: #f0fdf4 !important;
}

#masthead .dc-sidecat-mega-item:hover .dc-sidecat-mega-icon img,
#masthead .dc-sidecat-mega-item.active .dc-sidecat-mega-icon img {
	filter: none !important;
}

@media (min-width: 850px) {
	#masthead .header-inner.flex-row {
		gap: 8px;
	}

	#masthead .flex-col.flex-left.flex-grow {
		flex: 1 1 auto;
		min-width: 0;
	}

	#masthead .flex-left.flex-grow > .header-nav {
		display: flex;
		align-items: center;
		width: 100%;
		gap: 8px;
	}

	#masthead .flex-left.flex-grow > .header-nav > li {
		flex: 0 0 auto;
		margin: 0 !important;
	}

	#masthead .flex-left.flex-grow > .header-nav > li:has(.dc-hs-wrap) {
		flex: 1 1 280px;
		min-width: 160px;
	}

	#masthead .flex-right .header-nav {
		display: flex;
		align-items: center;
		gap: 8px;
	}
}

@media (max-width: 849px) {
	#logo img.header-logo,
	#logo img.header_logo {
		height: 38px !important;
		max-height: 38px !important;
	}

	#masthead .header-nav.nav-right > li.revidapi-nav-login-mobile {
		display: list-item !important;
	}

	#masthead .revidapi-hd-btn--mobile {
		min-height: 34px;
		height: 34px;
		padding: 0 10px;
		font-size: 12px;
	}
}
