/**
 * Category Navigation — Drawer + Shop by Category section.
 *
 * Scope: ermw-cat-* (drawer), ermw-shopby-* (homepage section).
 * Zero interference with Kadence core, hero, or any other homepage section.
 */

/* ════════════════════════════════════════════════════════════════
   0. CATEGORIES BUTTON APPEARANCE — header trigger
   ════════════════════════════════════════════════════════════════ */

/*
 * Style the "Categories" nav link as a blue outlined button.
 * Only targets the desktop primary nav item with class ermw-cats-trigger.
 * Does not affect mobile drawer or any other nav item.
 */
#site-navigation li.ermw-cats-trigger > a,
.primary-navigation li.ermw-cats-trigger > a,
.header-navigation li.ermw-cats-trigger > a {
	display: inline-flex !important;
	align-items: center !important;
	gap: 6px !important;
	padding: 7px 14px 7px 11px !important;
	border-radius: 8px !important;
	background: #EFF6FF !important;
	border: 1.5px solid #BFDBFE !important;
	color: #1B72E8 !important;
	font-weight: 600 !important;
	font-size: 13.5px !important;
	line-height: 1 !important;
	text-decoration: none !important;
	cursor: pointer !important;
	transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease !important;
}

#site-navigation li.ermw-cats-trigger > a:hover,
#site-navigation li.ermw-cats-trigger > a:focus-visible,
.primary-navigation li.ermw-cats-trigger > a:hover,
.primary-navigation li.ermw-cats-trigger > a:focus-visible,
.header-navigation li.ermw-cats-trigger > a:hover,
.header-navigation li.ermw-cats-trigger > a:focus-visible {
	background: #DBEAFE !important;
	border-color: #93C5FD !important;
	color: #1558C0 !important;
	text-decoration: none !important;
	outline: none !important;
}

/* Hide Kadence's dropdown toggle arrow inside the Categories button */
li.ermw-cats-trigger > a .dropdown-nav-toggle,
li.ermw-cats-trigger > a .nav-drop-title-wrap .dropdown-nav-toggle {
	display: none !important;
}

/* Hide the Kadence mobile drawer sub-menu toggle chevron button —
   the whole li is handled by our drawer, not Kadence's expand/collapse */
.mobile-navigation li.ermw-cats-trigger .drawer-sub-toggle,
.drawer-navigation li.ermw-cats-trigger .drawer-sub-toggle {
	display: none !important;
}

/* Ensure the sub-menu never shows inside the mobile Kadence drawer,
   even if Kadence JS adds inline style="display:block" */
.mobile-navigation li.ermw-cats-trigger > .sub-menu,
.drawer-navigation li.ermw-cats-trigger > .sub-menu,
#mobile-drawer li.ermw-cats-trigger > .sub-menu,
#mobile-menu li.ermw-cats-trigger > .sub-menu {
	display: none !important;
	height: 0 !important;
	overflow: hidden !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

/* Grid icon injected by JS */
li.ermw-cats-trigger > a .ermw-cats-icon {
	display: inline-flex !important;
	align-items: center !important;
	flex-shrink: 0 !important;
	color: currentColor !important;
	pointer-events: none !important;
}

/* ════════════════════════════════════════════════════════════════
   1. SUPPRESS KADENCE DROPDOWN — Categories trigger only
   ════════════════════════════════════════════════════════════════ */

/*
 * Hide the standard Kadence sub-menu for the "Categories" nav item.
 * The class `ermw-cats-trigger` is added via PHP filter nav_menu_css_class.
 */
#site-navigation li.ermw-cats-trigger > .sub-menu,
#site-navigation li.ermw-cats-trigger > ul.submenu,
.primary-navigation li.ermw-cats-trigger > .sub-menu,
.primary-navigation li.ermw-cats-trigger > ul.submenu,
.header-navigation li.ermw-cats-trigger > .sub-menu,
.mobile-navigation li.ermw-cats-trigger > .sub-menu,
.drawer-navigation li.ermw-cats-trigger > .sub-menu {
	display: none !important;
	visibility: hidden !important;
	pointer-events: none !important;
	opacity: 0 !important;
}

