/* PrintDesign Studio — independent visual refinement, September 2026.
   Load AFTER assets/designer/designer.css. No order or pricing logic changes.
   Existing controls, keyboard editing and SVG transforms remain untouched. */

.pd-studio {
  --d-blue: #087ea4;
  --d-deep: #183c4c;
  --d-line: #dce5e8;
  --d-muted: #61757e;
  --d-light: #f4f7f8;
  --d-orange: #e88432;
  --studio-shadow: 0 16px 48px rgb(24 60 76 / 7%);
  --studio-radius: 20px;
  max-width: 1500px;
  margin: 28px auto 64px;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.pd-studio button {
  border-radius: 10px;
  font-weight: 650;
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.pd-studio button:not(:disabled):hover { background-color: #f0f7f9; border-color: #95bac9; }
.pd-studio button:disabled { cursor: not-allowed; }
.pd-studio :focus-visible { outline: 3px solid #e88432; outline-offset: 3px; }
.pd-studio button[aria-pressed=true] { background: #eaf5f8; color: #076887; border-color: #1785a7; box-shadow: inset 0 0 0 1px #1785a7; }
.pd-studio .pd-d-primary { background: #087ea4; border-color: #087ea4; border-radius: 11px; min-height: 50px; padding: 13px 24px; box-shadow: 0 4px 10px rgb(8 126 164 / 12%); }
.pd-studio .pd-d-primary:hover:not(:disabled) { background: #066a8b; border-color: #066a8b; box-shadow: 0 5px 14px rgb(8 126 164 / 20%); }
.pd-studio h2 { letter-spacing: -.035em; }
.pd-studio h3 { letter-spacing: -.018em; }
.pd-studio .pd-d-help { color: var(--d-muted); }

/* The existing two-step flow remains familiar; the active step is unmistakable. */
.pd-d-steps { align-items: center; gap: 24px; margin: 0 0 22px; }
.pd-d-steps button { gap: 10px; font-size: 15px !important; min-height: 44px; }
.pd-d-steps button + button { margin-left: 8px; }
.pd-d-steps span { width: 31px; height: 31px; font-size: 13px; font-weight: 750; background: #fff; border-color: #d4e0e5; }
.pd-d-steps button[aria-current=step] span { box-shadow: 0 0 0 5px #eaf4f8; }

/* Stable desktop canvas + inspector: no geometry changes on selecting objects. */
.pd-d-workspace { --pd-work-height: clamp(580px, 72vh, 760px); grid-template-columns: minmax(0, 1fr) 340px; border-color: #dce5e8; border-radius: var(--studio-radius); background: #fff; box-shadow: var(--studio-shadow); isolation: isolate; }
.pd-d-toolbar { min-height: 84px; padding: 16px 22px; gap: 16px; background: #fff; border-bottom-color: #e5ecef; border-radius: var(--studio-radius) var(--studio-radius) 0 0; }
.pd-d-side { padding: 4px; gap: 3px; border: 1px solid #e2e9ec; border-radius: 12px; background: #f3f6f7; }
.pd-d-side button { min-height: 40px; padding: 9px 15px; background: transparent; border-color: transparent; border-radius: 8px; font-size: 13px; }
.pd-d-side button[aria-pressed=true] { background: #fff; border-color: #dbe6ea; color: #136883; box-shadow: 0 2px 5px rgb(24 60 76 / 6%); }
.pd-d-dot { width: 6px; height: 6px; background: #e88432; }
.pd-d-toolbar .pd-d-creation { gap: 7px; }
.pd-d-toolbar .pd-d-creation .pd-d-add { min-height: 46px; gap: 8px; padding: 7px 12px; border: 1px solid #e0e8eb; border-radius: 11px; background: #fff; box-shadow: none; }
.pd-d-toolbar .pd-d-creation .pd-d-add:hover:not(:disabled) { background: #f2f8fa; border-color: #9fc7d6; box-shadow: 0 2px 6px rgb(24 60 76 / 4%); }
.pd-d-toolbar .pd-d-creation .pd-d-add[aria-expanded=true] { background: #eaf5f9; border-color: #7ab8ce; }
.pd-d-toolbar .pd-d-creation .pd-d-add > .pd-d-tool-icon { width: 30px; height: 30px; border-radius: 8px; background: #edf5f8; color: #137c9e; }
.pd-d-toolbar .pd-d-creation .pd-d-add > .pd-d-tool-icon-text { background: #f0f0f8; color: #61588d; }
.pd-d-toolbar .pd-d-creation .pd-d-add > .pd-d-tool-icon-shapes { background: #fff1e4; color: #ad652a; }
.pd-d-toolbar .pd-d-tool-icon svg { width: 21px; height: 21px; }
.pd-d-toolbar .pd-d-tool-label { font-size: 13px; font-weight: 700; }
.pd-d-toolbar .pd-d-creation .pd-d-add > .pd-d-tool-chevron { color: #71878f; font-size: 16px; }
.pd-d-toolbar-end { gap: 20px; }
.pd-d-history { gap: 5px; }
.pd-d-history button { width: 40px; min-height: 40px; border-color: transparent; background: #f5f7f8; border-radius: 9px; color: #52717f; }
.pd-d-top-price { border-left: 1px solid #e0e8ec; padding-left: 18px; min-width: 122px; text-align: right; }
.pd-d-top-price strong { color: #173e50; font-size: 26px; letter-spacing: -.045em; }
.pd-d-top-price span { font-size: 11px; color: #687e89; }

/* A neat floating shape palette; still closed until the customer asks for it. */
.pd-d-toolbar .pd-d-shapes { width: 310px; padding: 14px; top: calc(100% + 12px); border: 1px solid #dce7ec; border-radius: 16px; box-shadow: 0 16px 48px rgb(17 48 65 / 16%); background: #fff; }
.pd-d-toolbar .pd-d-shapes > div { gap: 8px; }
.pd-d-toolbar .pd-d-shapes button { min-height: 74px; gap: 8px; background: #f7f9fa; border-color: transparent; border-radius: 10px; font-size: 11px; }
.pd-d-toolbar .pd-d-shapes button:hover { background: #eaf5f8; border-color: #b1d1df; }
.pd-d-toolbar .pd-d-shapes svg { width: 25px; height: 25px; fill: #337c99; }

/* Text typography gets a real editing panel, not an inconspicuous dropdown. */
.pd-d-textbar { background: #f7fafb; border-top: 0; border-bottom: 1px solid #dce8ed; padding: 18px 22px 20px; gap: 20px; align-items: start; }
.pd-d-textbar > * { min-width: 0; }
.pd-d-textbar select { min-width: 0; max-width: 100%; }
.pd-d-textbar .pd-d-field { gap: 8px; font-size: 12px; letter-spacing: .005em; color: #4c6977; }
.pd-d-textbar .pd-d-text-content textarea { border-color: #cfdee5; border-radius: 10px; min-height: 74px; line-height: 1.5; box-shadow: 0 1px 2px rgb(20 60 80 / 3%); }
.pd-d-textbar .pd-d-font-choice { padding: 10px 12px 12px; margin-top: -10px; margin-bottom: -8px; border: 1px solid #cae0ea; border-radius: 12px; background: #edf6fa; }
.pd-d-textbar .pd-d-font-choice select { min-height: 49px; border: 1px solid #8fb7ca; border-radius: 8px; font-size: 18px; font-weight: 650; color: #1b4b61; box-shadow: 0 2px 5px rgb(25 74 97 / 4%); }
.pd-d-text-style > span { font-size: 12px; color: #4c6977; margin-bottom: 8px; }
.pd-d-text-style .pd-d-inline { padding: 3px; border-radius: 10px; border: 1px solid #dbe5e9; background: #fff; gap: 3px; }
.pd-d-text-style button { border: 0; min-height: 41px; border-radius: 7px; font-size: 18px; }
.pd-d-textbar :disabled { opacity: .55; }

/* The garment is the hero; low-contrast surroundings let artwork remain clear. */
.pd-d-workspace > .pd-d-stage { background: radial-gradient(ellipse at 50% 38%, #fff 0%, #f5f7f7 55%, #edf1f2 100%); padding: 60px 22px 18px; border-radius: 0; }
.pd-d-zoom { top: 18px; right: 20px; padding: 4px; border: 1px solid #e0e8eb; border-radius: 12px; box-shadow: 0 3px 12px rgb(27 58 74 / 5%); background: rgb(255 255 255 / 96%); color: #4a6978; }
.pd-d-zoom button { width: 34px; min-height: 34px; border-radius: 8px; }
.pd-d-zoom span { font-size: 12px; font-variant-numeric: tabular-nums; }
.pd-d-layer { cursor: move; }
.pd-d-layer[data-kind=text][data-selected=true], .pd-d-edit-text { cursor: text; }
.pd-d-rotate { cursor: grab; }
.pd-d-rotate:active { cursor: grabbing; }
.pd-d-rotate:focus-visible circle[fill=white], .pd-d-edit-text:focus-visible circle { stroke: #087ea4; stroke-width: 3px; }
.pd-d-touch-controls button { background: #fff; border-radius: 10px; }

/* One consistent inspector, with a subtle warm signpost to sizes at the bottom. */
.pd-d-workspace > .pd-d-properties { padding: 24px 22px; border-left-color: #dfe7ea; background: #fff; scrollbar-color: #c5d7df transparent; }
.pd-d-section-heading { margin: 0 0 22px; padding: 0 0 18px; gap: 11px; background: transparent; border: 0; border-bottom: 1px solid #e6ecef; border-radius: 0; }
.pd-d-section-heading h3 { font-size: 17px; line-height: 1.3; font-weight: 750; }
.pd-d-section-heading small { display: block; font-size: 12px; line-height: 1.5; margin-top: 3px; }
.pd-d-section-heading .pd-d-tab-number { width: 31px; height: 31px; font-size: 13px; border: 0; background: #e8f3f8; color: #147896; border-radius: 10px; }
.pd-d-selected-title { margin-bottom: 18px; gap: 12px; }
.pd-d-selected-title h3 { font-size: 16px; }
.pd-d-selected-title .pd-d-delete { width: 38px; min-width: 38px; min-height: 38px; background: #fff; border-color: #e6e9ea; color: #936556; border-radius: 10px; }
.pd-d-selected-title .pd-d-delete:hover { color: #a23720; background: #fff1eb; border-color: #ebcbbb; }
.pd-d-field { font-size: 13px; gap: 7px; margin: 18px 0; color: #365967; }
.pd-studio input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), .pd-studio select, .pd-studio textarea { border-color: #cbdbe2; border-radius: 9px; background-color: #fff; color: #244b5e; min-height: 46px; }
.pd-studio input[type=color] { height: 46px; border-color: #cbdbe2; border-radius: 9px; padding: 5px; }
.pd-studio input[type=color]::-webkit-color-swatch-wrapper { padding: 1px; }
.pd-studio input[type=color]::-webkit-color-swatch { border: 0; border-radius: 5px; }
.pd-d-field > span { color: var(--d-muted); font-size: 12px; line-height: 1.55; }
.pd-d-control-grid { gap: 8px; margin: 18px 0; }
.pd-d-control-grid button { font-size: 12px; min-height: 44px; padding: 9px 8px; border-color: #dce5e9; background: #fbfcfc; }
.pd-d-inline > button { min-height: 44px; }
.pd-d-empty { padding: 12px 0 18px; }
.pd-d-empty > span { font-size: 30px; color: #c98042; }
.pd-d-empty h3 { font-size: 22px; line-height: 1.3; margin: 12px 0; }
.pd-d-empty p { font-size: 14px; line-height: 1.7; }
.pd-d-layers { margin-top: 24px; padding-top: 8px; border-top-color: #e3ebee; }
.pd-d-layers h3 { font-size: 14px; margin: 16px 0 12px; }
.pd-d-layers > button { min-height: 44px; padding: 10px 12px; border-color: #e3e9ec; background: #fafcfc; border-radius: 9px; font-size: 12px; }
.pd-d-layers > button[aria-pressed=true] { background: #eaf5f9; border-color: #8cbccf; box-shadow: none; }
.pd-d-layers > button > span { color: #6b8d9b; }
#pd-shirt-settings { margin-top: 28px; padding-top: 24px; border-top: 1px solid #e2e9ec; }
.pd-d-shirt-heading { margin-bottom: 18px; padding: 14px; border: 1px solid #f0dfcc; border-radius: 12px; background: #fff8f0; }
.pd-d-shirt-heading .pd-d-tab-number { background: #f7e2ca; color: #95602f; }
.pd-d-shirt-heading h3 { font-size: 16px; }
.pd-d-colors { gap: 8px; }
.pd-d-colors button { min-height: 46px; padding: 9px 12px; background: #fff; font-size: 13px; }
.pd-d-colors span { width: 23px; height: 23px; box-shadow: inset 0 0 0 2px #fff; border-color: #c4d3da; }
.pd-d-size-rows { gap: 12px; }
.pd-d-size-row { grid-template-columns: minmax(0, 1fr) 83px 38px; gap: 8px; padding: 12px; border: 1px solid #e1e9ed; border-radius: 11px; background: #f8fafb; }
.pd-d-size-row label { font-size: 11px; color: #627d8a; gap: 6px; }
.pd-d-size-row input { text-align: center; font-variant-numeric: tabular-nums; }
.pd-d-size-row button { background: transparent; border-color: transparent; color: #936e5e; }
.pd-d-size-row button:hover { background: #fff0e9; border-color: #eed9cd; color: #a34328; }
.pd-d-add-size { border-style: dashed !important; color: #39768d !important; background: #fff !important; min-height: 44px; }
.pd-d-add-size:hover { background: #f0f7fa !important; }

/* A single, calm next-action bar; existing review and checkout are unchanged. */
.pd-d-bottom { padding: 18px 22px; gap: 18px; border-top-color: #e1e9ed; border-radius: 0 0 var(--studio-radius) var(--studio-radius); background: #fff; }
.pd-d-bottom-actions { gap: 9px; align-items: center; }
.pd-d-bottom-actions > button:not(.pd-d-primary) { border-color: #e2e8eb; font-size: 12px; color: #537381; background: #fff; }
.pd-d-bottom-actions > .pd-d-primary { min-height: 50px; padding-inline: 22px; font-size: 14px; }
.pd-d-notice { border-left: 3px solid #d9a36f; background: #fdf8f2; color: #765c47; padding: 16px 20px; font-size: 13px !important; }
.pd-d-review-images article { padding: 22px; border-color: #dfe8ec; border-radius: 16px; box-shadow: 0 6px 24px rgb(24 60 76 / 4%); }
.pd-d-review-images svg { background: #f3f6f7; border-radius: 11px; }
.pd-d-order-summary { border-color: #dce8ee; background: #f3f8fa; border-radius: 16px; }
.pd-d-order-summary h3 { font-size: 20px; }
.pd-d-production { background: #f5f9fb; border-color: #d3e2e9 !important; border-radius: 14px; }
.pd-d-production .pd-d-check { padding: 12px; border: 1px solid #e4edf1; border-radius: 10px; }
.pd-pickup { border-color: #dce7ec; border-radius: 16px; padding: 22px; }
.pd-pickup-selection { background: #edf6fa; border-left-color: #1581a2; border-radius: 10px; }

@media (max-width: 1180px) {
  .pd-d-workspace { grid-template-columns: minmax(0, 1fr) 315px; }
  .pd-d-toolbar { gap: 10px; padding: 14px 18px; }
  .pd-d-toolbar-end { gap: 12px; }
  .pd-d-toolbar .pd-d-creation .pd-d-add { padding-inline: 9px; }
  .pd-d-workspace > .pd-d-properties { padding: 22px 18px; }
  .pd-d-textbar { gap: 14px; padding-inline: 18px; }
  .pd-d-size-row { grid-template-columns: minmax(0, 1fr) 73px 34px; padding: 10px; gap: 6px; }
}
@media (max-width: 850px) {
  .pd-d-workspace { grid-template-columns: 1fr; }
  .pd-d-toolbar { min-height: 0; padding: 16px; }
  .pd-d-toolbar-end { flex-basis: 100%; padding-top: 10px; border-top: 1px solid #e8eef1; }
  .pd-d-top-price { border-left: 0; padding-left: 0; }
  .pd-d-workspace > .pd-d-stage { padding: 24px 14px 12px; height: clamp(480px, 72svh, 630px); }
  .pd-d-workspace > .pd-d-properties { border-left: 0; padding: 26px; max-height: none; }
  .pd-d-textbar { padding: 18px; gap: 18px; }
  .pd-d-textbar .pd-d-font-choice { margin: -8px 0 -8px; }
  .pd-d-stage > .pd-d-zoom { margin: 8px 0 10px; }
  .pd-d-size-row { grid-template-columns: minmax(0, 1fr) 110px 42px; padding: 12px; gap: 10px; }
  .pd-d-bottom { padding: 20px; }
}
@media (max-width: 560px) {
  .pd-studio { margin-top: 18px; --studio-radius: 15px; }
  .pd-d-steps { gap: 13px; margin-bottom: 18px; }
  .pd-d-steps button { font-size: 13px !important; gap: 8px; }
  .pd-d-steps button + button { margin-left: 0; }
  .pd-d-steps span { width: 27px; height: 27px; }
  .pd-d-toolbar { padding: 12px; gap: 10px; }
  .pd-d-side { width: 100%; padding: 4px; }
  .pd-d-side button { min-height: 42px; font-size: 13px; }
  .pd-d-toolbar .pd-d-creation { width: 100%; gap: 7px; }
  .pd-d-toolbar .pd-d-creation .pd-d-add { flex: 1; padding: 8px 6px; min-height: 46px; gap: 5px; }
  .pd-d-toolbar .pd-d-creation .pd-d-add > .pd-d-tool-icon { width: 26px; height: 26px; }
  .pd-d-toolbar .pd-d-tool-icon svg { width: 19px; height: 19px; }
  .pd-d-toolbar .pd-d-tool-label { font-size: 12px; }
  .pd-d-toolbar .pd-d-shapes { left: 0; width: min(310px, calc(100vw - 50px)); padding: 12px; }
  .pd-d-toolbar-end { padding-top: 9px; }
  .pd-d-history button { min-height: 42px; width: 42px; }
  .pd-d-top-price strong { font-size: 25px; }
  .pd-d-textbar { padding: 16px 14px; gap: 16px; }
  .pd-d-textbar .pd-d-font-choice { padding: 10px; margin: 0; }
  .pd-d-textbar .pd-d-text-content textarea { height: 68px; min-height: 68px; }
  .pd-d-workspace > .pd-d-stage { padding: 18px 8px 10px; height: clamp(440px, 70svh, 570px); }
  .pd-d-workspace > .pd-d-properties { padding: 22px 18px; }
  .pd-d-section-heading { padding-bottom: 16px; }
  .pd-d-shirt-heading { padding: 13px; }
  .pd-d-size-row { grid-template-columns: minmax(0, 1fr) 82px 38px; gap: 7px; padding: 10px; }
  .pd-d-bottom { padding: 16px; }
  .pd-d-bottom-actions { gap: 10px; }
  .pd-d-bottom-actions > button:not(.pd-d-primary) { min-height: 44px; font-size: 13px; }
  .pd-d-bottom-actions > .pd-d-primary { min-height: 52px; font-size: 15px; }
  .pd-d-review-images article { padding: 14px 8px; }
  .pd-pickup { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .pd-studio button { transition: none; }
}
