/* Mockup Configurator — scoped under .mc-root so it can drop into any host site.
   No external dependencies. */

.mc-root {
  --mc-bg: #ffffff;
  --mc-panel: #ffffff;
  --mc-stage: #f5f5f3;         /* gaavoo off-white surface */
  --mc-ink: #09234b;           /* gaavoo navy */
  --mc-muted: #566481;         /* gaavoo slate */
  --mc-line: #e7e4f2;
  --mc-line-strong: #d3cde6;
  --mc-accent: #09234b;
  --mc-accent-soft: #eef0fb;
  --mc-primary: #09234b;       /* themeable: primary actions + selection (gaavoo navy) */
  --mc-primary-soft: #e8dfff;  /* themeable: selected-state background (gaavoo lavender) */
  --mc-lime: #e2ff0e;          /* gaavoo signal accent */
  --mc-violet: #5328d1;        /* gaavoo violet */
  --mc-good: #2f7d4f;
  --mc-radius: 14px;
  --mc-radius-sm: 9px;
  --mc-shadow: 0 1px 2px rgba(9, 35, 75, .05), 0 12px 32px -12px rgba(9, 35, 75, .2);
  --mc-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  all: revert;
  box-sizing: border-box;
  font-family: var(--mc-font);
  color: var(--mc-ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.45;
}
.mc-root *, .mc-root *::before, .mc-root *::after { box-sizing: border-box; }
.mc-root [hidden] { display: none !important; }

.mc-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 28px;
}

