/* Asistente "¿Qué cámara necesito?" · prefijo asi- */

.asi-page {
  min-height: 70vh;
  background: var(--bg);
  color: var(--text);
}

.asi-container {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 70px;
}

.asi-eyebrow {
  display: block;
  margin-bottom: 10px;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.asi-progress {
  height: 8px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.asi-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width .3s ease;
}

.asi-count {
  display: block;
  margin-top: 6px;
  color: var(--text-soft);
  font-size: 13px;
}

.asi-step {
  margin-top: 30px;
}

.asi-step h1,
.asi-head--result h1,
.asi-empty h1 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.15;
}

.asi-step > p,
.asi-head--result p,
.asi-empty p {
  margin: 8px 0 0;
  color: var(--text-soft);
}

.asi-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.asi-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 88px;
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}

.asi-card:hover {
  border-color: var(--text);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.asi-card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.asi-card.is-selected {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}

.asi-card__icon {
  flex: none;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--accent);
  color: var(--accent-ink, #111);
}

.asi-card__icon svg {
  width: 26px;
  height: 26px;
}

.asi-card__txt strong {
  display: block;
  font-size: 17px;
  line-height: 1.25;
}

.asi-card__txt small {
  display: block;
  margin-top: 2px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.35;
}

.asi-custom {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.asi-custom label {
  font-weight: 700;
}

.asi-custom input {
  width: 110px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.asi-nav {
  margin-top: 26px;
}

.asi-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 4px;
  border: 0;
  background: none;
  color: var(--text-soft);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.asi-back:hover {
  color: var(--text);
}

.asi-back svg {
  width: 18px;
  height: 18px;
}

.asi-loading,
.asi-empty {
  padding: 60px 10px;
  text-align: center;
}

.asi-loading svg,
.asi-empty > svg {
  width: 44px;
  height: 44px;
  color: var(--text-soft);
}

.asi-loading svg {
  animation: asi-spin 1s linear infinite;
}

@keyframes asi-spin {
  to { transform: rotate(360deg); }
}

.asi-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

/* Resultado */

.asi-head--result {
  margin-bottom: 24px;
}

.asi-results {
  display: grid;
  gap: 18px;
}

.asi-result {
  position: relative;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.asi-result--main {
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-lg);
  grid-template-columns: 280px 1fr;
}

.asi-ribbon {
  position: absolute;
  top: -13px;
  left: 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink, #111);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.asi-ribbon svg {
  width: 14px;
  height: 14px;
}

.asi-ribbon--alt {
  background: var(--border);
  color: var(--text);
}

.asi-result__media {
  display: grid;
  place-items: center;
  align-self: start;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  background: var(--bg-soft, var(--border));
  color: var(--text-soft);
  overflow: hidden;
}

.asi-result__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.asi-result__media svg {
  width: 48px;
  height: 48px;
}

.asi-result__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.asi-result__top h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.2;
}

.asi-result__top > div small {
  color: var(--text-soft);
}

.asi-score {
  flex: none;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.asi-score small {
  display: block;
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.asi-price {
  margin: 8px 0 12px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.asi-reasons,
.asi-warns {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.asi-warns {
  margin-top: 10px;
}

.asi-reasons li,
.asi-warns li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  line-height: 1.4;
}

.asi-reasons svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: #1f9d55;
}

.asi-warns li {
  color: var(--text-soft);
}

.asi-warns svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: #d98a00;
}

.asi-total {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-soft, var(--border));
  font-size: 14px;
}

.asi-total strong {
  font-size: 18px;
}

.asi-result__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.asi-result__actions .button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.asi-footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
}

.asi-footer-actions .button {
  gap: 8px;
  cursor: pointer;
}

.asi-footer-actions .button svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 720px) {
  .asi-container {
    padding-top: 26px;
  }

  .asi-cards {
    grid-template-columns: 1fr;
  }

  .asi-result,
  .asi-result--main {
    grid-template-columns: minmax(0, 1fr);
    padding: 18px 16px 16px;
  }

  .asi-result__media {
    max-height: 200px;
  }

  .asi-result__actions .button,
  .asi-footer-actions .button {
    flex: 1 1 100%;
  }
}

.asi-page .button--secondary {
  color: var(--text);
}

.asi-results, .asi-results > *, .asi-result__body { min-width: 0; }
.asi-result__body, .asi-result__body h3, .asi-result__body h2 { overflow-wrap: anywhere; }
