/* ============================================================
   CHU GIA TECHNOLOGY - LANDING PAGE (AI CHATBOT)
   Dark premium theme, Google-style centered search/chat
   ============================================================ */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Colors */
  --bg-primary: #0a0f1a;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.7);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --bg-glass-hover: rgba(255, 255, 255, 0.08);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-hover: rgba(255, 255, 255, 0.15);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.25);
  --accent-blue: #3b82f6;
  --accent-blue-glow: rgba(59, 130, 246, 0.2);
  --accent-amber: #f59e0b;
  --accent-purple: #8b5cf6;
  --accent-rose: #f43f5e;
  --gradient-emerald: linear-gradient(135deg, #10b981, #059669);
  --gradient-hero: linear-gradient(180deg, #0a0f1a 0%, #111827 50%, #0f172a 100%);
  --shadow-glow: 0 0 40px rgba(16, 185, 129, 0.08);

  /* Typography */
  --font-main: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;

  /* Sizing */
  --search-max-width: 680px;
  --container-max: 1100px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-main);
  background: var(--gradient-hero);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ── Ambient Background Glows ── */
.landing-bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
  animation: ambientFloat 20s ease-in-out infinite alternate;
}
.glow-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, var(--accent-emerald-glow), transparent 70%);
  top: -10%; left: -10%;
}
.glow-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--accent-blue-glow), transparent 70%);
  bottom: -10%; right: -10%;
  animation-delay: -10s;
}
.glow-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.12), transparent 70%);
  top: 40%; right: 20%;
  animation-delay: -5s;
}

@keyframes ambientFloat {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -20px) scale(1.1); }
  100% { transform: translate(-20px, 30px) scale(0.95); }
}

/* ── Main Container ── */
.landing-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Header Bar ── */
.landing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  gap: 12px;
  position: relative;
  z-index: 90;
  transition: all 0.3s ease;
}

.landing-header-brand {
  display: none; /* Only visible in chat mode */
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.landing-header-brand img {
  height: 30px;
  width: auto;
  filter: drop-shadow(0 0 16px rgba(16, 185, 129, 0.25));
}

.landing-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

.landing-btn-newchat {
  display: none; /* Shown in chat mode */
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-size: 12.5px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  white-space: nowrap;
}
.landing-btn-newchat:hover {
  background: var(--bg-glass-hover);
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
  transform: translateY(-1px);
}

/* Chat mode sticky header */
.landing-wrapper.has-chat .landing-header {
  position: sticky;
  top: 0;
  background: rgba(10, 15, 26, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 24px;
  min-height: 48px;
}
.landing-wrapper.has-chat .landing-header-brand {
  display: flex;
}
.landing-wrapper.has-chat .landing-btn-newchat {
  display: inline-flex;
}

.landing-header-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  transition: all 0.25s ease;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.landing-header-link:hover {
  color: var(--text-primary);
  background: var(--bg-glass-hover);
}
.landing-header-link.cta {
  background: var(--gradient-emerald);
  color: #fff;
  font-weight: 600;
  padding: 8px 18px;
}
.landing-header-link.cta:hover {
  box-shadow: 0 4px 20px var(--accent-emerald-glow);
  transform: translateY(-1px);
}

/* ── Center Hero Area ── */
.landing-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  transition: justify-content 0.5s ease;
}

.landing-center.has-chat {
  justify-content: flex-start;
  padding-top: 16px;
}

.landing-center.has-chat .landing-logo-wrap,
.landing-center.has-chat .landing-search-wrap,
.landing-center.has-chat .landing-suggestions,
.landing-center.has-chat .chat-header-actions {
  display: none !important;
}

/* Logo */
.landing-logo-wrap {
  margin-bottom: 36px;
  text-align: center;
  animation: fadeInUp 0.8s ease;
}

.landing-logo {
  height: 62px;
  width: auto;
  filter: drop-shadow(0 0 30px rgba(16, 185, 129, 0.2));
  transition: transform 0.4s ease;
}
.landing-logo:hover {
  transform: scale(1.03);
}

/* Brand Name - Hidden from visual view to avoid duplication with logo */
.landing-brand-name,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.landing-tagline {
  margin-top: 14px;
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: 0.3px;
}
.landing-tagline strong {
  color: var(--accent-emerald);
  font-weight: 600;
}

/* Home & PWA Hero Buttons */
.landing-hero-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.landing-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 0;
  padding: 9px 22px;
  font-size: 13.5px;
  font-weight: 600;
  color: #10b981;
  background: rgba(16, 185, 129, 0.08);
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  border-radius: 50px;
  text-decoration: none;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
  font-family: inherit;
  cursor: pointer;
}
.landing-home-btn:hover {
  background: rgba(16, 185, 129, 0.18);
  border-color: #10b981;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
  transform: translateY(-1px);
}

