/* ═══════════════════════════════════════════════════════════════════════════
   Kapruka AI Shopping Assistant — Premium Styles
   Design System:
     Primary:     #402970 (deep indigo-purple)
     Primary-L:   #5b3d99 (lighter purple)
     Accent:      #f8da08 (golden yellow)
     Accent-2:    #fbbf24 (warm amber)
     Surface:     rgba(255,255,255,0.7) (glassmorphism)
     Dark:        #0f0a1e (deep night)
     Text:        #1a1a2e
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── CSS Custom Properties ───────────────────────────────────────────────── */
:root {
  --primary: #402970;
  --primary-light: #5b3d99;
  --primary-dark: #2d1b5e;
  --primary-glow: rgba(64, 41, 112, 0.35);
  --accent: #f8da08;
  --accent-warm: #fbbf24;
  --accent-glow: rgba(248, 218, 8, 0.3);
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --surface-hover: rgba(255, 255, 255, 0.85);
  --bg-gradient: linear-gradient(135deg, #e8e0f4 0%, #f5f0ff 30%, #fef9e7 60%, #f5f0ff 100%);
  --text-primary: #1a1a2e;
  --text-secondary: #6b5b8a;
  --text-muted: #9f8ec0;
  --border: rgba(64, 41, 112, 0.08);
  --border-hover: rgba(64, 41, 112, 0.18);
  --shadow-sm: 0 1px 3px rgba(64, 41, 112, 0.04);
  --shadow-md: 0 4px 16px rgba(64, 41, 112, 0.08);
  --shadow-lg: 0 8px 32px rgba(64, 41, 112, 0.12);
  --shadow-xl: 0 16px 48px rgba(64, 41, 112, 0.16);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-med: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', 'Noto Sans Sinhala', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-sinhala: 'Noto Sans Sinhala', 'Inter', sans-serif;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* Particles canvas */
#particles-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-light);
}

/* ── Sinhala Script Typography ───────────────────────────────────────────── */
/* Applied automatically when Sinhala Unicode characters are detected,
   or use the .sinhala class to force Noto Sans Sinhala rendering         */
@font-face {
  /* Ensure Noto Sans Sinhala covers the full Sinhala Unicode block */
  font-family: 'Noto Sans Sinhala';
  unicode-range: U+0D80-U+0DFF, U+200C, U+25CC; /* Sinhala block + ZWJ + dotted circle */
}

.sinhala,
[lang="si"],
[lang="si-LK"] {
  font-family: var(--font-sinhala);
  line-height: 1.9;        /* Sinhala glyphs are taller — needs more breathing room */
  letter-spacing: 0.01em;
  word-break: break-word;
}

/* Inline Sinhala within chat messages — auto fallback via font stack */
.message-text:lang(si),
.chat-input:lang(si) {
  font-family: var(--font-sinhala);
  line-height: 1.9;
}

/* ── App Layout ──────────────────────────────────────────────────────────── */
#app {
  display: flex;
  height: 100vh;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SIDEBAR — Glassmorphism dark panel
   ═══════════════════════════════════════════════════════════════════════════ */
.sidebar {
  width: 290px;
  min-width: 290px;
  height: 100vh;
  background: linear-gradient(180deg, 
    rgba(15, 10, 30, 0.97) 0%, 
    rgba(45, 27, 94, 0.95) 50%, 
    rgba(64, 41, 112, 0.93) 100%
  );
  backdrop-filter: blur(24px) saturate(1.8);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform var(--transition-slow);
  z-index: 100;
  position: relative;
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: radial-gradient(ellipse at top, rgba(248, 218, 8, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.sidebar-inner {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  z-index: 1;
}

.sidebar-inner::-webkit-scrollbar {
  width: 4px;
}

.sidebar-inner::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-inner::-webkit-scrollbar-thumb {
  background: rgba(248, 218, 8, 0.2);
  border-radius: 4px;
}

/* ── Sidebar Brand ───────────────────────────────────────────────────────── */
.sidebar-brand {
  padding: 24px 20px 20px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo-icon {
  position: relative;
}

.brand-logo-k {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
  color: var(--primary);
  border-radius: 12px;
  font-size: 1.5rem;
  font-weight: 800;
  box-shadow: 0 4px 16px var(--accent-glow), 0 0 0 2px rgba(248, 218, 8, 0.1);
  transition: transform var(--transition-med), box-shadow var(--transition-med);
}

.brand-logo-k:hover {
  transform: scale(1.08) rotate(-2deg);
  box-shadow: 0 6px 24px var(--accent-glow), 0 0 0 3px rgba(248, 218, 8, 0.15);
}

.brand-logo-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.brand-tagline {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 400;
  letter-spacing: 0.2px;
  margin-top: 2px;
}

/* ── Sidebar Sections ────────────────────────────────────────────────────── */
.sidebar-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  margin: 4px 20px;
}

.sidebar-section {
  padding: 14px 18px;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 12px;
  opacity: 0.85;
}

.section-label svg {
  opacity: 0.7;
}

/* ── Glass Buttons ───────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-med);
  line-height: 1.4;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn:hover::before {
  opacity: 1;
}

.btn-sm {
  padding: 10px 16px;
  font-size: 0.78rem;
}

.btn-icon {
  display: flex;
  align-items: center;
}

.btn-glass {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  width: 100%;
}

.btn-glass:hover {
  background: rgba(248, 218, 8, 0.1);
  border-color: rgba(248, 218, 8, 0.25);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(248, 218, 8, 0.1);
}

.btn-danger-subtle:hover {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: rgba(239, 68, 68, 0.25) !important;
  color: #f87171 !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1) !important;
}

/* ── Quick Action Buttons ────────────────────────────────────────────────── */
.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.btn-quick {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.75);
  border: 1px solid transparent;
  border-radius: 10px;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 400;
  transition: all var(--transition-med);
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-quick:hover {
  background: rgba(248, 218, 8, 0.08);
  border-color: rgba(248, 218, 8, 0.15);
  color: #ffffff;
  transform: translateX(4px);
  box-shadow: 0 2px 12px rgba(248, 218, 8, 0.06);
}

.btn-quick .qa-icon {
  font-size: 1rem;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.btn-quick .qa-text {
  flex: 1;
}

.btn-quick .qa-arrow {
  opacity: 0;
  transform: translateX(-4px);
  transition: all var(--transition-med);
  color: var(--accent);
  font-size: 0.85rem;
}

.btn-quick:hover .qa-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ── Session Info ────────────────────────────────────────────────────────── */
.session-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.session-info-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.4);
}

.session-info-row svg {
  opacity: 0.5;
  flex-shrink: 0;
}

.session-id {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  font-family: 'SF Mono', 'Fira Code', 'Roboto Mono', monospace;
}

.msg-count {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ── Sidebar Footer ──────────────────────────────────────────────────────── */
.sidebar-footer {
  padding: 16px 18px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  z-index: 1;
}

.sidebar-footer-badge {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.35);
  line-height: 1.6;
}

.sidebar-footer-badge a {
  color: rgba(248, 218, 8, 0.6);
  font-weight: 500;
}

.sidebar-footer-badge a:hover {
  color: var(--accent);
}

.sidebar-footer-tech {
  display: block;
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.2);
  margin-top: 4px;
  letter-spacing: 0.5px;
}

/* ── Health Status ───────────────────────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 500;
  margin-top: 8px;
  backdrop-filter: blur(8px);
}

.status-ok {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.status-err {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-caption {
  display: block;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MAIN CONTENT AREA
   ═══════════════════════════════════════════════════════════════════════════ */

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-width: 0;
  position: relative;
}

/* ── Top Bar ─────────────────────────────────────────────────────────────── */
.top-bar {
  display: flex;
  align-items: center;
  padding: 0 24px;
  height: 60px;
  min-height: 60px;
  background: rgba(64, 41, 112, 0.95);
  backdrop-filter: blur(20px) saturate(1.6);
  color: #ffffff;
  box-shadow: 0 4px 24px rgba(64, 41, 112, 0.15);
  position: relative;
  z-index: 10;
}

.top-bar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(248, 218, 8, 0.3), transparent);
}

