/* ==========================================================================
   CoreLix theme — base, header, drawers, footer, pages.
   Colours come from Appearance → Customize → CoreLix → Brand colours
   (printed as CSS variables in the page head).
   ========================================================================== */

:root {
	--cx-primary: #4E2FE0;
	--cx-primary-dark: #4027b8;
	--cx-primary-soft: #edeafc;
	--cx-accent: #FFB21E;
	--cx-accent-soft: #fff0d0;
	--cx-ink: #15132B;
	--cx-ink-2: #5f5d71;
	--cx-bg: #F4F5F9;
	--cx-success: #0B7D56;
	--cx-success-soft: #e3f5ee;
	--cx-danger: #C4333A;
	--cx-danger-soft: #fdeceb;
	--cx-surface: #ffffff;
	--cx-line: #e2e3eb;
	--cx-line-soft: #eceef4;
	--cx-muted: #5c5b70;

	--cx-font: 'Onest', 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--cx-font-display: 'Bricolage Grotesque', 'IBM Plex Sans Arabic', 'Onest', system-ui, sans-serif;

	--cx-fs-xs: 0.75rem;
	--cx-fs-sm: 0.875rem;
	--cx-fs-md: 1rem;
	--cx-fs-lg: 1.25rem;
	--cx-fs-xl: 1.5625rem;
	--cx-fs-2xl: 1.953rem;
	--cx-fs-3xl: 2.441rem;
	--cx-fs-4xl: 3.052rem;

	--cx-r-xs: 6px;
	--cx-r-sm: 10px;
	--cx-r: 14px;
	--cx-r-lg: 20px;
	--cx-r-pill: 999px;

	--cx-shadow-sm: 0 1px 2px rgba(21, 19, 43, .06);
	--cx-shadow: 0 10px 30px -14px rgba(21, 19, 43, .28);
	--cx-shadow-lg: 0 28px 70px -24px rgba(21, 19, 43, .42);

	--cx-container: 1320px;
	--cx-gutter: 16px;
	--cx-header-offset: 0px;
	--cx-bottomnav-h: 0px;
	--cx-ease: cubic-bezier(.2, .8, .2, 1);
}

@media (min-width: 768px) {
	:root { --cx-gutter: 24px; }
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 140px; }
body {
	margin: 0;
	font-family: var(--cx-font);
	font-size: var(--cx-fs-md);
	line-height: 1.55;
	color: var(--cx-ink);
	background: var(--cx-bg);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
.cx-icon { display: inline-block; flex: none; vertical-align: middle; }
a { color: var(--cx-primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--cx-primary-dark); }
h1, h2, h3, h4, h5, h6 {
	font-family: var(--cx-font-display);
	font-weight: 700;
	line-height: 1.12;
	letter-spacing: -0.015em;
	margin: 0 0 .5em;
	color: var(--cx-ink);
	font-variation-settings: "wdth" 100;
}
h1 { font-size: clamp(1.75rem, 1.3rem + 2vw, var(--cx-fs-3xl)); }
h2 { font-size: clamp(1.4rem, 1.15rem + 1.2vw, var(--cx-fs-2xl)); }
h3 { font-size: var(--cx-fs-lg); }
p { margin: 0 0 1em; }
ul, ol { padding-inline-start: 1.25em; }
hr { border: 0; border-top: 1px solid var(--cx-line); margin: 2rem 0; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--cx-primary); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--cx-primary); color: #fff; }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important;
	width: 1px; word-wrap: normal !important;
}
.skip-link:focus {
	clip: auto; clip-path: none; height: auto; width: auto; margin: 0;
	inset-inline-start: 12px; top: 12px; z-index: 1000;
	background: var(--cx-ink); color: #fff; padding: 10px 16px; border-radius: var(--cx-r-sm);
}

.cx-container {
	width: 100%;
	max-width: var(--cx-container);
	margin-inline: auto;
	padding-inline: var(--cx-gutter);
}

