/* WearMA Studio — black, white and sandy gold streetwear UI.
 * Everything is scoped to .wms-studio / .wms-design-page, so Astra and WooCommerce styles are untouched.
 * Breakpoints (kept in sync with studio.js): desktop ≥ 1200px · tablet 900–1199px · mobile < 900px.
 */
.wms-studio, .wms-design-page {
	--wms-accent: #cda77b;
	--wms-accent-soft: #f5ecdf;
	--wms-ink: #0d0d0d;
	--wms-ink-2: #2b2b2b;
	--wms-paper: #ffffff;
	--wms-muted: #6b6b6b;
	--wms-line: #e7e7e4;
	--wms-soft: #f5f5f3;
	--wms-danger: #9b1c1c;
	--wms-warn: #8a5a00;
	--wms-r-sm: 8px;
	--wms-r: 12px;
	--wms-r-lg: 18px;
	--wms-s1: 4px;
	--wms-s2: 8px;
	--wms-s3: 12px;
	--wms-s4: 16px;
	--wms-s5: 24px;
	--wms-s6: 32px;
	--wms-tap: 44px;
	--wms-side-w: 260px;
	--wms-lib-w: 360px;
	--wms-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
	--wms-font: inherit;
	color: var(--wms-ink);
	font-family: var(--wms-font);
	box-sizing: border-box;
	line-height: 1.45;
}
.wms-studio *, .wms-studio *::before, .wms-studio *::after { box-sizing: inherit; }
:where(.wms-studio) button, :where(.wms-studio) input { font-family: inherit; color: inherit; } /* :where() = zero specificity, component rules win */
.wms-studio [hidden] { display: none !important; }
.wms-studio :focus-visible { outline: 2px solid var(--wms-accent); outline-offset: 2px; }
.wms-loading { padding: 40px; text-align: center; color: var(--wms-muted); }