.landing-wifi-hero-btn {
  background: rgba(56, 189, 248, 0.09);
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}
.landing-wifi-hero-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.35);
  transform: translateY(-1px);
}

.landing-intercom-hero-btn {
  background: rgba(167, 139, 250, 0.09);
  border: 1.5px solid rgba(167, 139, 250, 0.4);
  color: #a78bfa;
}
.landing-intercom-hero-btn:hover {
  background: rgba(167, 139, 250, 0.2);
  border-color: #a78bfa;
  color: #ffffff;
  box-shadow: 0 0 22px rgba(167, 139, 250, 0.35);
  transform: translateY(-1px);
}

.landing-smarthome-hero-btn {
  background: rgba(168, 85, 247, 0.1);
  border: 1.5px solid rgba(168, 85, 247, 0.45);
  color: #c084fc;
}
.landing-smarthome-hero-btn:hover {
  background: rgba(168, 85, 247, 0.22);
  border-color: #c084fc;
  color: #ffffff;
  box-shadow: 0 0 22px rgba(168, 85, 247, 0.4);
  transform: translateY(-1px);
}

/* Header PWA Button */
.landing-btn-pwa {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-size: 12px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  white-space: nowrap;
}
.landing-btn-pwa:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: #10b981;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 14px rgba(16, 185, 129, 0.3);
}
.landing-btn-pwa.pwa-ready {
  position: relative;
  border-color: #10b981;
}
.landing-btn-pwa.pwa-ready::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: pwaPulse 2s infinite;
}

@keyframes pwaPulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* ── Search / Chat Input ── */
.landing-search-wrap {
  width: 100%;
  max-width: var(--search-max-width);
  margin-bottom: 24px;
  animation: fadeInUp 0.8s ease 0.15s both;
}

.landing-search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-glass);
  border: 1.5px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 14px 22px;
  transition: all 0.35s ease;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.landing-search-box:focus-within {
  border-color: var(--accent-emerald);
  box-shadow: 0 0 0 3px var(--accent-emerald-glow), var(--shadow-glow);
  background: rgba(255, 255, 255, 0.06);
}

.search-icon {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color 0.3s ease;
}
.landing-search-box:focus-within .search-icon {
  color: var(--accent-emerald);
}

.landing-search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 16px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-weight: 400;
}
.landing-search-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.search-send-btn {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--gradient-emerald);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}
.search-send-btn.visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.search-send-btn:hover {
  box-shadow: 0 4px 20px var(--accent-emerald-glow);
  transform: scale(1.08);
}
.search-send-btn.visible:hover {
  transform: scale(1.08);
}

/* ── Suggestion Chips ── */
.landing-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 900px;
  margin: 0 auto 28px auto;
  animation: fadeInUp 0.8s ease 0.3s both;
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.suggestion-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-full);
  color: #cbd5e1;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-family: var(--font-main);
  white-space: nowrap;
  pointer-events: auto;
  position: relative;
  z-index: 2;
  -webkit-tap-highlight-color: rgba(16, 185, 129, 0.15);
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.suggestion-chip:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(16, 185, 129, 0.45);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 16px rgba(16, 185, 129, 0.18);
}
.suggestion-chip .chip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent-emerald, #10b981);
  transition: all 0.25s ease;
  flex-shrink: 0;
}
.suggestion-chip .chip-icon svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  display: block;
}
.suggestion-chip:hover .chip-icon {
  transform: scale(1.1);
  box-shadow: 0 0 10px currentColor;
}

