/* ADpersonam · productos, wizard, catálogo, formularios y resumen */

/* ── Tarjetas de producto ────────────────────────────────────────────── */
.prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 12px; }
.prod {
  display: grid; justify-items: start; align-content: start; gap: 6px; text-align: left; cursor: pointer;
  padding: 20px; min-height: 168px; border-radius: var(--r-lg); background: var(--surf); border: 1px solid var(--line);
  transition: border-color .2s, transform .15s, background .2s;
}
.prod:hover { border-color: var(--gold); }
.prod:active { transform: scale(.98); }
.prod b { font: 700 18px/1.2 var(--f-titulo); margin-top: 8px; }
.prod small { color: var(--soft); font-size: 14px; line-height: 1.4; }
@media (max-width: 560px) {
  .prods { grid-template-columns: 1fr 1fr; gap: 10px; }
  .prod { padding: 14px; min-height: 0; gap: 4px; }
  .prod b { font-size: 15px; margin-top: 6px; }
  .prod small { font-size: 12.5px; line-height: 1.35; }
  .prod-ico { width: 40px; height: 40px; border-radius: 11px; }
}
.prod-nivel { margin-top: auto; padding-top: 10px; font-size: 12px; font-weight: 600; color: var(--gold); }
.prod-ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: var(--surf2); color: var(--gold); flex: none; }
.prod-ico .ico, .borrador .ico { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.prod-agregar { background: transparent; border-style: dashed; }
.prod-agregar .prod-ico { background: transparent; border: 1px dashed var(--line); }

/* ── Borrador en el inicio ───────────────────────────────────────────── */
.borrador {
  display: flex; align-items: center; gap: 14px; margin-top: 8px; padding: 16px 18px; text-decoration: none;
  background: var(--surf); border: 1px solid var(--gold); border-radius: var(--r-lg);
}
.borrador-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--gold); color: var(--gold-ink); flex: none; }
.borrador b { display: block; font: 700 16px/1.25 var(--f-titulo); }
.borrador small { color: var(--soft); font-size: 13px; }
.borrador .borrador-ir { margin-left: auto; color: var(--gold); flex: none; }

/* ── Cinta de progreso (cada paso es una marca de la cinta métrica) ─── */
.wz-cinta { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; margin: -6px 0 18px; }
.wz-cinta a { display: block; height: 22px; position: relative; }
.wz-cinta a::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; border-radius: 2px; background: var(--line); transition: background .25s; }
.wz-cinta a::after { content: ''; position: absolute; left: 0; bottom: 4px; width: 1px; height: 7px; background: var(--line); }
.wz-cinta a.hecho::before { background: var(--gold); opacity: .55; }
.wz-cinta a.actual::before { background: var(--gold); }
.wz-cinta a.actual::after { background: var(--gold); height: 12px; width: 2px; }
.wz-paso { color: var(--gold); font-size: 14px; font-weight: 600; margin-bottom: 6px; }

/* ── Pie del wizard: fijo sobre la barra del menú en el cel ──────────── */
body.en-wizard main { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 110px); }
.wz-pie {
  position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b)); z-index: 19;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px;
  background: rgba(25, 25, 27, .94); border-top: 1px solid var(--line);
}
.wz-pie .btn { min-height: 46px; padding: 0 18px; }
.wz-pie .btn .ico, .wz-pie .btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.wz-cuenta { flex: 1; min-width: 0; color: var(--soft); font-size: 13px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 400px) { .wz-pie .btn-linea span { display: none; } .wz-pie .btn-linea { padding: 0 14px; } }
@media (min-width: 820px) {
  body.en-wizard main { padding-bottom: 130px; }
  .wz-pie { bottom: 0; padding: 14px max(32px, calc((100vw - 1040px) / 2 + 32px)); }
}

