/*
 * Homepage hero v3 — six expanding pillars (Impact Homepage Redesign v3).
 *
 * Desktop: a row of panels; one is open at a time and grows to show its detail.
 * Below 900px the same markup becomes an accordion stack.
 * Everything is scoped under #impact-home-lab .ih so BeTheme's global button/input styles lose.
 */

#impact-home-lab .ih {
	background: #f4f1eb;
	padding: 26px 0 30px;
}

#impact-home-lab .ih__title {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	margin: 0;
	padding: 0;
}

#impact-home-lab .ih svg.ih-i {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
	flex: none;
}

#impact-home-lab .ih__pillars {
	display: flex;
	gap: 12px;
	height: 580px;
}

/* ---------- panel ---------- */
#impact-home-lab .ih-pn {
	position: relative;
	flex: 1 1 0;
	min-width: 0;
	border-radius: 10px;
	overflow: hidden;
	color: #fff;
	isolation: isolate;
	background: var(--impact-deep);
	transition: flex-grow .6s cubic-bezier(.2,.75,.25,1), box-shadow .3s;
}
#impact-home-lab .ih-pn.is-open { flex-grow: 3.6; }
#impact-home-lab .ih-pn--shop.is-open { flex-grow: 4.4; }

#impact-home-lab .ih-pn__bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	z-index: -2;
	transition: transform .9s cubic-bezier(.2,.75,.25,1);
}
#impact-home-lab .ih-pn.is-open .ih-pn__bg { transform: scale(1.04); }

#impact-home-lab .ih-pn::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background: linear-gradient(180deg, rgba(11,26,33,.25) 0%, rgba(11,26,33,.45) 45%, rgba(11,26,33,.92) 100%);
}
#impact-home-lab .ih-pn.is-open::after {
	background: linear-gradient(180deg, rgba(11,26,33,.35) 0%, rgba(11,26,33,.1) 30%, rgba(11,26,33,.55) 58%, rgba(11,26,33,.94) 100%);
}
#impact-home-lab .ih-pn--shop {
	background: var(--impact-product-gradient);
	box-shadow: 0 18px 40px rgba(192,0,0,.22);
}
#impact-home-lab .ih-pn--shop::after { display: none; }

/* collapsed state: the whole panel is one button */
#impact-home-lab .ih-pn__toggle {
	all: unset;
	box-sizing: border-box;
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: flex-start;
	gap: 12px;
	padding: 20px 18px 22px;
	cursor: pointer;
	color: #fff;
	font-family: inherit;
	text-align: left;
	transition: opacity .25s .3s;
}
#impact-home-lab .ih-pn__toggle:focus-visible {
	outline: 3px solid #fff;
	outline-offset: -6px;
	border-radius: 10px;
}
#impact-home-lab .ih-pn.is-open .ih-pn__toggle {
	opacity: 0;
	pointer-events: none;
	transition-delay: 0s;
}
#impact-home-lab .ih-pn__num {
	position: absolute;
	top: 20px;
	left: 18px;
	font-family: "IBM Plex Mono", monospace;
	font-size: 12px;
	color: rgba(255,255,255,.85);
}
#impact-home-lab .ih-pn__ico {
	width: 36px;
	height: 36px;
	border-radius: 7px;
	background: var(--impact-service-gradient);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 14px rgba(0,0,0,.25);
	flex: none;
}
#impact-home-lab .ih-pn--shop .ih-pn__ico { background: rgba(255,255,255,.22); box-shadow: none; }
#impact-home-lab .ih-pn__name {
	font-size: 16px;
	font-weight: 600;
	line-height: 1.25;
	color: #fff;
}
#impact-home-lab .ih-pn__go {
	font-size: 12.5px;
	font-weight: 500;
	color: rgba(255,255,255,.82);
}
#impact-home-lab .ih-pn__pm { display: none; }

