/**
 * Mobil üst çubuk: hamburger + çekmece menü (≤992px).
 */

/* Masaüstü: hamburger gizli */
.banyoma-header__menu-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	color: var(--banyoma-header-action, #9ca3af);
	border-radius: 6px;
	-webkit-tap-highlight-color: transparent;
}

.banyoma-header__menu-toggle:hover,
.banyoma-header__menu-toggle:focus-visible {
	color: #3d3d3d;
}

.banyoma-header__menu-toggle:focus-visible {
	outline: 2px solid var(--banyoma-blue, #2563eb);
	outline-offset: 2px;
}

.banyoma-header__menu-toggle-bars {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 22px;
}

.banyoma-header__menu-toggle-bars span {
	display: block;
	height: 2px;
	background: currentColor;
	border-radius: 1px;
}

/* Çekmece: kapalıyken etkileşim yok */
.banyoma-mobile-drawer {
	position: fixed;
	inset: 0;
	z-index: 100000;
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.banyoma-mobile-drawer.is-open {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
}

.banyoma-mobile-drawer__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.38);
}

.banyoma-mobile-drawer__panel {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: min(80vw, 360px);
	max-width: 100%;
	background: #fff;
	box-shadow: 4px 0 24px rgba(0, 0, 0, 0.14);
	display: flex;
	flex-direction: column;
	transform: translateX(-100%);
	transition: transform 0.28s ease;
	overflow: hidden;
}

.banyoma-mobile-drawer.is-open .banyoma-mobile-drawer__panel {
	transform: translateX(0);
}

