/* Qiyam brand + "Make your mat" designer. Colors and type follow the Qiyam mockup. */
:root {
	--qiyam-paper: #f6f4f0;
	--qiyam-ink: #171715;
	--qiyam-muted: #6b6862;
	--qiyam-line: #ddd8d0;
	--qiyam-panel: #eae5dd;
	--qiyam-display: 'Lilita One', 'Arial Rounded MT Bold', sans-serif;
	--qiyam-body: 'Nunito Sans', Arial, sans-serif;
	--qiyam-arabic: 'Noto Naskh Arabic', serif;
}

/* ---- Homepage ---------------------------------------------------------- */
body.home,
body.home .site,
body.home .site-content,
body.home .ast-primary-header-bar,
body.home .main-header-bar,
body.home .site-header {
	background-color: var(--qiyam-paper);
}
body.home .elementor-544 h1,
body.home .elementor-544 h2,
body.home .elementor-544 h3,
body.home .elementor-544 .elementor-heading-title,
body.home .elementor-544 .hfe-infocard-title,
body.home .elementor-544 .elementor-image-box-title {
	font-family: var(--qiyam-display) !important;
	font-style: normal !important;
	font-weight: 400 !important;
	letter-spacing: -0.025em;
}
body.home .elementor-544 p,
body.home .elementor-544 .hfe-infocard-text,
body.home .elementor-544 .elementor-image-box-description,
body.home .elementor-544 .elementor-button {
	font-family: var(--qiyam-body) !important;
}
body.home .elementor-544 .elementor-button {
	border-radius: 9px;
	font-weight: 700;
}

/* ---- Header: sticky, ivory, dark text, right-sized logo -------------- */
/* Astra's transparent header floats over the page with white text and a white logo filter. */
#masthead,
.ast-theme-transparent-header #masthead {
	position: sticky;
	top: 0;
	z-index: 999;
	background-color: var(--qiyam-paper);
	border-bottom: 1px solid var(--qiyam-line);
}
body.admin-bar #masthead {
	top: 32px;
}
#masthead .ast-primary-header-bar,
#masthead .main-header-bar,
#masthead .ast-mobile-header-wrap .ast-primary-header-bar {
	background-color: var(--qiyam-paper) !important;
}
#masthead .custom-logo {
	filter: none !important;
	width: 140px !important;
	max-width: 140px !important;
	height: auto !important;
}
#masthead .menu-link,
#masthead .main-header-menu > .menu-item > a,
#masthead .ast-header-search .astra-search-icon,
#masthead .ast-site-header-cart,
#masthead .ast-site-header-cart .ast-cart-menu-wrap,
#masthead .ast-mobile-menu-trigger-minimal,
#masthead .menu-toggle {
	color: var(--qiyam-ink) !important;
	font-family: var(--qiyam-body);
	font-weight: 700;
}
#masthead svg,
#masthead .ast-icon svg {
	fill: var(--qiyam-ink) !important;
}
#masthead .main-header-menu > .menu-item > a:hover,
#masthead .main-header-menu > .current-menu-item > a {
	color: #55524c !important;
}
@media (max-width: 921px) {
	#masthead .custom-logo { width: 110px !important; max-width: 110px !important; }
}
@media (max-width: 782px) {
	body.admin-bar #masthead { top: 46px; }
}
@media (max-width: 600px) {
	body.admin-bar #masthead { top: 0; }
}

/* ---- Homepage buttons: solid black --------------------------------- */
body.home .elementor-544 .elementor-button {
	background-color: var(--qiyam-ink) !important;
	border-color: var(--qiyam-ink) !important;
	color: #fff !important;
}
body.home .elementor-544 .elementor-button:hover {
	background-color: #393731 !important;
	border-color: #393731 !important;
}

/* The mat is only sold through the designer. */
.qiyam-designer-product form.cart,
.qiyam-designer-product .ast-sticky-add-to-cart {
	display: none !important;
}

/* ---- Shared mat artwork --------------------------------------------- */
.qd-mat-wrap {
	width: min(70%, 305px);
	filter: drop-shadow(8px 17px 13px #28312220);
	transition: opacity 0.24s, transform 0.3s;
}
.qd-mat {
	--mat: #b7a78e;
	position: relative;
	aspect-ratio: 2 / 3;
	background: var(--mat);
	isolation: isolate;
	overflow: hidden;
	transition: border-radius 0.35s;
}
.qd-mat img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
	filter: grayscale(1);
	mix-blend-mode: multiply;
}
.qd-tint {
	position: absolute;
	inset: 0;
	background: var(--mat);
	mix-blend-mode: color;
	pointer-events: none;
}
.qd-embroidery {
	position: absolute;
	bottom: 17%;
	left: 7%;
	right: 7%;
	z-index: 1;
	text-align: center;
	font-family: Georgia, var(--qiyam-arabic), serif;
	font-size: clamp(15px, 2.5vw, 27px);
	line-height: 1.25;
	overflow-wrap: anywhere;
	text-shadow: 0 1px 1px #0003;
}
.qd-embroidery[lang='ar'] {
	font-family: var(--qiyam-arabic);
	font-size: 34px;
}
.qd-mat.arch {
	border-radius: 50% 50% 1px 1px / 32% 32% 1px 1px;
}
.qd-fading {
	opacity: 0;
	transform: translateY(5px);
}

