/* Camada de estilo baseada no DESIGN.md (Steep: serifa editorial sobre papel branco),
   adaptada às cores da Cão Mimado: o laranja da marca substitui o pêssego/marrom.
   Carregado por último no site e no painel. */
:root {
  /* Neutros do DESIGN.md */
  --ink: #17191c;            /* Ink Black: texto e superfícies escuras */
  --paper: #ffffff;          /* Paper White: fundo e cartões elevados */
  --mist: #f2f2f3;           /* Mist Gray: cartões neutros, campos */
  --fog: #fafafb;            /* Fog White: faixas alternadas */
  --slate: #5f636d;          /* texto auxiliar (escurecido do #777b86 para contraste AA) */
  --ash: #8a8c90;            /* rótulos terciários */
  --hairline: #e6e6e8;

  /* Marca Cão Mimado no papel do acento */
  --brand: #f08a24;          /* laranja do logo: destaques grandes, faixas */
  --brand-ink: #a8430b;      /* laranja escuro: botões e links (AA com branco) */
  --brand-soft: #fde8d4;     /* "pêssego" da marca: cartão de destaque */
  --brand-deep: #6b2a08;     /* texto sobre o laranja claro */

  /* Mapeia as variáveis antigas para o novo sistema */
  --cream: var(--paper);
  --cream-2: var(--mist);
  --ink-2: #33363b;
  --muted: var(--slate);
  --orange: var(--brand);
  --orange-strong: var(--brand-ink);
  --orange-soft: var(--brand-soft);
  --line: var(--hairline);
  --radius: 24px;
  --radius-sm: 16px;
  --shadow: 0 0 0 1px rgba(4, 23, 43, .05), 0 20px 25px -5px rgba(0, 0, 0, .08), 0 8px 10px -6px rgba(0, 0, 0, .08);

  --serif: Fraunces, "Source Serif 4", "Tiempos Headline", Georgia, ui-serif, serif;
  --sans: Manrope, Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@font-face { font-family: Manrope; src: url("/fonts/manrope.ttf") format("truetype"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: Fraunces; src: url("/fonts/fraunces.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }

body, .public-site { background: var(--paper); color: var(--ink); font-family: var(--sans); }

/* Títulos: serifa sempre em peso 400, tracking apertado */
h1, h2, .public-site h1, .public-site h2 {
  font-family: var(--serif); font-weight: 400; font-variation-settings: "SOFT" 0, "WONK" 0;
}
h1, .public-site h1, .storefront-intro h1 { font-size: clamp(2.3rem, 6vw, 4rem); line-height: 1.12; letter-spacing: -0.02em; }
h2, .public-site h2 { font-size: clamp(1.7rem, 3.6vw, 2.75rem); line-height: 1.2; letter-spacing: -0.015em; }
h3 { font-family: var(--sans); font-weight: 600; font-size: 1.3rem; letter-spacing: -0.009em; }
.muted { color: var(--slate); }

/* Topo silencioso: sem fundo, sem sombra, sem borda */
.top, .public-site .top { background: rgba(255, 255, 255, .92); border-bottom: 1px solid transparent; }
.nav a, .public-site .nav a { font-weight: 500; color: var(--ink); background: transparent; border-color: transparent; }
.nav a.on { background: var(--mist); }

/* Botões em pílula. Primário = laranja escuro da marca; secundário = contorno preto */
.btn, .public-site .btn {
  border-radius: 9999px; font-family: var(--sans); font-weight: 600;
  background: var(--brand-ink); color: #fff; box-shadow: none;
}
.btn.ghost, .public-site .btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn.soft { background: var(--brand-soft); color: var(--brand-deep); }
.btn.dark { background: var(--ink); color: #fff; }
.btn.danger { background: transparent; }
.public-site .nav a.btn { background: var(--brand-ink); color: #fff; }
/* Ação repetida em cartões = pílula de contorno; a pílula cheia fica para a ação principal */
.public-site .model-card .btn { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.public-site .model-card .btn:hover { background: var(--ink); color: #fff; }
.storefront-link, a { color: var(--ink); }
.storefront-link { font-weight: 600; text-decoration: none; border-bottom: 0; }
.storefront-link:hover { text-decoration: underline; }
.storefront-label { color: var(--brand-ink); font-weight: 600; letter-spacing: .02em; }

/* Cartões: neutros chapados, sem sombra; só os "artefatos" flutuam */
.card { background: var(--mist); box-shadow: none; border-radius: 24px; }
.card.flat { background: var(--paper); border: 1px solid var(--hairline); }
.item { background: var(--paper); box-shadow: none; border: 1px solid var(--hairline); border-radius: 20px; }
a.item:hover { outline: 2px solid var(--brand); }
.public-site .model-card, .public-site .fabric, .size-guide-card {
  background: var(--paper); border: 1px solid var(--hairline); border-radius: 24px; box-shadow: none;
}
.public-site .model-card .ph, .public-site .fabric > img, .size-guide-card img { background: var(--mist); }
.storefront-feature-image { background: var(--brand-soft); border-radius: 24px; box-shadow: var(--shadow); }
.brand-story-layout > img, .product-portrait img { border-radius: 20px; box-shadow: var(--shadow); }
.storefront-band, .section.alt { background: var(--fog); }

/* Destaque raro: cartão no laranja claro da marca */
.card.ok, .lock { background: var(--brand-soft); color: var(--brand-deep); }
.lock h3, .lock p { color: var(--brand-deep) !important; }
.lock .btn.ghost { color: var(--brand-deep) !important; border-color: var(--brand-deep); }

/* Campos */
input, select, textarea { border: 1.5px solid #c9cbd0; border-radius: 16px; background: var(--paper); font-family: var(--sans); }
input:focus, select:focus, textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 4px var(--brand-soft); }
.choice { border: 1.5px solid #c9cbd0; border-radius: 20px; font-weight: 600; }
.choice[aria-pressed="true"] { border-color: var(--brand-ink); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand-ink); }
:focus-visible { outline-color: var(--brand-ink); }

/* Etiquetas tipográficas */
.pill { background: var(--mist); color: var(--ink); font-weight: 600; }
.pill.orange { background: var(--brand-soft); color: var(--brand-deep); }

/* Etapas e abas */
.steps a { background: var(--mist); border-radius: 9999px; font-weight: 600; }
.steps a.on, .tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); }
.tabs button { border-radius: 9999px; border: 1.5px solid var(--hairline); font-weight: 600; }
.tabs .count { background: var(--brand); color: var(--ink); }

/* Barra de total: preto com o laranja da marca */
.totalbar { background: var(--ink); border-radius: 24px 24px 0 0; }
.totalbar .miss { background: var(--brand-soft); color: var(--brand-deep); }

/* Rodapé */
.footer { background: var(--ink); }
.footer a { color: #ffb877; }

/* Rodapé do site: claro, em colunas, com chamada final */
.site-footer { background: var(--fog); border-top: 1px solid var(--hairline); margin-top: 16px; padding: 56px 0 28px; color: var(--ink); }
.sf-cta {
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
  background: var(--brand-soft); border-radius: 24px; padding: 32px 36px; margin-bottom: 56px;
}
.sf-cta h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 6px; color: var(--brand-deep); }
.sf-cta p { margin: 0; color: var(--brand-deep); }
.sf-cta .btn.ghost { border-color: var(--brand-deep); color: var(--brand-deep); }
.sf-grid { display: grid; grid-template-columns: 1.3fr .8fr 1.2fr 1.2fr; gap: 36px; }
.sf-logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.15rem; }
.sf-logo img { width: 52px; height: 52px; border-radius: 50%; background: #fff; border: 1px solid var(--hairline); }
.sf-brand p { color: var(--slate); margin: 16px 0 0; max-width: 32ch; font-size: .95rem; line-height: 1.55; }
.sf-col { display: flex; flex-direction: column; gap: 10px; }
.sf-col h3 { font-family: var(--sans); font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ash); margin: 0 0 6px; }
.sf-col a, .sf-col span { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; }
.sf-col span { color: var(--slate); }
.sf-col a { white-space: nowrap; }
.sf-col a.sf-contact { display: inline-flex; align-items: center; gap: 12px; }
.sf-contact svg {
  flex: none; width: 34px; height: 34px; padding: 8px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-ink); transition: background .2s, color .2s;
}
.sf-col .sf-contact span { color: inherit; }
.sf-col a.sf-contact:hover { text-decoration: none; }
.sf-col a.sf-contact:hover span { text-decoration: underline; }
.sf-contact:hover svg { background: var(--brand-ink); color: #fff; }
.sf-col a:hover { color: var(--brand-ink); text-decoration: underline; }
.sf-bottom {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border-top: 1px solid var(--hairline); margin-top: 48px; padding-top: 20px; color: var(--slate); font-size: .85rem;
}
@media (max-width: 860px) { .sf-grid { grid-template-columns: 1fr 1fr; } .sf-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) {
  .site-footer { padding-top: 40px; }
  .sf-cta { padding: 24px 22px; margin-bottom: 40px; }
  .sf-cta .row, .sf-cta .btn { width: 100%; }
  .sf-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* ---------- Painel: topo com a logo nova ---------- */
.panel .brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.1rem; white-space: nowrap; }
.panel .brand img { width: 48px; height: 48px; border-radius: 50%; }
.panel .brand small { display: block; font-size: .78rem; font-weight: 600; color: var(--slate); letter-spacing: .02em; }
.panel h1 { font-size: clamp(2rem, 5vw, 3rem); }
.panel h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
.panel .kv dt { color: var(--slate); font-weight: 600; }

/* ---------- Lista de peças (carrinho) ---------- */
.pieces { display: flex; flex-direction: column; gap: 12px; }
.piece-empty { margin: 0; padding: 18px; border: 1.5px dashed #c9cbd0; border-radius: 20px; text-align: center; }
.piece {
  display: grid; grid-template-columns: 1fr auto; gap: 10px 18px; align-items: center;
  background: var(--paper); border: 1px solid var(--hairline); border-radius: 20px; padding: 16px 18px;
  transition: box-shadow .3s, border-color .3s;
}
.piece-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.piece-title { font-size: 1.1rem; }
.piece-sizes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.piece-total { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; white-space: nowrap; }
.piece-total strong { font-size: 1.15rem; }
.piece-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; border-top: 1px solid var(--hairline); padding-top: 12px; }
.piece-ask { font-weight: 700; color: var(--red); flex-basis: 100%; }
.piece.is-editing { border-color: var(--brand-ink); box-shadow: 0 0 0 2px var(--brand-ink); }
.piece.is-new { border-color: #1b7f3a; box-shadow: 0 0 0 3px #bfe8cc; }
.piece.is-bonus { background: #f1faf4; border-color: #bfe8cc; }
.btn.danger-fill { background: var(--red); color: #fff; border: 0; }
.pill.bonus { background: #dff3e6; color: #0f5126; align-self: flex-start; }
.free { color: #1b7f3a; font-weight: 700; }
tr.is-bonus td { background: #f1faf4; }

/* Formulário de lançamento */
.howto { margin: -4px 0 0; padding: 12px 16px; background: var(--paper); border: 1px solid var(--hairline); border-radius: 16px; font-size: .95rem; }
/* Escolha única: bolinha de "escolha um" em vez de aparência de caixa de marcar */
.choices.radio .choice { position: relative; padding-left: 46px; text-align: left; }
.choices.radio .choice::before {
  content: ""; position: absolute; left: 16px; top: 50%; width: 18px; height: 18px; margin-top: -9px;
  border-radius: 50%; border: 2px solid #9a9ca3; background: var(--paper); box-sizing: border-box;
}
.choices.radio .choice[aria-pressed="true"]::before { border-color: var(--brand-ink); box-shadow: inset 0 0 0 4px var(--paper); background: var(--brand-ink); }
.choices.radio .choice:disabled::before { border-style: dashed; }
/* Várias escolhas: quadradinho de marcar */
.choices.check .choice { position: relative; padding-left: 50px; text-align: left; }
.choices.check .choice::before {
  content: ""; position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; margin-top: -10px;
  border-radius: 6px; border: 2px solid #9a9ca3; background: var(--paper); box-sizing: border-box;
}
.choices.check .choice[aria-pressed="true"]::before {
  border-color: var(--brand-ink); background: var(--brand-ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 14px; background-position: center; background-repeat: no-repeat;
}
.pay-box { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; border: 1px solid var(--hairline); border-radius: 20px; background: var(--paper); }
.totals-sub { color: #fff; font-size: 1rem; margin: 14px 0 6px; }
.pay-totals { display: flex; flex-direction: column; gap: 8px; }
.pay-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 16px; border-radius: 16px; background: rgba(255, 255, 255, .08); }
.pay-total:first-child { background: rgba(240, 138, 36, .18); }
.pay-name { color: #fff; font-weight: 600; }
.pay-name small { color: var(--brand); font-weight: 700; margin-left: 4px; }
.pay-value { color: var(--brand); font-family: var(--serif); font-size: 1.5rem; white-space: nowrap; }
/* Uma tabela de tamanhos por combinação marcada (modelo · tipo · tecido) */
.combo { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 2px solid var(--hairline); border-radius: 18px; background: var(--paper); }
.combo.has { border-color: var(--brand); }
.combo-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 8px 12px; margin: -4px -4px 0; border-radius: 12px; background: var(--brand-soft); color: var(--brand-deep); }
.combo-head strong { font-size: 1.08rem; }
.combo-n { font-weight: 700; white-space: nowrap; }
.card-bonus .combo.has { border-color: #1b7f3a; }
.card-bonus .combo-head { background: #dff3e6; color: #0f5126; }
.card-editing { box-shadow: 0 0 0 2px var(--brand-ink); }
.card-bonus { background: #f1faf4; }
.add-bar { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 8px; }
.add-btn { flex: 1 1 260px; min-height: 60px; font-size: 1.15rem; }
.add-btn:disabled { background: var(--hairline); color: var(--slate); opacity: 1; cursor: not-allowed; }
.card-bonus .add-btn:not(:disabled) { background: #1b7f3a; }

/* Barra de total e totais da revisão */
.totalbar .btn-next, .btn-send { background: var(--brand); color: var(--ink); }
.totalbar .btn-next:hover, .btn-send:hover { background: #ffa24d; }
.btn-send { min-height: 64px; font-size: 1.2rem; }
.totals-card { background: var(--ink); color: #fff; }
.totals-card h2 { color: #fff; }
.totals-kv { font-size: 1.05rem; }
.totals-kv dt, .panel .totals-kv dt { color: #d4d6db; font-weight: 600; }
.totals-kv dd { color: #fff; }
.totals-kv .grand, .panel .totals-kv dt.grand { color: var(--brand); font-size: 1.35rem; font-weight: 700; margin-top: 6px; }
.totals-kv dd.grand { font-size: 1.7rem; font-family: var(--serif); font-weight: 400; }
.totals-card .card.alert { color: var(--ink); }

@media (max-width: 560px) {
  .piece { grid-template-columns: 1fr; }
  .piece-total { flex-direction: row; justify-content: space-between; align-items: baseline; }
  .piece-actions .btn { flex: 1 1 0; white-space: nowrap; padding-inline: 12px; }
  .panel .brand small { display: none; }
}

/* Preço */
.price-tag { font-family: var(--serif); font-weight: 400; font-size: 1.35rem; color: var(--brand-ink); }

/* Ficha de produção: uma linha por peça, tamanhos em colunas */
.table-scroll { overflow-x: auto; }
table.t.ws td.n, table.t.ws th.n { text-align: center; min-width: 44px; }
table.t.ws td.n strong { font-size: 1.1rem; }


/* Pix: QR Code + copia e cola */
.pix-box { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding: 14px; margin-top: 10px; border: 2px solid #32bcad; border-radius: 18px; background: var(--paper); }
.pix-qr svg { display: block; width: 180px; height: 180px; }
.pix-title { color: #1a8f83; font-size: 1.05rem; }
.pix-value { font-size: 1.6rem; font-weight: 800; }

.pix-box > .stack { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; flex: 1 1 220px; }
.pix-box > .stack > * + * { margin-top: 0; }

.pay-name small.extra { color: #1b7f3a; font-weight: 700; }