/* Individual Chip Theme Accents */
.suggestion-chip.chip-camera .chip-icon {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
}
.suggestion-chip.chip-camera:hover {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 16px rgba(56, 189, 248, 0.2);
}

.suggestion-chip.chip-home-wifi .chip-icon {
  color: #34d399;
  background: rgba(52, 211, 153, 0.12);
}
.suggestion-chip.chip-home-wifi:hover {
  border-color: rgba(52, 211, 153, 0.5);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 16px rgba(52, 211, 153, 0.2);
}

.suggestion-chip.chip-office-net .chip-icon {
  color: #818cf8;
  background: rgba(129, 140, 248, 0.12);
}
.suggestion-chip.chip-office-net:hover {
  border-color: rgba(129, 140, 248, 0.5);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 16px rgba(129, 140, 248, 0.2);
}

.suggestion-chip.chip-smarthome .chip-icon {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
}
.suggestion-chip.chip-smarthome:hover {
  border-color: rgba(251, 191, 36, 0.55);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 18px rgba(251, 191, 36, 0.25);
}

.suggestion-chip.chip-intercom .chip-icon {
  color: #f97316;
  background: rgba(249, 115, 22, 0.12);
}
.suggestion-chip.chip-intercom:hover {
  border-color: rgba(249, 115, 22, 0.5);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 16px rgba(249, 115, 22, 0.2);
}

.suggestion-chip.chip-lock .chip-icon {
  color: #06b6d4;
  background: rgba(6, 182, 212, 0.12);
}
.suggestion-chip.chip-lock:hover {
  border-color: rgba(6, 182, 212, 0.5);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 16px rgba(6, 182, 212, 0.2);
}

.suggestion-chip.chip-electric .chip-icon {
  color: #facc15;
  background: rgba(250, 204, 21, 0.12);
}
.suggestion-chip.chip-electric:hover {
  border-color: rgba(250, 204, 21, 0.55);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 18px rgba(250, 204, 21, 0.25);
}

.suggestion-chip.chip-enterprise .chip-icon {
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.12);
}
.suggestion-chip.chip-enterprise:hover {
  border-color: rgba(167, 139, 250, 0.5);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 16px rgba(167, 139, 250, 0.2);
}

/* ── Chat Messages Area ── */
.landing-chat-area {
  width: 100%;
  max-width: var(--search-max-width);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 40px;
  animation: fadeInUp 0.4s ease both;
}

/* Message Bubble */
.chat-msg {
  display: flex;
  gap: 12px;
  max-width: 100%;
  animation: msgSlideIn 0.4s ease both;
}

.chat-msg.user {
  flex-direction: row-reverse;
}