/* [qiyam_mat_art] */
.qiyam-art {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 580px;
	overflow: hidden;
	border-radius: 16px;
	background: var(--qiyam-panel);
	font-family: var(--qiyam-body);
	color: var(--qiyam-ink);
}
.qiyam-art-caption,
.qiyam-art-bottom {
	position: absolute;
	left: 32px;
	right: 32px;
	z-index: 2;
	display: flex;
	justify-content: space-between;
}
.qiyam-art-caption {
	top: 28px;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 1.6px;
}
.qiyam-art-bottom {
	bottom: 28px;
	align-items: end;
	font-size: 13px;
	line-height: 1.55;
	color: #625e57;
}
.qiyam-art-arabic {
	font-family: var(--qiyam-arabic);
	font-size: 40px;
}
.qiyam-art-mat {
	width: 52%;
	max-width: 310px;
	transform: rotate(-5deg);
}

/* ---- Designer dialog ------------------------------------------------- */
.qiyam-designer {
	width: 100vw;
	max-width: none;
	height: 100dvh;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: var(--qiyam-paper);
	color: var(--qiyam-ink);
	font-family: var(--qiyam-body);
}
.qiyam-designer::backdrop {
	background: #30372f80;
}
.qiyam-designer *,
.qiyam-designer *::before,
.qiyam-designer *::after {
	box-sizing: border-box;
}
.qiyam-designer button {
	font: inherit;
	color: inherit;
	cursor: pointer;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	-webkit-tap-highlight-color: transparent;
}
.qiyam-designer button:focus-visible,
.qiyam-designer input:focus-visible {
	outline: 2px solid #756b5b;
	outline-offset: 5px;
}
.qd-studio {
	min-height: 100%;
}
.qd-header {
	height: 105px;
	padding: 0 6%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid var(--qiyam-line);
}
.qd-logo {
	display: block;
	width: 150px;
	font-family: var(--qiyam-display);
	font-size: 38px;
	line-height: 1;
	color: var(--qiyam-ink);
	text-decoration: none;
}
.qd-logo img {
	display: block;
	width: 100%;
	height: auto;
}
.qiyam-designer .qd-close {
	width: 42px;
	height: 42px;
	padding: 0;
	border: 1px solid var(--qiyam-line);
	border-radius: 50%;
	background: transparent;
	font-size: 19px;
}
.qiyam-designer .qd-close:hover {
	background: #e9e3d9;
}
.qd-body {
	display: grid;
	grid-template-columns: 1fr 1fr;
	min-height: calc(100dvh - 105px);
}
.qd-preview-panel {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 610px;
	padding: 80px 30px 50px;
	background: var(--qiyam-panel);
}
.qd-preview-top {
	position: absolute;
	top: 30px;
	left: 30px;
	right: 30px;
	display: flex;
	justify-content: space-between;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 1px;
}
.qd-preview-note {
	max-width: 340px;
	margin: 32px 0 0;
	font-size: 12px;
	line-height: 1.5;
	text-align: center;
	color: #625e57;
}
.qd-controls {
	display: flex;
	flex-direction: column;
	padding: 35px clamp(26px, 5vw, 85px) 48px;
}
.qd-steps {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 65px;
}
.qiyam-designer .qd-step-dot {
	flex: 1;
	padding: 0;
	border: 0;
	background: none;
	text-align: left;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.6;
	color: #716b62;
}
.qd-step-dot::before {
	content: '';
	display: block;
	height: 3px;
	margin-bottom: 10px;
	background: #ded9d0;
}
.qiyam-designer .qd-step-dot.active {
	color: var(--qiyam-ink);
}
.qd-step-dot.active::before,
.qd-step-dot.done::before {
	background: var(--qiyam-ink);
}
.qiyam-designer .qd-step-dot:disabled {
	cursor: default;
}
.qd-content {
	flex: 1;
	animation: qd-enter 0.35s both;
}
.qd-step-count {
	margin-bottom: 20px;
	font-size: 11px;
	letter-spacing: 1.7px;
	color: var(--qiyam-muted);
}
.qd-content h2 {
	margin: 0 0 14px;
	font-family: var(--qiyam-display);
	font-size: clamp(31px, 3.2vw, 46px);
	font-weight: 400;
	line-height: 1.1;
	letter-spacing: -0.025em;
	color: var(--qiyam-ink);
}
.qd-step-description {
	margin: 0 0 35px;
	font-size: 15px;
	line-height: 1.6;
	color: var(--qiyam-muted);
}
.qd-options {
	display: grid;
	grid-template-columns: 1fr;
	gap: 8px;
}
.qiyam-designer .qd-option {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 54px;
	padding: 12px 16px;
	border: 1px solid var(--qiyam-line);
	border-radius: 8px;
	background: transparent;
	text-align: left;
	font-size: 14px;
	font-weight: 600;
	transition: background 0.2s, border-color 0.2s;
}
.qiyam-designer .qd-option:hover {
	background: #e9e3d9;
	border-color: #a49c8f;
}
.qiyam-designer .qd-option.selected {
	background: #e3ddd2;
	border-color: #696257;
}
.qd-option.selected::after {
	content: '✓';
	margin-left: auto;
}
.qd-swatch {
	flex-shrink: 0;
	width: 26px;
	height: 26px;
	border: 1px solid #0003;
	border-radius: 50%;
}
.qiyam-designer .qd-shape-option {
	gap: 18px;
}
.qd-shape-thumb {
	display: block;
	width: 28px;
	height: 42px;
	object-fit: cover;
	border-radius: 3px;
	background: #b7a78e;
	filter: sepia(0.25);
}
.qd-shape-thumb.arch {
	border-radius: 50% 50% 0 0 / 32% 32% 0 0;
}
.qd-language-sample {
	font-family: Georgia, var(--qiyam-arabic), serif;
	font-size: 26px;
}
.qd-field-label {
	display: block;
	margin-bottom: 12px;
	font-size: 14px;
}
.qiyam-designer #qd-name {
	width: 100%;
	padding: 19px;
	border: 1px solid #b0a797;
	border-radius: 8px;
	background: transparent;
	font: 24px Georgia, var(--qiyam-arabic), serif;
	color: var(--qiyam-ink);
}
.qiyam-designer #qd-name[dir='rtl'] {
	font-family: var(--qiyam-arabic);
}
.qd-field-help {
	margin-top: 10px;
	font-size: 12px;
	line-height: 1.6;
	color: var(--qiyam-muted);
}
.qd-error {
	min-height: 20px;
	font-size: 13px;
	color: #984b38;
}
.qd-review {
	margin: 20px 0 0;
}
.qd-review-row {
	display: flex;
	justify-content: space-between;
	gap: 20px;
	padding: 14px 0;
	border-bottom: 1px solid var(--qiyam-line);
	font-size: 14px;
}
.qd-review-row dt {
	color: var(--qiyam-muted);
}
.qd-review-row dd {
	max-width: 65%;
	margin: 0;
	text-align: right;
	overflow-wrap: anywhere;
}
.qd-review-info {
	margin-top: 22px;
	font-size: 12px;
	line-height: 1.6;
	color: var(--qiyam-muted);
}
.qd-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 48px;
	padding-top: 25px;
	border-top: 1px solid var(--qiyam-line);
}
.qiyam-designer .qd-back {
	padding: 12px 0;
	border: 0;
	background: none;
	font-size: 14px;
	font-weight: 700;
	white-space: nowrap;
}
.qiyam-designer .qd-back:disabled {
	visibility: hidden;
}
.qiyam-designer .qd-primary {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 42px;
	min-width: 180px;
	padding: 18px 24px;
	border: 1px solid var(--qiyam-ink);
	border-radius: 9px;
	background: var(--qiyam-ink);
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	transition: background 0.2s;
}
.qiyam-designer .qd-primary:hover {
	background: #393731;
	border-color: #393731;
}
.qiyam-designer .qd-primary:disabled {
	background: #918a7e;
	border-color: #918a7e;
	cursor: wait;
}
@keyframes qd-enter {
	from { opacity: 0; transform: translateX(14px); }
	to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 760px) {
	.qiyam-art { min-height: 450px; }
	.qiyam-art-mat { width: 51%; }
	.qiyam-art-caption, .qiyam-art-bottom { left: 22px; right: 22px; }
	.qiyam-art-caption { font-size: 9px; }
	.qd-header { height: 80px; padding: 0 5%; }
	.qd-logo { width: 100px; font-size: 30px; }
	.qd-body { grid-template-columns: 1fr; min-height: calc(100dvh - 80px); }
	.qd-preview-panel { min-height: 320px; padding: 45px 20px 20px; }
	.qd-preview-panel .qd-mat-wrap { width: 135px; }
	.qd-preview-top { top: 17px; left: 20px; right: 20px; font-size: 9px; }
	.qd-preview-note { margin-top: 16px; font-size: 10px; }
	.qd-controls { padding: 25px 24px 35px; }
	.qd-steps { margin-bottom: 29px; }
	.qiyam-designer .qd-step-dot { font-size: 10px; }
	.qd-step-count { margin-bottom: 12px; }
	.qd-content h2 { font-size: 32px; }
	.qd-step-description { margin-bottom: 22px; font-size: 14px; }
	.qd-options { gap: 7px; }
	.qiyam-designer .qd-option { min-height: 48px; padding: 10px 14px; }
	.qd-shape-thumb { width: 24px; height: 36px; }
	.qd-footer { margin-top: 28px; }
	.qd-embroidery { font-size: 16px; }
	.qd-embroidery[lang='ar'] { font-size: 20px; }
	.qiyam-art .qd-embroidery[lang='ar'] { font-size: 30px; }
	.qiyam-designer .qd-primary { min-width: 165px; padding: 16px 20px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
	.qiyam-designer *, .qd-mat-wrap, .qd-mat { animation: none !important; transition: none !important; }
}
