/* ============================================
   BRUQUE CHATBOT STYLES
   ============================================ */

   .bruque-chatbot * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  .bruque-chatbot {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: fixed;
    bottom: 20px;
    right: 60px;
    z-index: 999999;
  }
  
  .bruque-bubble {
    position: relative;
  }
  
  .bruque-bubble-message {
    position: absolute;
    bottom: 85px;
    right: 0;
    background: #FFFFFF;
    color: #4A5A4F;
    padding: 12px 16px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-size: 13px;
    font-weight: 500;
    max-width: 280px;
    border: 2px solid #D4E9D7;
    line-height: 1.4;
    animation: fadeIn 0.3s ease;
  }
  
  .bruque-bubble-message::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #FFFFFF;
  }
  
  .bruque-bubble-message::before {
    content: '';
    position: absolute;
    bottom: -11px;
    right: 19px;
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 9px solid #D4E9D7;
  }
  
  .bruque-open-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #87B68F;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 38px;
    box-shadow: 0 6px 20px rgba(135,182,143,0.3);
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .bruque-open-btn:hover {
    transform: scale(1.05);
  }
  
  .bruque-chat-window {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 400px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 40px);
    background: #FFFFFF;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    z-index: 9999;
    animation: slideUp 0.3s ease;
  }
  
  @keyframes slideUp {
    from {
      transform: translateY(20px);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
  
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  
  .bruque-header {
    background: linear-gradient(135deg, #87B68F, #9DC4A3);
    color: white;
    padding: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 24px 24px 0 0;
  }
  
  .bruque-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  
  .bruque-header-emoji {
    font-size: 28px;
  }
  
  .bruque-header-title {
    font-weight: 600;
    font-size: 17px;
  }
  
  .bruque-header-status {
    font-size: 12px;
    opacity: 0.9;
  }
  
  .bruque-close-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
  }
  
  .bruque-close-btn:hover {
    background: rgba(255,255,255,0.3);
  }
  
  .bruque-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #FAF8F5;
    scroll-behavior: smooth;
  }
  
  .bruque-messages::-webkit-scrollbar {
    width: 6px;
  }
  
  .bruque-messages::-webkit-scrollbar-track {
    background: transparent;
  }
  
  .bruque-messages::-webkit-scrollbar-thumb {
    background: #D4E9D7;
    border-radius: 3px;
  }
  
  .bruque-message {
    margin-bottom: 12px;
    display: flex;
    animation: fadeIn 0.3s ease;
  }
  
  .bruque-message.user {
    justify-content: flex-end;
  }
  
  .bruque-message-content {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 20px;
    font-size: 14px;
    line-height: 1.5;
  }
  
  .bruque-message.user .bruque-message-content {
    background: #87B68F;
    color: white;
    border-radius: 20px 20px 4px 20px;
  }
  
  .bruque-message.bot .bruque-message-content {
    background: white;
    color: #4A5A4F;
    border-radius: 20px 20px 20px 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  }
  
  .bruque-welcome-buttons {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .bruque-btn {
    padding: 12px 16px;
    border-radius: 12px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: left;
  }
  
  .bruque-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  }
  
  .bruque-btn-ai {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 10px rgba(102,126,234,0.3);
  }
  
  .bruque-btn-categories {
    background: #87B68F;
    color: white;
  }
  
  .bruque-btn-contact {
    background: #25D366;
    color: white;
  }
  
  .bruque-categories-grid {
    background: #F5F3F0;
    border-radius: 12px;
    padding: 12px;
    margin-top: 8px;
    max-height: 300px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  
  .bruque-category-card {
    color: #4A5A4F;
    text-decoration: none;
    font-size: 11px;
    padding: 10px 8px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 600;
    border: 2px solid rgba(255,255,255,0.8);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s;
    line-height: 1.2;
  }
  
  .bruque-category-card:hover {
    transform: scale(1.05);
  }
  
  .bruque-category-emoji {
    font-size: 24px;
    margin-bottom: 4px;
  }
  
  .bruque-contact-card {
    margin-top: 12px;
    background: #F5F3F0;
    border-radius: 12px;
    padding: 12px;
    border: 2px solid #25D366;
  }
  
  .bruque-contact-title {
    font-weight: 600;
    color: #87B68F;
    margin-bottom: 12px;
    font-size: 13px;
  }
  
  .bruque-contact-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .bruque-contact-link {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    transition: transform 0.2s;
  }
  
  .bruque-contact-link:hover {
    transform: translateX(4px);
  }
  
  .bruque-contact-link.phone {
    background: #87B68F;
  }
  
  .bruque-contact-link.whatsapp {
    background: #25D366;
  }
  
  .bruque-contact-link.web {
    background: #C9A98A;
  }
  
  .bruque-contact-icon {
    font-size: 18px;
  }
  
  .bruque-contact-text {
    flex: 1;
  }
  
  .bruque-contact-label {
    font-size: 11px;
    opacity: 0.9;
  }
  
  .bruque-contact-number {
    font-size: 13px;
    font-weight: 700;
  }
  
  .bruque-product-card {
    background: #F5F3F0;
    border: 2px solid #D4E9D7;
    border-radius: 14px;
    padding: 12px;
    margin-top: 10px;
    transition: transform 0.2s;
  }
  
  .bruque-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  }
  
  .bruque-product-name {
    font-weight: 600;
    color: #4A5A4F;
    margin-bottom: 12px;
    font-size: 13px;
  }
  
  .bruque-product-link {
    background: #87B68F;
    color: white;
    padding: 8px 16px;
    border-radius: 16px;
    font-size: 12px;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
  }
  
  .bruque-product-link:hover {
    background: #6fa077;
  }
  
  .bruque-ai-panel {
    background: #F5F3FF;
    border-radius: 12px;
    padding: 14px;
    margin-top: 8px;
    border: 2px solid #667eea;
  }
  
  .bruque-ai-title {
    font-weight: 600;
    color: #667eea;
    margin-bottom: 10px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  
  .bruque-ai-questions {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  
  .bruque-ai-question {
    background: white;
    color: #4A5A4F;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #667eea;
    font-size: 11px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
    font-family: inherit;
  }
  
  .bruque-ai-question:hover {
    background: #F5F3FF;
    transform: translateX(4px);
  }
  
  .bruque-ai-hint {
    margin-top: 10px;
    font-size: 10px;
    color: #667eea;
    font-style: italic;
    text-align: center;
  }
  
  .bruque-footer {
    padding: 8px 12px;
    border-top: 2px solid #D4E9D7;
    display: flex;
    gap: 6px;
    align-items: center;
    background: white;
  }
  
  .bruque-footer-btn {
    background: #C9A98A;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: background 0.2s;
  }
  
  .bruque-footer-btn:hover {
    background: #b89878;
  }
  
  .bruque-footer-phone {
    background: white;
    border: 1px solid #D4E9D7;
    color: #87B68F;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 11px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
  }
  
  .bruque-footer-phone:hover {
    background: #D4E9D7;
  }
  
  .bruque-ai-indicator {
    font-size: 9px;
    color: #667eea;
    font-weight: 600;
    margin-left: auto;
  }
  
  .bruque-input-area {
    padding: 12px;
    border-top: 2px solid #D4E9D7;
    display: flex;
    gap: 8px;
    background: white;
    border-radius: 0 0 24px 24px;
  }
  
  .bruque-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #D4E9D7;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
  }
  
  .bruque-input:focus {
    border-color: #87B68F;
  }
  
  .bruque-send-btn {
    background: #87B68F;
    color: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    flex-shrink: 0;
  }
  
  .bruque-send-btn:hover {
    background: #6fa077;
    transform: scale(1.05);
  }
  
  .hidden {
    display: none !important;
  }
  
  @media (max-width: 768px) {
    .bruque-chat-window {
      width: calc(100vw - 20px);
      height: calc(100vh - 20px);
      bottom: 10px;
      right: 10px;
      border-radius: 16px;
    }
   
    .bruque-chatbot {
      bottom: 10px;
      right: 10px;
    }
   
    .bruque-open-btn {
      width: 60px;
      height: 60px;
      font-size: 32px;
    }
  }