/* madar_designer - chocolate designer. Madar Solutions. */

.madar-designer {
	/* Black, white and gold — nothing else. Luxury reads as restraint here:
	   hairlines instead of shadows, near-square corners, and the gold saved
	   for edges, ticks and the one button that matters. */
	--gold: #c7944b;
	--gold-deep: #a87732;
	--gold-light: #e3c48f;
	--gold-soft: #f7f7f7;
	--gold-line: #e0d2b8;
	--ink: #0f0f0f;
	--ink-2: #4d4d4d;
	--ink-3: #8f8f8f;
	--line: #e6e6e6;
	--line-soft: #f0f0f0;
	--paper: #ffffff;
	--shell: #f6f6f6;
	--r: 3px;
	--r-sm: 2px;
	--lift: 0 1px 2px rgba(0, 0, 0, .04);
	--float: 0 18px 48px -18px rgba(0, 0, 0, .26);
	--serif: 'Cormorant Garamond', 'IBM Plex Sans Arabic', Georgia, serif;

	background: var(--shell);
	color: var(--ink);
	font-family: 'IBM Plex Sans Arabic', 'Almarai', 'Tajawal', system-ui, -apple-system, sans-serif;
	padding: 0 0 80px;
	margin: 0;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* A hairline of gold across the top of the page, like a foil edge. */
.madar-designer::before {
	content: '';
	display: block;
	height: 2px;
	background: linear-gradient(90deg, var(--gold-light), var(--gold), var(--gold-deep));
}


.madar-designer *,
.madar-designer *::before,
.madar-designer *::after {
	box-sizing: border-box;
}

.madar-designer .md-shell {
	max-width: 1320px;
	margin: 0 auto;
	padding: 0 24px;
}

.madar-designer button {
	font-family: inherit;
	cursor: pointer;
}

/* ------------------------------------------------------------------- head */

/* The theme styles bare header/aside/section tags as site furniture, so every
   block here states its own surface. */
.madar-designer .md-head,
.madar-designer .md-progress,
.madar-designer .md-layout,
.madar-designer .md-side {
	background: transparent;
	box-shadow: none;
	border: 0;
}

.madar-designer .md-head {
	padding: 54px 0 34px;
	text-align: center;
}

.madar-designer .md-crumbs {
	font-size: 12.5px;
	color: var(--ink-3);
	margin-bottom: 18px;
}

.madar-designer .md-crumbs a {
	color: inherit;
	text-decoration: none;
}

.madar-designer .md-crumbs a:hover {
	color: var(--gold);
}

.madar-designer .md-crumbs a + a::before {
	content: '/';
	margin: 0 9px;
	color: #d0d0d0;
}

/* Big and light rather than small and bold — Arabic loses its grace when
   it is set heavy, so size and air carry the weight instead. */
.madar-designer .md-title {
	font-size: 38px;
	font-weight: 600;
	line-height: 1.3;
	margin: 0;
	color: var(--ink);
}

/* A short gold rule under the name, the way a foil stamp sits on a box. */
.madar-designer .md-title::after {
	content: '';
	display: block;
	width: 54px;
	height: 1px;
	margin: 18px auto 0;
	background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.madar-designer .md-subtitle {
	margin: 14px auto 0;
	max-width: 560px;
	font-size: 15.5px;
	font-weight: 400;
	color: var(--ink-2);
}

/* --------------------------------------------------------------- progress */

.madar-designer .md-progress {
	position: relative;
	margin-bottom: 26px;
}

.madar-designer .md-progress-bar {
	height: 2px;
	background: var(--line);
	margin-bottom: 20px;
	overflow: hidden;
}

.madar-designer .md-progress-bar span {
	display: block;
	height: 100%;
	width: 0;
	background: linear-gradient(90deg, var(--gold-light), var(--gold) 55%, var(--gold-deep));
	transition: width .45s cubic-bezier(.4, 0, .2, 1);
}

.madar-designer .md-rail {
	display: flex;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
	overflow-x: auto;
	scrollbar-width: none;
}

.madar-designer .md-rail::-webkit-scrollbar {
	display: none;
}

.madar-designer .md-rail li {
	flex: 1 1 0;
	min-width: 118px;
}

.madar-designer .md-rail-step {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	width: 100%;
	padding: 13px 12px;
	border: 1px solid var(--line);
	border-radius: var(--r);
	background: var(--paper);
	font-size: 14px;
	font-weight: 500;
	color: var(--ink-3);
	transition: all .22s ease;
}

.madar-designer .md-rail-step:not(:disabled):hover {
	border-color: var(--gold-line);
	color: var(--ink);
}

.madar-designer .md-rail-step:disabled {
	cursor: not-allowed;
	opacity: .5;
}

.madar-designer .md-rail-num {
	flex: 0 0 24px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--shell);
	color: var(--ink-3);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 700;
	transition: all .2s ease;
}

.madar-designer .md-rail-step.is-done {
	color: var(--ink);
	border-color: var(--gold-line);
	background: var(--gold-soft);
	font-weight: 600;
}

.madar-designer .md-rail-step.is-done .md-rail-num {
	background: var(--gold);
	color: #fff;
}

.madar-designer .md-rail-step.is-done .md-rail-num::before {
	content: '✓';
	font-size: 12px;
}

.madar-designer .md-rail-step.is-done .md-rail-num {
	font-size: 0;
}

.madar-designer .md-rail-step.is-active {
	background: var(--ink);
	border-color: var(--ink);
	color: #fff;
	font-weight: 600;
	box-shadow: var(--float);
}

.madar-designer .md-rail-step.is-active .md-rail-num {
	background: var(--gold);
	color: #fff;
	font-size: 12px;
}

.madar-designer .md-rail-step.is-active .md-rail-num::before {
	content: none;
}


.madar-designer .md-rail-icon {
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	background: center/18px no-repeat;
	opacity: .55;
	transition: opacity .2s ease;
}

.madar-designer .md-rail-step.is-active .md-rail-icon,
.madar-designer .md-rail-step.is-done .md-rail-icon {
	opacity: 1;
}

.madar-designer .md-rail-step[data-key="design"] .md-rail-icon {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238c8c8c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19l7-7 3 3-7 7-3-3z'/%3E%3Cpath d='M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z'/%3E%3Cpath d='M2 2l7.586 7.586'/%3E%3Ccircle cx='11' cy='11' r='2'/%3E%3C/svg%3E");
}

.madar-designer .md-rail-step[data-key="design"].is-active .md-rail-icon {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19l7-7 3 3-7 7-3-3z'/%3E%3Cpath d='M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z'/%3E%3Cpath d='M2 2l7.586 7.586'/%3E%3Ccircle cx='11' cy='11' r='2'/%3E%3C/svg%3E");
}

.madar-designer .md-rail-step[data-key="design"].is-done .md-rail-icon {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c7944b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19l7-7 3 3-7 7-3-3z'/%3E%3Cpath d='M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z'/%3E%3Cpath d='M2 2l7.586 7.586'/%3E%3Ccircle cx='11' cy='11' r='2'/%3E%3C/svg%3E");
}

.madar-designer .md-rail-step[data-key="color"] .md-rail-icon {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238c8c8c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='13.5' cy='6.5' r='.5'/%3E%3Ccircle cx='17.5' cy='10.5' r='.5'/%3E%3Ccircle cx='8.5' cy='7.5' r='.5'/%3E%3Ccircle cx='6.5' cy='12.5' r='.5'/%3E%3Cpath d='M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z'/%3E%3C/svg%3E");
}

.madar-designer .md-rail-step[data-key="color"].is-active .md-rail-icon {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='13.5' cy='6.5' r='.5'/%3E%3Ccircle cx='17.5' cy='10.5' r='.5'/%3E%3Ccircle cx='8.5' cy='7.5' r='.5'/%3E%3Ccircle cx='6.5' cy='12.5' r='.5'/%3E%3Cpath d='M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z'/%3E%3C/svg%3E");
}

.madar-designer .md-rail-step[data-key="color"].is-done .md-rail-icon {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c7944b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='13.5' cy='6.5' r='.5'/%3E%3Ccircle cx='17.5' cy='10.5' r='.5'/%3E%3Ccircle cx='8.5' cy='7.5' r='.5'/%3E%3Ccircle cx='6.5' cy='12.5' r='.5'/%3E%3Cpath d='M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z'/%3E%3C/svg%3E");
}

.madar-designer .md-rail-step[data-key="filling"] .md-rail-icon {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238c8c8c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5'/%3E%3Cpath d='M8.5 8.5v.01M16 15.5v.01M12 12v.01M11 17v.01M7 14v.01'/%3E%3C/svg%3E");
}

.madar-designer .md-rail-step[data-key="filling"].is-active .md-rail-icon {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5'/%3E%3Cpath d='M8.5 8.5v.01M16 15.5v.01M12 12v.01M11 17v.01M7 14v.01'/%3E%3C/svg%3E");
}

.madar-designer .md-rail-step[data-key="filling"].is-done .md-rail-icon {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c7944b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5'/%3E%3Cpath d='M8.5 8.5v.01M16 15.5v.01M12 12v.01M11 17v.01M7 14v.01'/%3E%3C/svg%3E");
}

.madar-designer .md-rail-step[data-key="wrap"] .md-rail-icon {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238c8c8c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='7' width='20' height='5' rx='1'/%3E%3Cpath d='M4 12v7a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-7M12 7v13M12 7C10.5 7 7 6.5 7 4.5A2.5 2.5 0 0 1 12 4a2.5 2.5 0 0 1 5 .5C17 6.5 13.5 7 12 7z'/%3E%3C/svg%3E");
}

.madar-designer .md-rail-step[data-key="wrap"].is-active .md-rail-icon {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='7' width='20' height='5' rx='1'/%3E%3Cpath d='M4 12v7a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-7M12 7v13M12 7C10.5 7 7 6.5 7 4.5A2.5 2.5 0 0 1 12 4a2.5 2.5 0 0 1 5 .5C17 6.5 13.5 7 12 7z'/%3E%3C/svg%3E");
}

.madar-designer .md-rail-step[data-key="wrap"].is-done .md-rail-icon {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c7944b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='7' width='20' height='5' rx='1'/%3E%3Cpath d='M4 12v7a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-7M12 7v13M12 7C10.5 7 7 6.5 7 4.5A2.5 2.5 0 0 1 12 4a2.5 2.5 0 0 1 5 .5C17 6.5 13.5 7 12 7z'/%3E%3C/svg%3E");
}

.madar-designer .md-rail-step[data-key="extra"] .md-rail-icon {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238c8c8c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E");
}

.madar-designer .md-rail-step[data-key="extra"].is-active .md-rail-icon {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E");
}

.madar-designer .md-rail-step[data-key="extra"].is-done .md-rail-icon {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c7944b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E");
}

.madar-designer .md-rail-step[data-key="cart"] .md-rail-icon {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238c8c8c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4H6z'/%3E%3Cpath d='M3 6h18M16 10a4 4 0 0 1-8 0'/%3E%3C/svg%3E");
}

.madar-designer .md-rail-step[data-key="cart"].is-active .md-rail-icon {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4H6z'/%3E%3Cpath d='M3 6h18M16 10a4 4 0 0 1-8 0'/%3E%3C/svg%3E");
}

.madar-designer .md-rail-step[data-key="cart"].is-done .md-rail-icon {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c7944b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4H6z'/%3E%3Cpath d='M3 6h18M16 10a4 4 0 0 1-8 0'/%3E%3C/svg%3E");
}

/* ----------------------------------------------------------------- layout */

.madar-designer .md-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 430px;
	gap: 30px;
	align-items: start;
}

