/* Poshak Studio: Suit Designer, Measurement Studio, presets, fabrics. Uses the Poshak Theme tokens. */
.pm-app[data-loading]{min-height:60vh}
.pm-suit svg{display:block;width:100%;height:auto}

/* Sideways rows: first item to the start, last to the end, every other one in the middle */
.hrow{display:flex;gap:20px;overflow-x:auto;scroll-snap-type:x mandatory;scroll-padding-inline:var(--gutter);padding-bottom:12px;scrollbar-width:thin}
.hrow > *{scroll-snap-align:center;flex:none}
.hrow > :first-child{scroll-snap-align:start}
.hrow > :last-child{scroll-snap-align:end}
@media (max-width:760px){.hrow{margin-inline:calc(var(--gutter) * -1);padding-inline:var(--gutter)}}

.preset{width:270px;background:var(--surface);border-radius:var(--radius);padding:20px;text-decoration:none;display:flex;flex-direction:column;gap:6px;box-shadow:var(--shadow);transition:box-shadow var(--t-fast)}
.preset:hover{box-shadow:var(--shadow-2)}
.preset .art{height:250px;display:grid;place-items:center;background:var(--bg);border-radius:var(--radius-sm);margin-bottom:12px}
.preset .art .pm-suit{width:auto;height:236px}
.preset .art .pm-suit svg{height:236px;width:auto}
.preset .ptitle{font-size:17px;font-weight:var(--hw);color:var(--head);letter-spacing:var(--hls)}
.preset .ptext{color:var(--muted);font-size:14px}
.preset .from{color:var(--accent);font-weight:500;font-size:14px;margin-top:4px}

.fabric-card{width:220px;text-decoration:none;display:flex;flex-direction:column}
.fabric-card .sw{height:150px;border-radius:14px;display:block}
.fabric-card .ftitle{font-size:16px;font-weight:var(--hw);color:var(--head);margin-top:12px;letter-spacing:var(--hls)}
.fabric-card .ftext{color:var(--muted);font-size:14px}

.teaser-card{background:var(--surface);border-radius:var(--radius);padding:28px;box-shadow:var(--shadow)}
.tc-in{display:flex;gap:32px;padding-bottom:18px;border-bottom:1px solid var(--line)}
.tc-in span{display:block;color:var(--muted);font-size:13px}
.tc-in strong{font-size:28px;color:var(--head);font-weight:var(--hw);letter-spacing:var(--hls)}
[dir="rtl"] .tc-in strong{font-size:24px}
.tc-list{display:grid;grid-template-columns:1fr 1fr;gap:0 28px;margin-top:8px}
.tc-list div{display:flex;justify-content:space-between;padding-block:11px;border-bottom:1px solid var(--line);font-size:15px;color:var(--muted)}
.tc-list b{font-weight:500;color:var(--ink)}
@media (max-width:760px){.tc-list{grid-template-columns:1fr}}

