/* theme.css — Caution Labels Awesomic + Shop theme for the Sign Maker & Cart builder.
   Every token inherits from site.css so the builder reads seamlessly as part of the page. */
.nb {
  --nb-bg: var(--canvas);         /* viewport zinc canvas */
  --nb-ink: var(--ink);           /* obsidian ink */
  --nb-surface: var(--paper);     /* crisp white cards on zinc canvas */
  --nb-surface-2: var(--canvas);  /* studio zinc plate backdrop */
  --nb-line: var(--rule);         /* 1px #ececee hairlines */
  --nb-line-2: #d4d4d8;           /* crisp zinc input borders */
  --nb-muted: var(--steel);       /* secondary text */
  --nb-dim: #52525b;              /* WCAG AA helper text */
  --nb-accent: var(--ink);        /* obsidian primary CTA */
  --nb-accent-ink: #ffffff;       /* white text on obsidian CTA */
  --nb-font: var(--f-body);
  --nb-font-head: var(--f-display);
  --nb-font-mono: var(--f-mono);
  --nb-radius: 28px;              /* generous Shop/Awesomic rounded cards */
  --nb-radius-sm: 14px;           /* Awesomic 14px inputs & controls */
  --nb-max: var(--wrap);
  --nb-gutter: 0px;
}