.madar-designer .md-panels {
	min-width: 0;
}

.madar-designer .md-panel {
	display: none;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--r);
	box-shadow: var(--lift);
	padding: 38px 40px 34px;
}

.madar-designer .md-panel.is-active {
	display: block;
	animation: md-in .28s ease;
}

@keyframes md-in {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: none; }
}

.madar-designer .md-step-title {
	font-size: 23px;
	font-weight: 600;
	line-height: 1.4;
	margin: 0 0 30px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--line-soft);
	position: relative;
}

.madar-designer .md-step-title::after {
	content: '';
	position: absolute;
	bottom: -1px;
	inset-inline-start: 0;
	width: 42px;
	height: 1px;
	background: var(--gold);
}

.madar-designer .md-field {
	margin-bottom: 32px;
}

.madar-designer .md-field:last-of-type {
	margin-bottom: 0;
}

.madar-designer .md-field[hidden] {
	display: none;
}

.madar-designer .md-label {
	display: block;
	font-size: 14.5px;
	font-weight: 600;
	margin-bottom: 12px;
	color: var(--ink);
}

.madar-designer .md-req {
	color: var(--gold);
}

.madar-designer .md-hint {
	display: block;
	font-size: 12.5px;
	color: var(--ink-3);
	margin-top: 9px;
}

