/**
 * Chair Selection Wizard - Styles
 * 
 * Mobile-first design matching the products page aesthetic
 * Floating navigation, compact layout, smooth animations
 * 
 * @package Postura
 */

/* ============================================================================
   VARIABLES
   ============================================================================ */
:root {
  --wizard-primary: #6366f1;
  --wizard-primary-dark: #4f46e5;
  --wizard-primary-light: #a5b4fc;
  --wizard-accent: #a855f7;
  --wizard-success: #10b981;
  --wizard-warning: #f59e0b;
  --wizard-error: #ef4444;
  --wizard-gray-50: #f9fafb;
  --wizard-gray-100: #f3f4f6;
  --wizard-gray-200: #e5e7eb;
  --wizard-gray-300: #d1d5db;
  --wizard-gray-400: #9ca3af;
  --wizard-gray-500: #6b7280;
  --wizard-gray-600: #4b5563;
  --wizard-gray-700: #374151;
  --wizard-gray-800: #1f2937;
  --wizard-gray-900: #111827;
  --wizard-radius: 12px;
  --wizard-radius-lg: 16px;
  --wizard-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --wizard-shadow-lg:
    0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --wizard-shadow-xl:
    0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --wizard-transition: all 0.2s ease;
  --wizard-navbar-height: 64px;
  --wizard-nav-height: 72px;
}

/* ============================================================================
   PAGE LAYOUT - Mobile First
   ============================================================================ */
.wizard-page {
  min-height: calc(100vh - var(--wizard-navbar-height));
}

.wizard-main {
  display: flex;
  flex-direction: column;
  min-height: calc(
    100vh - var(--wizard-navbar-height) - 200px
  ); /* Account for hero */
}

.wizard-main > .container {
  flex: 1;
}

/* ============================================================================
   HERO SECTION - Matching Products Page
   ============================================================================ */
.wizard-hero {
  background: linear-gradient(
    135deg,
    var(--wizard-gray-50) 0%,
    #eef2ff 50%,
    var(--wizard-gray-50) 100%
  );
  padding: 1.5rem 1rem 2rem;
  text-align: center;
  overflow: hidden;
  margin-top: 64px;
}

.wizard-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(
      circle at 20% 30%,
      rgba(99, 102, 241, 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(168, 85, 247, 0.06) 0%,
      transparent 50%
    );
  pointer-events: none;
}

.wizard-hero .container {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Hero Badge - Pill style like products */
.wizard-hero .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--wizard-primary);
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.wizard-hero .hero-badge svg {
  width: 1rem;
  height: 1rem;
  color: var(--wizard-success);
}

/* Hero Title */
.wizard-hero .hero-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--wizard-gray-900);
  line-height: 1.2;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.wizard-hero .hero-title .text-gradient {
  background: linear-gradient(
    135deg,
    var(--wizard-primary) 0%,
    var(--wizard-accent) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.wizard-hero .hero-subtitle {
  font-size: 0.95rem;
  color: var(--wizard-gray-600);
  line-height: 1.6;
  max-width: 500px;
  margin: 0 auto;
}

/* Chair icons - hide on mobile, show on tablet+ */
.wizard-hero .hero-chairs {
  display: none;
}

/* Tablet+ */
@media (min-width: 768px) {
  .wizard-hero {
    padding: 2.5rem 1.5rem 3rem;
  }

  .wizard-hero .hero-badge {
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
  }

  .wizard-hero .hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }

  .wizard-hero .hero-subtitle {
    font-size: 1.125rem;
  }

  .wizard-hero .hero-chairs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 2rem;
  }

  .wizard-hero .chair-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
    background: white;
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    opacity: 0.9;
    transition: all 0.3s ease;
  }

  .wizard-hero .chair-icon:hover {
    opacity: 1;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  }

  .wizard-hero .question-mark {
    font-size: 2rem;
    font-weight: 700;
    color: var(--wizard-primary);
    background: linear-gradient(135deg, var(--wizard-primary) 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 8px;
    animation: questionPulse 2s ease-in-out infinite;
  }

  @keyframes questionPulse {
    0%,
    100% {
      transform: scale(1);
      opacity: 1;
    }
    50% {
      transform: scale(1.1);
      opacity: 0.8;
    }
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .wizard-hero .hero-title {
    font-size: 3rem;
  }

  .wizard-hero .chair-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    padding: 8px;
  }

  .wizard-hero .question-mark {
    font-size: 2.5rem;
    margin: 0 12px;
  }
}

