/* Botón en el Navbar */
.filter-navbar-btn {
    background: #3a8901;
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}



/* La Ventana Flotante (Overlay) */
.filter-overlay {
    position: fixed; /* Fijo en la pantalla */
    top: 80px;       /* Debajo del navbar */
    right: 20px;     /* Pegado a la derecha */
    width: 300px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    z-index: 1000;   /* Superpuesto a todo */
    padding: 20px;
    display: none;   /* Oculto por defecto */
    border: 1px solid #e0e0e0;
    animation: slideIn 0.3s ease;
}

.filter-overlay.active {
    display: block;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Estilos internos del formulario */
.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.filter-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #2c5530;
}

#close-filter-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
}

.filter-group {
    margin-bottom: 15px;
}

.filter-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 5px;
    color: #333;
}

.filter-group select, 
.filter-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter-divider {
    border: 0;
    border-top: 1px solid #eee;
    margin: 15px 0;
}

.filter-actions {
    display: flex;
    gap: 10px;
}

.filter-actions button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.btn-primary {
    background-color: #2c5530;
    color: white;
}

.btn-primary:hover {
    background-color: #1e3a22;
}

.btn-secondary {
    background-color: #f0f0f0;
    color: #333;
}

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

/* Responsivo para móviles */
@media (max-width: 768px) {
    .filter-overlay {
        right: 0;
        left: 0;
        top: auto;
        bottom: 0;
        width: 100%;
        border-radius: 15px 15px 0 0;
        animation: slideUp 0.3s ease;
    }
    
    @keyframes slideUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }
}