/* open state: detail panel, fixed width so text never reflows while the flex animates */
#impact-home-lab .ih-pn__full {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: var(--ih-full-w, 524px);
	max-width: 100%;
	padding: 24px 32px 30px;
	display: flex;
	flex-direction: column;
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px);
	transition: opacity .2s, transform .2s, visibility 0s .2s;
}
#impact-home-lab .ih-pn--shop .ih-pn__full { --ih-full-w: 586px; }
#impact-home-lab .ih-pn.is-open .ih-pn__full {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition: opacity .45s .25s, transform .45s .25s, visibility 0s;
}
#impact-home-lab .ih-pn__top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
}
#impact-home-lab .ih-tab {
	display: inline-block;
	padding: 5px 12px;
	border-radius: 4px;
	color: #fff;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: .12em;
	text-transform: uppercase;
	background: var(--impact-service-gradient);
}
#impact-home-lab .ih-pn--shop .ih-tab { background: rgba(255,255,255,.2); }
#impact-home-lab .ih-idx {
	font-family: "IBM Plex Mono", monospace;
	font-size: 12px;
	color: rgba(255,255,255,.85);
}
#impact-home-lab .ih-pn__body {
	margin-top: auto;
	display: flex;
	flex-direction: column;
	gap: 14px;
}
#impact-home-lab .ih-pn__full h2 {
	margin: 0;
	color: #fff;
	font-size: 36px;
	font-weight: 700;
	letter-spacing: -.015em;
	line-height: 1.08;
}
#impact-home-lab .ih-pn__full p {
	margin: 0;
	font-size: 15px;
	line-height: 1.6;
	color: rgba(255,255,255,.88);
	max-width: 440px;
}
#impact-home-lab .ih-pn--shop .ih-pn__full h2 { margin-top: 30px; }
#impact-home-lab .ih-pn--shop .ih-pn__full p { margin-top: 10px; }

#impact-home-lab .ih-acts {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	margin-top: 8px;
}
#impact-home-lab .ih-pn--shop .ih-acts { margin-top: auto; gap: 18px; }
#impact-home-lab .ih-note { font-size: 13px; color: rgba(255,255,255,.9); }

/* buttons */
#impact-home-lab .ih-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0;
	border: 0;
	border-radius: 6px;
	padding: 12px 22px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	box-shadow: none;
	transition: background .15s, color .15s;
}
#impact-home-lab .ih-btn--red { background: var(--impact-red); color: #fff; }
#impact-home-lab .ih-btn--red:hover { background: var(--impact-red-2); color: #fff; }
#impact-home-lab .ih-btn--ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.55); }
#impact-home-lab .ih-btn--ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
#impact-home-lab .ih-btn--white { background: #fff; color: var(--impact-red); }
#impact-home-lab .ih-btn--white:hover { background: #fff4ee; color: var(--impact-red-2); }

/* product search */
#impact-home-lab .ih-search {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 20px 0 0;
	background: #fff;
	border-radius: 8px;
	padding: 6px 6px 6px 14px;
	color: #8b8377;
	box-shadow: 0 10px 24px rgba(120,20,0,.22);
}
#impact-home-lab .ih-search input[type="search"] {
	flex: 1;
	min-width: 0;
	width: auto;
	height: auto;
	margin: 0;
	border: 0;
	outline: 0;
	box-shadow: none;
	background: transparent;
	padding: 8px 0;
	font: inherit;
	font-size: 15px;
	color: var(--impact-slate);
	-webkit-appearance: none;
	appearance: none;
}
#impact-home-lab .ih-search .ih-btn { padding: 10px 18px; font-size: 14px; }

/* live search results — overlay the category tiles below the field */
#impact-home-lab .ih-searchbox { position: relative; z-index: 3; }
#impact-home-lab .ih-searchbox.is-loading .ih-search > svg.ih-i { animation: ih-pulse .8s ease-in-out infinite alternate; }
#impact-home-lab .ih-results {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	max-height: 318px;
	overflow-y: auto;
	overscroll-behavior: contain;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 18px 40px rgba(60, 10, 0, .3);
	padding: 6px;
	color: var(--impact-slate);
	text-align: left;
}
#impact-home-lab .ih-results[hidden] { display: none; }
#impact-home-lab .ih-results__item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 7px 8px;
	border-radius: 6px;
	color: var(--impact-slate);
	text-decoration: none;
}
#impact-home-lab .ih-results__item:hover,
#impact-home-lab .ih-results__item[aria-selected="true"] {
	background: #f4f1eb;
	color: var(--impact-red);
}
#impact-home-lab .ih-results__thumb {
	flex: none;
	width: 48px;
	height: 48px;
	border-radius: 6px;
	background: var(--impact-product-surface);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
