/**
 * Nikama Product Archive Filters - Horizontal layout with chips
 */



/* Widget and container - force full width, allow breakout */
.elementor-widget-wd_shop_archive_filters_area,
.elementor-widget-wd_shop_archive_filters_area .elementor-widget-container {
	width: 100% !important;
	max-width: 100% !important;
	overflow: visible !important;
}

/* Ensure widget allows breakout - overflow visible so full-width extends beyond column */
.elementor-element:has(.elementor-widget-wd_shop_archive_filters_area) {
	overflow: visible !important;
}



.wt-nikama-filters-area {
	margin-bottom: 0;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	display: block !important;
	min-height: 0 !important;
	height: auto !important;
}

.wt-nikama-filters-area .wt-nikama-filters-form,
.wt-nikama-filters-area .wt-nikama-filters-bar-wrapper,
.wt-nikama-filters-area .wt-nikama-filters-bar,
.wt-nikama-panels-wrapper {
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box;
	min-height: 0 !important;
	height: auto !important;
}

/* Force full width when inside Elementor/shortcode containers */
.elementor-widget-shortcode .wt-nikama-filters-area,
.wd-shop-filters-area .wt-nikama-filters-area,
.filters-area.wt-nikama-filters-area {
	width: 100% !important;
}

/* Override WoodMart overflow hidden to prevent cutoff of sort dropdowns */
.elementor-widget-shortcode .elementor-widget-container,
.wt-nikama-filters-area,
.wt-nikama-filters-outer,
.wt-nikama-filters-bar-wrapper {
	overflow: visible !important;
}

/* Overlay: never block clicks when drawer is closed (all viewports) */
#wt-nikama-drawer-overlay,
.wt-nikama-drawer-overlay {
	pointer-events: none;
	visibility: hidden;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
	z-index: 99999;
	opacity: 0;
	transition: opacity 0.3s, visibility 0.3s;
}
#wt-nikama-drawer-overlay.wt-nikama-drawer-visible,
.wt-nikama-drawer-overlay.wt-nikama-drawer-visible {
	pointer-events: auto;
	visibility: visible;
	opacity: 1;
}

/* Hide child theme's duplicate chips (injected by shop-filter-pills.js) */
.wt-nikama-filters-area #wd-filter-chips-inject {
	display: none !important;
}

.wt-nikama-filters-area .wt-nikama-filters-form {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
}

/* Override WoodMart grid - ensure bar wrapper spans full width */
.wt-nikama-filters-area .wt-nikama-filters-form > * {
	width: 100% !important;
	max-width: 100% !important;
}

/* Horizontal filter bar - full width, row layout */
.wt-nikama-filters-bar-wrapper {
	width: 100% !important;
}

.wt-nikama-filters-bar {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
	gap: 16px 24px;
	width: 100% !important;
}

/* Keep filter buttons in a horizontal row - don't wrap, don't shrink below content */
.wt-nikama-filters-buttons {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	align-items: center;
	gap: 8px;
	flex: 1 1 auto;
	min-width: min-content;
}

/* Filter items: stay inline, natural width, override any flex-basis/width from theme */
.wt-nikama-filters-buttons .wt-nikama-filter-item,
.wt-nikama-filters-bar .wd-pf-checkboxes.wt-nikama-filter-item {
	flex: 0 0 auto !important;
	flex-basis: auto !important;
	width: auto !important;
	min-width: 0 !important;
	max-width: none !important;
}

.wt-nikama-filters-buttons .wt-nikama-filter-item .wt-nikama-title:hover span,
.wt-nikama-filters-buttons .wt-nikama-filter-item.wd-opened .wt-nikama-title span{
	color: #000 !important;

}

.wt-nikama-filter-item {
	position: relative;
}

.wt-nikama-filter-item .wt-nikama-title {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 16px;
	border: none;
	background: #fff;
	cursor: pointer;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 500;
	transition: border-color 0.2s, background-color 0.2s;
}

