/* Ethnic Hanger Storefront Nav
   Self-contained styles for the category strip + hamburger drawer.
   Class prefix: .ehs-  | Theme override hook: --ehs-accent */

:root {
	--ehs-accent: #c0392b;
}

/* ----------------------------------------------------------------------------
   Category strip
---------------------------------------------------------------------------- */
.ehs-catbar {
	position: relative;
	width: 100%;
	box-sizing: border-box;
	padding: 10px 38px;
	background: #fff;
}

.ehs-catbar-track {
	display: flex;
	gap: 14px;
	overflow-x: auto;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;            /* Firefox */
	padding: 4px 2px;
}
.ehs-catbar-track::-webkit-scrollbar { display: none; } /* WebKit */

.ehs-catbar.ehs-align-center .ehs-catbar-track {
	justify-content: center;
	flex-wrap: nowrap;
}
/* When centred content overflows, fall back to natural left alignment. */
.ehs-catbar.ehs-align-center .ehs-catbar-track { justify-content: safe center; }

.ehs-cat {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	color: #1a1a1a;
	white-space: nowrap;
	transition: color .15s ease, background .15s ease, border-color .15s ease;
}

/* Pill style (default) */
.ehs-style-pill .ehs-cat {
	border: 1px solid #e3e3e3;
	border-radius: 999px;
	padding: 9px 18px;
	font-size: 14px;
	font-weight: 600;
	background: #fafafa;
}
.ehs-style-pill .ehs-cat:hover {
	border-color: var(--ehs-accent);
	color: var(--ehs-accent);
	background: #fff;
}

/* Card style (image-led, like the reference site) */
.ehs-style-card .ehs-cat {
	flex-direction: column;
	gap: 6px;
	padding: 4px;
	font-size: 13px;
	font-weight: 600;
	text-align: center;
	width: 86px;
}
.ehs-style-card .ehs-cat:hover { color: var(--ehs-accent); }

.ehs-cat-img {
	display: block;
	width: 70px;
	height: 70px;
	border-radius: 50%;
	overflow: hidden;
	background: #f1f1f1;
	border: 2px solid #eee;
}
.ehs-style-pill .ehs-cat-img { width: 26px; height: 26px; border-width: 1px; }
.ehs-cat-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.ehs-cat-label { line-height: 1.2; }

/* SALE gets a highlighted look */
.ehs-cat-sale .ehs-cat-label { color: var(--ehs-accent); }
.ehs-style-pill .ehs-cat-sale {
	background: var(--ehs-accent);
	border-color: var(--ehs-accent);
}
.ehs-style-pill .ehs-cat-sale .ehs-cat-label,
.ehs-style-pill .ehs-cat-sale:hover .ehs-cat-label { color: #fff; }
.ehs-style-pill .ehs-cat-sale:hover { filter: brightness(.92); }

/* Scroll arrows (shown by JS only when content overflows) */
.ehs-catbar-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 30px;
	height: 30px;
	border: 1px solid #e0e0e0;
	background: #fff;
	border-radius: 50%;
	cursor: pointer;
	font-size: 14px;
	line-height: 1;
	color: #444;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.ehs-catbar-arrow.ehs-prev { left: 4px; }
.ehs-catbar-arrow.ehs-next { right: 4px; }
.ehs-catbar-arrow:hover { color: var(--ehs-accent); border-color: var(--ehs-accent); }
.ehs-catbar-arrow[hidden] { display: none; }

/* ----------------------------------------------------------------------------
   Hamburger button
---------------------------------------------------------------------------- */
.ehs-burger {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: transparent;
	border: 0;
	cursor: pointer;
	padding: 8px;
	color: inherit;
	font: inherit;
}
.ehs-burger-fixed {
	position: fixed;
	top: 14px;
	left: 14px;
	z-index: 9998;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0,0,0,.12);
}
.ehs-burger-lines {
	display: inline-block;
	width: 24px;
	height: 18px;
	position: relative;
}
.ehs-burger-lines span {
	position: absolute;
	left: 0;
	height: 2px;
	width: 100%;
	background: currentColor;
	border-radius: 2px;
	transition: transform .25s ease, opacity .2s ease;
}
.ehs-burger-lines span:nth-child(1) { top: 0; }
.ehs-burger-lines span:nth-child(2) { top: 8px; }
.ehs-burger-lines span:nth-child(3) { top: 16px; }
.ehs-burger-text { font-size: 14px; font-weight: 600; }

