/* ================================================= */
/* 1. VARIABLES Y ESTILOS BASE */
/* ================================================= */

:root {
    /* Paleta de Colores Fresca y Natural */
    --color-primary-green: #4CAF50;    /* Verde Principal (Naturaleza) */
    --color-secondary-green: #8BC34A;   /* Verde Secundario (Fresco) */
    --color-terracotta: #D78D63;       /* Terracota (Tierra/Macetas) */
    --color-white: #FFFFFF;
    --color-city-light: #F9F9F9;      /* Gris Muy Claro/Fondo de Productos */
    --color-dark-text: #333333;        /* Texto Principal */
    --color-grey-border: #E0E0E0;      /* Borde sutil */
    --font-stack: 'Poppins', sans-serif;
}

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

body {
    font-family: var(--font-stack);
    line-height: 1.6;
    color: var(--color-dark-text);
    background-color: var(--color-white);
    /* Desplazamiento suave para los enlaces internos */
    scroll-behavior: smooth;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 0; /* Aumento de padding para más espacio */
}

.section {
    padding: 80px 0; /* Más espacio entre secciones */
    text-align: center;
}

h2 {
    font-size: 2.8em;
    color: var(--color-primary-green);
    margin-bottom: 30px;
    font-weight: 800;
    text-transform: uppercase;
}

h2 .fas { 
    margin-right: 15px;
    color: var(--color-terracotta); 
}

/* ================================================= */
/* 2. HERO Y CABECERA */
/* ================================================= */

.hero {
    background: linear-gradient(rgba(76, 175, 80, 0.75), rgba(139, 195, 74, 0.75)), 
                url('https://www.decoracion2.com/wp-content/uploads/2021/06/vivero-urbano-en-terraza.jpg'); 
    background-size: cover;
    background-position: center;
    color: var(--color-white);
    padding: 120px 0;
    text-align: center;
}

.logo {
    font-size: 5em;
    font-weight: 900;
    margin-bottom: 5px;
    letter-spacing: 3px;
    text-shadow: 4px 4px 0 rgba(0,0,0,0.15); 
}

.slogan {
    font-size: 1.7em;
    margin-bottom: 50px;
    font-weight: 600;
}

.cta-button {
    display: inline-block;
    background-color: var(--color-terracotta);
    color: var(--color-white);
    padding: 18px 35px;
    text-decoration: none;
    border-radius: 50px; /* Botón más redondeado */
    font-weight: 700;
    text-transform: uppercase;
    transition: background-color 0.3s, transform 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
    background-color: #C07954; 
    transform: translateY(-2px);
}

.cta-button .fas { 
    margin-right: 8px;
}

/* ================================================= */
/* 3. SECCIONES GENERALES */
/* ================================================= */

#nosotros p {
    max-width: 850px;
    margin: 20px auto;
    font-size: 1.2em;
    font-weight: 400;
    color: #555;
}

#nosotros .fas { 
    color: var(--color-secondary-green);
    margin: 0 8px;
    font-size: 1.1em;
}

/* ================================================= */
/* 4. PRODUCTOS */
/* ================================================= */

