/* App Monte sua Camiseta — miolo das etapas. A moldura (cabeçalho, etapas, barra
   de baixo, botões) vem de pc-builder.css (.pcb-*). Cor: --brand da loja. */
.shb { --shb-field: #f8fafc; --shb-soft: #f1f5f9; }

/* Tipo */
.shb-card-img { aspect-ratio: 400 / 360; background: radial-gradient(ellipse at 50% 42%, #fff 0%, #f4f5f8 62%, #eceef3 100%); }
.shb-card-img > svg { width: 100%; height: 100%; color: inherit; }
.shb-card-meta { display: block; margin: -4px 0 8px; font-size: 12px; font-weight: 600; color: var(--pcb-muted); }
.pcb-card-price small { display: block; font-size: 11.5px; font-weight: 600; color: var(--pcb-muted); }

/* Prévia + painel */
.shb-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 16px; }
@media (min-width: 900px) { .shb-split { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; } .shb-preview { position: sticky; top: 80px; } }
.shb-preview, .shb-panel { min-width: 0; padding: 16px; border-radius: 14px; background: var(--pcb-card); border: 1px solid var(--pcb-line); }
.shb-panel h2 { margin: 0 0 4px; font-size: 19px; font-weight: 800; }
.shb-sub { margin: 0 0 12px; font-size: 13px; color: var(--pcb-muted); }
.shb-sub.is-warn { color: #b45309; font-weight: 700; }
.shb-note { min-height: 1.2em; margin: 12px 0 6px; font-size: 13.5px; font-weight: 700; color: #15803d; }
.shb-preview-note { margin: 10px 0 0; text-align: center; font-size: 13px; color: var(--pcb-muted); }

.shb-stage { position: relative; aspect-ratio: 400 / 360; width: 100%; max-width: 520px; margin: 0 auto; border-radius: 14px; overflow: hidden; isolation: isolate;
  background: radial-gradient(ellipse at 50% 42%, #fff 0%, #f4f5f8 62%, #eceef3 100%); }
.shb-stage.has-photo { background: #fff; }
.shb-stage > svg, .shb-stage > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.shb-print, .shb-guide { position: absolute; display: flex; align-items: flex-end; justify-content: center; border-radius: 4px; pointer-events: none; }
.shb-print { border: 1.5px solid var(--brand);
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--brand) 22%, transparent) 0 6px, color-mix(in srgb, var(--brand) 10%, transparent) 6px 12px);
  box-shadow: 0 0 0 3px #ffffffa6; transition: opacity .15s; }
.shb-print.is-dimmed { opacity: .35; }
.shb-guide { border: 1.5px dashed #0f172a99; background: #ffffff4d; }
.shb-print span, .shb-guide span { margin-bottom: -1px; padding: 1px 6px; border-radius: 4px 4px 0 0; background: var(--brand); color: #fff; font-size: 10.5px; font-weight: 700; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.shb-guide span { background: #0f172a; }
.shb-stage.is-dark .shb-print { background: repeating-linear-gradient(135deg, #ffffff38 0 6px, #ffffff1c 6px 12px); box-shadow: 0 0 0 3px #00000026; }
.shb-stage.is-dark .shb-guide { border-color: #ffffffcc; background: #ffffff26; }

.shb-sides { display: flex; justify-content: center; gap: 6px; margin-bottom: 10px; }
.shb-sides button { height: 36px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--pcb-line); background: var(--pcb-card); color: var(--pcb-ink); font-size: 13.5px; font-weight: 700; cursor: pointer; }
.shb-sides button b { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 4px; padding: 0 4px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 11px; }
.shb-sides button[aria-pressed="true"] { background: var(--pcb-ink); border-color: var(--pcb-ink); color: var(--pcb-card); }
.shb-sides button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Cor */
.shb-colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 12px; }
.shb-color { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border-radius: 12px; border: 2px solid var(--pcb-line); background: var(--pcb-card); color: var(--pcb-ink); cursor: pointer; text-align: center; }
.shb-color:hover:not(:disabled) { border-color: #94a3b8; }
.shb-color.is-picked { border-color: var(--brand); box-shadow: 0 6px 14px color-mix(in srgb, var(--brand) 22%, transparent); }
.shb-color:disabled { cursor: not-allowed; opacity: .45; }
.shb-color:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.shb-swatch { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: inset 0 0 0 1px #0000001a; }
.shb-swatch i { width: 40px; height: 40px; border-radius: 999px; box-shadow: inset 0 0 0 1px #00000026; }
.shb-swatch img { width: 100%; height: 100%; object-fit: contain; }
.shb-color-name { font-size: 12.5px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.shb-color small { font-size: 11px; color: var(--pcb-muted); }

/* Estampa */
.shb-areas { display: grid; gap: 10px; }
.shb-area { padding: 12px; border-radius: 12px; border: 1px solid var(--pcb-line); background: var(--shb-field); }
.shb-area.is-chosen { border-color: color-mix(in srgb, var(--brand) 55%, var(--pcb-line)); background: color-mix(in srgb, var(--brand) 6%, var(--pcb-card)); }
.shb-area-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.shb-area-head strong { font-size: 14.5px; }
.shb-tag { padding: 1px 8px; border-radius: 999px; background: var(--shb-soft); color: var(--pcb-muted); font-size: 11px; font-weight: 700; }
.shb-tag.is-warn { background: #fef3c7; color: #92400e; }
.shb-clear { margin-left: auto; border: 0; background: none; color: #b91c1c; font-size: 12.5px; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.shb-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.shb-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 44px; padding: 8px 10px; border-radius: 10px; border: 2px solid var(--pcb-line); background: var(--pcb-card); color: var(--pcb-ink); text-align: left; cursor: pointer; }
.shb-opt:hover { border-color: #94a3b8; }
.shb-opt.is-picked { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, var(--pcb-card)); }
.shb-opt:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.shb-opt b { font-size: 14px; }
.shb-opt span { font-size: 11.5px; color: var(--pcb-muted); }
.shb-opt em { font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--pcb-ink); }

/* Tamanhos */
.shb-sizes { display: grid; gap: 8px; }
.shb-size { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--pcb-line); background: var(--shb-field); }
.shb-size b { display: block; font-size: 15px; }
.shb-size small { font-size: 12.5px; color: var(--pcb-muted); }
.shb-size.is-off { opacity: .55; }
.shb-qty button { width: 40px; height: 40px; }
.shb-qty input { width: 64px; height: 40px; border: 0; background: transparent; color: var(--pcb-ink); text-align: center; font-size: 15px; font-weight: 700; -moz-appearance: textfield; }
.shb-qty input::-webkit-outer-spin-button, .shb-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.shb-qty input:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.shb-bands { margin-top: 14px; }
.shb-bands h3 { margin: 0 0 8px; font-size: 14.5px; font-weight: 800; }
.shb-bands table, .shb-review-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.shb-bands th, .shb-bands td, .shb-review-table th, .shb-review-table td { padding: 7px 8px; border-bottom: 1px solid var(--pcb-line); text-align: left; }
.shb-bands th, .shb-review-table th { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--pcb-muted); }
.shb-bands td:last-child, .shb-review-table td:nth-child(n+2), .shb-review-table th:nth-child(n+2) { text-align: right; }
.shb-bands tr.is-on td { background: color-mix(in srgb, var(--brand) 12%, transparent); font-weight: 800; }
.shb-bands p { margin: 8px 0 0; font-size: 11.5px; color: var(--pcb-muted); }

/* Etapas extras (fase 3) */
.shb-extras { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-top: 6px; }
.shb-extra { display: grid; grid-template-columns: 24px 1fr; grid-template-areas: "mark name" "mark price"; align-items: center; column-gap: 10px; min-height: 56px; padding: 10px 12px; border-radius: 12px; border: 2px solid var(--pcb-line); background: var(--pcb-card); color: var(--pcb-ink); text-align: left; cursor: pointer; }
.shb-extra:hover { border-color: #94a3b8; }
.shb-extra.is-picked { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, var(--pcb-card)); }
.shb-extra:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.shb-extra-mark { grid-area: mark; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 999px; border: 2px solid var(--pcb-line); color: #fff; }
.shb-extra.is-picked .shb-extra-mark { background: var(--brand); border-color: var(--brand); }
.shb-extra b { grid-area: name; font-size: 14px; }
.shb-extra em { grid-area: price; font-style: normal; font-size: 12.5px; color: var(--pcb-muted); }
.shb-optional { font-size: 12px; font-weight: 600; color: var(--pcb-muted); }

/* Arte do cliente (fase 4) */
.shb-print.has-art { align-items: stretch; background: none; border-style: dashed; border-color: color-mix(in srgb, var(--brand) 60%, transparent); box-shadow: none; }
.shb-print.has-art img { display: block; width: 100%; height: 100%; object-fit: contain; }
.shb-stage.is-dark .shb-print.has-art { background: none; box-shadow: none; border-color: #ffffff80; }
.shb-art { display: grid; gap: 4px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--pcb-line); }
.shb-art small { font-size: 11.5px; color: var(--pcb-muted); }
.shb-art.is-required small { color: #b45309; }
.shb-art-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 14px; border-radius: 10px; border: 2px dashed color-mix(in srgb, var(--brand) 60%, var(--pcb-line)); background: var(--pcb-card); color: var(--pcb-ink); font-size: 13.5px; font-weight: 700; cursor: pointer; text-align: center; }
.shb-art-btn:hover { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--pcb-card)); }
.shb-art-btn:focus-visible, .shb-art-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.shb-art.is-done { grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.shb-art-thumb { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 8px; overflow: hidden; color: var(--pcb-muted);
  background: repeating-conic-gradient(#e5e7eb 0 25%, #fff 0 50%) 50% / 12px 12px; box-shadow: inset 0 0 0 1px var(--pcb-line); }
.shb-art-thumb img { width: 100%; height: 100%; object-fit: contain; }
.shb-art-info { display: grid; min-width: 0; }
.shb-art-name { font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shb-art-actions { display: flex; gap: 4px; }
.shb-art-link { min-height: 44px; padding: 0 8px; border: 0; background: none; color: var(--pcb-ink); font-size: 12.5px; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.shb-art-link.is-danger { color: #b91c1c; }
.shb-art.is-busy .shb-art-name { font-weight: 600; color: var(--pcb-muted); }
.shb-art-bar { display: block; height: 6px; border-radius: 999px; background: var(--pcb-line); overflow: hidden; }
.shb-art-bar i { display: block; height: 100%; background: var(--brand); transition: width .2s; }
.shb-review-art { display: block; font-size: 12.5px; font-weight: 600; color: var(--pcb-muted); overflow-wrap: anywhere; }
.shb-review-art.is-pending { color: #b45309; }

/* Revisão */
.shb-review-grid { display: grid; gap: 18px; }
@media (min-width: 900px) { .shb-review-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; } }
.shb-review-stages { display: grid; gap: 10px; }
.shb-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 14px; font-size: 14px; }
.shb-facts dt { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--pcb-muted); padding-top: 2px; }
.shb-facts dd { margin: 0; font-weight: 600; }
.shb-facts ul { margin: 0; padding-left: 18px; }
.shb-saved { margin: 10px 0 0; font-size: 13.5px; font-weight: 700; color: #15803d; }

@media (max-width: 640px) {
  .shb-preview, .shb-panel { padding: 12px; }
  .shb-stage { max-width: 280px; }
  .shb-colors { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
  .shb-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shb-facts { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .shb-print, .shb-art-bar i { transition: none; } }

/* Tema Carbon (o montador fica escuro como no Monte seu PC). */
.st-theme-carbon .shb { --shb-field: #1a1a1a; --shb-soft: #262626; }
.st-theme-carbon .shb-tag.is-warn { background: #422006; color: #fcd34d; }
.st-theme-carbon .shb-sub.is-warn { color: #fbbf24; }
.st-theme-carbon .shb-note, .st-theme-carbon .shb-saved { color: #4ade80; }
.st-theme-carbon .shb-clear { color: #f87171; }
.st-theme-carbon .shb-guide span { background: #404040; }
.st-theme-carbon .shb-art-thumb { background: repeating-conic-gradient(#3f3f46 0 25%, #27272a 0 50%) 50% / 12px 12px; }
.st-theme-carbon .shb-art.is-required small, .st-theme-carbon .shb-review-art.is-pending { color: #fbbf24; }
.st-theme-carbon .shb-art-link.is-danger { color: #f87171; }