.banyoma-mobile-drawer__head {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 14px 48px;
	background: #f5f5f5;
	border-bottom: 1px solid var(--banyoma-border, #e5e7eb);
	flex-shrink: 0;
}

.banyoma-mobile-drawer__title {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	color: #6b7280;
}

.banyoma-mobile-drawer__close {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	font-size: 28px;
	line-height: 1;
	color: #6b7280;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	-webkit-tap-highlight-color: transparent;
}

.banyoma-mobile-drawer__close:hover,
.banyoma-mobile-drawer__close:focus-visible {
	color: #111827;
}

.banyoma-mobile-drawer__close:focus-visible {
	outline: 2px solid var(--banyoma-blue, #2563eb);
	outline-offset: 2px;
}

.banyoma-mobile-drawer__nav {
	flex: 1;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.banyoma-mobile-nav__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.banyoma-mobile-nav__list > li {
	margin: 0;
	padding: 0;
	border-bottom: 1px solid var(--banyoma-border, #e5e7eb);
}

.banyoma-mobile-nav__list > li > a {
	display: flex;
	align-items: center;
	min-height: 52px;
	padding: 10px 52px 10px 16px;
	text-decoration: none;
	color: #1f2937;
	font-size: 15px;
	font-weight: 500;
	position: relative;
	box-sizing: border-box;
}

.banyoma-mobile-nav__list > li > a:hover,
.banyoma-mobile-nav__list > li > a:focus-visible {
	background: #fafafa;
}

.banyoma-mobile-nav__list > li > a:focus-visible {
	outline: 2px solid var(--banyoma-blue, #2563eb);
	outline-offset: -2px;
	z-index: 1;
}

/* Tek satır (alt menüsü yok): sağda ok — alt menülü satırlarda düğme kullanılır */
.banyoma-mobile-nav__list > li:not(.menu-item-has-children) > a::after {
	content: "\203A";
	position: absolute;
	right: 0;
	top: 0;
	bottom: 0;
	width: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f5f5f5;
	border-left: 1px solid var(--banyoma-border, #e5e7eb);
	font-size: 1.15rem;
	color: #9ca3af;
	font-weight: 400;
	pointer-events: none;
}

/* Alt menülü öğe: başlık + aç/kapa */
.banyoma-mobile-drawer__nav .menu-item-has-children {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
}

.banyoma-mobile-nav__list > li.menu-item-has-children > a {
	flex: 1 1 auto;
	min-width: 0;
	padding-right: 12px;
}

.banyoma-mobile-nav__list .sub-menu {
	display: none;
	list-style: none;
	margin: 0;
	padding: 0;
	width: 100%;
	flex: 1 1 100%;
	background: #f9fafb;
	border-top: 1px solid var(--banyoma-border, #e5e7eb);
	box-sizing: border-box;
}

.banyoma-mobile-nav__list .menu-item-has-children.is-open > .sub-menu {
	display: block;
}

.banyoma-mobile-nav__list .sub-menu > li {
	margin: 0;
	padding: 0;
	border-bottom: 1px solid var(--banyoma-border, #e5e7eb);
}

.banyoma-mobile-nav__list .sub-menu > li:last-child {
	border-bottom: 0;
}

.banyoma-mobile-nav__list .sub-menu > li > a {
	display: flex;
	align-items: center;
	min-height: 48px;
	padding: 10px 16px 10px 28px;
	text-decoration: none;
	color: #374151;
	font-size: 14px;
	font-weight: 400;
	box-sizing: border-box;
	position: relative;
}

.banyoma-mobile-nav__list .sub-menu .menu-item-has-children > a {
	flex: 1 1 auto;
	min-width: 0;
	padding-right: 8px;
}

.banyoma-mobile-nav__list .sub-menu > li > a:hover,
.banyoma-mobile-nav__list .sub-menu > li > a:focus-visible {
	background: #f3f4f6;
}

.banyoma-mobile-nav__list .sub-menu > li > a:focus-visible {
	outline: 2px solid var(--banyoma-blue, #2563eb);
	outline-offset: -2px;
	z-index: 1;
}

.banyoma-mobile-nav__toggle {
	flex: 0 0 48px;
	width: 48px;
	min-height: 52px;
	margin: 0;
	padding: 0;
	border: 0;
	border-left: 1px solid var(--banyoma-border, #e5e7eb);
	background: #f5f5f5;
	cursor: pointer;
	touch-action: manipulation;
	-webkit-user-select: none;
	user-select: none;
	color: #9ca3af;
	font-size: 1.25rem;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	-webkit-tap-highlight-color: transparent;
	align-self: stretch;
	box-sizing: border-box;
	position: relative;
}

.banyoma-mobile-nav__toggle::after {
	content: "\203A";
	display: block;
	transition: transform 0.2s ease;
}

.banyoma-mobile-nav__list .menu-item-has-children.is-open > .banyoma-mobile-nav__toggle::after {
	transform: rotate(90deg);
}

.banyoma-mobile-nav__toggle:hover,
.banyoma-mobile-nav__toggle:focus-visible {
	color: #4b5563;
	background: #eeeeee;
}

.banyoma-mobile-nav__toggle:focus-visible {
	outline: 2px solid var(--banyoma-blue, #2563eb);
	outline-offset: -2px;
	z-index: 1;
}

body.banyoma-mobile-nav-open {
	overflow: hidden;
}

@media (max-width: 992px) {
	/*
	 * Grid yerine flex-wrap: bazı ortamlarda 2. satır (arama) sıfır yükseklikte kalabiliyordu.
	 * order + flex-basis:100% ile arama her zaman logo satırının altına düşer.
	 */
	.banyoma-header__top {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		justify-content: flex-start;
		gap: 0 10px;
		row-gap: 0;
		padding-bottom: 12px;
		width: 100%;
		max-width: 100%;
		min-width: 0;
		box-sizing: border-box;
	}

	.banyoma-header__menu-toggle {
		display: inline-flex;
		order: 1;
		flex: 0 0 auto;
		align-self: center;
		margin-left: -6px;
		margin-right: 8px;
		color: #4b5563;
	}

	.banyoma-header__logo {
		order: 2;
		flex: 1 1 auto;
		min-width: 0;
		margin-left: 0;
		text-align: center;
		align-self: center;
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 44px;
	}

	.banyoma-header__logo .custom-logo {
		max-height: 40px;
	}

	.banyoma-header__logo-text {
		font-size: 1.35rem;
		line-height: 1;
	}

	.banyoma-header__actions {
		order: 3;
		flex: 0 0 auto;
		align-self: center;
		margin-left: auto;
		justify-content: flex-end;
		align-items: center;
		margin-right: 0;
		flex-wrap: nowrap;
		gap: 2px 4px;
	}

	.banyoma-header__search {
		display: flex !important;
		order: 4;
		flex: 1 1 100%;
		width: 100%;
		max-width: 100%;
		min-width: 0;
		min-height: 48px;
		justify-content: stretch;
		align-items: stretch;
		padding: 10px 0 12px;
		margin: 0;
		border-top: 1px solid var(--banyoma-border, #e5e7eb);
		box-sizing: border-box;
	}

	.banyoma-header__search .banyoma-product-search,
	.banyoma-header__search form.search-form.banyoma-product-search {
		width: 100%;
		max-width: none;
		min-height: 48px;
		border: 1px solid var(--banyoma-search-orange);
		border-radius: 0;
	}

	.banyoma-header__search .banyoma-product-search__submit {
		flex: 0 0 48px;
		min-width: 48px;
		min-height: 48px;
	}

	.banyoma-header__search .banyoma-product-search__input {
		font-size: 15px;
		padding-top: 12px;
		padding-bottom: 12px;
	}

	.banyoma-header__nav {
		display: none !important;
	}

	.banyoma-header__action-text {
		display: none !important;
	}

	.banyoma-header__action {
		gap: 0;
		padding: 0;
		align-items: center;
		justify-content: center;
		align-self: center;
		min-width: 40px;
		min-height: 44px;
		color: #4b5563;
	}

	.banyoma-header__action:hover,
	.banyoma-header__action:focus-visible {
		color: #1f2937;
	}

	.banyoma-header__action-wrap {
		align-items: center;
		justify-content: center;
	}

	/* Rozet ikon kutusundan bağımsız; satır hizasını bozmaz */
	.banyoma-header__badge {
		position: absolute;
		left: auto;
		right: -4px;
		top: -6px;
		min-width: 17px;
		height: 17px;
		line-height: 17px;
		font-size: 9px;
		box-sizing: border-box;
		z-index: 1;
	}

	.banyoma-header__action-icon {
		width: 26px;
		height: 26px;
		background-size: 22px 22px;
	}

	.banyoma-header__action-icon--dolly {
		background-size: 22px 22px;
		background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%234b5563' stroke-width='1.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M8.25 18.75a1.5 1.5 0 01-3 0m3 0a1.5 1.5 0 00-3 0m3 0h6m-9 0H3.375a1.125 1.125 0 01-1.125-1.125V14.25m17.25 4.5a1.5 1.5 0 01-3 0m3 0a1.5 1.5 0 00-3 0m3 0h1.125c.621 0 1.129-.504 1.09-1.124a17.902 17.902 0 00-3.213-9.193 2.18 2.18 0 00-1.941-1.196h-3.75a2.25 2.25 0 00-2.25 2.25V18m-4.5-4.5h15m-12-6h6m-6 3h6'/%3E%3C/svg%3E");
	}

	.banyoma-header__action-icon--cart {
		background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%234b5563' stroke-width='1.6'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z'/%3E%3C/svg%3E");
	}

	.banyoma-header__action-icon--user {
		background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%234b5563' stroke-width='1.6'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z'/%3E%3C/svg%3E");
	}
}
