
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Header */
.header {
  background: white;
  padding: 40px 20px;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 40px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header h1 {
  font-size: 2.5em;
  color: #333;
  margin-bottom: 10px;
}

.tagline {
  color: #666;
  font-size: 1.1em;
}

/* Main Content */
.main-content {
  background: white;
  padding: 40px;
  border-radius: 12px;
  margin-bottom: 40px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.products-section h2 {
  font-size: 2em;
  margin-bottom: 30px;
  color: #333;
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.product-card {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid #e9ecef;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.product-image {
  font-size: 3em;
  margin-bottom: 15px;
}

.product-card h3 {
  font-size: 1.3em;
  margin-bottom: 10px;
  color: #333;
}

.price {
  font-size: 1.8em;
  font-weight: bold;
  color: #667eea;
  margin-bottom: 10px;
}

.description {
  color: #666;
  font-size: 0.95em;
  margin-bottom: 15px;
  min-height: 40px;
}

.btn-add {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1em;
  font-weight: 600;
  transition: opacity 0.3s;
  width: 100%;
}

.btn-add:hover {
  opacity: 0.9;
}

/* Info Section */
.info-section {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 2px solid #e9ecef;
}

.info-box {
  background: #f0f4ff;
  padding: 20px;
  border-radius: 12px;
  border-left: 4px solid #667eea;
}

.info-box h3 {
  color: #333;
  margin-bottom: 15px;
}

.info-box ul {
  list-style: none;
}

.info-box li {
  color: #555;
  padding: 8px 0;
  font-size: 1em;
}

/* Chat Widget */
.chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  font-family: inherit;
}

.chat-toggle {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  font-size: 1.5em;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s;
}

.chat-toggle:hover {
  transform: scale(1.1);
}

.chat-toggle.active {
  display: none;
}

.chat-panel {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 360px;
  height: 500px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  display: none;
}

.chat-panel.active {
  display: flex;
}

.chat-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 15px;
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header h3 {
  margin: 0;
  font-size: 1.1em;
}

.chat-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.5em;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
}

.message {
  margin-bottom: 12px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.message.user {
  justify-content: flex-end;
}

.message-content {
  max-width: 80%;
  padding: 10px 12px;
  border-radius: 12px;
  word-wrap: break-word;
  font-size: 0.95em;
}

.message.assistant .message-content {
  background: #f0f0f0;
  color: #333;
  border-radius: 12px 12px 12px 0;
}

.message.user .message-content {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px 12px 0 12px;
}

.chat-input-area {
  padding: 12px;
  border-top: 1px solid #e9ecef;
  display: flex;
  gap: 8px;
}

#chatInput {
  flex: 1;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.95em;
  font-family: inherit;
}

#chatInput:focus {
  outline: none;
  border-color: #667eea;
}

#chatSend {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: opacity 0.3s;
}

#chatSend:hover {
  opacity: 0.9;
}

/* Security layer badges */
.layers {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.layer {
  font-size: 0.8em;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f3f5;
  color: #868e96;
  border: 1px solid #dee2e6;
}

.layer.on {
  background: #e6fcf5;
  color: #087f5b;
  border-color: #96f2d7;
}

/* Tool call chips and blocked messages */
.tool-chip {
  display: inline-block;
  font-size: 0.75em;
  margin: 0 0 6px 0;
  padding: 2px 8px;
  border-radius: 6px;
  background: #fff4e6;
  color: #d9480f;
  border: 1px solid #ffd8a8;
}

.message.blocked .message-content {
  background: #fff5f5;
  color: #c92a2a;
  border: 1px solid #ffc9c9;
}

.message-meta {
  display: block;
  font-size: 0.75em;
  margin-top: 6px;
  opacity: 0.8;
}

/* Footer */
.footer {
  background: rgba(255, 255, 255, 0.95);
  padding: 20px;
  text-align: center;
  border-radius: 12px;
  color: #666;
}

.footer-note {
  font-size: 0.9em;
  margin-top: 10px;
  color: #999;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .header h1 {
    font-size: 1.8em;
  }

  .main-content {
    padding: 20px;
  }

  .products-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .chat-panel {
    width: 100%;
    height: 400px;
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    border-radius: 12px 12px 0 0;
  }

  .chat-toggle {
    width: 50px;
    height: 50px;
    font-size: 1.2em;
  }
}
