/* =============================================
   AGUAMARINA AI — asesora de estilo
   Prefijo `ai-` para no chocar con styles.css
   ============================================= */

.ai-page {
  background:
    radial-gradient(900px 420px at 12% -8%, rgba(95, 202, 187, 0.24), transparent 62%),
    radial-gradient(720px 380px at 92% 4%, rgba(201, 165, 90, 0.13), transparent 60%),
    var(--cream);
  color: var(--dark);
}

.ai-main {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px 70px;
}

/* ── Navbar ─────────────────────────────────── */

.ai-nav-actions { gap: 6px; }

.ai-nav-link {
  padding: 8px 12px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: var(--r-full);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.ai-nav-link:hover,
.ai-nav-link:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.ai-look-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 10px 7px 12px;
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 500;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--r-full);
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.ai-look-btn:hover,
.ai-look-btn:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}
.ai-look-btn__count {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--teal-darker);
  background: var(--gold-light);
  border-radius: var(--r-full);
}

/* ── Hero ───────────────────────────────────── */

.ai-hero {
  padding: 42px 0 30px;
  text-align: center;
  animation: aiFadeUp 0.5s var(--ease) both;
}

.ai-hero__eyebrow {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal-dark);
}

.ai-hero__title {
  margin: 8px 0 12px;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 4.7rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.02em;
}
.ai-hero__title em {
  font-style: italic;
  color: var(--teal-dark);
}

.ai-hero__lead {
  max-width: 570px;
  margin: 0 auto;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--mid);
}

.ai-hero__steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}
.ai-hero__steps span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--mid);
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
}
.ai-hero__steps b {
  color: var(--teal-dark);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
}

/* ── Layout ─────────────────────────────────── */

.ai-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 338px;
  gap: 22px;
  align-items: start;
}

.ai-wizard {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
  animation: aiFadeUp 0.55s 0.04s var(--ease) both;
}

/* ── Stepper ────────────────────────────────── */

.ai-stepper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: linear-gradient(180deg, #fff, var(--teal-ultra));
  border-bottom: 1px solid var(--border);
}

.ai-step {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 14px 10px;
  font-family: var(--font-body);
  text-align: left;
  color: var(--light-text);
  background: transparent;
  border: 0;
  border-right: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.ai-step:last-child { border-right: 0; }
.ai-step:hover:not(:disabled) { background: rgba(214, 242, 238, 0.5); }
.ai-step:disabled { cursor: not-allowed; opacity: 0.48; }

.ai-step__num {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 25px;
  height: 25px;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--teal-dark);
  background: var(--white);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-full);
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.ai-step__label {
  overflow: hidden;
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ai-step.is-active { color: var(--teal-darker); background: var(--teal-ultra); }
.ai-step.is-active .ai-step__num {
  color: #fff;
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  box-shadow: 0 0 0 4px rgba(43, 181, 160, 0.12);
}
.ai-step.is-done .ai-step__num {
  color: var(--teal-darker);
  background: var(--teal-pale);
  border-color: var(--teal-pale);
}

/* ── Stage ──────────────────────────────────── */

.ai-stage {
  padding: clamp(20px, 3.2vw, 34px);
  animation: aiFadeUp 0.35s var(--ease) both;
}

.ai-stage__head { margin-bottom: 20px; }
.ai-stage__eyebrow {
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--teal-dark);
}
.ai-stage__title {
  margin: 5px 0 7px;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.4vw, 2.15rem);
  font-weight: 400;
  line-height: 1.08;
  color: var(--dark);
}
.ai-stage__title em { font-style: italic; color: var(--teal-dark); }
.ai-stage__lead {
  max-width: 540px;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--mid);
}

/* ── Formularios / chips ────────────────────── */

.ai-field { margin-top: 22px; }
.ai-field:first-of-type { margin-top: 0; }

.ai-legend {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 9px;
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-dark);
}
.ai-legend span {
  font-size: 0.64rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--light-text);
}