.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  padding: 8px;
  margin-right: 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.top-bar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-bar-logo-wrap {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.top-bar-logo {
  font-size: 1.2rem;
}

.top-bar-text {
  display: flex;
  flex-direction: column;
}

.top-bar-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.top-bar-subtitle {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
  letter-spacing: 0.2px;
}

.top-bar-right {
  margin-left: auto;
}

.top-bar-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot-idle {
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
  animation: pulse-glow 2s ease-in-out infinite;
}

.status-dot-online {
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
}

.status-dot-offline {
  background: #f87171;
  box-shadow: 0 0 8px rgba(248, 113, 113, 0.5);
}

.status-text {
  font-weight: 500;
  font-size: 0.7rem;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(74, 222, 128, 0.5); }
  50% { opacity: 0.6; box-shadow: 0 0 4px rgba(74, 222, 128, 0.3); }
}

/* ── Chat Container ──────────────────────────────────────────────────────── */
.chat-container {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px 12px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  scroll-behavior: smooth;
}

.chat-container::-webkit-scrollbar {
  width: 6px;
}

.chat-container::-webkit-scrollbar-track {
  background: transparent;
}

.chat-container::-webkit-scrollbar-thumb {
  background: rgba(64, 41, 112, 0.15);
  border-radius: 6px;
}