/* Remove hover-bridge pseudo-element on the trigger */
#site-navigation li.ermw-cats-trigger::after,
.primary-navigation li.ermw-cats-trigger::after,
.header-navigation li.ermw-cats-trigger::after,
.mobile-navigation li.ermw-cats-trigger::after {
	display: none !important;
}

/* ════════════════════════════════════════════════════════════════
   2. CATEGORY DRAWER — Overlay + Panel
   ════════════════════════════════════════════════════════════════ */

#ermw-cat-overlay {
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: flex;
	align-items: stretch;
}

#ermw-cat-overlay[hidden] {
	display: none;
}

/* Scrim */
.ermw-cat-scrim {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.35);
	animation: ermw-scrim-in 0.2s ease both;
	cursor: pointer;
}

@keyframes ermw-scrim-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

/* Drawer panel */
#ermw-cat-drawer {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	width: 700px;
	max-width: 100vw;
	z-index: 100002;
	display: flex;
	flex-direction: column;
	background: #fff;
	box-shadow: 6px 0 40px rgba(0, 0, 0, 0.14);
	animation: ermw-drawer-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes ermw-drawer-in {
	from { transform: translateX(-100%); }
	to   { transform: translateX(0); }
}

#ermw-cat-overlay.is-closing .ermw-cat-scrim {
	animation: ermw-scrim-out 0.2s ease both;
}

@keyframes ermw-scrim-out {
	from { opacity: 1; }
	to   { opacity: 0; }
}

#ermw-cat-overlay.is-closing #ermw-cat-drawer {
	animation: ermw-drawer-out 0.22s cubic-bezier(0.4, 0, 1, 1) both;
}

@keyframes ermw-drawer-out {
	from { transform: translateX(0); }
	to   { transform: translateX(-100%); }
}

/* ─── Tabs bar ────────────────────────────────────────────────── */

.ermw-cat-tabs-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid #E2E8F0;
	padding: 0 14px 0 8px;
	background: #fff;
	flex-shrink: 0;
	gap: 4px;
}

.ermw-cat-tabs {
	display: flex;
	align-items: stretch;
	gap: 2px;
}

.ermw-cat-tab {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 11px 14px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	color: #64748B;
	background: none;
	border: none;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	cursor: pointer;
	font-family: inherit;
	transition: color 0.12s, border-color 0.12s;
	white-space: nowrap;
}

.ermw-cat-tab:hover {
	color: #0F172A;
}

.ermw-cat-tab.is-active {
	color: #0F172A;
	border-bottom-color: #1B72E8;
}

.ermw-cat-tab > svg {
	flex-shrink: 0;
}

/* ─── Tab bodies ──────────────────────────────────────────────── */

.ermw-cat-body {
	display: flex;
	flex: 1 1 auto;
	min-height: 0;
	overflow: hidden;
}

.ermw-cat-body[hidden] {
	display: none;
}

/* ─── Left column ──────────────────────────────────────────────── */

.ermw-cat-col-left {
	width: 200px;
	flex-shrink: 0;
	background: #F8FAFC;
	border-right: 1px solid #E2E8F0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

/* Section label (replaces old col-header) */
.ermw-cat-col-section-label {
	font-size: 10px;
	font-weight: 700;
	color: #94A3B8;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 11px 13px 8px;
	flex-shrink: 0;
}

/* Kept for backwards compat with any cached HTML */
.ermw-cat-col-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 13px 11px 12px 13px;
	border-bottom: 1px solid #E2E8F0;
	background: #F1F5F9;
	flex-shrink: 0;
}

.ermw-cat-col-header-label {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 700;
	color: #0F172A;
	letter-spacing: 0.01em;
}

.ermw-cat-col-header-label svg {
	color: #1B72E8;
}

.ermw-cat-close {
	width: 24px;
	height: 24px;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	cursor: pointer;
	transition: background 0.12s;
	color: #64748B;
	padding: 0;
}

.ermw-cat-close:hover,
.ermw-cat-close:focus-visible {
	background: #E2E8F0;
	outline: none;
}

/* Category list */
.ermw-cat-list {
	flex: 1;
	overflow-y: auto;
	padding: 4px 0;
	margin: 0;
	list-style: none;
}