/* Designer */
.designer{display:grid;grid-template-columns:minmax(0,1fr) 440px;gap:44px;padding-bottom:80px;align-items:start}
.stage{position:sticky;top:96px;background:var(--surface);border-radius:var(--radius);padding:20px;display:flex;flex-direction:column;align-items:center;gap:16px;box-shadow:var(--shadow)}
.admin-bar .stage,.admin-bar .side{top:128px}
.stage .seg{width:200px}
.stage-art{width:100%;display:flex;justify-content:center}
.stage-art svg{width:100%;max-width:420px;height:auto;max-height:calc(100vh - 260px)}
.stage-meta{display:flex;justify-content:space-between;width:100%;gap:12px;font-size:14px;color:var(--muted);border-top:1px solid var(--line);padding-top:14px}
.stage-meta b{color:var(--ink);font-weight:500}
.opts{display:flex;flex-direction:column}
.grp{padding-block:24px;border-bottom:1px solid var(--line)}
.grp:first-child{padding-top:0}
.grp > h2{font-size:20px;margin-bottom:14px}
[dir="rtl"] .grp > h2{font-size:19px}
.opt{margin-top:18px}
.opt-label{display:flex;justify-content:space-between;align-items:baseline;gap:12px;font-weight:500;font-size:14px;color:var(--ink);margin-bottom:10px}
.opt-label span{font-weight:400;color:var(--muted)}
.tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(122px,1fr));gap:8px}
.tiles.fab{grid-template-columns:repeat(auto-fill,minmax(130px,1fr))}
.tile{border:0;background:var(--surface);border-radius:var(--radius-sm);padding:12px 14px;text-align:start;display:flex;flex-direction:column;gap:2px;box-shadow:inset 0 0 0 1px var(--line);transition:box-shadow var(--t-fast),background var(--t-fast)}
.tile:hover{box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 35%,var(--line))}
.tile b{font-weight:500;font-size:14px;color:var(--ink)}
.tile small{font-size:12.5px;color:var(--muted)}
.tile small.price{color:var(--ink)}
.tile[aria-checked="true"]{background:var(--accent-soft);box-shadow:inset 0 0 0 1.5px var(--accent)}
.tile[aria-checked="true"] b{color:var(--accent);font-weight:600}
.tile .chip{width:100%;height:46px;border-radius:8px;margin-bottom:8px;display:block}
.dots{display:flex;gap:10px;flex-wrap:wrap}
.dot{width:36px;height:36px;border-radius:50%;border:3px solid var(--bg);box-shadow:0 0 0 1px var(--line);padding:0;transition:box-shadow var(--t-fast)}
.dot[aria-checked="true"]{box-shadow:0 0 0 1.5px var(--accent)}
.text-in{width:100%;margin-top:12px;border:0;box-shadow:inset 0 0 0 1px var(--line);border-radius:var(--radius-sm);padding:12px 14px;font:inherit;background:var(--surface);color:var(--ink)}
.sum{position:sticky;bottom:0;background:var(--bg);padding-block:18px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-top:1px solid var(--line);z-index:5}
.sum span{display:block;font-size:13px;color:var(--muted)}
.sum strong{font-size:24px;color:var(--ink);font-weight:500}