.madar-designer .md-error {
	color: #b3261e;
	font-size: 13px;
	margin-top: 6px;
	min-height: 1px;
}

.madar-designer .md-error:empty {
	margin-top: 0;
}

/* The native select/number input stays in the DOM so the form still posts,
   but the custom control is what the customer sees. Every box property is
   forced: .md-input is declared later with the same specificity, and its
   width:100% was stretching this hidden field to the full page width, which
   put a 1288px box at a negative offset and gave the filling and quantity
   steps a horizontal scrollbar. */
.madar-designer .md-native-hidden {
	position: absolute !important;
	inset-inline-start: 0 !important;
	top: 0 !important;
	width: 1px !important;
	height: 1px !important;
	min-width: 0 !important;
	max-width: 1px !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
	opacity: 0;
	pointer-events: none;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
}

/* ----------------------------------------------------------------- inputs */

.madar-designer .md-input {
	width: 100%;
	padding: 15px 18px;
	border: 1px solid var(--line);
	border-radius: var(--r);
	font-size: 15px;
	font-family: inherit;
	color: var(--ink);
	background: #fcfcfc;
	transition: border-color .18s, box-shadow .18s, background .18s;
	-webkit-appearance: none;
	appearance: none;
}

.madar-designer .md-input::placeholder {
	color: #bdbdbd;
}

.madar-designer .md-input:focus {
	outline: none;
	background: var(--paper);
	border-color: var(--gold);
	box-shadow: 0 0 0 3px rgba(199, 148, 75, .13);
}

.madar-designer .md-textarea {
	resize: vertical;
	min-height: 92px;
	line-height: 1.6;
}

.madar-designer .md-name-wrap {
	position: relative;
}

/* The customer's name is the product, so it gets set like display type. */
.madar-designer .md-name {
	font-size: 22px;
	font-weight: 600;
	padding-inline-end: 82px;
	height: 64px;
}

.madar-designer .md-counter {
	position: absolute;
	inset-inline-end: 16px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 12px;
	font-weight: 600;
	color: var(--ink-3);
	background: var(--shell);
	border: 1px solid var(--line-soft);
	border-radius: 999px;
	padding: 3px 11px;
	pointer-events: none;
}

/* ------------------------------------------------------------ mode cards */

.madar-designer .md-modes {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 14px;
	margin-bottom: 30px;
}

.madar-designer .md-mode {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 28px 16px 22px;
	border: 1px solid var(--line);
	border-radius: var(--r);
	background: var(--paper);
	cursor: pointer;
	margin: 0;
	transition: all .22s ease;
}

.madar-designer .md-mode:hover {
	border-color: var(--gold-line);
	background: #fafafa;
}

.madar-designer .md-mode input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.madar-designer .md-mode.is-active {
	border-color: var(--gold);
	background: var(--gold-soft);
	box-shadow: inset 0 0 0 1px var(--gold);
}