.chat-avatar {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  margin-top: 2px;
}
.chat-msg.ai .chat-avatar {
  background: var(--gradient-emerald);
  color: #fff;
  box-shadow: 0 2px 12px var(--accent-emerald-glow);
}
.chat-msg.user .chat-avatar {
  background: rgba(59, 130, 246, 0.2);
  color: var(--accent-blue);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.chat-bubble {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 14.5px;
  line-height: 1.7;
  max-width: 85%;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.chat-msg.ai .chat-bubble {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  border-top-left-radius: 4px;
}
.chat-msg.user .chat-bubble {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: var(--text-primary);
  border-top-right-radius: 4px;
}

/* Markdown-like formatting inside AI replies */
.chat-bubble strong {
  color: var(--accent-emerald);
  font-weight: 600;
}
.chat-bubble a {
  color: var(--accent-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.chat-bubble ul, .chat-bubble ol {
  padding-left: 18px;
  margin: 6px 0;
}
.chat-bubble li {
  margin: 4px 0;
}
.chat-bubble code {
  background: rgba(255,255,255,0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}
.chat-bubble h3, .chat-bubble h4 {
  color: var(--accent-emerald);
  margin: 10px 0 4px;
  font-size: 15px;
}

/* Chat divider & CTA buttons */
.chat-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin: 12px 0;
}

.chat-catalog-cta-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin: 14px 0 10px 0;
  padding: 13px 20px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: 0.2px;
  text-align: center;
  border-radius: 12px;
  text-decoration: none !important;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-sizing: border-box;
}

.chat-catalog-cta-btn:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.6);
  color: #ffffff !important;
}

.chat-catalog-cta-btn .cta-arrow {
  display: inline-block;
  font-size: 16px;
  transition: transform 0.25s ease;
}

.chat-catalog-cta-btn:hover .cta-arrow {
  transform: translateX(5px);
}

/* ── Interactive Combo Recommendation Action Box ── */
.chat-combo-action-box {
  margin-top: 14px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(56, 189, 248, 0.08));
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  animation: fadeInUp 0.3s ease both;
}

.chat-combo-action-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.1px;
}

.chat-combo-action-title .combo-badge-icon {
  font-size: 17px;
  display: inline-block;
  animation: pulse 2s infinite;
}

.chat-combo-action-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chat-combo-act-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 9999px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none !important;
  font-family: inherit;
  border: 1px solid transparent;
  flex: 1;
  min-width: 150px;
  text-align: center;
  box-sizing: border-box;
}

.chat-combo-act-btn.btn-yes {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff !important;
  box-shadow: 0 3px 12px rgba(16, 185, 129, 0.4);
  border-color: rgba(255, 255, 255, 0.25);
}

.chat-combo-act-btn.btn-yes:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.6);
  color: #ffffff !important;
}

.chat-combo-act-btn.btn-no {
  background: rgba(30, 41, 59, 0.8);
  color: #e2e8f0 !important;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.chat-combo-act-btn.btn-no:hover {
  background: rgba(51, 65, 85, 0.95);
  color: #ffffff !important;
  border-color: rgba(56, 189, 248, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.25);
}

.chat-combo-action-box.responded {
  opacity: 0.85;
}

.chat-combo-action-box.responded .chat-combo-act-btn {
  pointer-events: none;
  opacity: 0.5;
}

.chat-combo-action-box.responded .chat-combo-act-btn.selected {
  opacity: 1;
  box-shadow: 0 0 0 2px var(--accent-emerald);
}

/* Product card inside chat */
.chat-product-card {
  display: flex;
  gap: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin: 8px 0;
  transition: all 0.25s ease;
}
.chat-product-card:hover {
  border-color: var(--accent-emerald);
  background: rgba(16,185,129,0.04);
}
.chat-product-card img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
}
.chat-product-info {
  flex: 1;
  min-width: 0;
}
.chat-product-info .name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.chat-product-info .price {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-emerald);
}
.chat-product-info .brand-tag {
  display: inline-block;
  font-size: 10px;
  padding: 2px 6px;
  background: rgba(16,185,129,0.1);
  border-radius: 4px;
  color: var(--accent-emerald);
  font-weight: 600;
  margin-top: 4px;
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 14px 18px;
}
.typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  opacity: 0.4;
  animation: typingBounce 1.4s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* ── Bottom Reply Box ── */
.chat-reply-bar {
  width: 100%;
  max-width: var(--search-max-width);
  position: sticky;
  bottom: 20px;
  z-index: 50;
  margin-top: 8px;
  margin-bottom: 24px;
  animation: fadeInUp 0.4s ease both;
}

