/* WM Frontend Product Editor — v1.2.0 */

#wmfpe-root {
	--wmfpe-accent: #5b5bd6;
	--wmfpe-accent-soft: #eef0fb;
	--wmfpe-ink: #1c1d29;
	--wmfpe-muted: #6e7086;
	--wmfpe-line: #e6e7ef;
	--wmfpe-field: #f5f6fa;
	--wmfpe-danger: #d64545;
	--wmfpe-ok: #1f9d61;
	position: fixed;
	bottom: 24px;
	z-index: 99999;
	direction: rtl;
	font-family: "Assistant", "Heebo", "Rubik", -apple-system, "Segoe UI", Arial, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	color: var(--wmfpe-ink);
}
#wmfpe-root.wmfpe-pos-left  { left: 24px; }
#wmfpe-root.wmfpe-pos-right { right: 24px; }

/* Lifted above a sticky add-to-cart bar (added by JS when one exists) */
#wmfpe-root.wmfpe-raised { bottom: 92px; }
#wmfpe-root.wmfpe-raised ~ .wmfpe-toast, .wmfpe-toast.wmfpe-t-raised { bottom: 168px; }

#wmfpe-root *, #wmfpe-root *::before, #wmfpe-root *::after { box-sizing: border-box; }

@supports (background: color-mix(in srgb, red 10%, white)) {
	#wmfpe-root { --wmfpe-accent-soft: color-mix(in srgb, var(--wmfpe-accent) 10%, #ffffff); }
}