/* ---------- Buttons & form controls ---------- */
.cx-btn,
.button,
button.button,
input[type="submit"],
.wp-element-button,
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 46px;
	padding: 10px 22px;
	border: 2px solid var(--cx-primary);
	border-radius: var(--cx-r-pill);
	background: var(--cx-primary);
	color: #fff;
	font-family: var(--cx-font);
	font-size: var(--cx-fs-md);
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .18s var(--cx-ease), border-color .18s var(--cx-ease), color .18s var(--cx-ease), transform .1s;
}
.cx-btn:hover,
.button:hover,
input[type="submit"]:hover,
.wp-element-button:hover {
	background: var(--cx-primary-dark);
	border-color: var(--cx-primary-dark);
	color: #fff;
}
.cx-btn:active, .button:active { transform: translateY(1px); }
.cx-btn--outline { background: transparent; color: var(--cx-ink); border-color: var(--cx-line); }
.cx-btn--outline:hover { background: var(--cx-surface); color: var(--cx-ink); border-color: var(--cx-ink); }
.cx-btn--accent { background: var(--cx-accent); border-color: var(--cx-accent); color: var(--cx-ink); }
.cx-btn--accent:hover { background: var(--cx-ink); border-color: var(--cx-ink); color: #fff; }
.cx-btn--light { background: #fff; border-color: #fff; color: var(--cx-ink); }
.cx-btn--light:hover { background: var(--cx-accent); border-color: var(--cx-accent); color: var(--cx-ink); }
.cx-btn--ghost-light { background: transparent; border-color: rgba(255, 255, 255, .35); color: #fff; }
.cx-btn--ghost-light:hover { background: rgba(255, 255, 255, .1); border-color: #fff; color: #fff; }
.cx-btn--whatsapp { background: #1DAA61; border-color: #1DAA61; color: #fff; }
.cx-btn--whatsapp:hover { background: #158a4e; border-color: #158a4e; }
.cx-btn--block { width: 100%; }
.cx-btn[disabled], .button.disabled, .button:disabled { opacity: .55; cursor: not-allowed; }

.cx-iconbtn {
	display: inline-grid;
	place-items: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	border-radius: var(--cx-r-pill);
	background: transparent;
	color: var(--cx-ink);
	cursor: pointer;
}
.cx-iconbtn:hover { background: var(--cx-line-soft); }

input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
input[type="search"], input[type="number"], input[type="url"], input[type="date"],
select, textarea {
	width: 100%;
	min-height: 46px;
	padding: 10px 14px;
	border: 1.5px solid var(--cx-line);
	border-radius: var(--cx-r-sm);
	background: var(--cx-surface);
	color: var(--cx-ink);
	font: inherit;
	font-size: 16px; /* stops iOS zooming into fields */
	transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 120px; }
input:focus, select:focus, textarea:focus {
	outline: none;
	border-color: var(--cx-primary);
	box-shadow: 0 0 0 4px var(--cx-primary-soft);
}
label { font-weight: 500; }

.cx-badge {
	display: inline-grid;
	place-items: center;
	min-width: 19px;
	height: 19px;
	padding: 0 5px;
	border-radius: var(--cx-r-pill);
	background: var(--cx-accent);
	color: var(--cx-ink);
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
}
.cx-badge[data-empty], .cx-badge[hidden] { display: none; }

/* ---------- Top bar ---------- */
.cx-topbar { background: var(--cx-ink); color: rgba(255, 255, 255, .82); font-size: var(--cx-fs-sm); }
.cx-topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 38px; }
.cx-topbar__msg { display: flex; align-items: center; gap: 8px; margin: 0; }
.cx-topbar__msg .cx-icon { color: var(--cx-accent); }
.cx-topbar__links { display: flex; align-items: center; gap: 18px; }
.cx-topbar__links a { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
.cx-topbar__links a:hover { color: #fff; }
.cx-topbar__menu { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; }
@media (max-width: 767px) {
	.cx-topbar__links { display: none; }
	.cx-topbar__inner { justify-content: center; min-height: 34px; font-size: var(--cx-fs-xs); }
}

/* ---------- Header ---------- */
.cx-header {
	position: relative;
	z-index: 60;
	background: var(--cx-surface);
	border-bottom: 1px solid var(--cx-line);
}
.cx-sticky-header .cx-header { position: sticky; top: 0; }
.admin-bar.cx-sticky-header .cx-header { top: 32px; }
@media (max-width: 782px) { .admin-bar.cx-sticky-header .cx-header { top: 0; } }
.cx-header.is-scrolled { box-shadow: var(--cx-shadow); }

.cx-header__main {
	display: grid;
	grid-template-columns: auto auto 1fr auto;
	grid-template-areas: "menu brand search actions";
	align-items: center;
	gap: 12px 20px;
	padding-block: 14px;
}
.cx-header__menu { grid-area: menu; }
.cx-header__brand { grid-area: brand; display: flex; align-items: center; }
.cx-header .cx-search { grid-area: search; }
.cx-header__actions { grid-area: actions; display: flex; align-items: center; gap: 6px; }

.custom-logo-link img { max-height: 44px; width: auto; }
.cx-wordmark {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: var(--cx-ink);
}
.cx-wordmark__mark { display: block; flex: none; width: 38px; height: 38px; }
.cx-mark-bg { fill: var(--cx-primary); }
.cx-mark-core { fill: var(--cx-accent); }
.cx-wordmark__text {
	font-family: var(--cx-font-display);
	font-size: 26px;
	font-weight: 800;
	letter-spacing: -0.03em;
}
.cx-wordmark:hover { color: var(--cx-ink); }

.cx-action {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 10px;
	border-radius: var(--cx-r-sm);
	color: var(--cx-ink);
	text-decoration: none;
}
.cx-action:hover { background: var(--cx-line-soft); color: var(--cx-ink); }
.cx-action__label { display: flex; flex-direction: column; line-height: 1.15; }
.cx-action__label small { color: var(--cx-muted); font-size: var(--cx-fs-xs); }
.cx-action__label strong { font-size: var(--cx-fs-sm); font-weight: 600; }
.cx-action__label .amount { font-weight: 700; }
.cx-action > .cx-badge { position: absolute; top: 0; inset-inline-start: 26px; }
.cx-action--cart { background: var(--cx-primary-soft); }
.cx-action--cart:hover { background: var(--cx-primary); color: #fff; }
.cx-action--cart:hover .cx-action__label small { color: rgba(255, 255, 255, .8); }

/* Search */
.cx-search {
	position: relative;
	display: flex;
	align-items: stretch;
	width: 100%;
	max-width: 720px;
	min-height: 48px;
	border: 2px solid var(--cx-ink);
	border-radius: var(--cx-r);
	background: var(--cx-surface);
}
.cx-search:focus-within { border-color: var(--cx-primary); box-shadow: 0 0 0 4px var(--cx-primary-soft); }
.cx-search__cat {
	width: auto;
	max-width: 150px;
	min-height: 0;
	border: 0;
	border-inline-end: 1px solid var(--cx-line);
	border-radius: 0;
	border-start-start-radius: 12px;
	border-end-start-radius: 12px;
	background: var(--cx-line-soft);
	padding-inline: 12px 8px;
	font-size: var(--cx-fs-sm);
	font-weight: 500;
	cursor: pointer;
}
.cx-search__cat:focus { box-shadow: none; }
.cx-search__input {
	flex: 1;
	min-width: 0;
	min-height: 0;
	border: 0;
	background: transparent;
	padding-inline: 14px;
}
.cx-search__input:focus { box-shadow: none; }
.cx-search__btn {
	display: grid;
	place-items: center;
	width: 52px;
	margin: 4px;
	border: 0;
	border-radius: 10px;
	background: var(--cx-primary);
	color: #fff;
	cursor: pointer;
}
.cx-search__btn:hover { background: var(--cx-primary-dark); }
.cx-search__results {
	position: absolute;
	top: calc(100% + 8px);
	inset-inline: -2px;
	z-index: 80;
	max-height: min(70vh, 520px);
	overflow: auto;
	padding: 8px;
	border: 1px solid var(--cx-line);
	border-radius: var(--cx-r);
	background: var(--cx-surface);
	box-shadow: var(--cx-shadow-lg);
}
.cx-sr__group { margin: 6px 8px 4px; color: var(--cx-muted); font-size: var(--cx-fs-xs); font-weight: 600; }
.cx-sr__item {
	display: grid;
	grid-template-columns: 48px 1fr auto;
	align-items: center;
	gap: 12px;
	padding: 8px;
	border-radius: var(--cx-r-sm);
	color: var(--cx-ink);
	text-decoration: none;
}
.cx-sr__item:hover, .cx-sr__item.is-active { background: var(--cx-line-soft); color: var(--cx-ink); }
.cx-sr__item img { width: 48px; height: 48px; object-fit: contain; border-radius: 8px; background: var(--cx-bg); }
.cx-sr__name { font-size: var(--cx-fs-sm); font-weight: 500; line-height: 1.3; }
.cx-sr__meta { display: block; color: var(--cx-muted); font-size: var(--cx-fs-xs); }
.cx-sr__price { font-weight: 700; font-size: var(--cx-fs-sm); white-space: nowrap; }
.cx-sr__price del { display: block; color: var(--cx-muted); font-weight: 400; font-size: var(--cx-fs-xs); }
.cx-sr__price ins { text-decoration: none; }
.cx-sr__cat { display: inline-flex; margin: 2px 4px; padding: 6px 12px; border-radius: var(--cx-r-pill); background: var(--cx-primary-soft); color: var(--cx-primary-dark); font-size: var(--cx-fs-sm); text-decoration: none; }
.cx-sr__all { display: block; margin-top: 6px; padding: 10px; border-top: 1px solid var(--cx-line); text-align: center; font-weight: 600; text-decoration: none; }
.cx-sr__empty { margin: 0; padding: 14px; color: var(--cx-muted); font-size: var(--cx-fs-sm); }

/* Nav row */
.cx-nav { border-top: 1px solid var(--cx-line-soft); }
.cx-nav__inner { display: flex; align-items: center; gap: 8px; min-height: 52px; }
.cx-allcats { position: relative; }
.cx-allcats__btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 40px;
	padding: 8px 14px;
	border: 0;
	border-radius: var(--cx-r-sm);
	background: var(--cx-ink);
	color: #fff;
	font-weight: 600;
	cursor: pointer;
}
.cx-allcats__btn[aria-expanded="true"] { background: var(--cx-primary); }
.cx-allcats__btn[aria-expanded="true"] .cx-icon:last-child { transform: rotate(180deg); }
.cx-allcats__panel {
	position: absolute;
	top: calc(100% + 8px);
	inset-inline-start: 0;
	z-index: 70;
	width: 300px;
	padding: 8px;
	border: 1px solid var(--cx-line);
	border-radius: var(--cx-r);
	background: var(--cx-surface);
	box-shadow: var(--cx-shadow-lg);
}
.cx-menu { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.cx-menu > li { position: relative; }
.cx-menu > li > a {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 8px 12px;
	border-radius: var(--cx-r-sm);
	color: var(--cx-ink);
	font-weight: 500;
	font-size: 15px;
	text-decoration: none;
}
.cx-menu > li > a:hover,
.cx-menu > li.current-menu-item > a,
.cx-menu > li.current-menu-parent > a { background: var(--cx-line-soft); color: var(--cx-primary); }
.cx-menu .menu-item--deal > a, .cx-menu .cx-deal > a { color: var(--cx-danger); }
.cx-menu .sub-menu {
	position: absolute;
	top: 100%;
	inset-inline-start: 0;
	z-index: 70;
	min-width: 220px;
	margin: 0;
	padding: 8px;
	list-style: none;
	border: 1px solid var(--cx-line);
	border-radius: var(--cx-r);
	background: var(--cx-surface);
	box-shadow: var(--cx-shadow-lg);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .15s, transform .15s, visibility .15s;
}
.cx-menu li:hover > .sub-menu, .cx-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.cx-menu .sub-menu a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--cx-ink); text-decoration: none; font-size: var(--cx-fs-sm); }
.cx-menu .sub-menu a:hover { background: var(--cx-line-soft); color: var(--cx-primary); }

/* Category list (dropdown + drawer) */
.cx-catlist { margin: 0; padding: 0; list-style: none; }
.cx-catlist__item { position: relative; }
.cx-catlist__link {
	display: grid;
	grid-template-columns: 36px 1fr auto;
	align-items: center;
	gap: 12px;
	padding: 8px;
	border-radius: var(--cx-r-sm);
	color: var(--cx-ink);
	text-decoration: none;
	font-weight: 500;
}
.cx-catlist__link:hover { background: var(--cx-line-soft); color: var(--cx-primary); }
.cx-catlist__icon {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: var(--cx-primary-soft);
	color: var(--cx-primary);
}
.cx-catlist__count { color: var(--cx-muted); font-size: var(--cx-fs-xs); }
.cx-catlist__sub { margin: 0 0 6px; padding: 0 0 0 56px; list-style: none; }
.cx-catlist__sub a { display: block; padding: 5px 0; color: var(--cx-ink-2); font-size: var(--cx-fs-sm); text-decoration: none; }
.cx-catlist__sub a:hover { color: var(--cx-primary); }
.cx-allcats__panel .cx-catlist__sub { display: none; }
.cx-catlist__item--all .cx-catlist__icon { background: var(--cx-ink); color: #fff; }

/* Header: tablet & phone */
@media (min-width: 1024px) {
	.cx-header__menu { display: none; }
	.cx-header__main { grid-template-columns: auto 1fr auto; grid-template-areas: "brand search actions"; gap: 28px; }
}
@media (max-width: 1023px) {
	.cx-nav { display: none; }
	.cx-header__main {
		grid-template-columns: auto 1fr auto;
		grid-template-areas: "menu brand actions" "search search search";
		gap: 10px 8px;
		padding-block: 10px 12px;
	}
	.cx-header__brand { justify-content: flex-start; }
	.cx-action--account { display: none; }
	/* Hidden on screen but still read out, so the cart link keeps its name. */
	.cx-action__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
	.cx-search { max-width: none; min-height: 46px; }
	.cx-search__cat { display: none; }
	.cx-wordmark__mark { width: 32px; height: 32px; }
	.cx-wordmark__text { font-size: 22px; }
	.custom-logo-link img { max-height: 36px; }
	.cx-has-bottom-nav .cx-action--wish { display: none; }
}

/* ---------- Drawers ---------- */
.cx-overlay {
	position: fixed;
	inset: 0;
	z-index: 90;
	background: rgba(21, 19, 43, .5);
	opacity: 0;
	transition: opacity .25s var(--cx-ease);
}
.cx-overlay.is-open { opacity: 1; }
.cx-drawer {
	position: fixed;
	top: 0;
	bottom: 0;
	z-index: 100;
	display: flex;
	flex-direction: column;
	width: min(90vw, 400px);
	background: var(--cx-surface);
	box-shadow: var(--cx-shadow-lg);
	transition: transform .3s var(--cx-ease);
}
.cx-drawer--start { inset-inline-start: 0; transform: translateX(-100%); }
.cx-drawer--end { inset-inline-end: 0; transform: translateX(100%); }
[dir="rtl"] .cx-drawer--start { transform: translateX(100%); }
[dir="rtl"] .cx-drawer--end { transform: translateX(-100%); }
.cx-drawer.is-open { transform: none; }
.cx-drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	border-bottom: 1px solid var(--cx-line);
}
.cx-drawer__title { display: flex; align-items: center; gap: 8px; margin: 0; font-family: var(--cx-font-display); font-size: var(--cx-fs-lg); font-weight: 700; }
.cx-drawer__count { position: static; }
.cx-drawer__body { flex: 1; overflow-y: auto; padding: 12px 16px 24px; overscroll-behavior: contain; }
.cx-drawer__heading { margin: 14px 8px 6px; color: var(--cx-muted); font-size: var(--cx-fs-sm); font-weight: 600; }
.cx-drawer__menu { margin: 0; padding: 0; list-style: none; }
.cx-drawer__menu a { display: block; padding: 11px 8px; border-radius: var(--cx-r-sm); color: var(--cx-ink); text-decoration: none; font-weight: 500; }
.cx-drawer__menu a:hover { background: var(--cx-line-soft); }
.cx-drawer__menu .sub-menu { margin: 0; padding-inline-start: 16px; list-style: none; }
.cx-drawer__contact { display: grid; gap: 4px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--cx-line); }
.cx-drawer__contact a { display: flex; align-items: center; gap: 10px; padding: 10px 8px; color: var(--cx-ink); text-decoration: none; font-weight: 500; }
body.cx-locked { overflow: hidden; }

/* ---------- Bottom nav (phones) ---------- */
.cx-bottomnav { display: none; }
@media (max-width: 1023px) {
	.cx-has-bottom-nav { --cx-bottomnav-h: calc(64px + env(safe-area-inset-bottom)); padding-bottom: var(--cx-bottomnav-h); }
	.cx-bottomnav {
		position: fixed;
		inset-inline: 0;
		bottom: 0;
		z-index: 80;
		display: grid;
		grid-auto-flow: column;
		grid-auto-columns: 1fr;
		height: var(--cx-bottomnav-h);
		padding-bottom: env(safe-area-inset-bottom);
		border-top: 1px solid var(--cx-line);
		background: rgba(255, 255, 255, .96);
		backdrop-filter: saturate(1.6) blur(12px);
		-webkit-backdrop-filter: saturate(1.6) blur(12px);
	}
	.cx-bottomnav__item {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 3px;
		color: var(--cx-muted);
		font-size: 11px;
		font-weight: 600;
		text-decoration: none;
		-webkit-tap-highlight-color: transparent;
	}
	.cx-bottomnav__icon { position: relative; display: grid; place-items: center; width: 48px; height: 30px; border-radius: var(--cx-r-pill); }
	.cx-bottomnav__icon .cx-badge { position: absolute; top: -4px; inset-inline-end: 4px; }
	.cx-bottomnav__item.is-active { color: var(--cx-primary); }
	.cx-bottomnav__item.is-active .cx-bottomnav__icon { background: var(--cx-primary-soft); }
}

/* ---------- Main content & pages ---------- */
.cx-main { display: block; min-height: 50vh; }
.cx-page { padding-block: 28px 56px; }
.cx-page__header { margin-bottom: 24px; }
.cx-page__title { margin-bottom: .25em; }
.cx-page__intro { color: var(--cx-ink-2); max-width: 70ch; }
.cx-prose { max-width: 78ch; font-size: 1.0625rem; line-height: 1.7; }
.cx-prose > * + h2, .cx-prose > * + h3 { margin-top: 1.6em; }
.cx-prose img { border-radius: var(--cx-r); }
.cx-prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-inline-start: 4px solid var(--cx-primary); color: var(--cx-ink-2); }
.cx-prose table { width: 100%; border-collapse: collapse; }
.cx-prose th, .cx-prose td { padding: 10px; border-bottom: 1px solid var(--cx-line); text-align: start; }
.cx-page--store .cx-store-content { max-width: none; }
.cx-fullwidth > .wp-block-group, .cx-fullwidth > p { padding-inline: var(--cx-gutter); }

.cx-layout { display: grid; gap: 32px; }
@media (min-width: 1024px) { .cx-layout--sidebar { grid-template-columns: 1fr 300px; } }
.cx-postgrid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.cx-postcard { overflow: hidden; border: 1px solid var(--cx-line); border-radius: var(--cx-r); background: var(--cx-surface); }
.cx-postcard__media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.cx-postcard__body { padding: 18px; }
.cx-postcard__meta { margin: 0 0 6px; color: var(--cx-muted); font-size: var(--cx-fs-sm); }
.cx-postcard__title { font-size: var(--cx-fs-lg); margin-bottom: 8px; }
.cx-postcard__title a { color: var(--cx-ink); text-decoration: none; }
.cx-postcard__excerpt { color: var(--cx-ink-2); font-size: var(--cx-fs-sm); }
.cx-single__media img { border-radius: var(--cx-r-lg); margin-bottom: 24px; }
.post-navigation .nav-links { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; margin-top: 40px; }
.post-navigation a { display: block; padding: 16px; border: 1px solid var(--cx-line); border-radius: var(--cx-r); background: var(--cx-surface); color: var(--cx-ink); text-decoration: none; }
.post-navigation small { display: block; color: var(--cx-muted); }
.navigation.pagination { margin-top: 32px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.page-numbers { display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 10px; border: 1px solid var(--cx-line); border-radius: var(--cx-r-sm); background: var(--cx-surface); color: var(--cx-ink); text-decoration: none; font-weight: 600; }
.page-numbers.current { background: var(--cx-ink); border-color: var(--cx-ink); color: #fff; }
.cx-empty { display: grid; justify-items: center; gap: 12px; padding: 48px 16px; text-align: center; color: var(--cx-ink-2); }
.cx-empty .cx-icon { color: var(--cx-primary); }
.cx-widget { margin-bottom: 28px; }
.cx-widget__title { font-size: var(--cx-fs-md); margin-bottom: 12px; }
.cx-comments { margin-top: 48px; }

.cx-404 { text-align: center; display: grid; justify-items: center; gap: 8px; padding-block: 64px 96px; }
.cx-404__code { margin: 0; font-family: var(--cx-font-display); font-size: clamp(5rem, 3rem + 10vw, 9rem); font-weight: 800; line-height: 1; color: var(--cx-primary); letter-spacing: -0.05em; }
.cx-404__search { width: min(100%, 560px); margin: 12px 0 8px; }

/* Elementor pages: the builder owns the spacing. */
.cx-elementor-page .cx-main { min-height: 0; }
.elementor-page .elementor-widget-container > .woocommerce { margin: 0; }

/* ---------- Footer ---------- */
.cx-footer { margin-top: 48px; background: var(--cx-ink); color: rgba(255, 255, 255, .78); font-size: var(--cx-fs-sm); }
.cx-footer a { color: rgba(255, 255, 255, .88); text-decoration: none; }
.cx-footer a:hover { color: var(--cx-accent); }
.cx-footer__grid { display: grid; gap: 36px; padding-block: 56px 40px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .cx-footer__grid { grid-template-columns: repeat(2, 1fr); } .cx-footer__col--brand { grid-column: 1 / -1; } }
@media (min-width: 1024px) { .cx-footer__grid { grid-template-columns: 1.5fr repeat(4, 1fr); gap: 40px; } }
.cx-footer__brand { margin-bottom: 14px; }
.cx-footer .cx-wordmark, .cx-footer .cx-wordmark:hover { color: #fff; }
.cx-footer__about { max-width: 42ch; line-height: 1.65; }
.cx-footer__title { margin-bottom: 14px; color: #fff; font-size: var(--cx-fs-md); font-family: var(--cx-font-display); }
.cx-footer__links { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.cx-footer__contact { display: grid; gap: 10px; margin: 0 0 18px; padding: 0; list-style: none; }
.cx-footer__contact li { display: flex; align-items: center; gap: 10px; }
.cx-footer__contact .cx-icon { color: var(--cx-accent); }
.cx-footer__col--app p { margin-bottom: 16px; }
.cx-footer__col--app .cx-btn { margin: 0 8px 10px 0; min-height: 42px; font-size: var(--cx-fs-sm); }
.cx-social { display: flex; gap: 8px; }
.cx-social a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: var(--cx-r-pill); background: rgba(255, 255, 255, .08); }
.cx-social a:hover { background: var(--cx-accent); color: var(--cx-ink); }
.cx-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .1); }
.cx-footer__bottom-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-block: 18px; }
.cx-footer__copy { margin: 0; }
.cx-paychips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.cx-paychips li { padding: 4px 10px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 6px; font-size: var(--cx-fs-xs); font-weight: 600; color: #fff; }
.cx-builder-footer { margin-top: 48px; }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}


/* ==========================================================================
   1.1 additions: footer columns, top bar, store notices, fallback home,
   empty states and polish. Keeps the CoreLix purple/navy look.
   ========================================================================== */

/* Footer */
.cx-footer__grid { gap: 28px; }
@media (max-width: 767px) { .cx-footer__grid { gap: 0; padding-block: 40px 24px; } .cx-footer__col--brand { padding-bottom: 20px; } }
.cx-footer__group { border-bottom: 1px solid rgba(255, 255, 255, .1); }
.cx-footer__group > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; margin: 0; padding: 14px 0; cursor: pointer; }
.cx-footer__group > summary::-webkit-details-marker { display: none; }
.cx-footer__group .cx-footer__links { padding-bottom: 16px; }
.cx-footer__chev { transition: transform .2s var(--cx-ease); opacity: .7; }
.cx-footer__group[open] .cx-footer__chev { transform: rotate(180deg); }
@media (min-width: 768px) {
	.cx-footer__group { border: 0; }
	.cx-footer__group > summary { padding: 0; margin-bottom: 14px; cursor: default; pointer-events: none; }
	.cx-footer .cx-footer__chev { display: none; }
	.cx-footer__group .cx-footer__links { padding-bottom: 0; }
}
@media (min-width: 1024px) { .cx-footer__col--brand { grid-column: auto; } }
.cx-footer__links a { display: inline-block; padding: 2px 0; transition: color .15s, transform .15s var(--cx-ease); }
.cx-footer__links a:hover { transform: translateX(2px); }
.cx-footer__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.cx-footer__more { font-weight: 600; text-decoration: underline !important; }
.cx-btn--sm { min-height: 40px; padding: 8px 14px; font-size: var(--cx-fs-sm); }
.cx-footer__pay { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cx-footer__pay-label { color: rgba(255, 255, 255, .6); font-size: var(--cx-fs-xs); }

/* Top bar without a message keeps its links on the end side */
.cx-topbar__msg:empty { flex: 1; }

/* Drawer quick links */
.cx-drawer__quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.cx-drawer__quick a { display: block; padding: 12px; border-radius: var(--cx-r-sm); background: var(--cx-primary-soft); color: var(--cx-primary-dark); font-weight: 700; text-align: center; text-decoration: none; }
.cx-drawer__quick a:hover { background: var(--cx-primary); color: #fff; }

/* Bottom nav cart count */
.cx-bottomnav__count { position: absolute; top: -4px; inset-inline-end: 4px; }
.cx-badge--inline { position: static; margin-inline-start: 6px; }

/* Empty states */
.cx-empty__title { margin: 0; color: var(--cx-ink); font-family: var(--cx-font-display); font-size: var(--cx-fs-lg); font-weight: 700; }
.cx-empty p { margin: 0; max-width: 52ch; }
.cx-chips--center { justify-content: center; flex-wrap: wrap; overflow: visible; }
.cx-404__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 12px; }

/* Built-in home page (front page without content) */
.cx-homefallback { padding-block: 24px 48px; }
.cx-adminhint { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 20px; padding: 12px 16px; border: 1px dashed var(--cx-primary); border-radius: var(--cx-r); background: var(--cx-primary-soft); color: var(--cx-ink); font-size: var(--cx-fs-sm); }
.cx-adminhint p { margin: 0; }
.cx-adminhint .cx-icon { color: var(--cx-primary); margin-top: 2px; }
.cx-homefallback__hero { padding: clamp(28px, 5vw, 56px); border-radius: var(--cx-r-lg); background: linear-gradient(135deg, var(--cx-ink), #2a1f7a 60%, var(--cx-primary)); color: #fff; text-align: center; }
.cx-homefallback__hero h1 { margin: 0 0 8px; color: #fff; font-size: clamp(2rem, 1.5rem + 2.5vw, 3.2rem); }
.cx-homefallback__hero p { margin: 0 auto 18px; max-width: 56ch; color: rgba(255, 255, 255, .82); }
.cx-homefallback__search { max-width: 640px; margin: 0 auto; }
.cx-homefallback__section { margin-top: 40px; }
.cx-homefallback__section h2 { margin: 0 0 16px; font-size: clamp(1.3rem, 1.1rem + .9vw, 1.85rem); }
.cx-homefallback__all { margin-top: 32px; text-align: center; }
.cx-catgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 1024px) { .cx-catgrid { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
.cx-catgrid__item { display: grid; justify-items: center; gap: 8px; color: var(--cx-ink); text-decoration: none; font-weight: 600; font-size: var(--cx-fs-sm); text-align: center; }
.cx-catgrid__media { display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: var(--cx-r); background: var(--cx-surface); border: 1px solid var(--cx-line-soft); overflow: hidden; transition: transform .2s var(--cx-ease), box-shadow .2s; }
.cx-catgrid__media img { width: 100%; height: 100%; object-fit: cover; }
.cx-catgrid__item:hover .cx-catgrid__media { transform: translateY(-3px); box-shadow: var(--cx-shadow); }

/* Focus visibility everywhere */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 3px solid color-mix(in srgb, var(--cx-primary) 55%, transparent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* A top bar with only links (no message) is hidden on phones, where links are in the menu. */
@media (max-width: 767px) { .cx-topbar--links { display: none; } }
/* Footer reaches the bottom of the screen above the app bar. */
@media (max-width: 1023px) {
	body.cx-has-bottom-nav:has(.cx-footer) { padding-bottom: 0; }
	.cx-has-bottom-nav .cx-footer__bottom { padding-bottom: var(--cx-bottomnav-h); }
}