.chat-reply-inner {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: rgba(15, 23, 42, 0.9);
  border: 1.5px solid var(--border-glass-hover);
  border-radius: 20px;
  padding: 10px 14px 10px 18px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 1px rgba(255, 255, 255, 0.1);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.chat-reply-inner:focus-within {
  border-color: var(--accent-emerald);
  box-shadow: 0 0 0 3px var(--accent-emerald-glow), 0 12px 36px rgba(0, 0, 0, 0.6);
  background: rgba(15, 23, 42, 0.96);
}

.chat-reply-textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-main);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-primary);
  resize: none;
  min-height: 24px;
  max-height: 120px;
  padding: 4px 0;
}

.chat-reply-textarea::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.chat-reply-send-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  margin-bottom: 1px;
}

.chat-reply-send-btn.active,
.chat-reply-send-btn:hover:not(:disabled) {
  background: var(--gradient-emerald);
  color: #fff;
  box-shadow: 0 2px 14px var(--accent-emerald-glow);
  transform: scale(1.05);
}

.chat-reply-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.chat-reply-footer-hint {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 6px;
  padding: 0 12px;
}

.chat-reply-footer-hint kbd {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 10.5px;
  font-family: inherit;
  color: var(--text-secondary);
}

.chat-reply-footer-hint a {
  color: var(--accent-emerald);
  text-decoration: none;
  font-weight: 500;
}

.chat-reply-footer-hint a:hover {
  text-decoration: underline;
}

/* ── Footer ── */
.landing-footer {
  padding: 18px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}
.landing-footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.landing-footer a:hover {
  color: var(--accent-emerald);
}

/* Hide footer in active chat mode so it doesn't clutter or sit above the chat input box */
.landing-wrapper.has-chat .landing-footer,
.landing-center.has-chat ~ .landing-footer {
  display: none !important;
}

/* ── Animations ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* ── Chat Mode State & Transitions ── */
.landing-center.has-chat .landing-search-wrap,
.landing-center.has-chat .landing-suggestions {
  display: none !important;
}

.landing-center:not(.has-chat) .landing-logo-wrap {
  transform: scale(1);
  transition: transform 0.4s ease, margin-bottom 0.4s ease;
}

.landing-center.has-chat .landing-logo-wrap {
  transform: scale(0.75);
  transform-origin: center top;
  margin-bottom: 12px;
  transition: transform 0.4s ease, margin-bottom 0.4s ease;
}

/* ── Chat Header Actions (New Chat) ── */
.chat-header-actions {
  width: 100%;
  max-width: var(--search-max-width);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 10px;
  animation: fadeInUp 0.3s ease both;
}