.ai-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-chip {
  min-height: 38px;
  padding: 8px 14px;
  font-family: var(--font-body);
  font-size: 0.79rem;
  font-weight: 500;
  color: var(--mid);
  background: var(--white);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-full);
  cursor: pointer;
  transition: color 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease), transform 0.18s var(--ease);
}
.ai-chip:hover,
.ai-chip:focus-visible {
  color: var(--teal-dark);
  background: var(--teal-ultra);
  border-color: var(--teal);
  transform: translateY(-1px);
}
.ai-chip.is-selected {
  color: #fff;
  background: var(--teal-darker);
  border-color: var(--teal-darker);
  box-shadow: var(--shadow-xs);
}

.ai-hint {
  margin-top: 7px;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--light-text);
}

.ai-note {
  margin-top: 16px;
  padding: 12px 14px;
  font-size: 0.74rem;
  line-height: 1.5;
  color: var(--mid);
  background: var(--teal-ultra);
  border: 1px solid var(--teal-pale);
  border-radius: var(--r-sm);
}
.ai-note strong { color: var(--teal-darker); }
.ai-note--warm {
  background: #FBF3E6;
  border-color: #EAD9BE;
}
.ai-note--warm strong { color: #8A6428; }

.ai-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.ai-actions--end { justify-content: flex-end; }

.ai-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 22px;
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--r-full);
  cursor: pointer;
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.ai-btn:hover:not(:disabled),
.ai-btn:focus-visible:not(:disabled) { transform: translateY(-1px); }
.ai-btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

.ai-btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
  box-shadow: var(--shadow-teal);
}
.ai-btn--primary:hover:not(:disabled) { box-shadow: var(--shadow-md); }

.ai-btn--ghost {
  color: var(--mid);
  background: transparent;
  border-color: var(--border-mid);
}
.ai-btn--ghost:hover:not(:disabled) {
  color: var(--teal-dark);
  background: var(--teal-ultra);
  border-color: var(--teal);
}

.ai-btn--wa {
  color: #fff;
  background: var(--wa);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.24);
}
.ai-btn--wa:hover:not(:disabled) { background: var(--wa-dark); }

.ai-btn--small {
  min-height: 34px;
  padding: 7px 13px;
  font-size: 0.72rem;
}

.ai-btn--link {
  min-height: 0;
  padding: 0;
  color: var(--teal-dark);
  background: none;
  border: 0;
  border-radius: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Foto / dropzone ────────────────────────── */

.ai-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 154px;
  padding: 24px 18px;
  text-align: center;
  background:
    radial-gradient(260px 120px at 50% 0%, rgba(95, 202, 187, 0.14), transparent 70%),
    var(--teal-ultra);
  border: 1.5px dashed var(--border-mid);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.ai-drop:hover,
.ai-drop.is-dragover {
  background: var(--teal-pale);
  border-color: var(--teal);
}
.ai-drop input { display: none; }
.ai-drop__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 5px;
  color: var(--teal-dark);
  background: #fff;
  border: 1px solid var(--teal-pale);
  border-radius: 50%;
  box-shadow: var(--shadow-xs);
}
.ai-drop__title {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--dark);
}
.ai-drop__hint {
  max-width: 330px;
  font-size: 0.7rem;
  line-height: 1.45;
  color: var(--mid);
}
.ai-drop__file {
  max-width: 100%;
  overflow: hidden;
  font-size: 0.68rem;
  color: var(--teal-dark);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-preview {
  position: relative;
  margin-top: 12px;
  overflow: hidden;
  background: var(--teal-ultra);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.ai-preview img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: cover;
}
.ai-preview__tag {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--teal-darker);
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--r-full);
}

.ai-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--mid);
  background: var(--cream-warm);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.ai-consent input {
  flex: none;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  accent-color: var(--teal-dark);
}
.ai-consent strong { color: var(--dark); }