.madar-designer .md-mode-tick {
	position: absolute;
	top: 10px;
	inset-inline-start: 10px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	border: 1.5px solid var(--line);
	background: var(--paper);
	transition: all .2s ease;
}

.madar-designer .md-mode.is-active .md-mode-tick {
	background: var(--gold);
	border-color: var(--gold);
}

.madar-designer .md-mode.is-active .md-mode-tick::after {
	content: '';
	position: absolute;
	inset: 0;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 13 4 4L19 7'/%3E%3C/svg%3E") center/12px no-repeat;
}

.madar-designer .md-mode-icon {
	width: 42px;
	height: 42px;
	margin-bottom: 8px;
	background: center/26px no-repeat;
	opacity: .85;
}

.madar-designer .md-mode.is-active .md-mode-icon {
	opacity: 1;
}

.madar-designer .md-mode-icon-name {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='1.7' stroke-linecap='round'%3E%3Cpath d='M4 7V5h16v2M12 5v14M9 19h6'/%3E%3C/svg%3E");
}

.madar-designer .md-mode-icon-logo {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16V4m0 0L7 9m5-5 5 5M4 17v2a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-2'/%3E%3C/svg%3E");
}

.madar-designer .md-mode-icon-design {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='1.7' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Ccircle cx='8.5' cy='9.5' r='1.5'/%3E%3Cpath d='m4 17 5-5 4 4 3-3 4 4'/%3E%3C/svg%3E");
}

.madar-designer .md-mode-name {
	font-size: 15px;
	font-weight: 600;
}

.madar-designer .md-mode-price {
	font-size: 12.5px;
	color: var(--gold-deep);
	font-weight: 600;
}

/* --------------------------------------------------- ready made design library */

.madar-designer .md-groups {
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
	margin-bottom: 26px;
}

.madar-designer .md-group {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 11px 20px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--paper);
	font-size: 14px;
	font-weight: 500;
	color: var(--ink-2);
	transition: all .18s ease;
}

.madar-designer .md-group:hover {
	border-color: var(--gold-line);
}

.madar-designer .md-group.is-active {
	border-color: var(--gold);
	background: var(--gold-soft);
	color: var(--ink);
	font-weight: 600;
}

.madar-designer .md-group-tick {
	width: 17px;
	height: 17px;
	border-radius: 50%;
	border: 1.5px solid #d8d8d8;
	flex: 0 0 17px;
	position: relative;
	transition: all .18s ease;
}

.madar-designer .md-group.is-active .md-group-tick {
	background: var(--gold);
	border-color: var(--gold);
}

.madar-designer .md-group.is-active .md-group-tick::after {
	content: '';
	position: absolute;
	inset: 0;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 13 4 4L19 7'/%3E%3C/svg%3E") center/11px no-repeat;
}

.madar-designer .md-label-art {
	margin-top: 4px;
}

.madar-designer .md-art-group {
	display: none;
	grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
	gap: 12px;
}

.madar-designer .md-art-group.is-active {
	display: grid;
}

.madar-designer .md-art {
	padding: 0;
	border: none;
	background: none;
	text-align: center;
}

.madar-designer .md-art-face {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	border: 1px solid var(--line);
	border-radius: var(--r);
	background: var(--paper);
	padding: 14px;
	transition: all .22s ease;
}

.madar-designer .md-art:hover .md-art-face {
	border-color: var(--gold-line);
	box-shadow: var(--lift);
}

.madar-designer .md-art.is-selected .md-art-face {
	border-color: var(--gold);
	box-shadow: inset 0 0 0 1px var(--gold);
}

.madar-designer .md-art-face img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.madar-designer .md-art-tick {
	position: absolute;
	top: 5px;
	inset-inline-start: 5px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--gold);
	opacity: 0;
	transform: scale(.6);
	transition: all .18s ease;
}

.madar-designer .md-art-tick::after {
	content: '';
	position: absolute;
	inset: 0;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 13 4 4L19 7'/%3E%3C/svg%3E") center/11px no-repeat;
}

.madar-designer .md-art.is-selected .md-art-tick {
	opacity: 1;
	transform: scale(1);
}

.madar-designer .md-art-name {
	display: block;
	font-size: 12.5px;
	margin-top: 7px;
	color: var(--ink-3);
}

.madar-designer .md-art.is-selected .md-art-name {
	color: var(--ink);
	font-weight: 600;
}

/* --------------------------------------------------------------- swatches */

.madar-designer .md-swatches {
	display: grid;
	gap: 12px;
}

.madar-designer .md-swatches-color {
	grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
}

