/* =================================================
   APEX DEVELOPER — HEADER STYLES
   ================================================= */

/* ---------- Announcement Bar ---------- */
.apex-announcement-bar {
	background: var(--apex-primary-dark);
	color: var(--apex-white);
	padding: 10px 0;
	font-size: 13px;
	font-weight: 500;
	position: relative;
	z-index: 101;
}

.apex-announcement-inner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
	flex-wrap: wrap;
}

.apex-announcement-inner i {
	color: var(--apex-yellow);
	margin-right: 6px;
}

.apex-announcement-inner .apex-divider {
	opacity: 0.5;
}


/* ---------- Main Header ---------- */
.apex-header {
	background: var(--apex-white);
	border-bottom: 1px solid var(--apex-border);
	padding: 14px 0;
	position: sticky;
	top: 0;
	z-index: 100;
}

.apex-header-inner {
	display: flex;
	align-items: center;
	gap: 30px;
}


/* ---------- Logo ---------- */
.apex-logo-wrap {
	flex-shrink: 0;
}

.apex-logo,
.custom-logo-link {
	display: flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
}

.apex-logo-mark {
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.apex-logo-mark svg {
	width: 100%;
	height: 100%;
}

.apex-logo-text {
	font-family: var(--apex-font-display);
	font-weight: 700;
	font-size: 20px;
	line-height: 1;
	display: flex;
	gap: 6px;
	align-items: baseline;
}

.apex-logo-bold {
	color: var(--apex-primary);
	font-weight: 700;
}

.apex-logo-light {
	color: var(--apex-text-light);
	font-weight: 400;
	font-size: 18px;
}


/* ---------- Search Bar ---------- */
.apex-search-wrap {
	flex: 1;
	max-width: 500px;
	position: relative;
}

.apex-search-form {
	position: relative;
	width: 100%;
}

.apex-search-icon {
	position: absolute;
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--apex-text-light);
	font-size: 14px;
	pointer-events: none;
}

.apex-search-input {
	width: 100%;
	padding: 12px 16px 12px 42px;
	border: 1px solid var(--apex-border);
	border-radius: var(--apex-radius-sm);
	font-size: 14px;
	font-family: var(--apex-font-body);
	background: var(--apex-white);
	color: var(--apex-text);
	transition: var(--apex-transition);
	outline: none;
}

.apex-search-input:focus {
	border-color: var(--apex-accent);
	box-shadow: 0 0 0 3px var(--apex-accent-light);
}

.apex-search-input::placeholder {
	color: var(--apex-text-light);
}

/* Search results dropdown */
.apex-search-results {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	background: var(--apex-white);
	border: 1px solid var(--apex-border);
	border-radius: var(--apex-radius-sm);
	box-shadow: var(--apex-shadow-lg);
	max-height: 400px;
	overflow-y: auto;
	display: none;
	z-index: 50;
}

.apex-search-results.apex-active {
	display: block;
}

.apex-search-result-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	border-bottom: 1px solid var(--apex-border-light);
	text-decoration: none;
	transition: background 0.2s;
}

.apex-search-result-item:hover {
	background: var(--apex-bg);
}

.apex-search-result-item:last-child {
	border-bottom: none;
}

.apex-search-result-image {
	width: 42px;
	height: 42px;
	background: var(--apex-bg);
	border-radius: 6px;
	object-fit: cover;
	flex-shrink: 0;
}

.apex-search-result-info {
	flex: 1;
	min-width: 0;
}

.apex-search-result-title {
	font-size: 14px;
	font-weight: 500;
	color: var(--apex-primary);
	margin: 0 0 4px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.apex-search-result-price {
	font-size: 13px;
	font-weight: 600;
	color: var(--apex-accent);
}

.apex-search-empty {
	padding: 20px;
	text-align: center;
	color: var(--apex-text-light);
	font-size: 13px;
}


/* ---------- Header Actions ---------- */
.apex-header-actions {
	display: flex;
	align-items: center;
	gap: 22px;
	flex-shrink: 0;
}

.apex-header-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: var(--apex-text);
	text-decoration: none;
	font-weight: 500;
	transition: var(--apex-transition);
}

