/* UN9 Shop Navigation 1.0.1: header menus, filter form, brand directory. */

/* ---- Header bar menus (sit between Main Product Categories and the search box) ---- */
.un9-shop-nav { display: flex; align-items: center; gap: 2px; margin: 0 4px 0 8px; flex: 0 0 auto; }
.un9-shop-nav__item { position: relative; }
.un9-shop-nav__toggle {
	display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px;
	font-weight: 700; font-size: 15px; line-height: 1.2; white-space: nowrap;
	color: var(--woo-bar-color, #000); text-decoration: none; border-radius: 12px 12px 0 0; cursor: pointer;
}
.un9-shop-nav__toggle:hover, .un9-shop-nav__toggle:focus-visible { color: var(--gbl-primary-color, #e80505); }
.un9-shop-nav .un9-icon { fill: currentColor; flex: 0 0 auto; }
.un9-shop-nav .un9-icon--caret { width: 14px; height: 14px; margin-left: -2px; transition: transform .15s; }
.un9-shop-nav__item.is-open .un9-icon--caret { transform: rotate(180deg); }
.un9-shop-nav__panel {
	display: none; position: absolute; top: 100%; left: 0; z-index: 9999; box-sizing: border-box;
	background: var(--gbl-background-color, #fff); color: var(--text-color, #222); text-align: left;
	border-radius: 0 0 6px 6px; box-shadow: 1px 5px 15px 5px #c6bdbd; padding: 16px 18px;
	max-height: calc(100vh - 160px); max-height: calc(100svh - 160px); overflow-y: auto;
}
.un9-shop-nav__item.is-open > .un9-shop-nav__panel { display: block; }
/* Hover preview of the brands, except while a menu is open from a click (it would sit under it). */
@media (hover: hover) and (min-width: 1025px) {
	.un9-shop-nav:not(:has(.un9-shop-nav__item.is-open)) .un9-shop-nav__brands:hover > .un9-shop-nav__panel { display: block; }
}
.un9-shop-nav__panel--brands { width: 620px; max-width: calc(100vw - 32px); }
.un9-shop-nav__panel--filter { width: 780px; max-width: calc(100vw - 32px); }
.un9-brand-menu { columns: 3 160px; column-gap: 24px; margin: 0; padding: 0; list-style: none; }
.un9-brand-menu li { break-inside: avoid; margin: 0; padding: 0; list-style: none; }
.un9-brand-menu a {
	display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 6px 0;
	font-weight: 600; font-size: 14px; color: inherit; text-decoration: none; border: 0;
}
.un9-brand-menu a:hover, .un9-brand-menu a:focus-visible, .un9-shop-nav__more:hover { color: var(--gbl-primary-color, #e80505); }
.un9-shop-nav__more { display: inline-block; margin-top: 10px; font-weight: 700; font-size: 14px; color: inherit; }
.un9-count { color: #6b6b6b; font-weight: 400; font-size: .85em; }
.un9-filters__loading, .un9-filters__error { margin: 0; font-size: 14px; }
.un9-filters__retry {
	margin: 0 10px 0 0; padding: 6px 12px; border: 1px solid #c9c9c9; border-radius: 6px; background: #fff;
	color: inherit; font: inherit; font-weight: 600; cursor: pointer;
}
.un9-sr-only {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
	clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
/* The panel's buttons stay in view while its choices scroll. */
.un9-shop-nav__panel .un9-filters__actions {
	position: sticky; bottom: -16px; z-index: 1; margin-bottom: -16px; padding-bottom: 16px;
	background: var(--gbl-background-color, #fff);
}

/* The search box shares the bar with the extra menus. */
.woocommerce-bar .un9-shop-nav ~ .product-search-form { width: auto; flex: 1 1 240px; min-width: 180px; }

@media (max-width: 1024px) {
	.woocommerce-bar .container { flex-wrap: wrap; position: relative; }
	/* Two equal buttons; same height even when a label wraps (very narrow screens, large text). */
	.un9-shop-nav { order: -1; flex: 0 0 100%; margin: 0 0 6px; gap: 8px; position: relative; align-items: stretch; }
	.un9-shop-nav__item { position: static; flex: 1 1 0; min-width: 0; display: flex; }
	.un9-shop-nav__toggle { flex: 1 1 auto; width: 100%; min-width: 0; justify-content: center; border: 1px solid #e3e3e3; border-radius: 8px; padding: 9px 8px; font-size: 14px; white-space: normal; text-align: center; }
	.un9-shop-nav__panel { left: 0; right: 0; width: auto; max-width: none; top: calc(100% + 4px); border-radius: 8px; padding: 14px; }
	.un9-shop-nav__panel .un9-filters__actions { bottom: -14px; margin-bottom: -14px; padding-bottom: 14px; }
	/* Keep the search box and the account / cart icons on one row, as before. */
	.woocommerce-bar .un9-shop-nav ~ .product-search-form { flex: 1 1 0; width: auto; min-width: 0; }
}
@media (max-width: 399px) { /* Room for both labels on one line on phones. */
	.un9-shop-nav .un9-icon:not(.un9-icon--caret) { display: none; }
}

/* ---- Filter form (header panel and the bar on product listings) ---- */
.un9-filters { font-size: 14px; }
.un9-filters__label { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 8px; color: #555; }
.un9-filters__crumbs { margin: 0 0 8px; font-size: 14px; }
.un9-filters__crumbs a { color: inherit; text-decoration: underline; }
.un9-filters__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.un9-chip {
	display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid #d6d6d6;
	border-radius: 999px; background: #fff; color: inherit; font-weight: 600; font-size: 14px; line-height: 1.3;
	text-decoration: none; cursor: pointer;
}
.un9-chip:hover, .un9-chip:focus-visible { border-color: var(--gbl-primary-color, #e80505); color: var(--gbl-primary-color, #e80505); }
.un9-chip.is-selected { background: var(--gbl-primary-color, #e80505); border-color: var(--gbl-primary-color, #e80505); color: #fff; }
.un9-chip.is-selected .un9-count { color: rgba(255, 255, 255, .85); }
.un9-filters__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px 14px; margin: 14px 0; }
.un9-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.un9-f__label { font-weight: 700; font-size: 13px; margin: 0; }
.un9-f select {
	width: 100%; max-width: 100%; height: 38px; padding: 0 8px; border: 1px solid #c9c9c9; border-radius: 6px;
	background-color: #fff; color: inherit; font-size: 14px;
}
.un9-filters__actions {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px 18px;
	border-top: 1px solid #eee; padding-top: 12px;
}
.un9-filters__stock { margin: 0 auto 0 0; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; cursor: pointer; }
.un9-filters__stock input { margin: 0; width: 16px; height: 16px; }
.un9-filters__clear { color: inherit; text-decoration: underline; font-weight: 600; }
.un9-filters__show {
	background: var(--gbl-primary-color, #e80505); color: #fff; border: 0; border-radius: 6px;
	padding: 10px 18px; font-weight: 700; font-size: 15px; cursor: pointer;
}
.un9-filters__show[disabled] { opacity: .5; cursor: not-allowed; }
.un9-filters__active { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.un9-chip--remove { background: #f4f4f4; }
.un9-filters--bar { border: 1px solid #e6e6e6; border-radius: 8px; padding: 14px 16px; margin: 0 0 22px; background: #fff; clear: both; }
.un9-filters--bar .un9-filters__active { margin: 0 0 12px; }
/* Listing pages: a choice applies at once, so the button only shows for keyboard choices waiting to be applied. */
.un9-js .un9-filters--bar:not(.un9-pending) .un9-filters__show { display: none; }
.un9-filters__toggle { display: none; }
@media (max-width: 767px) {
	.un9-filters--bar { padding: 10px 12px; }
	.un9-js .un9-filters--bar .un9-filters__toggle {
		display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 0; border: 0; background: none;
		color: inherit; font: inherit; font-weight: 700; font-size: 15px; text-align: left; cursor: pointer;
	}
	.un9-filters__toggle .un9-icon { fill: currentColor; flex: 0 0 auto; }
	.un9-filters__toggle .un9-icon--caret { width: 14px; height: 14px; margin-left: auto; transition: transform .15s; }
	.un9-filters--bar.is-expanded .un9-filters__toggle .un9-icon--caret { transform: rotate(180deg); }
	.un9-js .un9-filters--bar .un9-filters__active { margin: 8px 0 0; }
	.un9-js .un9-filters--bar:not(.is-expanded) .un9-filters__body { display: none; }
	.un9-js .un9-filters--bar.is-expanded .un9-filters__body { margin-top: 12px; }
}
.un9-filters-host.un9-loading { opacity: .55; pointer-events: none; transition: opacity .1s; }

/* ---- [un9_brand_list] ---- */
.un9-brand-dir { columns: 4 200px; column-gap: 32px; }
.un9-brand-dir__group { break-inside: avoid; margin: 0 0 18px; }
.un9-brand-dir__letter { font-size: 1.3em; margin: 0 0 6px; border-bottom: 2px solid var(--gbl-primary-color, #e80505); display: inline-block; }
.un9-brand-dir ul { list-style: none; margin: 0; padding: 0; }
.un9-brand-dir li { margin: 0 0 6px; padding: 0; }
.un9-brand-dir li a { font-weight: 700; }
