/* Design Your Own Studio — editor styles (scoped to .dyo-studio) */
.dyo-studio {
	--dyo-ink: #2b2420;
	--dyo-muted: #7d7266;
	--dyo-line: #e7dfd3;
	--dyo-soft: #f7f3ed;
	--dyo-accent: #b0832b;
	--dyo-accent-ink: #ffffff;
	--dyo-radius: 12px;
	container-type: inline-size;
	box-sizing: border-box;
	width: 100%;
	margin: 0 0 24px;
	padding: 18px;
	border: 1px solid var(--dyo-line);
	border-radius: 16px;
	background: #fff;
	color: var(--dyo-ink);
	font-size: 15px;
	line-height: 1.45;
	position: relative;
}
.dyo-studio *, .dyo-studio *::before, .dyo-studio *::after { box-sizing: border-box; }
.dyo-studio [hidden] { display: none !important; }
.dyo-studio button { font: inherit; color: inherit; cursor: pointer; margin: 0; text-transform: none; letter-spacing: normal; box-shadow: none; }
.dyo-loading { padding: 40px; text-align: center; color: var(--dyo-muted); }

/* full-width wrapper (when moved out of the product column) */
.dyo-fullwidth { clear: both; width: 100%; max-width: 1440px; margin: 28px auto; padding: 0 16px; box-sizing: border-box; }
html.dyo-noscroll, html.dyo-noscroll body { overflow: hidden !important; }