/* Primary & secondary buttons follow Awesomic obsidian 14px / pill styling */
.nb .btn { border-radius: var(--r-btn); font-weight: 600; }
.nb .btn-p { box-shadow: var(--sh-cta); }
.nb .btn-s { border-radius: var(--r-btn); border-color: var(--nb-line-2); }
.nb .nb-card { border: 1px solid var(--rule); box-shadow: var(--sh-card); }
.nb .nb-card.nb-step { border: 1px solid var(--rule); padding-top: 18px; }
.nb .nb-card legend, .nb .nb-card h3 { font-family: var(--f-display); font-weight: 600; letter-spacing: -0.02em; }
.nb .nb-preview { border: 1px solid var(--rule); box-shadow: var(--sh-card); }
.nb .nb-stage {
  border-radius: 20px; border: 1px solid var(--rule);
  background: radial-gradient(ellipse 72% 62% at 50% 46%, #ffffff 0%, #f4f4f5 72%, #ebebef 100%);
}
.nb .nb-stage svg { filter: drop-shadow(0 18px 16px rgba(9, 9, 11, .2)) drop-shadow(0 3px 4px rgba(9, 9, 11, .12)); }
.nb .nb-price { font-family: var(--f-display); font-weight: 600; letter-spacing: -0.025em; }

/* Swatches are tiny lamacoids: the plate colour, with the core colour showing as a rim */
.nb .nb-chip {
  display: inline-block; flex: none; width: 20px; height: 14px; margin-right: 8px; border-radius: 3px; vertical-align: -2px;
  box-shadow: inset 0 0 0 1.5px currentColor, 0 1px 1px rgba(0, 0, 0, .18);
}
.nb .nb-seg button { display: inline-flex; align-items: center; border-color: var(--nb-line-2); background: var(--paper); color: var(--ink); font-weight: 500; }
.nb .nb-seg button:hover { border-color: #a1a1aa; }
.nb .nb-seg button[aria-pressed=true] { background: var(--ink); color: #ffffff; border-color: var(--ink); font-weight: 600; }
.nb .nb-seg button[aria-pressed=true] .nb-chip { box-shadow: inset 0 0 0 1.5px currentColor, 0 0 0 1.5px rgba(255, 255, 255, .55); }
.nb .nb-plates { gap: 10px; }
.nb .nb-plates button { border-radius: 8px; padding: 3px; border: 2px solid transparent; }
.nb .nb-plates button:hover { border-color: var(--nb-line-2); }
.nb .nb-plates button[aria-pressed=true] { border-color: var(--nb-ink); }
.nb .nb-plates i {
  width: 46px; height: 30px; border-radius: 5px; font: 700 .8rem/1 var(--nb-font-head); letter-spacing: .02em;
  box-shadow: inset 0 0 0 2px currentColor, 0 1px 2px rgba(0, 0, 0, .2);
}

/* Step titles sit inside their card instead of on its border */
.nb .nb-step > legend { float: left; width: 100%; margin: 0 0 14px; }
.nb .nb-step > legend + * { clear: both; }
.nb .nb-custom input { font-variant-numeric: tabular-nums; }

/* Inputs: crisp zinc borders (#d4d4d8) with obsidian focus ring */
.nb .nb-field input, .nb .nb-field select, .nb textarea {
  min-height: 46px; padding: 11px 14px; border: 1px solid var(--nb-line-2); border-radius: var(--r-btn); background: var(--paper);
  font: 400 15px/1.35 var(--f-body); color: var(--ink); transition: border-color .2s, box-shadow .2s;
}
.nb textarea { width: 100%; min-height: 96px; resize: vertical; }
.nb .nb-field input:hover, .nb .nb-field select:hover, .nb textarea:hover { border-color: #a1a1aa; }
.nb .nb-field input:focus, .nb .nb-field select:focus, .nb textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--accent-ring); }
.nb .nb-field > span { font: 600 13px/1.3 var(--f-body); color: var(--ink); }
.nb .nb-field > span small { font-size: 12px; color: var(--steel); }
.nb .nb-checkout { gap: 24px; }
.nb .nb-co-head h2 { font-weight: 600; text-transform: none; letter-spacing: -0.025em; }
.nb .nb-checkout .nb-side { top: calc(var(--nav-h) + 16px); }
.nb .nb-summary { background: var(--paper); border: 1px solid var(--rule); box-shadow: var(--sh-card); }
.nb .nb-summary .btn-p { min-height: 50px; font-size: 15px; }
.nb button.link { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.nb button.link:hover { color: var(--steel); }

/* ---- Sign maker: header wording (all 6 on one clean desktop row), message lines, type controls ---- */
.nb .nb-words { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.nb .nb-words button { gap: 0; justify-content: center; padding: 0 6px; font-size: 13px; white-space: nowrap; }
@media (max-width: 640px) {
  .nb .nb-words { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.nb .nb-hdr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; margin-top: 14px; }
.nb .nb-tog {
  min-height: 46px; padding: 0 14px; border: 1px solid var(--nb-line-2); border-radius: var(--r-btn);
  background: var(--paper); color: var(--ink); font: 600 12px/1 var(--f-mono); letter-spacing: .03em; cursor: pointer; white-space: nowrap;
}
.nb .nb-tog:hover { border-color: var(--ink); }
.nb .nb-tog[aria-pressed=true] { background: var(--ink); color: #ffffff; border-color: var(--ink); }
.nb .nb-lines { display: grid; gap: 8px; }
.nb .nb-line { display: grid; grid-template-columns: 22px minmax(0, 1fr) 118px auto; gap: 8px; align-items: center; }
.nb .nb-ln { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--canvas); color: var(--steel); font: 600 11px/1 var(--f-mono); }
.nb .nb-line input, .nb .nb-line select {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--nb-line-2); border-radius: var(--r-btn);
  background: var(--paper); font: 400 15px/1.3 var(--f-body); color: var(--ink);
}
.nb .nb-line select { padding-right: 8px; font-size: 14px; }
.nb .nb-line input:focus, .nb .nb-line select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--accent-ring); }
.nb .nb-lbtns { display: inline-flex; gap: 2px; }
.nb .nb-lbtns button { display: grid; place-items: center; width: 32px; height: 36px; border: 0; border-radius: 8px; background: none; color: var(--steel); cursor: pointer; }
.nb .nb-lbtns button:hover:not([disabled]) { background: var(--canvas); color: var(--ink); }
.nb .nb-lbtns button[disabled] { opacity: .3; cursor: default; }
.nb .nb-addline {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 8px 14px 8px 10px;
  border: 1px dashed #a1a1aa; border-radius: 999px; background: none; color: var(--ink); font: 600 13px/1 var(--f-body); cursor: pointer;
}
.nb .nb-addline:hover { border-color: var(--ink); border-style: solid; }
.nb .nb-type { margin-top: 14px; align-items: start; }
.nb .nb-type .nb-seg button { min-height: 40px; }
.nb .nb-icons button { width: 44px; justify-content: center; padding: 0; }
.nb .nb-series { margin-top: 16px; flex-wrap: wrap; }
.nb .nb-check small { color: var(--nb-dim); font-size: 13px; }
@media (max-width: 560px) {
  .nb .nb-line { grid-template-columns: minmax(0, 1fr) 96px; }
  .nb .nb-ln { display: none; }
  .nb .nb-lbtns { grid-column: 1 / -1; justify-content: flex-end; margin-top: -4px; }
}

/* ---- Sign maker: the symbol picker (high-contrast obsidian active state!) ---- */
.nb .nb-pics {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px;
  max-height: 372px; overflow-y: auto; padding: 2px 4px 2px 2px; overscroll-behavior: contain; scrollbar-width: thin;
}
.nb .nb-pics-g { grid-column: 1 / -1; margin-top: 8px; font: 600 12px/1 var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--steel); }
.nb .nb-pics button {
  display: grid; place-items: center; aspect-ratio: 1; padding: 8px; border: 1px solid var(--nb-line-2); border-radius: 12px;
  background: var(--paper); color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s, color .15s;
}
.nb .nb-pics button:hover { border-color: #a1a1aa; background: var(--surface-2); }
.nb .nb-pics button[aria-pressed=true] { border-color: var(--ink); background: var(--ink); color: #ffffff; box-shadow: none; }
.nb .nb-pics svg { width: 100%; height: 100%; fill: currentColor; }
.nb .nb-pics .nb-pic-none { font: 600 11px/1 var(--f-body); color: var(--steel); }
.nb .nb-pics .nb-pic-none[aria-pressed=true] { color: #ffffff; }

/* ---- Sign maker: colour, toolbar, checkout ---- */
.nb .nb-colour-now { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; font-size: 14px; font-weight: 600; }
.nb .nb-colour-now .link { margin-left: 8px; font-size: 13px; font-weight: 500; }
.nb .nb-more { margin-top: 12px; }
.nb .nb-more summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font: 600 13px/1 var(--f-body); color: var(--ink); }
.nb .nb-more summary small { padding: 3px 8px; border-radius: 999px; background: var(--canvas); color: var(--steel); font-size: 12px; }
.nb .nb-tools { display: flex; flex-wrap: wrap; gap: 4px; margin: -4px 0 10px; }
.nb .nb-tool { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 0; border-radius: 999px; background: none; color: var(--steel); font: 500 13px/1 var(--f-body); cursor: pointer; text-decoration: none; }
.nb .nb-tool:hover:not([disabled]) { background: var(--canvas); color: var(--ink); }
.nb .nb-tool[disabled] { opacity: .35; cursor: default; }
.nb .nb-tool-link { margin-left: auto; color: var(--ink); }
.nb .nb-who { margin: -4px 0 14px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--rule); font-size: 13px; color: var(--steel); }
.nb .nb-who b { color: var(--ink); font-weight: 600; }
.nb .nb-mini { gap: 12px; }
@media (max-width: 900px) {
  .nb .nb-builder .nb-preview { top: calc(var(--nav-h) + env(safe-area-inset-top, 0px)); padding: 10px 12px; border-radius: 22px; }
  .nb .nb-builder .nb-stage { min-height: 76px; padding: 8px; border-radius: 14px; }
  .nb .nb-builder .nb-stage svg { max-height: 16vh; width: auto; }
  .nb .nb-tools { margin: -2px 0 6px; }
  .nb .nb-tool span { display: none; }
  .nb .nb-tool-link span { display: inline; }
}
@media (max-width: 640px) {
  .nb .nb-draghint { display: none; }
}

/* ---- Builder cart reminder and "added" note ---- */
.nb .nb-added { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: #EAF7EE; color: #17602F; font: 600 13.5px/1.3 var(--f-body); }
.nb .nb-added a { margin-left: auto; color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.nb .nb-cartmini {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px 16px;
  border: 1px solid var(--rule); border-radius: var(--nb-radius); background: var(--paper); color: var(--ink);
  text-decoration: none; transition: border-color .2s, box-shadow .2s;
}
.nb .nb-cartmini:hover { border-color: var(--ink); box-shadow: var(--sh-card); }
.nb .nb-cartmini span { display: grid; gap: 2px; }
.nb .nb-cartmini b { font: 600 15px/1.2 var(--f-display); }
.nb .nb-cartmini small { font-size: 13px; color: var(--steel); }
.nb .nb-cartmini em { display: inline-flex; align-items: center; gap: 4px; font: 600 13px/1 var(--f-body); font-style: normal; }

/* ---- Cart page ---- */
.cart-page { padding-block: 32px 88px; display: grid; gap: 18px; }
.nb .nb-cart { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 32px; align-items: start; }
@media (max-width: 900px) { .nb .nb-cart { grid-template-columns: minmax(0, 1fr); gap: 20px; } }
.nb .nb-cart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 14px; margin-bottom: 4px; border-bottom: 1px solid var(--rule); }
.nb .nb-cart-head h2 { font: 600 clamp(28px, 3.4vw, 40px)/1 var(--f-display); text-transform: none; letter-spacing: -0.025em; }
.nb .nb-cart-head span { font-size: 14px; color: var(--steel); }
.nb .nb-cart-list { list-style: none; margin: 0; padding: 0; }
.nb .nb-cart-item { display: grid; grid-template-columns: 168px minmax(0, 1fr) auto 96px; gap: 18px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.nb .nb-cart-thumb {
  display: grid; place-items: center; aspect-ratio: 4 / 3; padding: 12px; border-radius: 14px;
  background: radial-gradient(ellipse 72% 62% at 50% 46%, #ffffff 0%, #f4f4f5 72%, #ebebef 100%);
  border: 1px solid var(--rule);
}
.nb .nb-cart-thumb svg { width: 100%; height: auto; max-height: 100%; filter: drop-shadow(0 6px 7px rgba(9, 9, 11, .18)); }
.nb .nb-cart-info { display: grid; gap: 4px; min-width: 0; }
.nb .nb-cart-info .t { font: 600 15px/1.3 var(--f-display); overflow-wrap: anywhere; }
.nb .nb-cart-info .s { font-size: 13px; color: var(--steel); }
.nb .nb-cart-info .nb-mini { margin-top: 6px; font-size: 13px; }
.nb .nb-cart-qty { display: grid; justify-items: center; gap: 6px; }
.nb .nb-cart-qty small { font-size: 13px; color: var(--steel); white-space: nowrap; }
.nb .nb-cart-qty .nb-qty button { width: 34px; height: 34px; }
.nb .nb-cart-qty .nb-qty button[disabled] { opacity: .35; cursor: default; }
.nb .nb-cart-qty .nb-qty input { min-height: 34px !important; width: 48px !important; }
.nb .nb-cart-line { justify-self: end; font: 600 17px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.nb .nb-cart-more { display: flex; flex-wrap: wrap; gap: 10px 24px; padding-top: 16px; font: 600 14px/1.3 var(--f-body); }
.nb .nb-cart-more a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.nb .nb-cart-empty { display: grid; gap: 10px; justify-items: start; padding: 40px 28px; margin-top: 16px; border-radius: var(--nb-radius); background: var(--paper); border: 1px solid var(--rule); }
.nb .nb-cart-empty h3 { font: 600 24px/1.1 var(--f-display); }
.nb .nb-cart-empty p { color: var(--steel); }
.nb .nb-cart-empty .btn { text-decoration: none; }
.nb .nb-cart .nb-side { position: sticky; top: calc(var(--nav-h) + 18px); }
.nb .nb-summary > h3 { font: 600 18px/1.2 var(--f-display); text-transform: none; letter-spacing: -0.02em; }
.nb .nb-free { display: grid; gap: 6px; margin-top: 14px; font-size: 13px; color: var(--steel); }
.nb .nb-free i { display: block; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--accent) var(--p), var(--mist) var(--p)); }
.nb .nb-free.ok { color: #17602F; font-weight: 600; }
.nb .nb-free.ok i { background: #2E9E55; }
@media (max-width: 640px) {
  .nb .nb-cart-item { grid-template-columns: 104px minmax(0, 1fr); gap: 10px 14px; align-items: start; }
  .nb .nb-cart-thumb { grid-row: span 2; padding: 8px; }
  .nb .nb-cart-qty { grid-column: 2; justify-items: start; grid-auto-flow: column; align-items: center; justify-content: space-between; }
  .nb .nb-cart-line { grid-column: 2; justify-self: start; }
  .nb .nb-cart .nb-side { position: static; }
}
@media (max-width: 359px) {
  .nb .nb-cart-qty { grid-auto-flow: row; justify-items: start; justify-content: start; gap: 6px; }
}

/* ---- Customer logo & preview drag ---- */
.nb .nb-logo { display: grid; gap: 10px; margin-top: 14px; }
.nb .nb-upload { position: relative; justify-self: start; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.nb .nb-upload .nb-file { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.nb .nb-upload:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.nb .nb-upload.busy { opacity: .6; pointer-events: none; }
.nb .nb-upload.busy span::after { content: " (tracing…)"; }
.nb .nb-logo-now { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--ink); border-radius: 14px; background: var(--paper); }
.nb .nb-logo-tile { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 8px; background: var(--canvas); color: var(--ink); }
.nb .nb-logo-tile svg { width: 44px; height: 44px; fill: currentColor; }
.nb .nb-logo-t { display: grid; gap: 2px; min-width: 0; }
.nb .nb-logo-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb .nb-logo-t small { color: var(--steel); }
.nb .nb-logo-acts { display: grid; gap: 4px; justify-items: end; }
.nb .nb-logo-lib { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: var(--steel); }
.nb .nb-logo-lib button { display: grid; place-items: center; width: 44px; height: 44px; padding: 5px; border: 1px solid var(--nb-line-2); border-radius: 10px; background: var(--paper); color: var(--ink); cursor: pointer; }
.nb .nb-logo-lib button:hover { border-color: #a1a1aa; }
.nb .nb-logo-lib svg { width: 32px; height: 32px; fill: currentColor; }
.nb .nb-stage[tabindex] svg { touch-action: none; }
.nb .nb-stage svg [data-hit] { cursor: grab; }
.nb .nb-stage.dragging, .nb .nb-stage.dragging svg [data-hit] { cursor: grabbing; }
.nb .nb-stage:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.nb .nb-sel { fill: none; stroke: #1D63ED; stroke-width: 1.5px; stroke-dasharray: 5 3; vector-effect: non-scaling-stroke; pointer-events: none; }
.nb .nb-draghint { margin: 8px 0 0; font-size: 13px; color: var(--steel); text-align: center; }
.nb .nb-draghint .link { margin-left: 4px; font-size: 13px; }
@media (max-width: 640px) { .nb .nb-logo-now { grid-template-columns: 48px minmax(0, 1fr); } .nb .nb-logo-acts { grid-column: 1 / -1; display: flex; justify-content: flex-start; gap: 16px; } }