.madar-designer .md-swatches-card {
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.madar-designer .md-swatch {
	position: relative;
	display: block;
	margin: 0;
	cursor: pointer;
	text-align: center;
	font-weight: 500;
}

.madar-designer .md-swatch input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.madar-designer .md-swatch-face {
	position: relative;
	display: block;
	border-radius: var(--r);
	border: 1px solid var(--line);
	background: var(--paper);
	overflow: hidden;
	transition: all .22s ease;
}

.madar-designer .md-swatch-color .md-swatch-face {
	width: 58px;
	height: 58px;
	margin: 0 auto;
	border-radius: 50%;
	background:
		radial-gradient(75% 65% at 32% 24%, rgba(255, 255, 255, .38), rgba(255, 255, 255, 0) 60%),
		var(--swatch, #eee);
	box-shadow: inset 0 0 0 3px var(--paper), inset 0 -6px 14px rgba(0, 0, 0, .16);
}

.madar-designer .md-swatch-color:hover .md-swatch-face {
	transform: translateY(-2px);
}

.madar-designer .md-swatch-card .md-swatch-face {
	aspect-ratio: 1 / 1;
	background: #fafafa;
}

.madar-designer .md-swatch-face img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.madar-designer .md-swatch:hover .md-swatch-face {
	border-color: var(--gold-line);
}

.madar-designer .md-swatch.is-selected .md-swatch-face {
	border-color: var(--gold);
	box-shadow: 0 0 0 2px var(--gold), inset 0 0 0 3px var(--paper), inset 0 -6px 14px rgba(0, 0, 0, .16);
}

.madar-designer .md-swatch-card.is-selected .md-swatch-face {
	box-shadow: inset 0 0 0 1px var(--gold);
}

.madar-designer .md-swatch-tick {
	position: absolute;
	top: 5px;
	inset-inline-start: 5px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--gold);
	opacity: 0;
	transform: scale(.6);
	transition: all .18s ease;
}

.madar-designer .md-swatch-tick::after {
	content: '';
	position: absolute;
	inset: 0;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 13 4 4L19 7'/%3E%3C/svg%3E") center/11px no-repeat;
}

.madar-designer .md-swatch.is-selected .md-swatch-tick {
	opacity: 1;
	transform: scale(1);
}

.madar-designer .md-swatch-name {
	display: block;
	font-size: 13px;
	margin-top: 8px;
	color: var(--ink-2);
	line-height: 1.35;
}

.madar-designer .md-swatch.is-selected .md-swatch-name {
	color: var(--ink);
	font-weight: 600;
}

.madar-designer .md-swatch-price {
	display: block;
	font-size: 12px;
	color: var(--gold-deep);
	font-weight: 600;
	margin-top: 2px;
}

/* ------------------------------------------------------------- checkboxes */

.madar-designer .md-checks {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 10px;
}

.madar-designer .md-check {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 16px;
	border: 1px solid var(--line);
	border-radius: var(--r);
	margin: 0;
	cursor: pointer;
	font-size: 14px;
	transition: all .18s ease;
}

.madar-designer .md-check:hover {
	border-color: var(--gold-line);
}

.madar-designer .md-check input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.madar-designer .md-check-box {
	flex: 0 0 20px;
	width: 20px;
	height: 20px;
	border: 1px solid #d8d8d8;
	border-radius: var(--r-sm);
	position: relative;
	transition: all .18s ease;
}

.madar-designer .md-check input:checked ~ .md-check-box {
	background: var(--gold);
	border-color: var(--gold);
}

.madar-designer .md-check input:checked ~ .md-check-box::after {
	content: '';
	position: absolute;
	inset: 0;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 13 4 4L19 7'/%3E%3C/svg%3E") center/13px no-repeat;
}

.madar-designer .md-check:has(input:checked) {
	border-color: var(--gold);
	background: var(--gold-soft);
}

.madar-designer .md-check-label em {
	font-style: normal;
	color: var(--gold-deep);
	font-weight: 600;
}

/* ------------------------------------------------------------ custom select */

.madar-designer .md-select {
	position: relative;
}

.madar-designer .md-select-trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	padding: 15px 18px;
	border: 1px solid var(--line);
	border-radius: var(--r);
	background: #fcfcfc;
	font-size: 15px;
	font-weight: 500;
	color: var(--ink);
	text-align: start;
	transition: border-color .18s, box-shadow .18s;
}

.madar-designer .md-select.is-empty .md-select-trigger {
	color: #bdbdbd;
	font-weight: 400;
}

.madar-designer .md-select.is-open .md-select-trigger {
	border-color: var(--gold);
	box-shadow: 0 0 0 3px rgba(199, 148, 75, .14);
}

.madar-designer .md-select-caret {
	flex: 0 0 10px;
	width: 10px;
	height: 10px;
	border-inline-end: 1.8px solid var(--ink-3);
	border-bottom: 1.8px solid var(--ink-3);
	transform: rotate(45deg) translate(-2px, -2px);
	transition: transform .2s ease;
}

.madar-designer .md-select.is-open .md-select-caret {
	transform: rotate(-135deg) translate(-3px, -3px);
}

.madar-designer .md-select-panel {
	position: absolute;
	inset-inline: 0;
	top: calc(100% + 6px);
	z-index: 40;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--r);
	box-shadow: var(--float);
	padding: 6px;
	max-height: 290px;
	overflow-y: auto;
	display: none;
}

.madar-designer .md-select.is-open .md-select-panel {
	display: block;
}

.madar-designer .md-select-option {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 11px 14px;
	border-radius: var(--r-sm);
	font-size: 14.5px;
	cursor: pointer;
	transition: background .14s;
}

.madar-designer .md-select-option:hover {
	background: var(--shell);
}

.madar-designer .md-select-option.is-selected {
	background: var(--gold-soft);
	color: var(--ink);
	font-weight: 600;
	box-shadow: inset 2px 0 0 var(--gold);
}

