/*
  Beauty Advisor AI - Modern Minimalist Design
  Version: 3.0
*/

/* ========== CSS RESET ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ========== ROOT VARIABLES ========== */
:root {
  /* Modern Color Palette */
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --accent: #8b5cf6;
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
  
  /* Neutral Palette */
  --white: #ffffff;
  --gray-50: #fafafa;
  --gray-100: #f4f4f5;
  --gray-200: #e4e4e7;
  --gray-300: #d4d4d8;
  --gray-400: #a1a1aa;
  --gray-500: #71717a;
  --gray-600: #52525b;
  --gray-700: #3f3f46;
  --gray-800: #27272a;
  --gray-900: #18181b;
  
  /* Dark Theme Colors (Primary Palette) */
  --dark-bg: #0f172a;
  --dark-surface: #1e293b;
  --dark-surface-light: #334155;
  --dark-border: #475569;
  --dark-text: #e2e8f0;
  --dark-text-secondary: #cbd5e1;
  
  /* Semantic Colors - ALWAYS DARK */
  --background: #0f172a;
  --surface: #1e293b;
  --border: #475569;
  --text-primary: #e2e8f0;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  
  /* Shadows - Softer, more subtle */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.03);
  --shadow-md: 0 4px 12px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 8px 24px -4px rgb(0 0 0 / 0.08);
  --shadow-xl: 0 12px 32px -8px rgb(0 0 0 / 0.12);
  --shadow-dark: 0 8px 24px -4px rgb(0 0 0 / 0.3);
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
}

/* ========== BASE STYLES ========== */
body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 15px;
  overflow: hidden;
  height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========== SCROLLBAR ========== */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

/* ========== LAYOUT ========== */
.app-wrapper {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--background);
}

.main-container {
  flex: 1;
  overflow: hidden;
  padding: var(--spacing-lg);
}

.content-grid {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
  height: calc(100% - 60px);
  max-width: 1600px;
  margin: 0 auto;
}

/* ========== CONTROL BAR ========== */
.control-bar {
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-md);
  max-width: 1600px;
  margin-left: auto;
  margin-right: auto;
}

.control-btn {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-xs) var(--spacing-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.control-btn i {
  font-size: 16px;
}

.control-btn:hover {
  background: var(--gray-100);
  color: var(--text-primary);
  border-color: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.control-btn:active {
  transform: translateY(0);
}

/* ========== PANELS ========== */
.panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.panel:hover {
  box-shadow: var(--shadow-lg);
}

.panel-header {
  padding: var(--spacing-sm) var(--spacing-md);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--gray-50);
}

/* Light theme for BOTH panels - matches background */
.transcription-panel,
.advisor-panel {
  background: var(--surface);
  border-color: var(--border);
}

.transcription-panel {
  max-height: 280px;
  min-height: 240px;
  flex-shrink: 0;
}

.advisor-panel {
  flex: 1;
  min-height: 200px;
}

.transcription-panel .panel-header,
.advisor-panel .panel-header {
  background: var(--surface);
  border-bottom-color: var(--border);
}

.transcription-panel .panel-title,
.advisor-panel .panel-title {
  color: var(--text-primary);
}

.transcription-panel .panel-title i,
.advisor-panel .panel-title i {
  color: var(--primary);
}

.transcription-panel .transcription-area,
.advisor-panel .advisor-container {
  background: transparent;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.panel-title i {
  font-size: 16px;
  color: var(--primary);
}

.panel-title h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.panel-content {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.transcription-area,
.advisor-container {
  flex: 1;
  overflow-y: auto;
  padding: var(--spacing-md);
}

/* ========== STATUS BADGE ========== */
.status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  transition: background-color 0.3s ease;
  animation: pulse 2s ease-in-out infinite;
}

.status-badge.active .status-dot {
  background: var(--success);
  animation: pulse 2s ease-in-out infinite;
}

.status-badge.recording .status-dot {
  background: var(--error);
  animation: pulse 1s ease-in-out infinite;
}

/* ========== AUDIO VISUALIZER ========== */
.audio-visualizer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 0;
  padding: 0;
  overflow: hidden;
  background: transparent;
  transition: all 0.3s ease;
  opacity: 0;
}

.audio-visualizer.active {
  height: 24px;
  padding: 8px 0;
  opacity: 1;
  background: linear-gradient(90deg, 
    rgba(99, 102, 241, 0.02) 0%, 
    rgba(99, 102, 241, 0.04) 50%,
    rgba(99, 102, 241, 0.02) 100%);
}

.wave-bar {
  width: 2px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  opacity: 0;
  transition: all 0.2s ease;
}

.audio-visualizer.active .wave-bar {
  opacity: 0.6;
  animation: pulse 0.6s ease-in-out infinite;
}

.wave-bar:nth-child(1) { animation-delay: 0s; }
.wave-bar:nth-child(2) { animation-delay: 0.05s; }
.wave-bar:nth-child(3) { animation-delay: 0.1s; }
.wave-bar:nth-child(4) { animation-delay: 0.15s; }
.wave-bar:nth-child(5) { animation-delay: 0.2s; }
.wave-bar:nth-child(6) { animation-delay: 0.25s; }
.wave-bar:nth-child(7) { animation-delay: 0.2s; }
.wave-bar:nth-child(8) { animation-delay: 0.15s; }
.wave-bar:nth-child(9) { animation-delay: 0.1s; }
.wave-bar:nth-child(10) { animation-delay: 0.05s; }
.wave-bar:nth-child(11) { animation-delay: 0.1s; }
.wave-bar:nth-child(12) { animation-delay: 0.15s; }

@keyframes pulse {
  0%, 100% {
    height: 3px;
    opacity: 0.4;
  }
  50% {
    height: 12px;
    opacity: 1;
  }
}

/* ========== PROCESSING INDICATOR (DEPRECATED - Use transcription-loading) ========== */
.processing-indicator {
  display: none !important; /* Hidden - replaced by transcription-loading */
}

/* ========== TRANSCRIPTION LOADING (Clean Centered Indicator) ========== */
.transcription-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px 16px;
  animation: fadeIn 0.3s ease-out;
}