/* ============================================================================
   WIZARD MAIN CONTAINER
   ============================================================================ */
.wizard-main {
  padding: 1.25rem 1rem 2rem;
}

.wizard-main .container {
  max-width: 640px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .wizard-main {
    padding: 2rem 1.5rem;
  }

  .wizard-main .container {
    max-width: 820px;
  }
}

/* ============================================================================
   PROGRESS BAR - Compact
   ============================================================================ */
.wizard-progress {
  margin-bottom: 1.25rem;
}

.wizard-progress .progress-bar {
  height: 6px;
  background: var(--wizard-gray-200);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 8px;
}

.wizard-progress .progress-fill {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--wizard-primary) 0%,
    var(--wizard-accent) 100%
  );
  border-radius: 100px;
  transition: width 0.4s ease;
}

.wizard-progress .progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--wizard-gray-500);
}

.wizard-progress .progress-step {
  font-weight: 500;
}

.wizard-progress .progress-percent {
  font-weight: 600;
  color: var(--wizard-primary);
}

@media (min-width: 768px) {
  .wizard-progress {
    margin-bottom: 1.5rem;
  }

  .wizard-progress .progress-bar {
    height: 8px;
  }

  .wizard-progress .progress-info {
    font-size: 0.875rem;
  }
}

/* ============================================================================
   WIZARD CONTENT BOX - Compact
   ============================================================================ */
.wizard-content {
  background: white;
  border-radius: var(--wizard-radius);
  box-shadow: var(--wizard-shadow);
  padding: 1.25rem;
  min-height: auto;
  border: 1px solid var(--wizard-gray-100);
}

@media (min-width: 768px) {
  .wizard-content {
    padding: 2rem;
    border-radius: var(--wizard-radius-lg);
    box-shadow: var(--wizard-shadow-lg);
  }
}

/* Loading state */
.wizard-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  gap: 12px;
}

.wizard-loading .spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--wizard-gray-200);
  border-top-color: var(--wizard-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.wizard-loading p {
  color: var(--wizard-gray-500);
  font-size: 0.875rem;
}

/* ============================================================================
   QUESTION SECTION - Compact
   ============================================================================ */
.wizard-question {
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.question-header {
  text-align: center;
  margin-bottom: 1.25rem;
}

.question-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--wizard-gray-900);
  margin-bottom: 0.375rem;
  line-height: 1.3;
}

.question-help {
  font-size: 0.85rem;
  color: var(--wizard-gray-500);
  line-height: 1.5;
}

@media (min-width: 768px) {
  .question-header {
    margin-bottom: 1.5rem;
  }

  .question-title {
    font-size: 1.375rem;
    margin-bottom: 0.5rem;
  }

  .question-help {
    font-size: 0.95rem;
  }
}

/* ============================================================================
   QUESTION OPTIONS - Compact Cards
   ============================================================================ */
.question-options {
  display: grid;
  gap: 10px;
}

/* Mobile: Stack all */
.question-options.options-2,
.question-options.options-3,
.question-options.options-4 {
  grid-template-columns: 1fr;
}

.question-options.options-multi {
  grid-template-columns: repeat(2, 1fr);
}

/* Tablet+ */
@media (min-width: 480px) {
  .question-options.options-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .question-options.options-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .question-options.options-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .question-options.options-multi {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  .question-options {
    gap: 12px;
  }

  .question-options.options-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .question-options.options-multi {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Option card - Compact style */
/* Column layout with centered text on all screens */
.option-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 12px;
  background: white;
  border: 2px solid var(--wizard-gray-200);
  border-radius: var(--wizard-radius);
  cursor: pointer;
  transition: var(--wizard-transition);
  text-align: center;
}

.option-card:hover {
  border-color: var(--wizard-primary-light);
  background: var(--wizard-gray-50);
}

.option-card:active {
  transform: scale(0.98);
}

.option-card.selected {
  border-color: var(--wizard-primary);
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.06) 0%,
    rgba(168, 85, 247, 0.04) 100%
  );
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.option-card.selected::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  background: var(--wizard-primary);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* Option icon */
.option-card .option-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--wizard-gray-100);
  border-radius: 10px;
  color: var(--wizard-gray-600);
}

