/* Tema: as variáveis abaixo são sobrescritas pelas cores e fontes configuradas no painel (applyTheme) */
:root {
  --primary: #222; --primary-text: #fff; --accent: #a7745a;
  --bg: #f7f7f7; --surface: #fff; --text: #1d1d1d; --muted: #777;
  --radius: 0px; --line: color-mix(in srgb, var(--text) 14%, transparent);
  --soft: color-mix(in srgb, var(--text) 5%, var(--bg));
  --font-heading: Georgia, serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --track: .14em;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: var(--font-body);
  background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-heading); line-height: 1.1; margin: 0 0 .4em; font-weight: 500; letter-spacing: -.005em; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--text); color: var(--bg); }

/* Rótulo pequeno em maiúsculas (usado em títulos de seção, selos, botões) */
.eyebrow { font-size: 11px; letter-spacing: var(--track); text-transform: uppercase; font-weight: 500; color: var(--muted); margin: 0 0 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  border: 1px solid var(--primary); border-radius: var(--radius); padding: .95em 1.4em;
  background: var(--primary); color: var(--primary-text); cursor: pointer; text-decoration: none;
  min-height: 50px; font-size: 12px; font-weight: 500; letter-spacing: var(--track); text-transform: uppercase;
  transition: background .2s, color .2s, opacity .2s;
}
.btn:hover { background: color-mix(in srgb, var(--primary) 86%, var(--bg)); }
.btn[disabled] { opacity: .35; pointer-events: none; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--text); }
.btn.ghost:hover { background: var(--text); color: var(--bg); }
.btn.soft { background: transparent; color: var(--text); border-color: var(--line); }
.btn.danger { background: #8f2d22; border-color: #8f2d22; color: #fff; }
.btn.small { min-height: 38px; padding: .5em .9em; font-size: 11px; }
.btn.whats { background: var(--text); border-color: var(--text); color: var(--bg); }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.input, .field input, .field select, .field textarea {
  width: 100%; padding: .8em .9em; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); min-height: 48px; outline: none; font-size: 16px; /* 16px evita zoom no iOS */
  transition: border-color .15s;
}
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--text); }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }
.row > .w30 { flex: 0 0 30%; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.muted { color: var(--muted); }
.small { font-size: .86em; }
.center { text-align: center; }
.stack > * + * { margin-top: 12px; }
.hidden { display: none !important; }
.badge { display: inline-block; padding: .3em .7em; border-radius: var(--radius); font-size: 10px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; background: var(--soft); color: var(--text); }
.status-pendente { background: #f3ead2; color: #6e5513; }
.status-pago { background: #dfeadf; color: #2f5b34; }
.status-enviado { background: #dfe6ef; color: #2c4a6e; }
.status-entregue { background: var(--soft); color: var(--text); }
.status-cancelado { background: #f1dfdb; color: #8f2d22; }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + var(--safe-bottom)); transform: translateX(-50%) translateY(16px);
  background: var(--text); color: var(--bg); padding: .85em 1.3em; border-radius: var(--radius); font-size: 13px; letter-spacing: .02em;
  opacity: 0; pointer-events: none; transition: .25s; z-index: 100; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Produto sem foto: bloco de cor neutro (a dona deve enviar fotos) */
.ph { position: relative; display: grid; place-items: end start; background: color-mix(in srgb, var(--c, var(--accent)) 28%, var(--soft)); aspect-ratio: 4 / 5; width: 100%; }
.ph span { margin: 10px; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: color-mix(in srgb, var(--text) 55%, transparent); }
.swatch { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--line); display: inline-block; vertical-align: middle; }
.spinner { width: 22px; height: 22px; border: 1.5px solid var(--line); border-top-color: var(--text); border-radius: 50%; animation: spin .8s linear infinite; margin: 48px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
