/* commonBody9Side.css - start
   Rewritten mobile-first with flexbox + CSS custom properties.
   Palette intentionally matches commonBody8Nav.css's accent color so the
   nav bar and sidebar read as one cohesive system. Consider eventually
   moving shared vars (--*-accent, --*-radius etc.) into one small
   tokens.css both files import, instead of redeclaring them per file. */

:root {
	/* Sober, commercial palette: white panel, hairline borders, neutral
	   slate text, and the same teal as the header nav for hover / active
	   states so the sidebar and nav read as one system. */
	--side-surface: #ffffff;
	--side-surface-alt: #fafcfd;
	--side-border: #dde8ec;
	--side-divider: #edf2f4;
	--side-heading: #22323b;
	--side-text: #22323b;
	--side-sub-text: #595959;
	--side-muted: #7a8a93;
	--side-accent: #1b7d9c;          /* header nav teal */
	--side-accent-dark: #166a86;
	--side-hover-bg: #f4f6f7;
	--side-active-bg: #eef6f9;
	--side-active-border: #1b7d9c;   /* also used for focus outlines */
	--side-sub-hover: #1b7d9c;
	--side-radius: 8px;
	--side-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
	--side-transition: 0.2s ease;
	--side-width: 240px;
}

#divcenter, #divcenter * {
	box-sizing: border-box;
}

#divcenter {
	height: auto;
	width: 100%;
	display: flex;             /* was: block + float clearfix */
	align-items: flex-start;
	gap: 20px;
	position: relative;
}
/* The home page's banner slider needs real height to not look collapsed
   before its images load; every other page's #divcenter now typically
   contains only the sidebar (banner is home-page-only - see
   commonBodyCloseDivCenter.php), which already sizes itself to its own
   content, so forcing every page's #divcenter to be at least 550px tall
   left a block of dead space below a shorter sidebar. Scoping the min-
   height to only when a banner is actually present avoids that. */
#divcenter:has(#divcontainerbanner) {
	min-height: 550px;
}

/* Generic content-area centering. #divcenter is a flex row whose second
   child is whatever the calling page puts next to #columncats - either
   commonBody10Banner()'s #divcontainerbanner on the home page, or each
   other page's own *Body11Center() wrapper div (id varies per page, e.g.
   #columnlogic). None of those content wrappers were opting into the
   shared max-width/centering the home and category pages already use, so
   they stretched edge-to-edge or (on pages where the wrapper carried no
   real width rule at all) just sat flush against the sidebar with no cap.
   Targeting "whatever isn't the sidebar" here means every current and
   future page gets this for free without adding a class to its own
   markup. */
#divcenter > *:not(#columncats):not(#columncats-backdrop):not(.openbtn) {
	flex: 1 1 0%;
	min-width: 0;
	width: 100%;
	max-width: var(--container-max, 1280px);
	margin: 0 auto;
	box-sizing: border-box;
}

/* Most non-home pages don't nest their content inside #divcenter at all -
   #divcenter closes right after the sidebar (see commonBodyCloseDivCenter.php)
   and each page's own *Body11Center() wrapper renders as a plain sibling of
   #divcenter, further down in <body>. Some of those wrappers have a
   predictable id (#columnlogic - centered separately below), but many carry
   no id/class whatsoever, so nothing was giving them a max-width or centering
   them - they just stretched edge-to-edge against the left-aligned sidebar,
   which is the "content sticks to left" behavior reported. Targeting any
   body-level div that comes after #divcenter, regardless of its own id/
   class, covers those wrappers without needing to touch dozens of individual
   page templates. Also neutralizes the legacy ".col" class's float:left
   where a wrapper still carries it (e.g. #columnlogic on several account
   pages) - a floated element ignores margin:auto centering entirely. */
#divcenter ~ div {
	float: none;
	margin: 0 auto;
	max-width: var(--container-max, 1280px);
	width: 100%;
	box-sizing: border-box;
}