.ai-status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 20px;
  margin-top: 12px;
  font-size: 0.74rem;
  line-height: 1.4;
  color: var(--mid);
}
.ai-status.is-error { color: #A33A2B; }
.ai-status.is-success { color: var(--teal-darker); }

.ai-spinner {
  display: inline-block;
  flex: none;
  width: 14px;
  height: 14px;
  border: 2px solid var(--teal-pale);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: aiSpin 0.8s linear infinite;
}

/* ── Resultado de tono ──────────────────────── */

.ai-tone {
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
}
.ai-tone--calido { background: #FCF5E9; border-color: #EAD9BE; }
.ai-tone--frio { background: #EFF4F9; border-color: #CFE0EC; }
.ai-tone--neutro { background: #F9F3F1; border-color: #E8D9D6; }

.ai-tone__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.ai-tone__eyebrow {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--teal-dark);
}
.ai-tone__title {
  margin: 4px 0 5px;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1.1;
  color: var(--dark);
}
.ai-tone__text {
  font-size: 0.77rem;
  line-height: 1.5;
  color: var(--mid);
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 5px;
  padding: 5px 9px;
  font-size: 0.59rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal-darker);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(26, 138, 120, 0.22);
  border-radius: var(--r-full);
}
.ai-badge--youcam { color: #4F3B78; border-color: rgba(79, 59, 120, 0.24); background: rgba(255, 255, 255, 0.8); }
.ai-badge--local { color: #7C5A1E; border-color: rgba(201, 165, 90, 0.36); }

.ai-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.ai-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.ai-swatch__dot {
  width: 32px;
  height: 32px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(28, 46, 43, 0.14);
}
.ai-swatch__label {
  font-size: 0.58rem;
  color: var(--mid);
}

.ai-metal-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 13px;
}
.ai-metal {
  padding: 5px 9px;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--dark);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(28, 46, 43, 0.1);
  border-radius: var(--r-full);
}

.ai-tone__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  font-size: 0.66rem;
  line-height: 1.4;
  color: var(--mid);
  border-top: 1px solid rgba(28, 46, 43, 0.08);
}

/* ── Selector manual ────────────────────────── */

.ai-manual {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px dashed var(--border-mid);
}
.ai-manual__title {
  margin-bottom: 4px;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 400;
  color: var(--dark);
}
.ai-manual__hint {
  margin-bottom: 12px;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--mid);
}
.ai-tone-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.ai-tone-option {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 11px;
  text-align: left;
  background: var(--white);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease), transform 0.18s var(--ease);
}
.ai-tone-option:hover,
.ai-tone-option:focus-visible {
  border-color: var(--teal);
  transform: translateY(-1px);
}
.ai-tone-option.is-selected {
  background: var(--teal-ultra);
  border-color: var(--teal-dark);
  box-shadow: inset 0 0 0 1px var(--teal-dark);
}
.ai-tone-option__swatches {
  display: flex;
  gap: 3px;
}
.ai-tone-option__dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(28, 46, 43, 0.1);
}
.ai-tone-option__name {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--dark);
}
.ai-tone-option__desc {
  font-size: 0.62rem;
  line-height: 1.35;
  color: var(--mid);
}

/* ── Recomendaciones ────────────────────────── */

.ai-recos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.ai-reco {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.ai-reco:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.ai-reco__media {
  position: relative;
  overflow: hidden;
  background: var(--teal-ultra);
}
.ai-reco__img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.ai-reco__cat {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 8px;
  font-size: 0.53rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--teal-darker);
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--r-full);
}
.ai-reco__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 5px;
  padding: 12px;
}
.ai-reco__name {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 400;
  line-height: 1.15;
  color: var(--dark);
}
.ai-reco__price {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold);
}
.ai-reco__why {
  flex: 1;
  margin-top: 2px;
  font-size: 0.68rem;
  line-height: 1.45;
  color: var(--mid);
}
.ai-reco__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}
.ai-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 30px;
  padding: 6px 9px;
  font-family: var(--font-body);
  font-size: 0.64rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--border-mid);
  border-radius: var(--r-full);
  cursor: pointer;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.ai-mini--try {
  color: #fff;
  background: var(--teal-dark);
  border-color: var(--teal-dark);
}
.ai-mini--try:hover { background: var(--teal-darker); }
.ai-mini--ghost {
  color: var(--mid);
  background: transparent;
}
.ai-mini--ghost:hover {
  color: var(--teal-dark);
  background: var(--teal-ultra);
  border-color: var(--teal);
}
.ai-mini--save { color: var(--gold); }
.ai-mini--save:hover { background: #FBF3E6; border-color: var(--gold); }

.ai-empty {
  padding: 38px 18px;
  text-align: center;
  color: var(--mid);
  background: var(--teal-ultra);
  border: 1px dashed var(--border-mid);
  border-radius: var(--r-md);
}
.ai-empty__icon { font-size: 2rem; opacity: 0.5; }
.ai-empty__title {
  margin: 8px 0 4px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--dark);
}
.ai-empty__text { font-size: 0.76rem; line-height: 1.45; }