.loading-spinner-transcription {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(99, 102, 241, 0.1);
  border-top: 3px solid var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.transcription-loading .loading-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-foreground);
  animation: pulse 1.5s ease-in-out infinite;
}

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

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.processing-spinner {
  position: relative;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.spinner-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2px solid transparent;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.spinner-ring:nth-child(1) {
  animation-delay: -0.45s;
  border-top-color: var(--primary);
}

.spinner-ring:nth-child(2) {
  animation-delay: -0.3s;
  border-top-color: var(--primary-light);
  width: 75%;
  height: 75%;
  border-width: 1.5px;
}

.spinner-ring:nth-child(3) {
  animation-delay: -0.15s;
  border-top-color: var(--accent);
  width: 50%;
  height: 50%;
  border-width: 1.5px;
}

.processing-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
  animation: pulse-gentle 2s ease-in-out infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ========== TRANSCRIPTION AREA ========== */
.transcription-area {
  font-size: 15px;
  line-height: 1.8;
  min-height: 200px;
}

.final-text {
  color: var(--text-primary);
  background: var(--gray-50);
  padding: var(--spacing-xs) var(--spacing-sm);
  margin: var(--spacing-xs) 0;
  border-radius: var(--radius-md);
  display: inline-block;
  border-left: 3px solid var(--primary);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.final-text:hover {
  background: var(--gray-100);
  transform: translateX(2px);
  box-shadow: var(--shadow-md);
}

/* ========== WELCOME PLACEHOLDER STATE ========== */
.welcome-placeholder {
  padding: var(--spacing-md);
  animation: fadeIn 0.5s ease-out;
}

.welcome-header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.welcome-icon-container {
  position: relative;
  width: 70px;
  height: 70px;
  margin: 0 auto var(--spacing-md);
}

.welcome-icon-ring {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(99, 102, 241, 0.3);
  border-radius: 50%;
  animation: ring-pulse 2s ease-in-out infinite;
}

.welcome-icon-ring::before {
  content: '';
  position: absolute;
  inset: -8px;
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 50%;
  animation: ring-pulse 2s ease-in-out infinite 0.3s;
}

@keyframes ring-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.5;
  }
}

.welcome-icon {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: white;
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3);
  animation: float 3s ease-in-out infinite;
}

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

.welcome-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--dark-text);
  margin-bottom: var(--spacing-xs);
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-subtitle {
  font-size: 13px;
  color: var(--dark-text-secondary);
}

/* Hint Cards */
.hint-cards {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
}

