/* App Monte seu PC — montador em tela cheia, igual em todos os temas.
   Cores: a cor principal da loja (--brand, definida no layout). */
body.sf-bare { background: #f3f4f6; padding-bottom: 0 !important; }
body.sf-bare main.flex-1 { display: flex; flex-direction: column; }

.pcb [hidden] { display: none !important; }
.pcb { --pcb-ink: #0f172a; --pcb-muted: #64748b; --pcb-line: #e2e8f0; --pcb-card: #fff; --pcb-ok: #16a34a;
  --pcb-bar-h: 76px; color: var(--pcb-ink); min-height: 100dvh; display: flex; flex-direction: column; padding-bottom: calc(var(--pcb-bar-h) + env(safe-area-inset-bottom)); }

/* Cabeçalho */
.pcb-top { position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 12px;
  height: 64px; padding: 0 20px; background: #0f172a; color: #fff; border-bottom: 3px solid var(--brand); }
.pcb-back { flex: none; display: inline-flex; align-items: center; gap: 6px; color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; justify-self: start; opacity: .9; }
.pcb-back:hover { opacity: 1; }
.pcb-start { display: flex; align-items: center; min-width: 0; justify-self: start; }
.pcb-brand { display: none; }
.pcb-title { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 20px; font-weight: 800; letter-spacing: .2px; text-transform: uppercase; justify-self: center; }
.pcb-title svg { color: var(--brand); }
.pcb-cart { justify-self: end; position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: rgba(255,255,255,.08); color: #fff; cursor: pointer; }
.pcb-cart:hover { background: rgba(255,255,255,.16); }
.pcb-cart #cart-badge { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.pcb-cart #cart-badge.hidden { display: none; }
@media (min-width: 900px) {
  .pcb-brand { display: inline-flex; align-items: center; margin-left: 14px; max-width: 200px; min-width: 0; height: 44px; color: #fff; text-decoration: none; font-weight: 700; }
  .pcb-brand img { display: block; max-height: 40px; max-width: 100%; object-fit: contain; background: transparent; }
}

/* Etapas */
.pcb-steps { background: #fff; border-bottom: 1px solid var(--pcb-line); }
.pcb-steps ol { display: flex; gap: 6px; margin: 0 auto; padding: 14px 16px; max-width: 1400px; list-style: none; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; }
.pcb-steps li { flex: none; scroll-snap-align: center; }
.pcb-step { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 118px; padding: 2px 0; border: 0; background: none; color: var(--pcb-ink); cursor: pointer; }
.pcb-step:disabled { cursor: not-allowed; opacity: .45; }
.pcb-step-icon { position: relative; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: #f1f5f9; color: #334155; transition: background .15s, color .15s, transform .15s; }
.pcb-step:not(:disabled):hover .pcb-step-icon { background: #e2e8f0; }
.pcb-step-label { max-width: 100%; font-size: 11.5px; font-weight: 700; line-height: 1.2; text-align: center; text-transform: uppercase; letter-spacing: .2px; overflow-wrap: break-word; hyphens: auto; }
.pcb-step[aria-current="step"] .pcb-step-icon { background: var(--brand); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 14px color-mix(in srgb, var(--brand) 35%, transparent); }
.pcb-step-check { position: absolute; right: -4px; top: -4px; display: none; place-items: center; width: 20px; height: 20px; border-radius: 999px; background: var(--pcb-ok); color: #fff; box-shadow: 0 0 0 2px #fff; }
.pcb-step.is-done .pcb-step-check { display: grid; }
.pcb-step:focus-visible { outline: none; }
.pcb-step:focus-visible .pcb-step-icon { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Conteúdo */
.pcb-main { width: 100%; max-width: 1400px; margin: 0 auto; padding: 16px; flex: 1; }
.pcb-hint { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 10px 16px; border-radius: 12px;
  background: color-mix(in srgb, var(--brand) 14%, #fff); border: 1px solid color-mix(in srgb, var(--brand) 35%, #fff); font-size: 15px; font-weight: 600; }
.pcb-hint.is-done { background: #dcfce7; border-color: #86efac; color: #14532d; }
.pcb-hint.is-done .pcb-hint-text::before { content: "✓ "; }
.pcb-skip { flex: none; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid currentColor; background: transparent; color: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.pcb-skip:hover { background: rgba(15,23,42,.06); }

.pcb-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0; padding: 10px; border-radius: 12px; background: #fff; border: 1px solid var(--pcb-line); }
.pcb-search { flex: 1 1 260px; display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; border-radius: 999px; background: #f1f5f9; color: var(--pcb-muted); }
.pcb-search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; color: var(--pcb-ink); font-size: 14px; }
.pcb-search:focus-within { box-shadow: 0 0 0 2px var(--brand); }
.pcb-sort select { height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--pcb-line); background: #fff; color: var(--pcb-ink); font-size: 14px; }
.pcb-view { display: inline-flex; gap: 4px; }
.pcb-view button { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--pcb-line); background: #fff; color: var(--pcb-muted); cursor: pointer; }
.pcb-view button[aria-pressed="true"] { background: var(--pcb-ink); border-color: var(--pcb-ink); color: #fff; }
.pcb-status { margin: 24px 0; text-align: center; color: var(--pcb-muted); font-size: 15px; }

/* Cartões */
.pcb-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.pcb-card { position: relative; display: flex; flex-direction: column; border-radius: 14px; background: var(--pcb-card); border: 2px solid transparent; box-shadow: 0 1px 2px rgba(15,23,42,.06), 0 0 0 1px var(--pcb-line); transition: box-shadow .15s, border-color .15s, transform .15s; }
.pcb-card:hover { box-shadow: 0 8px 20px rgba(15,23,42,.10), 0 0 0 1px var(--pcb-line); }
.pcb-card.is-picked { border-color: var(--brand); box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 25%, transparent); }
.pcb-card-main { display: flex; flex-direction: column; flex: 1; width: 100%; padding: 12px 12px 6px; border: 0; background: none; text-align: left; color: inherit; cursor: pointer; border-radius: 12px; }
.pcb-card-main:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.pcb-card-img { display: grid; place-items: center; aspect-ratio: 1 / 1; border-radius: 10px; background: #fff; overflow: hidden; }
.pcb-card-img img { width: 100%; height: 100%; object-fit: contain; }
.pcb-card-img svg { color: #cbd5e1; }
.pcb-card-name { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 10px 0 8px; font-size: 13.5px; font-weight: 600; line-height: 1.35; min-height: 3.9em; }
.pcb-card-price { margin-top: auto; font-size: 19px; font-weight: 800; color: var(--pcb-ink); }
.pcb-card-was { display: block; font-size: 12px; font-weight: 500; color: var(--pcb-muted); text-decoration: line-through; }
.pcb-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; padding: 0 12px 12px; }
.pcb-card-link { font-size: 12.5px; font-weight: 600; color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.pcb-card-pick { position: absolute; top: 10px; right: 10px; display: none; place-items: center; width: 28px; height: 28px; border-radius: 999px; background: var(--brand); color: #fff; box-shadow: 0 0 0 3px #fff; }
.pcb-card.is-picked .pcb-card-pick { display: grid; }
.pcb-qty { display: inline-flex; align-items: center; border: 1px solid var(--pcb-line); border-radius: 999px; overflow: hidden; }
.pcb-qty button { width: 32px; height: 32px; border: 0; background: #f8fafc; color: var(--pcb-ink); font-size: 18px; font-weight: 700; cursor: pointer; }
.pcb-qty button:disabled { color: #cbd5e1; cursor: not-allowed; }
.pcb-qty span { min-width: 28px; text-align: center; font-size: 14px; font-weight: 700; }

.pcb-grid[data-view="list"] { grid-template-columns: 1fr; gap: 10px; }
.pcb-grid[data-view="list"] .pcb-card { flex-direction: row; align-items: center; }
.pcb-grid[data-view="list"] .pcb-card-main { flex-direction: row; align-items: center; gap: 14px; padding: 10px 12px; }
.pcb-grid[data-view="list"] .pcb-card-img { width: 84px; flex: none; }
.pcb-grid[data-view="list"] .pcb-card-name { flex: 1; min-height: 0; margin: 0; -webkit-line-clamp: 2; }
.pcb-grid[data-view="list"] .pcb-card-price { margin: 0 0 0 auto; text-align: right; white-space: nowrap; }
.pcb-grid[data-view="list"] .pcb-card-foot { flex: none; flex-direction: column; align-items: flex-end; justify-content: center; padding: 10px 12px; }

/* Revisão */
.pcb-review { margin-top: 16px; padding: 20px; border-radius: 14px; background: #fff; border: 1px solid var(--pcb-line); }
.pcb-review h2 { margin: 0 0 14px; font-size: 20px; font-weight: 800; }
.pcb-review-list { margin: 0; padding: 0; list-style: none; }
.pcb-review-item { display: grid; grid-template-columns: 44px 64px 1fr auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--pcb-line); }
.pcb-review-item:first-child { border-top: 0; }
.pcb-review-step { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #f1f5f9; color: #334155; }
.pcb-review-img { width: 64px; height: 64px; border-radius: 8px; background: #fff; border: 1px solid var(--pcb-line); object-fit: contain; }
.pcb-review-info small { display: block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; color: var(--pcb-muted); letter-spacing: .3px; }
.pcb-review-info strong { display: block; font-size: 14px; font-weight: 600; line-height: 1.35; }
.pcb-review-info em { font-style: normal; font-size: 12.5px; color: var(--pcb-muted); }
.pcb-review-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.pcb-review-side b { font-size: 15px; }
.pcb-review-side button { border: 0; background: none; color: var(--brand); font-size: 12.5px; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.pcb-review-side button[data-remove] { color: #b91c1c; }
.pcb-review-empty { padding: 12px 0; color: var(--pcb-muted); }
.pcb-review-empty.is-missing { color: #b91c1c; font-weight: 600; }
.pcb-review-total { display: flex; align-items: baseline; justify-content: space-between; margin-top: 8px; padding-top: 14px; border-top: 2px solid var(--pcb-ink); font-size: 16px; font-weight: 700; }
.pcb-review-total strong { font-size: 24px; }
.pcb-review-note { margin: 10px 0 0; color: var(--pcb-muted); font-size: 12.5px; }
.pcb-review-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* Botões e barra de baixo */
.pcb-btn { display: inline-flex; align-items: center; justify-content: center; height: 46px; padding: 0 22px; border-radius: 12px; font-size: 15px; font-weight: 800; letter-spacing: .2px; cursor: pointer; text-transform: uppercase; }
.pcb-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.pcb-btn-primary { border: 0; background: var(--brand); color: #fff; }
.pcb-btn-primary:hover { filter: brightness(1.08); }
.pcb-btn-primary:disabled { background: #94a3b8; cursor: not-allowed; filter: none; }
.pcb-btn-ghost { border: 2px solid currentColor; background: transparent; color: var(--pcb-ink); }
.pcb-btn-link { height: auto; padding: 0 4px; border: 0; background: none; color: var(--pcb-muted); font-size: 13px; text-transform: none; text-decoration: underline; }
.pcb-btn.is-pulse { animation: pcb-pulse 1.2s ease 2; }
.pcb-btn-pdf { gap: 8px; }
.pcb-btn-pdf[aria-busy="true"] { cursor: progress; opacity: .7; }
.pcb-btn-pdf:disabled:not([aria-busy="true"]) { opacity: .45; cursor: not-allowed; }
@keyframes pcb-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }

.pcb-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: var(--pcb-bar-h); padding: 10px 20px calc(10px + env(safe-area-inset-bottom)); background: #0f172a; color: #fff; box-shadow: 0 -6px 20px rgba(15,23,42,.18); }
.pcb-bar-total strong { display: block; font-size: 22px; font-weight: 800; color: #fff; }
.pcb-bar-total span { font-size: 12.5px; color: #cbd5e1; }
.pcb-bar-actions { display: flex; gap: 10px; }
.pcb-bar .pcb-btn-ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.pcb-bar .pcb-btn-ghost:disabled { opacity: .35; cursor: not-allowed; }

.pcb-toast { position: fixed; left: 50%; bottom: calc(var(--pcb-bar-h) + 14px + env(safe-area-inset-bottom)); z-index: 40; max-width: min(92vw, 440px); margin: 0; padding: 10px 16px; border-radius: 12px; background: #0f172a; color: #fff; font-size: 14px; font-weight: 600; transform: translateX(-50%); box-shadow: 0 10px 24px rgba(15,23,42,.3); }

@media (max-width: 640px) {
  .pcb-top { height: 56px; padding: 0 12px; }
  .pcb-back span { display: none; }
  .pcb-title { font-size: 17px; }
  .pcb-steps ol { padding: 10px 12px; }
  .pcb-step { width: 84px; }
  .pcb-step-icon { width: 48px; height: 48px; border-radius: 14px; }
  .pcb-step-label { font-size: 11px; text-transform: none; letter-spacing: 0; }
  .pcb-main { padding: 12px; }
  .pcb-hint { font-size: 14px; }
  .pcb-tools { gap: 8px; }
  .pcb-search { flex-basis: 100%; }
  .pcb-sort { flex: 1; }
  .pcb-sort select { width: 100%; }
  .pcb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pcb-card-main { padding: 8px 8px 4px; }
  .pcb-card-name { font-size: 12.5px; }
  .pcb-card-price { font-size: 16px; }
  .pcb-card-foot { padding: 0 8px 10px; flex-wrap: wrap; }
  .pcb-grid[data-view="list"] .pcb-card { flex-direction: column; align-items: stretch; }
  .pcb-grid[data-view="list"] .pcb-card-main { gap: 10px; padding: 8px 10px; }
  .pcb-grid[data-view="list"] .pcb-card-img { width: 64px; }
  .pcb-grid[data-view="list"] .pcb-card-name { font-size: 12.5px; }
  .pcb-grid[data-view="list"] .pcb-card-price { font-size: 15px; }
  .pcb-grid[data-view="list"] .pcb-card-foot { flex-direction: row; align-items: center; justify-content: space-between; padding: 0 10px 10px; }
  .pcb-grid[data-view="list"] .pcb-card-pick { top: 8px; right: 8px; width: 24px; height: 24px; }
  .pcb-review { padding: 14px; }
  .pcb-review-item { grid-template-columns: 52px 1fr; }
  .pcb-review-step { display: none; }
  .pcb-review-img { width: 52px; height: 52px; }
  .pcb-review-side { grid-column: 2; flex-direction: row; align-items: center; justify-content: space-between; text-align: left; }
  .pcb-review-actions .pcb-btn-primary, .pcb-review-actions .pcb-btn-ghost { flex: 1 1 100%; }
  .pcb-bar { padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); }
  .pcb-bar-total strong { font-size: 18px; }
  .pcb-btn { height: 44px; padding: 0 14px; font-size: 13.5px; }
}
@media (prefers-reduced-motion: reduce) { .pcb-step-icon, .pcb-card { transition: none; } .pcb-btn.is-pulse { animation: none; } }

/* Fase 2: compatibilidade */
.pcb-step.is-conflict .pcb-step-check { background: #dc2626; }
.pcb-step.is-required .pcb-step-icon { box-shadow: 0 0 0 2px #f59e0b; }
.pcb-hint.is-conflict { background: #fee2e2; border-color: #fca5a5; color: #7f1d1d; }
.pcb-hint.is-conflict .pcb-hint-text::before { content: "⚠ "; }
.pcb-card-img { position: relative; }
.pcb-card-badges { position: absolute; top: 6px; left: 6px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.pcb-badge { padding: 2px 8px; border-radius: 8px; background: var(--brand); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 1.4; box-shadow: 0 1px 3px rgba(15,23,42,.2); }
.pcb-card-specs { display: block; margin: -2px 0 6px; font-size: 11.5px; font-weight: 600; color: var(--pcb-muted); }
.pcb-card-why { display: block; margin: 0 0 6px; padding: 4px 8px; border-radius: 8px; background: #fef3c7; color: #92400e; font-size: 11.5px; line-height: 1.35; }
.pcb-card.is-blocked { box-shadow: 0 0 0 1px var(--pcb-line); }
.pcb-card.is-blocked .pcb-card-main { cursor: not-allowed; }
.pcb-card.is-blocked .pcb-card-img, .pcb-card.is-blocked .pcb-card-name, .pcb-card.is-blocked .pcb-card-price, .pcb-card.is-blocked .pcb-card-specs { opacity: .45; }
.pcb-card.is-blocked .pcb-card-why { background: #fee2e2; color: #991b1b; }
.pcb-card.is-blocked.is-picked { border-color: #dc2626; }
.pcb-card.is-blocked.is-picked .pcb-card-pick { background: #dc2626; }
.pcb-alerts { display: grid; gap: 8px; margin: 0 0 12px; }
.pcb-alert { margin: 0; padding: 10px 12px; border-radius: 10px; background: #fee2e2; border: 1px solid #fca5a5; color: #7f1d1d; font-size: 13.5px; font-weight: 600; }
.pcb-alert::before { content: "⚠ "; }
.pcb-review-item.is-conflict .pcb-review-info em { color: #b91c1c; font-weight: 600; }
.pcb-review-item.is-conflict .pcb-review-img { border-color: #fca5a5; }
.pcb-power { margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; background: #f1f5f9; color: #334155; font-size: 13px; font-weight: 600; }

/* Tema Carbon: o montador fica escuro como a vitrine do tema (cores de storefront-carbon.css).
   As fotos das peças continuam em quadro branco, como nos cartões do Carbon. */
body.sf-bare.st-theme-carbon { background: #0e0e0e; color-scheme: dark; }
.st-theme-carbon .pcb { --pcb-ink: #f5f5f5; --pcb-muted: #a3a3a3; --pcb-line: #262626; --pcb-card: #131313; --pcb-ok: #2fd15c; --pcb-field: #1c1c1c; }
.st-theme-carbon .pcb-top { background: #000; }
.st-theme-carbon .pcb-title { font-family: 'Barlow Condensed', 'Arial Narrow', Impact, sans-serif; font-size: 24px; letter-spacing: .5px; }
.st-theme-carbon .pcb-steps { background: #111; border-bottom-color: var(--pcb-line); }
.st-theme-carbon .pcb-step-icon { background: var(--pcb-field); color: #d4d4d4; }
.st-theme-carbon .pcb-step:not(:disabled):hover .pcb-step-icon { background: #262626; }
.st-theme-carbon .pcb-step[aria-current="step"] .pcb-step-icon { background: var(--brand); color: #fff; }
.st-theme-carbon .pcb-step-check { box-shadow: 0 0 0 2px #111; }
.st-theme-carbon .pcb-hint { background: color-mix(in srgb, var(--brand) 16%, #131313); border-color: color-mix(in srgb, var(--brand) 45%, #131313); color: var(--pcb-ink); }
.st-theme-carbon .pcb-hint.is-done { background: #052e16; border-color: #166534; color: #bbf7d0; }
.st-theme-carbon .pcb-hint.is-conflict { background: #450a0a; border-color: #7f1d1d; color: #fecaca; }
.st-theme-carbon .pcb-skip:hover { background: rgba(255,255,255,.08); }
.st-theme-carbon .pcb-tools { background: var(--pcb-card); }
.st-theme-carbon .pcb-search { background: var(--pcb-field); }
.st-theme-carbon .pcb-sort select { background: var(--pcb-field); }
.st-theme-carbon .pcb-view button { background: var(--pcb-field); }
.st-theme-carbon .pcb-view button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.st-theme-carbon .pcb-card { box-shadow: 0 0 0 1px var(--pcb-line); }
.st-theme-carbon .pcb-card:hover { box-shadow: 0 8px 22px rgba(0,0,0,.5), 0 0 0 1px #3a3a3a; }
.st-theme-carbon .pcb-card-pick { box-shadow: 0 0 0 3px #131313; }
.st-theme-carbon .pcb-card-price { color: #2fd15c; }
.st-theme-carbon .pcb-card-why { background: #422006; color: #fcd34d; }
.st-theme-carbon .pcb-card.is-blocked .pcb-card-why { background: #450a0a; color: #fca5a5; }
.st-theme-carbon .pcb-qty button { background: var(--pcb-field); }
.st-theme-carbon .pcb-qty button:disabled { color: #525252; }
.st-theme-carbon .pcb-review { background: var(--pcb-card); }
.st-theme-carbon .pcb-review-step { background: var(--pcb-field); color: #d4d4d4; }
.st-theme-carbon .pcb-review-side button[data-remove],
.st-theme-carbon .pcb-review-empty.is-missing,
.st-theme-carbon .pcb-review-item.is-conflict .pcb-review-info em { color: #f87171; }
.st-theme-carbon .pcb-review-item.is-conflict .pcb-review-img { border-color: #7f1d1d; }
.st-theme-carbon .pcb-alert { background: #450a0a; border-color: #7f1d1d; color: #fecaca; }
.st-theme-carbon .pcb-power { background: var(--pcb-field); color: #d4d4d4; }
.st-theme-carbon .pcb-btn-primary:disabled { background: #333; color: #8a8a8a; }
.st-theme-carbon .pcb-bar { background: #000; border-top: 1px solid var(--pcb-line); box-shadow: 0 -6px 20px rgba(0,0,0,.5); }
.st-theme-carbon .pcb-bar-total span { color: var(--pcb-muted); }
.st-theme-carbon .pcb-toast { background: #1c1c1c; border: 1px solid #333; box-shadow: 0 10px 24px rgba(0,0,0,.6); }
