/* ==========================================================================
   Aroma Product Toolbar + Filter Widget (combined)
   Base font: 19px  →  1em = 19px
   ========================================================================== */

/* ── Wrapper card ────────────────────────────────────────────────────────── */
.aptf-wrap {
	background: #fff;
	padding: 0.53em;          /* 10px */
	border-radius: 0.63em;    /* 12px */
	border: 1px solid #f3f4f6;
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
	position: relative;
}

@media ( min-width: 1024px ) {
	.aptf-wrap {
		padding: 0.63em;      /* 12px */
		border-radius: 0.84em; /* 16px */
	}
}

/* ── Toolbar bar ─────────────────────────────────────────────────────────── */
.aptf-bar {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 0.42em;  /* 8px */
	/* override .apf-toolbar card styles when both classes are present */
	background: transparent;
	padding: 0;
	border-radius: 0;
	border: none;
	box-shadow: none;
}

.aptf-bar-left {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 0.42em;  /* 8px */
	flex: 1;
	min-width: 0;
}

@media ( min-width: 1024px ) {
	.aptf-bar-left { gap: 0.84em; /* 16px */ }
}

.aptf-bar-right {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 0.42em;  /* 8px */
	flex-shrink: 0;
}

/* ── Filter toggle button ─────────────────────────────────────────────────── */
body .aptf-filter-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.26em;             /* 5px */
	padding: 0.26em 0.58em;  /* 5px 11px */
	background-color: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 0.42em;   /* 8px */
	font-size: 0.89em;        /* 17px */
	font-weight: 600;
	color: #374151;
	cursor: pointer;
	font-family: inherit;
	white-space: nowrap;
	flex-shrink: 0;
	transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

body .aptf-filter-toggle:hover {
	background-color: #f3f4f6;
	border-color: #d1d5db;
	color: #1f2937;
}

body .aptf-filter-toggle[aria-expanded="true"] {
	background-color: #eff6ff;
	border-color: #93c5fd;
	color: #1660aa;
}

body .aptf-filter-toggle:focus {
	outline: none;
	box-shadow: 0 0 0 2px rgba(22, 96, 170, 0.25);
}

@media ( min-width: 1024px ) {
	body .aptf-filter-toggle {
		gap: 0.37em;           /* 7px */
		padding: 0.32em 0.84em; /* 6px 16px */
		border-radius: 0.63em; /* 12px */
	}
}

.aptf-filter-toggle svg {
	flex-shrink: 0;
}

/* ── Result count ─────────────────────────────────────────────────────────── */
.aptf-count {
	font-size: 0.89em;  /* 17px */
	color: #6b7280;
	margin: 0;
	white-space: nowrap;
}

.aptf-count strong,
.aptf-count .apf-tb-count-total {
	color: #374151;
	font-weight: 600;
}


/* ── Sort label ───────────────────────────────────────────────────────────── */
.aptf-sort-label {
	font-size: 0.89em;  /* 17px */
	color: #6b7280;
	white-space: nowrap;
	display: none;
}

@media ( min-width: 640px ) {
	.aptf-sort-label { display: block; }
}

/* ── Sort select — explicit overrides to beat Elementor kit ──────────────── */
body .apf-sort-select {
	font-size: 0.89em;   /* 17px */
	font-weight: 600;
	color: #374151;
	background-color: #f9fafb;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 0.42em;  /* 8px */
	padding: 0.26em 0.53em; /* 5px 10px */
	cursor: pointer;
	outline: none;
	transition: border-color 0.15s;
	font-family: inherit;
	max-width: 8.42em;  /* ~160px */
}

body .apf-sort-select:focus {
	border-color: #1660aa;
}

@media ( min-width: 640px ) {
	body .apf-sort-select {
		border-radius: 0.63em;  /* 12px */
		padding: 0.32em 0.63em; /* 6px 12px */
		max-width: none;
	}
}

