/**
 * Header styles – Top header + Bottom header
 * SS: açık bej arka plan, logo sol, search ortada, WhatsApp sağ
 *
 * @package erdaunlumamulleri
 */

.site-header {
	width: 100%;
	background-color: #f8f5f0;
}

/* ========== Top header: logo (sol) | search (orta) | WhatsApp (sağ) ========== */
.header-top {
	border-bottom: 1px solid rgba(110, 48, 30, 0.12);
}

.header-top-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	max-width: 1400px;
	margin: 0 auto;
	padding: 1rem 1.5rem;
}

.header-branding {
	flex-shrink: 0;
}

.header-logo-link {
	display: block;
	line-height: 0;
}

.header-logo {
	display: block;
	width: 48px;
	height: 48px;
	object-fit: contain;
}

/* Search – ortada, ikon solda, tek satır yuvarlak bar */
.header-search-wrap {
	flex: 1 1 360px;
	max-width: 520px;
	min-width: 0;
	margin: 0 auto;
}

.header-search-form {
	display: flex;
	align-items: center;
	gap: 0;
	height: 44px;
	padding: 0 1rem 0 0.75rem;
	border-radius: 999px;
	background-color: rgba(237, 182, 29, 0.12);
	border: 1px solid rgba(110, 48, 30, 0.12);
}

.header-search-icon-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	padding: 0;
	margin: 0;
	border: none;
	background: transparent;
	color: rgba(110, 48, 30, 0.7);
	cursor: pointer;
}

.header-search-icon-btn:hover {
	color: #6e301e;
}

.header-search-input {
	flex: 1;
	min-width: 0;
	height: 100%;
	padding: 0 0.5rem;
	border: none;
	background: transparent;
	color: #6e301e;
	font-size: 0.9rem;
}

.header-search-input::placeholder {
	color: rgba(110, 48, 30, 0.55);
}

.header-search-input:focus {
	outline: none;
}

/* WhatsApp – yeşil, beyaz ikon ve yazı (SS) */
.header-whatsapp {
	flex-shrink: 0;
}

.header-whatsapp-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 1rem;
	background-color: #25d366;
	color: #fff;
	text-decoration: none;
	font-size: 0.95rem;
	font-weight: 600;
	border-radius: 999px;
	transition: opacity 0.2s;
	white-space: nowrap;
}

.header-whatsapp-btn:hover {
	opacity: 0.92;
	color: #fff;
}

.header-whatsapp-btn:focus {
	outline: 2px solid rgba(37, 211, 102, 0.5);
	outline-offset: 2px;
}

/* ========== Bottom header: sadece menü ========== */
.header-bottom {
	background-color: #f8f5f0;
}

.header-bottom-inner {
	max-width: 1400px;
	margin: 0 auto;
	padding: 0.75rem 1.5rem;
}

.main-navigation {
	display: flex;
	justify-content: start;
}

.header-nav-menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.5rem 2rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.header-nav-menu a {
	color: #6e301e;
	text-decoration: none;
	font-size: 0.95rem;
	font-weight: 500;
	padding: 0.35em 0;
	transition: color 0.2s;
}

.header-nav-menu a:hover,
.header-nav-menu a:focus {
	color: #edb61d;
}

/* ========== Hamburger (sadece mobilde görünür) ========== */
.header-menu-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	margin: 0 0 0 auto;
	border: none;
	background: transparent;
	cursor: pointer;
	color: #6e301e;
	position: relative;
}

/* menu-icon.svg rengi kahveye (fill #121212 → #6e301e) */
.header-menu-toggle .header-menu-toggle-icon {
	filter: brightness(0) saturate(100%) invert(18%) sepia(45%) saturate(1200%) hue-rotate(340deg) brightness(0.92) contrast(90%);
}

.header-menu-toggle .header-menu-toggle-close {
	display: none;
	font-size: 1.75rem;
	line-height: 1;
	font-weight: 300;
}

.header-menu-toggle-icon {
	display: block;
}

body.mobile-menu-open .header-menu-toggle .header-menu-toggle-icon {
	display: none;
}

body.mobile-menu-open .header-menu-toggle .header-menu-toggle-close {
	display: block;
}

/* ========== Mobil menü overlay + panel ========== */
.mobile-menu-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(110, 48, 30, 0.4);
	z-index: 9998;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-panel {
	display: none;
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(320px, 85vw);
	max-width: 320px;
	background: #f8f5f0;
	z-index: 9999;
	box-shadow: -4px 0 24px rgba(110, 48, 30, 0.15);
	transform: translateX(100%);
	transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s;
	visibility: hidden;
	overflow-y: auto;
}

.mobile-menu-inner {
	padding: 1.5rem 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	min-height: 100%;
}

.mobile-menu-search {
	padding-bottom: 1rem;
	border-bottom: 1px solid rgba(110, 48, 30, 0.15);
}

.mobile-menu-search-input {
	width: 100%;
	padding: 0.75rem 1rem;
	border: 1px solid rgba(110, 48, 30, 0.2);
	border-radius: 999px;
	background: #fff;
	color: #6e301e;
	font-size: 0.9rem;
}

.mobile-menu-search-input::placeholder {
	color: rgba(110, 48, 30, 0.5);
}

.mobile-nav-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.mobile-nav-menu a {
	display: block;
	padding: 0.75rem 0;
	color: #6e301e;
	text-decoration: none;
	font-size: 1.05rem;
	font-weight: 500;
	border-bottom: 1px solid rgba(110, 48, 30, 0.08);
	transition: color 0.2s, background 0.2s;
}

.mobile-nav-menu a:hover,
.mobile-nav-menu a:focus {
	color: #edb61d;
	background: rgba(237, 182, 29, 0.08);
}

.mobile-menu-whatsapp {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	margin-top: auto;
	padding: 1rem 1.25rem;
	background: #25d366;
	color: #fff;
	text-decoration: none;
	font-weight: 600;
	border-radius: 999px;
	transition: opacity 0.2s;
}

.mobile-menu-whatsapp:hover {
	color: #fff;
	opacity: 0.92;
}

/* Menü açık */
body.mobile-menu-open .mobile-menu-overlay {
	opacity: 1;
	visibility: visible;
}

body.mobile-menu-open .mobile-menu-panel {
	transform: translateX(0);
	visibility: visible;
}

body.mobile-menu-open {
	overflow: hidden;
}

/* ========== Responsive: mobil ========== */
@media (max-width: 900px) {
	.header-top-inner {
		flex-wrap: wrap;
	}

	.header-search-wrap {
		order: 3;
		flex-basis: 100%;
		max-width: 100%;
		margin: 0;
	}
}

@media (max-width: 768px) {
	.header-menu-toggle {
		display: flex;
		margin-left: auto;
	}

	.header-search-wrap {
		display: none;
	}

	.header-bottom {
		display: none;
	}

	.mobile-menu-overlay,
	.mobile-menu-panel {
		display: block;
	}
}

@media (max-width: 600px) {
	.header-top-inner {
		padding: 0.75rem 1rem;
	}

	.header-logo {
		width: 40px;
		height: 40px;
	}

	.header-whatsapp-btn span {
		display: none;
	}

	.header-whatsapp-btn {
		padding: 0.5rem;
	}
}