.option-card .option-icon svg {
  width: 20px;
  height: 20px;
}

.option-card.selected .option-icon {
  background: var(--wizard-primary);
  color: white;
}

/* Option image */
.option-card .option-image {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 8px;
}

/* Option text */
.option-card .option-text {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.option-card .option-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--wizard-gray-800);
  margin-bottom: 2px;
}

.option-card .option-description {
  display: block;
  font-size: 0.75rem;
  color: var(--wizard-gray-500);
  line-height: 1.3;
}

/* Large option cards for image-heavy questions */
.option-card.option-large {
  padding: 20px 16px;
}

.option-card.option-large .option-image {
  width: 80px;
  height: 80px;
  margin-bottom: 4px;
}

@media (min-width: 768px) {
  /* Desktop: Slightly larger */
  .option-card {
    padding: 18px 16px;
    gap: 12px;
  }

  .option-card.selected::after {
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
  }

  .option-card .option-icon {
    width: 44px;
    height: 44px;
  }

  .option-card .option-label {
    font-size: 1rem;
  }

  .option-card .option-description {
    font-size: 0.85rem;
  }

  .option-card.option-large .option-image {
    width: 100px;
    height: 100px;
  }
}

/* ============================================================================
   FLOATING NAVIGATION BAR
   ============================================================================ */
.question-actions {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  background: white;
  margin: 15px 0 0;
  border-radius: 16px;
  border: 1px solid var(--wizard-gray-200);
  width: 100%;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  margin-top: auto;
}

.question-actions.hidden {
  display: none;
}

.question-actions .nav-left {
  flex: 0 0 auto;
}

.question-actions .nav-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.question-actions .nav-right {
  flex: 0 0 auto;
}

/* Button styles */
.question-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--wizard-transition);
  border: none;
  white-space: nowrap;
}

.question-actions .btn svg {
  width: 18px;
  height: 18px;
}

/* Primary button (Next) */
.question-actions .btn-primary {
  background: var(--wizard-primary);
  color: white;
  padding: 12px 24px;
}

.question-actions .btn-primary:hover:not(:disabled) {
  background: var(--wizard-primary-dark);
  transform: translateY(-1px);
}

.question-actions .btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.question-actions .btn-primary:disabled {
  background: var(--wizard-gray-300);
  cursor: not-allowed;
}

/* Secondary button (Back) */
.question-actions .btn-secondary {
  background: var(--wizard-gray-100);
  color: var(--wizard-gray-700);
  padding: 10px 14px;
}

.question-actions .btn-secondary:hover {
  background: var(--wizard-gray-200);
}

/* Text button (Skip) */
.question-actions .btn-text {
  background: transparent;
  color: var(--wizard-gray-500);
  padding: 10px 12px;
  font-weight: 500;
}

.question-actions .btn-text:hover {
  color: var(--wizard-primary);
  background: var(--wizard-gray-50);
}

/* Hide button labels on mobile, show icons */
@media (max-width: 479px) {
  .question-actions .btn-secondary .btn-label {
    display: none;
  }

  .question-actions .btn-secondary {
    padding: 10px;
  }
}

@media (min-width: 480px) {
  .question-actions {
    padding: 14px 24px;
  }

  .question-actions .btn-primary {
    padding: 12px 28px;
  }
}

/* Mobile styling for question-actions: rounded corners and spacing */
@media (max-width: 767px) {
  .question-actions {
    left: auto;
    right: auto;
    margin: 15px 0 0;
    width: 100%;
  }
}