.chat-container::-webkit-scrollbar-thumb:hover {
  background: rgba(64, 41, 112, 0.3);
}

/* ═══════════════════════════════════════════════════════════════════════════
   WELCOME CARD — Hero-style glassmorphism
   ═══════════════════════════════════════════════════════════════════════════ */
.welcome {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
  padding: 20px;
}

.welcome-card {
  text-align: center;
  max-width: 560px;
  padding: 52px 48px;
  background: var(--surface);
  backdrop-filter: blur(24px) saturate(1.5);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl), 0 0 0 1px var(--border);
  border: 1px solid rgba(255, 255, 255, 0.5);
  position: relative;
  overflow: hidden;
  animation: welcomeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes welcomeIn {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.welcome-glow {
  position: absolute;
  top: -60%;
  left: -20%;
  width: 140%;
  height: 140%;
  background: radial-gradient(ellipse at center, rgba(248, 218, 8, 0.08) 0%, transparent 60%);
  pointer-events: none;
  animation: glow-pulse 4s ease-in-out infinite;
}

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

.welcome-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  position: relative;
  display: inline-block;
  animation: float 3s ease-in-out infinite;
}

.welcome-icon-ring {
  position: absolute;
  inset: -12px;
  border: 2px solid rgba(64, 41, 112, 0.08);
  border-radius: 50%;
  animation: ring-expand 3s ease-in-out infinite;
}

@keyframes ring-expand {
  0%, 100% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.1); opacity: 0; }
}

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

.welcome-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--primary-light), #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 18px;
  font-weight: 400;
}

.welcome-body {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.7;
  margin-bottom: 28px;
}

.welcome-body strong {
  color: var(--primary);
  font-weight: 600;
}

.welcome-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.welcome-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: rgba(64, 41, 112, 0.04);
  color: var(--primary);
  border: 1px solid rgba(64, 41, 112, 0.12);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-med);
  font-family: inherit;
  position: relative;
  overflow: hidden;
}

.welcome-chip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  opacity: 0;
  transition: opacity var(--transition-med);
}

.welcome-chip:hover {
  color: #ffffff;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.welcome-chip:hover::before {
  opacity: 1;
}

.welcome-chip:active {
  transform: translateY(0) scale(0.97);
}

.chip-icon {
  position: relative;
  z-index: 1;
  font-size: 0.95rem;
}

.welcome-chip:hover .chip-icon {
  animation: chip-bounce 0.4s ease;
}

@keyframes chip-bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CHAT MESSAGES — Premium bubbles
   ═══════════════════════════════════════════════════════════════════════════ */
