/* Theme tokens — defaults; Appearance settings override via #affluentia-theme-vars */
html.affluentia-theme-dark,
html:not(.affluentia-theme-light) {
	--bg: #0b0b0b;
	--bg-elevated: #161616;
	--text: #f2f2f2;
	--card-bg: #161616;
	--headline: #f5f5f5;
	--subheadline: #b0b0b0;
	--accent: #b4f038;
	--accent-hover: #c8ff4d;
	--accent-glow: rgba(180, 240, 56, 0.25);
	--border: #2a2a2a;
	--muted: #8a8a8a;
	--text-faint: #8a8a8a;
	--input-bg: #0b0b0b;
	--shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.35);
	--toggle-bg: #ffffff;
	--toggle-icon: #000000;
	color-scheme: dark;
}

html.affluentia-theme-light {
	--bg: #f7f7f5;
	--bg-elevated: #ffffff;
	--text: #1a1a1a;
	--card-bg: #ffffff;
	--headline: #111111;
	--subheadline: #5c5c5c;
	--accent: #b4f038;
	--accent-hover: #8fb82c;
	--accent-glow: rgba(180, 240, 56, 0.22);
	--border: #e2e2e0;
	--muted: #6e6e6e;
	--text-faint: #6e6e6e;
	--input-bg: #ffffff;
	--shadow-soft: 0 12px 28px rgba(0, 0, 0, 0.08);
	--toggle-bg: #000000;
	--toggle-icon: #ffffff;
	color-scheme: light;
}

:root {
	--font-sans: "Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--radius-lg: 18px;
	--radius-md: 12px;
	--transition-fast: 160ms ease-out;
	--safe-top: env(safe-area-inset-top, 0);
	--safe-bottom: env(safe-area-inset-bottom, 0);
	--safe-left: env(safe-area-inset-left, 0);
	--safe-right: env(safe-area-inset-right, 0);
}

/* Plugin owns page background (overrides Elementor section fills when possible) */
html.affluentia-theme-dark,
html.affluentia-theme-light,
html.affluentia-theme-dark body,
html.affluentia-theme-light body,
html:not(.affluentia-theme-light) body {
	background-color: var(--bg) !important;
	color: var(--text);
}

body.affluentia-has-chrome {
	font-family: var(--font-sans);
	background-color: var(--bg) !important;
	color: var(--text);
}

body.affluentia-has-chrome .site,
body.affluentia-has-chrome .site-content,
body.affluentia-has-chrome #content,
body.affluentia-has-chrome #page,
body.affluentia-has-chrome .elementor,
body.affluentia-has-chrome .elementor-section,
body.affluentia-has-chrome .elementor-section-wrap,
body.affluentia-has-chrome .elementor-container,
body.affluentia-has-chrome .elementor-widget-wrap,
body.affluentia-has-chrome .elementor-background-overlay {
	background-color: transparent !important;
	background-image: none !important;
}

body.affluentia-has-chrome .elementor-section.elementor-section-boxed > .elementor-container,
body.affluentia-has-chrome .elementor-top-section,
body.affluentia-has-chrome .elementor-inner-section {
	background-color: transparent !important;
}

/* Homepage / page headings */
.affluentia-headline,
body.affluentia-has-chrome .elementor-heading-title,
body.affluentia-has-chrome h1.entry-title,
body.affluentia-has-chrome .entry-title {
	color: var(--headline) !important;
}

.affluentia-subheadline,
body.affluentia-has-chrome .elementor-widget-text-editor,
body.affluentia-has-chrome .elementor-widget-text-editor p {
	color: var(--subheadline);
}

body.affluentia-has-chrome p,
body.affluentia-has-chrome li {
	color: var(--text);
}

/* ---- Chrome ---- */
.affluentia-chrome {
	position: sticky;
	top: 0;
	z-index: 10000;
	background: var(--bg);
	border-bottom: 1px solid var(--border);
	isolation: isolate;
	pointer-events: auto;
}

.affluentia-chrome__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0.75rem 1rem;
	min-height: 56px;
}

.affluentia-chrome__brand {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	color: var(--headline) !important;
}

.affluentia-chrome__logo {
	display: none;
	height: 36px;
	width: auto;
	max-width: 180px;
	object-fit: contain;
}

html.affluentia-theme-dark .affluentia-chrome__logo--dark,
html:not(.affluentia-theme-light) .affluentia-chrome__logo--dark {
	display: block;
}

html.affluentia-theme-light .affluentia-chrome__logo--light {
	display: block;
}