/* ------------------------------------------------------------------ bubble */
.wmfpe-bubble {
	position: relative;
	width: 62px;
	height: 62px;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	color: #fff;
	background: var(--wmfpe-accent);
	background: linear-gradient(140deg, var(--wmfpe-accent), color-mix(in srgb, var(--wmfpe-accent) 70%, #1c1d29));
	box-shadow: 0 8px 24px rgba(30, 32, 80, .35), 0 2px 6px rgba(20, 20, 40, .18);
	box-shadow: 0 8px 24px color-mix(in srgb, var(--wmfpe-accent) 45%, transparent), 0 2px 6px rgba(20, 20, 40, .18);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s ease;
}
.wmfpe-bubble:hover { transform: scale(1.07); }
.wmfpe-bubble:focus-visible { outline: 3px solid var(--wmfpe-accent-soft); outline: 3px solid color-mix(in srgb, var(--wmfpe-accent) 40%, #fff); outline-offset: 3px; }

.wmfpe-bubble-icon {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), opacity .2s ease;
}
.wmfpe-bubble-icon svg { width: 26px; height: 26px; }
.wmfpe-bubble-icon--close { opacity: 0; transform: rotate(-90deg) scale(.4); }
#wmfpe-root.wmfpe-open .wmfpe-bubble-icon--open  { opacity: 0; transform: rotate(90deg) scale(.4); }
#wmfpe-root.wmfpe-open .wmfpe-bubble-icon--close { opacity: 1; transform: rotate(0) scale(1); }

.wmfpe-bubble-tip {
	position: absolute;
	bottom: 50%;
	transform: translateY(50%);
	white-space: nowrap;
	background: var(--wmfpe-ink);
	color: #fff;
	font-size: 13px;
	padding: 6px 12px;
	border-radius: 10px;
	opacity: 0;
	pointer-events: none;
	transition: opacity .18s ease, margin .18s ease;
}
.wmfpe-pos-left  .wmfpe-bubble-tip { left: calc(100% + 6px); }
.wmfpe-pos-right .wmfpe-bubble-tip { right: calc(100% + 6px); }
.wmfpe-bubble:hover .wmfpe-bubble-tip { opacity: 1; }
#wmfpe-root.wmfpe-open .wmfpe-bubble-tip { display: none; }

/* login mode: trigger sits in the site footer, no floating bubble */
#wmfpe-root.wmfpe-mode-login .wmfpe-bubble { display: none; }
#wmfpe-root.wmfpe-mode-login .wmfpe-panel { bottom: 24px; }
#wmfpe-root.wmfpe-mode-login .wmfpe-panel::after { display: none; }

.wmfpe-footer-bubble {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	float: left; /* RTL footer: sits at the inner (left) edge of the links/copyright block */
	width: 46px;
	height: 46px;
	border-radius: 13px;
	background: var(--wmfpe-accent, #5b5bd6);
	background: linear-gradient(140deg, var(--wmfpe-accent, #5b5bd6), color-mix(in srgb, var(--wmfpe-accent, #5b5bd6) 70%, #1c1d29));
	color: #fff !important;
	box-shadow: 0 5px 14px rgba(15, 16, 40, .38);
	margin: 6px 18px 6px 0;
	cursor: pointer;
	transition: transform .2s cubic-bezier(.34, 1.56, .64, 1), box-shadow .2s ease;
}
.wmfpe-footer-bubble:hover { transform: scale(1.07); color: #fff !important; }
.wmfpe-footer-bubble:focus-visible { outline: 3px solid rgba(255, 255, 255, .5); outline-offset: 2px; }
.wmfpe-footer-bubble svg { width: 21px; height: 21px; }
.wmfpe-footer-bubble-loose { float: none; margin: 8px; }

/* ------------------------------------------------------------------ panel */
.wmfpe-panel {
	position: absolute;
	bottom: calc(100% + 18px);
	width: min(430px, calc(100vw - 32px));
	height: min(76vh, 700px);
	max-height: min(76vh, 700px);
	background: #fff;
	border-radius: 22px;
	box-shadow: 0 24px 70px rgba(20, 22, 50, .28), 0 4px 16px rgba(20, 22, 50, .12);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transform-origin: bottom;
	animation: wmfpe-pop .28s cubic-bezier(.34, 1.4, .64, 1);
}
.wmfpe-pos-left  .wmfpe-panel { left: 0;  transform-origin: bottom left; }
.wmfpe-pos-right .wmfpe-panel { right: 0; transform-origin: bottom right; }

/* tail connecting the panel to the bubble */
.wmfpe-panel::after {
	content: "";
	position: absolute;
	bottom: -9px;
	width: 20px;
	height: 20px;
	background: #fff;
	transform: rotate(45deg);
	border-radius: 4px;
	box-shadow: 6px 6px 12px rgba(20, 22, 50, .06);
}
.wmfpe-pos-left  .wmfpe-panel::after { left: 22px; }
.wmfpe-pos-right .wmfpe-panel::after { right: 22px; }

@keyframes wmfpe-pop {
	from { opacity: 0; transform: translateY(14px) scale(.92); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
	.wmfpe-panel { animation: none; }
	.wmfpe-bubble, .wmfpe-bubble-icon { transition: none; }
}

.wmfpe-panel-inner { display: flex; flex-direction: column; overflow: hidden; height: 100%; max-height: inherit; }

/* header */
.wmfpe-head {
	flex: none;
	padding: 18px 22px 14px;
	background: linear-gradient(160deg, var(--wmfpe-accent-soft), #fff 75%);
	border-bottom: 1px solid var(--wmfpe-line);
}
.wmfpe-head h2 { margin: 0 0 2px; font-size: 19px; font-weight: 700; color: var(--wmfpe-ink); }
.wmfpe-head p  { margin: 0; font-size: 13px; color: var(--wmfpe-muted); }

/* body */
.wmfpe-body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	padding: 6px 22px 18px;
	overscroll-behavior: contain;
	overflow-anchor: none;
}
.wmfpe-body::-webkit-scrollbar { width: 8px; }
.wmfpe-body::-webkit-scrollbar-thumb { background: #d7d8e4; border-radius: 8px; }

/* restore point bar */
.wmfpe-restore-bar {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
	background: #fff8e6;
	border: 1px solid #f0e2b6;
	border-radius: 12px;
	padding: 9px 14px;
	margin: 12px 0 2px;
	font-size: 12.5px; font-weight: 600; color: #7a621f;
}
.wmfpe-restore-bar .wmfpe-btn { white-space: nowrap; font-size: 12.5px; }

/* sections */
.wmfpe-section { padding: 16px 0 4px; border-bottom: 1px solid var(--wmfpe-line); }
.wmfpe-section:last-child { border-bottom: 0; }
.wmfpe-section-title {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 700;
	margin: 0 0 12px;
	color: var(--wmfpe-ink);
}
.wmfpe-section-title svg { width: 17px; height: 17px; color: var(--wmfpe-accent); flex: none; }

/* fields */
.wmfpe-field-group { margin-bottom: 12px; }
.wmfpe-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: var(--wmfpe-ink); }
.wmfpe-label small { font-weight: 400; color: var(--wmfpe-muted); }

.wmfpe-input, .wmfpe-textarea, .wmfpe-select {
	width: 100%;
	min-height: 44px;
	border: 1.5px solid transparent;
	background: var(--wmfpe-field);
	border-radius: 12px;
	padding: 10px 14px;
	font: inherit;
	color: var(--wmfpe-ink);
	transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.wmfpe-input:focus, .wmfpe-textarea:focus, .wmfpe-select:focus {
	outline: none;
	background: #fff;
	border-color: var(--wmfpe-accent);
	box-shadow: 0 0 0 3px var(--wmfpe-accent-soft);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wmfpe-accent) 15%, transparent);
}
.wmfpe-textarea { resize: vertical; min-height: 84px; }
#wmfpe-root select.wmfpe-select {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	height: 44px;
	min-height: 44px;
	max-height: none;
	line-height: normal;
	padding: 0 14px;
	padding-left: 36px; /* room for the arrow (RTL) */
	font-size: 14px;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e7086' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: left 12px center;
	background-size: 13px;
	background-color: var(--wmfpe-field);
	cursor: pointer;
}
#wmfpe-root select.wmfpe-select:focus { background-color: #fff; }
.wmfpe-input.wmfpe-ltr { direction: ltr; text-align: left; }
.wmfpe-input.wmfpe-invalid { border-color: var(--wmfpe-danger); }

.wmfpe-row { display: flex; gap: 10px; }
.wmfpe-row > .wmfpe-field-group { flex: 1; min-width: 0; }

/* toggle switch */
.wmfpe-toggle { position: relative; display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; font-size: 13.5px; font-weight: 600; }
.wmfpe-toggle input { position: absolute; top: 0; right: 0; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.wmfpe-toggle .wmfpe-track {
	width: 40px; height: 23px; border-radius: 20px;
	background: #d3d4e0; position: relative; flex: none;
	transition: background .18s ease;
}
.wmfpe-toggle .wmfpe-track::after {
	content: ""; position: absolute; top: 3px; right: 3px;
	width: 17px; height: 17px; border-radius: 50%; background: #fff;
	box-shadow: 0 1px 3px rgba(0,0,0,.25);
	transition: transform .18s ease;
}
.wmfpe-toggle input:checked + .wmfpe-track { background: var(--wmfpe-accent); }
.wmfpe-toggle input:checked + .wmfpe-track::after { transform: translateX(-17px); }
.wmfpe-toggle input:focus-visible + .wmfpe-track { outline: 2px solid var(--wmfpe-accent); outline-offset: 2px; }

/* dropzones / images */
.wmfpe-dropzone {
	border: 2px dashed #ccd0e0;
	border-radius: 14px;
	background: var(--wmfpe-field);
	padding: 16px;
	text-align: center;
	color: var(--wmfpe-muted);
	font-size: 13px;
	cursor: pointer;
	transition: border-color .15s ease, background .15s ease;
}
.wmfpe-dropzone:hover, .wmfpe-dropzone.wmfpe-drag { border-color: var(--wmfpe-accent); background: var(--wmfpe-accent-soft); color: var(--wmfpe-accent); }
.wmfpe-dropzone input[type="file"] { display: none; }
.wmfpe-dropzone svg { width: 22px; height: 22px; display: block; margin: 0 auto 6px; }

.wmfpe-dropzone.wmfpe-dz-sm { padding: 10px 8px; font-size: 12px; border-radius: 11px; }
.wmfpe-dropzone.wmfpe-dz-sm svg { width: 17px; height: 17px; margin-bottom: 3px; }
.wmfpe-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.wmfpe-thumb {
	position: relative; width: 68px; height: 68px;
	border-radius: 12px; overflow: hidden;
	border: 1px solid var(--wmfpe-line);
	background: var(--wmfpe-field);
}
.wmfpe-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wmfpe-thumb.wmfpe-thumb-main { width: 96px; height: 96px; }
.wmfpe-thumb-x {
	position: absolute; top: 4px; left: 4px;
	width: 20px; height: 20px; border: 0; border-radius: 50%;
	background: rgba(20, 22, 50, .72); color: #fff;
	font-size: 12px; line-height: 1; cursor: pointer;
	display: flex; align-items: center; justify-content: center;
}
.wmfpe-thumb-x:hover { background: var(--wmfpe-danger); }
.wmfpe-thumb-loading { display: flex; align-items: center; justify-content: center; }

/* categories */
.wmfpe-cat-search { margin-bottom: 8px; }
.wmfpe-cat-list {
	max-height: 168px; overflow-y: auto;
	border: 1px solid var(--wmfpe-line); border-radius: 12px;
	padding: 8px 10px; background: #fff;
}
.wmfpe-cat-item { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13.5px; cursor: pointer; }
.wmfpe-cat-item input { width: 16px; height: 16px; accent-color: var(--wmfpe-accent); cursor: pointer; margin: 0; flex: none; }
.wmfpe-cat-item.wmfpe-depth-1 { padding-right: 18px; }
.wmfpe-cat-item.wmfpe-depth-2 { padding-right: 36px; }
.wmfpe-cat-item.wmfpe-depth-3 { padding-right: 54px; }
.wmfpe-cat-empty { color: var(--wmfpe-muted); font-size: 13px; padding: 4px 0; }

/* tags — chips */
.wmfpe-chips {
	display: flex; flex-wrap: wrap; gap: 6px;
	border: 1.5px solid transparent; background: var(--wmfpe-field);
	border-radius: 12px; padding: 8px 10px; cursor: text;
}
.wmfpe-chips:focus-within { background: #fff; border-color: var(--wmfpe-accent); }
.wmfpe-chip {
	display: inline-flex; align-items: center; gap: 5px;
	background: var(--wmfpe-accent-soft); color: var(--wmfpe-accent);
	border-radius: 8px; padding: 3px 9px; font-size: 13px; font-weight: 600;
}
.wmfpe-chip button { border: 0; background: none; color: inherit; cursor: pointer; font-size: 13px; padding: 0; line-height: 1; }
.wmfpe-chips input { border: 0; background: none; outline: none; font: inherit; flex: 1; min-width: 90px; padding: 3px 2px; }

/* attributes */
.wmfpe-attr-card {
	border: 1px solid var(--wmfpe-line); border-radius: 14px;
	padding: 12px 14px; margin-bottom: 10px; background: #fcfcfe;
}
.wmfpe-attr-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wmfpe-attr-titlebtn {
	flex: 1; min-width: 0;
	display: flex; align-items: center; gap: 8px;
	border: 0; background: none; padding: 2px 0;
	font: inherit; cursor: pointer; text-align: right; color: var(--wmfpe-ink);
}
.wmfpe-attr-titlebtn strong { font-size: 14px; }
.wmfpe-attr-count {
	font-size: 11.5px; font-weight: 700;
	background: var(--wmfpe-accent-soft); color: var(--wmfpe-accent);
	border-radius: 999px; padding: 2px 9px; flex: none;
}
.wmfpe-chev {
	flex: none; font-size: 13px; line-height: 1; color: var(--wmfpe-muted);
	transition: transform .18s ease; display: inline-block;
}
.wmfpe-attr-card.wmfpe-collapsed .wmfpe-chev { transform: rotate(-90deg); }
.wmfpe-attr-body { margin-top: 10px; }
.wmfpe-attr-card.wmfpe-collapsed .wmfpe-attr-body { display: none; }
.wmfpe-attr-card.wmfpe-collapsed { padding-top: 9px; padding-bottom: 9px; }
/* checkbox-dropdown for attribute values */
.wmfpe-msel { position: relative; margin-bottom: 10px; }
.wmfpe-msel-btn {
	width: 100%;
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
	border: 1.5px solid transparent;
	background: var(--wmfpe-field);
	border-radius: 12px;
	min-height: 42px;
	padding: 0 14px;
	font: inherit; font-size: 13.5px;
	color: var(--wmfpe-ink);
	cursor: pointer;
	text-align: right;
	direction: rtl;
	transition: border-color .15s ease, background .15s ease;
}
.wmfpe-msel-btn:hover { border-color: var(--wmfpe-line); }
.wmfpe-msel-open .wmfpe-msel-btn { background: #fff; border-color: var(--wmfpe-accent); }
.wmfpe-msel-txt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.wmfpe-msel-txt.wmfpe-msel-empty { color: var(--wmfpe-muted); font-weight: 400; }
.wmfpe-msel-open .wmfpe-msel-btn .wmfpe-chev { transform: rotate(180deg); }
.wmfpe-msel-pop {
	position: absolute;
	top: calc(100% + 6px);
	right: 0; left: 0;
	z-index: 60;
	background: #fff;
	border: 1px solid var(--wmfpe-line);
	border-radius: 12px;
	box-shadow: 0 12px 30px rgba(20, 22, 50, .16);
	display: none;
	flex-direction: column;
	overflow: hidden;
	direction: rtl;
}
.wmfpe-msel-open .wmfpe-msel-pop { display: flex; }
.wmfpe-msel-search {
	margin: 8px 8px 4px;
	width: calc(100% - 16px);
	min-height: 36px !important;
	padding: 0 12px !important;
	font-size: 13px !important;
	border-radius: 9px !important;
}
.wmfpe-msel-list { max-height: 200px; overflow-y: auto; padding: 4px 0 6px; }
.wmfpe-msel-list::-webkit-scrollbar { width: 7px; }
.wmfpe-msel-list::-webkit-scrollbar-thumb { background: #d7d8e4; border-radius: 8px; }
.wmfpe-msel-item {
	display: flex; align-items: center; gap: 9px;
	padding: 7px 14px;
	font-size: 13.5px;
	cursor: pointer;
	user-select: none;
}
.wmfpe-msel-item:hover { background: var(--wmfpe-accent-soft); }
.wmfpe-msel-item input {
	width: 16px; height: 16px; margin: 0; flex: none;
	accent-color: var(--wmfpe-accent);
	cursor: pointer;
}
.wmfpe-msel-item .wmfpe-cat-empty { padding: 8px 14px; }

.wmfpe-attr-terms {
	display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px;
	max-height: 148px; overflow-y: auto;
	padding: 2px;
}
.wmfpe-attr-terms::-webkit-scrollbar { width: 7px; }
.wmfpe-attr-terms::-webkit-scrollbar-thumb { background: #d7d8e4; border-radius: 8px; }
.wmfpe-term-pill {
	border: 1.5px solid var(--wmfpe-line); background: #fff;
	border-radius: 999px; padding: 3px 11px; font-size: 12.5px;
	min-width: 40px; text-align: center;
	cursor: pointer; user-select: none;
	transition: border-color .12s ease, background .12s ease, color .12s ease;
}
.wmfpe-term-pill:hover { border-color: var(--wmfpe-accent); }
.wmfpe-term-pill.wmfpe-on {
	background: var(--wmfpe-accent); border-color: var(--wmfpe-accent); color: #fff; font-weight: 600;
}
.wmfpe-attr-foot { display: block; }
.wmfpe-inline-add { display: flex; gap: 8px; margin-bottom: 10px; }
.wmfpe-inline-add .wmfpe-input { flex: 1; min-width: 0; padding: 0 12px; font-size: 13px; min-height: 40px; }
.wmfpe-inline-add .wmfpe-btn { flex: none; white-space: nowrap; min-height: 40px; }
.wmfpe-attr-varrow {
	border-top: 1px dashed var(--wmfpe-line);
	padding-top: 10px;
	display: flex; align-items: center;
}

/* variations — compact accordion */
.wmfpe-var-bulk {
	display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
	margin-bottom: 8px;
}
.wmfpe-var-bulk-count {
	flex: 1 0 100%;
	font-size: 13px; font-weight: 700; color: var(--wmfpe-muted);
	white-space: nowrap;
}
.wmfpe-var-bulk .wmfpe-btn {
	flex: 1 1 auto;
	white-space: nowrap;
	font-size: 12.5px;
	padding: 8px 10px;
	justify-content: center;
}
.wmfpe-var-row {
	border: 1px solid var(--wmfpe-line); border-radius: 12px;
	margin-bottom: 7px; background: #fff; overflow: hidden;
	transition: box-shadow .15s ease;
}
.wmfpe-var-row.wmfpe-open { box-shadow: 0 4px 14px rgba(20, 22, 50, .08); border-color: var(--wmfpe-accent); }
.wmfpe-var-rowhead { display: flex; align-items: center; gap: 4px; padding-left: 8px; }
.wmfpe-var-headbtn {
	flex: 1; min-width: 0;
	display: flex; align-items: flex-start; gap: 8px;
	border: 0; background: none; padding: 10px 12px;
	font: inherit; font-size: 13.5px; cursor: pointer; text-align: right; color: var(--wmfpe-ink);
}
.wmfpe-var-row.wmfpe-open .wmfpe-chev { transform: rotate(180deg); }
.wmfpe-var-headbtn .wmfpe-chev { margin-top: 6px; }
.wmfpe-var-num {
	flex: none;
	margin-top: 1px;
	width: 22px; height: 22px;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--wmfpe-accent-soft); color: var(--wmfpe-accent);
	border-radius: 8px; font-size: 11.5px; font-weight: 800;
}
.wmfpe-var-name {
	flex: 1; min-width: 0;
	display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
	overflow: hidden;
	text-align: right;
}
.wmfpe-var-vals {
	max-width: 100%; font-weight: 700; font-size: 13px;
	white-space: normal; line-height: 1.35;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
	overflow: hidden;
}
.wmfpe-var-meta {
	display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px;
	max-width: 100%;
}
.wmfpe-var-sub { font-size: 11px; font-weight: 400; color: var(--wmfpe-muted); }
.wmfpe-var-thumb {
	flex: none; width: 32px; height: 32px;
	border-radius: 8px; overflow: hidden;
	background: var(--wmfpe-field);
	border: 1px solid var(--wmfpe-line);
	display: inline-flex; align-items: center; justify-content: center;
}
.wmfpe-var-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wmfpe-var-thumb-empty svg { width: 16px; height: 16px; color: #b9bccd; }
.wmfpe-var-rowhead, .wmfpe-var-headbtn, .wmfpe-attr-titlebtn { direction: rtl; }
.wmfpe-var-idbar {
	background: var(--wmfpe-accent-soft);
	border-radius: 10px; padding: 8px 12px;
	font-size: 13px; margin-bottom: 12px;
}
.wmfpe-var-chip {
	flex: none; font-size: 11.5px; font-weight: 700;
	background: #e8f6ef; color: #1f9d61;
	border-radius: 999px; padding: 2px 9px;
	white-space: nowrap;
}
.wmfpe-var-chip.wmfpe-chip-missing { background: #fdecec; color: #b23434; }
.wmfpe-var-rowhead .wmfpe-mini-x { border: 0; background: none; color: var(--wmfpe-muted); cursor: pointer; font-size: 14px; flex: none; padding: 6px; }
.wmfpe-var-rowhead .wmfpe-mini-x:hover { color: var(--wmfpe-danger); }
.wmfpe-copy-imgs { width: 100%; margin-bottom: 10px; }
.wmfpe-copy-imgs:disabled { opacity: .45; cursor: not-allowed; }
.wmfpe-var-details {
	padding: 12px 12px 12px;
	border-top: 1px dashed var(--wmfpe-line);
	background: #fcfcfe;
}

.wmfpe-note {
	background: var(--wmfpe-accent-soft);
	border-radius: 12px; padding: 10px 14px;
	font-size: 13px; color: var(--wmfpe-ink); margin-bottom: 12px;
}

/* product type segmented control */
.wmfpe-seg {
	display: flex; gap: 4px;
	background: var(--wmfpe-field);
	border-radius: 13px; padding: 4px;
}
.wmfpe-seg-btn {
	flex: 1; border: 0; background: none; cursor: pointer;
	border-radius: 10px; padding: 10px 8px;
	font: inherit; font-weight: 700; font-size: 14px;
	color: var(--wmfpe-muted);
	transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.wmfpe-seg-btn.wmfpe-on {
	background: #fff; color: var(--wmfpe-accent);
	box-shadow: 0 2px 8px rgba(20, 22, 50, .12);
}
.wmfpe-warn { background: #fdecec; color: #8c2f2f; margin-top: 10px; }

/* buttons */
.wmfpe-btn {
	border: 0; border-radius: 12px; cursor: pointer;
	font: inherit; font-weight: 700; font-size: 14.5px;
	padding: 11px 20px;
	transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.wmfpe-btn:active { transform: scale(.98); }
.wmfpe-btn-primary {
	background: var(--wmfpe-accent); color: #fff; flex: 1;
	box-shadow: 0 6px 16px rgba(30, 32, 80, .25);
	box-shadow: 0 6px 16px color-mix(in srgb, var(--wmfpe-accent) 35%, transparent);
}
.wmfpe-btn-primary:hover { filter: brightness(1.07); }
.wmfpe-btn-primary:disabled { opacity: .6; cursor: wait; }
.wmfpe-btn-ghost { background: var(--wmfpe-field); color: var(--wmfpe-ink); }
.wmfpe-btn-ghost:hover { background: #ebecf3; }
.wmfpe-btn-small { padding: 7px 14px; font-size: 13px; border-radius: 10px; }

/* footer */
.wmfpe-foot {
	flex: none;
	padding: 14px 22px;
	border-top: 1px solid var(--wmfpe-line);
	display: flex; gap: 10px;
	background: #fff;
}

/* loading + spinner */
.wmfpe-loading {
	flex: 1;
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	gap: 12px; padding: 56px 20px; color: var(--wmfpe-muted); font-size: 14px;
}
.wmfpe-spinner {
	width: 30px; height: 30px; border-radius: 50%;
	border: 3px solid var(--wmfpe-line); border-top-color: var(--wmfpe-accent);
	animation: wmfpe-spin .7s linear infinite;
}
.wmfpe-spinner-sm { width: 18px; height: 18px; border-width: 2.5px; }
@keyframes wmfpe-spin { to { transform: rotate(360deg); } }

/* toast */
.wmfpe-toast {
	position: fixed; bottom: 104px; z-index: 100000;
	max-width: min(360px, calc(100vw - 40px));
	background: #1c1d29; color: #fff;
	font-family: "Assistant", "Heebo", "Rubik", -apple-system, "Segoe UI", Arial, sans-serif;
	border-radius: 14px; padding: 12px 18px;
	font-size: 14px; font-weight: 600;
	box-shadow: 0 12px 32px rgba(20, 22, 50, .3);
	animation: wmfpe-pop .25s ease;
	direction: rtl;
}
.wmfpe-toast.wmfpe-toast-ok { background: #1f9d61; }
.wmfpe-toast.wmfpe-toast-err { background: #d64545; }
#wmfpe-root.wmfpe-pos-left  .wmfpe-toast, .wmfpe-toast.wmfpe-t-left  { left: 24px; }
#wmfpe-root.wmfpe-pos-right .wmfpe-toast, .wmfpe-toast.wmfpe-t-right { right: 24px; }

/* mobile */
@media (max-width: 560px) {
	#wmfpe-root { bottom: 16px; }
	#wmfpe-root.wmfpe-raised { bottom: 84px; }
	#wmfpe-root.wmfpe-pos-left  { left: 16px; }
	#wmfpe-root.wmfpe-pos-right { right: 16px; }
	#wmfpe-root.wmfpe-raised .wmfpe-panel {
		bottom: 152px;
		height: calc(100dvh - 176px);
		max-height: calc(100dvh - 176px);
	}
	.wmfpe-panel {
		position: fixed;
		left: 12px !important; right: 12px !important;
		bottom: 92px;
		width: auto;
		height: calc(100dvh - 120px);
		max-height: calc(100dvh - 120px);
	}
	.wmfpe-panel::after { display: none; }
	.wmfpe-row { flex-direction: column; gap: 0; }
}
