/* Primible — Cotizador de impresión 3D (includes/cotizaciones.php).
   Mismo lenguaje que la home de servicio: títulos en dos tonos, superficies
   translúcidas con borde fino, pasos numerados y controles en píldora.

   Nota de especificidad: design-system.css pinta todos los inputs en modo
   oscuro con «html.dark-mode input:not(…)×5 !important». Los campos usan
   un selector más específico (form[data-cotizador] + [name]) para ganarle. */

.cotizador {
  position: relative;
  padding: clamp(64px, 8vw, 120px) 0;
  background: transparent;
  color: #fff;
  isolation: isolate;
}
html.dark-mode .cotizador,
html .cotizador { background: transparent !important; }

.cotizador::before {
  position: absolute;
  z-index: -1;
  top: 0;
  right: 5%;
  width: min(620px, 70vw);
  height: 620px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(177, 20, 255, .2), transparent 72%);
  content: "";
  pointer-events: none;
}

.cotizador__inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}

/* ---------- Encabezado ---------- */
.cotizador__head { position: sticky; top: calc(var(--pv-nav-h, 74px) + 40px); }

.cotizador__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--pv-lilac, #D66BFF);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.cotizador__eyebrow::before { width: 18px; height: 1px; background: currentColor; content: ""; }

.cotizador__title {
  margin: 18px 0 20px;
  color: #fff;
  font-size: clamp(38px, 4.4vw, 62px);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.02;
  text-transform: none;
}
.cotizador__title .tone-muted { color: #d66bff; }

.cotizador__subtitle { margin: 0; color: var(--pv-muted, #b9b9c0); font-size: 17px; line-height: 1.65; }

.cotizador__facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; padding: 0; list-style: none; }
.cotizador__facts li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--pv-line-strong, rgba(255, 255, 255, .14));
  border-radius: 999px;
  background: rgba(255, 255, 255, .03);
  color: #d8d5dc;
  font-size: 13.5px;
}
.cotizador__facts li::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pv-success, #3ccf91);
  box-shadow: 0 0 0 3px rgba(60, 207, 145, .18);
  content: "";
}

/* ---------- Tarjeta del formulario ---------- */
.cotizador__panel { min-width: 0; }

.cotizador__form,
.cotizador__done {
  position: relative;
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid var(--pv-line-strong, rgba(255, 255, 255, .14));
  border-radius: 28px;
  background: rgba(34, 34, 36, .78);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .85), inset 0 1px 0 rgba(255, 255, 255, .04);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
/* Línea de luz superior. */
.cotizador__form::before,
.cotizador__done::before {
  position: absolute;
  top: -1px;
  right: 18%;
  left: 18%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(227, 166, 255, .9), transparent);
  content: "";
}

