/* RESET BÁSICO */
#eco-app-container {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 600px;
    display: flex;
    flex-direction: column;
}

/* VISTA UBICACIÓN - MÁS ESPACIOSO */
#view-ubicacion {
    position: relative;
    width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8eef5 100%);
    
    /* CAMBIO 1: AUMENTAR EL GAP (ESPACIO ENTRE TEXTO Y FORMULARIO) */
    gap: 6rem; /* Antes era menos, esto los separa más */
    
    padding: 2rem;
    margin: 0;
}

/* FONDO GRID */
#view-ubicacion::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Grid sutil */
    background-image: 
        linear-gradient(0deg, transparent 24%, rgba(150, 150, 150, 0.1) 25%, rgba(150, 150, 150, 0.1) 26%, transparent 27%, transparent 74%, rgba(150, 150, 150, 0.1) 75%, rgba(150, 150, 150, 0.1) 76%, transparent 77%, transparent),
        linear-gradient(90deg, transparent 24%, rgba(150, 150, 150, 0.1) 25%, rgba(150, 150, 150, 0.1) 26%, transparent 27%, transparent 74%, rgba(150, 150, 150, 0.1) 75%, rgba(150, 150, 150, 0.1) 76%, transparent 77%, transparent);
    background-size: 40px 40px; 
    z-index: 0;
}

/* LADO IZQUIERDO - TEXTO MÁS ANCHO */
.eco-hero-text {
    position: relative;
    z-index: 2;
    flex: 0 1 auto; /* Permite que crezca si hay espacio */
    
    /* CAMBIO 2: AUMENTAR EL ANCHO MÁXIMO DEL TEXTO */
    max-width: 700px; /* Antes era 450px. Ahora el texto se estirará más */
    min-width: 400px; /* Evita que se aplaste demasiado */
}

.eco-hero-text small {
    font-size: 0.75rem; /* Un pelín más grande */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #999;
    margin-bottom: 0.8rem;
    display: block;
}

.eco-hero-text h2 {
    font-size: 3.5rem; /* Texto más impactante */
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
    color: #2c3e50;
    margin: 0;
}

.eco-hero-text h2 strong {
    color: #5a8f45;
}

/* --- FORMULARIO FLOTANTE (ESTILO SOLIDO) --- */
.eco-location-card {
    position: relative;
    width: 360px;
    background: white;
    padding: 2.5rem;
    border-radius: 8px; /* Bordes un poco más redondeados */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15); /* Sombra más elegante */
    z-index: 2;
    flex-shrink: 0;
    border: 1px solid #f0f0f0; /* Borde sutil a la tarjeta */
}

/* Títulos de los campos (Labels) */
.form-group {
    margin-bottom: 1.5rem; /* Más espacio entre campos */
}

.form-group label {
    font-size: 0.75rem;
    font-weight: 800; /* Letra más gruesa */
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #555; /* Color más oscuro para que se lea mejor */
    display: block;
    margin-bottom: 0.5rem;
}

/* INPUTS Y SELECTS (CORREGIDO) */
.eco-input {
    width: 100%;
    height: 50px; /* Altura fija para que no se vean aplastados */
    padding: 0 15px; /* Espacio interno a los lados */
    
    /* Estilo de Caja */
    background-color: #f7f9fc; /* Fondo gris muy suave */
    border: 1px solid #e0e0e0; /* Borde gris claro */
    border-radius: 4px;
    
    /* Tipografía */
    font-size: 14px;
    color: #333;
    font-family: inherit;
    font-weight: 500;
    
    /* Eliminar estilo por defecto del navegador */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none;
    
    /* Flecha personalizada a la derecha */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2347702A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    
    transition: all 0.3s ease;
}

/* Efecto al hacer clic en el input */
.eco-input:focus {
    background-color: #fff; /* Se pone blanco */
    border-color: #47702A; /* Borde verde */
    box-shadow: 0 0 0 3px rgba(71, 112, 42, 0.1); /* Resplandor verde suave */
}

/* Input deshabilitado (cuando no has elegido región) */
.eco-input:disabled {
    background-color: #f0f0f0;
    color: #999;
    cursor: not-allowed;
    border-color: #eee;
    background-image: none; /* Sin flecha */
}
/* BOTÓN */
#btn-continuar {
    padding: 1rem; /* Botón más robusto */
    background: linear-gradient(135deg, #5a8f45 0%, #3d6630 100%);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    margin: 1rem 0 0 0;
    width: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
}

#btn-continuar:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(90, 143, 69, 0.3);
}