@media (min-width: 768px) {
  .wizard-main {
    position: relative;
  }

  /* Keep navigation sticky inside wizard-main, not fixed to viewport */
  .question-actions {
    position: sticky;
    bottom: 0;
    z-index: 100;
    background: white;
    border-top: 1px solid var(--wizard-gray-200);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    padding: 16px 24px;
    margin: 20px 0 0;
  }
}

/* ============================================================================
   EMAIL CAPTURE - Compact
   ============================================================================ */
.wizard-email {
  animation: fadeIn 0.25s ease;
  text-align: center;
  padding-bottom: 0;
}

.email-header {
  margin-bottom: 1.5rem;
}

.email-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--wizard-gray-900);
  margin-bottom: 0.5rem;
}

.email-subtitle {
  font-size: 0.9rem;
  color: var(--wizard-gray-600);
  line-height: 1.5;
}

.email-form {
  max-width: 360px;
  margin: 0 auto;
}

.email-form .form-group {
  margin-bottom: 16px;
}

.email-form .form-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  border: 2px solid var(--wizard-gray-200);
  border-radius: 8px;
  transition: var(--wizard-transition);
}

.email-form .form-input:focus {
  outline: none;
  border-color: var(--wizard-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.email-form .checkbox-group {
  text-align: left;
  margin-bottom: 20px;
}

.email-form .checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.email-form .checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--wizard-primary);
  flex-shrink: 0;
}

.email-form .checkbox-text {
  font-size: 0.85rem;
  color: var(--wizard-gray-600);
  line-height: 1.4;
}

.email-form .form-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.email-form .btn-lg {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  background: var(--wizard-warning);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--wizard-transition);
}

.email-form .btn-lg:hover {
  background: #d97706;
  transform: translateY(-1px);
}

.email-form .btn-text {
  background: none;
  border: none;
  color: var(--wizard-gray-500);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px;
}

.email-form .btn-text:hover {
  color: var(--wizard-primary);
}

@media (min-width: 768px) {
  .email-title {
    font-size: 1.5rem;
  }

  .email-subtitle {
    font-size: 1rem;
  }
}

/* ============================================================================
   RESULTS SECTION
   ============================================================================ */
.wizard-results {
  animation: fadeIn 0.25s ease;
}

.results-header {
  text-align: center;
  margin-bottom: 2rem;
}

.results-header .btn-restart {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--wizard-gray-500);
  background: none;
  border: none;
  cursor: pointer;
  margin-bottom: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  transition: var(--wizard-transition);
}

.results-header .btn-restart:hover {
  color: var(--wizard-primary);
  background: var(--wizard-gray-50);
}

.results-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--wizard-gray-900);
  margin-bottom: 0.5rem;
}

.results-subtitle {
  font-size: 0.95rem;
  color: var(--wizard-gray-600);
}

@media (min-width: 768px) {
  .results-title {
    font-size: 1.75rem;
  }
}

/* Results loading - AI Bot Animation */
.results-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  gap: 20px;
  padding: 40px 20px;
}

/* AI Bot Container */
.ai-bot-container {
  position: relative;
  width: 120px;
  height: 140px;
}

.ai-bot {
  position: relative;
  animation: botFloat 3s ease-in-out infinite;
}

@keyframes botFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* AI Bot Head */
.ai-bot-head {
  position: relative;
  width: 80px;
  height: 60px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--wizard-primary) 0%, #8b5cf6 100%);
  border-radius: 20px 20px 25px 25px;
  box-shadow:
    0 10px 30px rgba(99, 102, 241, 0.3),
    inset 0 -5px 20px rgba(0, 0, 0, 0.1);
}

.ai-bot-face {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 16px;
}

.ai-bot-eye {
  width: 14px;
  height: 14px;
  background: white;
  border-radius: 50%;
  position: relative;
  animation: blink 4s ease-in-out infinite;
}

.ai-bot-eye::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  background: #1e1b4b;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: eyeLook 3s ease-in-out infinite;
}

@keyframes blink {
  0%,
  45%,
  55%,
  100% {
    transform: scaleY(1);
  }
  50% {
    transform: scaleY(0.1);
  }
}