.wt-nikama-filter-item .wt-nikama-title:hover,
.wt-nikama-filter-item.wd-opened .wt-nikama-title {
	border-color: var(--wd-brd-color-focus, #333);
}

.wt-nikama-filter-item .wd-pf-results {
	display: none;
}

/* Orderby: chevron only (desktop + mobile modal) */
.wt-nikama-sort .wt-nikama-chevron {
	flex-shrink: 0;
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wt-nikama-sort.wd-opened .wt-nikama-chevron {
	transform: rotate(180deg);
}

/* Attribute filters + mobile accordion: + / − with rotation crossfade */
.wt-nikama-expand-toggle {
	flex-shrink: 0;
	display: inline-grid;
	place-items: center;
	width: 12px;
	height: 12px;
}

.wt-nikama-expand-toggle svg {
	grid-area: 1 / 1;
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
	will-change: transform, opacity;
}

.wt-nikama-expand-toggle .wt-nikama-icon-plus {
	opacity: 1;
	transform: rotate(0deg);
	pointer-events: none;
}

.wt-nikama-expand-toggle .wt-nikama-icon-minus {
	opacity: 0;
	transform: rotate(-90deg);
	pointer-events: none;
}

.wt-nikama-filter-item.wd-opened .wt-nikama-expand-toggle .wt-nikama-icon-plus,
.wt-nikama-filters-area-panel.wt-nikama-accordion-open .wt-nikama-accordion-toggle .wt-nikama-expand-toggle .wt-nikama-icon-plus {
	opacity: 0;
	transform: rotate(90deg);
	pointer-events: none;
}

.wt-nikama-filter-item.wd-opened .wt-nikama-expand-toggle .wt-nikama-icon-minus,
.wt-nikama-filters-area-panel.wt-nikama-accordion-open .wt-nikama-accordion-toggle .wt-nikama-expand-toggle .wt-nikama-icon-minus {
	opacity: 1;
	transform: rotate(0deg);
	pointer-events: none;
}

/* Full-width panels wrapper - below filter bar, above divider/chips */
.wt-nikama-panels-wrapper {
	position: relative;
	width: 100%;
	flex: 0 0 100%;
	order: 2;
	margin-top: 8px;
}

/* Dropdown panel - full width below filter bar */
.wt-nikama-filters-area-panel {
	position: relative !important;
	width: 100% !important;
	z-index: 100;
	margin-top: 0;
	margin-bottom: 0;
	background: #fff !important;
	border: 1px solid var(--wd-brd-color, #e0e0e0);
	border-top: 1px solid var(--wd-brd-color, #e0e0e0);
	border-radius: 4px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
	display: none !important;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: none;
}

.wt-nikama-filters-area-panel.wt-nikama-panel-open {
	display: block !important;
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
	transform: none !important;
	border: none !important;
	box-shadow: none !important;
}

/* Sort dropdown - keep as small dropdown (not full width) */
.wt-nikama-sort {
	position: relative !important;
}

.wt-nikama-sort .wt-nikama-sort-dropdown {
	position: absolute !important;
	top: 100% !important;
	bottom: auto !important;
	right: 0 !important;
	left: auto !important;
	z-index: 999999 !important;
	margin-top: 4px;
	min-width: 240px;
	max-width: 300px !important;
	width: max-content !important;
	background: #fff !important;
	border: 1px solid var(--wd-brd-color, #e0e0e0) !important;
	border-radius: 4px !important;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
	display: none !important;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: none !important;
	padding: 5px 0 !important;
}

.wt-nikama-sort .wt-nikama-scroll {
	position: static !important;
	overflow: visible !important;
	height: auto !important;
	max-height: none !important;
}

.wt-nikama-sort .wt-nikama-scroll-content {
	list-style: none !important;
	padding: 0 !important;
	margin: 0 !important;
	display: block !important;
}

.wt-nikama-sort .wt-nikama-scroll-content li {
	display: block !important;
	padding: 0 !important;
	margin: 0 !important;
	width: 100%;
}

.wt-nikama-sort .wt-nikama-scroll-content li a.pf-value {
	display: block !important;
	padding: 10px 20px !important;
	color: #333 !important;
	text-decoration: none !important;
	white-space: nowrap !important;
	font-size: 14px !important;
	transition: background 0.2s;
}

.wt-nikama-sort .wt-nikama-scroll-content li.wd-active a.pf-value,
.wt-nikama-sort .wt-nikama-scroll-content li a.pf-value:hover {
	background-color: rgba(0,0,0,0.05) !important;
	color: #000 !important;
}

.wt-nikama-sort.wd-opened .wt-nikama-sort-dropdown {
	display: block !important;
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
	transform: none !important;
}

.wt-nikama-panel-header {
	padding: 12px 16px;
	/* border-bottom: 1px solid var(--wd-brd-color, #e0e0e0); */
}

.wt-nikama-panel-title {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: inherit;
}

.wt-nikama-filters-area-panel .wd-scroll,
.wt-nikama-filter-item .wd-scroll {
	max-height: 280px;
	overflow-y: auto;
	padding: 12px 16px;
}

.wt-nikama-filters-area-panel .wd-swatches-filter,
.wt-nikama-filter-item .wd-swatches-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.wt-nikama-filters-area-panel .wd-swatches-filter li,
.wt-nikama-filter-item .wd-swatches-filter li {
	margin: 0;
}

.wt-nikama-filters-area-panel .wd-swatches-filter .pf-value,
.wt-nikama-filter-item .wd-swatches-filter .pf-value {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 12px;
	border-radius: 4px;
	text-decoration: none;
	color: inherit;
	font-size: 14px;
	transition: background 0.2s;
}

.wt-nikama-filters-area-panel .wd-swatches-filter .pf-value:hover,
.wt-nikama-filter-item .wd-swatches-filter .pf-value:hover {
	background:transparent !important;
	color: #000 !important;
}

.wt-nikama-filter-item .wd-swatches-filter .pf-value:hover span.wd-filter-lable{
	color: #000 !important;
}

.wt-nikama-filters-area-panel .wd-swatches-filter li.wd-active .pf-value,
.wt-nikama-filter-item .wd-swatches-filter li.wd-active .pf-value {
	background:transparent !important;
	color: #000 !important;
}

.wt-nikama-filters-area-panel .wd-swatches-filter .wd-swatch-bg,
.wt-nikama-filter-item .wd-swatch-bg {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	display: inline-block;
	border: 1px solid rgba(0, 0, 0, 0.1);
}

.wt-nikama-filters-area-panel .wd-swatches-filter li.wd-active .wd-swatch-bg,
.wt-nikama-filter-item .wd-swatches-filter li.wd-active .wd-swatch-bg {
	border-color: currentColor;
	border-width: 2px;
}

.wt-nikama-panel-actions {
	padding: 12px 16px;
	border-top: 1px solid var(--wd-brd-color, #e0e0e0);
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

.wt-nikama-apply-btn,
.wt-nikama-cancel-btn {
	display: inline-block;
	width: 140px;
	min-width: 140px;
	flex: 0 0 auto;
	box-sizing: border-box;
}

.wt-nikama-apply-btn {
	padding: 10px 20px;
	background: #f5f0e6;
	color: #000;
	border: none;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.2s;
}

.wt-nikama-apply-btn:hover {
	background: #ebe5d8;
}

.wt-nikama-cancel-btn {
	background: none;
	border: none;
	padding: 10px 20px;
	font-size: 13px;
	color: #666;
	text-decoration: underline;
	cursor: pointer;
}

.wt-nikama-cancel-btn:hover {
	color: #333;
}

/* Right side: result count + sort */
.wt-nikama-filters-right {
	display: flex !important;
	flex-direction: row !important;
	align-items: center;
	gap: 16px;
	flex-shrink: 0;
	flex: 0 0 auto;
}

.wt-nikama-result-count {
	font-size: 13px;
	color: #666;
}

.wt-nikama-sort {
	position: relative;
}

.wt-nikama-sort .wt-nikama-title {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 16px;
	border: none;
	background: #fff;
	cursor: pointer;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 500;
}

.wt-nikama-sort .wd-pf-dropdown {
	position: absolute;
	top: 100%;
	right: 0;
	left: auto;
	margin-top: 4px;
	min-width: 200px;
}

/* Divider */
.wt-nikama-filters-divider {
	height: 1px;
	background: var(--wd-brd-color, #e0e0e0);
	margin: 16px 0;
}

/* Chips */
.wt-nikama-filters-chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.wt-nikama-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	background: #f5f0e6;
	border-radius: 4px;
	font-size: 13px;
	text-decoration: none;
	color: inherit;
	transition: background 0.2s;
}

.wt-nikama-chip:hover {
	background: #ebe5d8;
}

.wt-nikama-chip-swatch {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, 0.1);
	flex-shrink: 0;
}

.wt-nikama-chip-remove {
	margin-left: 2px;
	opacity: 0.7;
	font-size: 16px;
	line-height: 1;
	/* Ensure the × never steals the click from the parent <a> (pjax / navigation). */
	pointer-events: none;
}

.wt-nikama-chip-clear {
	font-size: 13px;
	color: #666;
	text-decoration: none;
}

.wt-nikama-chip-clear:hover {
	color: #333;
	text-decoration: underline;
}

/* Default Desktop: Hide mobile specific layout items */
.wt-nikama-mobile-btn,
.wt-nikama-drawer-header-mobile,
.wt-nikama-drawer-footer-mobile {
	display: none !important;
}

.wt-nikama-accordion-toggle .wt-nikama-expand-toggle {
	display: none;
}

.wt-nikama-panel-content-wrapper {
	display: block !important;
}

/* Mobile: bottom drawer + stacked bar only on small screens */
@media (max-width: 1024px) {
	.wt-nikama-filters-bar {
		justify-content: space-between !important;
		flex-wrap: nowrap !important;
	}

	.wt-nikama-filters-right {
		margin-left: auto !important;
		justify-content: flex-end !important;
	}

	body .wt-nikama-filters-bar-row .wt-nikama-filters-buttons {
		display: none !important;
	}

	.wt-nikama-mobile-btn {
		display: inline-flex !important;
		align-items: center;
		justify-content: center;
		gap: 8px;
		background: #f7f7f7;
		border: 1px solid #e0e0e0;
		padding: 10px 16px;
		border-radius: 4px;
		font-size: 14px;
		font-weight: 600;
		cursor: pointer;
		color: #333;
		text-transform: uppercase;
		flex: 0 0 auto;
	}

	/* The Panels Wrapper becomes the main slide-up 90vh Drawer */
	.wt-nikama-panels-wrapper {
		position: fixed !important;
		left: 0;
		right: 0;
		bottom: 0;
		top: auto;
		width: 100% !important;
		height: 90vh !important;
		max-height: 90vh !important;
		margin: 0 !important;
		background: #fff;
		z-index: 100000;
		border-radius: 0;
		box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
		transform: translateY(100%);
		transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
		display: flex !important;
		flex-direction: column;
	}

	.wt-nikama-panels-wrapper.wd-opened-drawer {
		transform: translateY(0);
	}

	.wt-nikama-drawer-header-mobile {
		display: flex !important;
		justify-content: space-between;
		align-items: center;
		padding: 20px;
		border-bottom: 1px solid var(--wd-brd-color, #e0e0e0);
		flex-shrink: 0;
	}

	.wt-nikama-drawer-header-mobile .wt-nikama-drawer-title {
		font-size: 16px;
		font-weight: 600;
	}

	.wt-nikama-drawer-header-mobile .wt-nikama-drawer-close {
		background: none;
		border: none;
		font-size: 24px;
		line-height: 1;
		padding: 0;
		cursor: pointer;
		color: #666;
	}

	.wt-nikama-drawer-content-mobile {
		display: block;
		flex: 1 1 auto;
		overflow-y: auto;
	}

	.wt-nikama-drawer-footer-mobile {
		display: block !important;
		padding: 20px;
		border-top: 1px solid var(--wd-brd-color, #e0e0e0);
		background: #fff;
	}

	.wt-nikama-drawer-footer-actions {
		display: flex;
		flex-direction: row;
		align-items: stretch;
		gap: 12px;
	}

	.wt-nikama-drawer-footer-actions .wt-nikama-apply-global-btn,
	.wt-nikama-drawer-footer-actions .wt-nikama-reset-global-btn {
		min-width: 0;
		padding: 14px 16px;
		border-radius: 4px;
		font-size: 15px;
		cursor: pointer;
		text-align: center;
		text-transform: uppercase;
		letter-spacing: 0.04em;
		box-sizing: border-box;
		transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
	}

	/* Primary CTA */
	.wt-nikama-drawer-footer-actions .wt-nikama-apply-global-btn {
		flex: 1.35 1 0;
		font-weight: 700;
		background: #000;
		color: #fff;
		border: 2px solid #000;
	}

	.wt-nikama-drawer-footer-actions .wt-nikama-apply-global-btn:hover {
		background: #1a1a1a;
		border-color: #1a1a1a;
	}

	/* Secondary: outline / ghost — clearly not the main action */
	.wt-nikama-drawer-footer-actions .wt-nikama-reset-global-btn {
		flex: 1 1 0;
		font-weight: 500;
		background: transparent;
		color: #555;
		border: 2px solid #c8c8c8;
	}

	.wt-nikama-drawer-footer-actions .wt-nikama-reset-global-btn:hover {
		background: rgba(0, 0, 0, 0.04);
		color: #222;
		border-color: #999;
	}

	/* Within Drawer: individual panels display fully */
	.wt-nikama-panels-wrapper .wt-nikama-filters-area-panel {
		position: static !important;
		display: block !important;
		opacity: 1 !important;
		visibility: visible !important;
		pointer-events: auto !important;
		transform: none !important;
		box-shadow: none !important;
		border: none !important;
		/* border-bottom: 1px solid var(--wd-brd-color, #e0e0e0) !important; */
		border-radius: 0;
	}
	
	.wt-nikama-panels-wrapper .wt-nikama-panel-actions {
		display: none !important; /* Managed by global apply footer */
	}

	.wt-nikama-panels-wrapper .wt-nikama-panel-header.wt-nikama-accordion-toggle {
		background: #fff;
		padding: 18px 20px;
		display: flex;
		justify-content: space-between;
		align-items: center;
		cursor: pointer;
	}

	.wt-nikama-panel-header.wt-nikama-accordion-toggle .wt-nikama-panel-title {
		font-size: 14px;
	}

	.wt-nikama-accordion-toggle .wt-nikama-expand-toggle {
		display: inline-grid;
	}

	.wt-nikama-panel-content-wrapper {
		display: none !important;
		padding-bottom: 16px;
	}

	.wt-nikama-filters-area-panel.wt-nikama-accordion-open .wt-nikama-panel-content-wrapper {
		display: block !important;
	}

	.wt-nikama-panels-wrapper .wt-nikama-filters-area-panel .wd-scroll {
		min-height: 370px !important;
	}

	.wt-nikama-panels-wrapper .wt-nikama-filters-area-panel ul {
		min-width: 100% !important;
	}

	/* Rigid 3-column grid: equal column widths, no “jagged” rows from label length */
	.wt-nikama-panels-wrapper .wt-nikama-filters-area-panel .wd-swatches-filter {
		display: grid !important;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px 8px;
		/* padding-top: 20px; */
        /* padding-bottom: 20px; */
	}

	.wt-nikama-panels-wrapper .wt-nikama-filters-area-panel .wd-swatches-filter li {
		min-width: 0;
	}

	.wt-nikama-panels-wrapper .wt-nikama-filters-area-panel .wd-swatches-filter .pf-value {
		display: flex;
		width: 100%;
		max-width: 100%;
		box-sizing: border-box;
		min-width: 0;
		padding: 6px 8px;
		overflow-wrap: break-word;
		word-break: break-word;
	}

	.wt-nikama-panels-wrapper .wt-nikama-filters-area-panel .wd-swatches-filter .wd-swatch-text,
	.wt-nikama-panels-wrapper .wt-nikama-filters-area-panel .wd-swatches-filter .wd-filter-lable {
		min-width: 0;
	}

	.wt-nikama-sort .wt-nikama-sort-dropdown {
		position: fixed !important;
		top: 50% !important;
		left: 50% !important;
		right: auto !important;
		bottom: auto !important;
		width: 280px;
		max-width: 90vw !important;
		max-height: 60vh;
		padding: 16px 0.8em !important;
	}

	.wt-nikama-sort.wd-opened .wt-nikama-sort-dropdown {
		transform: translate(-50%, -50%) !important;
	}
}

/* Stack filter bar vertically only on very small screens (e.g. narrow mobile) */
@media (max-width: 480px) {
	.wt-nikama-filters-bar {
		flex-direction: column;
		align-items: stretch;
	}
	.wd-pf-dropdown .wd-scroll{
		align-items: start!important;
	}
	.wt-nikama-mobile-btn{
		background: #fff!important;
	}
}

div.wt-nikama-panel-content-wrapper div.wd-scroll{
	padding : 0 !important;
}