/* ============ Theme toggle button (both themes) ============ */
.mdz-theme-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	margin-right: 14px;
	padding: 0;
	border-radius: 50%;
	border: 1px solid rgba(216, 197, 172, 0.4);
	background: transparent;
	color: #d8c5ac;
	cursor: pointer;
	transition: border-color 0.3s, color 0.3s, transform 0.4s;
}
.mdz-theme-toggle:hover {
	border-color: #c8a96a;
	color: #c8a96a;
	transform: rotate(18deg);
}
.mdz-theme-toggle svg {
	width: 16px;
	height: 16px;
	display: block;
}
.mdz-theme-toggle .i-moon { display: none; }
html[data-theme="light"] .mdz-theme-toggle .i-sun { display: none; }
html[data-theme="light"] .mdz-theme-toggle .i-moon { display: block; }
.mdz-theme-toggle--float {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 9999;
	margin: 0;
	background: rgba(12, 10, 9, 0.7);
}

/* Smooth colour change while switching */
html.mdz-theme-anim *,
html.mdz-theme-anim *::before,
html.mdz-theme-anim *::after {
	transition: background-color 0.45s, color 0.45s, border-color 0.45s !important;
}

/* ============ LIGHT THEME: whole site ============ */

/* Flip the whole page: dark -> light, hues kept (emerald stays green, gold stays gold) */
html[data-theme="light"] {
	background: #0c0a09;
	filter: invert(1) hue-rotate(180deg) sepia(0.1);
}

/* Flip photos and media back so they keep their natural colours */
html[data-theme="light"] img,
html[data-theme="light"] picture,
html[data-theme="light"] video,
html[data-theme="light"] canvas,
html[data-theme="light"] iframe,
html[data-theme="light"] #wpadminbar {
	filter: invert(1) hue-rotate(180deg);
}

/* Restore photos that are CSS background images (hero etc.) */
html[data-theme="light"] .hero__arch-img,
html[data-theme="light"] [style*="background-image"] {
	filter: invert(1) hue-rotate(180deg);
}


/* ============ Light theme: white + gold backgrounds ============ */
/* Each layer flips itself back, so the colours below are shown exactly as written. */

