/* ==========================================================================
   Wise Addons: product components shared by the homepage and the widget catalog.
   Filterable widget grid, feature cards, chip lists and the call-to-action band.
   ========================================================================== */

/* Catalog controls ------------------------------------------------------- */

.catalog__controls {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	margin-bottom: clamp(28px, 4vw, 40px);
}

.catalog__search { position: relative; width: min(100%, 580px); }

.catalog__search .wa-icon {
	position: absolute;
	top: 50%;
	left: 20px;
	color: var(--wa-subtle);
	transform: translateY(-50%);
	pointer-events: none;
}

.catalog__search input {
	width: 100%;
	height: 58px;
	padding: 0 22px 0 54px;
	border: 1px solid var(--wa-border-strong);
	border-radius: 999px;
	background: #fff;
	box-shadow: var(--wa-shadow);
	color: var(--wa-text);
	font: inherit;
	font-size: 1.0625rem;
	transition: border-color .15s, box-shadow .15s;
}

.catalog__search input::placeholder { color: #7c8299; }
.catalog__search input:focus { border-color: var(--wa-primary); outline: none; box-shadow: 0 0 0 4px rgba(91, 76, 245, .18), var(--wa-shadow); }

.filter {
	display: flex;
	gap: 4px;
	max-width: 100%;
	padding: 6px;
	overflow-x: auto;
	border: 1px solid var(--wa-border);
	border-radius: 999px;
	background: #fff;
	box-shadow: var(--wa-shadow-sm);
	scrollbar-width: none;
}

.filter::-webkit-scrollbar { display: none; }

.filter__btn {
	display: inline-flex;
	flex: none;
	align-items: center;
	gap: 8px;
	padding: 9px 16px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--wa-ink-2);
	font-size: .925rem;
	font-weight: 620;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .15s, color .15s;
}