@keyframes eyeLook {
  0%,
  100% {
    transform: translate(-50%, -50%);
  }
  25% {
    transform: translate(-20%, -50%);
  }
  75% {
    transform: translate(-80%, -50%);
  }
}

/* Antenna */
.ai-bot-antenna {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 15px;
  background: linear-gradient(to top, var(--wizard-primary), #8b5cf6);
  border-radius: 2px;
}

.ai-bot-antenna-ball {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: #fbbf24;
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.6);
  animation: antennaPulse 1.5s ease-in-out infinite;
}

@keyframes antennaPulse {
  0%,
  100% {
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
    transform: translateX(-50%) scale(1);
  }
  50% {
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.8);
    transform: translateX(-50%) scale(1.2);
  }
}

/* AI Bot Body */
.ai-bot-body {
  width: 70px;
  height: 50px;
  margin: 5px auto 0;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  border-radius: 10px 10px 20px 20px;
  box-shadow:
    0 8px 25px rgba(79, 70, 229, 0.3),
    inset 0 -3px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  position: relative;
}

.ai-bot-screen {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  bottom: 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  overflow: hidden;
}

.ai-bot-scan-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(52, 211, 153, 0.8) 50%,
    transparent 100%
  );
  animation: scanLine 1.5s ease-in-out infinite;
}

@keyframes scanLine {
  0% {
    top: 0;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    top: calc(100% - 4px);
    opacity: 0;
  }
}

/* Bot Shadow */
.ai-bot-shadow {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 10px;
  background: rgba(99, 102, 241, 0.2);
  border-radius: 50%;
  animation: shadowPulse 3s ease-in-out infinite;
}

@keyframes shadowPulse {
  0%,
  100% {
    width: 60px;
    opacity: 0.3;
  }
  50% {
    width: 50px;
    opacity: 0.15;
  }
}

/* Loading Text */
.ai-loading-text {
  text-align: center;
}

.ai-loading-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--wizard-gray-800);
  margin: 0 0 4px 0;
  background: linear-gradient(135deg, var(--wizard-primary) 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ai-loading-subtitle {
  font-size: 0.9rem;
  color: var(--wizard-gray-500);
  margin: 0;
}

/* Loading Dots */
.ai-loading-dots {
  display: flex;
  gap: 8px;
}

.ai-loading-dots span {
  width: 10px;
  height: 10px;
  background: var(--wizard-primary);
  border-radius: 50%;
  animation: dotBounce 1.4s ease-in-out infinite;
}

.ai-loading-dots span:nth-child(1) {
  animation-delay: 0s;
}
.ai-loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.ai-loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dotBounce {
  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Results grid */
.results-section {
  margin-bottom: 2rem;
}

.results-section .section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--wizard-gray-800);
  margin-bottom: 1rem;
}

.results-section .section-title svg {
  color: var(--wizard-warning);
}

/* Results Grid - 2 columns on mobile, 3 on tablet, 3-4 on desktop */
.results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.results-grid-small {
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 640px) {
  .results-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .results-grid-small {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .results-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .results-grid-small {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Product Card - Modern Design */
.product-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.25s ease;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.06),
    0 1px 2px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--wizard-gray-100);
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.1),
    0 4px 8px rgba(0, 0, 0, 0.06);
  border-color: var(--wizard-primary-light);
}

.product-card a {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Product Image - 1:1 Aspect Ratio */
.product-card .product-image {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 Aspect Ratio */
  background: linear-gradient(135deg, var(--wizard-gray-50) 0%, #f8fafc 100%);
  overflow: hidden;
}

.product-card .product-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

/* Match Badge */
.product-card .match-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: linear-gradient(135deg, var(--wizard-success) 0%, #059669 100%);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
  z-index: 2;
}

@media (min-width: 640px) {
  .product-card .match-badge {
    font-size: 0.7rem;
    padding: 5px 10px;
  }
}

/* Product Info */
.product-card .product-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

@media (min-width: 640px) {
  .product-card .product-info {
    padding: 14px;
  }
}

.product-card .product-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--wizard-gray-800);
  margin-bottom: 4px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.1em;
}

@media (min-width: 640px) {
  .product-card .product-name {
    font-size: 0.9rem;
    min-height: 2.4em;
  }
}