/* ---------- Sidebar container ---------- */
#columncats {
	/* The PHP markup still carries the legacy grid-framework classes
	   "col span_1_of_2" (commonBody4Meta.css: float:left; margin:1% 0 1%
	   1.6%;). Neutralized explicitly here rather than editing the markup,
	   since other legacy pages may still depend on commonBody4Meta.css's
	   .col behavior elsewhere. */
	margin: 0;
	float: none;
	flex: 0 0 var(--side-width);
	width: var(--side-width);
	height: auto;               /* sized to content */
	background: var(--side-surface);
	border: 1px solid var(--side-border);
	border-radius: var(--side-radius);
	box-shadow: var(--side-shadow);
	padding: 0;
	overflow: hidden;
}

/* Section headings ("Categories", "Brands"): small, quiet caps instead of
   the old decorative script heading. */
#columncats h1,
#columncats h2 {
	position: relative;
	margin: 0;
	padding: 13px 16px 11px;
	font-family: 'Open Sans', "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	text-align: left;
	color: var(--side-muted);
	background: var(--side-surface-alt);
	border-bottom: 1px solid var(--side-border);
}
#columncats h2 {
	border-top: 1px solid var(--side-border);
}

#columncats,
#columncats ul,
#columncats li,
#columncats a {
	padding: 0;
	list-style: none;
	font-weight: normal;
	text-decoration: none;
	line-height: 1;
	font-family: 'Open Sans', sans-serif;
	font-size: 14px;
}
#columncats a {
	line-height: 1.35;
}
#columncats > ul {
	margin: 0;
}
#columncats > ul > li {
	margin: 0;
	border-bottom: 1px solid var(--side-divider);
}
#columncats > ul > li:last-child {
	border-bottom: 0;
}

/* Top-level category / brand rows */
#columncats > ul > li > a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 11px 16px 11px 13px;
	font-size: 14px;
	font-weight: 600;
	color: var(--side-text);
	background: transparent;
	/* structure_responsive/styles.css still gives these links a black 1px
	   border, text-shadow and rounded corners (and a bordered, icon-backed
	   <span>) from the old dark-pill design; reset all of it explicitly. */
	border: 0;
	border-left: 3px solid transparent;
	border-radius: 0;
	text-shadow: none;
	transition: background var(--side-transition), color var(--side-transition), border-color var(--side-transition);
}
#columncats > ul > li > a > span,
#columncats > ul > li.active > a > span,
#columncats > ul > li.has-sub > a > span,
#columncats > ul > li.has-sub.active > a > span {
	display: block;
	min-width: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none !important;   /* old +/- icon images */
	font-weight: inherit;
	overflow-wrap: anywhere;
}
#columncats > ul > li > a:hover,
#columncats > ul > li > a:focus-visible {
	background: var(--side-hover-bg);
	color: var(--side-accent-dark);
	outline: none;
}
#columncats > ul > li.active > a {
	background: var(--side-active-bg);
	color: var(--side-accent-dark);
	border: 0;
	border-left: 3px solid var(--side-accent);
	text-shadow: none;
}

/* Chevron for expandable rows - drawn in CSS (no image asset), points down
   when collapsed and flips up when the row is open. */
#columncats > ul > li.has-sub > a::after {
	content: "";
	flex: 0 0 auto;
	width: 7px;
	height: 7px;
	margin-right: 2px;
	border-right: 2px solid #8a98a0;
	border-bottom: 2px solid #8a98a0;
	transform: translateY(-2px) rotate(45deg);
	transition: transform var(--side-transition), border-color var(--side-transition);
}
#columncats > ul > li.has-sub > a:hover::after {
	border-color: var(--side-accent);
}
#columncats > ul > li.has-sub.active > a::after {
	border-color: var(--side-accent);
	transform: translateY(2px) rotate(-135deg);
}