.message {
  display: flex;
  gap: 14px;
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  animation: messageSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes messageSlideIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.message-avatar {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 2px;
  transition: transform var(--transition-med);
}

.message-avatar:hover {
  transform: scale(1.1) rotate(-5deg);
}

.message-user .message-avatar {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  box-shadow: 0 3px 12px var(--primary-glow);
}

.message-assistant .message-avatar {
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
  box-shadow: 0 3px 12px var(--accent-glow);
}

.message-bubble {
  flex: 1;
  min-width: 0;
}

.message-user .message-bubble {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #ffffff;
  padding: 14px 18px;
  border-radius: 18px 18px 18px 6px;
  font-size: 0.9rem;
  line-height: 1.65;
  box-shadow: 0 3px 12px var(--primary-glow);
  position: relative;
}

.message-user .message-bubble::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  pointer-events: none;
}

.message-assistant .message-bubble {
  background: var(--surface);
  backdrop-filter: blur(16px) saturate(1.3);
  color: var(--text-primary);
  padding: 16px 20px;
  border-radius: 18px 18px 18px 6px;
  font-size: 0.9rem;
  line-height: 1.75;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

/* ── Markdown inside assistant messages ──────────────────────────────────── */
.message-assistant .message-bubble p {
  margin: 0 0 12px 0;
}

.message-assistant .message-bubble p:last-child {
  margin-bottom: 0;
}

.message-assistant .message-bubble h1,
.message-assistant .message-bubble h2,
.message-assistant .message-bubble h3 {
  color: var(--primary);
  margin: 18px 0 8px 0;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.message-assistant .message-bubble h1 { font-size: 1.2rem; }
.message-assistant .message-bubble h2 { font-size: 1.1rem; }
.message-assistant .message-bubble h3 { font-size: 1.0rem; }

.message-assistant .message-bubble ul,
.message-assistant .message-bubble ol {
  padding-left: 20px;
  margin: 8px 0;
}

.message-assistant .message-bubble li {
  margin: 5px 0;
  line-height: 1.6;
}

.message-assistant .message-bubble code {
  background: rgba(64, 41, 112, 0.06);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.84em;
  color: var(--primary);
  font-family: 'SF Mono', 'Fira Code', 'Roboto Mono', monospace;
  border: 1px solid rgba(64, 41, 112, 0.06);
}

.message-assistant .message-bubble pre {
  background: #0f0a1e;
  color: #e2e8f0;
  padding: 16px 18px;
  border-radius: 12px;
  overflow-x: auto;
  margin: 12px 0;
  font-size: 0.82rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.message-assistant .message-bubble pre code {
  background: none;
  color: inherit;
  padding: 0;
  border: none;
}

.message-assistant .message-bubble a {
  color: var(--primary);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(64, 41, 112, 0.25);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--transition-fast);
}

.message-assistant .message-bubble a:hover {
  text-decoration-color: var(--primary);
}

.message-assistant .message-bubble strong {
  font-weight: 700;
  color: var(--primary-dark);
}

.message-assistant .message-bubble blockquote {
  border-left: 3px solid var(--accent);
  padding: 10px 16px;
  margin: 12px 0;
  background: rgba(248, 218, 8, 0.06);
  border-radius: 0 10px 10px 0;
  color: #555;
  font-style: italic;
}

.message-assistant .message-bubble table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 0.85rem;
  border-radius: 8px;
  overflow: hidden;
}

.message-assistant .message-bubble th,
.message-assistant .message-bubble td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
}

.message-assistant .message-bubble th {
  background: rgba(64, 41, 112, 0.04);
  color: var(--primary);
  font-weight: 600;
}

.message-assistant .message-bubble hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

/* ── Tool Banner ─────────────────────────────────────────────────────────── */
.tool-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(64, 41, 112, 0.06), rgba(248, 218, 8, 0.06));
  border: 1px solid rgba(64, 41, 112, 0.1);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 0.82rem;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 8px;
  max-width: 820px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  backdrop-filter: blur(8px);
}

.tool-spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(64, 41, 112, 0.12);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ── Typing Indicator ────────────────────────────────────────────────────── */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 0;
}

.typing-dot {
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  opacity: 0.35;
  animation: typingPulse 1.4s ease-in-out infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes typingPulse {
  0%, 60%, 100% { opacity: 0.35; transform: scale(1); }
  30% { opacity: 1; transform: scale(1.3); }
}

/* ── Streaming Cursor ────────────────────────────────────────────────────── */
.streaming-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--primary);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 0.8s step-end infinite;
}

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