.btn-new-chat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-size: 12px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn-new-chat:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-glass-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
    position: relative;
    width: 100%;
  }

  .landing-header {
    padding: 8px 12px;
    gap: 6px;
    justify-content: space-between;
    flex-wrap: nowrap;
    overflow-x: hidden;
  }
  .landing-header-brand img {
    height: 24px;
  }
  .landing-header-actions {
    gap: 6px;
  }
  .landing-header-link {
    font-size: 11px;
    padding: 5px 8px;
    white-space: nowrap;
  }
  .landing-header-link.cta {
    padding: 5px 10px;
    font-size: 11px;
  }
  .landing-header-link.nav-desktop-link {
    display: none !important;
  }
  .landing-btn-newchat {
    font-size: 11px;
    padding: 5px 9px;
    gap: 4px;
  }
  .landing-btn-pwa {
    font-size: 11px;
    padding: 5px 8px;
    gap: 4px;
  }
  .landing-wrapper.has-chat .landing-header {
    padding: 6px 12px;
    min-height: 44px;
  }

  .landing-center {
    padding: 0 12px;
  }
  .landing-center.has-chat {
    padding-top: 6px;
  }
  .landing-center.has-chat .landing-logo-wrap,
  .landing-center.has-chat .landing-search-wrap,
  .landing-center.has-chat .landing-suggestions,
  .landing-center.has-chat .chat-header-actions {
    display: none !important;
  }

  .landing-logo {
    height: 40px;
  }
  .landing-brand-name {
    font-size: 22px;
    letter-spacing: 3px;
  }
  .landing-tagline {
    font-size: 12.5px;
  }
  .landing-search-box {
    padding: 11px 16px;
    border-radius: var(--radius-lg);
  }
  .landing-search-input {
    font-size: 14.5px;
  }
  .landing-suggestions {
    gap: 8px;
    margin-bottom: 20px;
  }
  .suggestion-chip {
    font-size: 12px;
    padding: 7px 12px;
  }

  /* Chat area on mobile */
  .landing-chat-area {
    width: 100%;
    max-width: 100%;
    gap: 12px;
    padding-bottom: 110px; /* Space for the fixed reply bar */
  }
  .chat-msg {
    gap: 8px;
  }
  .chat-avatar {
    width: 28px;
    height: 28px;
    font-size: 11px;
    margin-top: 2px;
  }
  .chat-bubble {
    padding: 11px 14px;
    font-size: 13.5px;
    line-height: 1.6;
    max-width: 88%;
    border-radius: 14px;
  }

  /* Docked Fixed Reply Bar on Mobile */
  .chat-reply-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 8px 12px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    background: rgba(10, 15, 26, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.5);
    z-index: 100;
  }

  .chat-reply-inner {
    padding: 6px 10px 6px 14px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
  }

  .chat-reply-textarea {
    font-size: 14px;
    min-height: 24px;
    max-height: 80px;
    padding: 3px 0;
  }

  .chat-reply-send-btn {
    width: 34px;
    height: 34px;
  }

  /* Completely hide desktop keyboard shortcut hints on mobile */
  .chat-reply-footer-hint {
    display: none !important;
  }

  .landing-footer {
    padding-bottom: max(18px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 480px) {
  .landing-header {
    gap: 4px;
    padding: 6px 8px;
  }
  .landing-header-brand img {
    height: 20px;
  }
  .landing-header-link {
    font-size: 10.5px;
    padding: 4px 6px;
  }
  .landing-header-link.cta {
    font-size: 10.5px;
    padding: 4px 8px;
  }
  .landing-btn-newchat {
    font-size: 10.5px;
    padding: 4px 6px;
    gap: 3px;
  }
  .chat-bubble {
    padding: 10px 12px;
    font-size: 13px;
    max-width: 92%;
  }
  .chat-product-card {
    padding: 8px;
    gap: 8px;
  }
  .chat-product-card img {
    width: 52px;
    height: 52px;
  }
}

/* ── Scrollbar (Webkit) ── */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.2);
}

/* ── Welcome message with brand grid ── */
.welcome-brands {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.welcome-brand-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}
.welcome-brand-tag img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

/* ── Error state ── */
.chat-error {
  color: var(--accent-rose);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.chat-error svg {
  flex-shrink: 0;
}

/* ── PWA Install Modal ── */
.pwa-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(4, 8, 18, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.pwa-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.pwa-modal-card {
  width: 100%;
  max-width: 440px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(16, 185, 129, 0.2);
  transform: translateY(12px) scale(0.96);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-primary);
}

.pwa-modal-overlay.active .pwa-modal-card {
  transform: translateY(0) scale(1);
}

.pwa-modal-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  position: relative;
  margin-bottom: 20px;
}

.pwa-modal-icon-badge img {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.pwa-modal-title-wrap {
  flex: 1;
}

.pwa-modal-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px 0;
}

.pwa-modal-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

.pwa-modal-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.pwa-modal-close:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.pwa-steps-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 20px;
}

.pwa-step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.pwa-step-item strong {
  color: #fff;
}

.pwa-step-num {
  width: 24px;
  height: 24px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.pwa-share-badge,
.pwa-plus-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 12px;
  color: #38bdf8;
  font-weight: 600;
}

.pwa-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.pwa-modal-action-btn {
  width: 100%;
  padding: 11px 20px;
  background: var(--gradient-emerald);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 16px var(--accent-emerald-glow);
}

.pwa-modal-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--accent-emerald-glow);
}