.ermw-cat-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 7px 10px 7px 0;
	cursor: pointer;
	border: none;
	border-left: 3px solid transparent;
	background: transparent;
	width: 100%;
	text-align: left;
	transition: background 0.1s;
	font-family: inherit;
}

.ermw-cat-item:hover,
.ermw-cat-item:focus-visible {
	background: rgba(255, 255, 255, 0.7);
	outline: none;
}

.ermw-cat-item.is-active {
	background: #fff;
	border-left-color: var(--ermw-ci-accent, #1B72E8);
}

.ermw-cat-item-icon {
	width: 28px;
	height: 28px;
	border-radius: 7px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-left: 8px;
	color: #9CA3AF;
	background: transparent;
	transition: background 0.1s, color 0.1s;
}

.ermw-cat-item.is-active .ermw-cat-item-icon {
	background: var(--ermw-ci-bg, #EFF6FF);
	color: var(--ermw-ci-accent, #1B72E8);
}

.ermw-cat-item-label {
	font-size: 12.5px;
	font-weight: 500;
	color: #4B5563;
	flex: 1;
	line-height: 1.35;
	transition: color 0.1s;
}

.ermw-cat-item.is-active .ermw-cat-item-label {
	font-weight: 600;
	color: #0F172A;
}

.ermw-cat-item-chevron {
	color: #D1D5DB;
	flex-shrink: 0;
	margin-right: 8px;
	transition: color 0.1s;
}

.ermw-cat-item.is-active .ermw-cat-item-chevron {
	color: var(--ermw-ci-accent, #1B72E8);
}

/* ─── Right column ─────────────────────────────────────────────── */

/* Panel topbar — mobile only (back + close). Hidden on desktop. */
.ermw-cat-panel-topbar {
	display: none;
}

@media screen and (max-width: 600px) {
	.ermw-cat-panel-topbar {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 11px 14px;
		border-bottom: 1px solid #E2E8F0;
		background: #F8FAFC;
		flex-shrink: 0;
		z-index: 1;
	}
}

.ermw-cat-mobile-back,
.ermw-pcat-mobile-back {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 13px;
	font-weight: 600;
	color: var(--ermw-ph-accent, #1B72E8);
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	font-family: inherit;
	line-height: 1;
	text-decoration: none;
	box-shadow: none;
	border-radius: 0;
}

.ermw-cat-mobile-back:hover,
.ermw-cat-mobile-back:focus-visible,
.ermw-pcat-mobile-back:hover,
.ermw-pcat-mobile-back:focus-visible {
	opacity: 0.8;
	outline: none;
	background: none;
	box-shadow: none;
	text-decoration: none;
}

.ermw-cat-close-inline {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 8px;
	background: #F1F5F9;
	border: none;
	cursor: pointer;
	color: #64748B;
	padding: 0;
	transition: background 0.12s;
}

.ermw-cat-close-inline:hover,
.ermw-cat-close-inline:focus-visible {
	background: #E2E8F0;
	outline: none;
}

.ermw-cat-col-right {
	flex: 1;
	background: #fff;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	position: relative;
}

/* Individual panels */
.ermw-cat-panel {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.12s ease;
}

.ermw-cat-panel.is-active {
	opacity: 1;
	pointer-events: auto;
}

/* Panel header band */
.ermw-cat-panel-header {
	flex-shrink: 0;
	border-bottom: 1px solid var(--ermw-ph-border, #E2E8F0);
	background: var(--ermw-ph-bg, #F8FAFC);
}

.ermw-cat-breadcrumb {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 9px 16px 0;
	font-size: 10px;
	font-weight: 500;
}

.ermw-cat-breadcrumb-all {
	color: #94A3B8;
}

.ermw-cat-breadcrumb-sep {
	color: #CBD5E1;
}

.ermw-cat-breadcrumb-current {
	font-weight: 700;
	color: var(--ermw-ph-accent, #1B72E8);
	letter-spacing: 0.01em;
}

.ermw-cat-identity {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 16px 10px;
}

.ermw-cat-identity-icon {
	width: 34px;
	height: 34px;
	border-radius: 9px;
	flex-shrink: 0;
	background: var(--ermw-ph-accent, #1B72E8);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.ermw-cat-identity-meta {
	flex: 1;
	min-width: 0;
}

.ermw-cat-identity-name {
	font-size: 14.5px;
	font-weight: 800;
	color: #0F172A;
	line-height: 1.2;
	margin: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 100%;
}

.ermw-cat-identity-count {
	font-size: 11px;
	color: #6B7280;
	margin: 2px 0 0;
	display: flex;
	align-items: center;
	gap: 4px;
}

/* Browse CTA inside header */
.ermw-cat-browse-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 5px 11px;
	border-radius: 7px;
	flex: 0 1 auto;
	min-width: 0;
	max-width: min(46%, 168px);
	font-size: 11.5px;
	font-weight: 600;
	line-height: 1.25;
	color: var(--ermw-ph-accent, #1B72E8);
	background: #fff;
	border: 1px solid var(--ermw-ph-border, #BFDBFE);
	cursor: pointer;
	text-decoration: none;
	transition: background 0.12s;
	font-family: inherit;
	box-sizing: border-box;
}

.ermw-cat-browse-btn__text {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ermw-cat-browse-btn > svg {
	flex-shrink: 0;
}

.ermw-cat-browse-btn:hover,
.ermw-cat-browse-btn:focus-visible {
	background: var(--ermw-ph-bg, #EFF6FF);
	text-decoration: none;
	outline-offset: 2px;
}

/* Subcategory section label */
.ermw-cat-section-label {
	font-size: 10.5px;
	font-weight: 600;
	color: var(--ermw-ph-accent, #1B72E8);
	opacity: 0.75;
	padding: 10px 16px 4px;
	margin: 0;
	flex-shrink: 0;
}

/* Subcategory grid */
.ermw-cat-subgrid {
	flex: 1;
	overflow-y: auto;
	padding: 4px 12px 10px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 3px;
	align-content: start;
}

.ermw-cat-sub {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 7px 9px;
	border-radius: 7px;
	text-align: left;
	background: transparent;
	border: 1px solid transparent;
	cursor: pointer;
	transition: all 0.1s;
	text-decoration: none;
	font-family: inherit;
	font-size: 12.5px;
	color: #374151;
	font-weight: 400;
}

.ermw-cat-sub:hover,
.ermw-cat-sub:focus-visible {
	background: var(--ermw-ph-bg, #EFF6FF);
	border-color: rgba(0, 0, 0, 0.06);
	color: #0F172A;
	font-weight: 500;
	text-decoration: none;
	outline: none;
}

.ermw-cat-sub-dot {
	width: 4px;
	height: 4px;
	border-radius: 50%;
	flex-shrink: 0;
	background: #D1D5DB;
	transition: background 0.1s;
}

.ermw-cat-sub:hover .ermw-cat-sub-dot {
	background: var(--ermw-ph-accent, #1B72E8);
}

.ermw-cat-sub-main {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.ermw-cat-sub-name {
	font-size: 12.5px;
	font-weight: inherit;
	color: inherit;
	line-height: 1.3;
}

.ermw-cat-sub-count {
	font-size: 10.5px;
	font-weight: 500;
	color: #6B7280;
	line-height: 1.2;
}

.ermw-cat-sub:hover .ermw-cat-sub-count,
.ermw-cat-sub:focus-visible .ermw-cat-sub-count {
	color: #4B5563;
}

/* No subcategories message */
.ermw-cat-no-sub {
	padding: 20px 16px;
	font-size: 12.5px;
	color: #94A3B8;
	font-style: italic;
}

/* Panel footer CTA */
.ermw-cat-panel-footer {
	flex-shrink: 0;
	padding: 10px 16px;
	border-top: 1px solid #F1F5F9;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	min-width: 0;
}

.ermw-cat-footer-link {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	flex: 1 1 auto;
	min-width: 0;
	max-width: 100%;
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.25;
	color: #1B72E8;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	text-decoration: none;
	font-family: inherit;
	transition: color 0.12s;
	box-sizing: border-box;
}

.ermw-cat-footer-link__text {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ermw-cat-footer-link > svg {
	flex-shrink: 0;
}

.ermw-cat-footer-link:hover,
.ermw-cat-footer-link:focus-visible {
	color: #1558C0;
	text-decoration: none;
	outline-offset: 2px;
}

.ermw-cat-footer-count {
	flex-shrink: 0;
	font-size: 11px;
	color: #CBD5E1;
	white-space: nowrap;
}

/* ════════════════════════════════════════════════════════════════
   3. STORE CARDS — store panel right column
   ════════════════════════════════════════════════════════════════ */

.ermw-sc-list {
	flex: 1;
	overflow-y: auto;
	padding: 4px 14px 10px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.ermw-sc-card {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 10px 11px;
	border-radius: 10px;
	text-decoration: none;
	background: #FAFAFA;
	border: 1px solid #F1F5F9;
	transition: background 0.14s, border-color 0.14s;
	color: inherit;
}

.ermw-sc-card:hover,
.ermw-sc-card:focus-visible {
	background: #F8FAFC;
	border-color: #E2E8F0;
	text-decoration: none;
	outline-offset: 2px;
}

.ermw-sc-avatar {
	width: 38px;
	height: 38px;
	flex-shrink: 0;
	border-radius: 10px;
	background: #1B72E8;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	overflow: hidden;
}

.ermw-sc-avatar--img {
	background: #F1F5F9;
}

.ermw-sc-avatar--img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: 0;
}

.ermw-sc-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.ermw-sc-name {
	font-size: 13px;
	font-weight: 700;
	color: #0F172A;
	line-height: 1.25;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ermw-sc-tagline {
	font-size: 11.5px;
	color: #64748B;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ermw-sc-meta {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 3px;
	flex-shrink: 0;
}

.ermw-sc-rating {
	display: flex;
	align-items: center;
	gap: 3px;
	font-size: 11.5px;
	font-weight: 600;
	color: #F59E0B;
	white-space: nowrap;
}

.ermw-sc-location {
	display: flex;
	align-items: center;
	gap: 3px;
	font-size: 10.5px;
	color: #94A3B8;
	white-space: nowrap;
}

/* ════════════════════════════════════════════════════════════════
   4. PRODUCT CATEGORY TREE — products tab left column
   ════════════════════════════════════════════════════════════════ */

.ermw-pcat-col-left {
	width: 220px;
	overflow-y: auto;
}

.ermw-pcat-tree {
	padding: 0 0 16px;
}

.ermw-pcat-parent {
	margin-bottom: 2px;
}

.ermw-pcat-parent-row {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 7px 13px 7px 11px;
	cursor: pointer;
	border-radius: 7px;
	margin: 0 6px;
	color: #64748B;
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.25;
	transition: background 0.12s, color 0.12s;
	outline: none;
}

.ermw-pcat-parent-row:hover,
.ermw-pcat-parent-row:focus-visible {
	background: rgba(0, 0, 0, 0.04);
}

.ermw-pcat-parent.is-active > .ermw-pcat-parent-row {
	color: var(--ermw-pcat-accent, #7C3AED);
	background: var(--ermw-pcat-bg, #F5F3FF);
}

.ermw-pcat-parent-icon {
	flex-shrink: 0;
	color: inherit;
	display: flex;
	align-items: center;
}

.ermw-pcat-parent-label {
	flex: 1;
	min-width: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	white-space: normal;
	line-height: 1.25;
}

.ermw-pcat-children {
	list-style: none;
	margin: 0 0 4px;
	padding: 0 6px 0 28px;
}

.ermw-pcat-child {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 5px 9px;
	cursor: pointer;
	border-radius: 6px;
	font-size: 12px;
	color: #475569;
	line-height: 1.3;
	transition: background 0.1s, color 0.1s;
}

.ermw-pcat-child:hover,
.ermw-pcat-child:focus-visible {
	background: rgba(0, 0, 0, 0.04);
	color: #0F172A;
	outline: none;
}

.ermw-pcat-child.is-active {
	color: #0F172A;
	font-weight: 600;
}

.ermw-pcat-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	flex-shrink: 0;
	background: #CBD5E1;
	transition: background 0.1s;
}

.ermw-pcat-child.is-active .ermw-pcat-dot {
	background: #0F172A;
}

.ermw-pcat-child-label {
	flex: 1;
	min-width: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	white-space: normal;
	line-height: 1.25;
}

/* ════════════════════════════════════════════════════════════════
   5. PRODUCT ROWS — products tab right column
   ════════════════════════════════════════════════════════════════ */

.ermw-pcat-panel {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.12s ease;
}

.ermw-pcat-panel.is-active {
	opacity: 1;
	pointer-events: auto;
}

.ermw-pr-list {
	flex: 1;
	overflow-y: auto;
	padding: 4px 14px 10px;
	display: flex;
	flex-direction: column;
}

.ermw-pr-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 0;
	border-bottom: 1px solid #F1F5F9;
	text-decoration: none;
	color: inherit;
	transition: background 0.1s;
}

.ermw-pr-row:last-child {
	border-bottom: none;
}

.ermw-pr-row:hover,
.ermw-pr-row:focus-visible {
	text-decoration: none;
	outline-offset: 2px;
}

.ermw-pr-row:hover .ermw-pr-name {
	color: #1B72E8;
}

.ermw-pr-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.ermw-pr-name {
	font-size: 13px;
	font-weight: 600;
	color: #0F172A;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	transition: color 0.1s;
}

.ermw-pr-store {
	font-size: 11.5px;
	color: #94A3B8;
	line-height: 1.2;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ermw-pr-price {
	flex-shrink: 0;
	font-size: 13px;
	font-weight: 700;
	color: #0F172A;
	white-space: nowrap;
}

/* ════════════════════════════════════════════════════════════════
   6. MOBILE DRAWER — full-width, two-screen approach
   ════════════════════════════════════════════════════════════════ */

@media screen and (max-width: 600px) {

	#ermw-cat-drawer {
		width: 100vw;
		max-width: 100vw;
	}

	.ermw-cat-body {
		flex-direction: column;
		min-height: 0;
	}

	.ermw-cat-col-left {
		/* On mobile the left col becomes a full-screen list */
		width: 100%;
		border-right: none;
		display: flex;
		flex-direction: column;
		transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
	}

	.ermw-cat-col-right {
		/* Right panel slides in from the right */
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		transform: translateX(100%);
		transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
		z-index: 100003;
		background: #fff;
	}

	.ermw-cat-col-right.is-open {
		transform: translateX(0);
	}

	.ermw-cat-panel,
	.ermw-pcat-panel {
		position: absolute;
		inset: 0;
	}

	.ermw-cat-subgrid {
		grid-template-columns: 1fr;
	}

	/* Products: tree scrollable on mobile */
	.ermw-pcat-col-left {
		overflow-y: auto;
		flex: 1;
	}

	/* Keep tabs bar compact on mobile */
	.ermw-cat-tab {
		padding: 10px 11px;
		font-size: 12.5px;
	}
}

/* Hide mobile-only topbar controls on desktop */
@media screen and (min-width: 601px) {
	.ermw-cat-panel-topbar {
		display: none !important;
	}
}

/* ════════════════════════════════════════════════════════════════
   4. SHOP BY CATEGORY — Homepage section
   ════════════════════════════════════════════════════════════════ */

.ermw-shopby {
	padding: 48px 24px;
	background: #fff;
	border-bottom: 1px solid #F1F5F9;
}

.ermw-shopby__inner {
	max-width: 1280px;
	margin: 0 auto;
}

.ermw-shopby__heading {
	font-size: 21px;
	font-weight: 700;
	color: #0F172A;
	margin: 0 0 24px;
	line-height: 1.3;
}

/* 3-column grid on desktop */
.ermw-shopby__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 11px;
	margin-bottom: 28px;
}

/* ─── Category card ─────────────────────────────────────────────── */

.ermw-shopby__card {
	display: flex;
	align-items: center;
	gap: 13px;
	padding: 15px 16px;
	border-radius: 12px;
	cursor: pointer;
	text-decoration: none;
	background: color-mix(in srgb, var(--ermw-card-bg, #F8FAFC) 60%, white);
	border: 1.5px solid color-mix(in srgb, var(--ermw-card-border, #E2E8F0) 70%, transparent);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
	transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
	position: relative;
	overflow: hidden;
}

/* Fallback for browsers without color-mix */
@supports not (background: color-mix(in srgb, red, white)) {
	.ermw-shopby__card {
		background: var(--ermw-card-bg, #F8FAFC);
		border-color: var(--ermw-card-border, #E2E8F0);
	}
}

.ermw-shopby__card:hover,
.ermw-shopby__card:focus-visible {
	background: var(--ermw-card-bg, #F8FAFC);
	border-color: var(--ermw-card-accent, #1B72E8);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.09), 0 0 0 3px color-mix(in srgb, var(--ermw-card-accent, #1B72E8) 15%, transparent);
	text-decoration: none;
	outline: none;
}

/* Accent left stripe */
.ermw-shopby__stripe {
	position: absolute;
	left: 0;
	top: 14%;
	bottom: 14%;
	width: 3px;
	border-radius: 0 3px 3px 0;
	background: color-mix(in srgb, var(--ermw-card-accent, #64748B) 50%, transparent);
	transition: background 0.18s;
}

.ermw-shopby__card:hover .ermw-shopby__stripe,
.ermw-shopby__card:focus-visible .ermw-shopby__stripe {
	background: var(--ermw-card-accent, #64748B);
}

/* Icon box */
.ermw-shopby__icon {
	width: 46px;
	height: 46px;
	border-radius: 11px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	color: var(--ermw-card-accent, #1B72E8);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
	transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}

.ermw-shopby__card:hover .ermw-shopby__icon,
.ermw-shopby__card:focus-visible .ermw-shopby__icon {
	background: var(--ermw-card-accent, #1B72E8);
	color: #fff;
	box-shadow: 0 4px 12px color-mix(in srgb, var(--ermw-card-accent, #1B72E8) 35%, transparent);
}

/* Text column */
.ermw-shopby__text {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.ermw-shopby__name {
	font-size: 13.5px;
	font-weight: 700;
	color: #0F172A;
	line-height: 1.3;
	display: block;
}

.ermw-shopby__count {
	font-size: 11px;
	color: #6B7280;
	display: flex;
	align-items: center;
	gap: 3px;
}

.ermw-shopby__count svg {
	color: #9CA3AF;
}

/* Trailing arrow */
.ermw-shopby__arrow {
	color: #9CA3AF;
	flex-shrink: 0;
	transition: color 0.18s, transform 0.18s;
}

.ermw-shopby__card:hover .ermw-shopby__arrow,
.ermw-shopby__card:focus-visible .ermw-shopby__arrow {
	color: var(--ermw-card-accent, #1B72E8);
	transform: translateX(2px);
}

/* ─── Footer CTA ─────────────────────────────────────────────── */

.ermw-shopby__footer {
	text-align: center;
}

.ermw-shopby__cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 26px;
	border-radius: 10px;
	cursor: pointer;
	font-size: 13.5px;
	font-weight: 600;
	color: #1B72E8;
	background: #EFF6FF;
	border: 1.5px solid #BFDBFE;
	transition: background 0.14s, border-color 0.14s;
	font-family: inherit;
}

.ermw-shopby__cta:hover,
.ermw-shopby__cta:focus-visible {
	background: #DBEAFE;
	border-color: #93C5FD;
	outline: none;
}

/* ════════════════════════════════════════════════════════════════
   5. RESPONSIVE — Mobile adjustments
   ════════════════════════════════════════════════════════════════ */

@media screen and (max-width: 768px) {

	.ermw-shopby {
		padding: 34px 18px;
	}

	.ermw-shopby__heading {
		font-size: 18px;
		margin-bottom: 18px;
	}

	.ermw-shopby__grid {
		grid-template-columns: 1fr 1fr;
		gap: 9px;
		margin-bottom: 22px;
	}

	.ermw-shopby__card {
		padding: 13px 12px;
		gap: 10px;
	}

	.ermw-shopby__icon {
		width: 42px;
		height: 42px;
	}

	.ermw-shopby__name {
		font-size: 13px;
	}
}

@media screen and (max-width: 420px) {
	.ermw-shopby__grid {
		grid-template-columns: 1fr;
	}
}
