:root {
  --accent: #1f5eff;
  --bg: #f4f5f7;
  --card: #ffffff;
  --line: #e3e6ea;
  --ink: #15171a;
  --brand: #0077c8;   /* PMS 3005 C */
  --muted: #6b7280;
  --warn: #9a4a06;
  --warn-bg: #fff4e5;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; color: inherit; }
/* Opening the color list (or other expanding parts) shouldn't make the page jump. */
html, body { overflow-anchor: none; }

/* ── Header ─────────────────────────────── */
.topbar { background: var(--card); border-bottom: 1px solid var(--line); }
.topbar-inner {
  max-width: 1200px; margin: 0 auto; padding: 14px 16px;
  display: flex; align-items: baseline; justify-content: center; gap: 12px; flex-wrap: wrap; text-align: center;
}
.brand { font-weight: 800; font-size: 18px; letter-spacing: -0.01em; color: var(--brand); }
.tagline { color: var(--muted); font-size: 14px; }
.tagline:empty { display: none; }

/* ── Progress (Design → Sizes → Review) ──── */
.progress { background: var(--card); border-bottom: 1px solid var(--line); }
.progress ol {
  max-width: 1200px; margin: 0 auto; padding: 14px 16px; list-style: none;
  display: flex; align-items: center; justify-content: center;
}
.progress li[data-page] button {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  border: 0; background: none; cursor: pointer; padding: 0 4px;
}
.pnum {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: #c4c9d1; color: #fff; font-size: 13px; font-weight: 700;
  transition: background .2s, box-shadow .2s;
}
.plabel { font-size: 13px; font-weight: 600; color: var(--muted); }
.progress li.current .pnum { background: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 20%, transparent); }
.progress li.current .plabel { color: var(--brand); }
.progress li.done .pnum { background: var(--brand); }
.progress li.done .plabel { color: var(--ink); }
.pline { width: clamp(32px, 9vw, 90px); height: 2px; margin: 0 10px 20px; background: #d5d9df; border-radius: 2px; }
.pline.done { background: var(--brand); }

/* ── Layout ─────────────────────────────── */
.layout {
  max-width: 1200px; margin: 0 auto; padding: 24px 16px 48px;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 24px; align-items: start;
}
.stage-wrap { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 12px; }

.stage {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  padding: 5%;
  background: radial-gradient(ellipse at 50% 40%, #ffffff 0%, #eceef2 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
#mockup { width: 100%; height: 100%; display: block; user-select: none; -webkit-user-select: none; }
#mockup.has-design { touch-action: none; }
.stage.dragover::after {
  content: "Drop to place your design";
  position: absolute; inset: 10px;
  display: flex; align-items: center; justify-content: center;
  border: 2px dashed var(--accent); border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--accent); font-weight: 600;
}

.stage-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.caption { margin: 0; color: var(--muted); font-size: 13px; }

/* Garment details under the mockup (Design step only) */
.garment-notes { display: none; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
body[data-page="design"] .garment-notes:not(:empty) { display: block; }
.garment-notes h3 { margin: 0 0 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.garment-notes ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; color: var(--ink); }
.garment-notes li::marker { color: var(--brand); }

/* ── Controls ───────────────────────────── */
.seg { display: inline-flex; background: #e9ebef; border-radius: 999px; padding: 3px; }
.seg button {
  border: 0; background: transparent; cursor: pointer;
  padding: 7px 16px; border-radius: 999px;
  font-weight: 600; font-size: 14px; color: var(--muted);
  display: inline-flex; align-items: center; gap: 6px;
}
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.seg .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.btn {
  border: 1px solid var(--line); background: #fff; cursor: pointer;
  padding: 8px 14px; border-radius: 10px;
  font-weight: 600; font-size: 14px;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn:hover { border-color: #c4c9d1; }
.btn.danger { color: #b91c1c; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; padding: 10px 18px; }
.btn.primary:hover { background: color-mix(in srgb, var(--brand) 88%, #000); border-color: transparent; }

/* Back / Continue bar */
.action-bar {
  position: sticky; bottom: 12px; z-index: 4;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(16, 24, 40, .08);
}
.ab-price { display: flex; flex-direction: column; line-height: 1.2; }
.ab-price strong { font-size: 18px; font-weight: 800; }
.ab-price strong small { font-size: 13px; font-weight: 500; color: var(--muted); }
.ab-price span { font-size: 12px; color: var(--muted); }
.ab-buttons { display: flex; gap: 8px; margin-left: auto; }

/* Editing the design (print box, handles, upload prompt) only happens on the Design step. */
body:not([data-page="design"]) #uiLayer { display: none; }
body:not([data-page="design"]) #mockup { pointer-events: none; }

/* Review summary */
.summary { margin: 0; }
.summary > div {
  display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 10px; align-items: baseline;
  padding: 10px 0; border-top: 1px solid var(--line);
}
.summary > div:first-child { border-top: 0; padding-top: 0; }
.summary dt { font-size: 12px; font-weight: 600; color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.summary .muted { color: var(--muted); font-weight: 500; }
.sum-swatch { display: inline-block; width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; border-radius: 50%; border: 1px solid rgba(0,0,0,.18); }
.link { border: 0; background: none; padding: 0; color: var(--brand); font-size: 13px; font-weight: 600; cursor: pointer; }
.link:hover { text-decoration: underline; }
.link.danger { color: #b91c1c; }

/* Quote (Review step) */
.quote-list { display: flex; flex-direction: column; gap: 10px; }
.quote-item {
  display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 12px; align-items: start;
  padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.qi-media { position: relative; width: 76px; height: 76px; border-radius: 10px; background: #f2f3f5; }
.qi-photo { width: 100%; height: 100%; object-fit: contain; display: block; }
.qi-art {
  position: absolute; right: -6px; bottom: -6px; width: 34px; height: 34px; object-fit: contain;
  background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 2px;
}
.qi-title { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.qi-num {
  width: 20px; height: 20px; flex: none; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--brand); color: #fff; font-size: 11px;
}
.qi-line { font-size: 13px; color: var(--ink); margin-top: 3px; overflow-wrap: anywhere; }
.qi-line b { font-weight: 600; color: var(--muted); }
.qi-line .muted { color: var(--muted); }
.qi-problem { margin-top: 6px; padding: 4px 8px; display: inline-block; border-radius: 6px; background: var(--warn-bg); color: var(--warn); font-size: 12px; font-weight: 600; }
.qi-side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.qi-totals { display: flex; flex-direction: column; align-items: inherit; gap: 2px; }
.qi-file { font-weight: 600; }
.qi-detail { color: var(--muted); }
.qi-detail::before { content: " · "; }
.qi-price { font-weight: 800; font-size: 16px; }
.qi-sub { font-size: 12px; color: var(--muted); }
.qi-actions { display: flex; gap: 10px; margin-top: 6px; }
.add-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.add-row .btn { border-style: dashed; color: var(--brand); }
/* Send quote request */
.form-intro { margin: -6px 0 14px; color: var(--muted); font-size: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; }
.form-grid label.full { grid-column: 1 / -1; }
.form-grid input, .form-grid textarea {
  padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff;
  font: 400 14px/1.4 Inter, system-ui, sans-serif; color: var(--ink);
}
.form-grid input:focus, .form-grid textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: transparent; }
.req { color: #b91c1c; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-error { margin: 12px 0 0; padding: 8px 12px; border-radius: 9px; background: #fdecec; color: #9b1c1c; font-size: 13px; }
.submit-btn { margin-top: 14px; width: 100%; justify-content: center; font-size: 15px; padding: 12px 18px; }
.submit-btn:disabled { opacity: .6; cursor: progress; }
.sent { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.sent h2 { color: var(--brand); }
.sent p { margin: 0 0 12px; font-size: 14px; }
@media (max-width: 520px) { .form-grid { grid-template-columns: 1fr; } }

/* Quote breakdown */
.fine-print { margin: 10px 0 0; padding-left: 16px; font-size: 11.5px; line-height: 1.5; opacity: .8; }
.link.on-blue { margin-top: 12px; color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.quote-breakdown summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
}
.quote-breakdown summary::-webkit-details-marker { display: none; }
.quote-breakdown summary::after { content: "▾"; font-size: 14px; color: var(--muted); transition: transform .2s; }
.quote-breakdown[open] summary::after { transform: rotate(180deg); }
.quote-breakdown[open] summary { margin-bottom: 14px; }
.bd-product + .bd-product, .bd-summary { margin-top: 18px; }
.bd-product h3 { margin: 0 0 8px; font-size: 14px; font-weight: 700; }
.bd-includes { margin: 0 0 8px; font-size: 12.5px; color: var(--muted); }
.bd-product h3 span { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-top: 2px; }
.bd-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.bd-table th { padding: 0 0 6px; text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.bd-table td { padding: 6px 0; border-top: 1px solid var(--line); vertical-align: top; }
.bd-table th:nth-child(n+2), .bd-table td:nth-child(n+2) { text-align: right; padding-left: 10px; white-space: nowrap; }
.bd-table td:first-child { overflow-wrap: anywhere; }
.bd-table tfoot td { font-weight: 700; border-top: 2px solid var(--ink); }
.bd-table tfoot small { font-weight: 500; color: var(--muted); }
.bd-table tfoot td[colspan] { text-align: left; }
.bd-summary tfoot td { font-size: 15px; color: var(--brand); border-top-color: var(--brand); }

.pick-count { font-size: 11px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 520px) {
  .quote-item { grid-template-columns: 60px minmax(0, 1fr); row-gap: 10px; }
  .qi-media { width: 60px; height: 60px; }
  .qi-title { font-size: 14px; line-height: 1.3; }
  /* Art line: file name on its own line (shortened with …), details beneath */
  .qi-file { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
  .qi-detail { display: block; }
  .qi-detail::before { content: none; }
  /* Footer: price on the left, Edit / Remove buttons on the right */
  .qi-side {
    grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center;
    gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); text-align: left;
  }
  .qi-totals { align-items: flex-start; }
  .qi-actions { margin-top: 0; gap: 6px; }
  .qi-actions .link {
    padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-decoration: none;
  }
  .qi-actions .link.danger { border-color: #f1c7c7; }
}

.panel { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.page { display: flex; flex-direction: column; gap: 14px; }
.page[hidden] { display: none; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.step h2 {
  margin: 0 0 14px; display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
}
.step h2 .h2-value { color: var(--brand); }
.step h2 .aside { margin-left: auto; font-weight: 500; font-size: 13px; color: var(--muted); }

/* Garments */
/* Garment step (catalog) — the mockup column is hidden and the catalog spans the page */
body[data-page="garment"] .layout { grid-template-columns: 1fr; }
body[data-page="garment"] .stage-wrap { display: none; }
.catalog-head h1 { margin: 4px 0 4px; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.catalog-head p { margin: 0; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips:empty { display: none; }
.chip {
  padding: 7px 14px; border-radius: 999px; cursor: pointer;
  background: #fff; border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--muted);
}
.chip:hover { border-color: #c4c9d1; }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }

.garment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.garment-card {
  display: flex; flex-direction: column; gap: 3px;
  padding: 14px; text-align: left; cursor: pointer;
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.garment-card:hover { border-color: #c4c9d1; box-shadow: 0 6px 18px rgba(16,24,40,.08); transform: translateY(-2px); }
.garment-card[aria-pressed="true"] {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}
.g-media { display: block; aspect-ratio: 1 / 1; margin-bottom: 10px; border-radius: 10px; background: radial-gradient(ellipse at 50% 40%, #fff 0%, #eef0f3 100%); }
.g-photo { width: 100%; height: 100%; object-fit: contain; display: block; }
.g-media { position: relative; }
.g-tag {
  position: absolute; top: 8px; left: 8px;
  padding: 4px 10px; border-radius: 999px;
  background: #e6007e; color: #fff;   /* hot pink */
  font-size: 12px; font-weight: 700; letter-spacing: .01em;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.g-brand { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.g-name { font-weight: 700; font-size: 16px; }
.g-dots { display: flex; align-items: center; gap: 4px; margin-top: 8px; overflow: hidden; }
.g-dots span { flex: none; }
.g-dots span { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); }
.g-dots em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.g-count { font-size: 12px; color: var(--muted); }

/* Selected garment header on the Design step */
.garment-pick { display: flex; align-items: center; gap: 14px; padding: 12px 14px; }
.pick-photo { width: 56px; height: 56px; object-fit: contain; flex: none; border-radius: 8px; background: #f2f3f5; }
.pick-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }

/* Colors */
.swatches { display: flex; flex-wrap: wrap; gap: 9px; }
.swatch {
  width: 30px; height: 30px; padding: 0; cursor: pointer;
  border-radius: 50%; border: 1px solid rgba(0,0,0,.18);
}
.swatch:hover { transform: scale(1.06); }
.swatch[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Upload / design */
.loc-row { display: flex; flex-direction: column; align-items: stretch; gap: 6px; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.loc-row .seg { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; border-radius: 14px; }
.loc-row .seg button { justify-content: center; }
.stage-bar .seg { flex-wrap: wrap; border-radius: 14px; }
.upload {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 24px; text-align: center; cursor: pointer;
  background: #fafbfc; border: 2px dashed #cfd4db; border-radius: 12px;
}
.upload:hover, .upload.dragover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, #fff); }
.upload svg { color: var(--accent); margin-bottom: 4px; }
.upload strong { font-weight: 600; }
.upload span { color: var(--muted); font-size: 13px; }

.design-card { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: center; }
.design-thumb {
  width: 64px; height: 64px; object-fit: contain;
  border: 1px solid var(--line); border-radius: 10px;
  background: repeating-conic-gradient(#eceef1 0% 25%, #fff 0% 50%) 0 0 / 12px 12px;
}
.design-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.design-meta { color: var(--muted); font-size: 13px; }
.warn { margin-top: 12px; padding: 8px 12px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); font-size: 13px; }
.ink-box { margin: 14px 0 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fafbfc; }
.ink-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ink-title { font-weight: 600; font-size: 14px; }
.ink-sub { font-size: 12px; color: var(--muted); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; }
.stepper button { width: 34px; height: 34px; border: 0; background: transparent; font-size: 18px; font-weight: 600; cursor: pointer; }
.stepper button:hover:not(:disabled) { background: #f0f2f5; }
.stepper button:disabled { opacity: .35; cursor: default; }
.stepper span { min-width: 84px; text-align: center; font-weight: 600; font-size: 14px; }
.ink-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ink-chips:empty { display: none; }
.ink-chip { width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgba(0,0,0,.15); }
.ink-note { font-size: 12px; color: var(--muted); }
.ink-chips { align-items: center; }
.ink-base { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink); }
.ink-plus { font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 2px; }
.base-chip { background: #fff; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.ink-total { margin-top: 8px; font-size: 12px; color: var(--muted); }
.ink-total:empty { display: none; }
.art-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.art-choice button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 10px 12px; text-align: left; cursor: pointer;
  background: #fff; border: 1.5px solid var(--line); border-radius: 10px;
}
.art-choice button:hover { border-color: #c4c9d1; }
.art-choice button[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.art-choice strong { font-size: 14px; font-weight: 600; }
.art-choice span { font-size: 12px; color: var(--muted); }
.ink-title-row { display: flex; align-items: center; gap: 6px; }
.info {
  position: relative; flex: none;
  width: 18px; height: 18px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: var(--brand); color: #fff;
  font: italic 700 11px/1 Georgia, serif; cursor: help;
}
.info .tip {
  position: absolute; z-index: 5; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  width: max-content; max-width: min(260px, 70vw);
  padding: 8px 10px; border-radius: 8px;
  background: var(--ink); color: #fff;
  font: 400 12px/1.4 Inter, system-ui, sans-serif;
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
  opacity: 0; visibility: hidden; transition: opacity .15s;
}
.info .tip::before {
  content: ""; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-bottom-color: var(--ink);
}
.info:hover .tip, .info:focus .tip { opacity: 1; visibility: visible; }
.placeholder.later { cursor: default; }
.ink-disclaimer { margin: 10px 0 0; padding-top: 8px; border-top: 1px solid var(--line); font-size: 11px; font-style: italic; color: var(--muted); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* Sizes */
.size-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 8px; }
.size-cell {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 6px; border: 1px solid var(--line); border-radius: 10px;
}
.size-cell span { font-weight: 700; font-size: 13px; }
.size-cell input {
  width: 100%; padding: 6px 4px; text-align: center; font-weight: 600;
  border: 1px solid var(--line); border-radius: 8px;
}
.size-cell input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }

/* Price */
.price-card { background: var(--brand); color: #fff; border-radius: var(--radius); padding: 20px; }
.price-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.price-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; opacity: .65; margin-bottom: 6px; }
.price-each { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.price-each small { margin-left: 4px; font-size: 14px; font-weight: 500; opacity: .7; letter-spacing: 0; }
.price-total { text-align: right; font-size: 22px; font-weight: 700; line-height: 1.1; }
.price-total small { display: block; font-size: 12px; font-weight: 500; opacity: .7; }
.price-note { margin: 14px 0 0; font-size: 13px; opacity: .8; }
.price-save { margin: 10px 0 0; padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,.1); font-size: 13px; }
.price-min { margin: 10px 0 0; padding: 8px 10px; border-radius: 8px; background: #fbbf24; color: #3b2600; font-size: 13px; font-weight: 600; }
.size-prices { width: 100%; margin-top: 16px; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.size-prices th { padding: 0 0 6px; text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; opacity: .55; }
.size-prices td { padding: 5px 0; border-top: 1px solid rgba(255,255,255,.12); font-weight: 600; }
.size-prices th:nth-child(n+2), .size-prices td:nth-child(n+2) { text-align: right; }
.size-prices td[colspan] { text-align: left; }

/* SVG editor UI (not included in downloads) */
.print-guide, .center-line, .sel-box, .sel-handle { vector-effect: non-scaling-stroke; }
.print-guide { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 6 5; opacity: .55; pointer-events: none; }
.center-line { stroke: var(--accent); stroke-width: 1.5; opacity: 0; pointer-events: none; }
.center-line.show { opacity: .9; }
.sel-box { fill: none; stroke: var(--accent); stroke-width: 1.5; pointer-events: none; }
.sel-handle { fill: #fff; stroke: var(--accent); stroke-width: 3; cursor: nwse-resize; }
.sel-delete { cursor: pointer; }
.sel-delete circle { fill: #e5484d; stroke: #fff; stroke-width: 2.5; }
.sel-delete path { stroke: #fff; stroke-width: 2.5; stroke-linecap: round; fill: none; }
.sel-delete:hover circle { fill: #c9363b; }
.design-img { cursor: move; }
.placeholder { cursor: pointer; }

.toast {
  position: fixed; left: 50%; bottom: 20px; z-index: 10;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 10px 16px; border-radius: 10px;
  background: var(--ink); color: #fff; font-size: 14px;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 700px) {
  .layout { grid-template-columns: 1fr; padding-top: 16px; }
  .stage-wrap { position: static; }
  /* Stacked: mockup first, then the controls, then the garment details last */
  .layout { display: flex; flex-direction: column; }
  .stage-wrap { display: contents; }
  .stage { order: 1; }
  .stage-bar { order: 2; }
  .caption { order: 3; }
  .panel { order: 4; }
  .garment-notes { order: 5; }
}

/* Color dropdown (phones only — desktop uses the swatch grid) */
.color-select { display: none; }
.cs-toggle {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
  font-size: 15px; font-weight: 600; cursor: pointer; text-align: left;
}
.cs-toggle[aria-expanded="true"] { border-color: var(--brand); }
.cs-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-caret { color: var(--muted); transition: transform .15s; }
.cs-toggle[aria-expanded="true"] .cs-caret { transform: rotate(180deg); }
.cs-dot { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 1px solid rgba(0,0,0,.18); }
.cs-list {
  position: relative; list-style: none; margin: 6px 0 0; padding: 4px; max-height: 300px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  box-shadow: 0 6px 18px rgba(16,24,40,.08); overscroll-behavior: contain;
}
.cs-list li { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 8px; font-size: 15px; cursor: pointer; }
.cs-list li:hover { background: #f3f5f8; }
.cs-list li[aria-selected="true"] { background: color-mix(in srgb, var(--brand) 9%, #fff); font-weight: 600; }
.cs-list li[aria-selected="true"]::after { content: "✓"; margin-left: auto; color: var(--brand); font-weight: 700; }

/* ── Phones ─────────────────────────────── */
@media (max-width: 600px) {
  .topbar-inner { padding: 12px 16px; }
  .brand { font-size: 17px; }
  .progress ol { padding: 10px 12px; }
  .pnum { width: 26px; height: 26px; font-size: 12px; }
  .plabel { font-size: 12px; }
  .pline { margin: 0 6px 18px; }

  .layout { gap: 14px; padding: 14px 12px 96px; }   /* room for the bottom bar */
  .catalog-head h1 { font-size: 22px; }
  .catalog-head p { font-size: 14px; }

  /* Category filters: wrap onto rows so every filter is always visible (no sideways swiping) */
  .chips { gap: 6px; }
  .chip { padding: 7px 12px; font-size: 13px; }

  /* Catalog: two compact cards per row */
  .garment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .garment-card { padding: 10px; border-radius: 12px; min-width: 0; }
  .garment-card:hover { transform: none; }
  .g-media { margin-bottom: 8px; }
  .g-tag { top: 6px; left: 6px; padding: 3px 8px; font-size: 10.5px; }
  .g-brand { font-size: 10px; }
  .g-name { font-size: 14px; line-height: 1.25; }
  .g-dots span { width: 11px; height: 11px; }
  .g-dots em { font-size: 11px; }

  /* Bottom bar: one slim row pinned to the screen edge */
  .action-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    flex-wrap: nowrap; gap: 10px; border-radius: 0; border-width: 1px 0 0;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 16px rgba(16, 24, 40, .08);
  }
  .ab-price { min-width: 0; }
  .ab-price strong { font-size: 16px; white-space: nowrap; }
  .ab-price span { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ab-buttons { flex: none; gap: 6px; }
  .ab-buttons .btn { padding: 10px 12px; }
  .ab-buttons .btn.primary { padding: 11px 14px; }

  /* Sizes & Review: a smaller mockup so the inputs and quote are in view */
  body[data-page="sizes"] .stage, body[data-page="review"] .stage { width: 62%; align-self: center; }
  body[data-page="sizes"] .caption, body[data-page="review"] .caption { display: none; }
  body[data-page="sizes"] .stage-bar, body[data-page="review"] .stage-bar { justify-content: center; }

  /* Colors: dropdown instead of the swatch grid */
  .swatches { display: none; }
  .color-select { display: block; }
  .step h2 #colorName { display: none; }   /* the dropdown already shows the selected color */

  /* Bigger, easier taps */
  .seg button { padding: 9px 12px; }
  .stage-bar { gap: 8px; }
  .stage-bar .seg { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; width: 100%; }
  .stage-bar .seg button { justify-content: center; }

  /* 16px text stops iPhones from zooming in when a box is tapped */
  .size-cell input, .form-grid input, .form-grid textarea { font-size: 16px; }
  .size-grid { grid-template-columns: repeat(4, 1fr); }

  .step { padding: 14px; }
  .price-each { font-size: 30px; }
  .toast { bottom: 90px; width: max-content; max-width: calc(100vw - 32px); }
  .g-name, .g-brand { overflow-wrap: anywhere; }
}

/* Very narrow screens and small embeds (e.g. a Wix mobile frame ~280px wide) */
@media (max-width: 360px) {
  .layout { padding-left: 10px; padding-right: 10px; }
  .chip { padding: 6px 10px; font-size: 12.5px; }
  .garment-grid { gap: 8px; }
  .garment-card { padding: 8px; }
  .g-tag { font-size: 9.5px; padding: 2px 7px; }
  .g-name { font-size: 13px; }
  .g-dots span { width: 9px; height: 9px; }
  .g-count { font-size: 11px; }
  .progress ol { padding: 8px 6px; }
  .plabel { font-size: 11px; }
  .pline { margin: 0 3px 16px; }
  .catalog-head h1 { font-size: 20px; }
  /* Bottom bar: keep only the buttons so they fit */
  .action-bar .ab-price { display: none; }
  .ab-buttons { margin-left: 0; width: 100%; }
  .ab-buttons .btn.primary { flex: 1; justify-content: center; }
  .loc-row .seg button { padding: 8px 6px; font-size: 13px; }
  .art-choice { grid-template-columns: 1fr; }
  .stepper span { min-width: 70px; }
  .step h2 { flex-wrap: wrap; row-gap: 2px; }
  .step h2 .aside { flex-basis: 100%; margin-left: 0; }
  .size-grid { grid-template-columns: repeat(3, 1fr); }
  .quote-item { grid-template-columns: 52px minmax(0, 1fr); gap: 10px; }
  .qi-media { width: 52px; height: 52px; }
}

/* ── Embedded in another site's iframe (the frame grows to fit, see app.js) ── */
/* The frame is as tall as the page, so nothing can pin to the screen: keep the bar in the flow
   and show messages next to it (app.js sets the toast's top). */
.embedded .toast { position: absolute; bottom: auto; }
@media (max-width: 600px) {
  .embedded .action-bar {
    position: static; border-width: 1px; border-radius: var(--radius);
    padding-bottom: 10px; box-shadow: 0 6px 20px rgba(16, 24, 40, .08);
  }
  .embedded .layout { padding-bottom: 16px; }
}