html.affluentia-theme-light .affluentia-chrome__logo--dark {
	display: none;
}

html.affluentia-theme-dark .affluentia-chrome__logo--light {
	display: none;
}

.affluentia-chrome__wordmark {
	font-family: var(--font-sans);
	font-weight: 800;
	font-style: italic;
	font-size: 1.05rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--headline) !important;
}

html body .affluentia-chrome button.affluentia-chrome__theme-toggle,
html body .elementor-widget-container button.affluentia-chrome__theme-toggle,
.affluentia-chrome__theme-toggle {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 52px !important;
	height: 32px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: var(--toggle-bg) !important;
	background-color: var(--toggle-bg) !important;
	color: var(--toggle-icon) !important;
	cursor: pointer !important;
	box-shadow: none !important;
	text-decoration: none !important;
	-webkit-appearance: none !important;
	appearance: none !important;
	-webkit-tap-highlight-color: transparent;
	isolation: isolate;
}

html body .affluentia-chrome button.affluentia-chrome__theme-toggle:hover,
html body .affluentia-chrome button.affluentia-chrome__theme-toggle:focus,
html body .affluentia-chrome button.affluentia-chrome__theme-toggle:focus-visible,
html body .affluentia-chrome button.affluentia-chrome__theme-toggle:active,
.affluentia-chrome__theme-toggle:hover,
.affluentia-chrome__theme-toggle:focus-visible,
.affluentia-chrome__theme-toggle:active {
	background: var(--toggle-bg) !important;
	background-color: var(--toggle-bg) !important;
	color: var(--toggle-icon) !important;
	outline: 2px solid var(--border);
	outline-offset: 2px;
	text-decoration: none !important;
}

.affluentia-chrome__icon {
	display: none;
	line-height: 0;
	color: var(--toggle-icon) !important;
}

.affluentia-chrome__icon svg,
.affluentia-chrome__icon svg path,
.affluentia-chrome__icon svg circle {
	display: block;
	fill: currentColor !important;
	color: inherit !important;
	stroke: currentColor;
}

html.affluentia-theme-dark .affluentia-chrome__icon--moon,
html:not(.affluentia-theme-light) .affluentia-chrome__icon--moon {
	display: block;
	color: var(--toggle-icon) !important;
}

html.affluentia-theme-light .affluentia-chrome__icon--sun {
	display: block;
	color: var(--toggle-icon) !important;
}

/* ---- Splash (homepage) ---- */
.affluentia-splash {
	position: fixed;
	inset: 0;
	z-index: 20000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #000000;
	transition: opacity 320ms ease;
}

html.affluentia-theme-light .affluentia-splash {
	background: #000000; /* splash always near-black with white logo */
}

.affluentia-splash.is-hiding {
	opacity: 0;
	pointer-events: none;
}

.affluentia-splash[hidden],
.affluentia-splash.is-done {
	display: none !important;
}

.affluentia-splash__logo {
	width: min(220px, 55vw);
	height: auto;
	opacity: 0.96;
}

@media (prefers-reduced-motion: reduce) {
	.affluentia-splash {
		transition: none;
	}
}

/* ---- Compliance ---- */
.affluentia-compliance {
	font-family: var(--font-sans);
	width: 100%;
	z-index: 9990;
}

.affluentia-compliance__bar {
	background: transparent;
	border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
	padding: 0.4rem 1rem;
}

.affluentia-compliance__summary {
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.15rem 0;
	font-size: 0.6875rem;
	line-height: 1.4;
	letter-spacing: 0.02em;
	color: var(--text-faint);
	text-align: center;
}

.affluentia-compliance__summary-text {
	color: var(--muted);
	font-weight: 400;
}

.affluentia-compliance__sep {
	color: var(--text-faint);
}

.affluentia-compliance__more {
	display: inline-flex;
	align-items: center;
	gap: 0.2rem;
	color: var(--accent);
	font-size: 0.6875rem;
	font-weight: 500;
	text-decoration: underline;
	text-underline-offset: 2px;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
}

.affluentia-compliance__more:hover,
.affluentia-compliance__more:focus-visible {
	color: var(--accent-hover);
	outline: none;
}

.affluentia-compliance__icon {
	font-size: 0.75rem;
	line-height: 1;
}

.affluentia-compliance__dialog[hidden] {
	display: none !important;
}

.affluentia-compliance__dialog:not([hidden]) {
	position: fixed;
	inset: 0;
	z-index: 30000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.affluentia-compliance__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.65);
}