#impact-home-lab .ih-results__thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}
#impact-home-lab .ih-results__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}
#impact-home-lab .ih-results__text strong {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	color: inherit;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
#impact-home-lab .ih-results__text small {
	font-size: 12px;
	color: #7a7f86;
	font-family: "IBM Plex Mono", monospace;
}
#impact-home-lab .ih-results__note {
	margin: 0;
	padding: 12px 10px;
	font-size: 14px;
	color: var(--impact-slate);
}
#impact-home-lab .ih-results__all {
	display: block;
	margin-top: 4px;
	padding: 10px 8px 8px;
	border-top: 1px solid #ede9e2;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--impact-red);
	text-decoration: none;
}
#impact-home-lab .ih-results__all:hover { text-decoration: underline; }

@keyframes ih-pulse {
	from { opacity: 1; }
	to { opacity: .35; }
}

/* category tiles inside the shop panel */
#impact-home-lab .ih-cats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
	margin-top: 14px;
}
#impact-home-lab .ih-cats a {
	background: #fff;
	border-radius: 8px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 10px 8px 11px;
	color: var(--impact-slate);
	font-weight: 600;
	font-size: 13px;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	transition: transform .2s, box-shadow .2s, color .2s;
}
#impact-home-lab .ih-cats a:hover {
	transform: translateY(-3px);
	color: var(--impact-red);
	box-shadow: 0 10px 20px rgba(120,20,0,.2);
}
#impact-home-lab .ih-cats__im {
	height: 78px;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}
#impact-home-lab .ih-cats img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

/* ---------- small desktop / tablet landscape ---------- */
@media (max-width: 1279px) {
	#impact-home-lab .ih__pillars { height: 560px; gap: 10px; }
	#impact-home-lab .ih-pn.is-open { flex-grow: 5; }
	#impact-home-lab .ih-pn--shop.is-open { flex-grow: 6.5; }
	#impact-home-lab .ih-pn__full { --ih-full-w: 440px; padding: 22px 24px 26px; }
	#impact-home-lab .ih-pn--shop .ih-pn__full { --ih-full-w: 500px; }
	#impact-home-lab .ih-pn__full h2 { font-size: 30px; }
	#impact-home-lab .ih-cats__im { height: 64px; }
	#impact-home-lab .ih-pn__toggle { padding: 18px 12px 20px; }
	#impact-home-lab .ih-pn__num { left: 12px; }
	#impact-home-lab .ih-pn__go { display: none; }
}

/* collapsed pillars are ~70px wide here: set the name vertically so it is never clipped */
@media (min-width: 900px) and (max-width: 1279px) {
	#impact-home-lab .ih-pn__toggle { align-items: center; }
	#impact-home-lab .ih-pn__name {
		writing-mode: vertical-rl;
		transform: rotate(180deg);
		white-space: nowrap;
		font-size: 15px;
		line-height: 1.2;
	}
}