/* Docked inside the theme header, lined up with the logo / nav row */
.ehs-burger-header {
	align-self: center;
	margin: 0 6px;
	color: #78053c;
}
.ehs-burger-header .ehs-burger-lines { width: 26px; height: 19px; }
.ehs-burger-header:hover { color: var(--ehs-accent); }

/* Animate to an X while the drawer is open */
body.ehs-drawer-open .ehs-burger-lines span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
body.ehs-drawer-open .ehs-burger-lines span:nth-child(2) { opacity: 0; }
body.ehs-drawer-open .ehs-burger-lines span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ----------------------------------------------------------------------------
   Slide-in drawer
---------------------------------------------------------------------------- */
.ehs-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.45);
	opacity: 0;
	transition: opacity .25s ease;
	z-index: 9998;
}
.ehs-overlay.ehs-show { opacity: 1; }
.ehs-overlay[hidden] { display: none; }

.ehs-drawer {
	position: fixed;
	top: 0;
	left: 0;
	height: 100%;
	width: 320px;
	max-width: 86vw;
	background: #fff;
	box-shadow: 2px 0 24px rgba(0,0,0,.18);
	transform: translateX(-100%);
	transition: transform .28s ease;
	z-index: 9999;
	display: flex;
	flex-direction: column;
	overflow-y: auto;
}
.ehs-drawer.ehs-show { transform: translateX(0); }
.ehs-drawer[hidden] { display: none; }

.ehs-drawer-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 20px;
	border-bottom: 1px solid #eee;
}
.ehs-drawer-title { font-size: 16px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.ehs-drawer-close {
	background: none;
	border: 0;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	color: #444;
	padding: 0 4px;
}
.ehs-drawer-close:hover { color: var(--ehs-accent); }

.ehs-drawer-nav { padding: 8px 0 24px; }
.ehs-drawer-nav ul { list-style: none; margin: 0; padding: 0; }
.ehs-drawer-nav li { border-bottom: 1px solid #f3f3f3; }
.ehs-drawer-nav a {
	display: block;
	padding: 14px 22px;
	text-decoration: none;
	color: #1a1a1a;
	font-size: 15px;
	font-weight: 500;
}
.ehs-drawer-nav a:hover { background: #faf5f5; color: var(--ehs-accent); }
.ehs-drawer-nav .sub-menu a { padding-left: 38px; font-size: 14px; color: #555; }
.ehs-menu-empty { padding: 16px 22px; }

/* Accordion: collapse sub-menus behind a + toggle */
.ehs-drawer-nav .menu-item-has-children { position: relative; }
.ehs-drawer-nav .menu-item-has-children > a { padding-right: 54px; }
.ehs-drawer-nav .menu-item-has-children > .sub-menu { display: none; }
.ehs-drawer-nav .menu-item-has-children.ehs-acc-open > .sub-menu { display: block; }
.ehs-acc-toggle {
	position: absolute; top: 2px; right: 6px; width: 44px; height: 46px;
	border: 0; background: transparent; color: var(--ehs-accent);
	font-size: 26px; font-weight: 300; line-height: 1; cursor: pointer;
	z-index: 2; border-radius: 6px; display: flex; align-items: center; justify-content: center;
}
.ehs-acc-toggle:hover { background: #faf5f5; }

/* Lock background scroll while the drawer is open */
body.ehs-drawer-open { overflow: hidden; }

/* ----------------------------------------------------------------------------
   Small screens
---------------------------------------------------------------------------- */
@media (max-width: 600px) {
	.ehs-catbar { padding: 8px 10px; }
	.ehs-catbar-arrow { display: none !important; } /* swipe instead */
	.ehs-style-card .ehs-cat { width: 76px; }
	.ehs-style-card .ehs-cat-img { width: 60px; height: 60px; }
}