.affluentia-compliance__modal {
	position: relative;
	z-index: 1;
	width: min(560px, 100%);
	max-height: min(80vh, 640px);
	overflow: auto;
	background: var(--card-bg);
	color: var(--text);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	padding: 1.25rem 1.25rem 1.5rem;
	box-shadow: var(--shadow-soft);
}

.affluentia-compliance__modal-title {
	margin: 0 0 0.85rem;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--muted);
}

.affluentia-compliance__modal-body {
	font-size: 0.8125rem;
	line-height: 1.55;
	color: var(--muted);
}

.affluentia-compliance__modal-body p {
	margin: 0 0 0.75rem;
}

html body .affluentia-compliance button.affluentia-compliance__close,
.affluentia-compliance__close {
	display: block !important;
	margin: 1rem auto 0 !important;
	min-height: 44px !important;
	min-width: 120px !important;
	padding: 0.6rem 1.35rem !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: #b4f038 !important;
	background-color: #b4f038 !important;
	background-image: none !important;
	color: #000000 !important;
	font-family: var(--font-sans) !important;
	font-size: 0.75rem !important;
	font-weight: 700 !important;
	letter-spacing: 0.1em !important;
	text-transform: uppercase !important;
	cursor: pointer !important;
	box-shadow: none !important;
}

html body .affluentia-compliance button.affluentia-compliance__close:hover,
html body .affluentia-compliance button.affluentia-compliance__close:focus-visible,
.affluentia-compliance__close:hover,
.affluentia-compliance__close:focus-visible {
	background: #c8ff4d !important;
	background-color: #c8ff4d !important;
	color: #000000 !important;
	outline: none;
}

body.affluentia-compliance-open {
	overflow: hidden;
}

/* ---- Search ---- */
.affluentia-search {
	background-color: var(--bg);
	color: var(--text);
	padding: 1.25rem var(--safe-left) 1.25rem var(--safe-right);
	padding-top: max(1.25rem, var(--safe-top));
	padding-bottom: max(1.25rem, var(--safe-bottom));
	border-radius: 0;
	box-shadow: none;
	max-width: 100%;
	margin: 0;
	font-family: var(--font-sans);
	-webkit-tap-highlight-color: transparent;
}

.affluentia-search__header {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin-bottom: 1.5rem;
}

.affluentia-search__title,
.affluentia-headline {
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--headline);
}

.affluentia-search__subtitle,
.affluentia-subheadline {
	font-size: 0.9375rem;
	font-weight: 400;
	color: var(--subheadline);
	max-width: 100%;
	line-height: 1.5;
}

.affluentia-search__field {
	position: relative;
	margin-top: 0.5rem;
}

.affluentia-search__input {
	width: 100%;
	min-height: 48px;
	padding: 0.875rem 1rem;
	border-radius: 999px;
	border: 1px solid var(--border);
	background: var(--input-bg);
	color: var(--text);
	font-family: var(--font-sans);
	font-size: 16px;
	transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
	touch-action: manipulation;
}

.affluentia-search__input::placeholder {
	color: var(--text-faint);
}

.affluentia-search__input:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-glow);
}

.affluentia-search__results {
	margin-top: 1.75rem;
}

.affluentia-search__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0.75rem;
}

.affluentia-card {
	background-color: var(--card-bg);
	border-radius: var(--radius-md);
	border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	min-height: 240px;
	transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.affluentia-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-soft);
	border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}

.affluentia-card__image-wrap {
	position: relative;
	padding-top: 70%;
	overflow: hidden;
	background: var(--bg-elevated);
}

