/* Vista previa web gratuita (DE, EN, ES, PT). Capa sobre form-dark.css. */
.form-page .wrap { max-width: 860px; }
.form-page .eyebrow { color: var(--lima); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin: 30px 0 8px; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m); padding: 18px; }
.step b { display: block; font-size: .95rem; margin-bottom: 4px; }
.step p { font-size: .88rem; color: var(--text-2); }
section.block { margin-top: 36px; }
.block-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.block-head h2 { margin: 0; font-size: 1.35rem; }
.block-head .snum { display: inline-flex; align-items: center; justify-content: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--lima); color: var(--bg); font-family: var(--font-mono); font-weight: 700; font-size: .85rem; flex: 0 0 auto; }
.block-head .opt { font-size: .82rem; color: var(--text-3); }
/* Diseños */
.designs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.design-card { position: relative; border: 1px solid var(--border); border-radius: var(--radius-m); overflow: hidden; background: var(--surface); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.design-card:hover { border-color: var(--text-3); }
.design-card.selected { border-color: var(--lima); box-shadow: 0 0 0 1px var(--lima), 0 12px 36px var(--lima-glow); }
.design-card .thumb { position: relative; aspect-ratio: 16 / 11; background: var(--elevated); overflow: hidden; }
.design-card .thumb iframe { position: absolute; top: 0; left: 0; width: 1200px; height: 825px; border: 0; transform: scale(.185); transform-origin: top left; pointer-events: none; background: var(--text); }
@media (min-width: 560px) { .design-card .thumb iframe { transform: scale(.21); } }
.design-card .cap { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--border); }
.design-card .cap b { font-size: .95rem; }
.design-card .cap small { color: var(--text-2); font-size: .78rem; }
.design-card .tick { display: none; position: absolute; top: 10px; right: 10px; background: var(--lima); color: var(--bg); width: 1.7rem; height: 1.7rem; border-radius: 50%; align-items: center; justify-content: center; font-weight: 700; }
.design-card.selected .tick { display: inline-flex; }
.catalog-link { margin-top: 12px; font-size: .88rem; color: var(--text-2); }
.catalog-link a { color: var(--lima); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
/* Paletas */
.palettes { display: flex; gap: 10px; flex-wrap: wrap; }
.palette-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-family: inherit; font-weight: 600; font-size: .88rem; cursor: pointer; transition: border-color .15s; }
.palette-btn:hover { border-color: var(--text-3); }
.palette-btn.selected { border-color: var(--lima); }
.palette-btn .sw { width: 1rem; height: 1rem; border-radius: 50%; border: 1px solid var(--border); }
/* Formulario */
.form-page form.vorschau { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l); padding: 26px; }
.form-page form.vorschau fieldset { margin-bottom: 8px; }
.form-page form.vorschau legend { padding-top: 8px; }
.form-page .field .hint { margin-top: 5px; font-size: .8rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rows { display: grid; gap: 10px; }
.row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: center; }
.row.prod { grid-template-columns: 1.1fr 1.5fr .65fr auto auto; }
.row input { width: 100%; }
.row .del { background: none; border: 0; color: var(--text-3); font-size: 1.2rem; cursor: pointer; padding: 6px 8px; line-height: 1; }
.row .del:hover { color: var(--danger); }
.add-row { background: none; border: 1px dashed var(--text-3); color: var(--text-2); border-radius: var(--radius-s); padding: 9px 16px; font-family: inherit; font-weight: 600; font-size: .88rem; cursor: pointer; margin-top: 10px; }
.add-row:hover { border-color: var(--lima); color: var(--lima); }
.prod-foto-btn { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 52px; height: 52px; border: 1px dashed var(--text-3); border-radius: var(--radius-s); cursor: pointer; overflow: hidden; background: var(--bg); flex: 0 0 auto; }
.prod-foto-btn:hover { border-color: var(--lima); }
.prod-foto-btn input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.prod-foto-thumb { display: none; width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-s); }
.prod-foto-btn.has-img .prod-foto-thumb { display: block; }
.prod-foto-label { font-size: .6rem; color: var(--text-2); font-weight: 600; text-align: center; line-height: 1.1; }
.prod-foto-btn.has-img .prod-foto-label { display: none; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; color: var(--text-2); margin: 6px 0 18px; }
.consent input { margin-top: 3px; width: 18px; height: 18px; flex: 0 0 auto; }
.consent a { color: var(--lima); text-decoration: underline; text-underline-offset: 2px; }
.form-page form .btn { width: 100%; font-size: 1rem; padding: 14px 26px; }
.form-page form .btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.preview-img { max-width: 120px; border-radius: var(--radius-s); margin-top: 10px; display: none; }
.file-pick { display: inline-flex; align-items: center; gap: 8px; margin-top: 2px; }
.file-pick input[type="file"] { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.file-pick-btn { display: inline-flex; align-items: center; gap: 6px; font-family: inherit; font-weight: 600; font-size: .86rem; padding: 9px 16px; border-radius: var(--radius-s); border: 1px dashed var(--text-3); background: var(--bg); color: var(--text); cursor: pointer; transition: border-color .15s; }
.file-pick-btn:hover { border-color: var(--lima); }
.file-pick-name { font-size: .82rem; color: var(--text-3); }
.msg { border-radius: var(--radius-m); padding: 18px 20px; margin-top: 18px; font-size: .95rem; }
.msg.ok { background: var(--line); border: 1px solid var(--lima-dark); color: var(--lima); }
.msg.err { background: var(--surface); border: 1px solid var(--danger); color: var(--danger); }
/* Vista previa en vivo */
.live-box { border: 1px solid var(--border); border-radius: var(--radius-m); overflow: hidden; background: var(--surface); }
.live-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.live-toolbar .vlabel { font-size: .85rem; font-weight: 600; color: var(--text-2); }
.view-btns { display: flex; gap: 6px; }
.view-btn { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-s); padding: 5px 12px; font-family: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; }
.view-btn.selected { border-color: var(--lima); background: var(--lima); color: var(--bg); }
.live-frame-holder { position: relative; height: 520px; display: flex; justify-content: center; background: var(--elevated); }
.live-frame-holder iframe { border: 0; height: 100%; width: 100%; background: var(--text); }
.live-frame-holder.mobile iframe { width: 390px; max-width: 100%; box-shadow: 0 0 0 1px var(--border); }
@media (max-width: 640px) {
  .grid2 { grid-template-columns: 1fr; gap: 0; }
  .row { grid-template-columns: 1fr; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
  .row.prod { grid-template-columns: 1fr auto auto; grid-template-areas: "name name name" "desc desc desc" "precio foto del"; align-items: center; }
  .row.prod input:nth-child(1) { grid-area: name; }
  .row.prod input:nth-child(2) { grid-area: desc; }
  .row.prod input:nth-child(3) { grid-area: precio; }
  .row.prod .prod-foto-btn { grid-area: foto; justify-self: start; }
  .row.prod .del { grid-area: del; justify-self: end; }
}
