.ai-overlay {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(18, 53, 87, 0.58);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.ai-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.ai-box {
  width: min(480px, 100%);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--card-radius, 14px);
  background: var(--cream-50, #F6F2EC);
  color: var(--text-main, #17334F);
  box-shadow: 0 28px 90px rgba(18, 53, 87, 0.28);
  transform: translateY(16px);
  transition: transform 0.36s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-overlay.show .ai-box {
  transform: translateY(0);
}

.ai-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--border-soft, #D8CABB);
}

.ai-header-title {
  color: var(--navy-900, #123557);
  font-size: 17px;
  font-weight: 650;
}

.ai-header-sub {
  margin-top: 3px;
  color: var(--text-muted, #66707D);
  font-size: 12px;
}

.ai-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--button-radius, 12px);
  background: rgba(200, 147, 107, 0.12);
  color: var(--navy-900, #123557);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.ai-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 30px 28px 28px;
  -webkit-overflow-scrolling: touch;
}

.ai-progress {
  margin-bottom: 20px;
  color: var(--rose-gold-500, #C8936B);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.ai-question {
  margin: 0 0 24px;
  color: var(--navy-900, #123557);
  font-size: 22px;
  line-height: 1.45;
  font-weight: 650;
}

.ai-options {
  display: grid;
  gap: 10px;
}

.ai-opt {
  width: 100%;
  min-height: 50px;
  padding: 13px 15px;
  border: 1px solid var(--border-soft, #D8CABB);
  border-radius: var(--button-radius, 12px);
  background: var(--white-soft, #F6F2EC);
  color: var(--text-main, #17334F);
  cursor: pointer;
  text-align: left;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.ai-opt:hover {
  border-color: rgba(200, 147, 107, 0.45);
  background: rgba(246, 242, 236, 0.82);
  transform: translateY(-1px);
}

.ai-mid {
  padding: 22px 0;
  color: var(--text-muted, #66707D);
  font-size: 15px;
  line-height: 1.8;
}

.ai-typing {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
}

.ai-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--rose-gold-500, #C8936B);
  opacity: 0.35;
  animation: advisorBlink 1.2s infinite both;
}

.ai-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.ai-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes advisorBlink {
  0%, 80%, 100% { opacity: 0.25; }
  40% { opacity: 0.9; }
}

.ai-result h3 {
  margin: 0 0 14px;
  color: var(--navy-900, #123557);
  font-size: 22px;
  line-height: 1.42;
  font-weight: 650;
}

.ai-result-p,
.ai-result-cta {
  margin: 0 0 22px;
  color: var(--text-muted, #66707D);
  font-size: 15px;
  line-height: 1.82;
}

.ai-result-list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  border-top: 1px solid var(--border-soft, #D8CABB);
}

.ai-result-list li {
  display: grid;
  grid-template-columns: 8px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft, #D8CABB);
  color: var(--text-main, #17334F);
  font-size: 14px;
  line-height: 1.65;
}

.ai-result-list li::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--rose-gold-500, #C8936B);
}

.ai-btns {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.ai-btn {
  flex: 1;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--button-radius, 12px);
  background: var(--navy-900, #123557);
  color: var(--white-soft, #F6F2EC);
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

.ai-btn-outline {
  border-color: rgba(200, 147, 107, 0.38);
  background: transparent;
  color: var(--navy-900, #123557);
}

.ai-store-list {
  margin-top: 12px;
  border-top: 1px solid var(--border-soft, #D8CABB);
}

.ai-store-card {
  padding: 15px 0;
  border-bottom: 1px solid var(--border-soft, #D8CABB);
}

.ai-store-name {
  margin-bottom: 4px;
  color: var(--navy-900, #123557);
  font-weight: 650;
}

.ai-store-meta {
  color: var(--text-muted, #66707D);
  font-size: 13px;
  line-height: 1.65;
}

@media (max-width: 560px) {
  .ai-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .ai-box {
    width: 100%;
    max-height: 92vh;
    border-radius: var(--card-radius, 14px) var(--card-radius, 14px) 0 0;
  }

  .ai-header {
    padding: 18px 24px;
  }

  .ai-body {
    padding: 26px 24px 24px;
  }

  .ai-question {
    font-size: 20px;
  }

  .ai-btns {
    flex-direction: column;
  }
}