/* Studio */
.studio{display:grid;grid-template-columns:380px minmax(0,1fr);gap:52px;padding-bottom:80px;align-items:start}
.side{position:sticky;top:96px}
.stp{padding-block:24px;border-bottom:1px solid var(--line)}
.stp:first-child{padding-top:0}
.stp-h{display:flex;align-items:center;gap:12px;margin-bottom:16px}
.stp-h i{font-style:normal;width:28px;height:28px;border-radius:50%;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center;font-size:13px;font-weight:600;flex:none}
.stp-h h2{font-size:19px}
[dir="rtl"] .stp-h h2{font-size:18px}
.field{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-block:8px}
.field label,.field .lbl{font-weight:500;font-size:15px}
.stepper{display:inline-flex;align-items:center;border-radius:999px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--line);height:44px;flex:none}
.stepper button{width:42px;height:42px;border:0;background:none;border-radius:50%;color:var(--accent);display:grid;place-items:center}
.stepper button:hover{background:var(--surface-2)}
.stepper input{width:60px;border:0;background:none;text-align:center;font:inherit;font-weight:500;color:var(--ink);font-variant-numeric:tabular-nums;padding:0}
.stepper .u{font-size:13px;color:var(--muted);width:40px;text-align:center}
.field .seg{flex:1;max-width:236px}
.qs{display:flex;flex-direction:column;gap:16px}
.q-label{font-size:14px;font-weight:500;margin-bottom:8px}
.shape-row{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.shape{border:0;background:var(--surface);border-radius:var(--radius-sm);padding:8px 6px 10px;display:flex;flex-direction:column;align-items:center;gap:4px;font-size:12.5px;color:var(--muted);box-shadow:inset 0 0 0 1px var(--line);transition:box-shadow var(--t-fast),background var(--t-fast)}
.shape svg{width:44px;height:44px;color:#C9C9CF}
.shape[aria-checked="true"]{background:var(--accent-soft);box-shadow:inset 0 0 0 1.5px var(--accent);color:var(--accent)}
.shape[aria-checked="true"] svg{color:var(--accent);opacity:.85}
.rev-head{display:flex;justify-content:space-between;align-items:end;gap:20px;flex-wrap:wrap;margin-bottom:10px}
.rev-head .stp-h{margin:0}
.prog{min-width:220px;flex:1;max-width:320px}
.prog-t{display:flex;justify-content:space-between;font-size:14px;color:var(--muted);margin-bottom:6px}
.prog-t b{color:var(--ink);font-weight:500}
.bar{height:5px;border-radius:3px;background:var(--surface-2);overflow:hidden}
.bar i{display:block;height:100%;background:var(--ok);width:0;transition:width .35s;border-radius:3px}
.notes{display:flex;gap:8px;flex-wrap:wrap;margin-block:14px 6px}
.pill{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;font-weight:500;border-radius:999px;padding:3px 10px;background:var(--surface-2);color:var(--muted)}
.pill.warn{background:var(--warn-soft);color:var(--warn)}
.pill.brass{background:color-mix(in srgb,var(--brass) 14%,var(--surface));color:var(--brass-ink)}
.warns{display:flex;flex-direction:column;gap:8px;margin-top:10px}
.warn-line{background:var(--warn-soft);color:var(--warn);border-radius:var(--radius-sm);padding:12px 16px;font-size:14px;font-weight:500}
.mgroup{margin-top:30px}
.mgroup > h3{font-size:17px;margin-bottom:12px}
.mrows{display:flex;flex-direction:column;gap:10px}
.mrow{display:grid;grid-template-columns:64px minmax(0,1fr) auto;gap:20px;align-items:center;background:var(--surface);border-radius:var(--radius);padding:20px;box-shadow:var(--shadow);transition:box-shadow .25s}
.mrow.done{box-shadow:var(--shadow),inset calc(3px * var(--dir)) 0 0 var(--ok)}
.mrow .fig{width:64px;height:128px}
.m-name{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.m-name b{font-size:16px;font-weight:500;color:var(--ink)}
.m-how{color:var(--muted);font-size:14px;margin-top:4px;max-width:52ch}
.m-note{font-size:12.5px;color:var(--brass-ink);margin-top:6px}
.m-note:empty{display:none}
.m-note.is-warn{color:var(--warn)}
.m-ctl{display:flex;flex-direction:column;align-items:end;gap:12px}
.save{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-top:30px;padding-top:24px;border-top:1px solid var(--line)}
.save .text-in{margin:0;max-width:260px}
.order{margin-top:30px;padding-top:24px;border-top:1px solid var(--line)}
.order-card{display:flex;gap:20px;align-items:center;background:var(--surface);border-radius:var(--radius);padding:20px;box-shadow:var(--shadow)}
.order-art{width:84px;flex:none;background:var(--bg);border-radius:var(--radius-sm);padding:8px}
.order-art svg{display:block;width:100%;height:auto}
.order-info{display:flex;flex-direction:column;gap:2px}
.order-info b{font-weight:600;color:var(--head)}
.order-info span{color:var(--muted);font-size:14px}
.order-info strong{font-weight:500;font-size:18px;margin-top:4px}
.order-info .link{display:inline-flex;align-items:center;gap:6px;color:var(--accent);font-size:14px;text-decoration:none;margin-top:6px}
.order-info .link .icon{width:16px;height:16px}
.order-msg{margin-block:16px;color:var(--muted);font-size:14px}
.order-msg.ok{color:var(--ok)}
.pm-toast{position:fixed;bottom:24px;inset-inline-start:50%;transform:translate(calc(-50% * var(--dir)),20px);background:var(--accent);color:var(--on-accent);padding:12px 20px;border-radius:999px;font-weight:500;opacity:0;pointer-events:none;transition:opacity .25s,transform .25s;z-index:50}
.pm-toast.on{opacity:1;transform:translate(calc(-50% * var(--dir)),0)}

@media (max-width:980px){
  .designer,.studio{grid-template-columns:1fr;gap:24px}
  .stage,.side{position:static}
  .stage-art svg{max-height:420px}
}
@media (max-width:760px){
  .mrow{grid-template-columns:52px minmax(0,1fr);gap:14px}
  .mrow .fig{width:52px;height:104px}
  .m-ctl{grid-column:1 / -1;flex-direction:row;justify-content:space-between;align-items:center;border-top:1px solid var(--line);padding-top:14px}
  .sum{bottom:64px;gap:12px}
  .sum strong{font-size:20px;white-space:nowrap}
  .sum .btn{padding:12px 16px;font-size:14px;flex:0 1 auto;min-width:0}
  .sum .btn .icon{display:none}
  .pm-toast{bottom:84px}
}