/* ── Legacy standalone toolbar card (.apf-toolbar without .aptf-bar) ────── */
.apf-toolbar:not( .aptf-bar ) {
	background: #fff;
	padding: 0.63em;         /* 12px */
	border-radius: 0.84em;   /* 16px */
	border: 1px solid #f3f4f6;
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
	display: flex;
	flex-direction: column;
	gap: 0;
}

.apf-toolbar-row {
	display: flex;
	flex-direction: column;
	gap: 0.53em;  /* 10px */
}

@media ( min-width: 640px ) {
	.apf-toolbar-row {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
}

.apf-result-count {
	font-size: 0.74em;   /* 14px */
	color: #6b7280;
	margin: 0;
	padding-left: 0.21em; /* 4px */
}

.apf-result-count strong {
	color: #374151;
	font-weight: 600;
}

.apf-sort-wrap {
	display: flex;
	align-items: center;
	gap: 0.42em;  /* 8px */
}

.apf-sort-label {
	font-size: 0.74em;  /* 14px */
	color: #6b7280;
	white-space: nowrap;
	display: none;
}

@media ( min-width: 640px ) {
	.apf-sort-label { display: block; }
}

/* ==========================================================================
   Filter Panel (floating side drawer)
   ========================================================================== */

.aptf-panel {
	position: fixed;
	inset: 0;
	z-index: 100000;
	visibility: hidden;
	pointer-events: none;
}

.aptf-panel.aptf-panel--open {
	visibility: visible;
	pointer-events: auto;
}

/* Backdrop */
.aptf-panel-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
	backdrop-filter: blur(2px);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.aptf-panel--open .aptf-panel-backdrop {
	opacity: 1;
}

/* Drawer */
.aptf-panel-inner {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	width: 17em;     /* ~323px */
	max-width: 85vw;
	background: #fff;
	display: flex;
	flex-direction: column;
	transform: translateX( -100% );
	transition: transform 0.3s ease;
	box-shadow: 4px 0 2em rgba(0, 0, 0, 0.12);
	overflow: hidden;
}

.aptf-panel--open .aptf-panel-inner {
	transform: translateX( 0 );
}

/* Panel header */
.aptf-panel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.84em 1.05em;  /* 16px 20px */
	border-bottom: 1px solid #f3f4f6;
	flex-shrink: 0;
	gap: 0.53em;
}

/* Title with funnel icon */
.aptf-panel-title {
	display: flex;
	align-items: center;
	gap: 0.42em;         /* 8px */
	font-size: 0.84em;   /* 16px */
	font-weight: 700;
	color: #104375;
	margin: 0;
	line-height: 1.3;
}

.aptf-panel-title svg {
	flex-shrink: 0;
	color: #1660aa;
	width: 1em;
	height: 1em;
}

/* Close button — explicit to override Elementor kit */
body .aptf-panel-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 1.68em;   /* 32px */
	height: 1.68em;  /* 32px */
	padding: 0;
	background-color: transparent;
	background: transparent;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	color: #9ca3af;
	font-weight: 400;
	font-family: inherit;
	transition: color 0.15s, background-color 0.15s;
	flex-shrink: 0;
}

body .aptf-panel-close:hover {
	color: #374151;
	background-color: #f3f4f6;
}

body .aptf-panel-close:focus {
	outline: none;
	box-shadow: 0 0 0 2px rgba(22, 96, 170, 0.25);
}

/* Panel body — scrollable */
.aptf-panel-body {
	flex: 1;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 0 1.05em 1.05em; /* 0 20px 20px */
}

.aptf-panel-body .apf-widget {
	padding: 0;
	border: none;
	box-shadow: none;
	background: transparent;
}

/* Prevent body scroll when panel is open */
body.aptf-no-scroll {
	overflow: hidden;
}

/* ==========================================================================
   Elementor editor placeholder
   ========================================================================== */

.apf-empty-notice {
	padding: 0.84em;  /* 16px */
	color: #6b7280;
	font-size: 0.68em; /* 13px */
	font-style: italic;
	text-align: center;
}