.hint-card {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.04) 100%);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.3s ease;
  animation: slideInRight 0.5s ease-out backwards;
  animation-delay: var(--delay);
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hint-card:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateX(4px);
}

.hint-card:hover .hint-arrow {
  opacity: 1;
  transform: translateX(4px);
}

.hint-card:hover .hint-icon {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.hint-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.hint-content {
  flex: 1;
  text-align: left;
}

.hint-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--dark-text);
  margin-bottom: 2px;
}

.hint-desc {
  display: block;
  font-size: 12px;
  color: var(--dark-text-secondary);
}

.hint-arrow {
  color: var(--primary);
  font-size: 14px;
  opacity: 0;
  transform: translateX(0);
  transition: all 0.3s ease;
}

/* Sample Product Previews */
.sample-products {
  margin-top: var(--spacing-md);
}

.sample-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--dark-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--spacing-sm);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.sample-label i {
  color: var(--primary);
  font-size: 10px;
}

.sample-cards {
  display: flex;
  gap: var(--spacing-sm);
}

.sample-card {
  flex: 1;
  height: 80px;
  background: linear-gradient(135deg, var(--dark-surface) 0%, var(--dark-surface-light) 100%);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  animation: slideUp 0.5s ease-out backwards;
  animation-delay: var(--delay);
}

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

.sample-image {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
}

.sample-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(99, 102, 241, 0.1) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2s ease-in-out infinite;
}

/* Idle pulse animation for sample cards */
.sample-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.1);
  animation: card-pulse 3s ease-in-out infinite;
  animation-delay: var(--delay);
}

@keyframes card-pulse {
  0%, 100% {
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.1);
  }
  50% {
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.25);
  }
}

/* ========== VOICE INPUT WELCOME STATE ========== */
.voice-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md);
  text-align: center;
  animation: fadeIn 0.4s ease-out;
  min-height: 120px;
}

.voice-welcome-icon {
  position: relative;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  margin-bottom: var(--spacing-sm);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.voice-pulse {
  position: absolute;
  inset: -4px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  animation: voice-pulse-ring 2s ease-out infinite;
}

.voice-pulse::before {
  content: '';
  position: absolute;
  inset: -6px;
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 50%;
  animation: voice-pulse-ring 2s ease-out infinite 0.3s;
}

@keyframes voice-pulse-ring {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

.voice-welcome-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-sm);
}

.voice-hints {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
  justify-content: center;
}

.voice-hint {
  font-size: 11px;
  padding: 4px 10px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-lg);
  color: var(--primary);
  animation: fadeInUp 0.4s ease-out backwards;
  animation-delay: var(--delay);
  transition: all 0.2s ease;
}

.voice-hint:hover {
  background: rgba(99, 102, 241, 0.2);
  transform: translateY(-2px);
}

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

/* ========== PLACEHOLDER CONTENT ========== */
.placeholder-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 300px;
  text-align: center;
  color: var(--text-muted);
  padding: var(--spacing-xl);
}

.placeholder-icon {
  width: 80px;
  height: 80px;
  background: var(--gray-100);
  border: 2px solid var(--gray-200);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: var(--primary);
  margin-bottom: var(--spacing-md);
  opacity: 0.8;
  animation: pulse-gentle 3s ease-in-out infinite;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.placeholder-icon::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(99, 102, 241, 0.1),
    transparent
  );
  animation: shimmer 3s ease-in-out infinite;
}

.placeholder-icon:hover {
  transform: scale(1.05);
  opacity: 1;
  border-color: var(--primary);
}