/* ═══════════════════════════════════════════════════════════════════════════
   INPUT AREA — Floating glass input
   ═══════════════════════════════════════════════════════════════════════════ */

.input-area {
  padding: 14px 28px 18px;
  position: relative;
}

.input-area::before {
  content: '';
  position: absolute;
  top: -40px;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to top, rgba(245, 240, 255, 0.95), transparent);
  pointer-events: none;
}

.chat-form {
  max-width: 820px;
  margin: 0 auto;
}

.input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(1.5);
  border: 2px solid rgba(64, 41, 112, 0.1);
  border-radius: 18px;
  padding: 6px 6px 6px 18px;
  transition: all var(--transition-med);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.input-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(64, 41, 112, 0.08), var(--shadow-lg);
  background: var(--surface-hover);
}

.chat-input {
  flex: 1;
  border: none;
  outline: none;
  resize: none;
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-primary);
  background: transparent;
  padding: 10px 0;
  max-height: 150px;
  min-height: 24px;
}

.chat-input::placeholder {
  color: var(--text-muted);
}

.send-btn {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-med);
  box-shadow: 0 2px 8px var(--primary-glow);
  position: relative;
  overflow: hidden;
}

.send-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.send-btn:hover:not(:disabled)::before {
  opacity: 1;
}

.send-btn:hover:not(:disabled) {
  transform: scale(1.08);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.send-btn:active:not(:disabled) {
  transform: scale(0.93);
}

.send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.send-btn.streaming {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.send-btn.streaming:hover {
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

.input-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 10px;
  font-size: 0.68rem;
  color: rgba(64, 41, 112, 0.3);
}

.footer-dot {
  color: rgba(64, 41, 112, 0.15);
}

.input-footer a {
  color: rgba(64, 41, 112, 0.4);
  font-weight: 500;
  transition: color var(--transition-fast);
}

.input-footer a:hover {
  color: var(--primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE SIDEBAR OVERLAY
   ═══════════════════════════════════════════════════════════════════════════ */

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 10, 30, 0.5);
  z-index: 90;
  backdrop-filter: blur(4px);
  transition: opacity var(--transition-slow);
}

.sidebar-overlay.active {
  display: block;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.3);
  }

  .sidebar-toggle {
    display: flex;
  }

  .chat-container {
    padding: 16px 16px 8px;
  }

  .input-area {
    padding: 10px 16px 14px;
  }

  .welcome-card {
    padding: 36px 28px;
  }

  .welcome-title {
    font-size: 1.45rem;
  }

  .message {
    gap: 10px;
  }

  .message-avatar {
    width: 34px;
    height: 34px;
    min-width: 34px;
    font-size: 1rem;
  }

  .message-user .message-bubble,
  .message-assistant .message-bubble {
    padding: 12px 16px;
    font-size: 0.87rem;
  }
}

@media (max-width: 480px) {
  .top-bar {
    padding: 0 16px;
    height: 54px;
    min-height: 54px;
  }

  .top-bar-title {
    font-size: 0.92rem;
  }

  .top-bar-subtitle {
    display: none;
  }

  .welcome-chips {
    gap: 6px;
  }

  .welcome-chip {
    padding: 8px 14px;
    font-size: 0.78rem;
  }

  .input-wrapper {
    border-radius: 14px;
  }
}

/* ── Error message ───────────────────────────────────────────────────────── */
.error-content {
  color: #dc2626;
}

.error-content strong {
  color: #b91c1c !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRODUCT CARDS — Premium interactive components
   ═══════════════════════════════════════════════════════════════════════════ */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.product-card {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(64, 41, 112, 0.08);
  border-radius: 16px;
  overflow: hidden;
  transition: all var(--transition-med);
  display: flex;
  flex-direction: column;
  position: relative;
}

.product-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(64, 41, 112, 0.02), rgba(248, 218, 8, 0.02));
  opacity: 0;
  transition: opacity var(--transition-med);
  pointer-events: none;
  z-index: 1;
}

