/* RESET & BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: #2d3748;
    background-color: #f8fafc;
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* NAVBAR */
.navbar {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #166534;
}

/* BUTTONS */
.btn-primary {
    background-color: #166534;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.2s, transform 0.1s;
}

.btn-primary:hover {
    background-color: #14532d;
    transform: translateY(-1px);
}

.btn-primary-sm {
    background-color: #166534;
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

.btn-secondary {
    background-color: #ffffff;
    color: #166534;
    border: 2px solid #166534;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background-color: #f0fdf4;
}

.btn-full {
    width: 100%;
}

/* HERO */
.hero {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f0fdf4 0%, #e2e8f0 100%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.badge {
    background-color: #dcfce7;
    color: #166534;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 1rem;
}

.hero-content h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #0f172a;
}

.hero-content p {
    font-size: 1.1rem;
    color: #475569;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.stat-card {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}

.stat-card h3 {
    font-size: 1.8rem;
    color: #166534;
}

/* SECTIONS */
.section {
    padding: 4rem 0;
}

.section-alt {
    background-color: #f1f5f9;
}

.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    color: #64748b;
    margin-bottom: 3rem;
}

/* PRODUCT GRID */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

.sku {
    font-size: 0.75rem;
    font-weight: 700;
    color: #166534;
    background: #dcfce7;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.product-card h3 {
    margin: 0.75rem 0 0.5rem 0;
    font-size: 1.2rem;
}

.product-card p {
    font-size: 0.9rem;
    color: #64748b;
}

/* FORM */
.form-container {
    max-width: 650px;
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #334155;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #166534;
    box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.1);
}

/* CHAT WIDGET */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.chat-trigger {
    background: #166534;
    color: #ffffff;
    border: none;
    padding: 0.85rem 1.25rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s, background-color 0.2s;
}

.chat-trigger:hover {
    transform: scale(1.04);
    background-color: #14532d;
}

.chat-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 360px;
    height: 520px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: opacity 0.2s transform 0.2s;
}

.chat-window.hidden {
    display: none;
}

.chat-header {
    background: #166534;
    color: #ffffff;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-avatar {
    font-size: 1.5rem;
    background: rgba(255,255,255,0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-info h4 {
    font-size: 1rem;
    margin: 0;
}

.status-online {
    font-size: 0.75rem;
    color: #86efac;
}

.chat-close {
    margin-left: auto;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.8;
}

.chat-close:hover { opacity: 1; }

/* CHIPS DE SUGERENCIA */
.chat-suggestions {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
    overflow-x: auto;
    white-space: nowrap;
}

.chat-suggestions::-webkit-scrollbar {
    height: 4px;
}

.chat-suggestions::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.chip {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 0.35rem 0.75rem;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.chip:hover {
    border-color: #166534;
    color: #166534;
    background: #f0fdf4;
}

/* CHAT BODY & MESSAGES */
.chat-body {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: #fafafa;
}

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

.chat-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.message {
    max-width: 85%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
    word-break: break-word;
}

.bot-message {
    background: #ffffff;
    color: #1e293b;
    align-self: flex-start;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 2px;
}

.user-message {
    background: #166534;
    color: #ffffff;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

/* ANIMACIÓN ESCRIBIENDO */
.typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background-color: #64748b;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* CHAT FOOTER */
.chat-footer {
    display: flex;
    padding: 0.75rem;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    gap: 0.5rem;
}

.chat-footer input {
    flex: 1;
    padding: 0.6rem 0.8rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
}

.chat-footer input:focus {
    border-color: #166534;
}

.chat-footer button {
    background: #166534;
    color: white;
    border: none;
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

.chat-footer button:hover {
    background: #14532d;
}

/* TOAST NOTIFICATIONS */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: #ffffff;
    color: #1e293b;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-left: 5px solid #166534;
    min-width: 280px;
    font-size: 0.9rem;
    animation: slideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.error {
    border-left-color: #ef4444;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}