/* ---------- mobile: accordion stack ---------- */
@media (max-width: 899px) {
	#impact-home-lab .ih { padding: 14px 0 18px; }
	#impact-home-lab .ih .impact-container { width: calc(100% - 36px); }
	#impact-home-lab .ih__pillars {
		flex-direction: column;
		gap: 8px;
		height: auto;
	}
	#impact-home-lab .ih-pn,
	#impact-home-lab .ih-pn.is-open,
	#impact-home-lab .ih-pn--shop.is-open { flex: none; }
	#impact-home-lab .ih-pn::after {
		background: linear-gradient(90deg, rgba(11,26,33,.88), rgba(11,26,33,.5));
	}
	#impact-home-lab .ih-pn.is-open::after {
		background: linear-gradient(180deg, rgba(11,26,33,.7) 0%, rgba(11,26,33,.15) 26%, rgba(11,26,33,.6) 55%, rgba(11,26,33,.94) 100%);
	}
	#impact-home-lab .ih-pn.is-open .ih-pn__bg { transform: none; }
	#impact-home-lab .ih-pn--shop { box-shadow: none; }

	#impact-home-lab .ih-pn__toggle,
	#impact-home-lab .ih-pn.is-open .ih-pn__toggle {
		position: relative;
		inset: auto;
		height: 64px;
		width: 100%;
		flex-direction: row;
		align-items: center;
		justify-content: flex-start;
		gap: 12px;
		padding: 0 14px;
		opacity: 1;
		pointer-events: auto;
		transition: none;
	}
	#impact-home-lab .ih-pn__num,
	#impact-home-lab .ih-pn__go { display: none; }
	#impact-home-lab .ih-pn__ico { width: 34px; height: 34px; box-shadow: none; }
	#impact-home-lab .ih-pn__name { flex: 1; font-size: 15.5px; }
	#impact-home-lab .ih-pn__pm {
		display: flex;
		width: 28px;
		height: 28px;
		border-radius: 50%;
		background: rgba(255,255,255,.18);
		align-items: center;
		justify-content: center;
		transition: transform .3s;
	}
	#impact-home-lab .ih-pn__pm svg.ih-i { width: 15px; height: 15px; }
	#impact-home-lab .ih-pn.is-open .ih-pn__pm { transform: rotate(45deg); }

	#impact-home-lab .ih-pn__full,
	#impact-home-lab .ih-pn.is-open .ih-pn__full {
		position: static;
		width: auto;
		max-width: none;
		padding: 0 14px 14px;
		transform: none;
	}
	#impact-home-lab .ih-pn__full { display: none; }
	#impact-home-lab .ih-pn.is-open .ih-pn__full {
		display: flex;
		gap: 12px;
		min-height: 236px;
		animation: ih-fade .35s ease both;
	}
	#impact-home-lab .ih-pn--shop.is-open .ih-pn__full { min-height: 0; }
	#impact-home-lab .ih-pn__top { display: none; }
	#impact-home-lab .ih-pn__full h2 { display: none; }
	#impact-home-lab .ih-pn__full p,
	#impact-home-lab .ih-pn--shop .ih-pn__full p { margin: 0; font-size: 13.5px; line-height: 1.5; }
	#impact-home-lab .ih-pn__body { gap: 12px; }
	#impact-home-lab .ih-acts,
	#impact-home-lab .ih-pn--shop .ih-acts {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 8px;
		margin-top: 0;
	}
	#impact-home-lab .ih-pn--shop .ih-acts { grid-template-columns: 1fr; }
	#impact-home-lab .ih-note { display: none; }
	#impact-home-lab .ih-btn { font-size: 14px; padding: 11px 12px; }
	#impact-home-lab .ih-search { margin: 0; padding: 5px 5px 5px 12px; }
	#impact-home-lab .ih-search input[type="search"] { font-size: 16px; padding: 7px 0; }
	#impact-home-lab .ih-search .ih-btn { padding: 9px 14px; }
	/* the open panel has no fixed height here, so results push the tiles down instead of overlaying */
	#impact-home-lab .ih-results {
		position: static;
		margin-top: 6px;
		max-height: 340px;
		box-shadow: 0 10px 24px rgba(60, 10, 0, .22);
	}
	#impact-home-lab .ih-cats { gap: 8px; margin-top: 0; }
	#impact-home-lab .ih-cats a { font-size: 11.5px; padding: 8px 4px 9px; gap: 4px; }
	#impact-home-lab .ih-cats__im { height: 48px; }
}

@keyframes ih-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	#impact-home-lab .ih-pn,
	#impact-home-lab .ih-pn__bg,
	#impact-home-lab .ih-pn__toggle,
	#impact-home-lab .ih-pn__full,
	#impact-home-lab .ih-cats a { transition: none !important; animation: none !important; }
	#impact-home-lab .ih-pn.is-open .ih-pn__bg { transform: none; }
}