.product-card:hover {
  border-color: rgba(64, 41, 112, 0.2);
  box-shadow: 0 8px 28px rgba(64, 41, 112, 0.12);
  transform: translateY(-4px);
}

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

/* ── Product Image ───────────────────────────────────────────────────────── */
.product-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, #f0ecf8, #e8e0f4);
  overflow: hidden;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.product-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, #f0ecf8, #e8e0f4);
  color: var(--primary);
}

/* ── Stock Badge ─────────────────────────────────────────────────────────── */
.stock-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  backdrop-filter: blur(8px);
  z-index: 2;
}

.stock-badge.in-stock {
  background: rgba(34, 197, 94, 0.85);
  color: #fff;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.stock-badge.out-of-stock {
  background: rgba(239, 68, 68, 0.85);
  color: #fff;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

/* ── Product Info ─────────────────────────────────────────────────────────── */
.product-info {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  position: relative;
  z-index: 2;
}

.product-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-category {
  font-size: 0.66rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-price {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin: 4px 0 2px;
}

.ships-badge {
  font-size: 0.68rem;
  color: var(--text-secondary);
}

/* ── Product Action Buttons ──────────────────────────────────────────────── */
.product-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.btn-product {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-med);
  text-decoration: none;
  border: none;
  line-height: 1.3;
  flex: 1;
  min-width: 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.btn-product-details {
  background: rgba(64, 41, 112, 0.04);
  color: var(--primary);
  border: 1px solid rgba(64, 41, 112, 0.12);
}

.btn-product-details:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-product-view {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #ffffff;
  box-shadow: 0 2px 6px var(--primary-glow);
}

.btn-product-view:hover {
  text-decoration: none;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px var(--primary-glow);
}

/* ── Product card responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
  }

  .product-info {
    padding: 10px 12px 12px;
  }

  .product-name {
    font-size: 0.78rem;
  }

  .product-price {
    font-size: 0.9rem;
  }

  .btn-product {
    padding: 6px 10px;
    font-size: 0.68rem;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DEBUG JSON — Collapsible details
   ═══════════════════════════════════════════════════════════════════════════ */

.debug-json {
  margin-top: 14px;
  font-size: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: all var(--transition-med);
}

.debug-json summary {
  cursor: pointer;
  font-weight: 600;
  padding: 8px 14px;
  background: rgba(64, 41, 112, 0.03);
  color: var(--text-muted);
  user-select: none;
  transition: all var(--transition-fast);
}

.debug-json summary:hover {
  background: rgba(64, 41, 112, 0.06);
  color: var(--text-secondary);
}

.debug-json pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
  background: #0f0a1e;
  color: #a1a1aa;
  padding: 14px;
  font-family: 'SF Mono', 'Fira Code', 'Roboto Mono', monospace;
  font-size: 0.72rem;
  max-height: 300px;
  overflow-y: auto;
  border-top: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SELECTION & SCROLLBAR — Branded
   ═══════════════════════════════════════════════════════════════════════════ */

::selection {
  background: rgba(64, 41, 112, 0.2);
  color: var(--text-primary);
}

::-moz-selection {
  background: rgba(64, 41, 112, 0.2);
  color: var(--text-primary);
}

/* Spin animation for loading icons */
.spin-icon {
  animation: spin 0.8s linear infinite;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRODUCT CARDS — Generative UI rendered inline in chat
   ═══════════════════════════════════════════════════════════════════════════ */

.product-cards-container {
  margin-top: 16px;
  width: 100%;
  overflow: hidden;
}

.product-cards-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.product-cards-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Horizontal scrolling carousel ─────────────────────────────────────── */
.product-carousel {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(64, 41, 112, 0.15) transparent;
}

.product-carousel::-webkit-scrollbar {
  height: 4px;
}

.product-carousel::-webkit-scrollbar-track {
  background: transparent;
}

.product-carousel::-webkit-scrollbar-thumb {
  background: rgba(64, 41, 112, 0.2);
  border-radius: 4px;
}

/* ── Individual Product Card ────────────────────────────────────────────── */
.product-card {
  flex: 0 0 220px;
  min-width: 220px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid rgba(64, 41, 112, 0.09);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  scroll-snap-align: start;
  transition: transform var(--transition-med), box-shadow var(--transition-med);
  display: flex;
  flex-direction: column;
  animation: cardSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.product-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(64, 41, 112, 0.13);
}

@keyframes cardSlideIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* stagger children */
.product-card:nth-child(1) { animation-delay: 0.05s; }
.product-card:nth-child(2) { animation-delay: 0.10s; }
.product-card:nth-child(3) { animation-delay: 0.15s; }
.product-card:nth-child(4) { animation-delay: 0.20s; }
.product-card:nth-child(5) { animation-delay: 0.25s; }

/* ── Product Image ──────────────────────────────────────────────────────── */
.product-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #f0ebf9, #fef9e7);
  overflow: hidden;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow);
}

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

.product-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, rgba(64,41,112,0.04), rgba(248,218,8,0.06));
}