/* header + tabs */
.dyo-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.dyo-head .dyo-title { margin-inline-end: auto !important; }
.dyo-fs-btn { display: inline-flex !important; align-items: center; gap: 6px; }
.dyo-title { margin: 0 !important; font-size: 1.25em !important; line-height: 1.2; }
.dyo-tabs { display: inline-flex; background: var(--dyo-soft); border-radius: 999px; padding: 4px; gap: 2px; }
.dyo-tab { border: 0 !important; background: transparent !important; padding: 8px 16px !important; border-radius: 999px !important; color: var(--dyo-muted) !important; font-weight: 600; min-height: 0; }
.dyo-tab.is-active { background: #fff !important; color: var(--dyo-ink) !important; box-shadow: 0 1px 3px rgba(43, 36, 32, .15) !important; }

/* layout: preview on the left, controls on the right */
.dyo-body { display: grid; grid-template-columns: 1fr; gap: 20px; }
.dyo-controls { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.dyo-controls-scroll { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@container (min-width: 760px) {
	.dyo-body { grid-template-columns: minmax(0, 1fr) minmax(340px, 410px); align-items: start; }
	.dyo-stage-col { position: sticky; top: calc(var(--dyo-top, 0px) + 16px); }
	.dyo-controls { position: sticky; top: calc(var(--dyo-top, 0px) + 16px); max-height: calc(100vh - var(--dyo-top, 0px) - 32px); }
	.dyo-controls-scroll .dyo-fonts { max-height: none; overflow: visible; }
	.dyo-controls-scroll { overflow-y: auto; overscroll-behavior: contain; padding-inline-end: 6px; margin-inline-end: -6px; min-height: 0; flex: 1 1 auto; }
}

/* in-editor price + add to cart */
.dyo-cartbar { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--dyo-line); border-radius: var(--dyo-radius); background: #fff; position: sticky; bottom: 0; z-index: 2; box-shadow: 0 -6px 16px rgba(43,36,32,.06); }
.dyo-price { flex: 1 1 auto; font-weight: 700; font-size: 18px; color: var(--dyo-ink); }
.dyo-price del { opacity: .5; font-weight: 400; font-size: .85em; }
.dyo-price ins { text-decoration: none; }
.dyo-cart-btn { flex: none; border: 0 !important; background: var(--dyo-ink) !important; color: #fff !important; padding: 12px 22px !important; border-radius: 10px !important; font-weight: 700; font-size: 15px; }
.dyo-cart-btn:hover { background: #000 !important; }

/* full screen */
.dyo-studio.is-fullscreen { position: fixed !important; inset: 0; z-index: 999999; margin: 0; max-width: none; border-radius: 0; border: 0; display: flex; flex-direction: column; overflow: hidden; padding: 16px 20px; }
.dyo-studio.is-fullscreen .dyo-body { flex: 1 1 auto; min-height: 0; }
.dyo-studio.is-fullscreen .dyo-stage-col, .dyo-studio.is-fullscreen .dyo-controls { position: static; }
.dyo-studio.is-fullscreen .dyo-controls { max-height: 100%; min-height: 0; height: 100%; }
.dyo-studio.is-fullscreen .dyo-controls-scroll { overflow-y: auto; min-height: 0; flex: 1 1 auto; }
@container (max-width: 759px) {
	.dyo-studio.is-fullscreen .dyo-body { display: flex; flex-direction: column; }
	.dyo-studio.is-fullscreen .dyo-stage-col { flex: none; }
	.dyo-studio.is-fullscreen .dyo-controls { flex: 1 1 auto; height: auto; }
}

/* stage */
.dyo-stage { position: relative; display: flex; align-items: center; justify-content: center; border-radius: var(--dyo-radius); background: var(--dyo-soft); overflow: hidden; min-height: 200px; }
.dyo-canvas { display: block; touch-action: none; cursor: grab; border-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 8px 24px rgba(60, 40, 20, .12); }
.dyo-canvas.is-dragging { cursor: grabbing; }
.dyo-badge { position: absolute; inset-inline-start: 10px; bottom: 10px; background: rgba(43, 36, 32, .78); color: #fff; font-size: 12px; padding: 3px 9px; border-radius: 999px; pointer-events: none; }
.dyo-hint { margin: 8px 0 0 !important; font-size: 13px; color: var(--dyo-muted); text-align: center; }
.dyo-quality { margin: 8px 0 0 !important; padding: 8px 12px; border-radius: 8px; font-size: 13px; }
.dyo-quality.is-good { background: #edf7ee; color: #24663b; }
.dyo-quality.is-ok { background: #fdf6e3; color: #7a5a12; }
.dyo-quality.is-low { background: #fdecea; color: #a12a1f; }

/* wall preview */
.dyo-wall { position: absolute; inset: 0; background: linear-gradient(105deg, #f4ede3 0%, #ebe2d5 45%, #ddd2c2 100%); overflow: hidden; }
.dyo-wall-light { position: absolute; inset: 0; background: radial-gradient(60% 70% at 18% 30%, rgba(255, 248, 235, .75), transparent 70%), linear-gradient(115deg, transparent 30%, rgba(255,255,255,.18) 34%, transparent 40%, transparent 52%, rgba(255,255,255,.14) 56%, transparent 62%); }
.dyo-wall-art { position: absolute; left: 50%; transform: translateX(-50%); display: block; }
.dyo-wall-art.is-framed { box-shadow: 3px 6px 14px rgba(40, 25, 10, .35); }
.dyo-sofa { position: absolute; left: 50%; bottom: 7%; width: 64%; height: 30%; transform: translateX(-50%); }
.dyo-sofa i { position: absolute; display: block; background: #e9e3da; box-shadow: inset 0 -6px 12px rgba(0,0,0,.06); }
.dyo-sofa-back { left: 6%; right: 6%; top: 0; height: 55%; border-radius: 14px 14px 4px 4px; }
.dyo-sofa-seat { left: 3%; right: 3%; top: 45%; height: 38%; border-radius: 8px; background: #f1ece4 !important; }
.dyo-sofa-arm { top: 28%; width: 9%; height: 62%; border-radius: 12px; }
.dyo-sofa-arm.l { left: 0; } .dyo-sofa-arm.r { right: 0; }
.dyo-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 7%; background: linear-gradient(#bfa98c, #a88f70); }

/* controls */
.dyo-panel { display: flex; flex-direction: column; gap: 16px; }
.dyo-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dyo-label { font-weight: 700; font-size: 13px; color: var(--dyo-ink); }
.dyo-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dyo-row { display: flex; gap: 8px; flex-wrap: wrap; }

.dyo-textarea { width: 100%; min-height: 84px; padding: 10px 12px; border: 1px solid var(--dyo-line); border-radius: 10px; font-size: 17px; line-height: 1.5; resize: vertical; background: #fff; color: var(--dyo-ink); }
.dyo-textarea:focus { outline: 2px solid var(--dyo-accent); outline-offset: 1px; border-color: transparent; }

.dyo-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.dyo-chip { border: 1px solid var(--dyo-line) !important; background: #fff !important; padding: 8px 14px !important; border-radius: 10px !important; font-weight: 600; color: var(--dyo-ink) !important; }
.dyo-chip.is-active { border-color: var(--dyo-ink) !important; background: var(--dyo-ink) !important; color: #fff !important; }

.dyo-seg { display: inline-flex; background: var(--dyo-soft); border-radius: 10px; padding: 3px; gap: 2px; align-self: flex-start; }
.dyo-seg button { border: 0 !important; background: transparent !important; padding: 6px 12px !important; border-radius: 8px !important; color: var(--dyo-muted) !important; font-size: 13px; font-weight: 600; line-height: 1; display: inline-flex; align-items: center; min-height: 0; }
.dyo-seg button.is-active { background: #fff !important; color: var(--dyo-ink) !important; box-shadow: 0 1px 2px rgba(0,0,0,.1) !important; }
.dyo-views { margin-bottom: 10px; }

.dyo-font-filter { margin-bottom: 8px; }
.dyo-fonts { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; max-height: 248px; overflow-y: auto; padding: 2px; }
.dyo-font { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px 8px !important; border: 1px solid var(--dyo-line) !important; background: #fff !important; border-radius: 10px !important; text-align: center; min-width: 0; color: var(--dyo-ink) !important; }
.dyo-font:hover { border-color: #cbbda8 !important; }
.dyo-font.is-active { border-color: var(--dyo-accent) !important; box-shadow: 0 0 0 1px var(--dyo-accent) inset !important; background: #fffaf0 !important; }
.dyo-font.is-dim { opacity: .45; }
.dyo-font-sample { font-size: 21px; line-height: 1.5; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dyo-font-name { font-size: 11px; color: var(--dyo-muted); max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.dyo-range { width: 100%; accent-color: var(--dyo-accent); padding: 0; border: 0; background: transparent; }

.dyo-swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dyo-swatch { position: relative; width: 34px; height: 34px; padding: 0 !important; border-radius: 50% !important; border: 1px solid rgba(0,0,0,.15) !important; background: #fff; flex: none; min-height: 0; }
.dyo-swatch.is-active { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--dyo-ink) !important; }
.dyo-swatch.is-none { background: repeating-conic-gradient(#ddd 0 25%, #fff 0 50%) 0 0 / 10px 10px !important; }
.dyo-swatch.is-custom { background: conic-gradient(#f44, #fd4, #4d6, #4cf, #64f, #f4c, #f44) !important; cursor: pointer; overflow: hidden; display: inline-block; }
.dyo-swatch.is-custom input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.dyo-swatch-name { font-size: 12px; color: var(--dyo-muted); margin-inline-start: 4px; }

.dyo-btn { border: 1px solid var(--dyo-line) !important; background: #fff !important; padding: 7px 14px !important; border-radius: 9px !important; font-size: 13px; font-weight: 600; color: var(--dyo-ink) !important; min-height: 0; }
.dyo-btn:hover { background: var(--dyo-soft) !important; }

.dyo-drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 26px 16px; border: 2px dashed #d7cbb9; border-radius: var(--dyo-radius); background: var(--dyo-soft); text-align: center; cursor: pointer; }
.dyo-drop.is-over { border-color: var(--dyo-accent); background: #fff8ea; }
.dyo-drop.has-photo { padding: 12px; }
.dyo-drop strong { font-size: 15px; }
.dyo-drop span { font-size: 12px; color: var(--dyo-muted); }
.dyo-file { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dyo-photo-tools { display: flex; flex-direction: column; gap: 12px; }

.dyo-status:empty { display: none; }
.dyo-status { margin: 0; padding: 10px 14px; border-radius: 10px; font-size: 14px; font-weight: 600; }
.dyo-status.is-error { background: #fdecea; color: #a12a1f; }
.dyo-status.is-busy { background: #fff8ea; color: #7a5a12; }
.dyo-studio.is-busy .dyo-body { opacity: .6; pointer-events: none; }

@container (max-width: 420px) {
	.dyo-studio { padding: 12px; }
	.dyo-two { grid-template-columns: 1fr; }
	.dyo-fonts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
	.dyo-studio { padding: 12px; border-radius: 12px; }
}