.product-card .product-brand {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--wizard-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

@media (min-width: 640px) {
  .product-card .product-brand {
    font-size: 0.7rem;
  }
}

/* Product Price */
.product-card .product-price {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(
    135deg,
    var(--wizard-primary) 0%,
    var(--wizard-primary-dark) 100%
  );
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  margin-top: auto;
  width: fit-content;
  box-shadow: 0 2px 4px rgba(99, 102, 241, 0.25);
}

@media (min-width: 640px) {
  .product-card .product-price {
    font-size: 0.9rem;
    padding: 8px 14px;
  }
}

.product-card .product-price .price-from {
  font-size: 0.7rem;
  font-weight: 500;
  opacity: 0.85;
  margin-right: 4px;
}

/* Product Link / CTA */
.product-card .product-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  background: var(--wizard-gray-50);
  color: var(--wizard-gray-600);
  font-weight: 600;
  font-size: 0.75rem;
  text-decoration: none;
  transition: all 0.2s ease;
  border-top: 1px solid var(--wizard-gray-100);
  margin-top: auto;
}

@media (min-width: 640px) {
  .product-card .product-link {
    font-size: 0.8rem;
    padding: 12px 14px;
  }
}

.product-card .product-link:hover {
  background: var(--wizard-primary);
  color: white;
}

/* Results CTA */
.results-cta {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--wizard-gray-100);
}

.results-cta p {
  font-size: 0.95rem;
  color: var(--wizard-gray-600);
  margin-bottom: 1rem;
}

.results-cta .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: var(--wizard-transition);
  margin: 4px;
}

.results-cta .btn-secondary {
  background: var(--wizard-primary);
  color: white;
  border: none;
}

.results-cta .btn-secondary:hover {
  background: var(--wizard-primary-dark);
}

.results-cta .btn-outline {
  background: white;
  border: 2px solid var(--wizard-gray-200);
  color: var(--wizard-gray-700);
}

.results-cta .btn-outline:hover {
  border-color: var(--wizard-primary);
  color: var(--wizard-primary);
}

/* ============================================================================
   AI INSIGHTS STYLES
   ============================================================================ */

/* AI Summary Banner */
.ai-summary {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.08) 0%,
    rgba(168, 85, 247, 0.05) 100%
  );
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.ai-summary-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--wizard-primary) 0%, #8b5cf6 100%);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  width: fit-content;
}

.ai-badge svg {
  width: 14px;
  height: 14px;
}

.ai-summary p {
  color: var(--wizard-gray-700);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

/* AI Explanation in Product Card */
.product-card .ai-explanation {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.06) 0%,
    rgba(168, 85, 247, 0.03) 100%
  );
  border-radius: 8px;
  padding: 10px;
  margin: 8px 0;
  border-left: 3px solid var(--wizard-primary);
}

.product-card .ai-explanation p {
  font-size: 0.75rem;
  color: var(--wizard-gray-600);
  line-height: 1.45;
  margin: 0 0 6px 0;
}