/* ---------- Product picker (first screen) ---------- */
.mc-picker { padding: 30px 28px 40px; max-width: 920px; margin: 0 auto; }
.mc-pick-head { text-align: center; margin-bottom: 30px; }
.mc-pick-head h3 { margin: 0 0 8px; font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.mc-pick-head p { margin: 0 auto; max-width: 440px; color: var(--mc-muted); font-size: 15px; line-height: 1.5; }
.mc-pick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.mc-pick-card { border: 1px solid var(--mc-line); border-radius: 18px; overflow: hidden; background: #fff; cursor: pointer; font-family: inherit; text-align: left; padding: 0;
  box-shadow: 0 14px 40px -26px rgba(20,22,26,.4); transition: transform .2s, box-shadow .2s; }
.mc-pick-card:hover { transform: translateY(-5px); box-shadow: 0 30px 60px -28px rgba(20,22,26,.5); }
.mc-pick-img { height: 440px; background-position: center; background-repeat: no-repeat; }
.mc-pick-img[data-fit="cover"] { background-size: cover; }
.mc-pick-img[data-fit="contain"] { background-size: contain; background-color: #f4f4f6; }
.mc-pick-body { padding: 20px 20px 22px; }
.mc-pick-body h4 { margin: 0 0 5px; font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.mc-pick-desc { font-size: 13px; color: var(--mc-muted); margin-bottom: 16px; }
.mc-pick-row { display: flex; align-items: center; justify-content: space-between; }
.mc-pick-min { font-size: 12.5px; font-weight: 600; color: var(--mc-muted); }
.mc-pick-go { display: inline-flex; align-items: center; gap: 7px; background: var(--mc-primary); color: #fff; font-weight: 700; font-size: 13.5px; padding: 10px 16px; border-radius: 100px; }
@media (max-width: 680px) { .mc-pick-grid { grid-template-columns: 1fr; } }

/* selected-product context chip (in the customizer) */
.mc-ctx { display: flex; align-items: center; gap: 12px; padding: 14px 2px; border-bottom: 1px solid var(--mc-line); margin-bottom: 4px; }
.mc-ctx-img { width: 42px; height: 42px; border-radius: 10px; flex: none; background: var(--mc-stage) center/cover no-repeat; border: 1px solid var(--mc-line); }
.mc-ctx-n { font-weight: 800; font-size: 15px; }
.mc-ctx-d { font-size: 12px; color: var(--mc-muted); }
.mc-ctx-chg { margin-left: auto; font-size: 12.5px; font-weight: 700; color: var(--mc-primary); background: var(--mc-primary-soft); border: none; cursor: pointer; font-family: inherit; padding: 8px 13px; border-radius: 100px; }
.mc-ctx-chg:hover { filter: brightness(.97); }
.mc-ctx-pf { display: inline-flex; align-self: flex-start; border: 1px solid var(--mc-line); border-radius: 100px; padding: 7px 8px 7px 14px; margin-bottom: 18px; box-shadow: 0 4px 14px -8px rgba(80,60,160,.4); }
.mc-ctx-pf .mc-ctx-n { font-weight: 700; font-size: 14px; }
.mc-ctx-pf .mc-ctx-chg { margin-left: 0; color: #fff; background: var(--mc-primary); padding: 6px 12px; }

/* ---------- Stage (left) ---------- */
.mc-stage-wrap { position: relative; }
.mc-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--mc-stage);
  border-radius: var(--mc-radius);
  overflow: hidden;
  box-shadow: var(--mc-shadow);
  user-select: none;
  isolation: isolate;
}
.mc-product {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;           /* never grab/drag the preview photo */
  -webkit-user-drag: none; user-select: none;
}
.mc-product-tint {
  position: absolute; inset: 0;
  mix-blend-mode: multiply;
  opacity: 0;
  transition: opacity .35s ease, background-color .35s ease;
  pointer-events: none;
  /* mask (when set) clips the dye to the product cutout; cover/center matches the photo */
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: cover; mask-size: cover;
}

/* placed logo */
.mc-logo {
  position: absolute;
  cursor: grab;
  touch-action: none;
  will-change: transform;
  display: none;
}
.mc-logo.dragging { cursor: grabbing; }
.mc-logo .mc-ink {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  mix-blend-mode: multiply;
  filter: url(#mc-weave);
}
/* fabric shading: the real product pixels behind the logo, masked to logo shape,
   so the print picks up the towel's true shadows + weave */
.mc-logo .mc-shade {
  position: absolute; inset: 0;
  background-repeat: no-repeat;
  mix-blend-mode: multiply;
  opacity: .55;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
  pointer-events: none;
}
.mc-logo .mc-handle {
  position: absolute;
  width: 14px; height: 14px;
  right: -7px; bottom: -7px;
  background: #fff;
  border: 1.5px solid var(--mc-ink);
  border-radius: 50%;
  cursor: nwse-resize;
  opacity: 0;
  transition: opacity .15s ease;
}
.mc-logo .mc-frame {
  position: absolute; inset: 0;
  border: 1px dashed rgba(20,22,26,.45);
  border-radius: 3px;
  opacity: 0;
  transition: opacity .15s ease;
}
.mc-stage:hover .mc-logo .mc-handle,
.mc-stage:hover .mc-logo .mc-frame,
.mc-logo.dragging .mc-handle,
.mc-logo.dragging .mc-frame { opacity: 1; }

.mc-stage-empty {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px; text-align: center;
  color: var(--mc-muted);
  padding: 24px;
  pointer-events: none;
}
.mc-stage-empty svg { opacity: .4; }

.mc-stage-bar {
  position: absolute;
  left: 14px; top: 14px;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(6px);
  border-radius: 100px;
  font-size: 12.5px; font-weight: 600;
  letter-spacing: .01em;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.mc-stage-hint {
  position: absolute;
  left: 50%; bottom: 14px;
  transform: translateX(-50%);
  font-size: 12px; color: var(--mc-muted);
  background: rgba(255,255,255,.9);
  padding: 6px 12px; border-radius: 100px;
  opacity: 0; transition: opacity .25s ease;
  pointer-events: none; white-space: nowrap;
}
.mc-stage.has-logo:hover .mc-stage-hint { opacity: 1; }

/* ---------- Sidebar (right): vertical stepper ---------- */
.mc-panel {
  background: var(--mc-panel);
  border: 1px solid var(--mc-line);
  border-radius: var(--mc-radius);
  box-shadow: var(--mc-shadow);
  padding: 8px 22px 22px;
  align-self: start;
  position: sticky; top: 20px;
}
@keyframes mc-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.mc-acc { display: flex; flex-direction: column; }
.mc-acc-step { border-top: 1px solid var(--mc-line); }
.mc-acc-step:first-child { border-top: none; }
.mc-acc-step.locked { opacity: .45; }
.mc-acc-head {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 16px 2px; background: none; border: none; cursor: pointer;
  font-family: inherit; text-align: left; color: var(--mc-ink);
}
.mc-acc-step.locked .mc-acc-head { cursor: default; }
.mc-acc-num {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
  background: var(--mc-accent-soft); color: var(--mc-muted);
  box-shadow: inset 0 0 0 1px var(--mc-line);
  transition: background .2s, color .2s;
}
.mc-acc-step.active .mc-acc-num,
.mc-acc-step.done .mc-acc-num { background: var(--mc-primary); color: #fff; box-shadow: none; }
.mc-acc-title { font-weight: 600; font-size: 14.5px; }
.mc-acc-sum {
  margin-left: auto; display: flex; align-items: center; gap: 7px;
  font-size: 13px; color: var(--mc-muted); font-weight: 500;
  max-width: 160px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.mc-acc-dot { width: 13px; height: 13px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.mc-acc-chev { flex: none; margin-left: 6px; color: var(--mc-muted); display: grid; place-items: center; transition: transform .2s; }
.mc-acc-step.active .mc-acc-chev { transform: rotate(180deg); }
.mc-acc-step.active .mc-acc-sum,
.mc-acc-step.locked .mc-acc-chev { display: none; }
.mc-acc-body { padding: 2px 0 18px 2px; animation: mc-fade .25s ease; }

.mc-cta {
  width: 100%; margin-top: 18px; border: none; cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: 15px; border-radius: 100px;
  padding: 14px 20px; background: var(--mc-primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  transition: filter .15s, opacity .15s, transform .08s;
}
.mc-cta:hover { filter: brightness(1.12); }
.mc-cta:active { transform: translateY(1px); }
.mc-cta:disabled { opacity: .4; cursor: not-allowed; }
.mc-textbtn {
  width: 100%; margin-top: 10px; background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--mc-muted);
  padding: 8px;
}
.mc-textbtn:hover { color: var(--mc-ink); }

/* ---------- Playful layout (one question at a time) ---------- */
.mc-playful .mc-shell { grid-template-columns: .95fr 1.05fr; gap: 30px; align-items: stretch; }
.mc-pcard { position: relative; height: 100%; min-height: 680px; border-radius: 26px; overflow: hidden; box-shadow: 0 26px 60px -24px rgba(80,60,160,.4); }
.mc-playful .mc-stage { height: 100%; aspect-ratio: auto; border-radius: 26px; }
.mc-playful .mc-stage-bar { display: none; }
.mc-pbadge { position: absolute; z-index: 4; background: #fff; border-radius: 100px; padding: 8px 15px; font-weight: 800; font-size: 13px; box-shadow: 0 6px 16px rgba(0,0,0,.14); }
.mc-pbadge.t1 { top: 16px; left: 16px; }

.mc-ask { display: flex; flex-direction: column; padding: 6px 2px; }
.mc-pprog { display: flex; gap: 7px; margin-bottom: 22px; }
.mc-pprog i { height: 8px; border-radius: 100px; flex: 1; background: var(--mc-line); transition: background .3s; }
.mc-pprog i.done { background: var(--mc-primary); }
.mc-pprog i.on { background: var(--mc-lime); }
.mc-pstepof { font-size: 13px; font-weight: 700; color: var(--mc-primary); margin-bottom: 6px; }
.mc-ask h3 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 4px; line-height: 1.07; }
.mc-ask .q-sub { font-size: 15px; color: var(--mc-muted); margin-bottom: 24px; line-height: 1.5; }
.mc-pbody { margin-bottom: auto; min-height: 320px; }
.mc-pfoot { display: flex; align-items: center; gap: 14px; margin-top: 28px; }
.mc-pback { width: 54px; height: 54px; border-radius: 50%; border: 2px solid var(--mc-line); background: #fff; cursor: pointer; color: var(--mc-muted); display: grid; place-items: center; flex: none; }
.mc-pback[disabled] { opacity: .4; cursor: default; }
.mc-pnext { flex: 1; justify-content: center; border: none; cursor: pointer; font-family: inherit; font-weight: 700; font-size: 16px; border-radius: 100px; padding: 17px; color: #fff;
  background: linear-gradient(135deg, var(--mc-primary), var(--mc-violet)); display: inline-flex; align-items: center; gap: 9px; transition: filter .15s, opacity .15s, transform .08s; }
.mc-pnext:hover { filter: brightness(1.08); }
.mc-pnext:active { transform: translateY(1px); }
.mc-pnext:disabled { opacity: .4; cursor: not-allowed; }

.mc-pbig { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.mc-pbig.cols2 { grid-template-columns: 1fr 1fr; }
.mc-pcardo { border-radius: 20px; padding: 14px; border: 2.5px solid transparent; cursor: pointer; background: #fff; font-family: inherit; text-align: left;
  box-shadow: 0 6px 16px -8px rgba(80,60,160,.22); display: flex; flex-direction: column; gap: 10px; transition: border-color .15s, box-shadow .15s, transform .08s; }
.mc-pcardo:hover { transform: translateY(-2px); }
.mc-pcardo.on { border-color: var(--mc-primary); box-shadow: 0 10px 26px -10px rgba(124,108,255,.5); }
.mc-pchip { height: 60px; border-radius: 13px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); background-size: cover; background-position: center; }
.mc-pcardo .nm { font-weight: 700; font-size: 14.5px; }
.mc-pcardo .px { font-size: 12px; color: var(--mc-muted); }

.mc-pdrop { border: 2.5px dashed var(--mc-line-strong); border-radius: 22px; padding: 42px 20px; text-align: center; cursor: pointer; background: #f7f6fc; transition: border-color .2s, background .2s; }
.mc-pdrop:hover, .mc-pdrop.over { border-color: var(--mc-primary); background: #fff; }
.mc-pdrop .mc-drop-ico { width: 48px; height: 48px; margin: 0 auto 12px; display: grid; place-items: center; background: #fff; border-radius: 50%; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.mc-pdrop strong { display: block; font-size: 15px; }
.mc-pdrop small { color: var(--mc-muted); font-size: 12.5px; }
.mc-pfile { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--mc-line); border-radius: 16px; }
.mc-pthumb { width: 54px; height: 54px; border-radius: 12px; background: var(--mc-stage) center/contain no-repeat; border: 1px solid var(--mc-line); flex: none; }
.mc-pfile-t .nm { font-weight: 700; font-size: 14.5px; }
.mc-pfile-t .px { font-size: 12.5px; color: var(--mc-good); }
.mc-pfile .mc-textbtn { width: auto; margin: 0 0 0 auto; font-size: 13px; }

.mc-psizes { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.mc-psizes.cols5 { grid-template-columns: repeat(5, 1fr); }
.mc-psizes button { padding: 18px 10px; border-radius: 16px; border: 2.5px solid var(--mc-line); background: #fff; font-weight: 700; cursor: pointer; font-family: inherit; font-size: 15px;
  display: flex; flex-direction: column; align-items: center; gap: 3px; transition: border-color .15s, background .15s; }
.mc-psizes button:hover { border-color: var(--mc-line-strong); }
.mc-psizes button.on { border-color: var(--mc-primary); background: var(--mc-primary-soft); }
.mc-psizes button small { font-weight: 500; color: var(--mc-muted); font-size: 11px; }

.mc-pqty { display: flex; align-items: center; justify-content: center; gap: 24px; padding: 14px 0; }
.mc-pqty button { width: 60px; height: 60px; border-radius: 50%; border: 2px solid var(--mc-line); background: #fff; font-size: 26px; cursor: pointer; color: var(--mc-ink); font-family: inherit; }
.mc-pqty button:hover { border-color: var(--mc-primary); color: var(--mc-primary); }
.mc-pqty .num { font-size: 42px; font-weight: 800; min-width: 130px; text-align: center; font-variant-numeric: tabular-nums; }

@media (max-width: 880px) {
  .mc-playful .mc-shell { grid-template-columns: 1fr; }
  .mc-pcard { min-height: 0; aspect-ratio: 1/1; }
  .mc-playful .mc-stage { aspect-ratio: 1/1; }
  .mc-ask h3 { font-size: 26px; }
  .mc-pbig { grid-template-columns: 1fr 1fr; }
}

/* upload */
.mc-drop {
  border: 1.5px dashed var(--mc-line-strong);
  border-radius: var(--mc-radius-sm);
  padding: 30px 18px; text-align: center;
  cursor: pointer; transition: border-color .2s, background .2s;
  background: #f7f6fc;
}
.mc-drop:hover, .mc-drop.over { border-color: var(--mc-primary); background: #fff; }
.mc-drop .mc-drop-ico {
  width: 40px; height: 40px; margin: 0 auto 10px;
  display: grid; place-items: center;
  background: #fff; border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.mc-drop strong { display: block; font-size: 14px; }
.mc-drop small { color: var(--mc-muted); font-size: 12px; }
.mc-file {
  display: flex; align-items: center; gap: 10px;
  margin-top: 12px; padding: 10px 12px;
  border: 1px solid var(--mc-line); border-radius: var(--mc-radius-sm);
  font-size: 13px;
}
.mc-file .mc-thumb {
  width: 34px; height: 34px; border-radius: 7px;
  background: var(--mc-stage) center/contain no-repeat;
  flex: none; border: 1px solid var(--mc-line);
}
.mc-file .mc-ok { color: var(--mc-good); margin-left: auto; font-weight: 600; }
.mc-file button {
  background: none; border: none; cursor: pointer;
  color: var(--mc-muted); font-size: 16px; line-height: 1; padding: 2px;
}

/* product tiles */
.mc-tiles { display: grid; gap: 10px; }
.mc-tile {
  display: flex; align-items: center; gap: 14px;
  padding: 14px; border: 1.5px solid var(--mc-line);
  border-radius: var(--mc-radius-sm); cursor: pointer;
  transition: border-color .15s, background .15s;
  text-align: left; background: #fff; width: 100%;
}
.mc-tile:hover { border-color: var(--mc-line-strong); }
.mc-tile.sel { border-color: var(--mc-primary); background: var(--mc-primary-soft); }
.mc-tile .mc-tile-img {
  width: 52px; height: 52px; border-radius: 8px; flex: none;
  background: var(--mc-stage) center/cover no-repeat;
  border: 1px solid var(--mc-line);
}
.mc-tile .mc-tile-t { font-weight: 600; font-size: 14.5px; }
.mc-tile .mc-tile-s { font-size: 12px; color: var(--mc-muted); }
.mc-tile .mc-check {
  margin-left: auto; width: 20px; height: 20px; flex: none;
  border-radius: 50%; border: 1.5px solid var(--mc-line-strong);
  display: grid; place-items: center; color: #fff;
}
.mc-tile.sel .mc-check { background: var(--mc-primary); border-color: var(--mc-primary); }

/* color */
.mc-swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.mc-sw {
  width: 38px; height: 38px; border-radius: 50%;
  cursor: pointer; position: relative;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
  transition: transform .12s;
}
.mc-sw:hover { transform: scale(1.06); }
.mc-sw.sel::after {
  content: ""; position: absolute; inset: -4px;
  border-radius: 50%; border: 2px solid var(--mc-primary);
}
.mc-sw.custom {
  background: conic-gradient(from 0deg, #ff5f6d, #ffc371, #2ec5ce, #845ec2, #ff5f6d);
  display: grid; place-items: center; color: #fff;
}
.mc-pantone-row {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--mc-muted);
  margin-top: 4px;
}
.mc-pantone-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 10px 5px 5px; border: 1px solid var(--mc-line);
  border-radius: 100px; font-size: 12.5px; color: var(--mc-ink); font-weight: 600;
}
.mc-pantone-chip i { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }

/* pantone search popover */
.mc-pantone {
  margin-top: 12px; border: 1px solid var(--mc-line);
  border-radius: var(--mc-radius-sm); overflow: hidden;
  display: none;
}
.mc-pantone.open { display: block; animation: mc-fade .2s ease; }
.mc-pantone input {
  width: 100%; border: none; border-bottom: 1px solid var(--mc-line);
  padding: 11px 13px; font-size: 13.5px; font-family: inherit; outline: none;
}
.mc-pantone-list { max-height: 188px; overflow-y: auto; }
.mc-pantone-item {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 13px; cursor: pointer; font-size: 13px;
}
.mc-pantone-item:hover, .mc-pantone-item.sel { background: var(--mc-accent-soft); }
.mc-pantone-item i { width: 22px; height: 22px; border-radius: 5px; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.mc-pantone-item b { font-weight: 600; }
.mc-pantone-item span { color: var(--mc-muted); margin-left: auto; font-variant-numeric: tabular-nums; }

/* logo-finish toggle (tone-on-tone vs original) */
.mc-logofx { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--mc-line); }
.mc-logofx-l { font-size: 13px; color: var(--mc-muted); font-weight: 600; }
.mc-logofx-seg { display: inline-flex; background: var(--mc-accent-soft); border-radius: 100px; padding: 3px; gap: 3px; margin-left: auto; }
.mc-logofx-seg button { border: none; background: none; cursor: pointer; font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--mc-muted); padding: 7px 14px; border-radius: 100px; transition: background .15s, color .15s; }
.mc-logofx-seg button.on { background: #fff; color: var(--mc-ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* segmented (sizes) */
.mc-seg { display: grid; gap: 8px; grid-template-columns: 1fr 1fr 1fr; }
.mc-seg.cols-5 { grid-template-columns: repeat(5, 1fr); }
.mc-seg button {
  padding: 11px 8px; border: 1.5px solid var(--mc-line);
  border-radius: var(--mc-radius-sm); background: #fff; cursor: pointer;
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  transition: border-color .15s, background .15s;
}
.mc-seg button:hover { border-color: var(--mc-line-strong); }
.mc-seg button.sel { border-color: var(--mc-primary); background: var(--mc-primary-soft); }
.mc-seg button small { font-weight: 500; color: var(--mc-muted); font-size: 11px; }

/* quantity */
.mc-qty { display: flex; align-items: stretch; gap: 10px; }
.mc-qty .mc-stepper {
  display: flex; align-items: center; border: 1.5px solid var(--mc-line);
  border-radius: var(--mc-radius-sm); overflow: hidden; flex: 1;
}
.mc-qty .mc-stepper button {
  width: 46px; border: none; background: #fff; cursor: pointer;
  font-size: 20px; color: var(--mc-ink); font-family: inherit;
}
.mc-qty .mc-stepper button:hover { background: var(--mc-accent-soft); }
.mc-qty .mc-stepper input {
  flex: 1; border: none; text-align: center; font-size: 16px;
  font-weight: 600; font-family: inherit; outline: none; min-width: 0;
  -moz-appearance: textfield;
}
.mc-qty .mc-stepper input::-webkit-outer-spin-button,
.mc-qty .mc-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.mc-minline { font-size: 12px; color: var(--mc-muted); margin-top: 9px; }
.mc-minline.warn { color: #b4541a; font-weight: 600; }

/* summary */
.mc-summary { display: grid; gap: 1px; background: var(--mc-line); border-radius: var(--mc-radius-sm); overflow: hidden; border: 1px solid var(--mc-line); }
.mc-summary .row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 13px; background: #fff; font-size: 13.5px; }
.mc-summary .row dt { color: var(--mc-muted); }
.mc-summary .row dd { margin: 0; font-weight: 600; text-align: right; }
.mc-summary .row dd .mc-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; margin-right: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }

/* sent state */
.mc-sent { text-align: center; padding: 16px 8px; }
.mc-sent .mc-sent-ico {
  width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%;
  background: var(--mc-good); display: grid; place-items: center; color: #fff;
}
.mc-sent h3 { margin: 0 0 6px; font-size: 18px; }
.mc-sent p { margin: 0; color: var(--mc-muted); font-size: 13.5px; }

/* ---------- overlay / modal (widget opens in its own layer) ---------- */
.mc-overlay {
  position: fixed; inset: 0; z-index: 2147483000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(23, 20, 48, .5);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  animation: mc-ov-in .2s ease;
}
@keyframes mc-ov-in { from { opacity: 0 } to { opacity: 1 } }
.mc-modal {
  position: relative;
  width: 100%; max-width: 1120px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 40px 100px -24px rgba(23, 20, 48, .55);
  animation: mc-modal-in .28s cubic-bezier(.2, .8, .25, 1);
}
@keyframes mc-modal-in { from { opacity: 0; transform: translateY(14px) scale(.985) } to { opacity: 1; transform: none } }
.mc-modal .mc-shell { padding: 26px; }
.mc-modal-close {
  position: absolute; top: 16px; right: 16px; z-index: 3;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--mc-line); background: rgba(255,255,255,.9);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  cursor: pointer; display: grid; place-items: center; color: var(--mc-ink);
  box-shadow: 0 2px 10px rgba(0,0,0,.08); transition: background .15s, transform .08s;
}
.mc-modal-close:hover { background: var(--mc-accent-soft); }
.mc-modal-close:active { transform: scale(.94); }

@media (max-width: 880px) {
  .mc-shell { grid-template-columns: 1fr; gap: 18px; padding: 16px; }
  .mc-panel { position: static; }
  .mc-stage { aspect-ratio: 1 / 1; }
  .mc-overlay { padding: 0; }
  .mc-modal { max-width: 100%; max-height: 100vh; height: 100vh; border-radius: 0; }
}
