/* ==========================================================================
   Mobile chrome (≤1024px) — global parts
   1 header not sticky · 2 full-width search row · 3 icon-only hamburger ·
   4 logo left · 5 account + wishlist + bag icons · 8 no bottom toolbar ·
   10 no back-to-top · 12–15 home hero · 26–32 drawer menu (#yb-mnav, inc/areas/mobile.php)
   Checkout (body.yb-co) keeps its own simplified header, so header rules skip it.
   ========================================================================== */

@media (min-width: 1025px) {
	.yb-mnav { display: none !important; }
}

@media (max-width: 1024px) {

	/* ---- 8, 10: no bottom toolbar, no back-to-top ------------------------- */
	.yb .wd-toolbar,
	.yb .scrollToTop { display: none !important; }
	body.yb.sticky-toolbar-on { padding-bottom: 0 !important; }

	/* ---- 1: header scrolls away (no sticky) ------------------------------- */
	.yb .whb-header.whb-sticky-real,
	.yb .whb-header .whb-main-header,
	.yb .whb-header.whb-sticked .whb-main-header {
		position: relative !important;
		top: auto !important;
		transform: none !important;
		box-shadow: none !important;
	}
	.yb .whb-header.whb-sticky-real { height: auto !important; padding-top: 0 !important; }
	.yb .whb-sticky-header,
	.yb .whb-clone { display: none !important; }

	/* ---- 2–5: [burger][logo ........][account][wishlist][bag] / [search] --- */
	body.yb:not(.yb-co) .whb-general-header .whb-general-header-inner {
		display: grid !important;
		grid-template-columns: auto minmax(0, 1fr) auto auto auto;
		grid-template-rows: 56px auto;
		align-items: center;
		column-gap: 0;
		height: auto !important;
		max-height: none !important;
		padding-bottom: 12px;
	}
	body.yb:not(.yb-co) .whb-general-header .whb-col-left,
	body.yb:not(.yb-co) .whb-general-header .whb-col-center { display: none !important; }
	body.yb:not(.yb-co) .whb-general-header .whb-col-right { display: contents !important; }
	body.yb:not(.yb-co) .whb-general-header .whb-col-right > * { display: none !important; }

	body.yb:not(.yb-co) .whb-general-header .whb-mobile-left { grid-column: 1; grid-row: 1; display: flex; }
	body.yb:not(.yb-co) .whb-general-header .whb-mobile-center { grid-column: 2; grid-row: 1; display: flex; justify-content: flex-start; min-width: 0; }
	body.yb:not(.yb-co) .whb-general-header .whb-col-right > .wd-header-my-account { grid-column: 3; grid-row: 1; display: flex !important; }
	body.yb:not(.yb-co) .whb-general-header .whb-col-right > .wd-header-wishlist { grid-column: 4; grid-row: 1; display: flex !important; }
	body.yb:not(.yb-co) .whb-general-header .whb-mobile-right { grid-column: 5; grid-row: 1; display: flex; }
	body.yb:not(.yb-co) .whb-general-header .whb-col-right > .wd-header-search-form {
		grid-column: 1 / -1;
		grid-row: 2;
		display: block !important;
		order: 0;
		margin: 0;
		width: 100%;
	}

	/* 3: hamburger icon only */
	.yb .whb-general-header .wd-header-mobile-nav .wd-tools-text { display: none !important; }
	.yb .whb-general-header .wd-header-mobile-nav > a { padding: 0 14px 0 0; height: 44px; }
	.yb .whb-general-header .wd-header-mobile-nav .wd-tools-icon { margin: 0; }

	/* 4: logo left, right next to the burger */
	.yb .whb-general-header .whb-mobile-center .site-logo { padding: 0; text-align: left; }
	.yb .whb-general-header .whb-mobile-center .wd-logo img { max-width: 138px; max-height: 32px; width: auto; }

	/* 5: icon-only account / wishlist / bag, ~24px, ~30px apart */
	.yb .whb-general-header .wd-header-my-account .wd-tools-text,
	.yb .whb-general-header .wd-header-wishlist .wd-tools-text,
	.yb .whb-general-header .whb-mobile-right .wd-header-cart .wd-tools-text,
	.yb .whb-general-header .whb-mobile-right .wd-header-cart .wd-cart-subtotal { display: none !important; }
	.yb .whb-general-header .wd-header-my-account .wd-dropdown { display: none !important; }
	.yb .whb-general-header .wd-header-my-account > a,
	.yb .whb-general-header .wd-header-wishlist > a,
	.yb .whb-general-header .whb-mobile-right .wd-header-cart > a {
		display: inline-flex !important;
		align-items: center;
		justify-content: center;
		min-width: 40px;
		height: 44px;
		padding: 0 3px;
		margin: 0 !important;
	}
	.yb .whb-general-header .wd-header-my-account .wd-tools-icon,
	.yb .whb-general-header .wd-header-wishlist .wd-tools-icon { font-size: 22px; margin: 0; }
	.yb .whb-general-header .wd-header-wishlist .wd-tools-count {
		top: -4px;
		right: -7px;
		min-width: 15px;
		height: 15px;
		line-height: 15px;
		font-size: 9px;
		background: #111;
		color: #fff;
	}

	/* 2: search row — full width input, 1px dark border, 4px radius, icon left */
	.yb .whb-general-header .wd-header-search-form .searchform { width: 100% !important; }
	body.yb:not(.yb-co) .whb-general-header .wd-header-search-form input[type="text"] {
		width: 100%;
		height: 44px;
		padding-left: 40px;
		padding-right: 36px;
		border: 1px solid #2C282E;
		border-radius: 4px;
		background: #fff;
		font-size: 16px; /* 16px stops iOS zooming into the field */
	}
	.yb .whb-general-header .wd-header-search-form .searchsubmit { left: 0; right: auto; width: 40px; }

	/* ---- 12–15: home hero — full-bleed portrait crop, button below --------- */
	body.yb.home .main-page-wrapper:has(.yb-sec--hero2) { padding-top: 0; }
	.yb .yb-sec--hero2 .yb-wrap { padding-left: 0 !important; padding-right: 0 !important; max-width: none; }
	body.yb .yb-sec--hero2 .yb-hero2__media {
		aspect-ratio: auto;
		overflow: visible;
		background: none;
	}
	body.yb .yb-sec--hero2 .yb-hero2__img {
		width: 100%;
		height: min(590px, 151vw);
		object-fit: cover;
		object-position: center;
		background: #E9E9E9;
	}
	body.yb .yb-hero2__media .yb-hero2__inbtn {
		position: static;
		display: block;
		padding: 16px 13px 0;
	}
	body.yb .yb-hero2__inbtn .yb-btn {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 100%;
		height: 56px;
		padding: 0 16px;
		border: 1px solid #111;
		border-radius: 4px;
		background: #fff;
		color: #111;
		font-size: 16px;
		font-weight: 600;
		letter-spacing: 1.2px;
		text-transform: uppercase;
	}
	body.yb .yb-sec--hero2 .yb-hero2__copy { padding: 16px 13px 0; }
	body.yb .yb-sec--hero2 .yb-hero2__title { font-size: 20px; line-height: 1.3; font-weight: 400; text-align: left; margin: 0; }

	/* ---- 26–32: drawer menu (WoodMart's own mobile nav is replaced) -------- */
	.yb .mobile-nav.wd-side-hidden { display: none !important; }
	html.yb-mnav-lock,
	html.yb-mnav-lock body { overflow: hidden !important; }

	/* Overlay ladder (INTEGRATION-3 S7): cookie bar 99900 < drawer 100000 < image popup 100040
	   < added-to-bag modal 100050 < toasts 100100 < skip link 1000001. */
	.yb-mnav { position: fixed; inset: 0; z-index: 100000; }
	.yb-mnav[hidden] { display: none !important; }
	.yb-mnav__overlay {
		position: absolute;
		inset: 0;
		background: rgba(0, 0, 0, .5);
		opacity: 0;
		transition: opacity .3s ease;
	}
	.yb-mnav__panel {
		position: absolute;
		top: 0;
		bottom: 0;
		left: 0;
		display: flex;
		flex-direction: column;
		width: 87vw;
		max-width: 400px;
		background: #fff;
		color: #111;
		transform: translateX(-100%);
		transition: transform .3s ease;
	}
	.yb-mnav.is-open .yb-mnav__overlay { opacity: 1; }
	.yb-mnav.is-open .yb-mnav__panel { transform: none; }

	.yb-mnav__head {
		display: flex;
		align-items: center;
		justify-content: space-between;
		flex: 0 0 auto;
		height: 60px;
		padding: 0 8px 0 20px;
		border-bottom: 1px solid #E5E5E5;
	}
	.yb-mnav__logo { display: inline-flex; align-items: center; color: #111; }
	.yb-mnav__logo img { display: block; width: auto; max-width: 130px; max-height: 30px; }
	.yb-mnav__logo-text { font-size: 16px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
	.yb-mnav__close,
	.yb-mnav__back {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		padding: 0;
		border: 0;
		background: none;
		color: #111;
		cursor: pointer;
		box-shadow: none;
		min-height: 0;
	}

	.yb-mnav__viewport { position: relative; flex: 1 1 auto; overflow: hidden; }
	.yb-mnav__level {
		position: absolute;
		inset: 0;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior: contain;
		background: #fff;
		transition: transform .3s ease;
	}
	.yb-mnav__level--root.is-behind { transform: translateX(-30%); }
	.yb-mnav__level--sub { transform: translateX(100%); visibility: hidden; transition: transform .3s ease, visibility 0s linear .3s; }
	.yb-mnav__level--sub.is-active { transform: none; visibility: visible; transition: transform .3s ease, visibility 0s; }

	.yb-mnav__list,
	.yb-mnav__util { list-style: none; margin: 0; padding: 0; }
	.yb-mnav__list { padding: 0 20px; }
	.yb-mnav__list > li { margin: 0; border-bottom: 1px solid #E5E5E5; }
	.yb .yb-mnav__item {
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		min-height: 63px;
		padding: 0;
		border: 0;
		background: none;
		box-shadow: none;
		color: #111;
		font-family: inherit;
		font-size: 20px;
		font-weight: 400;
		line-height: 1.2;
		letter-spacing: 0;
		text-align: left;
		text-transform: none;
		cursor: pointer;
	}
	.yb .yb-mnav__item:hover,
	.yb .yb-mnav__item:focus { background: none; color: #111; }
	.yb .yb-mnav__item.yb-mnav__all { font-size: 16px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; }
	.yb-mnav__chev { flex: 0 0 auto; margin-left: 12px; color: #111; }

	.yb-mnav__util { padding: 20px 20px 32px; }
	.yb-mnav__util li { margin: 0; }
	.yb .yb-mnav__util a {
		display: block;
		padding: 9px 0;
		color: #111;
		font-size: 16px;
		font-weight: 400;
		line-height: 1.4;
		text-transform: none;
	}

	.yb-mnav__subhead {
		position: sticky;
		top: 0;
		z-index: 1;
		display: flex;
		align-items: center;
		height: 56px;
		padding: 0 8px;
		background: #fff;
		border-bottom: 1px solid #E5E5E5;
	}
	.yb-mnav__subtitle { flex: 1 1 auto; font-size: 20px; font-weight: 600; padding-right: 44px; text-align: center; }
}

@media (max-width: 1024px) and (prefers-reduced-motion: reduce) {
	.yb-mnav__overlay,
	.yb-mnav__panel,
	.yb-mnav__level { transition: none !important; }
}