.madar-designer .md-select-option-price {
	font-size: 13px;
	color: var(--gold-deep);
	font-weight: 600;
}

/* -------------------------------------------------------------- custom date */

.madar-designer .md-date {
	position: relative;
}

.madar-designer .md-date-trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	padding: 15px 18px;
	border: 1px solid var(--line);
	border-radius: var(--r);
	background: #fcfcfc;
	font-size: 15px;
	font-weight: 500;
	color: var(--ink);
	text-align: start;
}

.madar-designer .md-date.is-empty .md-date-trigger {
	color: #bdbdbd;
	font-weight: 400;
}

.madar-designer .md-date.is-open .md-date-trigger {
	border-color: var(--gold);
	box-shadow: 0 0 0 3px rgba(199, 148, 75, .14);
}

.madar-designer .md-date-icon {
	flex: 0 0 20px;
	width: 20px;
	height: 20px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238c8c8c' stroke-width='1.8' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E") center/20px no-repeat;
}

.madar-designer .md-date-panel {
	position: absolute;
	inset-inline-start: 0;
	top: calc(100% + 6px);
	z-index: 40;
	width: 310px;
	max-width: 100%;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--r);
	box-shadow: var(--float);
	padding: 14px;
	display: none;
}

.madar-designer .md-date.is-open .md-date-panel {
	display: block;
}

.madar-designer .md-date-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

.madar-designer .md-date-title {
	font-size: 15px;
	font-weight: 700;
}

.madar-designer .md-date-nav {
	width: 30px;
	height: 30px;
	border: 1px solid var(--line);
	border-radius: var(--r-sm);
	background: var(--paper);
	font-size: 17px;
	line-height: 1;
	color: var(--ink);
}

.madar-designer .md-date-nav:disabled {
	opacity: .35;
	cursor: not-allowed;
}

.madar-designer .md-date-week,
.madar-designer .md-date-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 3px;
}

.madar-designer .md-date-week {
	margin-bottom: 6px;
}

.madar-designer .md-date-week span {
	text-align: center;
	font-size: 11px;
	font-weight: 700;
	color: var(--ink-3);
	padding: 4px 0;
}

.madar-designer .md-date-day {
	aspect-ratio: 1 / 1;
	border: none;
	border-radius: var(--r-sm);
	background: transparent;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--ink);
	transition: background .14s;
}

.madar-designer .md-date-day:hover:not(:disabled) {
	background: var(--gold-soft);
}

.madar-designer .md-date-day.is-past {
	color: #d2d2d2;
	cursor: not-allowed;
}

.madar-designer .md-date-day.is-earliest:not(.is-selected) {
	box-shadow: inset 0 0 0 1.5px var(--gold-line);
}

.madar-designer .md-date-day.is-selected {
	background: var(--ink);
	color: #fff;
	font-weight: 700;
}

.madar-designer .md-date-foot {
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid var(--line);
	font-size: 12px;
	color: var(--ink-3);
	text-align: center;
}

/* ------------------------------------------------------------- file upload */

.madar-designer .md-upload {
	position: relative;
	border: 1px dashed #dcdcdc;
	border-radius: var(--r);
	background: #fafafa;
	padding: 34px 24px;
	text-align: center;
	cursor: pointer;
	transition: all .2s ease;
}

.madar-designer .md-upload:hover,
.madar-designer .md-upload.is-dragging {
	border-color: var(--gold);
	background: var(--gold-soft);
}

.madar-designer .md-drop-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}

.madar-designer .md-drop-inner[hidden] {
	display: none;
}

.madar-designer .md-drop-icon {
	width: 38px;
	height: 38px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c7944b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16V4m0 0L7 9m5-5 5 5M4 17v2a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-2'/%3E%3C/svg%3E") center/34px no-repeat;
}

.madar-designer .md-drop-text {
	font-size: 14px;
	color: var(--ink-2);
}

.madar-designer .md-drop-browse {
	margin-top: 4px;
	padding: 11px 24px;
	border: 1px solid var(--ink);
	border-radius: var(--r-sm);
	background: var(--ink);
	color: #fff;
	font-size: 13.5px;
	font-weight: 600;
	transition: all .18s ease;
}

.madar-designer .md-drop-browse:hover {
	background: var(--gold-deep);
	border-color: var(--gold-deep);
}

.madar-designer .md-drop-preview {
	display: flex;
	align-items: center;
	gap: 14px;
	text-align: start;
}

.madar-designer .md-drop-preview[hidden] {
	display: none;
}

.madar-designer .md-drop-thumb {
	flex: 0 0 56px;
	width: 56px;
	height: 56px;
	object-fit: contain;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--r-sm);
	padding: 4px;
}

.madar-designer .md-drop-name {
	flex: 1 1 auto;
	font-size: 13.5px;
	font-weight: 600;
	word-break: break-all;
}

.madar-designer .md-drop-remove {
	flex: 0 0 30px;
	width: 30px;
	height: 30px;
	border: 1px solid var(--line);
	border-radius: 50%;
	background: var(--paper);
	font-size: 18px;
	line-height: 1;
	color: var(--ink-3);
}

.madar-designer .md-drop-remove:hover {
	border-color: #b3261e;
	color: #b3261e;
}

/* ---------------------------------------------------------------- stepper */

.madar-designer .md-stepper {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--line);
	border-radius: var(--r);
	overflow: hidden;
	background: var(--paper);
}