.affluentia-card__badge {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	background: var(--affluentia-badge-bg, #1b1b1b);
	color: var(--affluentia-badge-text, #f5f5f5);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 10px;
	padding: 6px 8px;
	font-size: 0.68rem;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.affluentia-card__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.affluentia-card__body {
	padding: 1rem 1rem 1.1rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.affluentia-card__title {
	font-size: 0.8125rem;
	font-weight: 500;
	line-height: 1.35;
	color: var(--text);
	max-height: 2.7em;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	margin: 0;
}

.affluentia-card__meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 0.4rem;
}

.affluentia-card__prices {
	display: inline-flex;
	align-items: baseline;
	gap: 0.5rem;
	min-width: 0;
}

.affluentia-card__price {
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.affluentia-card__price--sale {
	font-size: 0.95rem;
	color: var(--accent);
	font-weight: 650;
}

.affluentia-card__price--original {
	font-size: 0.86rem;
	color: var(--muted);
	text-decoration: line-through;
	text-decoration-thickness: 1px;
	opacity: 0.95;
}

.affluentia-card__cta {
	font-size: 0.68rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--muted);
}

.affluentia-card__price-original {
	font-size: 0.8125rem;
	color: var(--muted);
	text-decoration: line-through;
}

.affluentia-card__savings {
	font-size: 0.75rem;
	color: var(--accent);
	font-weight: 500;
}

.affluentia-card__cta-button {
	display: block;
	width: 100%;
	margin-top: auto;
	padding: 0.625rem 0.75rem;
	border-radius: 999px;
	border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
	background: transparent;
	color: var(--text);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-align: center;
	transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.affluentia-card:hover .affluentia-card__cta-button {
	background: var(--accent);
	border-color: var(--accent);
	color: #000;
}

.affluentia-card__price-note {
	font-size: 0.65rem;
	color: var(--text-faint);
	line-height: 1.35;
	margin-top: 0.15rem;
}

.affluentia-card__link {
	color: inherit;
	text-decoration: none;
	display: flex;
	flex-direction: column;
	height: 100%;
}

.affluentia-search__compliance {
	margin-top: 2rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--border);
}

.affluentia-search__disclosure,
.affluentia-search__price-disclaimer {
	margin: 0 0 0.5rem;
	font-size: 0.75rem;
	line-height: 1.45;
	color: var(--text-faint);
}

.affluentia-search__price-disclaimer {
	margin-bottom: 0;
}

.affluentia-search__empty {
	text-align: center;
	color: var(--muted);
	padding: 2.5rem 0 1.5rem;
	font-size: 0.95rem;
}

.affluentia-search__loader-row {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0.75rem;
	margin-top: 1rem;
}

.affluentia-skeleton {
	border-radius: var(--radius-md);
	overflow: hidden;
	background-color: var(--card-bg);
	border: 1px solid var(--border);
	animation: affluentia-pulse 1.4s ease-in-out infinite;
	min-height: 220px;
}

.affluentia-skeleton__image {
	height: 140px;
	background: linear-gradient(90deg, var(--bg) 0, var(--card-bg) 30%, var(--bg) 60%);
}

.affluentia-skeleton__body {
	padding: 1rem;
}

.affluentia-skeleton__line {
	height: 0.7rem;
	border-radius: 999px;
	background-color: var(--border);
	margin-bottom: 0.5rem;
}

.affluentia-skeleton__line--short {
	width: 40%;
}

.affluentia-skeleton__line--medium {
	width: 60%;
}

.affluentia-skeleton__line--full {
	width: 100%;
}

.affluentia-search__load-more {
	margin-top: 1.75rem;
	text-align: center;
}

.affluentia-search__load-more button {
	background: transparent;
	border-radius: 999px;
	border: 1px solid var(--border);
	min-height: 48px;
	min-width: 160px;
	padding: 0.75rem 1.5rem;
	color: var(--text);
	font-family: var(--font-sans);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	cursor: pointer;
	transition: border-color var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast);
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

.affluentia-search__load-more button:hover {
	border-color: var(--accent);
	color: var(--accent);
}

.affluentia-search__load-more button:disabled {
	opacity: 0.5;
	cursor: default;
}

@keyframes affluentia-pulse {
	0% {
		opacity: 0.6;
	}
	50% {
		opacity: 1;
	}
	100% {
		opacity: 0.6;
	}
}

@media (min-width: 640px) {
	.affluentia-search {
		padding: 2rem;
		border-radius: var(--radius-lg);
		box-shadow: var(--shadow-soft);
		max-width: 1200px;
		margin: 2rem auto;
		background: var(--bg-elevated);
	}
	.affluentia-search__grid,
	.affluentia-search__loader-row {
		grid-template-columns: repeat(3, 1fr);
		gap: 1rem;
	}
	.affluentia-search__title {
		font-size: 0.875rem;
	}
	.affluentia-search__subtitle {
		max-width: 480px;
	}
	.affluentia-compliance__summary {
		font-size: 0.75rem;
	}
	.affluentia-compliance__more {
		font-size: 0.75rem;
	}
}

@media (min-width: 1024px) {
	.affluentia-search__grid,
	.affluentia-search__loader-row {
		grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
		gap: 1.3rem;
	}
	.affluentia-card {
		min-height: 280px;
	}
	.affluentia-card__title {
		font-size: 0.92rem;
	}
}

/* ---- Homepage + pillars ---- */
.affluentia-home {
	--home-visible: 4;
	max-width: min(1200px, 100%);
	margin: 0 auto;
	padding: 0.35rem 0.75rem 1.25rem;
	min-height: calc(100dvh - 7.5rem);
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	gap: 0.55rem;
	background: transparent;
	color: var(--text);
	overflow: visible;
	box-sizing: border-box;
	isolation: isolate;
	z-index: 0;
}

.affluentia-pillar {
	max-width: 1100px;
	margin: 0 auto;
	padding: 2rem 1rem 3.5rem;
	background: transparent;
	color: var(--text);
}

.affluentia-home__logo {
	display: flex;
	justify-content: center;
	align-items: center;
	flex: 0 1 auto;
	min-height: 0;
	margin: 0;
	padding: 0.15rem 0 0.25rem;
}

.affluentia-home__logo-img {
	display: none;
	width: 100%;
	max-width: 100%;
	max-height: min(36dvh, 420px);
	height: auto;
	margin-inline: auto;
	object-fit: contain;
}

html.affluentia-theme-dark .affluentia-home__logo-img--dark,
html:not(.affluentia-theme-light) .affluentia-home__logo-img--dark {
	display: block;
}

html.affluentia-theme-light .affluentia-home__logo-img--light {
	display: block;
}

html.affluentia-theme-light .affluentia-home__logo-img--dark {
	display: none;
}

html.affluentia-theme-light .affluentia-home__logo-img--only,
html.affluentia-theme-dark .affluentia-home__logo-img--only {
	display: block;
}

.affluentia-home__wordmark {
	margin: 0;
	font-size: clamp(1.6rem, 6vw, 3rem);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--headline);
}

/* SEARCH wide strip under logo */
.affluentia-home-search {
	position: relative;
	display: block;
	width: 100%;
	flex: 0 0 auto;
	height: clamp(3.25rem, 9dvh, 4.5rem);
	overflow: hidden;
	text-decoration: none;
	color: inherit;
}

.affluentia-home-search__image,
.affluentia-home-search__placeholder {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.affluentia-home-search__placeholder {
	background: linear-gradient(160deg, var(--border) 0%, var(--card-bg) 55%, var(--bg) 100%);
}

.affluentia-home-search .affluentia-home-card__pill {
	max-width: min(12rem, calc(100% - 1rem));
}

/* Category row / cover-flow wheel */
.affluentia-home__carousel,
.affluentia-wheel {
	position: relative;
	display: flex;
	align-items: stretch;
	width: 100%;
	flex: 0 0 auto;
	min-width: 0;
	overflow: visible;
	padding: 0.65rem 0.15rem 1.35rem;
	perspective: 700px;
	touch-action: none;
	cursor: grab;
	z-index: 1;
	isolation: isolate;
}

.affluentia-home__carousel--wheel:active,
.affluentia-wheel:active {
	cursor: grabbing;
}

.affluentia-home__track {
	display: grid;
	gap: clamp(0.35rem, 1.2vw, 0.75rem);
	width: 100%;
	min-width: 0;
	align-items: stretch;
	min-height: clamp(5.5rem, 16dvh, 9.5rem);
	max-height: clamp(7rem, 22dvh, 11rem);
}

.affluentia-home__track--static.affluentia-home__track--count-1 {
	grid-template-columns: minmax(0, 1fr);
}
.affluentia-home__track--static.affluentia-home__track--count-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}
.affluentia-home__track--static.affluentia-home__track--count-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}
.affluentia-home__track--static.affluentia-home__track--count-4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.affluentia-home__track--carousel,
.affluentia-wheel__track {
	display: flex;
	flex-wrap: nowrap;
	width: max-content;
	max-width: none;
	overflow: visible;
	padding: 0.5rem 0.2rem 0.75rem;
	max-height: none;
	min-height: clamp(6rem, 18dvh, 10.5rem);
	gap: 0.75rem;
	will-change: transform;
	transform-style: preserve-3d;
}

.affluentia-home__track--carousel .affluentia-home-card,
.affluentia-wheel__track .affluentia-spend-card {
	--wheel-offset: 0;
	flex: 0 0 clamp(5.5rem, 22vw, 9.5rem);
	height: clamp(5.75rem, 17dvh, 10rem);
	box-shadow:
		0 10px 24px rgba(0, 0, 0, 0.28),
		0 0 0 1px color-mix(in srgb, var(--accent) 16%, transparent);
	transition: box-shadow 180ms ease, opacity 120ms ease;
	will-change: transform;
	position: relative;
	z-index: 1;
}

.affluentia-home__track--carousel .affluentia-home-card.is-near-center,
.affluentia-wheel__track .affluentia-spend-card.is-near-center {
	box-shadow:
		0 14px 30px rgba(0, 0, 0, 0.34),
		0 0 0 2px color-mix(in srgb, var(--accent) 50%, transparent),
		0 0 18px color-mix(in srgb, var(--accent) 28%, transparent) !important;
}

.affluentia-home__track--carousel .affluentia-home-card.is-far,
.affluentia-wheel__track .affluentia-spend-card.is-far {
	box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

.affluentia-home-card,
.affluentia-spend-card {
	min-width: 0;
	height: 100%;
	background: transparent;
	border: 0;
	box-shadow: none;
	overflow: hidden;
	transform-origin: center center;
	transition: transform 180ms ease, box-shadow 180ms ease;
}

.affluentia-home__track--carousel .affluentia-home-card:hover .affluentia-home-card__link,
.affluentia-home__track--carousel .affluentia-home-card.is-pressed .affluentia-home-card__link,
.affluentia-wheel__track .affluentia-spend-card:hover .affluentia-spend-card__link,
.affluentia-wheel__track .affluentia-spend-card.is-pressed .affluentia-spend-card__link {
	transform: scale(1.08);
	box-shadow:
		0 0 0 2px var(--accent),
		0 0 20px color-mix(in srgb, var(--accent) 40%, transparent);
}

.affluentia-home__track--carousel .affluentia-home-card:hover,
.affluentia-home__track--carousel .affluentia-home-card.is-pressed,
.affluentia-wheel__track .affluentia-spend-card:hover,
.affluentia-wheel__track .affluentia-spend-card.is-pressed {
	filter: brightness(1.04);
	z-index: 8 !important;
}

.affluentia-home__track--static .affluentia-home-card:hover,
.affluentia-home__track--static .affluentia-home-card.is-pressed {
	transform: scale(1.06);
	box-shadow:
		0 14px 28px rgba(0, 0, 0, 0.32),
		0 0 0 2px var(--accent) !important,
		0 0 18px color-mix(in srgb, var(--accent) 35%, transparent) !important;
	z-index: 5;
}

.affluentia-home-card__link,
.affluentia-spend-card__link {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	min-height: inherit;
	text-decoration: none;
	color: inherit;
	overflow: hidden;
	transform-origin: center center;
	transition: transform 180ms ease, box-shadow 180ms ease;
}

.affluentia-home-card__image,
.affluentia-home-card__placeholder,
.affluentia-spend-card__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.affluentia-home-card__placeholder {
	background: linear-gradient(160deg, var(--border) 0%, var(--card-bg) 55%, var(--bg) 100%);
}

.affluentia-home-card__pill {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	z-index: 2;
	max-width: calc(100% - 0.4rem);
	padding: 0.3rem 0.5rem;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.72);
	color: #ffffff;
	font-family: var(--font-sans);
	font-size: clamp(0.52rem, 1.55vw, 0.78rem);
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	line-height: 1.15;
	text-align: center;
	white-space: normal;
	overflow: hidden;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	pointer-events: none;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

html.affluentia-theme-light .affluentia-home-card__pill {
	background: rgba(255, 255, 255, 0.9);
	color: #111111;
}

/* Card shapes (track + search strip) */
.affluentia-home__grid--shape-rectangle .affluentia-home-card,
.affluentia-home__grid--shape-rectangle .affluentia-home-card__link,
.affluentia-home__grid--shape-rectangle .affluentia-spend-card,
.affluentia-home__grid--shape-rectangle .affluentia-spend-card__link,
.affluentia-home-search.affluentia-home__grid--shape-rectangle {
	border-radius: 0;
}

.affluentia-home__grid--shape-rounded .affluentia-home-card,
.affluentia-home__grid--shape-rounded .affluentia-home-card__link,
.affluentia-home__grid--shape-rounded .affluentia-spend-card,
.affluentia-home__grid--shape-rounded .affluentia-spend-card__link,
.affluentia-home-search.affluentia-home__grid--shape-rounded {
	border-radius: 10px;
}

.affluentia-home__grid--shape-soft .affluentia-home-card,
.affluentia-home__grid--shape-soft .affluentia-home-card__link,
.affluentia-home__grid--shape-soft .affluentia-spend-card,
.affluentia-home__grid--shape-soft .affluentia-spend-card__link,
.affluentia-home-search.affluentia-home__grid--shape-soft {
	border-radius: 18px;
}

.affluentia-home__grid--shape-pill .affluentia-home-card,
.affluentia-home__grid--shape-pill .affluentia-home-card__link,
.affluentia-home__grid--shape-pill .affluentia-spend-card,
.affluentia-home__grid--shape-pill .affluentia-spend-card__link,
.affluentia-home-search.affluentia-home__grid--shape-pill {
	border-radius: 999px;
}

.affluentia-home__grid--shape-oval .affluentia-home-card,
.affluentia-home__grid--shape-oval .affluentia-home-card__link,
.affluentia-home__grid--shape-oval .affluentia-spend-card,
.affluentia-home__grid--shape-oval .affluentia-spend-card__link,
.affluentia-home-search.affluentia-home__grid--shape-oval {
	border-radius: 50%;
}

.affluentia-home__grid--shape-circle .affluentia-home-card {
	display: flex;
	align-items: center;
	justify-content: center;
}

.affluentia-home__grid--shape-circle .affluentia-home-card__link {
	aspect-ratio: 1 / 1;
	width: auto;
	height: 100%;
	max-width: 100%;
	border-radius: 50%;
	margin: 0 auto;
}

.affluentia-home-search.affluentia-home__grid--shape-circle,
.affluentia-home-search.affluentia-home__grid--shape-oval {
	border-radius: 999px;
}

@media (max-width: 640px) and (orientation: portrait) {
	.affluentia-home {
		padding-top: 0.15rem;
		gap: 0.4rem;
		min-height: calc(100dvh - 6.5rem);
		justify-content: flex-start;
	}

	.affluentia-home__logo {
		padding: 0;
		flex: 0 0 auto;
	}

	.affluentia-home__logo-img {
		max-height: min(28dvh, 220px);
	}

	.affluentia-home__track {
		min-height: clamp(5rem, 15dvh, 8rem);
		max-height: clamp(6.25rem, 18dvh, 9rem);
	}

	.affluentia-home__track--carousel .affluentia-home-card {
		flex-basis: clamp(5rem, 28vw, 7.5rem);
	}
}

@media (orientation: landscape) and (max-height: 500px) {
	.affluentia-home__logo-img {
		max-height: min(42dvh, 280px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.affluentia-home__track--carousel .affluentia-home-card,
	.affluentia-home__track--carousel .affluentia-home-card:hover .affluentia-home-card__link,
	.affluentia-home__track--carousel .affluentia-home-card.is-pressed .affluentia-home-card__link,
	.affluentia-home__track--static .affluentia-home-card:hover,
	.affluentia-home__track--static .affluentia-home-card.is-pressed {
		transform: none !important;
		transition: none !important;
		opacity: 1;
		filter: none;
	}
}

/* Logo + splash animations */
[data-affluentia-logo-anim="fade"] .affluentia-home__logo-img,
[data-affluentia-logo-anim="fade"] .affluentia-home__wordmark {
	animation: affluentia-anim-fade 0.7s ease-out both;
}

[data-affluentia-logo-anim="scale"] .affluentia-home__logo-img,
[data-affluentia-logo-anim="scale"] .affluentia-home__wordmark {
	animation: affluentia-anim-scale 0.7s ease-out both;
}

[data-affluentia-logo-anim="slide-up"] .affluentia-home__logo-img,
[data-affluentia-logo-anim="slide-up"] .affluentia-home__wordmark {
	animation: affluentia-anim-slide-up 0.7s ease-out both;
}

[data-affluentia-logo-anim="pulse"] .affluentia-home__logo-img,
[data-affluentia-logo-anim="pulse"] .affluentia-home__wordmark {
	animation: affluentia-anim-pulse 1.4s ease-in-out 1 both;
}

.affluentia-splash[data-affluentia-splash-anim="fade"] .affluentia-splash__logo {
	animation: affluentia-anim-fade 0.55s ease-out both;
}

.affluentia-splash[data-affluentia-splash-anim="scale"] .affluentia-splash__logo {
	animation: affluentia-anim-scale 0.55s ease-out both;
}

.affluentia-splash[data-affluentia-splash-anim="slide-up"] .affluentia-splash__logo {
	animation: affluentia-anim-slide-up 0.55s ease-out both;
}

.affluentia-splash[data-affluentia-splash-anim="pulse"] .affluentia-splash__logo {
	animation: affluentia-anim-pulse 1.1s ease-in-out 1 both;
}

@keyframes affluentia-anim-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes affluentia-anim-scale {
	from { opacity: 0; transform: scale(0.88); }
	to { opacity: 1; transform: scale(1); }
}

@keyframes affluentia-anim-slide-up {
	from { opacity: 0; transform: translateY(18px); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes affluentia-anim-pulse {
	0% { transform: scale(1); opacity: 0.85; }
	50% { transform: scale(1.04); opacity: 1; }
	100% { transform: scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	[data-affluentia-logo-anim] .affluentia-home__logo-img,
	[data-affluentia-logo-anim] .affluentia-home__wordmark,
	.affluentia-splash[data-affluentia-splash-anim] .affluentia-splash__logo {
		animation: none !important;
	}
}

.affluentia-pillar__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

.affluentia-pillar-card__blurb {
	margin: 0;
	font-size: 0.85rem;
	line-height: 1.4;
	color: var(--subheadline);
}

.affluentia-pillar-card__placeholder {
	position: absolute;
	inset: 0;
	background: linear-gradient(160deg, var(--border) 0%, var(--card-bg) 55%, var(--bg) 100%);
}

.affluentia-pillar__header {
	margin-bottom: 1.75rem;
	text-align: center;
}

.affluentia-pillar__hero {
	margin: 0 auto 1.25rem;
	max-width: 720px;
	border-radius: var(--radius-md);
	overflow: hidden;
	border: 1px solid var(--border);
}

.affluentia-pillar__hero img {
	display: block;
	width: 100%;
	height: auto;
}

.affluentia-pillar__title {
	margin: 0 0 0.4rem;
	font-size: 1.35rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.affluentia-pillar__blurb {
	margin: 0 auto;
	max-width: 36rem;
}

.affluentia-partner-cta {
	margin-top: 1.75rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--border);
}

.affluentia-partner-cta__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0.65rem 1.25rem;
	border-radius: 999px;
	background: var(--accent) !important;
	color: #000 !important;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none !important;
}

.affluentia-partner-cta__note {
	margin: 0.75rem 0 0;
	font-size: 0.75rem;
	color: var(--text-faint);
}

@media (min-width: 640px) {
	.affluentia-pillar__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 960px) {
	.affluentia-pillar__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* ---- Spend / Savvii's Picks ---- */
.affluentia-spend {
	max-width: min(1100px, 100%);
	margin: 0 auto;
	padding: 1.25rem 1rem 3rem;
	background: transparent;
	color: var(--text);
	overflow: visible;
	isolation: isolate;
	z-index: 0;
}

.affluentia-spend__header {
	text-align: center;
	margin-bottom: 1rem;
}

.affluentia-spend__title {
	margin: 0;
	font-size: clamp(1.35rem, 4vw, 1.85rem);
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.affluentia-spend__banner {
	display: flex;
	justify-content: center;
	margin: 0 auto 1rem;
	max-width: 720px;
}

.affluentia-spend__banner-img {
	display: none;
	width: 100%;
	height: auto;
	object-fit: contain;
}

html.affluentia-theme-dark .affluentia-spend__banner-img--dark,
html:not(.affluentia-theme-light) .affluentia-spend__banner-img--dark {
	display: block;
}

html.affluentia-theme-light .affluentia-spend__banner-img--light {
	display: block;
}

html.affluentia-theme-light .affluentia-spend__banner-img--dark {
	display: none;
}

html.affluentia-theme-light .affluentia-spend__banner-img--only,
html.affluentia-theme-dark .affluentia-spend__banner-img--only {
	display: block;
}

.affluentia-spend__intro {
	margin: 0 auto 1.75rem;
	max-width: 40rem;
	text-align: center;
	line-height: 1.55;
}

.affluentia-spend__admin-note {
	margin: 0 auto 1.25rem;
	max-width: 36rem;
	padding: 0.65rem 0.85rem;
	border: 1px solid var(--border);
	border-radius: 8px;
	font-size: 0.85rem;
	color: var(--muted);
	text-align: center;
}

.affluentia-spend__category {
	margin-bottom: 1.75rem;
}

.affluentia-spend__category-title {
	margin: 0 0 0.35rem;
	font-family: var(--font-sans);
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--headline);
	text-align: center;
}

.affluentia-spend .affluentia-wheel {
	margin-top: 0.25rem;
}

.affluentia-wheel__track .affluentia-spend-card {
	flex: 0 0 clamp(5.25rem, 20vw, 8.5rem);
	height: clamp(5.25rem, 20vw, 8.5rem);
	background: var(--card-bg);
}

.affluentia-spend-card__image {
	background: #fff;
	object-fit: contain;
	padding: 0.35rem;
	box-sizing: border-box;
}
