/* Vidumina Custom — designer. Desktop: 3 columns. Phone: stage on top, tools as bottom tabs. */
.designer-page .main { max-width: none; padding: 0; min-height: 0; }
.designer-page .site-footer { display: none; }

.dz { --panel: 290px; --bar: 64px; display: flex; flex-direction: column; height: calc(100dvh - 61px); background: var(--bg); position: relative; }
.dz h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 10px; }
.dz h4 { font-size: .85rem; margin: 12px 0 6px; color: var(--ink-2); }
.dz section { padding: 16px; border-bottom: 1px solid var(--line); }
.small { font-size: .85rem; }

/* top bar */
.dz-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.dz-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dz-title > div { display: flex; flex-direction: column; min-width: 0; }
.dz-back { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); flex: none; }
#dz-name { border: 0; font: 600 1rem var(--font); padding: 2px 0; background: transparent; min-width: 0; width: 100%; }
#dz-name:focus { outline: 2px solid var(--brand-soft); border-radius: 4px; }
.dz-product-name { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dz-top-actions { display: flex; gap: 8px; flex: none; }

/* layout */
.dz-body { flex: 1; display: grid; grid-template-columns: var(--panel) 1fr var(--panel); min-height: 0; }
.dz-panel { background: var(--card); overflow-y: auto; }
.dz-left { border-right: 1px solid var(--line); }
.dz-right { border-left: 1px solid var(--line); }
.dz-center { display: flex; flex-direction: column; min-width: 0; min-height: 0; }

/* colour / size / areas */
.dz-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.dz-swatch { width: 34px; height: 34px; border-radius: 50%; background: var(--c); border: 1px solid rgba(0,0,0,.2); cursor: pointer; box-shadow: inset 0 0 0 3px var(--card); }
.dz-swatch[aria-pressed=true] { outline: 2px solid var(--brand); outline-offset: 2px; }
.dz-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dz-chip { min-width: 48px; min-height: 40px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); font: 600 .9rem var(--font); cursor: pointer; }
.dz-chip[aria-pressed=true] { background: var(--brand); color: #fff; border-color: var(--brand); }
.dz-chip.is-out { color: var(--muted); text-decoration: line-through; }
.dz-chip.is-out[aria-pressed=true] { color: #fff; }
.dz-area-row { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 10px; border: 1px solid var(--line); margin-bottom: 6px; }
.dz-area-row.is-active { border-color: var(--brand); background: var(--brand-soft); }
.dz-area-name { text-align: left; background: none; border: 0; font: 600 .95rem var(--font); padding: 2px 0; cursor: pointer; display: flex; justify-content: space-between; align-items: center; color: var(--ink); }
.dz-badge { background: var(--brand); color: #fff; border-radius: 999px; font-size: .75rem; padding: 1px 8px; }
.dz-area-row select { width: 100%; min-height: 36px; border-radius: 8px; border: 1px solid var(--line); font: .85rem var(--font); padding: 4px 6px; background: #fff; }
.dz-area-size { font-size: .85rem; color: var(--muted); }

/* view bar */
.dz-viewbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; flex-wrap: wrap; }
.dz-seg { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.dz-seg button { border: 0; background: none; padding: 6px 16px; border-radius: 7px; font: 600 .9rem var(--font); cursor: pointer; color: var(--ink-2); }
.dz-seg button[aria-pressed=true] { background: var(--brand); color: #fff; }
.dz-toggle { font-size: .88rem; color: var(--ink-2); display: flex; gap: 6px; align-items: center; }
.dz-zoom { display: inline-flex; align-items: center; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 2px; }
.dz-zoom button { width: 32px; height: 32px; border: 0; background: none; font-size: 1.1rem; cursor: pointer; border-radius: 7px; }
.dz-zoom span { min-width: 44px; text-align: center; font-size: .85rem; font-variant-numeric: tabular-nums; }

/* stage */
.dz-stage-scroll { flex: 1; overflow: auto; display: flex; min-height: 0; background: radial-gradient(ellipse at 50% 40%, #ffffff 0%, #eef0f6 70%); }
.dz-stage-scroll.drop { outline: 3px dashed var(--brand); outline-offset: -10px; }
.dz-stage { position: relative; margin: auto; isolation: isolate; flex: none; }
.dz-base { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 10px 18px rgba(23,26,46,.18)); }
.dz-areas { position: absolute; inset: 0; }
.dz-shade, .dz-light { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.dz-shade { mix-blend-mode: multiply; }
.dz-light { mix-blend-mode: screen; }
.dz-stage.flat .dz-shade, .dz-stage.flat .dz-light { display: none; }
.dz-area { position: absolute; }
/* strip copies (saree borders): the piece repeated to the right, not editable itself */
.dz-repeat { position: absolute; padding: 0; margin: 0; border: 1px dashed rgba(23,26,46,.28); background: transparent; cursor: pointer; z-index: 1; }
.dz-repeat canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.dz-repeat.is-active { border-color: rgba(43,45,158,.55); }
.dz-repeat-badge { position: absolute; right: 3px; bottom: 3px; font: 700 .68rem var(--font); color: #fff; background: rgba(23,26,46,.72); padding: 1px 6px; border-radius: 6px; white-space: nowrap; pointer-events: none; }
.dz-area .dz-fabric { position: absolute !important; inset: 0; }
.dz-area:not(.is-active) .dz-fabric { pointer-events: none; }
.dz-guide { position: absolute; border: 2px dotted rgba(255,255,255,.95); box-shadow: 0 0 0 1px rgba(23,26,46,.45); pointer-events: none; z-index: 3; border-radius: 2px; }
.dz-area:not(.is-active) .dz-guide { border: 1px dotted rgba(255,255,255,.6); box-shadow: 0 0 0 1px rgba(23,26,46,.18); }
/* selection handles above the fabric shading; the print itself stays underneath it */
.dz-area .upper-canvas { z-index: 6; }
.dz-area.is-active .upper-canvas { z-index: 8; } /* above the tap layers of bigger areas (see CanvasManager.activate) */
.dz-center-line { position: absolute; width: 0; border-left: 1px solid #ff6b4a; pointer-events: none; z-index: 8; display: none; }
.dz-center-line.on { display: block; }
.dz-area-hit { position: absolute; inset: 0; z-index: 7; background: transparent; border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.dz-area-hit span { opacity: 0; background: rgba(23,26,46,.75); color: #fff; font-size: .75rem; padding: 3px 8px; border-radius: 6px; transition: opacity .15s; white-space: nowrap; }
.dz-area-hit:hover span, .dz-area-hit:focus-visible span { opacity: 1; }
.dz-area.is-active .dz-area-hit { display: none; }
.dz-hint { text-align: center; font-size: .85rem; color: var(--muted); margin: 6px 12px 8px; min-height: 1.2em; }

/* tools */
.dz-add { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.dz-tool { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; font: 600 .9rem var(--font); color: var(--ink); }
.dz-tool:hover { border-color: var(--brand); }
.dz-tool-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: 1.1rem; }
.dz-uploads { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.dz-upload { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 8px; padding: 3px; background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0 / 12px 12px; cursor: pointer; }
.dz-upload img { width: 100%; height: 100%; object-fit: contain; }
/* Edit panel: show only the controls for the selected kind of item */
#dz-props .dz-when-photofill, #dz-props .dz-when-text, #dz-props .dz-when-image, #dz-props .dz-when-fill, #dz-props .dz-when-shape, #dz-props .dz-when-any { display: none; }
#dz-props[data-kind=text] .dz-when-photofill, #dz-props[data-kind=graphic] .dz-when-photofill, #dz-props[data-kind=shape] .dz-when-photofill,
#dz-props[data-kind=text] .dz-when-text, #dz-props[data-kind=image] .dz-when-image,
#dz-props[data-kind=graphic] .dz-when-fill, #dz-props[data-kind=shape] .dz-when-fill, #dz-props[data-kind=shape] .dz-when-shape,
#dz-props:not([data-kind=none]) .dz-when-any { display: block; }
#dz-props:not([data-kind=none]) .dz-empty { display: none; }
#p-shadow { width: 44px; height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 2px; flex: none; }
/* library drawer (graphics, shapes, templates) */
.dz-tool-wide { grid-column: span 2; flex-direction: row; justify-content: center; }
.dz-add { grid-template-columns: repeat(2, 1fr); }
.dz-library { margin-top: 4px; }
.dz-lib-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.dz-lib-head button { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); cursor: pointer; }
.dz-lib-cats { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 6px; }
.dz-lib-cats button { white-space: nowrap; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 5px 12px; font: .82rem var(--font); cursor: pointer; }
.dz-lib-cats button[aria-pressed=true] { background: var(--brand); color: #fff; border-color: var(--brand); }
.dz-lib-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dz-lib-grid.templates { grid-template-columns: repeat(2, 1fr); }
.dz-lib-item { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .75rem; color: var(--ink-2); }
.dz-lib-item:hover { border-color: var(--brand); }
.dz-lib-item img, .dz-lib-item svg { width: 100%; aspect-ratio: 1; object-fit: contain; }
.dz-lib-item svg path { fill: var(--ink); }
.dz-lib-item.tpl img { background: #f4f4f8; border-radius: 6px; }
.dz-field { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; color: var(--ink-2); margin-bottom: 10px; }
.dz-field textarea, .dz-field select, .dz-field input[type=number] { font: 1rem var(--font); padding: 8px; border: 1px solid var(--line); border-radius: 8px; width: 100%; }
.dz-field input[type=color], #p-stroke { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 2px; background: #fff; }
#p-stroke { width: 60px; }
.dz-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: end; }
.dz-inks { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.dz-ink { width: 26px; height: 26px; border-radius: 50%; background: var(--c); border: 1px solid rgba(0,0,0,.2); cursor: pointer; }
.dz-btn-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.dz-btn-row button { flex: 1; min-height: 38px; border: 1px solid var(--line); background: var(--card); border-radius: 8px; cursor: pointer; font: .88rem var(--font); }
.dz-btn-row button[aria-pressed=true] { background: var(--brand); color: #fff; border-color: var(--brand); }
.dz-btn-row button.danger { color: var(--err); border-color: #f5c2bd; }
.dz-check { display: flex; gap: 6px; align-items: center; font-size: .88rem; margin-bottom: 10px; }
.dz-layers { list-style: none; margin: 0; padding: 0; }
.dz-layers li { display: flex; gap: 4px; margin-bottom: 4px; }
.dz-layers li.is-current .dz-layer { border-color: var(--brand); background: var(--brand-soft); }
.dz-layers button { border: 1px solid var(--line); background: var(--card); border-radius: 8px; min-width: 34px; min-height: 34px; cursor: pointer; }
.dz-layer { flex: 1; text-align: left; padding: 4px 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* quality badges */
.dz-quality { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.q-excellent { background: var(--ok-bg); color: var(--ok); }
.q-good { background: #fff5d6; color: #8a6100; }
.q-low { background: var(--err-bg); color: var(--err); }

/* bottom bar */
.dz-bar { height: var(--bar); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; background: var(--card); border-top: 1px solid var(--line); }
.dz-bar-quality { font-size: .85rem; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; min-width: 0; }
.dz-bar-actions { display: flex; gap: 8px; align-items: center; flex: none; }
.dz-bar-actions > button:not(.btn) { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); font-size: 1.2rem; cursor: pointer; }
.dz-bar-actions > button:disabled { opacity: .4; cursor: default; }
.dz-price-wrap { position: relative; }
.dz-price { display: flex; flex-direction: column; align-items: flex-end; border: 0; background: none; cursor: pointer; padding: 0 6px; line-height: 1.15; }
.dz-price small { color: var(--muted); font-size: .72rem; }
.dz-price strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.dz-price-detail { display: none; position: absolute; right: 0; bottom: calc(100% + 10px); width: 300px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 12px 14px; z-index: 30; font-size: .88rem; }
.dz-price-detail.open { display: block; }
.dz-price-detail div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.dz-price-detail p { margin: 6px 0 0; font-size: .8rem; }
.dz-bar-save { display: none; }
.dz-sheets { display: none; }

/* busy + toast */
.dz-busy { position: absolute; inset: 0; background: rgba(247,247,251,.7); display: none; align-items: center; justify-content: center; flex-direction: column; gap: 10px; z-index: 50; font-weight: 600; }
.dz.is-busy .dz-busy { display: flex; }
.dz-spinner { width: 36px; height: 36px; border-radius: 50%; border: 4px solid var(--brand-soft); border-top-color: var(--brand); animation: dzspin .8s linear infinite; }
@keyframes dzspin { to { transform: rotate(360deg); } }
.dz-toast { position: absolute; left: 50%; bottom: calc(var(--bar) + 14px); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .2s; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 12px; display: flex; gap: 12px; align-items: center; max-width: min(560px, calc(100% - 32px)); z-index: 60; font-size: .92rem; box-shadow: var(--shadow); }
.dz-toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.dz-toast.warn { background: #7a1d14; }
.dz-toast a, .dz-toast button { color: #ffd6cc; font-weight: 700; background: none; border: 0; cursor: pointer; font-size: .92rem; white-space: nowrap; }
.dz-toast .dz-toast-x { color: #fff; font-size: 1.2rem; }

/* 3D preview */
.p3d { border: 0; border-radius: 18px; padding: 0; width: min(760px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); background: var(--card); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.p3d::backdrop { background: rgba(23,26,46,.55); }
.p3d-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.p3d-head button { border: 0; background: none; font-size: 1.6rem; cursor: pointer; line-height: 1; }
.p3d-scene { perspective: 1400px; padding: 24px 24px 8px; cursor: grab; touch-action: none; background: radial-gradient(ellipse at 50% 35%, #fff 0%, #eceef5 75%); position: relative; }
.p3d-scene:active { cursor: grabbing; }
.p3d-card { position: relative; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.2,.8,.2,1); margin: 0 auto; width: min(560px, 100%); aspect-ratio: 1 / 1; }
.p3d-card.dragging { transition: none; }
.p3d-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; align-items: center; justify-content: center; }
.p3d-face canvas { max-width: 100%; max-height: 100%; }
.p3d-back { transform: rotateY(180deg); }
.p3d-shadow { width: 55%; height: 18px; margin: -6px auto 6px; border-radius: 50%; background: radial-gradient(ellipse, rgba(23,26,46,.28), transparent 70%); transition: transform .9s cubic-bezier(.2,.8,.2,1); }
.p3d-controls { display: flex; justify-content: center; gap: 8px; padding: 10px; }
.p3d-controls button { min-height: 40px; padding: 6px 16px; border: 1px solid var(--line); background: var(--card); border-radius: 10px; font: 600 .9rem var(--font); cursor: pointer; }
.p3d-controls button[aria-pressed=true] { background: var(--brand); color: #fff; border-color: var(--brand); }
.p3d-colors { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; padding: 0 16px 6px; }
.p3d > p { padding: 0 16px 14px; margin: 0; }

@media (max-width: 1180px) { .dz { --panel: 250px; } }
/* small cart link in the designer's own top row (phones only; the site menu is hidden there) */
.dz-cart-link { display: none; align-items: center; gap: 3px; text-decoration: none; font-weight: 600; font-size: .85rem; color: var(--ink); padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; white-space: nowrap; }
.dz-cart-link .count { background: var(--accent); color: #fff; border-radius: 999px; padding: 0 6px; font-size: .72rem; }

@media (max-width: 899px) {
  /* one-row header on the designer page */
  .designer-page .main-nav a[href$="#shop"], .designer-page .main-nav a[href*="how-it-works"] { display: none; }
  .designer-page .header-row { flex-wrap: nowrap; }
  .designer-page .main-nav { flex-wrap: nowrap; gap: 10px; }
  .designer-page .brand { font-size: .95rem; }
  .designer-page .main-nav a, .designer-page .main-nav .linklike { font-size: .85rem; }
  .designer-page .main-nav a, .designer-page .main-nav .linklike { white-space: nowrap; }
  /* Phone layout: the site menu is hidden here (the designer's own top row has back + cart), so the
     tools panel ALWAYS gets ~40% of the screen and the garment takes what is left (zoom for detail). */
  .designer-page .site-header { display: none; }
  .dz { --bar: 54px; --tabs: 50px; height: 100dvh; padding-bottom: calc(var(--bar) + var(--tabs)); }
  .dz-top { padding: 5px 10px; gap: 8px; }
  .dz-title input { font-size: .95rem; }
  .dz-product-name { display: none; }
  .dz-body { display: flex; flex-direction: column; flex: 1; min-height: 0; }
  .dz-center { flex: 1 1 auto; order: 0; min-height: 0; }
  .dz-left { order: 1; } .dz-right { order: 2; }
  .dz-viewbar { padding: 4px 8px; flex-wrap: nowrap; gap: 6px; }
  .dz-seg button { padding: 5px 10px; font-size: .82rem; }
  .dz-toggle { font-size: .75rem; white-space: nowrap; }
  .dz-zoom button { width: 28px; height: 28px; }
  .dz-zoom .dz-zoom-val { min-width: 40px; font-size: .78rem; }
  .dz-stage-scroll { flex: 1 1 auto; height: auto; min-height: 140px; }
  .dz-hint { display: none; }
  /* the chosen tab's panel scrolls in its own guaranteed space under the garment */
  .dz-panel { display: none; flex: 0 0 42%; min-height: 150px; overflow-y: auto; border: 0; border-top: 1px solid var(--line); background: var(--card); }
  .dz[data-sheet=product] .dz-left { display: block; }
  .dz:not([data-sheet=product]) .dz-right { display: block; }
  .dz-right section { display: none; border: 0; }
  .dz[data-sheet=add] [data-panel=add], .dz[data-sheet=edit] [data-panel=edit], .dz[data-sheet=layers] [data-panel=layers] { display: block; }
  /* phones: top row = back · name · cart · 3D · Save; bottom bar = undo/redo · price · Add to cart */
  html:has(.designer-page), .designer-page { height: 100%; overflow: hidden; }
  .dz-top-actions { gap: 6px; }
  .dz-top-actions [data-cart] { display: none; }
  .dz-top-actions .btn { min-height: 36px; padding: 5px 10px; font-size: .85rem; }
  .dz-bar { position: fixed; left: 0; right: 0; bottom: var(--tabs); height: var(--bar); z-index: 40; padding: 0 10px; }
  .dz-bar-quality { display: none; }
  .dz-bar-save { display: inline-flex; }
  .dz-bar-actions .btn.dz-bar-save[data-save] { display: none; }
  .dz-bar-actions { gap: 6px; }
  .dz-bar-actions .btn.dz-bar-save { min-height: 40px; padding: 6px 11px; font-size: .88rem; white-space: nowrap; }
  .dz-price { padding: 0 2px; }
  .dz-price strong { font-size: 1.02rem; }
  .designer-page .main-nav { gap: 2px 10px; }
  .designer-page .main-nav a, .designer-page .main-nav .linklike { font-size: .88rem; }
  .dz-sheets { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; height: var(--tabs); background: var(--card); border-top: 1px solid var(--line); z-index: 41; }
  .dz-sheets button { border: 0; background: none; font: 600 .85rem var(--font); color: var(--ink-2); }
  .dz-sheets button[aria-pressed=true] { color: var(--brand); box-shadow: inset 0 3px 0 var(--brand); }
  .dz-toast { position: fixed; bottom: calc(var(--bar) + var(--tabs) + 10px); }
  .dz-cart-link { display: inline-flex; }
  .dz-uploads { grid-template-columns: repeat(5, 1fr); }
}


/* start-up failure message (designer-guard.js) */
.dz-error { position: absolute; inset: 60px 16px auto; z-index: 70; background: var(--card); border: 1px solid #f5c2bd; border-left: 5px solid var(--err); border-radius: 12px; padding: 16px 18px; box-shadow: var(--shadow); max-width: 560px; margin: 0 auto; }
.dz-error p { margin: 6px 0; }

@media (max-width: 440px) {
  .dz-price small { display: none; }
  .dz-promo { font-size: .64rem; }
  .dz-promo-name { display: none; }
  .dz-title input { width: 100%; min-width: 0; }
  .dz-title { min-width: 0; flex: 1; }
  .dz-promo-badge { font-size: .62rem; padding: 0 5px; }
  .dz-top-actions #dz-preview { padding: 5px 8px; }
  .designer-page .brand-words { display: none; }
  .dz-bar { padding: 0 6px; }
  .dz-bar-actions > button:not(.btn):not(.dz-price) { width: 34px; padding: 0; }
  .dz-price small { font-size: .66rem; }
}

/* print size buttons above the garment */
.dz-sizebar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 14px; border-bottom: 1px solid var(--line); background: var(--card); }
.dz-sizebar:empty { display: none; }
.dz-sizebar-label { font-size: .82rem; font-weight: 600; color: var(--ink-2); margin-right: 2px; }
.dz-sizebar button { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.1; min-height: 38px; padding: 4px 12px; border: 1px solid var(--line); background: #fff; border-radius: 9px; cursor: pointer; font: inherit; }
.dz-sizebar button strong { font-size: .86rem; }
.dz-sizebar button small { font-size: .7rem; color: var(--muted); }
.dz-sizebar button[aria-pressed=true] { background: var(--brand); border-color: var(--brand); color: #fff; }
.dz-sizebar button[aria-pressed=true] small { color: rgba(255,255,255,.8); }
.dz-sizebar .dz-sizebar-reset { flex-direction: row; font-size: .8rem; color: var(--brand); border-style: dashed; margin-left: auto; }

/* movable print box */
.dz-zone { position: absolute; inset: 0; border: 1px dashed rgba(255,255,255,.35); pointer-events: none; z-index: 2; display: none; }
.dz-area.is-active.can-move .dz-zone, .dz-area.is-moving .dz-zone { display: block; }
.dz-area.is-moving .dz-zone { border-color: rgba(255,255,255,.8); background: rgba(43,45,158,.08); }
.dz-move { position: absolute; left: 50%; top: 0; transform: translate(-50%, -115%); pointer-events: auto; z-index: 8; display: none;
  white-space: nowrap; font: 600 .72rem var(--font); color: #fff; background: var(--brand); border: 0; border-radius: 999px; padding: 4px 10px; cursor: grab; touch-action: none; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.dz-move:active { cursor: grabbing; }
.dz-area.is-active .dz-move:not([hidden]) { display: inline-block; }
.dz-area.is-moving .dz-guide { border-color: #fff; }

/* zoom & pan */
.dz-zoom .dz-zoom-val { width: auto; min-width: 48px; font-size: .85rem; font-variant-numeric: tabular-nums; }
.is-zoomed .dz-stage-scroll { cursor: grab; }
.dz-stage-scroll.panning { cursor: grabbing; user-select: none; }
.p3d-scene { overflow: hidden; }
.p3d-zoom { display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; }
.p3d-controls .p3d-zoom button { min-width: 40px; padding: 6px 10px; }
.p3d-zoom-val { min-width: 44px; text-align: center; font-size: .85rem; font-variant-numeric: tabular-nums; }
@media (max-width: 899px) {
  .dz-sizebar { padding: 3px 8px; overflow-x: auto; flex-wrap: nowrap; gap: 5px; flex: none; }
  .dz-sizebar-label { font-size: .72rem; }
  .dz-sizebar button { min-height: 30px; padding: 2px 9px; flex: none; }
  .dz-sizebar button strong { font-size: .78rem; }
  .dz-sizebar button small { font-size: .62rem; }
  .p3d-controls { flex-wrap: wrap; }
}

/* promotions */
.dz-promo { font-size: .72rem; line-height: 1.1; text-align: right; }
.dz-promo s { color: var(--muted); }
.dz-promo-badge, .promo-badge { display: inline-block; background: #e53935; color: #fff; border-radius: 999px; padding: 1px 7px; font-weight: 700; font-size: .7rem; }
.dz-promo-line { color: #c62828; font-weight: 600; }
.dz-swatch-promo { position: absolute; top: -6px; right: -6px; background: #e53935; color: #fff; font: 700 .55rem var(--font); border-radius: 999px; padding: 1px 4px; pointer-events: none; }
.dz-lib-item .promo-badge { position: absolute; top: 4px; left: 4px; }
.dz-show-sm { display: none; }
@media (max-width: 899px) { .dz-hide-sm { display: none; } .dz-show-sm { display: inline; } }
/* very small phones (320–350 px) */
@media (max-width: 350px) {
  .dz-zoom .dz-zoom-val { display: none; }
  .dz-seg button { padding: 5px 8px; }
  .dz-promo s { display: none; }
  .dz-bar-actions > button:not(.btn):not(.dz-price) { width: 30px; }
  .dz-bar-actions .btn.dz-bar-save { padding: 6px 8px; font-size: .8rem; }
  .dz-price strong { font-size: .92rem; }
}

.dz-sizebar-fixed { font-size: .85rem; padding: 4px 10px; border-radius: 9px; background: var(--brand-soft); color: var(--brand); white-space: nowrap; }

/* ---------------------------------------------------------------- photo editor (background, draw, crop, clip art) */
.dz-bg-btn { margin-top: 6px; }
.bgt { border: 0; padding: 0; border-radius: 16px; width: min(1100px, calc(100vw - 24px)); height: min(880px, calc(100dvh - 24px));
  background: #fff; box-shadow: 0 20px 60px rgba(0,0,0,.35); color: #171a2e; }
.bgt[open] { display: flex; flex-direction: column; }
.bgt::backdrop { background: rgba(10, 12, 30, .55); }
.bgt [hidden] { display: none !important; }
.bgt-head { display: flex; align-items: center; gap: 12px; padding: 8px 14px; border-bottom: 1px solid #e3e5ee; }
.bgt-head strong { flex: none; }
.bgt-tabs { display: flex; gap: 2px; flex: 1 1 auto; overflow-x: auto; }
.bgt .bgt-tabs button { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; padding: 8px 10px; font: inherit; font-weight: 600; color: #4a4f66; cursor: pointer; white-space: nowrap; min-height: 40px; }
.bgt .bgt-tabs button[aria-selected="true"] { color: #2b2d9e; border-bottom-color: #2b2d9e; }
.bgt-x { border: 0; background: none; font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 2px 8px; margin-left: auto; }
.bgt-tools, .bgt-opts, .bgt-foot { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; padding: 8px 14px; }
.bgt-tools { padding-bottom: 0; }
.bgt-tools > span { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.bgt button:not(.btn):not(.bgt-x):not(.bgt-ink):not(.bgt-clip) { border: 1px solid #d5d8e5; background: #fff; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .88rem; cursor: pointer; min-height: 36px; }
.bgt .bgt-tabs button { border: 0 !important; border-bottom: 3px solid transparent !important; border-radius: 0 !important; }
.bgt .bgt-tabs button[aria-selected="true"] { border-bottom-color: #2b2d9e !important; }
.bgt button:not(.btn):not(.bgt-x):not(.bgt-ink):not(.bgt-clip)[aria-pressed="true"] { background: #2b2d9e; border-color: #2b2d9e; color: #fff; }
.bgt-auto { font-weight: 600; }
.bgt-opts { padding-top: 6px; padding-bottom: 4px; }
.bgt-opts label { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; }
.bgt-opts input[type=range] { width: 130px; }
.bgt-check { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; }
.bgt-palette { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.bgt-inks { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.bgt-ink { width: 26px; height: 26px; border-radius: 50%; background: var(--c); border: 2px solid #fff; box-shadow: 0 0 0 1px #c9ccd8; cursor: pointer; padding: 0; }
.bgt-ink[aria-pressed="true"] { box-shadow: 0 0 0 3px #2b2d9e; }
#bgt-color { width: 34px; height: 30px; padding: 0; border: 1px solid #d5d8e5; border-radius: 6px; background: #fff; cursor: pointer; }
.bgt-clips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 0 14px 6px; max-height: 128px; overflow-y: auto; }
.bgt-clip-cat { flex: 1 1 100%; margin: 4px 0 0; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: #6b7086; }
.bgt-clip { width: 52px; height: 52px; border: 1px solid #d5d8e5; border-radius: 8px; background: #fff; padding: 5px; cursor: pointer; }
.bgt-clip img { width: 100%; height: 100%; object-fit: contain; display: block; }
.bgt-clip[aria-pressed="true"] { border-color: #2b2d9e; box-shadow: 0 0 0 2px #2b2d9e; }
.bgt-hint { margin: 0; padding: 0 14px 6px; font-size: .85rem; color: #4a4f66; min-height: 1.4em; }
.bgt-hint.is-warn { color: #9a5b00; font-weight: 600; }
.bgt-stage { position: relative; flex: 1 1 auto; min-height: 0; overflow: auto; margin: 0 14px; border-radius: 10px;
  border: 1px solid #e3e5ee; display: flex; touch-action: none; overscroll-behavior: contain; }
.bgt-stage.is-checker { background-color: #fff;
  background-image: linear-gradient(45deg, #dfe1ea 25%, transparent 25%), linear-gradient(-45deg, #dfe1ea 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #dfe1ea 75%), linear-gradient(-45deg, transparent 75%, #dfe1ea 75%);
  background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0; }
.bgt-wrap { position: relative; margin: auto; flex: none; cursor: crosshair; }
.bgt-wrap canvas, .bgt-ov { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.bgt-ov { pointer-events: none; overflow: visible; }
.bgt[data-mode=pan] .bgt-wrap { cursor: grab; }
.bgt[data-mode=clip] .bgt-wrap { cursor: move; }
.bgt[data-mode=erase] .bgt-wrap, .bgt[data-mode=restore] .bgt-wrap, .bgt[data-mode=brush] .bgt-wrap,
.bgt[data-mode=keep] .bgt-wrap, .bgt[data-mode=unkeep] .bgt-wrap { cursor: none; }
.bgt-wrap .bgt-maskview { pointer-events: none; }
.bgt-maker { padding: 6px 14px 8px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fafbff; }
.bgt-maker-row { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-bottom: 6px; }
.bgt-maker-row label { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; }
.bgt-maker-row input[type=range] { width: 100px; }
.bgt-maker-row output { min-width: 34px; font-size: .8rem; color: var(--muted); }
#bm-preview { width: 100%; max-width: 560px; height: 90px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.bgt-cursor { position: absolute; left: -999px; top: 0; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px #000; pointer-events: none; }
.bgt-foot { border-top: 1px solid #e3e5ee; margin-top: 8px; }
.bgt-foot .btn { margin-left: auto; }
.bgt-group { display: inline-flex; align-items: center; gap: 4px; }
.bgt-zoom-val { min-width: 46px; text-align: center; font-size: .85rem; }
.bgt-busy { position: absolute; inset: 0; background: rgba(255,255,255,.8); display: flex; flex-direction: column; gap: 10px; align-items: center; justify-content: center; font-weight: 600; border-radius: 16px; }
@media (max-width: 700px) {
  .bgt { width: 100vw; height: 100dvh; max-width: 100vw; max-height: 100dvh; border-radius: 0; }
  .bgt-head { padding: 4px 8px; gap: 6px; }
  .bgt-head strong { display: none; }
  .bgt-tools, .bgt-opts, .bgt-foot { padding: 5px 10px; gap: 5px; }
  .bgt-tools .bgt-auto { flex: 1 1 100%; }
  .bgt button:not(.btn):not(.bgt-x):not(.bgt-ink):not(.bgt-clip) { padding: 5px 10px; min-height: 34px; font-size: .82rem; }
  .bgt-stage { margin: 0 8px; }
  .bgt-hint { padding: 0 10px 4px; font-size: .78rem; }
  .bgt-clips { padding: 0 10px 4px; max-height: 96px; }
  .bgt-clip { width: 44px; height: 44px; }
  .bgt-clip-cat { display: none; }
  .bgt-ink { width: 24px; height: 24px; }
  .bgt-foot .btn { width: 100%; margin-left: 0; }
  .bgt-opts input[type=range] { width: 100px; }
  .bgt-foot .bgt-check { font-size: .8rem; }
}

/* image rights confirmation before uploading */
.dz-rights { border: 0; border-radius: 16px; padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); box-shadow: 0 20px 60px rgba(0,0,0,.35); color: #171a2e; }
.dz-rights::backdrop { background: rgba(10, 12, 30, .55); }
.dz-rights form { padding: 20px 22px; }
.dz-rights h2 { margin: 0 0 8px; font-size: 1.2rem; }
.dz-rights ul { padding-left: 20px; margin: 0 0 10px; }
.dz-rights li { margin-bottom: 6px; font-size: .92rem; }
.dz-rights-check { display: flex; gap: 8px; align-items: flex-start; font-weight: 600; margin: 10px 0; }
.dz-rights-check input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.dz-rights-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 12px; }

.dz-wholesale { margin: 6px 0; padding: 6px 8px; border-radius: 8px; background: #fff7e6; border: 1px solid #f1dfb4; color: #6b4300; font-size: .82rem; }

/* "On a model" preview */
.dz-worn-stage { background: radial-gradient(ellipse at 50% 35%, #fff 0%, #eceef5 75%); padding: 12px; display: flex; justify-content: center; }
.dz-worn-img { display: flex; justify-content: center; align-items: center; min-height: 240px; width: 100%; }
.dz-worn-img canvas { max-width: 100%; max-height: calc(100dvh - 260px); height: auto; border-radius: 10px; box-shadow: 0 6px 24px rgba(23,26,46,.15); }
.dz-worn-models { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; padding: 8px 12px 0; }
.dz-worn-models button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 12px; font: 600 .85rem var(--font); cursor: pointer; }
.dz-worn-models button[aria-pressed="true"] { background: var(--brand); color: #fff; border-color: var(--brand); }
.dz-effects button { flex: 1 1 auto; }
.dz-shadow { border: 1px solid var(--line); border-radius: 10px; padding: 10px 10px 2px; margin: -4px 0 12px; background: #fafbff; }
.dz-shadow .dz-field input[type=range] { width: 100%; }
