/* TechWish onboarding wizard — Fresh Pop design system */
:root {
  --bg: #fbf8f3; --ink: #1c2430; --blue: #1789b5; --orange: #ff6b4a;
  --yellow: #ffd23f; --wa: #25d366; --muted: #46525f; --muted2: #7d8b99;
  --font-head: 'Suez One', Georgia, serif;
  --font-body: 'Assistant', 'Segoe UI', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); -webkit-font-smoothing: antialiased; padding-bottom: 96px; }
a { color: inherit; text-decoration: none; }

.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; background: var(--bg); border-bottom: 3px solid var(--ink); }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-size: 20px; }
.brand img { width: 40px; height: 40px; border-radius: 10px; border: 2px solid var(--ink); }

.steps-dots { display: flex; gap: 8px; }
.steps-dots span { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink); background: #fff; transition: background .2s; }
.steps-dots span.on { background: var(--blue); }
.steps-dots span.done { background: var(--yellow); }

main { max-width: 760px; margin: 0 auto; padding: 28px 20px 40px; }
h1 { font-family: var(--font-head); font-weight: 400; font-size: clamp(26px, 5vw, 38px); margin: 0 0 8px; }
.lead { color: var(--muted); font-size: 17px; margin: 0 0 24px; }
.hidden { display: none !important; }
.loading { color: var(--muted); padding: 40px 0; text-align: center; }

/* template cards */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.tpl-card { background: #fff; border: 2px solid var(--ink); border-radius: 16px; overflow: hidden; cursor: pointer; transition: transform .12s; position: relative; }
.tpl-card:hover { transform: translateY(-4px); }
.tpl-card.selected { outline: 4px solid var(--blue); outline-offset: -2px; }
.tpl-card .swatch { height: 92px; display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-size: 26px; color: #fff; }
.tpl-card .tpl-info { padding: 12px 14px; border-top: 2px solid var(--ink); }
.tpl-card .tpl-info strong { display: block; font-size: 16px; }
.tpl-card .tpl-info small { color: var(--muted2); font-weight: 700; }
.tpl-card .demo-link { position: absolute; top: 8px; inset-inline-start: 8px; background: rgba(255,255,255,.92); border: 1.5px solid var(--ink); border-radius: 999px; font-size: 12px; font-weight: 800; padding: 4px 10px; }
.tpl-card .picked { position: absolute; top: 8px; inset-inline-end: 8px; background: var(--blue); color: #fff; border-radius: 999px; font-size: 12px; font-weight: 800; padding: 4px 10px; display: none; }
.tpl-card.selected .picked { display: block; }

/* forms */
.card { background: #fff; border: 2px solid var(--ink); border-radius: 18px; padding: 22px; box-shadow: 5px 5px 0 var(--yellow); }
.form-card label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 16px; }
.form-card .req { color: var(--orange); }
.form-card input[type=text], .form-card input[type=tel], .form-card input[type=email],
.form-card input[type=date], .form-card input[type=number], .form-card textarea {
  display: block; width: 100%; margin-top: 6px; font-family: var(--font-body); font-size: 16px;
  padding: 12px 14px; border: 2px solid var(--ink); border-radius: 12px; background: #fff; color: var(--ink);
}
.form-card input:focus, .form-card textarea:focus { outline: 3px solid var(--blue); outline-offset: -1px; }
.form-card input[dir=ltr] { text-align: start; }
.form-card textarea { resize: vertical; min-height: 84px; }
.form-card input.invalid, .form-card textarea.invalid { border-color: var(--orange); }
.field-err { color: var(--orange); font-size: 13px; font-weight: 700; margin-top: 4px; min-height: 16px; }
.err { color: var(--orange); font-weight: 700; min-height: 20px; }
.hint { color: var(--muted2); font-size: 13px; }

/* list fields */
.list-field { border: 2px dashed var(--muted2); border-radius: 14px; padding: 14px; margin-bottom: 16px; }
.list-field > .lf-title { font-weight: 800; margin-bottom: 10px; }
.lf-item { background: var(--bg); border: 2px solid var(--ink); border-radius: 12px; padding: 12px; margin-bottom: 10px; position: relative; }
.lf-item .lf-remove { position: absolute; top: 8px; inset-inline-start: 8px; background: #fff; border: 1.5px solid var(--ink); border-radius: 8px; font-weight: 800; cursor: pointer; font-size: 13px; padding: 2px 8px; }
.lf-add { background: var(--yellow); border: 2px solid var(--ink); border-radius: 10px; font-family: var(--font-body); font-weight: 800; font-size: 14px; padding: 8px 16px; cursor: pointer; }

/* image fields */
.img-field { margin-bottom: 20px; }
.img-field .if-label { font-weight: 800; margin-bottom: 8px; }
.dropzone { border: 2px dashed var(--blue); border-radius: 14px; padding: 18px; text-align: center; color: var(--muted); cursor: pointer; font-weight: 700; background: #f4fafd; }
.dropzone:hover { background: #e9f5fa; }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.thumb { position: relative; width: 92px; }
.thumb img { width: 92px; height: 92px; object-fit: cover; border-radius: 10px; border: 2px solid var(--ink); display: block; }
.thumb .t-del { position: absolute; top: -8px; inset-inline-end: -8px; width: 24px; height: 24px; border-radius: 50%; background: var(--orange); color: #fff; border: 2px solid var(--ink); font-weight: 800; cursor: pointer; line-height: 1; }
.thumb .t-move { position: absolute; bottom: 4px; inset-inline-start: 4px; display: flex; gap: 4px; }
.thumb .t-move button { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--ink); background: rgba(255,255,255,.95); cursor: pointer; font-size: 11px; padding: 0; }
.thumb small { display: block; text-align: center; color: var(--muted2); font-size: 11px; margin-top: 2px; }

/* nav */
.navbar { position: fixed; bottom: 0; right: 0; left: 0; display: flex; gap: 12px; justify-content: space-between; padding: 12px 16px; background: var(--bg); border-top: 3px solid var(--ink); z-index: 20; }
.navbar .btn { min-width: 120px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-body); font-weight: 800; font-size: 17px; padding: 14px 26px; border-radius: 12px; border: 2px solid var(--ink); cursor: pointer; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 4px 4px 0 var(--ink); }
.btn-primary:active { transform: translate(2px,2px); box-shadow: 2px 2px 0 var(--ink); }
.btn-primary:disabled { opacity: .5; cursor: default; }
.btn-ghost { background: #fff; color: var(--ink); }
.btn-wa { background: var(--wa); color: #fff; box-shadow: 4px 4px 0 var(--ink); }

/* building / wow */
.building { text-align: center; padding: 60px 0; }
.spinner { width: 56px; height: 56px; border: 5px solid var(--yellow); border-top-color: var(--blue); border-radius: 50%; margin: 0 auto 24px; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.draft-frame { border: 2px solid var(--ink); border-radius: 16px; overflow: hidden; box-shadow: 6px 6px 0 var(--blue); height: min(60vh, 520px); }
.draft-frame iframe { width: 100%; height: 100%; border: 0; }
.wow-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 10px; }
.wow-actions .btn { flex: 1 1 220px; }

@media (max-width: 560px) {
  main { padding-top: 20px; }
  .card { padding: 16px; box-shadow: 4px 4px 0 var(--yellow); }
}
