/* Imvimax 2026 — «Pide presupuesto» (prefijo imvp-). Usa los tokens de style.css. */

body.imv.imvp-pag { background: var(--fondo); }
body.imvp-pag .site-content > .ast-container { display: block; max-width: none; padding: 0; }

.imvp { display: block; padding-bottom: 72px; }
.imvp :where(ul, ol) { margin: 0; padding: 0; list-style: none; }
.imvp :where(h1, h2, p, fieldset, legend) { margin: 0; padding: 0; border: 0; }
.imvp [hidden] { display: none !important; }
html:not(.imvp-js) .imvp-solo-js, .imvp-js .imvp-sin-js { display: none; }
.imvp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

body.imv .imvp :is(a, button, input, textarea):focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
body.imv .imvp-cab a:focus-visible { outline-color: var(--menta); }

/* ---------- Cabecera ---------- */
.imvp-cab { position: relative; overflow: hidden; isolation: isolate; padding: 26px 0 118px; background: var(--tinta); color: #fff; }
.imvp-cab h1 { padding-top: 14px; font-size: clamp(34px, 4.6vw, 58px); font-weight: 800; line-height: 1; letter-spacing: -0.03em; color: #fff; font-variation-settings: "opsz" 96; }
.imvp-cab__txt { max-width: 36em; padding-top: 14px; font-size: clamp(16px, 1.3vw, 18.5px); line-height: 1.45; color: #d5e6ea; }
body.imv .imvp-migas, body.imv .imvp-migas a { color: #b9d0d6; }
body.imv .imvp-migas a:hover { color: #fff; }
.imvp-hex { position: absolute; z-index: -1; aspect-ratio: 1.1547 / 1; clip-path: var(--hex); }
.imvp-hex--a { width: 300px; right: 6%; top: -92px; background: var(--teal); opacity: .55; }
.imvp-hex--b { width: 300px; right: calc(6% - 232px); top: 42px; background: var(--menta); opacity: .16; }
.imvp-hex--c { width: 300px; right: 6%; top: 176px; background: var(--cian); opacity: .2; }

/* ---------- Asistente ---------- */
.imvp-asistente { display: none; }
.imvp-js .imvp-asistente { display: grid; grid-template-columns: minmax(0, 1fr) 348px; gap: 24px; align-items: start; margin-top: -78px; position: relative; }
.imvp-form { margin: 0; padding: clamp(18px, 2.6vw, 34px); background: #fff; border-radius: var(--r-l); box-shadow: var(--sombra-2); scroll-margin-top: 140px; }

/* Pasos y barra */
.imvp-pasos ol { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
body.imv .imvp-pasos button {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 4px 6px 4px 0;
  background: none; border: 0; border-radius: var(--r-s); box-shadow: none;
  color: var(--gris); font: inherit; font-size: 15px; font-weight: 700; line-height: 1.15; text-align: left; text-transform: none; letter-spacing: 0; cursor: pointer;
}
body.imv .imvp-pasos button:disabled { cursor: default; opacity: 1; }
body.imv .imvp-pasos button:hover:not(:disabled) { background: none; color: var(--teal-osc); }
.imvp-pasos__n {
  display: grid; place-items: center; flex: none; width: 40px; aspect-ratio: 1.1547 / 1; clip-path: var(--hex);
  background: var(--fondo); color: var(--gris); font-size: 16px; font-weight: 800; transition: background-color .2s, color .2s;
}
body.imv .imvp-pasos li[aria-current] button { color: var(--tinta); }
.imvp-pasos li[aria-current] .imvp-pasos__n { background: var(--tinta); color: #fff; }
body.imv .imvp-pasos li.imvp-pasos__hecho button { color: var(--teal-osc); }
.imvp-pasos__hecho .imvp-pasos__n { background: var(--menta); color: var(--tinta); }
.imvp-barra { height: 6px; margin-top: 14px; border-radius: 3px; background: var(--fondo); overflow: hidden; }
.imvp-barra span { display: block; width: 33.333%; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--teal), #17a3a3); transition: width .35s cubic-bezier(.3, .7, .2, 1); }

/* Paso */
.imvp-paso { padding-top: 28px; }
.imvp-paso:not([hidden]) { animation: imvp-entra .28s ease-out both; }
@keyframes imvp-entra { from { opacity: 0; transform: translateY(8px); } }
body.imv .imvp-paso__tit { font-size: clamp(24px, 2.5vw, 32px); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; color: var(--tinta); }
body.imv .imvp-paso__tit:focus { outline: none; }
.imvp-grupo.imvp-grupo--tipo > legend { width: 100%; padding-bottom: 20px; }

.imvp-elegido { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 12px; padding: 10px 14px; border-radius: var(--r-s); background: var(--menta-suave); font-size: 15.5px; }
body.imv .imvp-enlace {
  min-height: 32px; padding: 0 2px; background: none; border: 0; border-radius: 4px; box-shadow: none;
  color: var(--teal-osc); font: inherit; font-size: 15px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; text-transform: none; letter-spacing: 0; cursor: pointer;
}
body.imv .imvp-enlace:hover { background: none; color: var(--tinta); }

/* Tarjetas del paso 1 */
.imvp-ops { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.imvp-op { grid-column: span 2; position: relative; display: block; margin: 0; cursor: pointer; }
.imvp-op:nth-child(-n+2) { grid-column: span 3; }
.imvp-op input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.imvp-op__caja {
  position: relative; display: flex; flex-direction: column; gap: 14px; height: 100%; min-height: 150px; padding: 18px 18px 20px; box-sizing: border-box;
  border: 2px solid var(--linea); border-radius: var(--r-m); background: #fff;
  transition: border-color .15s, background-color .15s, box-shadow .15s, transform .15s;
}
.imvp-op:hover .imvp-op__caja { border-color: var(--teal); box-shadow: var(--sombra-1); transform: translateY(-2px); }
.imvp-op input:focus-visible + .imvp-op__caja { outline: 3px solid var(--teal); outline-offset: 2px; }
.imvp-op input:checked + .imvp-op__caja { border-color: var(--tinta); background: var(--menta-suave); box-shadow: var(--sombra-1); }
.imvp-op__ico { display: grid; place-items: center; width: 62px; aspect-ratio: 1.1547 / 1; clip-path: var(--hex); background: var(--cian-suave); color: var(--tinta); transition: background-color .15s; }
.imvp-op input:checked + .imvp-op__caja .imvp-op__ico { background: var(--menta); }
.imvp-op__txt { display: flex; flex-direction: column; gap: 4px; }
.imvp-op__txt strong { font-size: 17.5px; font-weight: 800; line-height: 1.2; letter-spacing: -0.01em; color: var(--tinta); text-wrap: balance; }
.imvp-op__txt small { font-size: 14.5px; line-height: 1.35; color: var(--gris); }
.imvp-op__marca { position: absolute; top: 14px; right: 14px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--linea); box-sizing: border-box; background: #fff; }
.imvp-op input:checked + .imvp-op__caja .imvp-op__marca { border-color: var(--tinta); background: var(--tinta); }
.imvp-op input:checked + .imvp-op__caja .imvp-op__marca::after { content: ""; position: absolute; left: 7px; top: 3px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }

/* Grupos, chips y campos */
.imvp-panel { display: grid; gap: 22px; padding-top: 22px; }
.imvp-grupo { min-width: 0; }
.imvp-grupo > legend, .imvp-campo > label { display: block; padding-bottom: 9px; font-size: 16px; font-weight: 700; line-height: 1.3; color: var(--tinta); }
.imvp-opc { font-weight: 400; font-size: 14.5px; color: var(--gris); }
.imvp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.imvp-chip { position: relative; display: inline-flex; margin: 0; cursor: pointer; }
.imvp-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.imvp-chip span {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; box-sizing: border-box;
  border: 2px solid var(--linea); border-radius: 999px; background: #fff; color: var(--tinta); font-size: 15.5px; font-weight: 600; line-height: 1.2;
  transition: border-color .15s, background-color .15s, color .15s;
}
.imvp-chip:hover span { border-color: var(--teal); }
.imvp-chip input:focus-visible + span { outline: 3px solid var(--teal); outline-offset: 2px; }
.imvp-chip input:checked + span { border-color: var(--tinta); background: var(--tinta); color: #fff; }
.imvp-chip input:checked + span::before { content: ""; width: 5px; height: 10px; margin: -3px 2px 0 2px; border: solid var(--menta); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }

body.imv .imvp-campo :is(input, textarea) {
  display: block; width: 100%; min-height: 50px; padding: 12px 14px; box-sizing: border-box;
  border: 2px solid var(--linea); border-radius: 12px; background: #fff; box-shadow: none;
  color: var(--tinta); font-size: 16px; line-height: 1.4;
  transition: border-color .15s;
}
body.imv .imvp-campo textarea { min-height: 96px; resize: vertical; }
body.imv .imvp-campo :is(input, textarea)::placeholder { color: var(--gris); opacity: 1; }
body.imv .imvp-campo :is(input, textarea):hover { border-color: #a9bcc2; }
body.imv .imvp-campo :is(input, textarea):focus { border-color: var(--teal); outline: 3px solid rgba(8, 112, 127, .22); outline-offset: 0; }
body.imv .imvp-campo [aria-invalid="true"] { border-color: var(--rojo); }
.imvp-ayuda { padding-top: 6px; font-size: 14px; line-height: 1.4; color: var(--gris); }
.imvp-error { font-size: 14.5px; font-weight: 600; line-height: 1.35; color: var(--rojo); }
.imvp-error:not(:empty) { padding-top: 7px; }
.imvp-error:not(:empty)::before { content: "!"; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 7px; border-radius: 50%; background: var(--rojo); color: #fff; font-size: 12.5px; font-weight: 800; vertical-align: 1px; }
.imvp-dos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.imvp-nota { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-s); background: var(--cian-suave); font-size: 15px; line-height: 1.4; }
.imvp-nota .imv-ico { margin-top: 1px; }
body.imv .imvp-nota a, body.imv .imvp-priv a, body.imv .imvp-llamar a, body.imv .imvp-tienda a { color: var(--teal-osc); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* Botones */
.imvp-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--linea); }
.imvp-paso[data-paso="1"] .imvp-nav { justify-content: flex-end; }
body.imv .imvp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 24px; box-sizing: border-box;
  border: 2px solid transparent; border-radius: 12px; box-shadow: none;
  font: inherit; font-size: 16.5px; font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none; text-transform: none; letter-spacing: 0; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}
body.imv .imvp-btn:active { transform: translateY(1px); }
body.imv .imvp-btn--sig { background: var(--ambar); color: var(--tinta); }
body.imv .imvp-btn--sig:hover { background: var(--ambar-osc); color: var(--tinta); }
body.imv .imvp-btn--ant { padding-inline: 16px 20px; background: #fff; border-color: var(--linea); color: var(--tinta); }
body.imv .imvp-btn--ant:hover { background: #fff; border-color: var(--tinta); color: var(--tinta); }
body.imv .imvp-btn--wa { background: var(--verde); color: #fff; }
body.imv .imvp-btn--wa:hover { background: #0a6338; color: #fff; }
body.imv .imvp-btn--correo { background: #fff; border-color: var(--tinta); color: var(--tinta); }
body.imv .imvp-btn--correo:hover { background: var(--tinta); color: #fff; }

.imvp-enviar { display: grid; grid-template-columns: 1.25fr 1fr; gap: 12px; margin-top: 26px; }
body.imv .imvp-enviar .imvp-btn { min-height: 58px; font-size: 17.5px; }
.imvp-llamar { padding-top: 14px; font-size: 15.5px; color: var(--gris); }
.imvp-hecho { display: grid; gap: 4px; justify-items: start; margin-top: 16px; padding: 14px 16px; border-radius: var(--r-s); border-left: 5px solid var(--verde); background: var(--menta-suave); font-size: 15.5px; line-height: 1.45; }
.imvp-priv { padding-top: 16px; font-size: 14px; line-height: 1.45; color: var(--gris); }

/* ---------- Resumen ---------- */
.imvp-resumen { position: sticky; top: 140px; padding: 20px; border-radius: var(--r-l); background: var(--tinta-2); color: #fff; box-shadow: var(--sombra-2); }
.imvp-resumen h2 { display: flex; align-items: center; gap: 8px; font-size: 16.5px; font-weight: 700; line-height: 1.2; color: #fff; }
.imvp-burbuja { position: relative; margin-top: 16px; padding: 14px 16px; border-radius: 4px 16px 16px 16px; background: #fff; color: var(--tinta); }
.imvp-burbuja::before { content: ""; position: absolute; left: 0; top: -9px; border: 5px solid transparent; border-left-color: #fff; border-bottom-color: #fff; }
.imvp-burbuja__txt { max-height: 52vh; overflow-y: auto; font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; scrollbar-width: thin; }
.imvp-burbuja__txt--vacio { color: var(--gris); }
.imvp-resumen__pie { padding-top: 12px; font-size: 13.5px; color: #c2d8dd; }

/* ---------- Contacto directo (y versión sin JS) ---------- */
.imvp-nojs { margin-top: 28px !important; padding: 14px 16px !important; border-radius: var(--r-s); background: #fff; border-left: 5px solid var(--ambar); font-weight: 600; }
.imvp-directo { padding-top: 48px; }
html:not(.imvp-js) .imvp-directo { padding-top: 24px; }
html:not(.imvp-js) .imvp-cab { padding-bottom: 40px; }
.imvp-directo h2 { padding-bottom: 16px; font-size: clamp(22px, 2.2vw, 28px); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; color: var(--tinta); }
.imvp-canales { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
body.imv a.imvp-canal {
  display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 12px 16px; box-sizing: border-box;
  border: 1px solid var(--linea); border-radius: var(--r-m); background: #fff; color: var(--tinta); text-decoration: none;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
body.imv a.imvp-canal:hover { border-color: var(--teal); box-shadow: var(--sombra-1); transform: translateY(-2px); color: var(--tinta); }
.imvp-canal__ico { display: grid; place-items: center; flex: none; width: 54px; aspect-ratio: 1.1547 / 1; clip-path: var(--hex); background: var(--cian-suave); color: var(--tinta); }
.imvp-canal--wa .imvp-canal__ico { background: var(--menta); color: var(--verde); }
.imvp-canal strong { display: block; font-size: 17px; font-weight: 800; line-height: 1.2; }
.imvp-canal small { display: block; font-size: 14.5px; color: var(--gris); overflow-wrap: anywhere; }
.imvp-tienda { display: flex; flex-wrap: wrap; gap: 8px 32px; padding-top: 18px; font-size: 15px; line-height: 1.45; color: #33505a; }
.imvp-tienda li { display: flex; gap: 8px; align-items: flex-start; }
.imvp-tienda .imv-ico { margin-top: 1px; color: var(--teal); }

/* ---------- Adaptación ---------- */
@media (max-width: 1100px) {
  .imvp-js .imvp-asistente { grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; }
}
@media (max-width: 920px) {
  .imvp-js .imvp-asistente { grid-template-columns: minmax(0, 1fr); }
  .imvp-resumen { position: static; }
  .imvp-burbuja__txt { max-height: none; }
  .imvp-hex--a, .imvp-hex--b, .imvp-hex--c { width: 200px; }
  .imvp-hex--a { top: -60px; right: -30px; }
  .imvp-hex--b { top: 30px; right: -184px; }
  .imvp-hex--c { top: 120px; right: -30px; }
}
@media (max-width: 640px) {
  .imvp { padding-bottom: 48px; }
  .imvp-cab { padding: 18px 0 96px; }
  .imvp-js .imvp-asistente { margin-top: -72px; }
  .imvp-form { border-radius: var(--r-m); }
  .imvp-pasos ol { gap: 4px; }
  body.imv .imvp-pasos button { flex-direction: column; align-items: flex-start; gap: 6px; font-size: 13.5px; }
  .imvp-pasos__n { width: 34px; font-size: 14.5px; }
  .imvp-paso { padding-top: 22px; }
  .imvp-ops { grid-template-columns: 1fr; gap: 10px; }
  .imvp-op, .imvp-op:nth-child(-n+2) { grid-column: auto; }
  .imvp-op__caja { flex-direction: row; align-items: center; min-height: 0; padding: 14px 44px 14px 14px; }
  .imvp-op__ico { flex: none; width: 52px; }
  .imvp-op__marca { top: 50%; margin-top: -12px; }
  .imvp-op__txt strong { font-size: 16.5px; }
  .imvp-dos, .imvp-enviar, .imvp-canales { grid-template-columns: 1fr; }
  .imvp-nav { margin-top: 22px; }
  body.imv .imvp-btn--sig { flex: 1; }
  .imvp-paso[data-paso="1"] .imvp-btn--sig { flex: 1; }
  /* El botón «subir arriba» de Astra tapa «Atrás» y los chips en móvil. */
  body.imvp-pag #ast-scroll-top { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .imvp-paso:not([hidden]) { animation: none; }
  .imvp *, .imvp *::before, .imvp *::after { transition: none !important; }
}