.placeholder-text {
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Light theme placeholder for both panels */
.transcription-panel .placeholder-content,
.advisor-panel .placeholder-content {
  color: var(--text-muted);
}

.transcription-panel .placeholder-content {
  min-height: 180px;
  padding: var(--spacing-lg) var(--spacing-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.transcription-panel .placeholder-icon {
  width: 40px;
  height: 40px;
  font-size: 18px;
  margin-bottom: var(--spacing-xs);
  border-width: 1.5px;
}

.transcription-panel .placeholder-text {
  font-size: 13px;
}

.transcription-panel .placeholder-text,
.advisor-panel .placeholder-text {
  color: var(--text-secondary);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: var(--spacing-md);
}

.transcription-panel .loading-spinner,
.advisor-panel .loading-spinner {
  border-color: var(--gray-200);
  border-top-color: var(--primary);
}

.speaking-indicator .loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--gray-200);
  border-top-color: var(--primary);
  margin-bottom: 0;
}

/* ========== PRODUCT CARDS - DARK THEME ========== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--spacing-md);
  padding: var(--spacing-xs);
}

.product-card {
  background: linear-gradient(135deg, var(--dark-surface) 0%, var(--dark-surface-light) 100%);
  border-radius: var(--radius-xl);
  border: 1px solid var(--dark-border);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.product-card:hover::before {
  opacity: 1;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-dark), 0 0 0 1px rgba(99, 102, 241, 0.3);
  border-color: var(--primary);
}

.product-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--dark-bg);
  position: relative;
  z-index: 2;
}

.product-info {
  padding: var(--spacing-md);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  position: relative;
  z-index: 2;
}

.product-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--dark-text);
  margin-bottom: var(--spacing-xs);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price {
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--spacing-xs);
  text-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.product-description {
  font-size: 13px;
  color: var(--dark-text-secondary);
  margin-bottom: var(--spacing-sm);
  flex-grow: 1;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.feature-tag {
  font-size: 11px;
  font-weight: 500;
  padding: 5px 12px;
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-light);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-lg);
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.feature-tag:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: var(--primary);
  color: var(--white);
  transform: translateY(-1px);
}

/* ========== SKELETON LOADER FOR AI RECOMMENDATIONS ========== */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

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

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
  }
  50% {
    box-shadow: 0 0 20px 5px rgba(99, 102, 241, 0.2);
  }
}

.skeleton-loading-container {
  padding: var(--spacing-md);
  animation: fadeIn 0.3s ease-out;
}

.skeleton-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  padding: var(--spacing-md);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.skeleton-header-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse-glow 2s ease-in-out infinite;
}

.skeleton-header-icon i {
  color: white;
  font-size: 18px;
}

.skeleton-header-text {
  flex: 1;
}

.skeleton-header-text span {
  color: var(--dark-text);
  font-weight: 500;
  font-size: 14px;
}

.skeleton-header-text .loading-dots {
  display: inline-block;
}

.skeleton-header-text .loading-dots::after {
  content: '';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%, 20% { content: ''; }
  40% { content: '.'; }
  60% { content: '..'; }
  80%, 100% { content: '...'; }
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--spacing-md);
}

.skeleton-card {
  background: linear-gradient(135deg, var(--dark-surface) 0%, var(--dark-surface-light) 100%);
  border-radius: var(--radius-xl);
  border: 1px solid var(--dark-border);
  overflow: hidden;
  animation: fadeIn 0.4s ease-out backwards;
}

.skeleton-card:nth-child(1) { animation-delay: 0.1s; }
.skeleton-card:nth-child(2) { animation-delay: 0.2s; }
.skeleton-card:nth-child(3) { animation-delay: 0.3s; }