/* HERO */
html[data-theme="light"] .hero__bg {
	filter: invert(1) hue-rotate(180deg);
	background:
		radial-gradient(ellipse 50% 58% at 80% 46%, rgba(200, 169, 106, 0.42) 0%, rgba(200, 169, 106, 0.14) 50%, rgba(200, 169, 106, 0) 100%),
		radial-gradient(ellipse 38% 40% at 14% 34%, rgba(200, 169, 106, 0.22) 0%, rgba(200, 169, 106, 0) 100%),
		radial-gradient(ellipse 30% 40% at 98% 92%, rgba(3, 56, 22, 0.14) 0%, rgba(3, 56, 22, 0) 100%),
		linear-gradient(180deg, #fbf8f1 0%, #f5efe4 100%) !important;
}

/* COLLECTION (homepage) */
html[data-theme="light"] .collection__bg {
	filter: invert(1) hue-rotate(180deg);
	background:
		radial-gradient(ellipse 46% 34% at 94% 30%, rgba(200, 169, 106, 0.34) 0%, rgba(200, 169, 106, 0.1) 50%, rgba(200, 169, 106, 0) 100%),
		radial-gradient(ellipse 34% 30% at 4% 80%, rgba(200, 169, 106, 0.22) 0%, rgba(200, 169, 106, 0) 100%),
		radial-gradient(ellipse 30% 28% at 96% 92%, rgba(3, 56, 22, 0.12) 0%, rgba(3, 56, 22, 0) 100%),
		linear-gradient(180deg, #f6f1e8 0%, #fbf8f1 100%) !important;
}

/* SHOP */
html[data-theme="light"] .sp-bg {
	filter: invert(1) hue-rotate(180deg);
	background:
		radial-gradient(ellipse 36% 28% at 94% 4%, rgba(200, 169, 106, 0.3) 0%, rgba(200, 169, 106, 0) 100%),
		radial-gradient(ellipse 24% 30% at 0% 52%, rgba(200, 169, 106, 0.16) 0%, rgba(200, 169, 106, 0) 100%),
		radial-gradient(ellipse 30% 26% at 100% 96%, rgba(3, 56, 22, 0.1) 0%, rgba(3, 56, 22, 0) 100%),
		linear-gradient(180deg, #fbf8f1 0%, #f4eee3 100%) !important;
}

/* PRODUCT */
html[data-theme="light"] .pd-bg {
	filter: invert(1) hue-rotate(180deg);
	background:
		radial-gradient(ellipse 36% 28% at 6% 6%, rgba(200, 169, 106, 0.3) 0%, rgba(200, 169, 106, 0) 100%),
		radial-gradient(ellipse 24% 30% at 100% 55%, rgba(200, 169, 106, 0.16) 0%, rgba(200, 169, 106, 0) 100%),
		radial-gradient(ellipse 30% 26% at 4% 96%, rgba(3, 56, 22, 0.1) 0%, rgba(3, 56, 22, 0) 100%),
		linear-gradient(180deg, #fbf8f1 0%, #f4eee3 100%) !important;
}

/* ABOUT: glow layer in gold, tiny deep-emerald accent */
html[data-theme="light"] .brand-intro::before {
	filter: invert(1) hue-rotate(180deg);
	background:
		radial-gradient(ellipse 42% 32% at 92% 66%, rgba(3, 56, 22, 0.14) 0%, rgba(3, 56, 22, 0.05) 50%, rgba(3, 56, 22, 0) 100%),
		radial-gradient(ellipse 40% 44% at 24% 42%, rgba(200, 169, 106, 0.4) 0%, rgba(200, 169, 106, 0.14) 50%, rgba(200, 169, 106, 0) 100%),
		radial-gradient(ellipse 34% 26% at 66% 38%, rgba(200, 169, 106, 0.2) 0%, rgba(200, 169, 106, 0) 100%),
		radial-gradient(ellipse 28% 20% at 98% 14%, rgba(200, 169, 106, 0.28) 0%, rgba(200, 169, 106, 0) 100%) !important;
}
html[data-theme="light"] .bi-media::before {
	filter: invert(1) hue-rotate(180deg);
	background: radial-gradient(closest-side, rgba(200, 169, 106, 0.4) 0%, rgba(200, 169, 106, 0.12) 55%, rgba(200, 169, 106, 0) 100%) !important;
}

/* ============ Light theme: About -> Collection seam ============ */

/* The Collection background fades in from the About's cream instead of starting on a hard edge */
html[data-theme="light"] .collection__bg {
	-webkit-mask-image: linear-gradient(180deg, transparent 0, rgba(0, 0, 0, 0.5) 160px, #000 380px);
	mask-image: linear-gradient(180deg, transparent 0, rgba(0, 0, 0, 0.5) 160px, #000 380px);
}

/* The Collection's top bridge: starts on the exact cream the About ends on */
html[data-theme="light"] .collection__bridge {
	filter: invert(1) hue-rotate(180deg);
	background: linear-gradient(
		180deg,
		rgb(255, 249, 242) 0,
		rgba(255, 249, 242, 0.6) 45%,
		rgba(255, 249, 242, 0) 100%
	) !important;
}

/* Less blank space under the About content (light theme only) */
html[data-theme="light"] .brand-intro {
	padding-bottom: clamp(2rem, 5vh, 4rem);
}

/* ============ Light theme: Shop by Category (white + gold) ============ */

/* The section's own dark base gets replaced by a literal light layer */
html[data-theme="light"] .categories {
	background: transparent !important;
}
html[data-theme="light"] .categories__bg {
	filter: invert(1) hue-rotate(180deg);
	background:
		radial-gradient(ellipse 40% 28% at 4% 34%, rgba(3, 56, 22, 0.14) 0%, rgba(3, 56, 22, 0.05) 50%, rgba(3, 56, 22, 0) 100%),
		radial-gradient(ellipse 42% 28% at 98% 62%, rgba(200, 169, 106, 0.34) 0%, rgba(200, 169, 106, 0.12) 50%, rgba(200, 169, 106, 0) 100%),
		radial-gradient(ellipse 36% 22% at 66% 10%, rgba(200, 169, 106, 0.22) 0%, rgba(200, 169, 106, 0) 100%),
		radial-gradient(ellipse 32% 20% at 20% 88%, rgba(200, 169, 106, 0.2) 0%, rgba(200, 169, 106, 0) 100%),
		linear-gradient(180deg, #fbf8f1 0%, #f8f3e9 50%, #f5efe3 100%) !important;
}

/* Card photo placeholder (when a category has no image): gold instead of mint */
html[data-theme="light"] .cat-card {
	background: #f1e8d6;
}
html[data-theme="light"] .cat-card__placeholder {
	filter: invert(1) hue-rotate(180deg);
	background:
		radial-gradient(60% 40% at 50% 28%, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 70%),
		linear-gradient(160deg, #f1e6cf 0%, #e7d9b8 55%, #d9c79c 100%) !important;
}

/* Text shade at the bottom of each card: soft cream with a hint of gold, no mint */
html[data-theme="light"] .cat-card__shade {
	filter: invert(1) hue-rotate(180deg);
	background:
		linear-gradient(180deg, rgba(255, 250, 242, 0) 40%, rgba(255, 250, 242, 0.9) 100%),
		linear-gradient(135deg, rgba(200, 169, 106, 0.18), rgba(200, 169, 106, 0) 55%) !important;
}

/* ============ Light theme: The Maison Experience (white + gold) ============ */
html[data-theme="light"] .experience {
	background: transparent !important;
}
html[data-theme="light"] .experience__bg {
	filter: invert(1) hue-rotate(180deg);
	background:
		radial-gradient(ellipse 46% 40% at 28% 46%, rgba(200, 169, 106, 0.36) 0%, rgba(200, 169, 106, 0.12) 50%, rgba(200, 169, 106, 0) 100%),
		radial-gradient(ellipse 36% 30% at 94% 26%, rgba(3, 56, 22, 0.12) 0%, rgba(3, 56, 22, 0.04) 50%, rgba(3, 56, 22, 0) 100%),
		radial-gradient(ellipse 34% 22% at 86% 88%, rgba(200, 169, 106, 0.26) 0%, rgba(200, 169, 106, 0) 100%),
		linear-gradient(180deg, #f5efe3 0%, #faf6ee 50%, #f6f0e5 100%) !important;
}
html[data-theme="light"] .mx-img {
	background: #f1e8d6;
}
html[data-theme="light"] .mx-img::after {
	filter: invert(1) hue-rotate(180deg);
	background:
		linear-gradient(90deg, rgba(255, 250, 242, 0) 70%, rgba(255, 250, 242, 0.5) 100%),
		linear-gradient(180deg, rgba(255, 250, 242, 0) 60%, rgba(255, 250, 242, 0.45) 100%) !important;
}
html[data-theme="light"] .mx-placeholder {
	filter: invert(1) hue-rotate(180deg);
	background:
		radial-gradient(60% 40% at 50% 28%, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 70%),
		linear-gradient(160deg, #f1e6cf 0%, #e7d9b8 55%, #d9c79c 100%) !important;
}

/* ============ Light theme: About page (white + gold) ============ */
html[data-theme="light"] .about-page {
	background: transparent !important;
}
html[data-theme="light"] .ab-bg {
	filter: invert(1) hue-rotate(180deg);
	background:
		radial-gradient(ellipse 40% 8% at 94% 6%, rgba(3, 56, 22, 0.1) 0%, rgba(3, 56, 22, 0) 100%),
		radial-gradient(ellipse 36% 7% at 18% 12%, rgba(200, 169, 106, 0.34) 0%, rgba(200, 169, 106, 0) 100%),
		radial-gradient(ellipse 34% 8% at 2% 38%, rgba(200, 169, 106, 0.22) 0%, rgba(200, 169, 106, 0) 100%),
		radial-gradient(ellipse 32% 7% at 98% 50%, rgba(200, 169, 106, 0.3) 0%, rgba(200, 169, 106, 0) 100%),
		radial-gradient(ellipse 36% 8% at 92% 72%, rgba(3, 56, 22, 0.08) 0%, rgba(3, 56, 22, 0) 100%),
		radial-gradient(ellipse 36% 8% at 12% 90%, rgba(200, 169, 106, 0.28) 0%, rgba(200, 169, 106, 0) 100%),
		linear-gradient(180deg, #fbf8f1 0%, #f7f1e6 50%, #fbf8f1 100%) !important;
}
html[data-theme="light"] .ab-arch,
html[data-theme="light"] .ab-frame {
	background: #f1e8d6;
}
html[data-theme="light"] .ab-arch::after {
	filter: invert(1) hue-rotate(180deg);
	background:
		linear-gradient(180deg, rgba(255, 250, 242, 0) 60%, rgba(255, 250, 242, 0.45) 100%),
		linear-gradient(135deg, rgba(200, 169, 106, 0.16), rgba(200, 169, 106, 0) 50%) !important;
}
html[data-theme="light"] .ab-placeholder {
	filter: invert(1) hue-rotate(180deg);
	background:
		radial-gradient(60% 40% at 50% 28%, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 70%),
		linear-gradient(160deg, #f1e6cf 0%, #e7d9b8 55%, #d9c79c 100%) !important;
}

/* ============ Light theme: footer (white + gold) ============ */
html[data-theme="light"] body .site-footer {
	background: transparent !important;
}
html[data-theme="light"] .sf-bg {
	filter: invert(1) hue-rotate(180deg);
	background:
		radial-gradient(ellipse 40% 32% at 4% 78%, rgba(3, 56, 22, 0.1) 0%, rgba(3, 56, 22, 0) 100%),
		radial-gradient(ellipse 40% 30% at 96% 14%, rgba(200, 169, 106, 0.3) 0%, rgba(200, 169, 106, 0) 100%),
		radial-gradient(ellipse 34% 24% at 70% 96%, rgba(200, 169, 106, 0.24) 0%, rgba(200, 169, 106, 0) 100%),
		linear-gradient(180deg, #f6f0e5 0%, #faf6ee 55%, #f3ecdf 100%) !important;
}

/* ============ Light theme: Contact page (white + gold) ============ */
html[data-theme="light"] .contact-page {
	background: transparent !important;
}
html[data-theme="light"] .ct-bg {
	filter: invert(1) hue-rotate(180deg);
	background:
		radial-gradient(ellipse 42% 22% at 94% 10%, rgba(3, 56, 22, 0.1) 0%, rgba(3, 56, 22, 0) 100%),
		radial-gradient(ellipse 36% 20% at 12% 22%, rgba(200, 169, 106, 0.32) 0%, rgba(200, 169, 106, 0) 100%),
		radial-gradient(ellipse 36% 22% at 96% 70%, rgba(200, 169, 106, 0.28) 0%, rgba(200, 169, 106, 0) 100%),
		radial-gradient(ellipse 36% 22% at 4% 88%, rgba(200, 169, 106, 0.2) 0%, rgba(200, 169, 106, 0) 100%),
		linear-gradient(180deg, #fbf8f1 0%, #f7f1e6 50%, #fbf8f1 100%) !important;
}

/* ============ Light theme: Cart, Checkout, Account ============ */
html[data-theme="light"] body.woocommerce-cart::before,
html[data-theme="light"] body.woocommerce-checkout::before,
html[data-theme="light"] body.woocommerce-account::before {
	filter: invert(1) hue-rotate(180deg);
	background:
		radial-gradient(ellipse 40% 30% at 96% 8%, rgba(200, 169, 106, 0.3) 0%, rgba(200, 169, 106, 0) 100%),
		radial-gradient(ellipse 36% 30% at 6% 30%, rgba(200, 169, 106, 0.22) 0%, rgba(200, 169, 106, 0) 100%),
		radial-gradient(ellipse 40% 30% at 90% 96%, rgba(200, 169, 106, 0.2) 0%, rgba(200, 169, 106, 0) 100%),
		linear-gradient(180deg, #fbf8f1 0%, #f6f0e5 100%) !important;
}

/* ============ Light theme: policy pages ============ */
html[data-theme="light"] .policy-page { background: transparent !important; }
html[data-theme="light"] .pp-bg {
	filter: invert(1) hue-rotate(180deg);
	background:
		radial-gradient(ellipse 42% 20% at 94% 6%, rgba(200, 169, 106, 0.28) 0%, rgba(200, 169, 106, 0) 100%),
		radial-gradient(ellipse 34% 18% at 8% 20%, rgba(200, 169, 106, 0.22) 0%, rgba(200, 169, 106, 0) 100%),
		linear-gradient(180deg, #fbf8f1 0%, #f6f0e5 100%) !important;
}