/* External link overlay on image */
.product-image-link {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--primary);
  text-decoration: none;
  opacity: 0;
  transform: scale(0.85);
  transition: all var(--transition-med);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  z-index: 2;
}

.product-card:hover .product-image-link {
  opacity: 1;
  transform: scale(1);
}

/* ── Stock Badge ────────────────────────────────────────────────────────── */
.stock-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  backdrop-filter: blur(8px);
  z-index: 2;
}

.stock-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.in-stock {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.in-stock .stock-dot {
  background: #22c55e;
  box-shadow: 0 0 5px rgba(34, 197, 94, 0.6);
  animation: pulse-glow 2s ease-in-out infinite;
}

.out-of-stock {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.out-of-stock .stock-dot {
  background: #ef4444;
}

/* ── Product Info ───────────────────────────────────────────────────────── */
.product-info {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.product-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.product-category {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  background: rgba(64, 41, 112, 0.05);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  display: inline-block;
  width: fit-content;
}

.product-price-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.product-price {
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.ships-badge {
  font-size: 0.6rem;
  font-weight: 500;
  color: #0891b2;
  background: rgba(8, 145, 178, 0.08);
  border: 1px solid rgba(8, 145, 178, 0.18);
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

/* ── Product Action Buttons ─────────────────────────────────────────────── */
.product-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 6px;
}

.pcard-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 10px;
  border: none;
  border-radius: 9px;
  font-family: inherit;
  font-size: 0.71rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-med);
  white-space: nowrap;
  line-height: 1;
  position: relative;
  overflow: hidden;
}

.pcard-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.18), transparent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.pcard-btn:hover::before { opacity: 1; }

.pcard-btn:active {
  transform: scale(0.95);
}

/* Primary: Add to Cart */
.pcard-btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #ffffff;
  box-shadow: 0 3px 10px var(--primary-glow);
  grid-column: 1 / -1; /* full width */
}

.pcard-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px var(--primary-glow);
}

/* Secondary: Check Delivery */
.pcard-btn-secondary {
  background: rgba(248, 218, 8, 0.12);
  color: #78580c;
  border: 1px solid rgba(248, 218, 8, 0.35);
}

.pcard-btn-secondary:hover {
  background: rgba(248, 218, 8, 0.22);
  border-color: rgba(248, 218, 8, 0.55);
  transform: translateY(-1px);
}

/* Ghost: About, Share */
.pcard-btn-ghost {
  background: rgba(64, 41, 112, 0.04);
  color: var(--text-secondary);
  border: 1px solid rgba(64, 41, 112, 0.1);
}

.pcard-btn-ghost:hover {
  background: rgba(64, 41, 112, 0.09);
  color: var(--primary);
  border-color: rgba(64, 41, 112, 0.2);
  transform: translateY(-1px);
}

.pcard-btn-share:hover {
  background: rgba(8, 145, 178, 0.08) !important;
  color: #0891b2 !important;
  border-color: rgba(8, 145, 178, 0.2) !important;
}

/* ── Toast Notification ─────────────────────────────────────────────────── */
.kavi-toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(15, 10, 30, 0.92);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.08);
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  pointer-events: none;
}

.kavi-toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