.apex-header-btn:hover {
	color: var(--apex-accent);
}

.apex-header-btn i {
	font-size: 16px;
}


/* Cart button */
.apex-cart-btn {
	position: relative;
	padding-left: 8px;
}

.apex-cart-badge {
	background: var(--apex-primary);
	color: var(--apex-white);
	font-size: 10px;
	padding: 2px 6px;
	border-radius: 10px;
	font-weight: 700;
	min-width: 18px;
	text-align: center;
	position: absolute;
	top: -6px;
	left: 12px;
}

.apex-cart-amount {
	font-weight: 600;
}

.apex-cart-label {
	color: var(--apex-text-light);
	font-size: 13px;
}


/* ---------- Mobile Toggle ---------- */
.apex-mobile-toggle {
	display: none;
	width: 40px;
	height: 40px;
	background: transparent;
	border: 1px solid var(--apex-border);
	border-radius: var(--apex-radius-sm);
	cursor: pointer;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 5px;
	padding: 0;
}

.apex-mobile-toggle span {
	display: block;
	width: 18px;
	height: 2px;
	background: var(--apex-primary);
	border-radius: 2px;
	transition: var(--apex-transition);
}

.apex-mobile-toggle.apex-active span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.apex-mobile-toggle.apex-active span:nth-child(2) {
	opacity: 0;
}

.apex-mobile-toggle.apex-active span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}


/* ---------- Mobile Menu ---------- */
.apex-mobile-menu {
	display: none;
	background: var(--apex-white);
	border-top: 1px solid var(--apex-border);
	padding: 20px 0;
}

.apex-mobile-menu.apex-active {
	display: block;
}

.apex-mobile-nav {
	list-style: none;
	padding: 0;
	margin: 0;
}

.apex-mobile-nav li {
	border-bottom: 1px solid var(--apex-border-light);
}

.apex-mobile-nav li:last-child {
	border-bottom: none;
}

.apex-mobile-nav a {
	display: block;
	padding: 14px 0;
	color: var(--apex-primary);
	font-weight: 500;
	font-size: 15px;
	text-decoration: none;
}

.apex-mobile-nav a:hover {
	color: var(--apex-accent);
}


/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.apex-search-wrap {
		max-width: 300px;
	}
	.apex-header-btn span {
		display: none;
	}
	.apex-cart-btn span.apex-cart-amount,
	.apex-cart-btn span.apex-cart-label {
		display: inline;
	}
}

@media (max-width: 768px) {
	.apex-header {
		padding: 12px 0;
	}
	.apex-header-inner {
		gap: 14px;
		flex-wrap: wrap;
	}
	.apex-logo-text {
		font-size: 16px;
	}
	.apex-logo-light {
		font-size: 14px;
	}
	.apex-search-wrap {
		order: 3;
		width: 100%;
		max-width: 100%;
		flex-basis: 100%;
	}
	.apex-search-input {
		padding: 10px 14px 10px 38px;
		font-size: 13px;
	}
	.apex-header-actions {
		gap: 12px;
		margin-left: auto;
	}
	.apex-account-btn span {
		display: none;
	}
	.apex-cart-btn span.apex-cart-label {
		display: none;
	}
	.apex-mobile-toggle {
		display: flex;
	}
	.apex-announcement-inner {
		gap: 10px;
		font-size: 11px;
	}
	.apex-announcement-inner .apex-divider {
		display: none;
	}
}

@media (max-width: 480px) {
	.apex-logo-mark {
		width: 32px;
		height: 32px;
	}
	.apex-logo-text {
		font-size: 14px;
	}
	.apex-logo-light {
		font-size: 12px;
	}
}