/* ── Tarjetas de opción ──────────────────────────────────────────────── */
.ops { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.ops-grupo { font-size: 17px; font-weight: 700; margin: 26px 0 12px; }
.ops-grupo:first-child { margin-top: 0; }
.ops-grupo small { color: var(--soft); font-weight: 500; font-size: 13px; margin-left: 6px; }
.op {
  position: relative; display: grid; grid-template-rows: 130px auto; gap: 12px; padding: 10px 10px 14px;
  background: var(--surf); border: 1px solid var(--line); border-radius: var(--r-lg); cursor: pointer;
  transition: border-color .2s, box-shadow .2s, transform .15s;
}
.op[role]:active { transform: scale(.985); }
.op[role]:hover { border-color: #5A5A62; }
.op[aria-checked="true"] { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 8px 24px rgba(0, 0, 0, .35); }
.op-ver { cursor: default; }
.op-prev { position: relative; min-height: 0; border-radius: 10px; overflow: hidden; }
.op-txt { padding: 0 6px; display: grid; gap: 3px; }
.op-txt b { font: 700 15px/1.25 var(--f-titulo); padding-right: 30px; }
.op-txt small { color: var(--soft); font-size: 13px; line-height: 1.4; }
.op-bodega { justify-self: start; margin-top: 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; color: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }
.op-check {
  position: absolute; right: 14px; bottom: 16px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; border: 1.5px solid var(--line); color: transparent; transition: background .2s, border-color .2s, color .2s;
}
.op-check svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.op[aria-checked="true"] .op-check { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.op-txt b:last-child { padding-right: 30px; }

/* En el cel: dos columnas para no hacer scroll eterno */
@media (max-width: 560px) {
  .ops:not(.ops-modulo) { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ops:not(.ops-modulo) .op { grid-template-rows: 104px auto; padding: 7px 7px 12px; gap: 9px; border-radius: 16px; }
  .op-txt { padding: 0 4px; }
  .op-txt b { font-size: 13.5px; padding-right: 0; }
  .op-txt small { font-size: 12px; }
  .ops:not(.ops-modulo) .op-check { top: 14px; right: 14px; bottom: auto; width: 22px; height: 22px; background: rgba(25, 25, 27, .75); }
  .ops:not(.ops-modulo) .op[aria-checked="true"] .op-check { background: var(--gold); }
  .ops:not(.ops-modulo) .op-txt b:last-child { padding-right: 0; }
  .pv-fuente > b { display: none; }
  .pv-fuente { padding: 10px 12px; }
  .pv-fuente strong { font-size: 16px; }
  .pv-paleta { padding: 8px; gap: 6px; }
  .pv-pal-tarjeta { padding: 7px 9px; }
  .pv-pal-tarjeta b { font-size: 17px; }
  .pv-pal-tarjeta span { width: 18px; height: 9px; }
  .pv-tono { font-size: 12.5px; padding: 10px 12px; }
  .pv-play { width: 34px; height: 34px; right: 8px; bottom: 8px; }
}

.ops-fuente .op, .ops-tono .op { grid-template-rows: 110px auto; }
.ops-modulo { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; }
.op-fila { grid-template-rows: none; grid-template-columns: auto 1fr; align-items: center; padding: 14px 52px 14px 14px; }
.op-fila .op-check { top: 50%; bottom: auto; transform: translateY(-50%); }
.op-fila .op-txt b { padding-right: 0; }

/* ── Formularios ─────────────────────────────────────────────────────── */
.form { display: grid; gap: 14px; }
.notas { max-width: 640px; }
.campo { display: grid; gap: 7px; }
.campo > span { font-size: 14px; font-weight: 600; }
.campo input, .campo textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surf); border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 14px; min-height: 48px; outline: none; transition: border-color .2s, box-shadow .2s; resize: vertical;
}
.campo input::placeholder, .campo textarea::placeholder { color: #7D7A75; }
.campo input:focus, .campo textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(227, 195, 141, .16); }
.campo.error input, .campo.error textarea { border-color: var(--copper); }
.modal .form { margin-top: 18px; }
.modal .segmentos { flex-wrap: wrap; border-radius: 16px; }
.modal .segmentos button { flex: 1; }

/* ── Catálogo: buscador y filtros ────────────────────────────────────── */
.cat-barra { display: grid; gap: 12px; margin-bottom: 22px; }
.buscador { position: relative; display: block; max-width: 520px; }
.buscador svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; fill: none; stroke: var(--soft); stroke-width: 2; stroke-linecap: round; }
.buscador input { width: 100%; min-height: 48px; padding: 0 16px 0 42px; font: inherit; color: var(--text); background: var(--surf); border: 1px solid var(--line); border-radius: 999px; outline: none; -webkit-appearance: none; appearance: none; }
.buscador input:focus { border-color: var(--gold); }
.buscador input::-webkit-search-cancel-button { -webkit-appearance: none; }
.chips-filtro { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips-filtro::-webkit-scrollbar { display: none; }
.chips-filtro button {
  flex: none; min-height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: none; color: var(--soft);
  font-weight: 600; font-size: 13.5px; cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.chips-filtro button[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }

/* ── Resumen ─────────────────────────────────────────────────────────── */
.res-prod { display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin-bottom: 14px; background: var(--surf); border: 1px solid var(--line); border-radius: var(--r-lg); }
.res-prod b { font: 700 17px/1.2 var(--f-titulo); display: block; }
.res-prod small { color: var(--soft); font-size: 13px; }
.res-prod .btn-texto { margin-left: auto; }
.res-fila { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 12px 16px 20px; }
.res-fila + .res-fila { border-top: 1px solid var(--line); }
.res-fila b { display: block; font-weight: 600; margin-bottom: 8px; }
.res-fila .btn-texto { color: var(--gold); flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 13px; padding: 5px 11px; border-radius: 999px; background: var(--surf2); color: var(--text); max-width: 100%; overflow-wrap: anywhere; }
.res-nota { font-size: 13px; color: var(--soft); }
.res-acciones { display: grid; justify-items: start; gap: 10px; margin-top: 24px; }
.res-acciones small { color: var(--soft); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn[disabled]:active { transform: none; }

/* El círculo de selección no debe pisar la descripción */
@media (min-width: 561px) { .op:not(.op-ver):not(.op-fila) .op-txt small { padding-right: 32px; } }