.products-section {
    background-color: var(--color-city-light);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.product-card {
    background-color: var(--color-white);
    padding: 0; /* Padding movido dentro del card */
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
    text-align: left;
}

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

.product-image {
    width: 100%; 
    height: 220px; /* Aumento de altura */
    object-fit: cover; 
    display: block;
}

.product-card-content {
    padding: 20px;
}

.product-card h3 {
    color: var(--color-primary-green);
    margin-top: 0;
    font-weight: 700;
    font-size: 1.5em;
}

.product-card p {
    margin: 10px 0 20px 0;
    color: #666;
}

.btn-secondary {
    display: inline-block;
    color: var(--color-terracotta);
    border: 2px solid var(--color-terracotta);
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: background-color 0.3s, color 0.3s;
}

.btn-secondary:hover {
    background-color: var(--color-terracotta);
    color: var(--color-white);
}

.btn-secondary .fas { 
    margin-right: 5px;
}

/* ================================================= */
/* 5. GALERÍA */
/* ================================================= */

.gallery-section {
    background-color: var(--color-white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.gallery-item {
    background-color: var(--color-city-light);
    border-radius: 12px;
    overflow: hidden; 
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s;
}

.gallery-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block; 
}

.gallery-item p {
    padding: 15px;
    color: var(--color-dark-text);
    font-size: 1em;
    font-weight: 600;
    background-color: var(--color-white);
    margin: 0;
}

/* ================================================= */
/* 6. FOOTER */
/* ================================================= */

footer {
    background-color: var(--color-dark-text);
    color: var(--color-city-light);
    padding: 40px 0 20px;
    font-size: 0.95em;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.footer-info {
    text-align: left;
}

.footer-info h3 {
    font-size: 1.5em;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--color-secondary-green);
}

.footer-info p {
    margin: 5px 0;
}

.footer-info .fas { 
    margin-right: 8px;
    color: var(--color-terracotta);
}

.social-links a {
    color: var(--color-city-light);
    text-decoration: none;
    margin-left: 20px;
    transition: color 0.3s;
    font-weight: 600;
}

.social-links a:hover {
    color: var(--color-secondary-green);
}

.social-links .fab { 
    margin-right: 5px;
}

.copyright {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 10px;
    color: #A0A0A0;
}


/* ================================================= */
/* 7. CHATBOT SIMULADO ESTILOS (Asegurando la visibilidad) */
/* ================================================= */

#chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000; 
}

/* Botón flotante */
#chatbot-toggle {
    background-color: var(--color-primary-green);
    color: var(--color-white);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 1.5em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

#chatbot-toggle:hover {
    background-color: var(--color-secondary-green);
    transform: scale(1.05);
}

/* Ventana de Chat */
#chat-window {
    width: 300px;
    height: 400px;
    background-color: var(--color-white);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: absolute;
    bottom: 0;
    right: 0;
    transition: all 0.3s ease-in-out;
}

.chat-hidden {
    opacity: 0;
    transform: translateY(10px);
    visibility: hidden;
}

.chat-header {
    background-color: var(--color-primary-green);
    color: var(--color-white);
    padding: 15px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#chat-close {
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 1.1em;
    cursor: pointer;
    opacity: 0.8;
}

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

.chat-body {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: var(--color-city-light); 
    display: flex;
    flex-direction: column;
}

.chat-footer {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ddd;
    background-color: var(--color-white);
}

.chat-footer input {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px 0 0 5px;
    font-size: 0.9em;
    outline: none;
}

.chat-footer button {
    background-color: var(--color-terracotta);
    color: var(--color-white);
    border: none;
    padding: 8px 12px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.chat-footer button:hover {
    background-color: #C07954; 
}

/* Estilo de los mensajes */
.message {
    padding: 8px 12px;
    margin-bottom: 10px;
    border-radius: 15px;
    max-width: 80%;
    font-size: 0.9em;
    line-height: 1.4;
}

.message.bot {
    background-color: var(--color-secondary-green);
    color: var(--color-white);
    align-self: flex-start;
    text-align: left;
    margin-right: auto;
}

.message.user {
    background-color: #DAE8F3; 
    color: var(--color-dark-text);
    align-self: flex-end;
    text-align: right;
    margin-left: auto; 
}


/* ================================================= */
/* 8. RESPONSIVE DESIGN */
/* ================================================= */

@media (max-width: 768px) {
    .logo {
        font-size: 3.5em;
    }
    h2 {
        font-size: 2em;
    }
    .slogan {
        font-size: 1.4em;
    }
    .hero {
        padding: 80px 0;
    }
    .section {
        padding: 50px 0;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .footer-info {
        text-align: center;
        margin-bottom: 15px;
    }
    .social-links {
        display: flex;
        flex-direction: row;
        gap: 10px;
    }
    .social-links a {
        margin: 0;
    }
}