.filter__btn:hover { background: #f2f3f9; color: var(--wa-text); }
.filter__btn:focus-visible { outline-offset: -2px; }
.filter__btn[aria-pressed="true"] { background: var(--wa-dark); color: #fff; }

.filter__count {
	display: inline-grid;
	place-items: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 999px;
	background: #eceef5;
	color: var(--wa-muted);
	font-size: .75rem;
	font-weight: 700;
}

.filter__btn[aria-pressed="true"] .filter__count { background: rgba(255, 255, 255, .18); color: #fff; }

@media (max-width: 900px) {
	.filter {
		flex-wrap: wrap;
		justify-content: center;
		gap: 8px;
		padding: 0;
		overflow: visible;
		border: 0;
		border-radius: 0;
		background: none;
		box-shadow: none;
	}

	.filter__btn { padding: 8px 14px; border: 1px solid var(--wa-border); background: #fff; font-size: .875rem; }
	.filter__btn[aria-pressed="true"] { border-color: var(--wa-dark); }
}

/* Widget cards ----------------------------------------------------------- */

.wgrid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.wcard {
	--cat-tint: #efedff;
	--cat-ink: #5b4cf5;
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 22px 22px 18px;
	border: 1px solid var(--wa-border);
	border-radius: 20px;
	background: #fff;
	transition: transform .25s var(--wa-ease), box-shadow .25s, border-color .25s;
}

.wcard[hidden] { display: none; }
.wcard--creative { --cat-tint: #ffe9f2; --cat-ink: #c21d5f; }
.wcard--media { --cat-tint: #e0f6f9; --cat-ink: #0b7d8f; }
.wcard--posts { --cat-tint: #fff1df; --cat-ink: #b45309; }
.wcard--marketing { --cat-tint: #e1f7ec; --cat-ink: #0f7b4b; }

.wcard:hover {
	border-color: transparent;
	box-shadow: 0 2px 6px rgba(22, 26, 43, .04), 0 24px 48px -20px rgba(53, 40, 170, .3);
	transform: translateY(-3px);
}

.wcard__icon {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 14px;
	background: var(--cat-tint);
	color: var(--cat-ink);
	transition: transform .3s var(--wa-ease);
}

.wcard:hover .wcard__icon { transform: rotate(-6deg) scale(1.06); }

.wcard__title {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 6px 0 0;
	font-size: 1.0625rem;
	font-weight: 720;
	letter-spacing: -.015em;
}

.wcard__link { color: var(--wa-text); text-decoration: none; }
.wcard__link:hover { color: var(--wa-text); }
.wcard__link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }

@supports selector(:has(*)) {
	.wcard__link:focus-visible { outline: none; }
	.wcard:has(.wcard__link:focus-visible) { outline: 3px solid var(--wa-primary); outline-offset: 3px; }
}

.wcard__desc { flex: 1; margin: 0; color: var(--wa-muted); font-size: .925rem; line-height: 1.55; }

.wcard__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 12px;
	margin: 8px 0 0;
	padding-top: 14px;
	border-top: 1px solid var(--wa-border);
	font-size: .8125rem;
	font-weight: 650;
}

.wcard__cat { color: var(--cat-ink); }
.wcard__more { display: inline-flex; align-items: center; gap: 4px; color: var(--wa-muted); transition: color .2s, gap .2s; }
.wcard:hover .wcard__more { gap: 8px; color: var(--wa-primary); }

.wcard__files {
	padding: 3px 8px;
	border-radius: 6px;
	background: var(--wa-bg);
	color: var(--wa-muted);
	font-family: var(--wa-mono);
	font-size: .72rem;
	font-weight: 500;
}

.catalog__empty {
	max-width: 440px;
	margin: 24px auto 0;
	padding: 40px 24px;
	border: 1px dashed var(--wa-border-strong);
	border-radius: 20px;
	color: var(--wa-muted);
	text-align: center;
}

.catalog__empty[hidden] { display: none; }
.catalog__empty .wa-icon { color: var(--wa-primary); }
.catalog__empty-title { margin: 10px 0 4px; color: var(--wa-text); font-size: 1.125rem; font-weight: 700; }

@media (max-width: 600px) {
	.wgrid { gap: 12px; }

	.wcard {
		display: grid;
		grid-template-columns: 44px minmax(0, 1fr);
		align-items: start;
		gap: 4px 14px;
		padding: 16px 18px;
		border-radius: 18px;
	}

	.wcard__icon { grid-row: 1 / span 3; width: 44px; height: 44px; border-radius: 12px; }
	.wcard__title { margin: 0; font-size: 1rem; }
	.wcard__desc { font-size: .875rem; }
	.wcard__meta { justify-content: flex-start; margin: 4px 0 0; padding-top: 0; border-top: 0; }
	.wcard__more { display: none; }
	.fcard { padding: 18px; }
}

/* Feature cards ---------------------------------------------------------- */

.fgrid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.fgrid--3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.fcard {
	position: relative;
	display: flex;
	gap: 16px;
	padding: 22px;
	border: 1px solid var(--wa-border);
	border-radius: 20px;
	background: #fff;
	transition: transform .25s var(--wa-ease), box-shadow .25s;
}

.fcard:hover { box-shadow: var(--wa-shadow); transform: translateY(-2px); }

.fcard__icon {
	display: grid;
	flex: none;
	place-items: center;
	width: 46px;
	height: 46px;
	border-radius: 14px;
	background: linear-gradient(135deg, #efedff, #e0f6f9);
	color: var(--wa-primary);
}

.fcard__title { margin: 2px 0 6px; font-size: 1.0625rem; font-weight: 720; letter-spacing: -.015em; }
.fcard__title a { color: var(--wa-text); text-decoration: none; }
.fcard__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.fcard__desc { margin: 0 0 12px; color: var(--wa-muted); font-size: .925rem; line-height: 1.55; }

.fcard__cat {
	color: var(--wa-muted);
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
}

.fcard--highlight {
	border: 1.5px solid transparent;
	background: linear-gradient(#fff, #fff) padding-box, var(--wa-gradient) border-box;
}

.fcard--highlight .fcard__icon { background: var(--wa-gradient); color: #fff; }

@media (max-width: 700px) {
	.fgrid { grid-template-columns: minmax(0, 1fr); }
}

/* Chip lists ------------------------------------------------------------- */

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips--center { justify-content: center; max-width: 920px; margin-inline: auto; }

.chips__item {
	padding: 7px 14px;
	border: 1px solid var(--wa-border);
	border-radius: 999px;
	background: #fff;
	color: var(--wa-ink-2);
	font-size: .875rem;
	font-weight: 600;
	line-height: 1.3;
}

.chips__item--feature { border-color: #c4ece5; background: #effbf8; color: #05665c; }
.chips__item--more { border-style: dashed; background: transparent; color: var(--wa-muted); }
.chips--sm .chips__item { padding: 5px 11px; font-size: .8125rem; }

/* Call to action --------------------------------------------------------- */

.cta { padding: clamp(24px, 4vw, 40px) 0 clamp(72px, 10vw, 120px); }

.cta__band {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding: clamp(48px, 7vw, 96px) clamp(20px, 5vw, 64px);
	border-radius: var(--wa-radius-xl);
	background:
		radial-gradient(60% 90% at 100% 100%, rgba(34, 184, 207, .55), transparent 60%),
		radial-gradient(50% 70% at 0% 0%, rgba(255, 77, 141, .28), transparent 60%),
		linear-gradient(135deg, #3f30d9 0%, #5b4cf5 55%, #4a46e6 100%);
	color: #fff;
	text-align: center;
	box-shadow: 0 40px 80px -40px rgba(53, 40, 170, .6);
}

.cta__art { position: absolute; inset: 0; z-index: -1; pointer-events: none; }

.cta__art span {
	position: absolute;
	top: 50%;
	left: 50%;
	border: 1px solid rgba(255, 255, 255, .12);
	border-radius: 50%;
	transform: translate(-50%, -50%);
}

.cta__art span:nth-child(1) { width: 420px; height: 420px; }
.cta__art span:nth-child(2) { width: 700px; height: 700px; border-color: rgba(255, 255, 255, .08); }
.cta__art span:nth-child(3) { width: 1000px; height: 1000px; border-color: rgba(255, 255, 255, .05); }

.cta__band::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image: radial-gradient(rgba(255, 255, 255, .22) 1px, transparent 1.2px);
	background-size: 24px 24px;
	-webkit-mask-image: radial-gradient(50% 60% at 50% 50%, transparent 30%, #000 100%);
	mask-image: radial-gradient(50% 60% at 50% 50%, transparent 30%, #000 100%);
	opacity: .5;
}

.cta__logo {
	width: 92px;
	height: 92px;
	margin: 0 auto 28px;
	padding: 10px;
	border: 1px solid rgba(255, 255, 255, .3);
	border-radius: 30px;
	background: rgba(255, 255, 255, .14);
	box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .45);
}

.cta__title {
	max-width: 16ch;
	margin: 0 auto;
	color: #fff;
	font-size: clamp(2rem, 1.25rem + 3vw, 3.5rem);
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -.04em;
}

.cta__lead { max-width: 56ch; margin: 20px auto 0; color: rgba(255, 255, 255, .88); font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem); }
.cta__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }
.cta :focus-visible { outline-color: #fff; }

/* Catalog page ----------------------------------------------------------- */

.catalog-page__content { margin-top: 8px; }
.catalog-page .section--tight { padding-top: 8px; }