/* VISTA CONSTRUCTOR - OCULTA */
#view-constructor {
    display: none;
}

/* RESPONSIVIDAD */
@media (max-width: 1024px) {
    #view-ubicacion {
        gap: 3rem;
        padding: 2rem;
    }
    
    .eco-hero-text h2 {
        font-size: 2.8rem;
    }
    
    .eco-hero-text {
        max-width: 450px; /* En pantallas medianas reducimos un poco */
    }
}

@media (max-width: 768px) {
    #view-ubicacion {
        flex-direction: column;
        min-height: auto;
        gap: 2.5rem;
        padding: 2rem 1rem;
    }
    
    .eco-hero-text {
        text-align: center;
        max-width: 100%;
    }
    
    .eco-hero-text h2 {
        font-size: 2.2rem;
    }
    
    .eco-location-card {
        width: 100%;
        max-width: 400px;
    }
}





/* =========================================
   PANTALLA 2: DASHBOARD CONSTRUCTOR
   ========================================= */

#view-constructor {
    width: 100%;
    height: 100%;
}

/* GRID PRINCIPAL (3 COLUMNAS: Sidebar | Lienzo | Resumen) */
.eco-constructor-grid {
    display: grid;
    grid-template-columns: 280px 1fr 300px; /* Anchos definidos */
    height: 100%;
    width: 100%;
    background: #f5f5f5;
}

/* 1. SIDEBAR IZQUIERDA */
.eco-sidebar {
    background: white;
    border-right: 1px solid #ddd;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.eco-sidebar h3 { font-size: 16px; margin: 0 0 10px 0; color: #47702A; text-transform: uppercase; }

.eco-menu { display: flex; flex-direction: column; gap: 10px; }

/* Botones del Menú */
.eco-menu-item, .eco-product-btn {
    padding: 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}
.eco-menu-item:hover, .eco-product-btn:hover {
    border-color: #47702A;
    background: #f4f9f2;
}
.eco-product-btn .icon { font-size: 20px; }
.eco-product-btn .info { flex: 1; }
.eco-product-btn strong { display: block; font-size: 13px; color: #333; }
.eco-product-btn small { font-size: 11px; color: #888; }
.eco-product-btn .price { font-weight: bold; color: #47702A; font-size: 12px; }


/* 2. LIENZO CENTRAL */
.eco-lienzo {
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Fondo Cuadriculado (Reutilizamos el estilo) */
    background-color: #f0f2f5;
    background-image:
        linear-gradient(#ddd 1px, transparent 1px),
        linear-gradient(90deg, #ddd 1px, transparent 1px);
    background-size: 40px 40px;
}

.eco-canvas {
    width: 100%;
    max-width: 800px;
    min-height: 400px;
    border: 2px dashed #bbb;
    border-radius: 10px;
    background: rgba(255,255,255,0.5);
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 10px;
    padding: 20px;
}

.empty-msg { width: 100%; text-align: center; color: #888; margin-top: 50px; font-weight: bold; }

/* Bloques Visuales */
.eco-block-visual {
    width: 100px; height: 100px;
    background: #47702A; color: white;
    border-radius: 4px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    font-size: 11px; text-align: center;
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    animation: popIn 0.3s;
}
.eco-block-visual.is-tiny { width: 150px; height: 150px; background: #d35400; }

.eco-block-visual .close {
    position: absolute; top: -5px; right: -5px;
    background: red; width: 20px; height: 20px;
    border-radius: 50%; cursor: pointer; line-height: 20px;
}


/* 3. RESUMEN DERECHA */
.eco-resumen {
    background: white;
    border-left: 1px solid #ddd;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.eco-summary-row {
    display: flex; justify-content: space-between;
    font-size: 13px; color: #555; margin-bottom: 8px;
}

.eco-summary-total {
    text-align: center; margin-top: 20px;
    background: #f9f9f9; padding: 15px; border-radius: 6px;
}
.eco-summary-total span { display: block; font-size: 24px; font-weight: bold; color: #47702A; }
.eco-summary-total .clp { font-size: 14px; color: #333; margin-top: 5px; }

#btn-cotizar-whatsapp {
    background: #25D366; color: white; border: none;
    padding: 15px; font-weight: bold; border-radius: 6px;
    margin-top: auto; cursor: pointer; text-transform: uppercase;
}
#btn-cotizar-whatsapp:hover { background: #128C7E; }

/* Responsive */
@media (max-width: 1024px) {
    .eco-constructor-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
        overflow-y: auto;
    }
    .eco-sidebar, .eco-resumen { height: auto; border: none; border-bottom: 1px solid #ddd; }
}