.madar-designer .md-stepper-btn {
	width: 44px;
	height: 48px;
	border: none;
	background: var(--paper);
	font-size: 19px;
	font-weight: 600;
	color: var(--ink);
	transition: background .16s;
}

.madar-designer .md-stepper-btn:hover:not(:disabled) {
	background: var(--gold-soft);
	color: var(--gold-deep);
}

.madar-designer .md-stepper-btn:disabled {
	color: #d4d4d4;
	cursor: not-allowed;
}

.madar-designer .md-stepper-value {
	width: 56px;
	height: 48px;
	border: none;
	border-inline: 1px solid var(--line);
	text-align: center;
	font-size: 16px;
	font-weight: 700;
	font-family: inherit;
	color: var(--ink);
}

.madar-designer .md-stepper-value:focus {
	outline: none;
	background: var(--gold-soft);
}

/* -------------------------------------------------------------- checkout */

.madar-designer .md-checkout {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
	padding: 24px 26px;
	margin-bottom: 28px;
	border: 1px solid var(--line);
	border-top: 2px solid var(--gold);
	border-radius: var(--r);
	background: var(--paper);
}

.madar-designer .md-qty-field {
	margin-bottom: 0;
}

.madar-designer .md-price-box {
	text-align: end;
}

.madar-designer .md-price-label {
	display: block;
	font-size: 13px;
	color: var(--ink-2);
	margin-bottom: 2px;
}

.madar-designer .md-price-value {
	display: block;
	font-family: var(--serif);
	font-size: 40px;
	font-weight: 600;
	line-height: 1.1;
	color: var(--ink);
}

.madar-designer .md-price-note {
	display: block;
	font-size: 12.5px;
	color: var(--ink-3);
	margin-top: 2px;
}

.madar-designer .md-price-value .price-symbol {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.madar-designer .md-pdf-notice {
	margin: 10px 0 0;
	padding: 10px 14px;
	border-radius: var(--r-sm);
	background: var(--gold-soft);
	color: var(--ink-2);
	font-size: 13px;
}

.madar-designer .md-alert {
	display: none;
	padding: 12px 16px;
	border-radius: var(--r);
	margin-bottom: 16px;
	font-size: 14px;
	font-weight: 600;
}

.madar-designer .md-alert.is-error,
.madar-designer .md-alert.is-success {
	display: block;
}

.madar-designer .md-alert.is-error {
	background: #fdf0ef;
	color: #b3261e;
}

.madar-designer .md-alert.is-success {
	background: #eef8f0;
	color: #1c7a36;
}

.madar-designer .md-submit {
	position: relative;
	overflow: hidden;
	width: 100%;
	padding: 20px;
	border: none;
	border-radius: var(--r);
	background: var(--ink);
	color: #fff;
	font-size: 16.5px;
	font-weight: 600;
	box-shadow: var(--float);
	transition: background .25s ease, transform .12s ease;
}

/* A slow sheen across the gold, like light moving over foil. */
.madar-designer .md-submit::after {
	content: '';
	position: absolute;
	inset: 0 -60%;
	background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, .28) 50%, transparent 58%);
	transform: translateX(-60%);
	transition: transform .7s ease;
	pointer-events: none;
}

.madar-designer .md-submit:hover:not(:disabled) {
	background: linear-gradient(100deg, var(--gold-deep), var(--gold) 45%, var(--gold-light));
}

.madar-designer .md-submit:hover:not(:disabled)::after {
	transform: translateX(60%);
}

.madar-designer .md-submit:active:not(:disabled) {
	transform: scale(.995);
}

.madar-designer .md-submit:disabled {
	opacity: .6;
	cursor: wait;
}

/* --------------------------------------------------------------- step nav */

.madar-designer .md-nav {
	display: flex;
	gap: 12px;
	justify-content: flex-end;
	margin-top: 34px;
	padding-top: 26px;
	border-top: 1px solid var(--line-soft);
}

.madar-designer .md-btn {
	padding: 15px 32px;
	border-radius: var(--r);
	font-size: 15px;
	font-weight: 600;
	border: 1px solid transparent;
	transition: all .2s ease;
}

.madar-designer .md-btn-solid {
	background: var(--ink);
	color: #fff;
}

.madar-designer .md-btn-solid:hover {
	background: var(--gold-deep);
}

.madar-designer .md-btn-ghost {
	background: transparent;
	border-color: var(--line);
	color: var(--ink-2);
}

.madar-designer .md-btn-ghost:hover {
	border-color: var(--ink);
	color: var(--ink);
	background: var(--paper);
}

/* ------------------------------------------------------------------- side */