/* ── Probador virtual ───────────────────────── */

.ai-vto__picker {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding-bottom: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.ai-vto-pick {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
  width: 168px;
  padding: 7px;
  text-align: left;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.ai-vto-pick:hover { border-color: var(--teal); }
.ai-vto-pick.is-selected {
  background: var(--teal-ultra);
  border-color: var(--teal-dark);
}
.ai-vto-pick img {
  flex: none;
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: var(--r-xs);
  background: var(--teal-pale);
}
.ai-vto-pick span {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.64rem;
  line-height: 1.25;
  color: var(--dark);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ai-vto__product {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 11px;
  background: var(--teal-ultra);
  border: 1px solid var(--teal-pale);
  border-radius: var(--r-md);
}
.ai-vto__product img {
  flex: none;
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: var(--r-sm);
  background: var(--teal-pale);
}
.ai-vto__product-name {
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.15;
  color: var(--dark);
}
.ai-vto__product-price {
  margin-top: 2px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--gold);
}

.ai-vto__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}
.ai-vto__instructions {
  padding: 13px;
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--mid);
  background: var(--cream-warm);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.ai-vto__instructions strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-dark);
}

.ai-vto__result {
  margin-top: 16px;
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}
.ai-vto__result-img {
  display: block;
  width: 100%;
  max-height: 470px;
  object-fit: contain;
  background: var(--teal-ultra);
  border-radius: var(--r-sm);
}
.ai-vto__result-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.ai-result-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #4F3B78;
  background: #F2EEFA;
  border: 1px solid #DCD2F0;
  border-radius: var(--r-full);
}

/* ── Look guardado ──────────────────────────── */

.ai-saved {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.ai-saved__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.ai-saved__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--dark);
}
.ai-saved__count {
  font-size: 0.68rem;
  color: var(--light-text);
}
.ai-saved__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.ai-saved-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.ai-saved-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--teal-ultra);
}
.ai-saved-card__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px;
}
.ai-saved-card__name {
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--dark);
}
.ai-saved-card__meta {
  font-size: 0.6rem;
  line-height: 1.35;
  color: var(--light-text);
}
.ai-saved-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

/* ── Asesora / memoria ──────────────────────── */

.ai-aside {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: aiFadeUp 0.55s 0.1s var(--ease) both;
}

.ai-adviser {
  overflow: hidden;
  background: linear-gradient(180deg, #fff 0%, var(--teal-ultra) 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.ai-adviser__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px;
  color: #fff;
  background:
    radial-gradient(220px 90px at 0% 0%, rgba(232, 201, 122, 0.2), transparent 70%),
    linear-gradient(135deg, var(--teal-darker), var(--teal-dark));
}
.ai-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--teal-darker);
  background: linear-gradient(135deg, var(--gold-light), var(--teal-pale));
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.22);
}
.ai-adviser__id {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}
.ai-adviser__id strong {
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.15;
}
.ai-adviser__id span {
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}
.ai-live-dot {
  flex: none;
  width: 7px;
  height: 7px;
  margin-left: auto;
  background: var(--teal-light);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(95, 202, 187, 0.18);
}