.skeleton-image {
  width: 100%;
  height: 180px;
  background: linear-gradient(90deg, 
    var(--dark-surface) 25%, 
    rgba(99, 102, 241, 0.1) 50%, 
    var(--dark-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-content {
  padding: var(--spacing-md);
}

.skeleton-line {
  height: 12px;
  background: linear-gradient(90deg, 
    var(--dark-surface) 25%, 
    rgba(99, 102, 241, 0.15) 50%, 
    var(--dark-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
  margin-bottom: var(--spacing-sm);
}

.skeleton-line.title {
  width: 80%;
  height: 16px;
  margin-bottom: var(--spacing-xs);
}

.skeleton-line.price {
  width: 40%;
  height: 20px;
  background: linear-gradient(90deg, 
    rgba(99, 102, 241, 0.2) 25%, 
    rgba(139, 92, 246, 0.3) 50%, 
    rgba(99, 102, 241, 0.2) 75%);
  background-size: 200% 100%;
  margin-bottom: var(--spacing-sm);
}

.skeleton-line.desc {
  width: 100%;
}

.skeleton-line.desc-short {
  width: 70%;
}

.skeleton-tags {
  display: flex;
  gap: 6px;
  margin-top: var(--spacing-sm);
}

.skeleton-tag {
  width: 60px;
  height: 24px;
  background: linear-gradient(90deg, 
    rgba(99, 102, 241, 0.1) 25%, 
    rgba(99, 102, 241, 0.2) 50%, 
    rgba(99, 102, 241, 0.1) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-lg);
}

.skeleton-tag:nth-child(2) {
  width: 80px;
  animation-delay: 0.2s;
}

.skeleton-tag:nth-child(3) {
  width: 50px;
  animation-delay: 0.4s;
}

/* Fade-in animation for loaded product cards */
.product-card.fade-in {
  animation: fadeIn 0.4s ease-out;
}

.products-grid.loaded .product-card {
  animation: fadeIn 0.4s ease-out backwards;
}

.products-grid.loaded .product-card:nth-child(1) { animation-delay: 0.05s; }
.products-grid.loaded .product-card:nth-child(2) { animation-delay: 0.1s; }
.products-grid.loaded .product-card:nth-child(3) { animation-delay: 0.15s; }
.products-grid.loaded .product-card:nth-child(4) { animation-delay: 0.2s; }
.products-grid.loaded .product-card:nth-child(5) { animation-delay: 0.25s; }
.products-grid.loaded .product-card:nth-child(6) { animation-delay: 0.3s; }

/* ========== FLOATING ACTION BUTTON ========== */
.fab {
  position: fixed;
  bottom: var(--spacing-lg);
  right: var(--spacing-lg);
  width: 64px;
  height: 64px;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--white);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

.fab:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-xl);
}

.fab:active {
  transform: scale(0.95);
}

.fab.recording {
  background: var(--error);
  animation: pulse-fab 1.5s ease-in-out infinite;
}

/* ========== AI RESPONSE ========== */
.ai-response {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  border: 1px solid var(--border);
  animation: slideIn 0.3s ease-out;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.ai-response:hover {
  box-shadow: var(--shadow-md);
}

.ai-response.completed {
  border-color: var(--success);
  background: var(--surface);
}

.speaking-indicator {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}

.ai-response.completed .pulse-dot {
  background: var(--success);
  animation: none;
}

/* Loading state for advisor panel */
.advisor-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: var(--spacing-xl);
}

.advisor-loading .loading-spinner {
  margin-bottom: var(--spacing-md);
}

.advisor-loading .advisor-text {
  color: var(--text-secondary);
  font-size: 15px;
}

/* ========== ANIMATIONS ========== */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { 
    opacity: 1; 
    transform: scale(1); 
  }
  50% { 
    opacity: 0.6; 
    transform: scale(1.2); 
  }
}

@keyframes pulse-fab {
  0%, 100% { 
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); 
  }
  50% { 
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); 
  }
}

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

@keyframes pulse-gentle {
  0%, 100% { 
    opacity: 0.8;
    transform: scale(1);
  }
  50% { 
    opacity: 1;
    transform: scale(1.02);
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

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

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 1024px) {
  .content-grid {
    grid-template-columns: 1fr;
    grid-template-rows: 0.7fr 1.3fr;
  }
}

@media (max-width: 768px) {
  .main-container {
    padding: var(--spacing-sm);
  }
  
  .content-grid {
    gap: var(--spacing-sm);
    height: calc(100% - 50px);
    grid-template-rows: 0.6fr 1.4fr;
  }
  
  .control-bar {
    margin-bottom: var(--spacing-sm);
  }
  
  .control-btn {
    font-size: 13px;
    padding: 6px var(--spacing-xs);
  }
  
  .control-btn span {
    display: none;
  }
  
  .products-grid {
    grid-template-columns: 1fr;
  }
  
  .placeholder-icon {
    width: 64px;
    height: 64px;
    font-size: 28px;
  }
}

/* ========== BRAND LOGO ========== */
.brand-logo {
  position: fixed;
  top: 24px;
  left: 40px;
  z-index: 1000;
  padding: 12px 20px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(99, 102, 241, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 
              0 0 0 1px rgba(99, 102, 241, 0.1),
              inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  overflow: hidden;
}

.brand-logo::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.2), transparent);
  transition: left 0.5s ease;
}

.brand-logo:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.3),
              0 0 0 1px rgba(99, 102, 241, 0.2),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.brand-logo:hover::before {
  left: 100%;
}

.logo-image {
  display: block;
  height: 32px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
  transition: filter 0.3s ease;
  margin-left: 4px;
}

.brand-logo:hover .logo-image {
  filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.4));
}

/* Responsive logo sizing */
@media (max-width: 768px) {
  .brand-logo {
    top: 16px;
    left: 16px;
    padding: 8px 12px;
  }
  
  .logo-image {
    height: 24px;
    max-width: 100px;
  }
}
