/* Biowell Mega Menu — product-only panel, isolated from existing navigation. */
.bw-site-header .bw-primary-menu > li.bw-has-mega { position:static; }
.bw-site-header .bw-primary-menu > li.bw-has-mega > a { padding-right:20px; }
.bw-mega-toggle {
	display:grid;place-items:center;border:0;background:transparent;color:inherit;
	cursor:pointer;padding:0;transition:background .2s;
}
.bw-primary-menu > .bw-has-mega > .bw-mega-toggle {
	position:absolute;top:50%;transform:translateY(-50%);margin-left:0;
	width:22px;height:32px;z-index:2;
}
.bw-primary-menu > .bw-has-mega { display:flex;align-items:center; }
.bw-primary-menu > .bw-has-mega > .bw-mega-toggle { position:relative;top:auto;transform:none;margin-left:-22px; }
.bw-mega-toggle svg { transition:transform .2s; }
.is-mega-open > .bw-mega-toggle svg { transform:rotate(180deg); }
.bw-mega-toggle:focus-visible,.bw-mega-product:focus-visible,.bw-mega-panel__all:focus-visible { outline:2px solid #222;outline-offset:3px; }
.bw-mega-panel {
	position:absolute;top:100%;left:0;width:100%;z-index:50;
	background:#fff;border-top:1px solid #dedede;border-bottom:1px solid #b8b8b8;
	box-shadow:0 16px 28px rgba(0,0,0,.06);
	opacity:0;visibility:hidden;pointer-events:none;transform:translateY(5px);
	transition:opacity .18s ease,visibility .18s ease,transform .18s ease;
	color:#222;
}
.bw-site-header .bw-has-mega.is-mega-open > .bw-mega-panel {
	opacity:1;visibility:visible;pointer-events:auto;transform:none;
}
.bw-mega-panel__inner { width:min(calc(100% - 48px),1440px);margin:auto;padding:24px 0 30px; }
.bw-mega-panel__heading { margin:0 0 20px;font-size:1.1rem;line-height:1.4;font-weight:600;letter-spacing:0;color:#222; }
.bw-mega-products { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));width:100%;gap:0; }
.bw-mega-product {
	display:flex;align-items:center;gap:12px;
	min-width:0;min-height:106px;
	padding:10px 18px 10px 0;margin:0;
	border-right:1px solid #aaa;border-bottom:0;
	color:#222;text-decoration:none;transition:color .18s;
}
.bw-mega-product:hover { color:#8b6a2b; }
.bw-mega-product__image { flex:0 0 72px;width:72px;height:80px;display:flex;align-items:center;justify-content:center;overflow:hidden;border-radius:7px;background:#f2f4f5; }
.bw-mega-product__image img {display:block;width:100%;height:100%;object-fit:contain;padding:3px;margin:0;max-width:none;max-height:none; }
.bw-mega-product__name {font-size:.91rem;line-height:1.4;font-weight:500;overflow-wrap:anywhere; }
.bw-mega-panel__all {display:inline-flex;align-items:center;gap:5px;margin-top:20px;color:#222;text-decoration:underline;text-underline-offset:4px;font-size:.88rem;font-weight:600; }
.bw-mega-panel__all:hover {color:#8b6a2b;}
/* A mega menu without a traditional submenu must not trigger the legacy dropdown. */
.bw-primary-menu > .bw-has-mega:not(.is-mega-open) > .bw-mega-panel {display:block;}
@media (min-width:1025px) {
	.bw-primary-menu > .bw-has-mega > .bw-mega-toggle {font-size:0;}
	.bw-primary-menu > .bw-has-mega > .bw-mega-toggle {margin-right:0;}
	.bw-primary-menu > .bw-has-mega > .sub-menu {top:100%;}
}
@media (max-width:1024px) {
	.bw-mega-panel:not(.bw-mega-panel--mobile) {display:none;}
	.bw-mobile-menu > li.bw-has-mega {position:relative;}
	.bw-mobile-menu > li.bw-has-mega > a {padding-right:54px;}
	.bw-mobile-menu > li.bw-has-mega > .bw-mega-toggle {
		position:absolute;right:0;top:6px;width:42px;height:42px;
		border:0;border-radius:50%;background:#f3f3f3;
	}
	.bw-mobile-menu > li.bw-has-mega > .bw-mega-panel {
		position:static;display:none;width:100%;border:0;border-top:1px solid #e1e1e1;
		box-shadow:none;transform:none;opacity:1;visibility:visible;pointer-events:auto;
	}
	.bw-mobile-menu > li.bw-has-mega.is-mega-open > .bw-mega-panel {display:block;}
	.bw-mobile-menu .bw-mega-panel[hidden] {display:none!important;}
	.bw-mobile-menu .bw-mega-panel__inner {width:100%;padding:17px 0 22px;}
	.bw-mobile-menu .bw-mega-panel__heading {font-size:.94rem;margin:0 0 12px;}
	.bw-mobile-menu .bw-mega-products {display:block;}
	.bw-mobile-menu .bw-mega-product {
		display:flex;max-width:none;width:100%;min-height:91px;
		padding:10px 0;margin:0;border-right:0;border-bottom:1px solid #bbb;gap:14px;
	}
	.bw-mobile-menu .bw-mega-product__image {flex-basis:68px;width:68px;height:70px;}
	.bw-mobile-menu .bw-mega-product__name {font-size:.9rem;font-weight:500;line-height:1.35;}
	.bw-mobile-menu .bw-mega-panel__all {min-height:42px;padding:10px 0;margin-top:8px;font-size:.86rem;}
	.bw-mobile-menu .bw-mega-panel a {padding-right:0;}
}
@media (prefers-reduced-motion:reduce) {
	.bw-mega-panel,.bw-mega-toggle svg {transition:none!important;}
}

@media (min-width:1280px) {
	.bw-mega-products > .bw-mega-product:nth-child(4n) {border-right:0;}
}
@media (min-width:1025px) and (max-width:1279px) {
	.bw-mega-products {grid-template-columns:repeat(3,minmax(0,1fr));}
	.bw-mega-products > .bw-mega-product:nth-child(3n) {border-right:0;}
}

/* 0.6.23: purpose columns, with separate mobile navigation screens. */
.bw-goals-panel .bw-mega-panel__inner{width:calc(100% - 40px);max-width:1680px;padding:28px 0}
.bw-goals-columns{display:grid;grid-template-columns:repeat(6,minmax(0,1fr))}
.bw-goal{min-width:0;padding:0 14px;border-right:1px solid #dedede}
.bw-goal:first-child{padding-left:0}
.bw-goal:last-child{border-right:0;padding-right:0}
.bw-goal-title{display:flex;flex-direction:column;align-items:flex-start;gap:12px;min-height:102px;margin:0 0 12px;color:#222;font-size:15px;line-height:1.4;font-weight:600;letter-spacing:0}
.bw-goal-title svg{flex-shrink:0}
.bw-goals-panel .bw-mega-products{display:block}
.bw-goals-panel .bw-mega-product{border-right:0;border-bottom:1px solid #e9edef;gap:9px;padding:12px 0;min-height:91px;text-decoration:none}
.bw-goals-panel .bw-mega-product:last-child{border-bottom:0}
.bw-goals-panel .bw-mega-product__image{flex:0 0 56px;width:56px;height:66px}
.bw-goals-panel .bw-mega-product__name{font-size:13px;line-height:1.4;overflow-wrap:normal;word-break:normal}
.bw-goal-empty{font-size:13px;color:#777;line-height:1.5}
.bw-goals-back,.bw-goal-entry{font:inherit;color:#222;background:transparent;border:0;cursor:pointer}
.bw-goals-back:focus-visible,.bw-goal-entry:focus-visible{outline:2px solid #222;outline-offset:-2px}
.bw-goals-panel [hidden]{display:none!important}
@media(min-width:1025px){
 .bw-goals-panel{max-height:calc(100dvh - 160px);overflow-y:auto}
}
@media(min-width:1025px) and (max-width:1279px){
 .bw-goal{padding:0 9px}
 .bw-goal-title{font-size:13px;min-height:108px}
 .bw-goals-panel .bw-mega-product{gap:6px}
 .bw-goals-panel .bw-mega-product__image{flex-basis:40px;width:40px;height:52px}
 .bw-goals-panel .bw-mega-product__name{font-size:12px}
}
@media(max-width:1024px){
 .bw-mobile-nav{overflow-x:hidden}
 .bw-mobile-menu.bw-goals-active>li:not(.is-mega-open){display:none}
 .bw-mobile-menu.bw-goals-active>.is-mega-open>a,
 .bw-mobile-menu.bw-goals-active>.is-mega-open>.bw-mega-toggle,
 .bw-mobile-menu.bw-goals-active>.is-mega-open>.sub-menu{display:none!important}
 .bw-mobile-menu.bw-goals-active>li.is-mega-open{border:0}
 .bw-mobile-menu .bw-goals-panel{border:0!important;min-height:55dvh}
 .bw-mobile-menu .bw-goals-panel .bw-mega-panel__inner{width:100%;padding:0 0 24px}
 .bw-goals-columns{display:block}
 .bw-goal,.bw-goal:first-child,.bw-goal:last-child{padding:0;border:0}
 .bw-goal-entry{display:flex;align-items:center;gap:14px;padding:22px 0;width:100%;min-height:82px;text-align:left;border-bottom:1px solid #e9edef;font-size:17px;font-weight:600;line-height:1.4}
 .bw-goal-entry>svg{flex-shrink:0;width:24px;height:24px}
 .bw-goal-entry>span:last-child{margin-left:auto;font-size:28px;font-weight:400}
 .bw-goals-back{display:block;padding:16px 0;min-height:48px;font-size:15px;text-align:left}
 .bw-goals-menu-title{font-size:21px;margin:8px 0 10px}
 .bw-goal-title{min-height:0;font-size:22px;gap:10px;margin:15px 0 20px;flex-direction:row;align-items:center}
 .bw-goals-panel.is-goal-open .bw-goal-entry,
 .bw-goals-panel.is-goal-open [data-goals-root-back],
 .bw-goals-panel.is-goal-open .bw-goals-menu-title{display:none}
 .bw-mobile-menu .bw-goals-panel .bw-mega-product{min-height:110px;padding:12px 0;gap:18px;border-bottom:1px solid #e9edef}
 .bw-mobile-menu .bw-goals-panel .bw-mega-product__image{flex-basis:76px;width:76px;height:86px}
 .bw-mobile-menu .bw-goals-panel .bw-mega-product__name{font-size:17px;font-weight:400;line-height:1.45}
 .bw-goals-slide-in{animation:bw-goals-in .24s ease both}
 .bw-goals-slide-back{animation:bw-goals-back .24s ease both}
}
@keyframes bw-goals-in{from{opacity:.4;transform:translateX(100%)}to{opacity:1;transform:translateX(0)}}
@keyframes bw-goals-back{from{opacity:.4;transform:translateX(-100%)}to{opacity:1;transform:translateX(0)}}
@media(prefers-reduced-motion:reduce){.bw-goals-slide-in,.bw-goals-slide-back{animation:none!important}}

/* 0.6.24: compact headings and a single, unframed product image. */
.bw-mega-panel{border:0;transform:none}
.bw-mega-panel .bw-mega-product,
.bw-mobile-menu .bw-mega-panel .bw-mega-product{border:0}
.bw-goal{border:0}
.bw-goals-panel .bw-goal-title{min-height:0;margin:0 0 6px;padding:0 0 10px;border-bottom:1px solid #e3e3e3;display:block}
.bw-goals-panel .bw-mega-product{padding:8px 0;min-height:82px}
.bw-mega-panel .bw-mega-product__image{background:transparent;border:0;border-radius:0;box-shadow:none}
.bw-mega-panel .bw-mega-product__image img{padding:0;background:transparent;border:0;border-radius:0;box-shadow:none}
@media(min-width:1025px){
 .bw-goals-columns{align-items:start}
 .bw-goals-panel .bw-mega-panel__inner{padding:22px 0}
}
@media(max-width:1024px){
 .bw-mobile-menu > li.bw-has-mega > .bw-mega-panel{border:0}
 .bw-goal-entry{border:0}
 .bw-goals-panel .bw-goal-title{margin:10px 0 6px}
 .bw-mobile-menu .bw-goals-panel .bw-mega-product{padding:8px 0;min-height:100px}
}

/* 0.6.25: square, uncropped images and a continuous white header/menu. */
.bw-mega-panel .bw-mega-product__image{
 --bw-mega-image-size:72px;
 flex:0 0 var(--bw-mega-image-size);
 width:var(--bw-mega-image-size);height:var(--bw-mega-image-size);
 aspect-ratio:1 / 1;border-radius:8px;overflow:hidden;background:transparent;
}
.bw-goals-panel .bw-mega-product__image{--bw-mega-image-size:56px}
.bw-mega-panel .bw-mega-product__image img{
 width:100%;height:100%;object-fit:contain;object-position:center;
 padding:0;border-radius:8px;
}
@media(min-width:1025px) and (max-width:1279px){
 .bw-goals-panel .bw-mega-product__image{--bw-mega-image-size:40px}
}
@media(max-width:1024px){
 .bw-mobile-menu .bw-mega-panel .bw-mega-product__image{
  --bw-mega-image-size:68px;
  flex-basis:var(--bw-mega-image-size);
  width:var(--bw-mega-image-size);height:var(--bw-mega-image-size);
 }
 .bw-mobile-menu .bw-goals-panel .bw-mega-product__image{--bw-mega-image-size:76px}
}
@media(min-width:1025px){
 .bw-site-header:has(.bw-primary-menu > .is-mega-open){
  background:#fff!important;border-bottom-color:transparent!important;
  box-shadow:none!important;
 }
 .bw-site-header:has(.bw-primary-menu > .is-mega-open) .bw-header__inner{
  background:#fff!important;border-bottom-color:transparent!important;
 }
 .bw-site-header .bw-mega-panel{background:#fff!important;border-top:0!important}
}

/* 0.6.26: static mega-menu items must not stretch the link underline
   across their containing block (the entire site header). */
.bw-site-header .bw-primary-menu > li.bw-has-mega > a::after{
 content:none!important;
 display:none!important;
}

/* 0.6.27: match .bw-container used by .bw-header__inner. */
@media (min-width:1025px){
 .bw-site-header .bw-mega-panel .bw-mega-panel__inner{
  width:min(calc(100% - (2 * var(--bw-gutter))), var(--bw-container));
  max-width:var(--bw-container);
  margin-inline:auto;
  padding-inline:0;
 }
}