.product-card .ai-benefits {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.product-card .ai-benefits li {
  display: inline-flex;
  align-items: center;
  font-size: 0.65rem;
  color: var(--wizard-primary);
  background: rgba(99, 102, 241, 0.1);
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 500;
}

.product-card .ai-benefits li::before {
  content: "✓";
  margin-right: 4px;
  font-size: 0.6rem;
}

/* Card with AI insight - slightly larger */
.product-card.has-ai-insight {
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.product-card.has-ai-insight:hover {
  border-color: var(--wizard-primary);
}

@media (min-width: 640px) {
  .ai-summary {
    padding: 20px;
  }

  .ai-summary-content {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .ai-badge {
    font-size: 0.75rem;
    padding: 5px 12px;
  }

  .ai-summary p {
    font-size: 0.95rem;
  }

  .product-card .ai-explanation p {
    font-size: 0.8rem;
  }

  .product-card .ai-benefits li {
    font-size: 0.7rem;
  }
}

/* AI Text Response (from Inscape AI Service) */
.ai-text-results {
  margin-bottom: 2rem;
}

.ai-response-body {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--wizard-gray-700, #374151);
}

.ai-response-body p {
  margin: 0 0 0.75em;
}

.ai-response-body p:last-child {
  margin-bottom: 0;
}

.ai-response-body strong {
  color: var(--wizard-gray-900, #111827);
  font-weight: 600;
}

.ai-response-body a {
  color: var(--wizard-primary, #6366f1);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ai-response-body a:hover {
  color: var(--wizard-primary-hover, #4f46e5);
}

.ai-response-body ul {
  padding-left: 0;
  margin: 0.5em 0;
  list-style: none;
}

.ai-response-body ul li {
  position: relative;
  padding-left: 1.5em;
  margin-bottom: 0.4em;
  font-size: 0.9rem;
}

.ai-response-body ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: bold;
  font-size: 0.85em;
}

.ai-response-body .ai-heading {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--wizard-gray-900, #111827);
  margin: 0 0 0.5em;
}

/* AI Intro / Outro text blocks */
.ai-intro {
  background: white;
  border: 1px solid var(--wizard-gray-200, #e5e7eb);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 1.25rem;
}

.ai-outro {
  background: white;
  border: 1px solid var(--wizard-gray-200, #e5e7eb);
  border-radius: 12px;
  padding: 20px 24px;
  margin-top: 1.25rem;
}

/* AI Product Cards Grid */
.ai-product-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ai-product-card {
  background: white;
  border: 1px solid var(--wizard-gray-200, #e5e7eb);
  border-radius: 12px;
  padding: 24px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ai-product-card:hover {
  border-color: var(--wizard-primary, #6366f1);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.1);
}

/* First card gets a highlight */
.ai-product-card:first-child {
  border-color: rgba(99, 102, 241, 0.3);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.03) 0%, rgba(168, 85, 247, 0.02) 100%);
}

.ai-product-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.ai-product-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--wizard-primary, #6366f1) 0%, #8b5cf6 100%);
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
}

.ai-product-title {
  flex: 1;
}

.ai-product-title h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--wizard-gray-900, #111827);
  line-height: 1.3;
}

.ai-product-price {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--wizard-primary, #6366f1);
}

.ai-product-body {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--wizard-gray-600, #4b5563);
}

.ai-product-body p {
  margin: 0 0 0.5em;
}

.ai-product-body p:last-child {
  margin-bottom: 0;
}

.ai-product-body ul {
  padding-left: 0;
  margin: 0.5em 0;
  list-style: none;
}

.ai-product-body ul li {
  position: relative;
  padding-left: 1.5em;
  margin-bottom: 0.35em;
  font-size: 0.88rem;
}

.ai-product-body ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: bold;
  font-size: 0.85em;
}

.ai-product-body strong {
  color: var(--wizard-gray-800, #1f2937);
}

.ai-product-actions {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--wizard-gray-100, #f3f4f6);
}

.ai-product-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 20px;
  background: var(--wizard-primary, #6366f1);
  color: white !important;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: background 0.2s ease;
}

.ai-product-link:hover {
  background: var(--wizard-primary-hover, #4f46e5);
  color: white !important;
}

/* Action buttons */
.ai-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  margin: 4px 6px 4px 0;
  background: transparent;
  border: 1.5px solid var(--wizard-primary, #6366f1);
  border-radius: 8px;
  color: var(--wizard-primary, #6366f1);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-action-btn:hover {
  background: var(--wizard-primary, #6366f1);
  color: white;
}

@media (min-width: 640px) {
  .ai-intro,
  .ai-outro {
    padding: 24px 32px;
  }

  .ai-product-card {
    padding: 28px 32px;
  }

  .ai-product-title h3 {
    font-size: 1.2rem;
  }
}

/* ============================================================================
   UTILITIES
   ============================================================================ */
.text-center {
  text-align: center;
}
.text-left {
  text-align: left;
}
.mt-4 {
  margin-top: 1rem;
}
.mb-4 {
  margin-bottom: 1rem;
}
.hidden {
  display: none !important;
}

.fade-enter {
  opacity: 0;
  transform: translateY(8px);
}

.fade-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}