.cotizador__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Progreso ---------- */
.cotizador__progress {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 0 30px;
  padding: 0;
  list-style: none;
}
.cotizador__form.is-stepped .cotizador__progress { display: grid; }
.cotizador__progress li {
  position: relative;
  padding-top: 14px;
  color: #6f6f77;
  font-size: 13px;
  font-weight: 500;
  transition: color .3s ease;
}
.cotizador__progress li::before,
.cotizador__progress li::after {
  position: absolute;
  top: 0;
  left: 0;
  height: 3px;
  border-radius: 3px;
  content: "";
}
.cotizador__progress li::before { right: 0; background: rgba(255, 255, 255, .1); }
.cotizador__progress li::after { width: 0; background: linear-gradient(90deg, var(--pv-violet, #B114FF), var(--pv-lilac, #D66BFF)); transition: width .5s var(--pv-ease, ease); }
.cotizador__progress li .mono { margin-right: 4px; color: inherit; font-size: 11px; }
.cotizador__progress li.is-active,
.cotizador__progress li.is-done { color: #fff; }
.cotizador__progress li.is-active::after,
.cotizador__progress li.is-done::after { width: 100%; }

/* ---------- Pasos ---------- */
.cotizador__step { min-width: 0; margin: 0 0 26px; padding: 0; border: 0; }
.cotizador__form.is-stepped .cotizador__step { display: none; }
.cotizador__form.is-stepped .cotizador__step.is-active { display: block; animation: stepIn .45s var(--pv-ease, ease) both; }
@keyframes stepIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.cotizador__legend {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 20px;
  color: #fff;
  font-size: clamp(22px, 2vw, 26px);
  font-weight: 600;
  letter-spacing: -.02em;
}
.cotizador__legend .mono { display: none; }
.cotizador__legend small { color: #8e8e96; font-size: 14px; font-weight: 400; letter-spacing: 0; }

/* ---------- Tarjetas «¿Qué tienes?» ---------- */
.cotizador__types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 22px; }

.cotizador__type { position: relative; display: flex; cursor: pointer; }
.cotizador .cotizador__type input[type="radio"] {
  position: absolute !important; top: 0; left: 0;
  width: 1px !important; height: 1px !important; min-width: 0 !important; flex-basis: auto !important;
  margin: 0 !important; border: 0 !important; opacity: 0; pointer-events: none;
}

.cotizador__type-card {
  position: relative;
  display: grid;
  flex: 1;
  grid-template-columns: 40px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  row-gap: 2px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--pv-line-strong, rgba(255, 255, 255, .14));
  border-radius: 18px;
  background: rgba(255, 255, 255, .025);
  transition: border-color .25s ease, background-color .25s ease, transform .25s var(--pv-ease, ease);
}
.cotizador__type-icon {
  display: grid;
  grid-row: 1 / span 2;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .06);
  color: #c9c9d1;
  transition: background-color .25s ease, color .25s ease;
}
.cotizador__type-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cotizador__type-card strong { color: #fff; font-size: 15px; font-weight: 600; line-height: 1.3; }
.cotizador__type-card small { color: #8e8e96; font-size: 12.5px; line-height: 1.35; }

.cotizador__type:hover .cotizador__type-card { border-color: rgba(214, 107, 255, .5); transform: translateY(-2px); }
.cotizador__type input:checked + .cotizador__type-card {
  border-color: var(--pv-violet, #B114FF);
  background: linear-gradient(180deg, rgba(177, 20, 255, .16), rgba(177, 20, 255, .06));
  box-shadow: inset 0 0 0 1px var(--pv-violet, #B114FF);
}
.cotizador__type input:checked + .cotizador__type-card .cotizador__type-icon { background: var(--pv-violet, #B114FF); color: #fff; }
/* Check en la esquina de la tarjeta elegida. */
.cotizador__type input:checked + .cotizador__type-card::after {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--pv-violet, #B114FF);
  color: #fff;
  content: "✓";
  font-size: 10px;
  font-weight: 700;
}
.cotizador__type input:focus-visible + .cotizador__type-card { outline: 2px solid #D66BFF; outline-offset: 2px; }

/* ---------- Campos ---------- */
.cotizador__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }

.cotizador__field { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin-bottom: 18px; }
.cotizador__grid .cotizador__field { margin-bottom: 0; }
.cotizador__field label,
.cotizador__label { color: #d8d5dc; font-size: 13.5px; font-weight: 500; }
.cotizador__field label small { color: #8e8e96; font-weight: 400; }
.cotizador__help { color: #8e8e96; font-size: 13px; }

html.dark-mode .cotizador form[data-cotizador] .cotizador__field :is(input[name]:not([type="file"]), select[name], textarea[name]),
.cotizador__field input:not([type="file"]),
.cotizador__field select,
.cotizador__field textarea {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px !important;
  border: 1px solid rgba(255, 255, 255, .1) !important;
  border-radius: 14px !important;
  outline: 0 !important;
  background: rgba(18, 18, 20, .6) !important;
  box-shadow: none !important;
  color: #fff !important;
  font: inherit;
  font-size: 16px !important;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
html.dark-mode .cotizador form[data-cotizador] .cotizador__field textarea[name],
.cotizador__field textarea { min-height: 120px; line-height: 1.55; resize: vertical; }
html.dark-mode .cotizador form[data-cotizador] .cotizador__field :is(input[name]:not([type="file"]), select[name], textarea[name]):hover { border-color: rgba(255, 255, 255, .2) !important; }
html.dark-mode .cotizador form[data-cotizador] .cotizador__field :is(input[name]:not([type="file"]), select[name], textarea[name]):focus {
  border-color: var(--pv-lilac, #D66BFF) !important;
  background: rgba(18, 18, 20, .85) !important;
  box-shadow: 0 0 0 4px rgba(177, 20, 255, .18) !important;
}
.cotizador__field ::placeholder { color: #6f6f77; }
html.dark-mode .cotizador form[data-cotizador] .cotizador__field.is-invalid :is(input[name], textarea[name]) { border-color: var(--pv-danger, #ff6b7a) !important; box-shadow: 0 0 0 4px rgba(255, 107, 122, .14) !important; }

/* ---------- Zona de arrastre ---------- */
.cotizador__drop {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 26px 18px;
  border: 1.5px dashed rgba(214, 107, 255, .35);
  border-radius: 18px;
  background: rgba(177, 20, 255, .04);
  color: #b9b9c0;
  font-size: 14.5px;
  text-align: center;
  cursor: pointer;
  transition: border-color .25s ease, background-color .25s ease;
}
.cotizador__drop:hover,
.cotizador__drop.is-dragover { border-color: var(--pv-lilac, #D66BFF); background: rgba(177, 20, 255, .1); }
.cotizador__drop input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.cotizador__drop-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 4px;
  border-radius: 14px;
  background: rgba(177, 20, 255, .18);
  color: #E3A6FF;
  transition: transform .3s var(--pv-ease, ease);
}
.cotizador__drop:hover .cotizador__drop-icon { transform: translateY(-3px); }
.cotizador__drop-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cotizador__drop-text strong { color: #fff; font-weight: 600; }
.cotizador__drop-text u { color: #E3A6FF; text-decoration-color: rgba(227, 166, 255, .4); text-underline-offset: 3px; }
.cotizador__drop-hint { color: #6f6f77; font-size: 12.5px; }
.cotizador__drop-files { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.cotizador__drop-files:empty { display: none; }
.cotizador__drop-files span {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 12.5px;
}

/* ---------- Checkboxes ---------- */
.cotizador__check { display: flex; gap: 12px; align-items: flex-start; color: #b9b9c0; font-size: 14px; line-height: 1.5; cursor: pointer; }
.cotizador__check input { flex: none; width: 20px; height: 20px; margin-top: 1px; accent-color: #B114FF; }
.cotizador__check a { color: #E3A6FF; }

/* ---------- Acciones ---------- */
.cotizador__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 22px;
  border-top: 1px solid var(--pv-line, rgba(255, 255, 255, .08));
}
.cotizador__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 28px;
  border: 1px solid var(--pv-violet, #B114FF);
  border-radius: 999px;
  background: var(--pv-violet, #B114FF);
  box-shadow: var(--pv-glow);
  color: #fff !important;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, transform .2s var(--pv-ease, ease);
}
.cotizador__btn::after { content: "→"; transition: transform .2s var(--pv-ease, ease); }
.cotizador__btn:hover { background: var(--pv-plum, #8D0DCC); }
.cotizador__btn:hover::after { transform: translateX(3px); }
.cotizador__btn--ghost { margin-right: auto; border-color: rgba(255, 255, 255, .16); background: transparent; box-shadow: none; }
.cotizador__btn--ghost::after { content: none; }
.cotizador__btn--ghost::before { content: "←"; }
.cotizador__btn--ghost:hover { border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .05); }
.cotizador__btn[hidden] { display: none; }
.cotizador__btn:disabled { opacity: .6; cursor: progress; }

.cotizador__alt { margin: 18px 0 0; color: #8e8e96; font-size: 14px; text-align: center; }
.cotizador__alt a { color: #E3A6FF; text-decoration: none; }
.cotizador__alt a:hover { text-decoration: underline; }

.cotizador__alert {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 107, 122, .45);
  border-radius: 14px;
  background: rgba(255, 107, 122, .08);
  color: #ffd3dd;
}

.cotizador__done { text-align: center; }
.cotizador__done h3 { margin: 0 0 10px; font-size: 28px; letter-spacing: -.02em; }
.cotizador__done p { margin: 0 0 24px; color: var(--pv-muted, #b9b9c0); }

[data-show-for][hidden] { display: none !important; }

/* Página /cotizar (page-cotizar.php). */
.cotizar-page .cotizador { padding-top: clamp(48px, 6vw, 96px); }

@media (max-width: 960px) {
  .cotizador__inner { grid-template-columns: 1fr; }
  .cotizador__head { position: static; }
}

@media (max-width: 600px) {
  .cotizador .wrap { padding-left: 16px; padding-right: 16px; }
  .cotizador__form, .cotizador__done { padding: 22px 16px; border-radius: 22px; }
  .cotizador__types, .cotizador__grid { grid-template-columns: 1fr; }
  .cotizador__progress li { font-size: 0; }
  .cotizador__progress li .mono { font-size: 11px; }
  .cotizador__progress li.is-active { font-size: 12px; }
  .cotizador__actions .cotizador__btn { flex: 1 1 auto; }
  .cotizador__btn--ghost { flex: 0 0 auto !important; }
}
