:root { 
  --primary: #D4A017; 
  --accent: #ffffff; 
  --text: #333; 
  --bg: #fff; 
  --border: #e0e0e0; 
  --shadow: 0 4px 20px rgba(0,0,0,0.1); 
}
@media (prefers-color-scheme: dark) {
  :root { --text: #eee; --bg: #1a1a1a; --border: #333; --shadow: 0 4px 20px rgba(0,0,0,0.3); }
}

#mobochat-fab { 
  position: fixed; bottom: 20px; right: 20px; z-index: 9999; 
  background: var(--primary); color: var(--text); border: none; cursor: pointer; 
  width: 60px; height: 60px; border-radius: 50%; box-shadow: var(--shadow); 
  display: flex; align-items: center; justify-content: center; transition: transform 0.2s;
}
#mobochat-fab:hover { transform: scale(1.05); }
#mobochat-fab.hidden { display: none; }
#mobochat-fab svg { fill: var(--text); width: 24px; height: 24px; }

#mobochat-panel { 
  position: fixed; bottom: 100px; right: 20px; z-index: 9999; width: 380px; max-width: 90vw; max-height: 70vh; 
  background: var(--bg); color: var(--text); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; 
  display: flex; flex-direction: column; transform: translateY(100%); transition: transform 0.3s ease;
}
#mobochat-panel.slide-in { transform: translateY(0); }
#mobochat-panel.slide-out { transform: translateY(100%); }
.mobochat-header { 
  display: flex; align-items: center; justify-content: space-between; padding: 16px; 
  background: linear-gradient(135deg, var(--primary), #f4d03f); border-bottom: 1px solid var(--border); 
}
.mobochat-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text); }
.mobochat-dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; }
#mobochat-close { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text); opacity: 0.7; }
#mobochat-close:hover { opacity: 1; }

.mobochat-messages { flex: 1; padding: 16px; overflow-y: auto; background: #fafafa; }
.mobochat-msg { 
  margin: 12px 0; padding: 12px 16px; border-radius: 18px; max-width: 80%; line-height: 1.5; 
  animation: fadeIn 0.3s ease; box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.mobochat-msg.user { background: var(--primary); color: var(--accent); margin-left: auto; border-bottom-right-radius: 4px; }
.mobochat-msg.assistant { background: var(--accent); color: var(--text); border: 1px solid var(--border); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.mobochat-typing { font-size: 0.9em; color: #888; padding: 8px 16px; }
.typing-dots::after { content: '...'; animation: dots 1.5s infinite; }
@keyframes dots { 0%, 20% { content: '.'; } 40% { content: '..'; } 60%, 100% { content: '...'; } }

.mobochat-input-group { display: flex; padding: 12px; border-top: 1px solid var(--border); background: var(--bg); gap: 8px; }
#mobochat-text { flex: 1; border: 1px solid var(--border); border-radius: 20px; padding: 12px 16px; outline: none; }
#mobochat-text:focus { border-color: var(--primary); }
#mobochat-send { background: var(--primary); color: var(--accent); border: none; border-radius: 20px; padding: 12px 16px; cursor: pointer; font-weight: 600; min-width: 80px; transition: background 0.2s; }
#mobochat-send:hover { background: #b8940f; }

.mobochat-quick-replies { display: flex; padding: 8px 16px; gap: 8px; overflow-x: auto; background: var(--bg); border-top: 1px solid var(--border); }
.quick-btn { background: #f0f0f0; color: var(--text); border: none; border-radius: 16px; padding: 6px 12px; font-size: 0.85em; cursor: pointer; white-space: nowrap; transition: background 0.2s; }
.quick-btn:hover { background: var(--primary); color: var(--accent); }

.mobochat-gdpr { font-size: 0.75em; color: #888; padding: 8px 16px; text-align: center; }
.mobochat-toast { position: absolute; top: -50px; left: 50%; transform: translateX(-50%); padding: 8px 16px; border-radius: 20px; color: white; font-size: 0.85em; transition: top 0.3s; z-index: 1; }
.mobochat-toast.error { background: #e74c3c; }
.mobochat-toast.success { background: #27ae60; }

/* Product Cards & Carousel */
.mobochat-product-carousel { margin: 16px 0; }
.mobochat-product-carousel h4 { margin: 0 0 12px; font-size: 1em; color: var(--primary); }
.carousel-track { display: flex; gap: 12px; transition: transform 0.3s ease; overflow: hidden; }
.mobochat-product-card { 
  flex: 0 0 100%; background: var(--bg); border-radius: 12px; padding: 12px; box-shadow: var(--shadow); text-align: center; 
  transition: transform 0.2s; min-width: 200px;
}
.mobochat-product-card:hover { transform: translateY(-2px); }
.mobochat-product-card img { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; margin-bottom: 8px; }
.mobochat-product-card h5 { font-size: 1em; margin: 8px 0; font-weight: 600; }
.price { font-size: 1.1em; font-weight: bold; color: var(--primary); margin: 4px 0; }
.rating { color: #f39c12; font-size: 0.9em; margin: 4px 0; }
.mobochat-product-card small { color: #888; font-size: 0.8em; }
.btn.primary { 
  display: inline-flex; align-items: center; gap: 4px; background: var(--primary); color: var(--accent); 
  text-decoration: none; padding: 8px 12px; border-radius: 20px; font-weight: 600; margin-top: 8px; transition: 0.2s;
}
.btn.primary:hover { background: #b8940f; transform: scale(1.05); }

.carousel-prev, .carousel-next { 
  position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.5); color: white; 
  border: none; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 18px;
}
.carousel-prev { left: -10px; }
.carousel-next { right: -10px; }
.carousel-dots { display: flex; justify-content: center; gap: 4px; margin-top: 8px; }
.carousel-dots .dot { width: 8px; height: 8px; border-radius: 50%; background: #ddd; cursor: pointer; transition: background 0.2s; }
.carousel-dots .dot.active { background: var(--primary); }

@media (max-width: 480px) { 
  #mobochat-panel { bottom: 80px; right: 10px; left: 10px; width: auto; max-height: 80vh; }
  .mobochat-product-card { flex: 0 0 80%; }
  .carousel-prev, .carousel-next { display: none; } /* Hide arrows in mobile */
}