.ai-messages {
  display: flex;
  max-height: 330px;
  flex-direction: column;
  gap: 9px;
  padding: 14px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.ai-msg {
  display: flex;
  max-width: 94%;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
}
.ai-msg--you { align-self: flex-end; align-items: flex-end; }
.ai-msg__bubble {
  padding: 9px 11px;
  font-size: 0.73rem;
  line-height: 1.5;
  color: var(--mid);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 13px 13px 13px 4px;
}
.ai-msg--you .ai-msg__bubble {
  color: #fff;
  background: var(--teal-darker);
  border-color: transparent;
  border-radius: 13px 13px 4px 13px;
}
.ai-msg__time {
  font-size: 0.52rem;
  color: var(--light-text);
}

.ai-profile {
  padding: 0 14px 14px;
}
.ai-profile__title {
  margin-bottom: 7px;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--teal-dark);
}
.ai-profile__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.ai-profile__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  font-size: 0.62rem;
  line-height: 1.3;
  color: var(--dark);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
}
.ai-profile__chip--empty {
  color: var(--light-text);
  background: transparent;
  border-style: dashed;
}
.ai-profile__chip i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(28, 46, 43, 0.1);
}
.ai-profile__note {
  margin-top: 9px;
  font-size: 0.58rem;
  line-height: 1.4;
  color: var(--light-text);
}
.ai-reset {
  margin-top: 9px;
  padding: 0;
  font-family: var(--font-body);
  font-size: 0.62rem;
  color: var(--mid);
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.ai-reset:hover { color: var(--teal-dark); }

.ai-privacy-note {
  padding: 11px 13px;
  font-size: 0.62rem;
  line-height: 1.5;
  color: var(--mid);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.ai-privacy-note strong { color: var(--dark); }

/* ── Cierre ─────────────────────────────────── */

.ai-closing {
  margin-top: 46px;
  padding: 38px 24px;
  text-align: center;
  background: linear-gradient(180deg, transparent, rgba(214, 242, 238, 0.45));
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.ai-closing__eyebrow {
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-dark);
}
.ai-closing__title {
  margin: 7px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 400;
  line-height: 1.08;
}
.ai-closing__title em { font-style: italic; color: var(--teal-dark); }
.ai-closing__text {
  max-width: 620px;
  margin: 0 auto;
  font-size: 0.83rem;
  line-height: 1.6;
  color: var(--mid);
}
.ai-closing__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 860px;
  margin: 26px auto 0;
  text-align: left;
}
.ai-closing__grid div {
  padding: 13px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.ai-closing__grid span {
  display: block;
  margin-bottom: 5px;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--gold);
}
.ai-closing__grid strong {
  display: block;
  margin-bottom: 3px;
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: 500;
}
.ai-closing__grid p {
  font-size: 0.66rem;
  line-height: 1.4;
  color: var(--mid);
}
.ai-disclaimer {
  max-width: 700px;
  margin: 22px auto 0;
  font-size: 0.62rem;
  line-height: 1.55;
  color: var(--light-text);
}

/* ── Toast ──────────────────────────────────── */

.ai-toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  z-index: 500;
  max-width: min(92vw, 420px);
  padding: 11px 17px;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #fff;
  text-align: center;
  background: var(--teal-darker);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--r-full);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease-spring);
}
.ai-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ── Animaciones ────────────────────────────── */

@keyframes aiSpin { to { transform: rotate(360deg); } }
@keyframes aiFadeUp {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ─────────────────────────────── */

@media (max-width: 980px) {
  .ai-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .ai-recos { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .ai-layout { grid-template-columns: 1fr; }
  .ai-aside { position: static; order: 2; }
  .ai-messages { max-height: 260px; }
  .ai-recos { grid-template-columns: 1fr 1fr; }
  .ai-closing__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .ai-main { padding: 0 13px 50px; }
  .ai-hero { padding-top: 30px; }
  .ai-hero__lead { font-size: 0.87rem; }
  .ai-hero__steps { gap: 5px; }
  .ai-hero__steps span { padding: 5px 8px; font-size: 0.62rem; }
  .ai-stepper { grid-template-columns: repeat(4, 1fr); }
  .ai-step { flex-direction: column; justify-content: center; gap: 3px; padding: 10px 4px; text-align: center; }
  .ai-step__label { font-size: 0.56rem; }
  .ai-stage { padding: 18px 14px 22px; }
  .ai-recos { grid-template-columns: 1fr; }
  .ai-tone-options { grid-template-columns: 1fr; }
  .ai-vto__grid { grid-template-columns: 1fr; }
  .ai-closing { padding: 28px 16px; }
  .ai-closing__grid { grid-template-columns: 1fr; }
  .ai-nav-link { display: none; }
  .ai-look-btn span:not(.ai-look-btn__count) { display: none; }
  .ai-look-btn { padding: 7px 9px; }
  .ai-msg { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .ai-page *,
  .ai-page *::before,
  .ai-page *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