.madar-designer .md-side {
	position: sticky;
	top: 16px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* A neutral studio: light from above, the corners falling away, so the
   product is the only thing with colour on this side of the page. */
.madar-designer .md-stage {
	position: relative;
	background: radial-gradient(120% 90% at 50% 10%, #ffffff 0%, #f4f4f4 58%, #e4e4e4 100%);
	border: 1px solid var(--line);
	border-radius: var(--r);
	aspect-ratio: 1 / 1;
	overflow: hidden;
}

.madar-designer .md-stage::after {
	content: '';
	position: absolute;
	inset: 0;
	pointer-events: none;
	box-shadow: inset 0 0 90px rgba(0, 0, 0, .07);
}

.madar-designer .md-canvas {
	display: block;
	width: 100%;
	height: 100%;
	touch-action: none;
	cursor: grab;
}

.madar-designer .md-canvas:active {
	cursor: grabbing;
}

.madar-designer .md-stage-tools {
	position: absolute;
	top: 14px;
	inset-inline-end: 14px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.madar-designer .md-stage-btn {
	width: 38px;
	height: 38px;
	padding: 9px;
	border: 1px solid rgba(0, 0, 0, .07);
	border-radius: 50%;
	background: rgba(255, 255, 255, .94);
	backdrop-filter: blur(6px);
	box-shadow: 0 2px 10px rgba(0, 0, 0, .07);
	color: var(--ink-2);
	transition: all .2s ease;
}

.madar-designer .md-stage-btn:hover {
	color: #fff;
	background: var(--ink);
	border-color: var(--ink);
	transform: translateY(-1px);
}

.madar-designer .md-stage-btn svg {
	width: 100%;
	height: 100%;
	display: block;
}

.madar-designer .md-stage-hint {
	position: absolute;
	inset-inline: 0;
	bottom: 14px;
	text-align: center;
	font-size: 12px;
	color: var(--ink-3);
	pointer-events: none;
	z-index: 1;
}

/* Reads like the card that comes inside the box: black rule on top, the
   choices set as a quiet list underneath. */
.madar-designer .md-summary {
	background: var(--paper);
	border: 1px solid var(--line);
	border-top: 2px solid var(--ink);
	border-radius: var(--r);
	padding: 24px 26px 26px;
}

.madar-designer .md-summary h3 {
	font-size: 16px;
	font-weight: 600;
	margin: 0 0 18px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--line-soft);
}

.madar-designer .md-summary-list {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 13px 16px;
	margin: 0;
	font-size: 13.5px;
}

.madar-designer .md-summary-list dt {
	font-weight: 400;
	color: var(--ink-3);
	white-space: nowrap;
}

.madar-designer .md-summary-list dd {
	margin: 0;
	text-align: end;
	font-weight: 600;
	word-break: break-word;
}

.madar-designer .md-summary-list dd.is-empty {
	color: #cccccc;
	font-weight: 400;
}

/* ----------------------------------------------------------------- mobile */

@media (max-width: 1100px) {
	.madar-designer .md-layout {
		grid-template-columns: minmax(0, 1fr) 360px;
	}
}

@media (max-width: 900px) {
	.madar-designer .md-layout {
		display: flex;
		flex-direction: column;
		/* The desktop grid sets align-items:start, which on a flex column makes
		   every block shrink to its own content width — that is what left the
		   wizard panel and the summary narrower than the preview, each indented
		   a little further than the last. Stretch them back to full width. */
		align-items: stretch;
	}

	/* The preview leads, the wizard follows, and the summary waits at the
	   bottom so it never pushes the actual choices off the screen. */
	.madar-designer .md-side {
		position: static;
		display: contents;
	}

	.madar-designer .md-stage {
		order: 1;
		aspect-ratio: 4 / 3;
	}

	.madar-designer .md-panels {
		order: 2;
	}

	.madar-designer .md-summary {
		order: 3;
	}
}

@media (max-width: 640px) {
	.madar-designer .md-shell {
		padding: 0 14px;
	}

	.madar-designer .md-head {
		padding: 32px 0 26px;
	}

	.madar-designer .md-title {
		font-size: 27px;
	}

	.madar-designer .md-panel {
		padding: 26px 20px 24px;
	}

	.madar-designer .md-price-value {
		font-size: 34px;
	}

	/* Only the step you are on needs its name; the rest are just markers. */
	.madar-designer .md-rail li {
		min-width: 0;
		flex: 0 0 auto;
	}

	/* The active step is the only one showing its label, so it needs the width
	   that label takes. "1 1 auto" also let it *shrink*, and once the rail
	   overflowed it collapsed to a ~22px sliver — the current step became the
	   one step you could not read. */
	.madar-designer .md-rail li:has(.is-active) {
		flex: 0 0 auto;
	}

	.madar-designer .md-rail-label {
		display: none;
	}

	.madar-designer .md-rail-step.is-active .md-rail-label {
		display: inline;
	}

	.madar-designer .md-rail-step {
		padding: 10px;
	}

	/* Three choices side by side is cramped on a phone; list them instead. */
	.madar-designer .md-modes {
		grid-template-columns: 1fr;
		gap: 10px;
	}

	.madar-designer .md-mode {
		flex-direction: row;
		align-items: center;
		gap: 14px;
		padding: 14px 16px;
		text-align: start;
	}

	.madar-designer .md-mode-icon {
		flex: 0 0 34px;
		width: 34px;
		height: 34px;
		margin: 0;
		background-size: 24px;
	}

	.madar-designer .md-mode-name {
		flex: 1 1 auto;
	}

	.madar-designer .md-mode-tick {
		position: static;
		flex: 0 0 20px;
	}

	.madar-designer .md-checkout {
		flex-direction: column;
		align-items: stretch;
	}

	.madar-designer .md-price-box {
		text-align: start;
	}

	.madar-designer .md-nav {
		flex-direction: column-reverse;
	}

	.madar-designer .md-btn {
		width: 100%;
	}
}