/* ------------------------------------------------------------------ grid */
.wms-grid3 {
	display: grid;
	grid-template-columns: var(--wms-side-w) minmax(0, 1fr) var(--wms-lib-w);
	gap: var(--wms-s5);
	align-items: start;
}
.wms-col { min-width: 0; }
.wms-side, .wms-lib {
	position: sticky; top: var(--wms-s4);
	max-height: calc(100vh - var(--wms-s6));
	overflow: auto; overscroll-behavior: contain;
	background: var(--wms-paper);
	border: 1px solid var(--wms-line); border-radius: var(--wms-r);
	padding: var(--wms-s4);
	scrollbar-width: thin;
}
.wms-h { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin: 0; color: var(--wms-muted); }
.wms-only-drawer { display: none !important; }
.wms-scroll-x { display: flex; gap: var(--wms-s2); overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.wms-scroll-x::-webkit-scrollbar { display: none; }

/* --------------------------------------------------------------- inputs */
.wms-input {
	width: 100%; min-height: 42px; padding: 9px 14px;
	border: 1px solid var(--wms-line); border-radius: 999px; background: var(--wms-soft);
	font: inherit; font-size: 14px; color: var(--wms-ink); margin: var(--wms-s3) 0;
}
.wms-input:focus { background: #fff; border-color: var(--wms-ink); outline: none; box-shadow: 0 0 0 3px var(--wms-accent-soft); }
.wms-icon-btn {
	display: inline-grid; place-items: center; width: var(--wms-tap); height: var(--wms-tap); flex: none;
	border: 1px solid var(--wms-line); border-radius: 50%; background: #fff; cursor: pointer; color: var(--wms-ink);
}
.wms-icon-btn:hover { border-color: var(--wms-ink); }
/* Theme buttons (Astra & co.) add padding/letter-spacing/uppercase to every <button>; icon buttons must stay round. */
.wms-studio .wms-icon-btn, .wms-studio .wms-lb__nav { padding: 0 !important; min-width: 44px; width: 44px; height: 44px; letter-spacing: 0 !important; text-transform: none !important; line-height: 1 !important; }
.wms-studio .wms-lb__nav { font-size: 28px !important; color: var(--wms-ink); }
.wms-studio .wms-lb__x svg { width: 20px; height: 20px; }
.wms-icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.wms-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: var(--wms-s2);
	min-height: var(--wms-tap); padding: 10px 20px;
	border: 1px solid var(--wms-ink); border-radius: 999px; background: #fff; color: var(--wms-ink);
	font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.wms-btn:hover { background: var(--wms-soft); }
.wms-btn--primary { background: var(--wms-ink); color: #fff; }
.wms-btn--primary:hover { background: var(--wms-accent); border-color: var(--wms-accent); color: #fff; }
.wms-btn:disabled { opacity: .4; cursor: not-allowed; }
.wms-link { background: none; border: 0; padding: 6px 0; color: var(--wms-muted); text-decoration: underline; cursor: pointer; font-size: 13px; justify-self: start; }
.wms-hint { color: var(--wms-muted); font-size: 13px; margin: 0; }
.wms-note { font-size: 12px; color: var(--wms-muted); margin: var(--wms-s2) 0 0; }
.wms-empty { color: var(--wms-muted); font-size: 14px; grid-column: 1 / -1; margin: var(--wms-s3) 0; }

/* -------------------------------------------------------- left: tree */
.wms-side__head { display: flex; align-items: center; justify-content: space-between; gap: var(--wms-s2); }
.wms-tree { display: flex; flex-direction: column; gap: 2px; }
.wms-node {
	display: flex; align-items: center; justify-content: space-between; gap: var(--wms-s2);
	width: 100%; min-height: 40px; padding: 8px 12px; border: 0; border-radius: var(--wms-r-sm);
	background: transparent; font-size: 14px; text-align: start; cursor: pointer;
}
.wms-node small { color: var(--wms-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.wms-node:hover { background: var(--wms-soft); }
.wms-node.is-on { background: var(--wms-ink); color: #fff; }
.wms-node.is-on small { color: #bdbdbd; }
.wms-node--sub { padding-inline-start: 26px; font-size: 13.5px; min-height: 38px; }
.wms-node--custom { margin-top: var(--wms-s3); border: 1px dashed var(--wms-line); color: var(--wms-accent); font-weight: 600; }
.wms-node__n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wms-branch__row { display: flex; align-items: center; gap: 2px; }
.wms-branch__row .wms-node { flex: 1; min-width: 0; }
.wms-exp { width: 36px; height: 36px; border: 0; background: transparent; }
.wms-exp svg, .wms-chev svg { transition: transform .15s; }
.wms-exp[aria-expanded="true"] svg, .wms-group__t[aria-expanded="true"] .wms-chev svg { transform: rotate(90deg); }
[dir="rtl"] .wms-exp svg, [dir="rtl"] .wms-chev svg { transform: scaleX(-1); }
[dir="rtl"] .wms-exp[aria-expanded="true"] svg, [dir="rtl"] .wms-group__t[aria-expanded="true"] .wms-chev svg { transform: rotate(90deg); }
.wms-group { margin-top: var(--wms-s3); border-top: 1px solid var(--wms-line); padding-top: var(--wms-s2); }
.wms-group__t { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 40px; padding: 8px 12px; border: 0; background: none; cursor: pointer; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--wms-muted); }

/* --------------------------------------------------------------- center */
.wms-topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--wms-s3); margin-bottom: var(--wms-s4); }
.wms-brand { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.wms-brand strong { font-size: 20px; letter-spacing: .01em; }
.wms-brand span { color: var(--wms-accent); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wms-pill { display: none; align-items: center; gap: 6px; min-height: 40px; padding: 8px 14px; border: 1px solid var(--wms-line); border-radius: 999px; background: #fff; font-size: 14px; font-weight: 600; cursor: pointer; }
.wms-pill:hover { border-color: var(--wms-ink); }

.wms-product { display: grid; gap: var(--wms-s5); grid-template-columns: minmax(0, 1fr); }
.wms-viewer { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: var(--wms-s3); align-items: start; }
.wms-rail { display: flex; flex-direction: column; gap: var(--wms-s2); }
.wms-rail__b { display: grid; gap: 4px; justify-items: center; padding: 4px; border: 1px solid var(--wms-line); border-radius: var(--wms-r-sm); background: #fff; cursor: pointer; }
.wms-rail__b canvas { width: 100%; height: auto; aspect-ratio: 1; border-radius: 6px; display: block; }
.wms-rail__b.is-on { border-color: var(--wms-ink); box-shadow: 0 0 0 1px var(--wms-ink); }
.wms-rail__l { font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.wms-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--wms-accent); display: inline-block; }
.wms-stage { background: var(--wms-soft); border-radius: var(--wms-r-lg); padding: var(--wms-s3); }
.wms-canvas { display: block; width: 100%; max-width: min(72vh, 720px); margin-inline: auto; height: auto; aspect-ratio: 1 / 1; border-radius: var(--wms-r); background: #f4f4f2; }

.wms-info { display: grid; gap: var(--wms-s4); align-content: start; }
.wms-title { font-size: 26px; line-height: 1.2; margin: 0; font-weight: 800; letter-spacing: -.01em; }
.wms-sub { margin: -8px 0 0; color: var(--wms-muted); font-size: 14px; }
.wms-desc { margin: 0; color: var(--wms-ink-2); font-size: 15px; }
.wms-price { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; min-height: 1.3em; transition: opacity .15s; }
.wms-price.is-loading { opacity: .45; }
.wms-field { display: grid; gap: var(--wms-s2); }
.wms-field__l { font-size: 13px; font-weight: 700; }
.wms-field__v { font-weight: 400; color: var(--wms-muted); }

.wms-garments { gap: var(--wms-s3); }
.wms-gcard {
	flex: 0 0 auto; display: grid; justify-items: center; gap: 6px; width: 132px; padding: var(--wms-s3) var(--wms-s2);
	border: 1px solid var(--wms-line); border-radius: var(--wms-r); background: #fff; cursor: pointer; text-align: center;
}
.wms-gcard img, .wms-gcard__ic { width: 72px; height: 72px; object-fit: contain; border-radius: var(--wms-r-sm); }
.wms-gcard__n { font-size: 14px; font-weight: 600; line-height: 1.2; }
.wms-gcard__p { font-size: 12px; color: var(--wms-muted); }
.wms-gcard:hover { border-color: var(--wms-ink-2); }
.wms-gcard.is-on { border-color: var(--wms-ink); box-shadow: 0 0 0 1px var(--wms-ink); position: relative; }
.wms-gcard.is-on::after { content: ""; position: absolute; top: 8px; inset-inline-end: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--wms-accent); }

.wms-swatches { gap: 10px; padding: 3px 2px 5px; }
.wms-sw { flex: none; display: grid; place-items: center; width: var(--wms-tap); height: var(--wms-tap); padding: 0; border-radius: 50%; border: 2px solid transparent; background: none; cursor: pointer; }
.wms-sw__c { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(0,0,0,.16); }
.wms-sw.is-on { border-color: var(--wms-ink); }
.wms-sw.is-out .wms-sw__c { opacity: .35; background-image: linear-gradient(135deg, transparent 46%, #888 47%, #888 53%, transparent 54%) !important; }
.wms-sizes { display: flex; flex-wrap: wrap; gap: var(--wms-s2); }
.wms-size {
	min-width: 52px; min-height: var(--wms-tap); padding: 8px 14px; border: 1px solid var(--wms-line); border-radius: var(--wms-r-sm);
	background: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
}
.wms-size:hover { border-color: var(--wms-ink); }
.wms-size.is-on { background: var(--wms-ink); color: #fff; border-color: var(--wms-ink); }
.wms-size:disabled { color: #b0b0b0; background: var(--wms-soft); cursor: not-allowed; text-decoration: line-through; }

.wms-details { border: 1px solid var(--wms-line); border-radius: var(--wms-r); padding: 0 var(--wms-s4); }
.wms-details summary { min-height: var(--wms-tap); display: flex; align-items: center; cursor: pointer; font-size: 14px; font-weight: 600; }
.wms-sliders { display: grid; gap: var(--wms-s2); padding-bottom: var(--wms-s3); }
.wms-slider { display: grid; grid-template-columns: 140px 1fr; align-items: center; gap: 10px; font-size: 13px; }
.wms-slider input { accent-color: var(--wms-accent); width: 100%; min-height: 28px; }

.wms-buy { display: flex; flex-wrap: nowrap; align-items: center; gap: var(--wms-s3); padding-top: var(--wms-s4); border-top: 1px solid var(--wms-line); }
.wms-qty { display: inline-flex; align-items: center; border: 1px solid var(--wms-line); border-radius: 999px; }
.wms-qty__b { width: var(--wms-tap); height: var(--wms-tap); border: 0; background: none; font-size: 20px; cursor: pointer; border-radius: 999px; }
.wms-qty__b:hover { background: var(--wms-soft); }
.wms-qty__in { width: 40px; height: var(--wms-tap); border: 0; text-align: center; font: inherit; font-weight: 600; background: transparent; -moz-appearance: textfield; appearance: textfield; }
.wms-qty__in::-webkit-outer-spin-button, .wms-qty__in::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.wms-add { flex: 1 1 auto; min-width: 0; min-height: 50px; font-size: 16px; }
.wms-favbtn { width: 50px; height: 50px; }
.wms-favbtn.is-on, .wms-fav.is-on { color: var(--wms-accent); }
.wms-warn { color: var(--wms-warn); font-size: 13px; }
.wms-warn:empty { display: none; }
.wms-cod { display: flex; align-items: center; gap: 6px; color: var(--wms-accent); font-size: 13px; font-weight: 600; margin: 0; }

.wms-related { margin-top: var(--wms-s6); }
.wms-related .wms-h { margin-bottom: var(--wms-s3); }
.wms-related__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--wms-s3); }

/* -------------------------------------------------------- right: library */
.wms-tabs { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--wms-soft); border-radius: 999px; padding: 4px; }
.wms-tab { min-height: 38px; border: 0; background: none; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--wms-muted); cursor: pointer; padding: 6px 4px; }
.wms-tab.is-on { background: #fff; color: var(--wms-ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.wms-chips { margin-bottom: var(--wms-s3); }
.wms-chip { flex: none; min-height: 36px; padding: 6px 14px; border: 1px solid var(--wms-line); border-radius: 999px; background: #fff; font-size: 13px; cursor: pointer; white-space: nowrap; }
.wms-chip:hover { border-color: var(--wms-ink); }
.wms-chip.is-on { background: var(--wms-ink); border-color: var(--wms-ink); color: #fff; }
.wms-dgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--wms-s3); }
.wms-dtile { position: relative; }
.wms-dtile__b { display: block; width: 100%; padding: 6px; border: 1px solid var(--wms-line); border-radius: var(--wms-r); background: #fff; cursor: pointer; text-align: start; position: relative; }
.wms-dtile__b:hover { border-color: var(--wms-ink-2); }
.wms-dtile__b img, .wms-ph { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; background: var(--wms-soft); border-radius: var(--wms-r-sm); }
.wms-dtile__t { display: block; font-size: 12.5px; margin-top: 6px; padding: 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wms-dtile__sel { position: absolute; top: 12px; inset-inline-start: 12px; width: 24px; height: 24px; border-radius: 50%; display: none; place-items: center; background: var(--wms-accent); color: #fff; }
.wms-dtile.is-selected .wms-dtile__b { border-color: var(--wms-accent); box-shadow: 0 0 0 2px var(--wms-accent); }
.wms-dtile.is-selected .wms-dtile__sel { display: grid; }
.wms-fav, .wms-zoom { position: absolute; inset-inline-end: 10px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.94); box-shadow: 0 1px 3px rgba(0,0,0,.12); cursor: pointer; display: grid; place-items: center; color: var(--wms-ink); }
.wms-fav { top: 10px; }
.wms-zoom { top: 50px; }
.wms-fav svg { width: 18px; height: 18px; }
.wms-more { width: 100%; margin-top: var(--wms-s3); }
.wms-upload { display: grid; gap: var(--wms-s3); padding: var(--wms-s5) var(--wms-s4); margin-top: var(--wms-s3); border: 1.5px dashed var(--wms-line); border-radius: var(--wms-r); text-align: center; justify-items: center; }
.wms-file { position: absolute; width: 1px; height: 1px; opacity: 0; }
.wms-file:focus-visible + * , .wms-upload label:focus-within { outline: 2px solid var(--wms-accent); }
.wms-sheet__head { align-items: center; justify-content: space-between; gap: var(--wms-s2); margin-bottom: var(--wms-s3); position: relative; }
.wms-sheet__grip { position: absolute; top: -10px; left: 50%; width: 40px; height: 4px; border-radius: 2px; background: #d4d4d4; transform: translateX(-50%); }

/* ------------------------------------------------------------- lightbox */
.wms-lb { position: fixed; inset: 0; z-index: 100000; background: rgba(10,10,10,.6); display: grid; place-items: center; padding: var(--wms-s4); }
.wms-lb__card { position: relative; width: min(880px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #fff; border-radius: var(--wms-r-lg); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.wms-lb__art { background: var(--wms-soft); padding: var(--wms-s5); display: grid; place-items: center; }
.wms-lb__img { width: 100%; height: auto; max-height: 70vh; object-fit: contain; }
.wms-lb__body { padding: var(--wms-s6) var(--wms-s5); display: grid; align-content: center; gap: var(--wms-s3); }
.wms-lb__t { margin: 0; font-size: 22px; }
.wms-lb__m { margin: 0; color: var(--wms-muted); font-size: 14px; }
.wms-lb__actions { display: flex; flex-wrap: wrap; gap: var(--wms-s2); }
.wms-lb__x { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 1; }
.wms-lb { overscroll-behavior: contain; }
.wms-lb__card { overscroll-behavior: contain; }
.wms-lb__art { position: relative; touch-action: pan-y; user-select: none; }
.wms-lb__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.92); box-shadow: 0 2px 10px rgba(0,0,0,.18); font-size: 28px; line-height: 1; display: grid; place-items: center; }
.wms-lb__nav[disabled] { opacity: .35; cursor: default; }
.wms-lb__nav[hidden] { display: none; }
.wms-lb__prev { inset-inline-start: 10px; }
.wms-lb__next { inset-inline-end: 10px; }
[dir="rtl"] .wms-lb__nav, .wms-studio[dir="rtl"] .wms-lb__nav { transform: translateY(-50%) scaleX(-1); }
.wms-lb__n { margin: 0; font-size: 13px; color: var(--wms-muted); font-variant-numeric: tabular-nums; }
html.wms-lb-open, html.wms-lb-open body { overflow: hidden; }

/* ------------------------------------------------------- overlays, toast */
.wms-scrim { position: fixed; inset: 0; background: rgba(10,10,10,.45); z-index: 99990; }
.wms-mbar { display: none; }
.wms-toast { position: fixed; bottom: 20px; left: 50%; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--wms-ink); color: #fff; padding: 12px 18px; border-radius: var(--wms-r-sm); z-index: 100001; transition: .2s; max-width: calc(100vw - 32px); font-size: 14px; }
.wms-toast.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.wms-toast.is-err { background: var(--wms-danger); }
.wms-toast a { color: #fff; font-weight: 700; }

/* ------------------------------------- product: preview + info side by side when the center is wide */
.wms-center { container-type: inline-size; container-name: wms-center; }
@container wms-center (min-width: 980px) {
	.wms-product { grid-template-columns: minmax(0, 1.12fr) minmax(300px, 1fr); align-items: start; }
	.wms-viewer { position: sticky; top: var(--wms-s4); }
	.wms-related__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1200px) and (max-width: 1499px) {
	.wms-studio { --wms-side-w: 230px; --wms-lib-w: 330px; }
}

/* ------------------------------------------------- tablet: left sidebar becomes a drawer */
@media (max-width: 1199px) {
	.wms-grid3 { grid-template-columns: minmax(0, 1fr) 300px; gap: var(--wms-s4); }
	.wms-side {
		position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 99995; width: min(320px, 86vw);
		max-height: none; border-radius: 0; border: 0; box-shadow: var(--wms-shadow);
		transform: translateX(-105%); transition: transform .22s ease; visibility: hidden;
	}
	[dir="rtl"] .wms-side, [dir="rtl"].wms-studio .wms-side { transform: translateX(105%); }
	.wms-side.is-open { transform: none !important; visibility: visible; }
	.wms-side .wms-only-drawer { display: inline-grid !important; }
	.wms-open-side { display: inline-flex; }
	.wms-related__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ------------------------------------------------- mobile: single column + bottom sheet */
@media (max-width: 899px) {
	.wms-grid3 { grid-template-columns: minmax(0, 1fr); }
	.wms-studio { padding-bottom: 84px; }
	.wms-lib {
		position: fixed; inset-inline: 0; bottom: 0; top: auto; z-index: 99995;
		max-height: 82vh; border-radius: var(--wms-r-lg) var(--wms-r-lg) 0 0; border: 0; box-shadow: 0 -10px 30px rgba(0,0,0,.18);
		transform: translateY(105%); transition: transform .25s ease; visibility: hidden; padding-top: var(--wms-s5);
	}
	.wms-lib.is-open { transform: none; visibility: visible; }
	.wms-lib .wms-only-drawer { display: flex !important; }
	.wms-open-lib { display: inline-flex; }
	.wms-brand span { display: none; }
	.wms-viewer { grid-template-columns: minmax(0, 1fr); }
	.wms-rail { flex-direction: row; order: 2; }
	.wms-rail__b { width: 76px; }
	.wms-stage { padding: var(--wms-s2); }
	.wms-title { font-size: 22px; }
	.wms-dgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.wms-related__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.wms-slider { grid-template-columns: 1fr; gap: 2px; }
	.wms-buy { flex-wrap: wrap; }
	.wms-buy .wms-add { flex-basis: 100%; order: 3; }
	.wms-mbar {
		display: flex; align-items: center; gap: var(--wms-s2); position: fixed; inset-inline: 0; bottom: 0; z-index: 99980;
		padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--wms-line); box-shadow: 0 -4px 16px rgba(0,0,0,.06);
	}
	.wms-mbar .wms-btn { padding: 10px 14px; flex: none; }
	.wms-mbar .wms-btn--primary { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
	.wms-mbar__price { display: grid; min-width: 0; line-height: 1.15; font-variant-numeric: tabular-nums; }
	.wms-mbar__price strong { font-size: 15px; white-space: nowrap; }
	.wms-mbar__from { font-size: 11px; color: var(--wms-muted); white-space: nowrap; }
	.wms-lb__card { grid-template-columns: 1fr; max-height: calc(100dvh - 24px); }
	.wms-lb { padding: 12px; }
	.wms-lb__img { max-height: 52vh; }
	.wms-lb__body { padding: var(--wms-s5) var(--wms-s4); }
	.wms-toast { bottom: 92px; }
}
@media (max-width: 420px) {
	.wms-dgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.wms-gcard { width: 116px; }
	.wms-mbar__t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.wms-mbar__lib { width: var(--wms-tap); padding: 0 !important; }
}
@media (prefers-reduced-motion: reduce) {
	.wms-side, .wms-lib, .wms-toast, .wms-exp svg { transition: none !important; }
}

/* --------------------------------------------------------- public design page */
.wms-design-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; margin: 20px 0; }
.wms-design-page__art { background: var(--wms-soft); border-radius: var(--wms-r); padding: 24px; }
.wms-design-page__art img { display: block; width: 100%; height: auto; }
.wms-design-page__ar { font-size: 20px; margin: 0 0 6px; }
.wms-design-page__ref { color: var(--wms-muted); font-size: 13px; }
.wms-design-page__ctas { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.wms-design-page .wms-btn { background: var(--wms-ink); color: #fff; border-color: var(--wms-ink); }
.wms-design-page .wms-btn:hover { background: var(--wms-accent); border-color: var(--wms-accent); }
.wms-design-page .wms-note { font-size: 12px; color: var(--wms-muted); }
@media (max-width: 760px) { .wms-design-page { grid-template-columns: 1fr; } }

/* Studio interaction stays inside the existing component and design tokens. */
#wearma-studio .wms-canvas { touch-action: pan-y; cursor: grab; }
#wearma-studio .wms-canvas:active { cursor: grabbing; }
#wearma-studio .wms-canvas:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
#wearma-studio .wms-save-status { min-block-size: 1.5em; font-size: .875em; }

/* Existing component layout; controls stay scoped to Studio. */
.wms-studio .wms-choice { inline-size:100%; min-block-size:48px; border:1px solid var(--wms-line); border-radius:var(--wms-r-sm); background:var(--wms-paper); color:var(--wms-ink); font:inherit; padding-block:.65rem; padding-inline:.8rem 2rem; }
.wms-studio .wms-choice:focus-visible { outline:2px solid var(--wms-accent); outline-offset:2px; }
.wms-studio .wms-draft-recovery { padding-block:.5rem; }
.wms-studio .wms-gcard__n { white-space:normal; overflow-wrap:anywhere; }
@media(min-width:1200px) {
	.wms-studio .wms-product { grid-template-columns:minmax(0,1.1fr) minmax(260px,.9fr); align-items:start; }
	.wms-studio .wms-viewer { grid-template-columns:56px minmax(0,1fr); gap:8px; position:sticky; top:24px; }
	.wms-studio .wms-garments { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); overflow:visible; }
	.wms-studio .wms-gcard { inline-size:100%; min-inline-size:0; }
	.wms-studio .wms-title { font-size:22px; }
}
@media(max-width:599px) { .wms-studio .wms-garments { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); overflow:visible; } .wms-studio .wms-gcard { inline-size:100%; min-inline-size:0; } }

/* WEAR YOUR IDENTITY — no remote fonts, images or global theme overrides. */
#wearma-studio { --wms-accent:#cda77b !important; --wms-accent-soft:#f5ecdf; --wms-line:#ded8cf; --wms-font:system-ui,-apple-system,"Segoe UI",sans-serif; }
#wearma-studio .wms-topbar { background:#111; color:#fff; padding:20px; border-radius:14px; margin-block-end:24px; }
#wearma-studio .wms-brand strong { font-size:26px; letter-spacing:.1em; color:#fff; }
#wearma-studio .wms-brand { display:flex; flex-direction:column; align-items:flex-start; gap:2px; direction:ltr; }
#wearma-studio .wms-brand span { display:block; color:#dec1a0; font-size:10px; letter-spacing:.18em; line-height:1.8; white-space:normal; overflow:visible; }
#wearma-studio .wms-topbar .wms-pill { background:#111; color:#fff; border-color:#8c7154; }
#wearma-studio .wms-title { color:#111; font-weight:800; letter-spacing:-.025em; }
#wearma-studio .wms-stage { background:linear-gradient(145deg,#fff,#f4f0e9); border:1px solid var(--wms-line); border-radius:18px; }
#wearma-studio .wms-swatches,#wearma-studio .wms-sizes { display:flex; flex-wrap:wrap; gap:10px; overflow:visible; padding:4px; }
#wearma-studio .wms-swatch,#wearma-studio .wms-size { position:relative; display:inline-flex; align-items:center; justify-content:center; inline-size:44px; min-inline-size:44px; block-size:44px; min-block-size:44px; padding:4px; border:1px solid #777; border-radius:10px; background:#fff; color:#111; box-shadow:none; font:inherit; font-size:13px; cursor:pointer; }
#wearma-studio .wms-swatch.is-on { outline:3px solid #b38b5b; outline-offset:2px; }
#wearma-studio .wms-swatch__check { display:none; background:#111; color:#fff; border-radius:50%; padding:3px; line-height:0; }
#wearma-studio .wms-swatch.is-on .wms-swatch__check { display:inline-block; }
#wearma-studio .wms-swatch--named { inline-size:auto; max-inline-size:100%; padding-inline:10px; gap:5px; overflow-wrap:anywhere; }
#wearma-studio .wms-size.is-on { background:#111; color:#fff; border:2px solid #b38b5b; box-shadow:0 0 0 1px #b38b5b; }
#wearma-studio .wms-size:disabled { opacity:.45; cursor:not-allowed; text-decoration:line-through; }
#wearma-studio button:focus-visible { outline:3px solid #80603d; outline-offset:4px; }
#wearma-studio .wms-btn--primary { background:#d5b087; color:#111; border-color:#b38b5b; font-weight:750; }
#wearma-studio .wms-btn--primary:hover { background:#e5c9a8; color:#111; }
#wearma-studio .wms-products-section { margin-block-start:24px; padding-block:20px; border-block:1px solid var(--wms-line); }
#wearma-studio .wms-products-section .wms-garments { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; overflow:visible; }
#wearma-studio .wms-gcard { inline-size:100%; min-inline-size:0; border-radius:12px; text-align:start; }
#wearma-studio .wms-gcard img { inline-size:100%; block-size:128px; object-fit:contain; background:#f5f2ec; border-radius:8px; }
#wearma-studio .wms-gcard.is-on { border-color:#b38b5b; box-shadow:0 0 0 2px #b38b5b; }
#wearma-studio .wms-description-section { padding-block:20px; }
#wearma-studio .wms-desc { margin:0; max-inline-size:75ch; white-space:pre-line; line-height:1.75; color:#45413d; }
@media(max-width:767px) {
 #wearma-studio .wms-products-section .wms-garments { grid-template-columns:repeat(2,minmax(0,1fr)); }
 #wearma-studio .wms-topbar { padding:12px; gap:8px; flex-wrap:wrap; }
 #wearma-studio .wms-brand { flex:1; min-inline-size:140px; }
 #wearma-studio .wms-brand strong { font-size:21px; }
 #wearma-studio .wms-brand span { font-size:8px; }
}

/* WEARMA original logo: readable on a warm light panel against the dark Studio UI. */
#wearma-studio .wms-brand-logo { align-items: center; justify-content: center; flex: 0 1 220px; max-width: 220px; min-width: 105px; padding: 3px 9px; border-radius: 12px; background: #f8f5ef; border: 1px solid rgba(214,166,117,.65); }
#wearma-studio .wms-brand-image { display: block; width: 100%; height: 53px; object-fit: contain; }
#wearma-studio .wms-brand-fallback { display: none; color: #151515; font-size: 12px; font-weight: 800; letter-spacing: .04em; }
#wearma-studio .wms-brand-image:not([src]), #wearma-studio .wms-brand-image[src=""] { display: none; }
#wearma-studio .wms-brand-image:not([src]) + .wms-brand-fallback, #wearma-studio .wms-brand-image[src=""] + .wms-brand-fallback { display: block; }
@media (max-width: 540px) { #wearma-studio .wms-brand-logo { flex-basis: 145px; padding: 2px 5px; } #wearma-studio .wms-brand-image { height: 44px; } }

/* WearMA Studio RC4 — spacious editor, compact responsive controls and scroll catalogues */
#wearma-studio { border: 1px solid #b98b4e; border-radius: 22px; padding: clamp(10px, 1.8vw, 24px); box-shadow: 0 0 0 1px rgba(217,170,98,.3), 0 16px 50px rgba(105,67,21,.18), inset 0 0 22px rgba(218,173,100,.07); }
#wearma-studio .wms-grid3 { grid-template-columns: minmax(170px, 210px) minmax(0, 1fr) minmax(210px, 260px); gap: clamp(8px,1.2vw,18px); }
#wearma-studio .wms-product { grid-template-columns: minmax(0, 1fr); }
#wearma-studio .wms-viewer { position: static; grid-template-columns: 50px minmax(0, 1fr); }
#wearma-studio .wms-stage { position: relative; min-width: 0; padding: clamp(8px, 1vw, 16px); }
#wearma-studio .wms-canvas { width: 100%; max-width: 100%; height: auto; display: block; aspect-ratio: 1; }
#wearma-studio .wms-preview-open { position: absolute; z-index: 2; inset-inline-end: 16px; inset-block-start: 16px; padding: 8px 12px; border: 1px solid #b98b4e; border-radius: 12px; color: #151515; background: rgba(255,250,241,.94); font-size: 12px; cursor: pointer; }
#wearma-studio .wms-info { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 18px; }
#wearma-studio .wms-info > .wms-field { min-width: 0; }
#wearma-studio .wms-swatches { display: flex; flex-direction: column; align-items: flex-start; flex-wrap: nowrap; gap: 6px; max-height: 250px; overflow-y: auto; overflow-x: hidden; }
#wearma-studio .wms-swatch { width: 29px; min-width: 29px; height: 29px; min-height: 29px; padding: 2px; border-radius: 8px; flex: none; }
#wearma-studio .wms-swatch--named { width: auto; min-width: 29px; max-width: 120px; font-size: 10px; }
#wearma-studio .wms-swatch.is-on { outline: 2px solid #b98b4e; outline-offset: 2px; }
#wearma-studio .wms-size { width: 36px; min-width: 36px; height: 36px; min-height: 36px; border-radius: 9px; }
#wearma-studio .wms-products-section .wms-garments { display: flex; flex-wrap: nowrap; gap: 12px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; scrollbar-width: thin; padding: 8px 4px 16px; }
#wearma-studio .wms-gcard { flex: 0 0 clamp(130px, 15vw, 190px); scroll-snap-align: start; }
#wearma-studio .wms-products-section .wms-garments > .wms-btn { flex: 0 0 120px; align-self: center; }
#wearma-studio .wms-dgrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
#wearma-studio .wms-lib { scrollbar-width: thin; }
#wearma-studio .wms-product-preview:not([hidden]) { position: fixed; z-index: 999999; inset: 0; background: rgba(0,0,0,.88); display: grid; place-items: center; padding: 20px; }
#wearma-studio .wms-product-preview__card { position: relative; width: min(94vw, 850px); max-height: 94vh; background: #f5f1e9; border: 2px solid #c69a59; border-radius: 18px; padding: 48px 12px 12px; display: grid; place-items: center; }
#wearma-studio .wms-product-preview__image { display: block; max-width: 100%; max-height: calc(94vh - 90px); object-fit: contain; }
#wearma-studio .wms-product-preview__close { position: absolute; inset-block-start: 8px; inset-inline-end: 8px; }
@media(max-width:1199px) { #wearma-studio .wms-grid3 { grid-template-columns: minmax(0,1fr); } #wearma-studio .wms-viewer { grid-template-columns: 48px minmax(0,1fr); } }
@media(max-width:899px) { #wearma-studio { padding: 8px; border-radius: 14px; } #wearma-studio .wms-viewer { grid-template-columns: minmax(0,1fr); } #wearma-studio .wms-swatches { flex-direction: row; align-items: center; overflow-x: auto; overflow-y: hidden; max-height: none; max-width: calc(100vw - 54px); gap: 8px; padding: 6px; } #wearma-studio .wms-gcard { flex-basis: 145px; } #wearma-studio .wms-info { gap: 12px; } }

/* RC5: swatches directly below front/back cards, warning outside safe print area */
#wearma-studio .wms-view-options { grid-column: 1 / -1; min-width:0; padding:8px 0 2px; }
#wearma-studio .wms-view-options .wms-field { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
#wearma-studio .wms-view-options .wms-swatches { flex-direction:row; flex-wrap:wrap; max-height:none; overflow:visible; }
#wearma-studio .wms-boundary-warning:not([hidden]) { color:#b91c1c; border:2px solid #dc2626; background:#fff0f0; border-radius:9px; padding:9px 12px; font-weight:700; font-size:12px; margin:8px 0; }
@media(max-width:899px){#wearma-studio .wms-view-options .wms-swatches{flex-wrap:nowrap;overflow-x:auto;max-width:calc(100vw - 54px)}}

/* RC6: prominent product mockup, front/back and colors on one compact side rail */
#wearma-studio .wms-brand-logo { background:#080808; border-color:#c99540; }
#wearma-studio .wms-brand-fallback { color:#fff; }
#wearma-studio .wms-viewer { display:grid; grid-template-columns:minmax(82px,112px) minmax(0,1fr); grid-template-rows:auto auto; align-items:start; gap:10px; }
#wearma-studio .wms-viewer > .wms-rail { grid-column:1; grid-row:1; }
#wearma-studio .wms-viewer > .wms-stage { grid-column:2; grid-row:1 / 3; }
#wearma-studio .wms-view-options { grid-column:1; grid-row:2; padding:0; min-width:0; }
#wearma-studio .wms-view-options .wms-field { display:block; }
#wearma-studio .wms-view-options .wms-field__l { font-size:11px; margin-bottom:7px; }
#wearma-studio .wms-view-options .wms-swatches { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; overflow:visible; }
#wearma-studio .wms-view-options .wms-swatch { width:29px; min-width:29px; height:29px; min-height:29px; }
#wearma-studio .wms-stage { min-height: min(68vw,690px); }
#wearma-studio .wms-canvas { touch-action:none; cursor:grab; }
#wearma-studio .wms-canvas:active { cursor:grabbing; }
@media(max-width:899px){
 #wearma-studio .wms-viewer { grid-template-columns:minmax(0,1fr); grid-template-rows:auto auto auto; }
 #wearma-studio .wms-viewer > .wms-stage { grid-column:1; grid-row:1; min-height:0; }
 #wearma-studio .wms-viewer > .wms-rail { grid-column:1; grid-row:2; }
 #wearma-studio .wms-view-options { grid-column:1; grid-row:3; }
 #wearma-studio .wms-view-options .wms-swatches { display:flex; flex-direction:row; flex-wrap:nowrap; overflow-x:auto; max-width:100%; }
}

/* RC8: restrained brand header and full-width clean garment preview */
#wearma-studio .wms-topbar { min-height: 68px; padding: 8px 14px; }
#wearma-studio .wms-brand-logo { background:#050505 !important; border:0 !important; box-shadow:none !important; padding:0 8px !important; border-radius:0 !important; flex:0 1 200px; max-width:200px; }
#wearma-studio .wms-brand-image { width:100%; height:48px; object-fit:contain; }
#wearma-studio .wms-brand-fallback { color:white; font-weight:800; }
#wearma-studio .wms-stage { overflow:hidden; }
#wearma-studio .wms-boundary-warning:not([hidden]) { font-size:11px; padding:6px 8px; }
@media(max-width:540px){#wearma-studio .wms-brand-logo{max-width:140px;flex-basis:140px}#wearma-studio .wms-brand-image{height:38px}}

/* RC9: actual user-supplied white logo, centered in a clean black header */
#wearma-studio .wms-topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 116px;
  padding: 14px 18px;
  background: #050505;
  border: 0;
  box-shadow: none;
  border-radius: 12px;
}
#wearma-studio .wms-topbar .wms-brand.wms-brand-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(56%, 530px);
  max-width: none;
  min-width: 0;
  height: auto;
  flex: none;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  pointer-events: none;
}
#wearma-studio .wms-topbar .wms-brand-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 92px;
  object-fit: contain;
}
#wearma-studio .wms-topbar .wms-brand-fallback { display: none !important; }
#wearma-studio .wms-topbar > :not(.wms-brand-logo) { position: relative; z-index: 1; }
@media (max-width: 700px) {
  #wearma-studio .wms-topbar { min-height: 80px; padding: 8px; }
  #wearma-studio .wms-topbar .wms-brand.wms-brand-logo { width: min(54%, 270px); }
  #wearma-studio .wms-topbar .wms-brand-image { max-height: 65px; }
}

/* Scoped RC9 maintenance: mobile header only; desktop header is unchanged. */
@media (max-width:899px) {
 #wearma-studio .wms-topbar { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); grid-template-rows:auto auto; gap:12px 8px; min-height:0; padding:16px 12px; align-items:center; justify-items:center; }
 #wearma-studio .wms-topbar .wms-brand.wms-brand-logo { position:static; inset:auto; transform:none; grid-column:1 / -1; grid-row:1; width:min(78%,280px); max-width:100%; min-width:0; height:auto; justify-self:center; }
 #wearma-studio .wms-topbar .wms-brand-image { width:100%; height:auto; max-height:72px; object-fit:contain; }
 #wearma-studio .wms-topbar .wms-open-side { grid-column:1; grid-row:2; }
 #wearma-studio .wms-topbar .wms-open-lib { grid-column:2; grid-row:2; }
 #wearma-studio .wms-topbar .wms-open-side,#wearma-studio .wms-topbar .wms-open-lib { display:inline-flex; position:static; justify-content:center; max-width:100%; min-width:0; min-height:44px; margin:0; padding:8px 10px; white-space:normal; font-size:12px; }
 #wearma-studio .wms-buy .wms-add,#wearma-studio .wms-mbar .wms-add { white-space:normal; overflow-wrap:anywhere; min-height:44px; }
}
#wearma-studio .wms-price,#wearma-studio .wms-gcard__p,#wearma-studio .wms-mbar__price { font-variant-numeric:tabular-nums; unicode-bidi:isolate; }

@media(max-width:899px) {
 #wearma-studio .wms-mbar { display:grid; grid-template-columns:44px minmax(72px,max-content) minmax(0,1fr); gap:8px; inline-size:100%; box-sizing:border-box; align-items:center; }
 #wearma-studio .wms-mbar__price { min-inline-size:0; max-inline-size:105px; padding-inline:2px; }
 #wearma-studio .wms-mbar__price strong { font-size:13px; line-height:1.3; }
 #wearma-studio .wms-mbar .wms-btn--primary { inline-size:100%; min-inline-size:0; min-block-size:44px; padding:8px; white-space:normal; overflow-wrap:normal; text-overflow:clip; letter-spacing:.015em; font-size:11px; line-height:1.3; }
 #wearma-studio .wms-mbar__lib { inline-size:44px; min-inline-size:44px; }
}