/* ---------- Sub menu ---------- */
#columncats ul ul {
	/* structure_responsive/styles.css still has an old, unconditional
	   #columncats ul ul { display: none; } (never scoped to a media query,
	   so it loads identically on every page). This rule never redeclares
	   display, so the old display:none silently won and kept every submenu
	   permanently hidden no matter what max-height (or .is-open) said.
	   display:block here is what actually lets the max-height transition
	   below show anything. */
	display: block;
	overflow: hidden;
	max-height: 0;
	margin: 0;
	padding: 0 0 0 16px;
	background: var(--side-surface-alt);
	transition: max-height var(--side-transition), padding var(--side-transition);
}
/* .is-open is the single source of truth for "expanded" -
   commonBody9Side.js sets it on click AND on desktop hover
   (mouseenter/mouseleave), so exactly one mechanism decides this; a
   separate CSS :hover rule here once let a panel stay visually open after
   a click to close it. */
#columncats ul ul.is-open {
	max-height: 600px;   /* comfortably larger than any realistic submenu */
	overflow-y: auto;
	padding: 4px 0 8px 16px;
}
#columncats ul ul li {
	padding: 0;
	margin: 0;
}
#columncats ul ul a {
	display: block;
	padding: 7px 14px 7px 12px;
	color: var(--side-sub-text);
	font-size: 13px;
	font-weight: 500;
	border-left: 2px solid var(--side-border);
	overflow-wrap: anywhere;
	transition: color var(--side-transition), border-color var(--side-transition), background var(--side-transition);
}
#columncats ul ul a:hover,
#columncats ul ul a:focus-visible {
	color: var(--side-sub-hover);
	border-left-color: var(--side-accent);
	background: var(--side-active-bg);
	outline: none;
}

/* Backdrop element (inserted by commonBody9Side.js, a plain unclassed
   <div>) needs display:none unconditionally, not just inside the mobile
   media query below — #divcenter is a flex row at every width, and an
   empty block-level div with no un-scoped display rule still counts as
   a flex item (0-width, but still a "gap slot"), which was quietly
   inserting one extra column-gap and pushing #columncats to the right
   of the page edge on desktop. */
#columncats-backdrop {
	display: none;
}

/* ---------- Mobile open/close controls ---------- */
.openbtn {
	display: none;
	position: relative;
	top: 0;
	background: transparent;
	border: 0;
	cursor: pointer;
	padding: 8px;
	border-radius: 6px;
}
.openbtn span {
	display: block;
	margin: 6px 0;
	width: 32px;
	height: 3px;
	background: #333;
	border-radius: 2px;
}
.closebtn {
	display: none;
}

#divcatheader {
	background: #e58434;
}
#divcatheader a {
	color: #fff;
	text-decoration: none;
}
#divcatheader h3 span {
	color: #fff;
}

a:focus-visible, button:focus-visible {
	outline: 2px solid var(--side-active-border);
	outline-offset: 2px;
}

/* =========================================================
   RESPONSIVE — same 960px breakpoint as commonBody8Nav.css so the
   header nav and sidebar collapse together into a consistent
   off-canvas mobile experience.
   ========================================================= */
@media screen and (max-width: 960px) {
	#divcenter {
		display: block;   /* stop reserving flex space for the drawer */
	}
	.openbtn {
		display: inline-flex;
		flex-direction: column;
		margin: 10px 0 10px 12px;
	}
	#columncats {
		position: fixed;
		top: 0;
		left: 0;
		height: 100vh;
		width: min(80vw, var(--side-width));
		border-radius: 0;
		transform: translateX(-100%);
		transition: transform var(--side-transition);
		z-index: 200;
		overflow-y: auto;
		padding-top: 0;
	}
	#columncats h1 {
		padding-right: 48px;   /* room for the close button */
	}
	#columncats.is-open {
		transform: translateX(0);
	}
	.closebtn {
		display: block;
		position: absolute;
		top: 6px;
		right: 14px;
		font-size: 30px;
		line-height: 1;
		background: none;
		border: none;
		color: var(--side-text);
		cursor: pointer;
	}

	#columncats-backdrop {
		display: none;
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, 0.35);
		z-index: 150;
	}
	#columncats-backdrop.is-open {
		display: block;
	}
}

@media (prefers-reduced-motion: reduce) {
	#columncats, #columncats ul ul, .openbtn {
		transition: none !important;
	}
}
/* commonBody9Side.css - end */
