/* ==========================================================================
   Awesome Filter Gallery Widget
   ========================================================================== */

.awea-fg-root {
	--awea-fg-primary: var(--e-global-color-primary, #4f46e5);
	--awea-fg-heading: #0f172a;
	--awea-fg-muted: #64748b;
	--awea-fg-border: #e2e8f0;

	width: 100%;
	position: relative;
	box-sizing: border-box;
}

.awea-fg-root *,
.awea-fg-root *::before,
.awea-fg-root *::after {
	box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   1. Sliding Pill Navigation Bar
   -------------------------------------------------------------------------- */
.awea-fg-nav-wrapper {
	display: flex;
	align-items: center;
	width: 100%;
}

.awea-fg-nav-track {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background-color: #f1f5f9;
	padding: 5px;
	border-radius: 100px;
	border: 1px solid var(--awea-fg-border);
	position: relative;
}

.awea-fg-pill-indicator {
	position: absolute;
	top: 0;
	left: 0;
	border-radius: 100px;
	background-color: var(--awea-fg-primary);
	pointer-events: none;
	opacity: 0;
	transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
	z-index: 1;
}

.awea-fg-btn {
	position: relative;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: transparent;
	color: var(--awea-fg-muted);
	border: none;
	padding: 8px 18px;
	font-size: 0.88rem;
	font-weight: 700;
	cursor: pointer;
	border-radius: 100px;
	transition: color 0.25s ease;
	user-select: none;
	white-space: nowrap;
	outline: none;
}

.awea-fg-btn:hover {
	color: var(--awea-fg-heading);
}

.awea-fg-btn.is-active {
	color: #ffffff;
}

.awea-fg-counter {
	font-size: 0.7rem;
	font-weight: 800;
	padding: 2px 6px;
	border-radius: 100px;
	background-color: rgba(15, 23, 42, 0.06);
	color: inherit;
	line-height: 1;
}

.awea-fg-btn.is-active .awea-fg-counter {
	background-color: rgba(255, 255, 255, 0.22);
	color: #ffffff;
}

/* --------------------------------------------------------------------------
   2. Grid Architecture & Transitions
   -------------------------------------------------------------------------- */
.awea-fg-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	width: 100%;
}

.awea-fg-item {
	min-width: 0;
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.awea-fg-item.is-fading-out {
	opacity: 0;
	transform: scale(0.96);
}

.awea-fg-item.is-fading-in {
	opacity: 1;
	transform: scale(1);
}

/* --------------------------------------------------------------------------
   3. Card Shell
   -------------------------------------------------------------------------- */
.awea-fg-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background-color: #ffffff;
	border: 1px solid var(--awea-fg-border);
	border-radius: 24px;
	overflow: hidden;
	transition:
		background-color 0.25s ease,
		border-color 0.25s ease,
		box-shadow 0.25s ease;
}

.awea-fg-card:hover {
	background-color: #f8fafc;
	border-color: var(--awea-fg-primary);
}

/* --------------------------------------------------------------------------
   4. Thumbnail & Actions Overlay
   -------------------------------------------------------------------------- */
.awea-fg-thumb {
	position: relative;
	width: 100%;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background-color: #f1f5f9;
}

.awea-fg-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.awea-fg-card:hover .awea-fg-thumb img {
	transform: scale(1.03);
}

.awea-fg-actions {
	position: absolute;
	top: 14px;
	right: 14px;
	display: flex;
	align-items: center;
	gap: 6px;
	z-index: 3;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.awea-fg-card:hover .awea-fg-actions {
	opacity: 1;
}

.awea-fg-action-btn {
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background-color: rgba(15, 23, 42, 0.78);
	border: 1px solid rgba(255, 255, 255, 0.16);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #ffffff;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.awea-fg-action-btn:hover,
.awea-fg-action-btn:focus-visible {
	background-color: var(--awea-fg-primary);
	color: #ffffff;
}

.awea-fg-action-btn svg {
	width: 15px;
	height: 15px;
	fill: none;
	stroke: currentColor;
}

/* --------------------------------------------------------------------------
   5. Card Body
   -------------------------------------------------------------------------- */
.awea-fg-body {
	padding: 20px 22px;
	display: flex;
	flex-direction: column;
}

.awea-fg-subtitle {
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--awea-fg-primary);
	margin-bottom: 4px;
	line-height: 1.2;
}

.awea-fg-title {
	margin: 0;
	font-size: 1.15rem;
	font-weight: 800;
	color: var(--awea-fg-heading);
	letter-spacing: -0.02em;
	line-height: 1.3;
	word-break: break-word;
}

/* --------------------------------------------------------------------------
   6. Accessibility & Responsive
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.awea-fg-pill-indicator,
	.awea-fg-thumb img,
	.awea-fg-item {
		transition: none !important;
	}
}

@media (max-width: 768px) {
	.awea-fg-nav-wrapper {
		overflow-x: auto;
		padding-bottom: 6px;
		-webkit-overflow-scrolling: touch;
	}

	.awea-fg-nav-track {
		flex-wrap: nowrap;
	}

	.awea-fg-card {
		border-radius: 18px;
	}

	.awea-fg-actions {
		opacity: 1;
	}

	.awea-fg-body {
		padding: 16px 18px;
	}
}